ablok-components 0.1.121 → 0.1.122
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.
|
@@ -28862,6 +28862,10 @@ const k3 = /* @__PURE__ */ NA({
|
|
|
28862
28862
|
type: Boolean,
|
|
28863
28863
|
default: !1
|
|
28864
28864
|
},
|
|
28865
|
+
options: {
|
|
28866
|
+
type: Object,
|
|
28867
|
+
default: () => ({})
|
|
28868
|
+
},
|
|
28865
28869
|
debug: {
|
|
28866
28870
|
type: Boolean,
|
|
28867
28871
|
default: !1
|
|
@@ -28876,7 +28880,8 @@ const k3 = /* @__PURE__ */ NA({
|
|
|
28876
28880
|
backgroundColor: "rgba(0, 0, 0, 0)",
|
|
28877
28881
|
scale: 1,
|
|
28878
28882
|
width: c.offsetWidth,
|
|
28879
|
-
height: c.offsetHeight
|
|
28883
|
+
height: c.offsetHeight,
|
|
28884
|
+
...e.options
|
|
28880
28885
|
})).toDataURL();
|
|
28881
28886
|
if (n("update:modelValue", h), e.debug) {
|
|
28882
28887
|
const p = new Image();
|
|
@@ -180,4 +180,4 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
180
180
|
content: "" !important;
|
|
181
181
|
display: none !important;
|
|
182
182
|
}`,$N=function(t){JN(t,"."+Gf+GN+IC+`
|
|
183
|
-
.`+Wf+WN+IC)},JN=function(t,A){var e=t.ownerDocument;if(e){var n=e.createElement("style");n.textContent=A,t.appendChild(n)}},SC=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}(),XN=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)||(Jf(A)||ZN(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 at(this,void 0,void 0,function(){var e,n,r,i,s=this;return Ze(this,function(a){switch(a.label){case 0:return e=SC.isSameOrigin(A),n=!$f(A)&&this._options.useCORS===!0&&Ve.SUPPORT_CORS_IMAGES&&!e,r=!$f(A)&&!e&&!Jf(A)&&typeof this._options.proxy=="string"&&Ve.SUPPORT_CORS_XHR&&!n,!e&&this._options.allowTaint===!1&&!$f(A)&&!Jf(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 f=new Image;f.onload=function(){return c(f)},f.onerror=u,(jN(i)||n)&&(f.crossOrigin="anonymous"),f.src=i,f.complete===!0&&setTimeout(function(){return c(f)},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=Ve.SUPPORT_RESPONSE_TYPE?"blob":"text",c=new XMLHttpRequest;c.onload=function(){if(c.status===200)if(a==="text")i(c.response);else{var h=new FileReader;h.addEventListener("load",function(){return i(h.result)},!1),h.addEventListener("error",function(g){return s(g)},!1),h.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 f=e._options.imageTimeout;c.timeout=f,c.ontimeout=function(){return s("Timed out ("+f+"ms) proxying "+r)}}c.send()})},t}(),YN=/^data:image\/svg\+xml/i,zN=/^data:image\/.*;base64,/i,qN=/^data:image\/.*/i,ZN=function(t){return Ve.SUPPORT_SVG_DRAWING||!AM(t)},$f=function(t){return qN.test(t)},jN=function(t){return zN.test(t)},Jf=function(t){return t.substr(0,4)==="blob"},AM=function(t){return t.substr(-3).toLowerCase()==="svg"||YN.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}(),ns=function(t,A,e){return new Z(t.x+(A.x-t.x)*e,t.y+(A.y-t.y)*e)},Cl=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=ns(this.start,this.startControl,A),r=ns(this.startControl,this.endControl,A),i=ns(this.endControl,this.end,A),s=ns(n,r,A),a=ns(r,i,A),c=ns(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}(),Gt=function(t){return t.type===1},eM=function(){function t(A){var e=A.styles,n=A.bounds,r=lo(e.borderTopLeftRadius,n.width,n.height),i=r[0],s=r[1],a=lo(e.borderTopRightRadius,n.width,n.height),c=a[0],u=a[1],f=lo(e.borderBottomRightRadius,n.width,n.height),h=f[0],g=f[1],m=lo(e.borderBottomLeftRadius,n.width,n.height),w=m[0],F=m[1],b=[];b.push((i+c)/n.width),b.push((w+h)/n.width),b.push((s+F)/n.height),b.push((u+g)/n.height);var I=Math.max.apply(Math,b);I>1&&(i/=I,s/=I,c/=I,u/=I,h/=I,g/=I,w/=I,F/=I);var O=n.width-c,T=n.height-g,E=n.width-h,H=n.height-F,U=e.borderTopWidth,M=e.borderRightWidth,P=e.borderBottomWidth,N=e.borderLeftWidth,sA=ie(e.paddingTop,A.bounds.width),mA=ie(e.paddingRight,A.bounds.width),nA=ie(e.paddingBottom,A.bounds.width),cA=ie(e.paddingLeft,A.bounds.width);this.topLeftBorderDoubleOuterBox=i>0||s>0?ce(n.left+N/3,n.top+U/3,i-N/3,s-U/3,XA.TOP_LEFT):new Z(n.left+N/3,n.top+U/3),this.topRightBorderDoubleOuterBox=i>0||s>0?ce(n.left+O,n.top+U/3,c-M/3,u-U/3,XA.TOP_RIGHT):new Z(n.left+n.width-M/3,n.top+U/3),this.bottomRightBorderDoubleOuterBox=h>0||g>0?ce(n.left+E,n.top+T,h-M/3,g-P/3,XA.BOTTOM_RIGHT):new Z(n.left+n.width-M/3,n.top+n.height-P/3),this.bottomLeftBorderDoubleOuterBox=w>0||F>0?ce(n.left+N/3,n.top+H,w-N/3,F-P/3,XA.BOTTOM_LEFT):new Z(n.left+N/3,n.top+n.height-P/3),this.topLeftBorderDoubleInnerBox=i>0||s>0?ce(n.left+N*2/3,n.top+U*2/3,i-N*2/3,s-U*2/3,XA.TOP_LEFT):new Z(n.left+N*2/3,n.top+U*2/3),this.topRightBorderDoubleInnerBox=i>0||s>0?ce(n.left+O,n.top+U*2/3,c-M*2/3,u-U*2/3,XA.TOP_RIGHT):new Z(n.left+n.width-M*2/3,n.top+U*2/3),this.bottomRightBorderDoubleInnerBox=h>0||g>0?ce(n.left+E,n.top+T,h-M*2/3,g-P*2/3,XA.BOTTOM_RIGHT):new Z(n.left+n.width-M*2/3,n.top+n.height-P*2/3),this.bottomLeftBorderDoubleInnerBox=w>0||F>0?ce(n.left+N*2/3,n.top+H,w-N*2/3,F-P*2/3,XA.BOTTOM_LEFT):new Z(n.left+N*2/3,n.top+n.height-P*2/3),this.topLeftBorderStroke=i>0||s>0?ce(n.left+N/2,n.top+U/2,i-N/2,s-U/2,XA.TOP_LEFT):new Z(n.left+N/2,n.top+U/2),this.topRightBorderStroke=i>0||s>0?ce(n.left+O,n.top+U/2,c-M/2,u-U/2,XA.TOP_RIGHT):new Z(n.left+n.width-M/2,n.top+U/2),this.bottomRightBorderStroke=h>0||g>0?ce(n.left+E,n.top+T,h-M/2,g-P/2,XA.BOTTOM_RIGHT):new Z(n.left+n.width-M/2,n.top+n.height-P/2),this.bottomLeftBorderStroke=w>0||F>0?ce(n.left+N/2,n.top+H,w-N/2,F-P/2,XA.BOTTOM_LEFT):new Z(n.left+N/2,n.top+n.height-P/2),this.topLeftBorderBox=i>0||s>0?ce(n.left,n.top,i,s,XA.TOP_LEFT):new Z(n.left,n.top),this.topRightBorderBox=c>0||u>0?ce(n.left+O,n.top,c,u,XA.TOP_RIGHT):new Z(n.left+n.width,n.top),this.bottomRightBorderBox=h>0||g>0?ce(n.left+E,n.top+T,h,g,XA.BOTTOM_RIGHT):new Z(n.left+n.width,n.top+n.height),this.bottomLeftBorderBox=w>0||F>0?ce(n.left,n.top+H,w,F,XA.BOTTOM_LEFT):new Z(n.left,n.top+n.height),this.topLeftPaddingBox=i>0||s>0?ce(n.left+N,n.top+U,Math.max(0,i-N),Math.max(0,s-U),XA.TOP_LEFT):new Z(n.left+N,n.top+U),this.topRightPaddingBox=c>0||u>0?ce(n.left+Math.min(O,n.width-M),n.top+U,O>n.width+M?0:Math.max(0,c-M),Math.max(0,u-U),XA.TOP_RIGHT):new Z(n.left+n.width-M,n.top+U),this.bottomRightPaddingBox=h>0||g>0?ce(n.left+Math.min(E,n.width-N),n.top+Math.min(T,n.height-P),Math.max(0,h-M),Math.max(0,g-P),XA.BOTTOM_RIGHT):new Z(n.left+n.width-M,n.top+n.height-P),this.bottomLeftPaddingBox=w>0||F>0?ce(n.left+N,n.top+Math.min(H,n.height-P),Math.max(0,w-N),Math.max(0,F-P),XA.BOTTOM_LEFT):new Z(n.left+N,n.top+n.height-P),this.topLeftContentBox=i>0||s>0?ce(n.left+N+cA,n.top+U+sA,Math.max(0,i-(N+cA)),Math.max(0,s-(U+sA)),XA.TOP_LEFT):new Z(n.left+N+cA,n.top+U+sA),this.topRightContentBox=c>0||u>0?ce(n.left+Math.min(O,n.width+N+cA),n.top+U+sA,O>n.width+N+cA?0:c-N+cA,u-(U+sA),XA.TOP_RIGHT):new Z(n.left+n.width-(M+mA),n.top+U+sA),this.bottomRightContentBox=h>0||g>0?ce(n.left+Math.min(E,n.width-(N+cA)),n.top+Math.min(T,n.height+U+sA),Math.max(0,h-(M+mA)),g-(P+nA),XA.BOTTOM_RIGHT):new Z(n.left+n.width-(M+mA),n.top+n.height-(P+nA)),this.bottomLeftContentBox=w>0||F>0?ce(n.left+N+cA,n.top+H,Math.max(0,w-(N+cA)),F-(P+nA),XA.BOTTOM_LEFT):new Z(n.left+N+cA,n.top+n.height-(P+nA))}return t}(),XA;(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"})(XA||(XA={}));var ce=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 XA.TOP_LEFT:return new Cl(new Z(t,u),new Z(t,u-a),new Z(c-s,A),new Z(c,A));case XA.TOP_RIGHT:return new Cl(new Z(t,A),new Z(t+s,A),new Z(c,u-a),new Z(c,u));case XA.BOTTOM_RIGHT:return new Cl(new Z(c,A),new Z(c,A+a),new Z(t+s,u),new Z(t,u));case XA.BOTTOM_LEFT:default:return new Cl(new Z(c,u),new Z(c-s,u),new Z(t,A+a),new Z(t,A))}},yl=function(t){return[t.topLeftBorderBox,t.topRightBorderBox,t.bottomRightBorderBox,t.bottomLeftBorderBox]},tM=function(t){return[t.topLeftContentBox,t.topRightContentBox,t.bottomRightContentBox,t.bottomLeftContentBox]},El=function(t){return[t.topLeftPaddingBox,t.topRightPaddingBox,t.bottomRightPaddingBox,t.bottomLeftPaddingBox]},nM=function(){function t(A,e,n){this.offsetX=A,this.offsetY=e,this.matrix=n,this.type=0,this.target=6}return t}(),Ql=function(){function t(A,e){this.path=A,this.target=e,this.type=1}return t}(),rM=function(){function t(A){this.opacity=A,this.type=2,this.target=6}return t}(),iM=function(t){return t.type===0},TC=function(t){return t.type===1},sM=function(t){return t.type===2},_C=function(t,A){return t.length===A.length?t.some(function(e,n){return e===A[n]}):!1},oM=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})},xC=function(){function t(A){this.element=A,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return t}(),OC=function(){function t(A,e){if(this.container=A,this.parent=e,this.effects=[],this.curves=new eM(this.container),this.container.styles.opacity<1&&this.effects.push(new rM(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 nM(n,r,i))}if(this.container.styles.overflowX!==0){var s=yl(this.curves),a=El(this.curves);_C(s,a)?this.effects.push(new Ql(s,6)):(this.effects.push(new Ql(s,2)),this.effects.push(new Ql(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!TC(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=yl(n.curves),a=El(n.curves);_C(s,a)||r.unshift(new Ql(a,6))}}else r.unshift.apply(r,i);n=n.parent}return r.filter(function(c){return Ie(c.target,A)})},t}(),Xf=function(t,A,e,n){t.container.elements.forEach(function(r){var i=Ie(r.flags,4),s=Ie(r.flags,2),a=new OC(r,t);Ie(r.styles.display,2048)&&n.push(a);var c=Ie(r.flags,8)?[]:n;if(i||s){var u=i||r.styles.isPositioned()?e:A,f=new xC(a);if(r.styles.isPositioned()||r.styles.opacity<1||r.styles.isTransformed()){var h=r.styles.zIndex.order;if(h<0){var g=0;u.negativeZIndex.some(function(w,F){return h>w.element.container.styles.zIndex.order?(g=F,!1):g>0}),u.negativeZIndex.splice(g,0,f)}else if(h>0){var m=0;u.positiveZIndex.some(function(w,F){return h>=w.element.container.styles.zIndex.order?(m=F+1,!1):m>0}),u.positiveZIndex.splice(m,0,f)}else u.zeroOrAutoZIndexOrTransformedOrOpacity.push(f)}else r.styles.isFloating()?u.nonPositionedFloats.push(f):u.nonPositionedInlineLevel.push(f);Xf(a,f,i?f:e,c)}else r.styles.isInlineLevel()?A.inlineLevel.push(a):A.nonInlineLevel.push(a),Xf(a,A,e,c);Ie(r.flags,8)&&LC(r,c)})},LC=function(t,A){for(var e=t instanceof Nf?t.start:1,n=t instanceof Nf?t.reversed:!1,r=0;r<A.length;r++){var i=A[r];i.container instanceof iC&&typeof i.container.value=="number"&&i.container.value!==0&&(e=i.container.value),i.listValue=go(e,i.container.styles.listStyleType,!0),e+=n?-1:1}},aM=function(t){var A=new OC(t,null),e=new xC(A),n=[];return Xf(A,e,e,n),LC(A.container,n),e},HC=function(t,A){switch(A){case 0:return Wt(t.topLeftBorderBox,t.topLeftPaddingBox,t.topRightBorderBox,t.topRightPaddingBox);case 1:return Wt(t.topRightBorderBox,t.topRightPaddingBox,t.bottomRightBorderBox,t.bottomRightPaddingBox);case 2:return Wt(t.bottomRightBorderBox,t.bottomRightPaddingBox,t.bottomLeftBorderBox,t.bottomLeftPaddingBox);case 3:default:return Wt(t.bottomLeftBorderBox,t.bottomLeftPaddingBox,t.topLeftBorderBox,t.topLeftPaddingBox)}},lM=function(t,A){switch(A){case 0:return Wt(t.topLeftBorderBox,t.topLeftBorderDoubleOuterBox,t.topRightBorderBox,t.topRightBorderDoubleOuterBox);case 1:return Wt(t.topRightBorderBox,t.topRightBorderDoubleOuterBox,t.bottomRightBorderBox,t.bottomRightBorderDoubleOuterBox);case 2:return Wt(t.bottomRightBorderBox,t.bottomRightBorderDoubleOuterBox,t.bottomLeftBorderBox,t.bottomLeftBorderDoubleOuterBox);case 3:default:return Wt(t.bottomLeftBorderBox,t.bottomLeftBorderDoubleOuterBox,t.topLeftBorderBox,t.topLeftBorderDoubleOuterBox)}},cM=function(t,A){switch(A){case 0:return Wt(t.topLeftBorderDoubleInnerBox,t.topLeftPaddingBox,t.topRightBorderDoubleInnerBox,t.topRightPaddingBox);case 1:return Wt(t.topRightBorderDoubleInnerBox,t.topRightPaddingBox,t.bottomRightBorderDoubleInnerBox,t.bottomRightPaddingBox);case 2:return Wt(t.bottomRightBorderDoubleInnerBox,t.bottomRightPaddingBox,t.bottomLeftBorderDoubleInnerBox,t.bottomLeftPaddingBox);case 3:default:return Wt(t.bottomLeftBorderDoubleInnerBox,t.bottomLeftPaddingBox,t.topLeftBorderDoubleInnerBox,t.topLeftPaddingBox)}},uM=function(t,A){switch(A){case 0:return Fl(t.topLeftBorderStroke,t.topRightBorderStroke);case 1:return Fl(t.topRightBorderStroke,t.bottomRightBorderStroke);case 2:return Fl(t.bottomRightBorderStroke,t.bottomLeftBorderStroke);case 3:default:return Fl(t.bottomLeftBorderStroke,t.topLeftBorderStroke)}},Fl=function(t,A){var e=[];return Gt(t)?e.push(t.subdivide(.5,!1)):e.push(t),Gt(A)?e.push(A.subdivide(.5,!0)):e.push(A),e},Wt=function(t,A,e,n){var r=[];return Gt(t)?r.push(t.subdivide(.5,!1)):r.push(t),Gt(e)?r.push(e.subdivide(.5,!0)):r.push(e),Gt(n)?r.push(n.subdivide(.5,!0).reverse()):r.push(n),Gt(A)?r.push(A.subdivide(.5,!1).reverse()):r.push(A),r},kC=function(t){var A=t.bounds,e=t.styles;return A.add(e.borderLeftWidth,e.borderTopWidth,-(e.borderRightWidth+e.borderLeftWidth),-(e.borderTopWidth+e.borderBottomWidth))},bl=function(t){var A=t.styles,e=t.bounds,n=ie(A.paddingLeft,e.width),r=ie(A.paddingRight,e.width),i=ie(A.paddingTop,e.width),s=ie(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))},fM=function(t,A){return t===0?A.bounds:t===2?bl(A):kC(A)},dM=function(t,A){return t===0?A.bounds:t===2?bl(A):kC(A)},Yf=function(t,A,e){var n=fM(is(t.styles.backgroundOrigin,A),t),r=dM(is(t.styles.backgroundClip,A),t),i=hM(is(t.styles.backgroundSize,A),e,n),s=i[0],a=i[1],c=lo(is(t.styles.backgroundPosition,A),n.width-s,n.height-a),u=pM(is(t.styles.backgroundRepeat,A),c,i,n,r),f=Math.round(n.left+c[0]),h=Math.round(n.top+c[1]);return[u,f,h,s,a]},rs=function(t){return Ae(t)&&t.value===ji.AUTO},Ul=function(t){return typeof t=="number"},hM=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(be(s)&&a&&be(a))return[ie(s,e.width),ie(a,e.height)];var c=Ul(i);if(Ae(s)&&(s.value===ji.CONTAIN||s.value===ji.COVER)){if(Ul(i)){var u=e.width/e.height;return u<i!=(s.value===ji.COVER)?[e.width,e.width/i]:[e.height*i,e.height]}return[e.width,e.height]}var f=Ul(n),h=Ul(r),g=f||h;if(rs(s)&&(!a||rs(a))){if(f&&h)return[n,r];if(!c&&!g)return[e.width,e.height];if(g&&c){var m=f?n:r*i,w=h?r:n/i;return[m,w]}var F=f?n:e.width,b=h?r:e.height;return[F,b]}if(c){var I=0,O=0;return be(s)?I=ie(s,e.width):be(a)&&(O=ie(a,e.height)),rs(s)?I=O*i:(!a||rs(a))&&(O=I/i),[I,O]}var T=null,E=null;if(be(s)?T=ie(s,e.width):a&&be(a)&&(E=ie(a,e.height)),T!==null&&(!a||rs(a))&&(E=f&&h?T/n*r:e.height),E!==null&&rs(s)&&(T=f&&h?E/r*n:e.width),T!==null&&E!==null)return[T,E];throw new Error("Unable to calculate background-size for element")},is=function(t,A){var e=t[A];return typeof e>"u"?t[0]:e},pM=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))]}},gM="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",NC="Hidden Text",BM=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=gM,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(NC)),n.appendChild(i),n.appendChild(r);var a=r.offsetTop-i.offsetTop+2;n.removeChild(i),n.appendChild(this._document.createTextNode(NC)),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}(),MC=function(){function t(A,e){this.context=A,this.options=e}return t}(),mM=1e4,wM=function(t){ln(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 BM(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(),sM(e)&&(this.ctx.globalAlpha=e.opacity),iM(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)),TC(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 at(this,void 0,void 0,function(){var n;return Ze(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 at(this,void 0,void 0,function(){return Ze(this,function(n){switch(n.label){case 0:if(Ie(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=kf(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=FM(e.fontFamily).join(", "),i=ao(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 at(this,void 0,void 0,function(){var r,i,s,a,c,u,f,h,g=this;return Ze(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,f=c.middle,h=n.paintOrder,e.textBounds.forEach(function(w){h.forEach(function(F){switch(F){case 0:g.ctx.fillStyle=ke(n.color),g.renderTextWithLetterSpacing(w,n.letterSpacing,u);var b=n.textShadow;b.length&&w.text.trim().length&&(b.slice(0).reverse().forEach(function(I){g.ctx.shadowColor=ke(I.color),g.ctx.shadowOffsetX=I.offsetX.number*g.options.scale,g.ctx.shadowOffsetY=I.offsetY.number*g.options.scale,g.ctx.shadowBlur=I.blur.number,g.renderTextWithLetterSpacing(w,n.letterSpacing,u)}),g.ctx.shadowColor="",g.ctx.shadowOffsetX=0,g.ctx.shadowOffsetY=0,g.ctx.shadowBlur=0),n.textDecorationLine.length&&(g.ctx.fillStyle=ke(n.textDecorationColor||n.color),n.textDecorationLine.forEach(function(I){switch(I){case 1:g.ctx.fillRect(w.bounds.left,Math.round(w.bounds.top+u),w.bounds.width,1);break;case 2:g.ctx.fillRect(w.bounds.left,Math.round(w.bounds.top),w.bounds.width,1);break;case 3:g.ctx.fillRect(w.bounds.left,Math.ceil(w.bounds.top+f),w.bounds.width,1);break}}));break;case 1:n.webkitTextStrokeWidth&&w.text.trim().length&&(g.ctx.strokeStyle=ke(n.webkitTextStrokeColor),g.ctx.lineWidth=n.webkitTextStrokeWidth,g.ctx.lineJoin=window.chrome?"miter":"round",g.ctx.strokeText(w.text,w.bounds.left,w.bounds.top+u)),g.ctx.strokeStyle="",g.ctx.lineWidth=0,g.ctx.lineJoin="miter";break}})}),[2]})})},A.prototype.renderReplacedElement=function(e,n,r){if(r&&e.intrinsicWidth>0&&e.intrinsicHeight>0){var i=bl(e),s=El(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 at(this,void 0,void 0,function(){var n,r,i,s,a,c,O,O,u,f,h,g,E,m,w,H,F,b,I,O,T,E,H;return Ze(this,function(U){switch(U.label){case 0:this.applyEffects(e.getEffects(4)),n=e.container,r=e.curves,i=n.styles,s=0,a=n.textNodes,U.label=1;case 1:return s<a.length?(c=a[s],[4,this.renderTextNode(c,i)]):[3,4];case 2:U.sent(),U.label=3;case 3:return s++,[3,1];case 4:if(!(n instanceof tC))return[3,8];U.label=5;case 5:return U.trys.push([5,7,,8]),[4,this.context.cache.match(n.src)];case 6:return O=U.sent(),this.renderReplacedElement(n,r,O),[3,8];case 7:return U.sent(),this.context.logger.error("Error loading image "+n.src),[3,8];case 8:if(n instanceof nC&&this.renderReplacedElement(n,r,n.canvas),!(n instanceof rC))return[3,12];U.label=9;case 9:return U.trys.push([9,11,,12]),[4,this.context.cache.match(n.svg)];case 10:return O=U.sent(),this.renderReplacedElement(n,r,O),[3,12];case 11:return U.sent(),this.context.logger.error("Error loading svg "+n.svg.substring(0,255)),[3,12];case 12:return n instanceof lC&&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:f=U.sent(),n.width&&n.height&&this.ctx.drawImage(f,0,0,n.width,n.height,n.bounds.left,n.bounds.top,n.bounds.width,n.bounds.height),U.label=14;case 14:if(n instanceof Mf&&(h=Math.min(n.bounds.width,n.bounds.height),n.type===hl?n.checked&&(this.ctx.save(),this.path([new Z(n.bounds.left+h*.39363,n.bounds.top+h*.79),new Z(n.bounds.left+h*.16,n.bounds.top+h*.5549),new Z(n.bounds.left+h*.27347,n.bounds.top+h*.44071),new Z(n.bounds.left+h*.39694,n.bounds.top+h*.5649),new Z(n.bounds.left+h*.72983,n.bounds.top+h*.23),new Z(n.bounds.left+h*.84,n.bounds.top+h*.34085),new Z(n.bounds.left+h*.39363,n.bounds.top+h*.79)]),this.ctx.fillStyle=ke(sC),this.ctx.fill(),this.ctx.restore()):n.type===pl&&n.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(n.bounds.left+h/2,n.bounds.top+h/2,h/4,0,Math.PI*2,!0),this.ctx.fillStyle=ke(sC),this.ctx.fill(),this.ctx.restore())),CM(n)&&n.value.length){switch(g=this.createFontStyle(i),E=g[0],m=g[1],w=this.fontMetrics.getMetrics(E,m).baseline,this.ctx.font=E,this.ctx.fillStyle=ke(i.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=EM(n.styles.textAlign),H=bl(n),F=0,n.styles.textAlign){case 1:F+=H.width/2;break;case 2:F+=H.width;break}b=H.add(F,0,0,-H.height/2+1),this.ctx.save(),this.path([new Z(H.left,H.top),new Z(H.left+H.width,H.top),new Z(H.left+H.width,H.top+H.height),new Z(H.left,H.top+H.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new ho(n.value,b),i.letterSpacing,w),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!Ie(n.styles.display,2048))return[3,20];if(n.styles.listStyleImage===null)return[3,19];if(I=n.styles.listStyleImage,I.type!==0)return[3,18];O=void 0,T=I.url,U.label=15;case 15:return U.trys.push([15,17,,18]),[4,this.context.cache.match(T)];case 16:return O=U.sent(),this.ctx.drawImage(O,n.bounds.left-(O.width+10),n.bounds.top),[3,18];case 17:return U.sent(),this.context.logger.error("Error loading list-style-image "+T),[3,18];case 18:return[3,20];case 19:e.listValue&&n.styles.listStyleType!==-1&&(E=this.createFontStyle(i)[0],this.ctx.font=E,this.ctx.fillStyle=ke(i.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",H=new Wn(n.bounds.left,n.bounds.top+ie(n.styles.paddingTop,n.bounds.width),n.bounds.width,Nw(i.lineHeight,i.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new ho(e.listValue,H),i.letterSpacing,Nw(i.lineHeight,i.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),U.label=20;case 20:return[2]}})})},A.prototype.renderStackContent=function(e){return at(this,void 0,void 0,function(){var n,r,I,i,s,I,a,c,I,u,f,I,h,g,I,m,w,I,F,b,I;return Ze(this,function(O){switch(O.label){case 0:if(Ie(e.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(e.element)];case 1:O.sent(),n=0,r=e.negativeZIndex,O.label=2;case 2:return n<r.length?(I=r[n],[4,this.renderStack(I)]):[3,5];case 3:O.sent(),O.label=4;case 4:return n++,[3,2];case 5:return[4,this.renderNodeContent(e.element)];case 6:O.sent(),i=0,s=e.nonInlineLevel,O.label=7;case 7:return i<s.length?(I=s[i],[4,this.renderNode(I)]):[3,10];case 8:O.sent(),O.label=9;case 9:return i++,[3,7];case 10:a=0,c=e.nonPositionedFloats,O.label=11;case 11:return a<c.length?(I=c[a],[4,this.renderStack(I)]):[3,14];case 12:O.sent(),O.label=13;case 13:return a++,[3,11];case 14:u=0,f=e.nonPositionedInlineLevel,O.label=15;case 15:return u<f.length?(I=f[u],[4,this.renderStack(I)]):[3,18];case 16:O.sent(),O.label=17;case 17:return u++,[3,15];case 18:h=0,g=e.inlineLevel,O.label=19;case 19:return h<g.length?(I=g[h],[4,this.renderNode(I)]):[3,22];case 20:O.sent(),O.label=21;case 21:return h++,[3,19];case 22:m=0,w=e.zeroOrAutoZIndexOrTransformedOrOpacity,O.label=23;case 23:return m<w.length?(I=w[m],[4,this.renderStack(I)]):[3,26];case 24:O.sent(),O.label=25;case 25:return m++,[3,23];case 26:F=0,b=e.positiveZIndex,O.label=27;case 27:return F<b.length?(I=b[F],[4,this.renderStack(I)]):[3,30];case 28:O.sent(),O.label=29;case 29:return F++,[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=Gt(r)?r.start:r;i===0?n.ctx.moveTo(s.x,s.y):n.ctx.lineTo(s.x,s.y),Gt(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 at(this,void 0,void 0,function(){var n,r,i,s,a,c;return Ze(this,function(u){switch(u.label){case 0:n=e.styles.backgroundImage.length-1,r=function(f){var h,g,m,sA,RA,HA,cA,LA,P,w,sA,RA,HA,cA,LA,F,b,I,O,T,E,H,U,M,P,N,sA,mA,nA,cA,LA,se,RA,HA,rA,BA,YA,VA,GA,DA,qA,WA;return Ze(this,function(ue){switch(ue.label){case 0:if(f.type!==0)return[3,5];h=void 0,g=f.url,ue.label=1;case 1:return ue.trys.push([1,3,,4]),[4,i.context.cache.match(g)];case 2:return h=ue.sent(),[3,4];case 3:return ue.sent(),i.context.logger.error("Error loading background-image "+g),[3,4];case 4:return h&&(m=Yf(e,n,[h.width,h.height,h.width/h.height]),sA=m[0],RA=m[1],HA=m[2],cA=m[3],LA=m[4],P=i.ctx.createPattern(i.resizeImage(h,cA,LA),"repeat"),i.renderRepeat(sA,P,RA,HA)),[3,6];case 5:iH(f)?(w=Yf(e,n,[null,null,null]),sA=w[0],RA=w[1],HA=w[2],cA=w[3],LA=w[4],F=AH(f.angle,cA,LA),b=F[0],I=F[1],O=F[2],T=F[3],E=F[4],H=document.createElement("canvas"),H.width=cA,H.height=LA,U=H.getContext("2d"),M=U.createLinearGradient(I,T,O,E),Uw(f.stops,b).forEach(function(Ne){return M.addColorStop(Ne.stop,ke(Ne.color))}),U.fillStyle=M,U.fillRect(0,0,cA,LA),cA>0&&LA>0&&(P=i.ctx.createPattern(H,"repeat"),i.renderRepeat(sA,P,RA,HA))):sH(f)&&(N=Yf(e,n,[null,null,null]),sA=N[0],mA=N[1],nA=N[2],cA=N[3],LA=N[4],se=f.position.length===0?[yf]:f.position,RA=ie(se[0],cA),HA=ie(se[se.length-1],LA),rA=eH(f,RA,HA,cA,LA),BA=rA[0],YA=rA[1],BA>0&&YA>0&&(VA=i.ctx.createRadialGradient(mA+RA,nA+HA,0,mA+RA,nA+HA,BA),Uw(f.stops,BA*2).forEach(function(Ne){return VA.addColorStop(Ne.stop,ke(Ne.color))}),i.path(sA),i.ctx.fillStyle=VA,BA!==YA?(GA=e.bounds.left+.5*e.bounds.width,DA=e.bounds.top+.5*e.bounds.height,qA=YA/BA,WA=1/qA,i.ctx.save(),i.ctx.translate(GA,DA),i.ctx.transform(1,0,0,qA,0,0),i.ctx.translate(-GA,-DA),i.ctx.fillRect(mA,WA*(nA-DA)+DA,cA,LA*WA),i.ctx.restore()):i.ctx.fill())),ue.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 at(this,void 0,void 0,function(){return Ze(this,function(i){return this.path(HC(r,n)),this.ctx.fillStyle=ke(e),this.ctx.fill(),[2]})})},A.prototype.renderDoubleBorder=function(e,n,r,i){return at(this,void 0,void 0,function(){var s,a;return Ze(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=lM(i,r),this.path(s),this.ctx.fillStyle=ke(e),this.ctx.fill(),a=cM(i,r),this.path(a),this.ctx.fill(),[2]}})})},A.prototype.renderNodeBackgroundAndBorders=function(e){return at(this,void 0,void 0,function(){var n,r,i,s,a,c,u,f,h=this;return Ze(this,function(g){switch(g.label){case 0:return this.applyEffects(e.getEffects(2)),n=e.container.styles,r=!Ir(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=yM(is(n.backgroundClip,0),e.curves),r||n.boxShadow.length?(this.ctx.save(),this.path(s),this.ctx.clip(),Ir(n.backgroundColor)||(this.ctx.fillStyle=ke(n.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(e.container)]):[3,2];case 1:g.sent(),this.ctx.restore(),n.boxShadow.slice(0).reverse().forEach(function(m){h.ctx.save();var w=yl(e.curves),F=m.inset?0:mM,b=oM(w,-F+(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?(h.path(w),h.ctx.clip(),h.mask(b)):(h.mask(w),h.ctx.clip(),h.path(b)),h.ctx.shadowOffsetX=m.offsetX.number+F,h.ctx.shadowOffsetY=m.offsetY.number,h.ctx.shadowColor=ke(m.color),h.ctx.shadowBlur=m.blur.number,h.ctx.fillStyle=m.inset?ke(m.color):"rgba(0,0,0,1)",h.ctx.fill(),h.ctx.restore()}),g.label=2;case 2:a=0,c=0,u=i,g.label=3;case 3:return c<u.length?(f=u[c],f.style!==0&&!Ir(f.color)&&f.width>0?f.style!==2?[3,5]:[4,this.renderDashedDottedBorder(f.color,f.width,a,e.curves,2)]:[3,11]):[3,13];case 4:return g.sent(),[3,11];case 5:return f.style!==3?[3,7]:[4,this.renderDashedDottedBorder(f.color,f.width,a,e.curves,3)];case 6:return g.sent(),[3,11];case 7:return f.style!==4?[3,9]:[4,this.renderDoubleBorder(f.color,f.width,a,e.curves)];case 8:return g.sent(),[3,11];case 9:return[4,this.renderSolidBorder(f.color,a,e.curves)];case 10:g.sent(),g.label=11;case 11:a++,g.label=12;case 12:return c++,[3,3];case 13:return[2]}})})},A.prototype.renderDashedDottedBorder=function(e,n,r,i,s){return at(this,void 0,void 0,function(){var a,c,u,f,h,g,m,w,F,b,I,O,T,E,H,U,H,U;return Ze(this,function(M){return this.ctx.save(),a=uM(i,r),c=HC(i,r),s===2&&(this.path(c),this.ctx.clip()),Gt(c[0])?(u=c[0].start.x,f=c[0].start.y):(u=c[0].x,f=c[0].y),Gt(c[1])?(h=c[1].end.x,g=c[1].end.y):(h=c[1].x,g=c[1].y),r===0||r===2?m=Math.abs(u-h):m=Math.abs(f-g),this.ctx.beginPath(),s===3?this.formatPath(a):this.formatPath(c.slice(0,2)),w=n<3?n*3:n*2,F=n<3?n*2:n,s===3&&(w=n,F=n),b=!0,m<=w*2?b=!1:m<=w*2+F?(I=m/(2*w+F),w*=I,F*=I):(O=Math.floor((m+F)/(w+F)),T=(m-O*w)/(O-1),E=(m-(O+1)*w)/O,F=E<=0||Math.abs(F-T)<Math.abs(F-E)?T:E),b&&(s===3?this.ctx.setLineDash([0,w+F]):this.ctx.setLineDash([w,F])),s===3?(this.ctx.lineCap="round",this.ctx.lineWidth=n):this.ctx.lineWidth=n*2+1.1,this.ctx.strokeStyle=ke(e),this.ctx.stroke(),this.ctx.setLineDash([]),s===2&&(Gt(c[0])&&(H=c[3],U=c[0],this.ctx.beginPath(),this.formatPath([new Z(H.end.x,H.end.y),new Z(U.start.x,U.start.y)]),this.ctx.stroke()),Gt(c[1])&&(H=c[1],U=c[2],this.ctx.beginPath(),this.formatPath([new Z(H.end.x,H.end.y),new Z(U.start.x,U.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},A.prototype.render=function(e){return at(this,void 0,void 0,function(){var n;return Ze(this,function(r){switch(r.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=ke(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),n=aM(e),[4,this.renderStack(n)];case 1:return r.sent(),this.applyEffects([]),[2,this.canvas]}})})},A}(MC),CM=function(t){return t instanceof aC||t instanceof oC?!0:t instanceof Mf&&t.type!==pl&&t.type!==hl},yM=function(t,A){switch(t){case 0:return yl(A);case 2:return tM(A);case 1:default:return El(A)}},EM=function(t){switch(t){case 1:return"center";case 2:return"right";case 0:default:return"left"}},QM=["-apple-system","system-ui"],FM=function(t){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?t.filter(function(A){return QM.indexOf(A)===-1}):t},bM=function(t){ln(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 at(this,void 0,void 0,function(){var n,r;return Ze(this,function(i){switch(i.label){case 0:return n=Hf(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,e),[4,UM(n)];case 1:return r=i.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=ke(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}(MC),UM=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))})},vM=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,La([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,La([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,La([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,La([this.id,this.getTime()+"ms"],A)):this.info.apply(this,A))},t.instances={},t}(),IM=function(){function t(A,e){var n;this.windowBounds=e,this.instanceName="#"+t.instanceCount++,this.logger=new vM({id:this.instanceName,enabled:A.logging}),this.cache=(n=A.cache)!==null&&n!==void 0?n:new XN(this,A)}return t.instanceCount=1,t}(),SM=function(t,A){return A===void 0&&(A={}),TM(t,A)};typeof window<"u"&&SC.setContext(window);var TM=function(t,A){return at(void 0,void 0,void 0,function(){var e,n,r,i,s,a,c,u,f,h,g,m,w,F,b,I,O,T,E,H,M,U,M,P,N,sA,mA,nA,cA,LA,se,RA,HA,rA,BA,YA,VA,GA,DA,qA;return Ze(this,function(WA){switch(WA.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:(P=A.allowTaint)!==null&&P!==void 0?P:!1,imageTimeout:(N=A.imageTimeout)!==null&&N!==void 0?N:15e3,proxy:A.proxy,useCORS:(sA=A.useCORS)!==null&&sA!==void 0?sA:!1},i=ju({logging:(mA=A.logging)!==null&&mA!==void 0?mA:!0,cache:A.cache},r),s={windowWidth:(nA=A.windowWidth)!==null&&nA!==void 0?nA:n.innerWidth,windowHeight:(cA=A.windowHeight)!==null&&cA!==void 0?cA:n.innerHeight,scrollX:(LA=A.scrollX)!==null&&LA!==void 0?LA:n.pageXOffset,scrollY:(se=A.scrollY)!==null&&se!==void 0?se:n.pageYOffset},a=new Wn(s.scrollX,s.scrollY,s.windowWidth,s.windowHeight),c=new IM(i,a),u=(RA=A.foreignObjectRendering)!==null&&RA!==void 0?RA:!1,f={allowTaint:(HA=A.allowTaint)!==null&&HA!==void 0?HA:!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),h=new vC(c,t,f),g=h.clonedReferenceElement,g?[4,h.toIFrame(e,a)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return m=WA.sent(),w=Rf(g)||_N(g)?oO(g.ownerDocument):Ha(c,g),F=w.width,b=w.height,I=w.left,O=w.top,T=_M(c,g,A.backgroundColor),E={canvas:A.canvas,backgroundColor:T,scale:(BA=(rA=A.scale)!==null&&rA!==void 0?rA:n.devicePixelRatio)!==null&&BA!==void 0?BA:1,x:((YA=A.x)!==null&&YA!==void 0?YA:0)+I,y:((VA=A.y)!==null&&VA!==void 0?VA:0)+O,width:(GA=A.width)!==null&&GA!==void 0?GA:Math.ceil(F),height:(DA=A.height)!==null&&DA!==void 0?DA:Math.ceil(b)},u?(c.logger.debug("Document cloned, using foreign object rendering"),M=new bM(c,E),[4,M.render(g)]):[3,3];case 2:return H=WA.sent(),[3,5];case 3:return c.logger.debug("Document cloned, element located at "+I+","+O+" with size "+F+"x"+b+" using computed rendering"),c.logger.debug("Starting DOM parsing"),U=uC(c,g),T===U.styles.backgroundColor&&(U.styles.backgroundColor=Jn.TRANSPARENT),c.logger.debug("Starting renderer for element at "+E.x+","+E.y+" with size "+E.width+"x"+E.height),M=new wM(c,E),[4,M.render(U)];case 4:H=WA.sent(),WA.label=5;case 5:return(!((qA=A.removeContainer)!==null&&qA!==void 0)||qA)&&(vC.destroy(m)||c.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),c.logger.debug("Finished rendering"),[2,H]}})})},_M=function(t,A,e){var n=A.ownerDocument,r=n.documentElement?co(t,getComputedStyle(n.documentElement).backgroundColor):Jn.TRANSPARENT,i=n.body?co(t,getComputedStyle(n.body).backgroundColor):Jn.TRANSPARENT,s=typeof e=="string"?co(t,e):e===null?Jn.TRANSPARENT:4294967295;return A===n.documentElement?Ir(r)?Ir(i)?s:i:r:s};const xM=p.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=A,r=p.ref(),i=p.ref(""),s=p.ref();async function a(){if(r.value){const u=r.value,h=(await SM(u.firstElementChild,{backgroundColor:"rgba(0, 0, 0, 0)",scale:1,width:u.offsetWidth,height:u.offsetHeight})).toDataURL();if(n("update:modelValue",h),e.debug){const g=new Image;g.src=h,document.body.appendChild(g)}return h}return""}const c=vm.debounce(async()=>{i.value=await a()},300,{trailing:!0,leading:!1});return p.onMounted(()=>{const u=r.value;e.renderUpdates&&(s.value=new MutationObserver(async f=>{c()}),s.value.observe(u,{attributes:!0,childList:!0,characterData:!0,subtree:!0})),setTimeout(()=>{c()},500)}),(u,f)=>(p.openBlock(),p.createElementBlock("div",{class:p.normalizeClass(["dom-renderer",{"off-screen":!t.debug}]),ref_key:"renderer",ref:r,style:p.normalizeStyle(t.fixedWidth>0?{width:`${t.fixedWidth}px`}:{})},[p.renderSlot(u.$slots,"default")],6))}}),OM={class:"link-sharing"},LM={key:0,class:"link-sharing__links container"},HM={class:"row"},kM={key:0,class:"col-12 col-md-6"},NM=["href"],MM={class:"caption"},DM={key:1,class:"col-12 col-md-6"},RM=["href"],KM={class:"caption"},PM={key:2,class:"col-12 col-md-6"},VM={class:"caption"},GM={key:3,class:"col-12 col-md-6"},WM=["href"],$M={class:"caption"},JM={key:4,class:"col-12 col-md-6"},XM=["href"],YM={class:"caption"},zM={key:5,class:"col-12 col-md-6"},qM={class:"caption"},ZM={key:6,class:"col-12 col-md-6"},jM=["href"],AD={class:"caption"},eD={key:1,class:"link-sharing__instructions pt-5"},tD={class:"row"},nD={class:"col-12 text-center py-0"},rD={class:"mb-5"},iD=t=>t.replace(/<(?:.|\n)*?>/gm,""),sD=p.defineComponent({__name:"link-sharing",props:{url:{type:String,default:""},subject:{type:String,default:""},hashtags:Array,text:{type:String,default:""},media:{type:String,default:""},services:{type:Object,default:{facebook:!0,instagram:!0,linkedin:!0,whatsapp:!0,mailto:!0,clipboard:!0,x:!0}}},setup(t){const A=t,e=p.ref(!1),n=p.computed(()=>encodeURIComponent(A.url));p.computed(()=>encodeURIComponent(A.media));const r=p.computed(()=>iD(A.text)),i=p.computed(()=>!!(navigator&&navigator.userAgent&&/Mobi|Android/i.test(navigator.userAgent)));async function s(){const a=document.createElement("textarea");document.body.appendChild(a),a.value=A.url,a.select(),a.setSelectionRange(0,99999),navigator.clipboard.writeText(a.value),document.body.removeChild(a)}return(a,c)=>{const u=p.resolveComponent("svg-icon");return p.openBlock(),p.createElementBlock("div",OM,[e.value?(p.openBlock(),p.createElementBlock("div",eD,[p.createElementVNode("div",tD,[p.createElementVNode("div",nD,[p.createElementVNode("div",rD,[p.createElementVNode("p",null,p.toDisplayString(a.$t("sharing.instructions",{service:"Instagram"})),1),p.createElementVNode("p",null,[p.createElementVNode("strong",null,p.toDisplayString(t.hashtags),1)])])])])])):(p.openBlock(),p.createElementBlock("div",LM,[p.createElementVNode("div",HM,[t.services.facebook?(p.openBlock(),p.createElementBlock("div",kM,[p.createElementVNode("a",{class:"link-sharing__link btn btn-primary",href:`https://www.facebook.com/sharer.php?u=${n.value}`,target:"_blank",rel:"noopener"},[p.createVNode(u,{symbol:"facebook"}),p.createElementVNode("span",MM,p.toDisplayString(a.$t("sharing.facebook")),1)],8,NM)])):p.createCommentVNode("",!0),t.services.x?(p.openBlock(),p.createElementBlock("div",DM,[p.createElementVNode("a",{class:"link-sharing__link btn btn-primary",href:`https://x.com/share?text=${t.subject}&url=${n.value}`,target:"_blank",rel:"noopener"},[p.createVNode(u,{symbol:"x-logo"}),p.createElementVNode("span",KM,p.toDisplayString(a.$t("sharing.x")),1)],8,RM)])):p.createCommentVNode("",!0),t.services.instagram?(p.openBlock(),p.createElementBlock("div",PM,[p.createElementVNode("button",{type:"button",class:"link-sharing__link btn btn-primary",onClick:c[0]||(c[0]=p.withModifiers(f=>e.value=!e.value,["prevent"]))},[p.createVNode(u,{symbol:"instagram"}),p.createElementVNode("span",VM,p.toDisplayString(a.$t("sharing.instagram")),1)])])):p.createCommentVNode("",!0),t.services.linkedin?(p.openBlock(),p.createElementBlock("div",GM,[p.createElementVNode("a",{class:"link-sharing__link btn btn-primary",href:`https://www.linkedin.com/shareArticle?mini=true&url=${n.value}&title=${t.subject}`,target:"_blank",rel:"noopener"},[p.createVNode(u,{symbol:"linkedin"}),p.createElementVNode("span",$M,p.toDisplayString(a.$t("sharing.linkedin")),1)],8,WM)])):p.createCommentVNode("",!0),t.services.whatsapp&&i.value?(p.openBlock(),p.createElementBlock("div",JM,[p.createElementVNode("a",{class:"link-sharing__link btn btn-primary",href:`whatsapp://send?text=${n.value}`,target:"_blank",rel:"noopener"},[p.createVNode(u,{symbol:"whatsapp"}),p.createElementVNode("span",YM,p.toDisplayString(a.$t("sharing.whatsapp")),1)],8,XM)])):p.createCommentVNode("",!0),t.services.clipboard?(p.openBlock(),p.createElementBlock("div",zM,[p.createElementVNode("button",{type:"button",class:"link-sharing__link btn btn-primary",onClick:p.withModifiers(s,["prevent","stop"])},[p.createVNode(u,{symbol:"copy"}),p.createElementVNode("span",qM,p.toDisplayString(a.$t("sharing.clipboard")),1)])])):p.createCommentVNode("",!0),t.services.mailto?(p.openBlock(),p.createElementBlock("div",ZM,[p.createElementVNode("a",{class:"link-sharing__link btn btn-primary",href:`mailto:?subject=${t.subject}&body=${r.value}%0D%0A${t.url}`,target:"_blank",rel:"noopener"},[p.createVNode(u,{symbol:"mail"}),p.createElementVNode("span",AD,p.toDisplayString(a.$t("sharing.mailto")),1)],8,jM)])):p.createCommentVNode("",!0)])]))])}}}),p3="",oD={class:"base-form"},aD=p.defineComponent({__name:"base-form",props:{id:{},name:{},variant:{},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)=>(p.openBlock(),p.createElementBlock("div",oD,[p.createElementVNode("form",{ref:"form",onInput:A,onReset:e,onSubmit:p.withModifiers(n,["prevent"])},[p.renderSlot(r.$slots,"default")],544)]))}}),g3="",lD={class:"modal-dialog__content d-flex flex-column"},cD={class:"modal-dialog__header d-flex p-3 border-bottom"},uD={key:0,class:"modal-dialog__title",id:"exampleModalLabel"},fD={class:"modal-dialog__body"},dD={key:0,class:"modal-dialog__footer d-flex p-3 border-top"},hD=p.defineComponent({__name:"modal-dialog",props:{modelValue:{type:Boolean,default:!1},modal:{type:Boolean,default:!0},size:{type:String,default:"md"},dismiss:{type:Boolean,default:!0},title:{type:String,default:""},footer:{type:Boolean,default:!0},classes:{type:String,default:""}},emits:["update:modelValue","confirm","cancel"],setup(t,{expose:A,emit:e}){const n=t,r=e,i=p.ref();function s(){var g,m;document.documentElement.style.setProperty("--scroll-position",`${Math.round(document.documentElement.scrollTop)}px`),n.modal?(g=i.value)==null||g.showModal():(m=i.value)==null||m.show(),r("update:modelValue",!0)}function a(){const g=i.value&&new KeyframeEffect(i.value,[{translate:"0 -100%",opacity:"0"}],{duration:320,easing:"ease",direction:"normal"}),m=new Animation(g,document.timeline);m.play(),m.addEventListener("finish",()=>{var w;(w=i.value)==null||w.close(),c()}),r("update:modelValue",!1)}function c(){const g=getComputedStyle(document.documentElement).getPropertyValue("--scroll-position");document.documentElement.scrollTo({top:parseInt(g,10),behavior:"instant"}),r("update:modelValue",!1)}function u(g){s(),r("confirm",g)}function f(){a(),r("cancel")}function h(g){const m=g.target;m&&m.nodeName==="DIALOG"&&a()}return p.watch(()=>n.modelValue,(g,m)=>{g&&g!==m?s():m&&a()},{immediate:!0}),p.onMounted(()=>{var g;(g=i.value)==null||g.addEventListener("cancel",m=>{m.preventDefault(),a()}),n.dismiss&&document.addEventListener("click",h),n.modelValue&&s()}),p.onBeforeUnmount(()=>{n.dismiss&&document.removeEventListener("click",h)}),A({show:s,close:a,confirm:u,cancel:f}),(g,m)=>(p.openBlock(),p.createElementBlock("dialog",{ref_key:"dialog",ref:i,class:p.normalizeClass(["modal-dialog",{[`modal-dialog--${t.size}`]:t.size}]),onClose:c},[p.createElementVNode("div",lD,[p.createElementVNode("div",cD,[t.title?(p.openBlock(),p.createElementBlock("h5",uD,p.toDisplayString(t.title),1)):p.createCommentVNode("",!0),p.createElementVNode("button",{type:"button",class:"btn-close ms-auto border-radius-none","aria-label":"Close",onClick:a})]),p.createElementVNode("div",fD,[p.renderSlot(g.$slots,"default")]),t.footer?(p.openBlock(),p.createElementBlock("div",dD,[p.renderSlot(g.$slots,"footer"),p.createElementVNode("button",{type:"button",class:"btn ms-auto",onClick:a},p.toDisplayString(g.$t("common.close")),1)])):p.createCommentVNode("",!0)])],34))}}),B3="";TA.Accordion=HE,TA.AccordionItem=TE,TA.AssetUploader=Gx,TA.BaseButton=NE,TA.BaseCamera=T_,TA.BaseCarousel=km,TA.BaseForm=aD,TA.BaseHeadline=CE,TA.BaseImage=wE,TA.BaseInput=KE,TA.BaseParagraph=EE,TA.CheckGroup=nQ,TA.DomRenderer=xM,TA.FileUpload=Ox,TA.InputCheckbox=YE,TA.InputColor=AS,TA.InputDatetime=jE,TA.InputDropdown=l_,TA.InputFile=gQ,TA.InputTextarea=WE,TA.LinkSharing=sD,TA.LoadingSpinner=BE,TA.MediaThumbnails=qx,TA.ModalDialog=hD,TA.ProgressSteps=sO,TA.RadioGroup=aQ,TA.RteEditor=z1,TA.SvgIcon=hE,TA.UploadGroup=Hm,Object.defineProperty(TA,Symbol.toStringTag,{value:"Module"})});
|
|
183
|
+
.`+Wf+WN+IC)},JN=function(t,A){var e=t.ownerDocument;if(e){var n=e.createElement("style");n.textContent=A,t.appendChild(n)}},SC=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}(),XN=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)||(Jf(A)||ZN(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 at(this,void 0,void 0,function(){var e,n,r,i,s=this;return Ze(this,function(a){switch(a.label){case 0:return e=SC.isSameOrigin(A),n=!$f(A)&&this._options.useCORS===!0&&Ve.SUPPORT_CORS_IMAGES&&!e,r=!$f(A)&&!e&&!Jf(A)&&typeof this._options.proxy=="string"&&Ve.SUPPORT_CORS_XHR&&!n,!e&&this._options.allowTaint===!1&&!$f(A)&&!Jf(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 f=new Image;f.onload=function(){return c(f)},f.onerror=u,(jN(i)||n)&&(f.crossOrigin="anonymous"),f.src=i,f.complete===!0&&setTimeout(function(){return c(f)},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=Ve.SUPPORT_RESPONSE_TYPE?"blob":"text",c=new XMLHttpRequest;c.onload=function(){if(c.status===200)if(a==="text")i(c.response);else{var h=new FileReader;h.addEventListener("load",function(){return i(h.result)},!1),h.addEventListener("error",function(g){return s(g)},!1),h.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 f=e._options.imageTimeout;c.timeout=f,c.ontimeout=function(){return s("Timed out ("+f+"ms) proxying "+r)}}c.send()})},t}(),YN=/^data:image\/svg\+xml/i,zN=/^data:image\/.*;base64,/i,qN=/^data:image\/.*/i,ZN=function(t){return Ve.SUPPORT_SVG_DRAWING||!AM(t)},$f=function(t){return qN.test(t)},jN=function(t){return zN.test(t)},Jf=function(t){return t.substr(0,4)==="blob"},AM=function(t){return t.substr(-3).toLowerCase()==="svg"||YN.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}(),ns=function(t,A,e){return new Z(t.x+(A.x-t.x)*e,t.y+(A.y-t.y)*e)},Cl=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=ns(this.start,this.startControl,A),r=ns(this.startControl,this.endControl,A),i=ns(this.endControl,this.end,A),s=ns(n,r,A),a=ns(r,i,A),c=ns(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}(),Gt=function(t){return t.type===1},eM=function(){function t(A){var e=A.styles,n=A.bounds,r=lo(e.borderTopLeftRadius,n.width,n.height),i=r[0],s=r[1],a=lo(e.borderTopRightRadius,n.width,n.height),c=a[0],u=a[1],f=lo(e.borderBottomRightRadius,n.width,n.height),h=f[0],g=f[1],m=lo(e.borderBottomLeftRadius,n.width,n.height),w=m[0],F=m[1],b=[];b.push((i+c)/n.width),b.push((w+h)/n.width),b.push((s+F)/n.height),b.push((u+g)/n.height);var I=Math.max.apply(Math,b);I>1&&(i/=I,s/=I,c/=I,u/=I,h/=I,g/=I,w/=I,F/=I);var O=n.width-c,T=n.height-g,E=n.width-h,H=n.height-F,U=e.borderTopWidth,M=e.borderRightWidth,P=e.borderBottomWidth,N=e.borderLeftWidth,sA=ie(e.paddingTop,A.bounds.width),mA=ie(e.paddingRight,A.bounds.width),nA=ie(e.paddingBottom,A.bounds.width),cA=ie(e.paddingLeft,A.bounds.width);this.topLeftBorderDoubleOuterBox=i>0||s>0?ce(n.left+N/3,n.top+U/3,i-N/3,s-U/3,XA.TOP_LEFT):new Z(n.left+N/3,n.top+U/3),this.topRightBorderDoubleOuterBox=i>0||s>0?ce(n.left+O,n.top+U/3,c-M/3,u-U/3,XA.TOP_RIGHT):new Z(n.left+n.width-M/3,n.top+U/3),this.bottomRightBorderDoubleOuterBox=h>0||g>0?ce(n.left+E,n.top+T,h-M/3,g-P/3,XA.BOTTOM_RIGHT):new Z(n.left+n.width-M/3,n.top+n.height-P/3),this.bottomLeftBorderDoubleOuterBox=w>0||F>0?ce(n.left+N/3,n.top+H,w-N/3,F-P/3,XA.BOTTOM_LEFT):new Z(n.left+N/3,n.top+n.height-P/3),this.topLeftBorderDoubleInnerBox=i>0||s>0?ce(n.left+N*2/3,n.top+U*2/3,i-N*2/3,s-U*2/3,XA.TOP_LEFT):new Z(n.left+N*2/3,n.top+U*2/3),this.topRightBorderDoubleInnerBox=i>0||s>0?ce(n.left+O,n.top+U*2/3,c-M*2/3,u-U*2/3,XA.TOP_RIGHT):new Z(n.left+n.width-M*2/3,n.top+U*2/3),this.bottomRightBorderDoubleInnerBox=h>0||g>0?ce(n.left+E,n.top+T,h-M*2/3,g-P*2/3,XA.BOTTOM_RIGHT):new Z(n.left+n.width-M*2/3,n.top+n.height-P*2/3),this.bottomLeftBorderDoubleInnerBox=w>0||F>0?ce(n.left+N*2/3,n.top+H,w-N*2/3,F-P*2/3,XA.BOTTOM_LEFT):new Z(n.left+N*2/3,n.top+n.height-P*2/3),this.topLeftBorderStroke=i>0||s>0?ce(n.left+N/2,n.top+U/2,i-N/2,s-U/2,XA.TOP_LEFT):new Z(n.left+N/2,n.top+U/2),this.topRightBorderStroke=i>0||s>0?ce(n.left+O,n.top+U/2,c-M/2,u-U/2,XA.TOP_RIGHT):new Z(n.left+n.width-M/2,n.top+U/2),this.bottomRightBorderStroke=h>0||g>0?ce(n.left+E,n.top+T,h-M/2,g-P/2,XA.BOTTOM_RIGHT):new Z(n.left+n.width-M/2,n.top+n.height-P/2),this.bottomLeftBorderStroke=w>0||F>0?ce(n.left+N/2,n.top+H,w-N/2,F-P/2,XA.BOTTOM_LEFT):new Z(n.left+N/2,n.top+n.height-P/2),this.topLeftBorderBox=i>0||s>0?ce(n.left,n.top,i,s,XA.TOP_LEFT):new Z(n.left,n.top),this.topRightBorderBox=c>0||u>0?ce(n.left+O,n.top,c,u,XA.TOP_RIGHT):new Z(n.left+n.width,n.top),this.bottomRightBorderBox=h>0||g>0?ce(n.left+E,n.top+T,h,g,XA.BOTTOM_RIGHT):new Z(n.left+n.width,n.top+n.height),this.bottomLeftBorderBox=w>0||F>0?ce(n.left,n.top+H,w,F,XA.BOTTOM_LEFT):new Z(n.left,n.top+n.height),this.topLeftPaddingBox=i>0||s>0?ce(n.left+N,n.top+U,Math.max(0,i-N),Math.max(0,s-U),XA.TOP_LEFT):new Z(n.left+N,n.top+U),this.topRightPaddingBox=c>0||u>0?ce(n.left+Math.min(O,n.width-M),n.top+U,O>n.width+M?0:Math.max(0,c-M),Math.max(0,u-U),XA.TOP_RIGHT):new Z(n.left+n.width-M,n.top+U),this.bottomRightPaddingBox=h>0||g>0?ce(n.left+Math.min(E,n.width-N),n.top+Math.min(T,n.height-P),Math.max(0,h-M),Math.max(0,g-P),XA.BOTTOM_RIGHT):new Z(n.left+n.width-M,n.top+n.height-P),this.bottomLeftPaddingBox=w>0||F>0?ce(n.left+N,n.top+Math.min(H,n.height-P),Math.max(0,w-N),Math.max(0,F-P),XA.BOTTOM_LEFT):new Z(n.left+N,n.top+n.height-P),this.topLeftContentBox=i>0||s>0?ce(n.left+N+cA,n.top+U+sA,Math.max(0,i-(N+cA)),Math.max(0,s-(U+sA)),XA.TOP_LEFT):new Z(n.left+N+cA,n.top+U+sA),this.topRightContentBox=c>0||u>0?ce(n.left+Math.min(O,n.width+N+cA),n.top+U+sA,O>n.width+N+cA?0:c-N+cA,u-(U+sA),XA.TOP_RIGHT):new Z(n.left+n.width-(M+mA),n.top+U+sA),this.bottomRightContentBox=h>0||g>0?ce(n.left+Math.min(E,n.width-(N+cA)),n.top+Math.min(T,n.height+U+sA),Math.max(0,h-(M+mA)),g-(P+nA),XA.BOTTOM_RIGHT):new Z(n.left+n.width-(M+mA),n.top+n.height-(P+nA)),this.bottomLeftContentBox=w>0||F>0?ce(n.left+N+cA,n.top+H,Math.max(0,w-(N+cA)),F-(P+nA),XA.BOTTOM_LEFT):new Z(n.left+N+cA,n.top+n.height-(P+nA))}return t}(),XA;(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"})(XA||(XA={}));var ce=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 XA.TOP_LEFT:return new Cl(new Z(t,u),new Z(t,u-a),new Z(c-s,A),new Z(c,A));case XA.TOP_RIGHT:return new Cl(new Z(t,A),new Z(t+s,A),new Z(c,u-a),new Z(c,u));case XA.BOTTOM_RIGHT:return new Cl(new Z(c,A),new Z(c,A+a),new Z(t+s,u),new Z(t,u));case XA.BOTTOM_LEFT:default:return new Cl(new Z(c,u),new Z(c-s,u),new Z(t,A+a),new Z(t,A))}},yl=function(t){return[t.topLeftBorderBox,t.topRightBorderBox,t.bottomRightBorderBox,t.bottomLeftBorderBox]},tM=function(t){return[t.topLeftContentBox,t.topRightContentBox,t.bottomRightContentBox,t.bottomLeftContentBox]},El=function(t){return[t.topLeftPaddingBox,t.topRightPaddingBox,t.bottomRightPaddingBox,t.bottomLeftPaddingBox]},nM=function(){function t(A,e,n){this.offsetX=A,this.offsetY=e,this.matrix=n,this.type=0,this.target=6}return t}(),Ql=function(){function t(A,e){this.path=A,this.target=e,this.type=1}return t}(),rM=function(){function t(A){this.opacity=A,this.type=2,this.target=6}return t}(),iM=function(t){return t.type===0},TC=function(t){return t.type===1},sM=function(t){return t.type===2},_C=function(t,A){return t.length===A.length?t.some(function(e,n){return e===A[n]}):!1},oM=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})},xC=function(){function t(A){this.element=A,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return t}(),OC=function(){function t(A,e){if(this.container=A,this.parent=e,this.effects=[],this.curves=new eM(this.container),this.container.styles.opacity<1&&this.effects.push(new rM(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 nM(n,r,i))}if(this.container.styles.overflowX!==0){var s=yl(this.curves),a=El(this.curves);_C(s,a)?this.effects.push(new Ql(s,6)):(this.effects.push(new Ql(s,2)),this.effects.push(new Ql(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!TC(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=yl(n.curves),a=El(n.curves);_C(s,a)||r.unshift(new Ql(a,6))}}else r.unshift.apply(r,i);n=n.parent}return r.filter(function(c){return Ie(c.target,A)})},t}(),Xf=function(t,A,e,n){t.container.elements.forEach(function(r){var i=Ie(r.flags,4),s=Ie(r.flags,2),a=new OC(r,t);Ie(r.styles.display,2048)&&n.push(a);var c=Ie(r.flags,8)?[]:n;if(i||s){var u=i||r.styles.isPositioned()?e:A,f=new xC(a);if(r.styles.isPositioned()||r.styles.opacity<1||r.styles.isTransformed()){var h=r.styles.zIndex.order;if(h<0){var g=0;u.negativeZIndex.some(function(w,F){return h>w.element.container.styles.zIndex.order?(g=F,!1):g>0}),u.negativeZIndex.splice(g,0,f)}else if(h>0){var m=0;u.positiveZIndex.some(function(w,F){return h>=w.element.container.styles.zIndex.order?(m=F+1,!1):m>0}),u.positiveZIndex.splice(m,0,f)}else u.zeroOrAutoZIndexOrTransformedOrOpacity.push(f)}else r.styles.isFloating()?u.nonPositionedFloats.push(f):u.nonPositionedInlineLevel.push(f);Xf(a,f,i?f:e,c)}else r.styles.isInlineLevel()?A.inlineLevel.push(a):A.nonInlineLevel.push(a),Xf(a,A,e,c);Ie(r.flags,8)&&LC(r,c)})},LC=function(t,A){for(var e=t instanceof Nf?t.start:1,n=t instanceof Nf?t.reversed:!1,r=0;r<A.length;r++){var i=A[r];i.container instanceof iC&&typeof i.container.value=="number"&&i.container.value!==0&&(e=i.container.value),i.listValue=go(e,i.container.styles.listStyleType,!0),e+=n?-1:1}},aM=function(t){var A=new OC(t,null),e=new xC(A),n=[];return Xf(A,e,e,n),LC(A.container,n),e},HC=function(t,A){switch(A){case 0:return Wt(t.topLeftBorderBox,t.topLeftPaddingBox,t.topRightBorderBox,t.topRightPaddingBox);case 1:return Wt(t.topRightBorderBox,t.topRightPaddingBox,t.bottomRightBorderBox,t.bottomRightPaddingBox);case 2:return Wt(t.bottomRightBorderBox,t.bottomRightPaddingBox,t.bottomLeftBorderBox,t.bottomLeftPaddingBox);case 3:default:return Wt(t.bottomLeftBorderBox,t.bottomLeftPaddingBox,t.topLeftBorderBox,t.topLeftPaddingBox)}},lM=function(t,A){switch(A){case 0:return Wt(t.topLeftBorderBox,t.topLeftBorderDoubleOuterBox,t.topRightBorderBox,t.topRightBorderDoubleOuterBox);case 1:return Wt(t.topRightBorderBox,t.topRightBorderDoubleOuterBox,t.bottomRightBorderBox,t.bottomRightBorderDoubleOuterBox);case 2:return Wt(t.bottomRightBorderBox,t.bottomRightBorderDoubleOuterBox,t.bottomLeftBorderBox,t.bottomLeftBorderDoubleOuterBox);case 3:default:return Wt(t.bottomLeftBorderBox,t.bottomLeftBorderDoubleOuterBox,t.topLeftBorderBox,t.topLeftBorderDoubleOuterBox)}},cM=function(t,A){switch(A){case 0:return Wt(t.topLeftBorderDoubleInnerBox,t.topLeftPaddingBox,t.topRightBorderDoubleInnerBox,t.topRightPaddingBox);case 1:return Wt(t.topRightBorderDoubleInnerBox,t.topRightPaddingBox,t.bottomRightBorderDoubleInnerBox,t.bottomRightPaddingBox);case 2:return Wt(t.bottomRightBorderDoubleInnerBox,t.bottomRightPaddingBox,t.bottomLeftBorderDoubleInnerBox,t.bottomLeftPaddingBox);case 3:default:return Wt(t.bottomLeftBorderDoubleInnerBox,t.bottomLeftPaddingBox,t.topLeftBorderDoubleInnerBox,t.topLeftPaddingBox)}},uM=function(t,A){switch(A){case 0:return Fl(t.topLeftBorderStroke,t.topRightBorderStroke);case 1:return Fl(t.topRightBorderStroke,t.bottomRightBorderStroke);case 2:return Fl(t.bottomRightBorderStroke,t.bottomLeftBorderStroke);case 3:default:return Fl(t.bottomLeftBorderStroke,t.topLeftBorderStroke)}},Fl=function(t,A){var e=[];return Gt(t)?e.push(t.subdivide(.5,!1)):e.push(t),Gt(A)?e.push(A.subdivide(.5,!0)):e.push(A),e},Wt=function(t,A,e,n){var r=[];return Gt(t)?r.push(t.subdivide(.5,!1)):r.push(t),Gt(e)?r.push(e.subdivide(.5,!0)):r.push(e),Gt(n)?r.push(n.subdivide(.5,!0).reverse()):r.push(n),Gt(A)?r.push(A.subdivide(.5,!1).reverse()):r.push(A),r},kC=function(t){var A=t.bounds,e=t.styles;return A.add(e.borderLeftWidth,e.borderTopWidth,-(e.borderRightWidth+e.borderLeftWidth),-(e.borderTopWidth+e.borderBottomWidth))},bl=function(t){var A=t.styles,e=t.bounds,n=ie(A.paddingLeft,e.width),r=ie(A.paddingRight,e.width),i=ie(A.paddingTop,e.width),s=ie(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))},fM=function(t,A){return t===0?A.bounds:t===2?bl(A):kC(A)},dM=function(t,A){return t===0?A.bounds:t===2?bl(A):kC(A)},Yf=function(t,A,e){var n=fM(is(t.styles.backgroundOrigin,A),t),r=dM(is(t.styles.backgroundClip,A),t),i=hM(is(t.styles.backgroundSize,A),e,n),s=i[0],a=i[1],c=lo(is(t.styles.backgroundPosition,A),n.width-s,n.height-a),u=pM(is(t.styles.backgroundRepeat,A),c,i,n,r),f=Math.round(n.left+c[0]),h=Math.round(n.top+c[1]);return[u,f,h,s,a]},rs=function(t){return Ae(t)&&t.value===ji.AUTO},Ul=function(t){return typeof t=="number"},hM=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(be(s)&&a&&be(a))return[ie(s,e.width),ie(a,e.height)];var c=Ul(i);if(Ae(s)&&(s.value===ji.CONTAIN||s.value===ji.COVER)){if(Ul(i)){var u=e.width/e.height;return u<i!=(s.value===ji.COVER)?[e.width,e.width/i]:[e.height*i,e.height]}return[e.width,e.height]}var f=Ul(n),h=Ul(r),g=f||h;if(rs(s)&&(!a||rs(a))){if(f&&h)return[n,r];if(!c&&!g)return[e.width,e.height];if(g&&c){var m=f?n:r*i,w=h?r:n/i;return[m,w]}var F=f?n:e.width,b=h?r:e.height;return[F,b]}if(c){var I=0,O=0;return be(s)?I=ie(s,e.width):be(a)&&(O=ie(a,e.height)),rs(s)?I=O*i:(!a||rs(a))&&(O=I/i),[I,O]}var T=null,E=null;if(be(s)?T=ie(s,e.width):a&&be(a)&&(E=ie(a,e.height)),T!==null&&(!a||rs(a))&&(E=f&&h?T/n*r:e.height),E!==null&&rs(s)&&(T=f&&h?E/r*n:e.width),T!==null&&E!==null)return[T,E];throw new Error("Unable to calculate background-size for element")},is=function(t,A){var e=t[A];return typeof e>"u"?t[0]:e},pM=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))]}},gM="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",NC="Hidden Text",BM=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=gM,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(NC)),n.appendChild(i),n.appendChild(r);var a=r.offsetTop-i.offsetTop+2;n.removeChild(i),n.appendChild(this._document.createTextNode(NC)),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}(),MC=function(){function t(A,e){this.context=A,this.options=e}return t}(),mM=1e4,wM=function(t){ln(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 BM(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(),sM(e)&&(this.ctx.globalAlpha=e.opacity),iM(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)),TC(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 at(this,void 0,void 0,function(){var n;return Ze(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 at(this,void 0,void 0,function(){return Ze(this,function(n){switch(n.label){case 0:if(Ie(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=kf(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=FM(e.fontFamily).join(", "),i=ao(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 at(this,void 0,void 0,function(){var r,i,s,a,c,u,f,h,g=this;return Ze(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,f=c.middle,h=n.paintOrder,e.textBounds.forEach(function(w){h.forEach(function(F){switch(F){case 0:g.ctx.fillStyle=ke(n.color),g.renderTextWithLetterSpacing(w,n.letterSpacing,u);var b=n.textShadow;b.length&&w.text.trim().length&&(b.slice(0).reverse().forEach(function(I){g.ctx.shadowColor=ke(I.color),g.ctx.shadowOffsetX=I.offsetX.number*g.options.scale,g.ctx.shadowOffsetY=I.offsetY.number*g.options.scale,g.ctx.shadowBlur=I.blur.number,g.renderTextWithLetterSpacing(w,n.letterSpacing,u)}),g.ctx.shadowColor="",g.ctx.shadowOffsetX=0,g.ctx.shadowOffsetY=0,g.ctx.shadowBlur=0),n.textDecorationLine.length&&(g.ctx.fillStyle=ke(n.textDecorationColor||n.color),n.textDecorationLine.forEach(function(I){switch(I){case 1:g.ctx.fillRect(w.bounds.left,Math.round(w.bounds.top+u),w.bounds.width,1);break;case 2:g.ctx.fillRect(w.bounds.left,Math.round(w.bounds.top),w.bounds.width,1);break;case 3:g.ctx.fillRect(w.bounds.left,Math.ceil(w.bounds.top+f),w.bounds.width,1);break}}));break;case 1:n.webkitTextStrokeWidth&&w.text.trim().length&&(g.ctx.strokeStyle=ke(n.webkitTextStrokeColor),g.ctx.lineWidth=n.webkitTextStrokeWidth,g.ctx.lineJoin=window.chrome?"miter":"round",g.ctx.strokeText(w.text,w.bounds.left,w.bounds.top+u)),g.ctx.strokeStyle="",g.ctx.lineWidth=0,g.ctx.lineJoin="miter";break}})}),[2]})})},A.prototype.renderReplacedElement=function(e,n,r){if(r&&e.intrinsicWidth>0&&e.intrinsicHeight>0){var i=bl(e),s=El(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 at(this,void 0,void 0,function(){var n,r,i,s,a,c,O,O,u,f,h,g,E,m,w,H,F,b,I,O,T,E,H;return Ze(this,function(U){switch(U.label){case 0:this.applyEffects(e.getEffects(4)),n=e.container,r=e.curves,i=n.styles,s=0,a=n.textNodes,U.label=1;case 1:return s<a.length?(c=a[s],[4,this.renderTextNode(c,i)]):[3,4];case 2:U.sent(),U.label=3;case 3:return s++,[3,1];case 4:if(!(n instanceof tC))return[3,8];U.label=5;case 5:return U.trys.push([5,7,,8]),[4,this.context.cache.match(n.src)];case 6:return O=U.sent(),this.renderReplacedElement(n,r,O),[3,8];case 7:return U.sent(),this.context.logger.error("Error loading image "+n.src),[3,8];case 8:if(n instanceof nC&&this.renderReplacedElement(n,r,n.canvas),!(n instanceof rC))return[3,12];U.label=9;case 9:return U.trys.push([9,11,,12]),[4,this.context.cache.match(n.svg)];case 10:return O=U.sent(),this.renderReplacedElement(n,r,O),[3,12];case 11:return U.sent(),this.context.logger.error("Error loading svg "+n.svg.substring(0,255)),[3,12];case 12:return n instanceof lC&&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:f=U.sent(),n.width&&n.height&&this.ctx.drawImage(f,0,0,n.width,n.height,n.bounds.left,n.bounds.top,n.bounds.width,n.bounds.height),U.label=14;case 14:if(n instanceof Mf&&(h=Math.min(n.bounds.width,n.bounds.height),n.type===hl?n.checked&&(this.ctx.save(),this.path([new Z(n.bounds.left+h*.39363,n.bounds.top+h*.79),new Z(n.bounds.left+h*.16,n.bounds.top+h*.5549),new Z(n.bounds.left+h*.27347,n.bounds.top+h*.44071),new Z(n.bounds.left+h*.39694,n.bounds.top+h*.5649),new Z(n.bounds.left+h*.72983,n.bounds.top+h*.23),new Z(n.bounds.left+h*.84,n.bounds.top+h*.34085),new Z(n.bounds.left+h*.39363,n.bounds.top+h*.79)]),this.ctx.fillStyle=ke(sC),this.ctx.fill(),this.ctx.restore()):n.type===pl&&n.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(n.bounds.left+h/2,n.bounds.top+h/2,h/4,0,Math.PI*2,!0),this.ctx.fillStyle=ke(sC),this.ctx.fill(),this.ctx.restore())),CM(n)&&n.value.length){switch(g=this.createFontStyle(i),E=g[0],m=g[1],w=this.fontMetrics.getMetrics(E,m).baseline,this.ctx.font=E,this.ctx.fillStyle=ke(i.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=EM(n.styles.textAlign),H=bl(n),F=0,n.styles.textAlign){case 1:F+=H.width/2;break;case 2:F+=H.width;break}b=H.add(F,0,0,-H.height/2+1),this.ctx.save(),this.path([new Z(H.left,H.top),new Z(H.left+H.width,H.top),new Z(H.left+H.width,H.top+H.height),new Z(H.left,H.top+H.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new ho(n.value,b),i.letterSpacing,w),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!Ie(n.styles.display,2048))return[3,20];if(n.styles.listStyleImage===null)return[3,19];if(I=n.styles.listStyleImage,I.type!==0)return[3,18];O=void 0,T=I.url,U.label=15;case 15:return U.trys.push([15,17,,18]),[4,this.context.cache.match(T)];case 16:return O=U.sent(),this.ctx.drawImage(O,n.bounds.left-(O.width+10),n.bounds.top),[3,18];case 17:return U.sent(),this.context.logger.error("Error loading list-style-image "+T),[3,18];case 18:return[3,20];case 19:e.listValue&&n.styles.listStyleType!==-1&&(E=this.createFontStyle(i)[0],this.ctx.font=E,this.ctx.fillStyle=ke(i.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",H=new Wn(n.bounds.left,n.bounds.top+ie(n.styles.paddingTop,n.bounds.width),n.bounds.width,Nw(i.lineHeight,i.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new ho(e.listValue,H),i.letterSpacing,Nw(i.lineHeight,i.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),U.label=20;case 20:return[2]}})})},A.prototype.renderStackContent=function(e){return at(this,void 0,void 0,function(){var n,r,I,i,s,I,a,c,I,u,f,I,h,g,I,m,w,I,F,b,I;return Ze(this,function(O){switch(O.label){case 0:if(Ie(e.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(e.element)];case 1:O.sent(),n=0,r=e.negativeZIndex,O.label=2;case 2:return n<r.length?(I=r[n],[4,this.renderStack(I)]):[3,5];case 3:O.sent(),O.label=4;case 4:return n++,[3,2];case 5:return[4,this.renderNodeContent(e.element)];case 6:O.sent(),i=0,s=e.nonInlineLevel,O.label=7;case 7:return i<s.length?(I=s[i],[4,this.renderNode(I)]):[3,10];case 8:O.sent(),O.label=9;case 9:return i++,[3,7];case 10:a=0,c=e.nonPositionedFloats,O.label=11;case 11:return a<c.length?(I=c[a],[4,this.renderStack(I)]):[3,14];case 12:O.sent(),O.label=13;case 13:return a++,[3,11];case 14:u=0,f=e.nonPositionedInlineLevel,O.label=15;case 15:return u<f.length?(I=f[u],[4,this.renderStack(I)]):[3,18];case 16:O.sent(),O.label=17;case 17:return u++,[3,15];case 18:h=0,g=e.inlineLevel,O.label=19;case 19:return h<g.length?(I=g[h],[4,this.renderNode(I)]):[3,22];case 20:O.sent(),O.label=21;case 21:return h++,[3,19];case 22:m=0,w=e.zeroOrAutoZIndexOrTransformedOrOpacity,O.label=23;case 23:return m<w.length?(I=w[m],[4,this.renderStack(I)]):[3,26];case 24:O.sent(),O.label=25;case 25:return m++,[3,23];case 26:F=0,b=e.positiveZIndex,O.label=27;case 27:return F<b.length?(I=b[F],[4,this.renderStack(I)]):[3,30];case 28:O.sent(),O.label=29;case 29:return F++,[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=Gt(r)?r.start:r;i===0?n.ctx.moveTo(s.x,s.y):n.ctx.lineTo(s.x,s.y),Gt(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 at(this,void 0,void 0,function(){var n,r,i,s,a,c;return Ze(this,function(u){switch(u.label){case 0:n=e.styles.backgroundImage.length-1,r=function(f){var h,g,m,sA,RA,HA,cA,LA,P,w,sA,RA,HA,cA,LA,F,b,I,O,T,E,H,U,M,P,N,sA,mA,nA,cA,LA,se,RA,HA,rA,BA,YA,VA,GA,DA,qA,WA;return Ze(this,function(ue){switch(ue.label){case 0:if(f.type!==0)return[3,5];h=void 0,g=f.url,ue.label=1;case 1:return ue.trys.push([1,3,,4]),[4,i.context.cache.match(g)];case 2:return h=ue.sent(),[3,4];case 3:return ue.sent(),i.context.logger.error("Error loading background-image "+g),[3,4];case 4:return h&&(m=Yf(e,n,[h.width,h.height,h.width/h.height]),sA=m[0],RA=m[1],HA=m[2],cA=m[3],LA=m[4],P=i.ctx.createPattern(i.resizeImage(h,cA,LA),"repeat"),i.renderRepeat(sA,P,RA,HA)),[3,6];case 5:iH(f)?(w=Yf(e,n,[null,null,null]),sA=w[0],RA=w[1],HA=w[2],cA=w[3],LA=w[4],F=AH(f.angle,cA,LA),b=F[0],I=F[1],O=F[2],T=F[3],E=F[4],H=document.createElement("canvas"),H.width=cA,H.height=LA,U=H.getContext("2d"),M=U.createLinearGradient(I,T,O,E),Uw(f.stops,b).forEach(function(Ne){return M.addColorStop(Ne.stop,ke(Ne.color))}),U.fillStyle=M,U.fillRect(0,0,cA,LA),cA>0&&LA>0&&(P=i.ctx.createPattern(H,"repeat"),i.renderRepeat(sA,P,RA,HA))):sH(f)&&(N=Yf(e,n,[null,null,null]),sA=N[0],mA=N[1],nA=N[2],cA=N[3],LA=N[4],se=f.position.length===0?[yf]:f.position,RA=ie(se[0],cA),HA=ie(se[se.length-1],LA),rA=eH(f,RA,HA,cA,LA),BA=rA[0],YA=rA[1],BA>0&&YA>0&&(VA=i.ctx.createRadialGradient(mA+RA,nA+HA,0,mA+RA,nA+HA,BA),Uw(f.stops,BA*2).forEach(function(Ne){return VA.addColorStop(Ne.stop,ke(Ne.color))}),i.path(sA),i.ctx.fillStyle=VA,BA!==YA?(GA=e.bounds.left+.5*e.bounds.width,DA=e.bounds.top+.5*e.bounds.height,qA=YA/BA,WA=1/qA,i.ctx.save(),i.ctx.translate(GA,DA),i.ctx.transform(1,0,0,qA,0,0),i.ctx.translate(-GA,-DA),i.ctx.fillRect(mA,WA*(nA-DA)+DA,cA,LA*WA),i.ctx.restore()):i.ctx.fill())),ue.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 at(this,void 0,void 0,function(){return Ze(this,function(i){return this.path(HC(r,n)),this.ctx.fillStyle=ke(e),this.ctx.fill(),[2]})})},A.prototype.renderDoubleBorder=function(e,n,r,i){return at(this,void 0,void 0,function(){var s,a;return Ze(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=lM(i,r),this.path(s),this.ctx.fillStyle=ke(e),this.ctx.fill(),a=cM(i,r),this.path(a),this.ctx.fill(),[2]}})})},A.prototype.renderNodeBackgroundAndBorders=function(e){return at(this,void 0,void 0,function(){var n,r,i,s,a,c,u,f,h=this;return Ze(this,function(g){switch(g.label){case 0:return this.applyEffects(e.getEffects(2)),n=e.container.styles,r=!Ir(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=yM(is(n.backgroundClip,0),e.curves),r||n.boxShadow.length?(this.ctx.save(),this.path(s),this.ctx.clip(),Ir(n.backgroundColor)||(this.ctx.fillStyle=ke(n.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(e.container)]):[3,2];case 1:g.sent(),this.ctx.restore(),n.boxShadow.slice(0).reverse().forEach(function(m){h.ctx.save();var w=yl(e.curves),F=m.inset?0:mM,b=oM(w,-F+(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?(h.path(w),h.ctx.clip(),h.mask(b)):(h.mask(w),h.ctx.clip(),h.path(b)),h.ctx.shadowOffsetX=m.offsetX.number+F,h.ctx.shadowOffsetY=m.offsetY.number,h.ctx.shadowColor=ke(m.color),h.ctx.shadowBlur=m.blur.number,h.ctx.fillStyle=m.inset?ke(m.color):"rgba(0,0,0,1)",h.ctx.fill(),h.ctx.restore()}),g.label=2;case 2:a=0,c=0,u=i,g.label=3;case 3:return c<u.length?(f=u[c],f.style!==0&&!Ir(f.color)&&f.width>0?f.style!==2?[3,5]:[4,this.renderDashedDottedBorder(f.color,f.width,a,e.curves,2)]:[3,11]):[3,13];case 4:return g.sent(),[3,11];case 5:return f.style!==3?[3,7]:[4,this.renderDashedDottedBorder(f.color,f.width,a,e.curves,3)];case 6:return g.sent(),[3,11];case 7:return f.style!==4?[3,9]:[4,this.renderDoubleBorder(f.color,f.width,a,e.curves)];case 8:return g.sent(),[3,11];case 9:return[4,this.renderSolidBorder(f.color,a,e.curves)];case 10:g.sent(),g.label=11;case 11:a++,g.label=12;case 12:return c++,[3,3];case 13:return[2]}})})},A.prototype.renderDashedDottedBorder=function(e,n,r,i,s){return at(this,void 0,void 0,function(){var a,c,u,f,h,g,m,w,F,b,I,O,T,E,H,U,H,U;return Ze(this,function(M){return this.ctx.save(),a=uM(i,r),c=HC(i,r),s===2&&(this.path(c),this.ctx.clip()),Gt(c[0])?(u=c[0].start.x,f=c[0].start.y):(u=c[0].x,f=c[0].y),Gt(c[1])?(h=c[1].end.x,g=c[1].end.y):(h=c[1].x,g=c[1].y),r===0||r===2?m=Math.abs(u-h):m=Math.abs(f-g),this.ctx.beginPath(),s===3?this.formatPath(a):this.formatPath(c.slice(0,2)),w=n<3?n*3:n*2,F=n<3?n*2:n,s===3&&(w=n,F=n),b=!0,m<=w*2?b=!1:m<=w*2+F?(I=m/(2*w+F),w*=I,F*=I):(O=Math.floor((m+F)/(w+F)),T=(m-O*w)/(O-1),E=(m-(O+1)*w)/O,F=E<=0||Math.abs(F-T)<Math.abs(F-E)?T:E),b&&(s===3?this.ctx.setLineDash([0,w+F]):this.ctx.setLineDash([w,F])),s===3?(this.ctx.lineCap="round",this.ctx.lineWidth=n):this.ctx.lineWidth=n*2+1.1,this.ctx.strokeStyle=ke(e),this.ctx.stroke(),this.ctx.setLineDash([]),s===2&&(Gt(c[0])&&(H=c[3],U=c[0],this.ctx.beginPath(),this.formatPath([new Z(H.end.x,H.end.y),new Z(U.start.x,U.start.y)]),this.ctx.stroke()),Gt(c[1])&&(H=c[1],U=c[2],this.ctx.beginPath(),this.formatPath([new Z(H.end.x,H.end.y),new Z(U.start.x,U.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},A.prototype.render=function(e){return at(this,void 0,void 0,function(){var n;return Ze(this,function(r){switch(r.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=ke(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),n=aM(e),[4,this.renderStack(n)];case 1:return r.sent(),this.applyEffects([]),[2,this.canvas]}})})},A}(MC),CM=function(t){return t instanceof aC||t instanceof oC?!0:t instanceof Mf&&t.type!==pl&&t.type!==hl},yM=function(t,A){switch(t){case 0:return yl(A);case 2:return tM(A);case 1:default:return El(A)}},EM=function(t){switch(t){case 1:return"center";case 2:return"right";case 0:default:return"left"}},QM=["-apple-system","system-ui"],FM=function(t){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?t.filter(function(A){return QM.indexOf(A)===-1}):t},bM=function(t){ln(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 at(this,void 0,void 0,function(){var n,r;return Ze(this,function(i){switch(i.label){case 0:return n=Hf(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,e),[4,UM(n)];case 1:return r=i.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=ke(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}(MC),UM=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))})},vM=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,La([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,La([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,La([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,La([this.id,this.getTime()+"ms"],A)):this.info.apply(this,A))},t.instances={},t}(),IM=function(){function t(A,e){var n;this.windowBounds=e,this.instanceName="#"+t.instanceCount++,this.logger=new vM({id:this.instanceName,enabled:A.logging}),this.cache=(n=A.cache)!==null&&n!==void 0?n:new XN(this,A)}return t.instanceCount=1,t}(),SM=function(t,A){return A===void 0&&(A={}),TM(t,A)};typeof window<"u"&&SC.setContext(window);var TM=function(t,A){return at(void 0,void 0,void 0,function(){var e,n,r,i,s,a,c,u,f,h,g,m,w,F,b,I,O,T,E,H,M,U,M,P,N,sA,mA,nA,cA,LA,se,RA,HA,rA,BA,YA,VA,GA,DA,qA;return Ze(this,function(WA){switch(WA.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:(P=A.allowTaint)!==null&&P!==void 0?P:!1,imageTimeout:(N=A.imageTimeout)!==null&&N!==void 0?N:15e3,proxy:A.proxy,useCORS:(sA=A.useCORS)!==null&&sA!==void 0?sA:!1},i=ju({logging:(mA=A.logging)!==null&&mA!==void 0?mA:!0,cache:A.cache},r),s={windowWidth:(nA=A.windowWidth)!==null&&nA!==void 0?nA:n.innerWidth,windowHeight:(cA=A.windowHeight)!==null&&cA!==void 0?cA:n.innerHeight,scrollX:(LA=A.scrollX)!==null&&LA!==void 0?LA:n.pageXOffset,scrollY:(se=A.scrollY)!==null&&se!==void 0?se:n.pageYOffset},a=new Wn(s.scrollX,s.scrollY,s.windowWidth,s.windowHeight),c=new IM(i,a),u=(RA=A.foreignObjectRendering)!==null&&RA!==void 0?RA:!1,f={allowTaint:(HA=A.allowTaint)!==null&&HA!==void 0?HA:!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),h=new vC(c,t,f),g=h.clonedReferenceElement,g?[4,h.toIFrame(e,a)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return m=WA.sent(),w=Rf(g)||_N(g)?oO(g.ownerDocument):Ha(c,g),F=w.width,b=w.height,I=w.left,O=w.top,T=_M(c,g,A.backgroundColor),E={canvas:A.canvas,backgroundColor:T,scale:(BA=(rA=A.scale)!==null&&rA!==void 0?rA:n.devicePixelRatio)!==null&&BA!==void 0?BA:1,x:((YA=A.x)!==null&&YA!==void 0?YA:0)+I,y:((VA=A.y)!==null&&VA!==void 0?VA:0)+O,width:(GA=A.width)!==null&&GA!==void 0?GA:Math.ceil(F),height:(DA=A.height)!==null&&DA!==void 0?DA:Math.ceil(b)},u?(c.logger.debug("Document cloned, using foreign object rendering"),M=new bM(c,E),[4,M.render(g)]):[3,3];case 2:return H=WA.sent(),[3,5];case 3:return c.logger.debug("Document cloned, element located at "+I+","+O+" with size "+F+"x"+b+" using computed rendering"),c.logger.debug("Starting DOM parsing"),U=uC(c,g),T===U.styles.backgroundColor&&(U.styles.backgroundColor=Jn.TRANSPARENT),c.logger.debug("Starting renderer for element at "+E.x+","+E.y+" with size "+E.width+"x"+E.height),M=new wM(c,E),[4,M.render(U)];case 4:H=WA.sent(),WA.label=5;case 5:return(!((qA=A.removeContainer)!==null&&qA!==void 0)||qA)&&(vC.destroy(m)||c.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),c.logger.debug("Finished rendering"),[2,H]}})})},_M=function(t,A,e){var n=A.ownerDocument,r=n.documentElement?co(t,getComputedStyle(n.documentElement).backgroundColor):Jn.TRANSPARENT,i=n.body?co(t,getComputedStyle(n.body).backgroundColor):Jn.TRANSPARENT,s=typeof e=="string"?co(t,e):e===null?Jn.TRANSPARENT:4294967295;return A===n.documentElement?Ir(r)?Ir(i)?s:i:r:s};const xM=p.defineComponent({__name:"dom-renderer",props:{modelValue:{type:String,default:""},fixedWidth:{type:Number,default:0},renderUpdates:{type:Boolean,default:!1},exportToSvg:{type:Boolean,default:!1},options:{type:Object,default:()=>({})},debug:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{emit:A}){const e=t,n=A,r=p.ref(),i=p.ref(""),s=p.ref();async function a(){if(r.value){const u=r.value,h=(await SM(u.firstElementChild,{backgroundColor:"rgba(0, 0, 0, 0)",scale:1,width:u.offsetWidth,height:u.offsetHeight,...e.options})).toDataURL();if(n("update:modelValue",h),e.debug){const g=new Image;g.src=h,document.body.appendChild(g)}return h}return""}const c=vm.debounce(async()=>{i.value=await a()},300,{trailing:!0,leading:!1});return p.onMounted(()=>{const u=r.value;e.renderUpdates&&(s.value=new MutationObserver(async f=>{c()}),s.value.observe(u,{attributes:!0,childList:!0,characterData:!0,subtree:!0})),setTimeout(()=>{c()},500)}),(u,f)=>(p.openBlock(),p.createElementBlock("div",{class:p.normalizeClass(["dom-renderer",{"off-screen":!t.debug}]),ref_key:"renderer",ref:r,style:p.normalizeStyle(t.fixedWidth>0?{width:`${t.fixedWidth}px`}:{})},[p.renderSlot(u.$slots,"default")],6))}}),OM={class:"link-sharing"},LM={key:0,class:"link-sharing__links container"},HM={class:"row"},kM={key:0,class:"col-12 col-md-6"},NM=["href"],MM={class:"caption"},DM={key:1,class:"col-12 col-md-6"},RM=["href"],KM={class:"caption"},PM={key:2,class:"col-12 col-md-6"},VM={class:"caption"},GM={key:3,class:"col-12 col-md-6"},WM=["href"],$M={class:"caption"},JM={key:4,class:"col-12 col-md-6"},XM=["href"],YM={class:"caption"},zM={key:5,class:"col-12 col-md-6"},qM={class:"caption"},ZM={key:6,class:"col-12 col-md-6"},jM=["href"],AD={class:"caption"},eD={key:1,class:"link-sharing__instructions pt-5"},tD={class:"row"},nD={class:"col-12 text-center py-0"},rD={class:"mb-5"},iD=t=>t.replace(/<(?:.|\n)*?>/gm,""),sD=p.defineComponent({__name:"link-sharing",props:{url:{type:String,default:""},subject:{type:String,default:""},hashtags:Array,text:{type:String,default:""},media:{type:String,default:""},services:{type:Object,default:{facebook:!0,instagram:!0,linkedin:!0,whatsapp:!0,mailto:!0,clipboard:!0,x:!0}}},setup(t){const A=t,e=p.ref(!1),n=p.computed(()=>encodeURIComponent(A.url));p.computed(()=>encodeURIComponent(A.media));const r=p.computed(()=>iD(A.text)),i=p.computed(()=>!!(navigator&&navigator.userAgent&&/Mobi|Android/i.test(navigator.userAgent)));async function s(){const a=document.createElement("textarea");document.body.appendChild(a),a.value=A.url,a.select(),a.setSelectionRange(0,99999),navigator.clipboard.writeText(a.value),document.body.removeChild(a)}return(a,c)=>{const u=p.resolveComponent("svg-icon");return p.openBlock(),p.createElementBlock("div",OM,[e.value?(p.openBlock(),p.createElementBlock("div",eD,[p.createElementVNode("div",tD,[p.createElementVNode("div",nD,[p.createElementVNode("div",rD,[p.createElementVNode("p",null,p.toDisplayString(a.$t("sharing.instructions",{service:"Instagram"})),1),p.createElementVNode("p",null,[p.createElementVNode("strong",null,p.toDisplayString(t.hashtags),1)])])])])])):(p.openBlock(),p.createElementBlock("div",LM,[p.createElementVNode("div",HM,[t.services.facebook?(p.openBlock(),p.createElementBlock("div",kM,[p.createElementVNode("a",{class:"link-sharing__link btn btn-primary",href:`https://www.facebook.com/sharer.php?u=${n.value}`,target:"_blank",rel:"noopener"},[p.createVNode(u,{symbol:"facebook"}),p.createElementVNode("span",MM,p.toDisplayString(a.$t("sharing.facebook")),1)],8,NM)])):p.createCommentVNode("",!0),t.services.x?(p.openBlock(),p.createElementBlock("div",DM,[p.createElementVNode("a",{class:"link-sharing__link btn btn-primary",href:`https://x.com/share?text=${t.subject}&url=${n.value}`,target:"_blank",rel:"noopener"},[p.createVNode(u,{symbol:"x-logo"}),p.createElementVNode("span",KM,p.toDisplayString(a.$t("sharing.x")),1)],8,RM)])):p.createCommentVNode("",!0),t.services.instagram?(p.openBlock(),p.createElementBlock("div",PM,[p.createElementVNode("button",{type:"button",class:"link-sharing__link btn btn-primary",onClick:c[0]||(c[0]=p.withModifiers(f=>e.value=!e.value,["prevent"]))},[p.createVNode(u,{symbol:"instagram"}),p.createElementVNode("span",VM,p.toDisplayString(a.$t("sharing.instagram")),1)])])):p.createCommentVNode("",!0),t.services.linkedin?(p.openBlock(),p.createElementBlock("div",GM,[p.createElementVNode("a",{class:"link-sharing__link btn btn-primary",href:`https://www.linkedin.com/shareArticle?mini=true&url=${n.value}&title=${t.subject}`,target:"_blank",rel:"noopener"},[p.createVNode(u,{symbol:"linkedin"}),p.createElementVNode("span",$M,p.toDisplayString(a.$t("sharing.linkedin")),1)],8,WM)])):p.createCommentVNode("",!0),t.services.whatsapp&&i.value?(p.openBlock(),p.createElementBlock("div",JM,[p.createElementVNode("a",{class:"link-sharing__link btn btn-primary",href:`whatsapp://send?text=${n.value}`,target:"_blank",rel:"noopener"},[p.createVNode(u,{symbol:"whatsapp"}),p.createElementVNode("span",YM,p.toDisplayString(a.$t("sharing.whatsapp")),1)],8,XM)])):p.createCommentVNode("",!0),t.services.clipboard?(p.openBlock(),p.createElementBlock("div",zM,[p.createElementVNode("button",{type:"button",class:"link-sharing__link btn btn-primary",onClick:p.withModifiers(s,["prevent","stop"])},[p.createVNode(u,{symbol:"copy"}),p.createElementVNode("span",qM,p.toDisplayString(a.$t("sharing.clipboard")),1)])])):p.createCommentVNode("",!0),t.services.mailto?(p.openBlock(),p.createElementBlock("div",ZM,[p.createElementVNode("a",{class:"link-sharing__link btn btn-primary",href:`mailto:?subject=${t.subject}&body=${r.value}%0D%0A${t.url}`,target:"_blank",rel:"noopener"},[p.createVNode(u,{symbol:"mail"}),p.createElementVNode("span",AD,p.toDisplayString(a.$t("sharing.mailto")),1)],8,jM)])):p.createCommentVNode("",!0)])]))])}}}),p3="",oD={class:"base-form"},aD=p.defineComponent({__name:"base-form",props:{id:{},name:{},variant:{},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)=>(p.openBlock(),p.createElementBlock("div",oD,[p.createElementVNode("form",{ref:"form",onInput:A,onReset:e,onSubmit:p.withModifiers(n,["prevent"])},[p.renderSlot(r.$slots,"default")],544)]))}}),g3="",lD={class:"modal-dialog__content d-flex flex-column"},cD={class:"modal-dialog__header d-flex p-3 border-bottom"},uD={key:0,class:"modal-dialog__title",id:"exampleModalLabel"},fD={class:"modal-dialog__body"},dD={key:0,class:"modal-dialog__footer d-flex p-3 border-top"},hD=p.defineComponent({__name:"modal-dialog",props:{modelValue:{type:Boolean,default:!1},modal:{type:Boolean,default:!0},size:{type:String,default:"md"},dismiss:{type:Boolean,default:!0},title:{type:String,default:""},footer:{type:Boolean,default:!0},classes:{type:String,default:""}},emits:["update:modelValue","confirm","cancel"],setup(t,{expose:A,emit:e}){const n=t,r=e,i=p.ref();function s(){var g,m;document.documentElement.style.setProperty("--scroll-position",`${Math.round(document.documentElement.scrollTop)}px`),n.modal?(g=i.value)==null||g.showModal():(m=i.value)==null||m.show(),r("update:modelValue",!0)}function a(){const g=i.value&&new KeyframeEffect(i.value,[{translate:"0 -100%",opacity:"0"}],{duration:320,easing:"ease",direction:"normal"}),m=new Animation(g,document.timeline);m.play(),m.addEventListener("finish",()=>{var w;(w=i.value)==null||w.close(),c()}),r("update:modelValue",!1)}function c(){const g=getComputedStyle(document.documentElement).getPropertyValue("--scroll-position");document.documentElement.scrollTo({top:parseInt(g,10),behavior:"instant"}),r("update:modelValue",!1)}function u(g){s(),r("confirm",g)}function f(){a(),r("cancel")}function h(g){const m=g.target;m&&m.nodeName==="DIALOG"&&a()}return p.watch(()=>n.modelValue,(g,m)=>{g&&g!==m?s():m&&a()},{immediate:!0}),p.onMounted(()=>{var g;(g=i.value)==null||g.addEventListener("cancel",m=>{m.preventDefault(),a()}),n.dismiss&&document.addEventListener("click",h),n.modelValue&&s()}),p.onBeforeUnmount(()=>{n.dismiss&&document.removeEventListener("click",h)}),A({show:s,close:a,confirm:u,cancel:f}),(g,m)=>(p.openBlock(),p.createElementBlock("dialog",{ref_key:"dialog",ref:i,class:p.normalizeClass(["modal-dialog",{[`modal-dialog--${t.size}`]:t.size}]),onClose:c},[p.createElementVNode("div",lD,[p.createElementVNode("div",cD,[t.title?(p.openBlock(),p.createElementBlock("h5",uD,p.toDisplayString(t.title),1)):p.createCommentVNode("",!0),p.createElementVNode("button",{type:"button",class:"btn-close ms-auto border-radius-none","aria-label":"Close",onClick:a})]),p.createElementVNode("div",fD,[p.renderSlot(g.$slots,"default")]),t.footer?(p.openBlock(),p.createElementBlock("div",dD,[p.renderSlot(g.$slots,"footer"),p.createElementVNode("button",{type:"button",class:"btn ms-auto",onClick:a},p.toDisplayString(g.$t("common.close")),1)])):p.createCommentVNode("",!0)])],34))}}),B3="";TA.Accordion=HE,TA.AccordionItem=TE,TA.AssetUploader=Gx,TA.BaseButton=NE,TA.BaseCamera=T_,TA.BaseCarousel=km,TA.BaseForm=aD,TA.BaseHeadline=CE,TA.BaseImage=wE,TA.BaseInput=KE,TA.BaseParagraph=EE,TA.CheckGroup=nQ,TA.DomRenderer=xM,TA.FileUpload=Ox,TA.InputCheckbox=YE,TA.InputColor=AS,TA.InputDatetime=jE,TA.InputDropdown=l_,TA.InputFile=gQ,TA.InputTextarea=WE,TA.LinkSharing=sD,TA.LoadingSpinner=BE,TA.MediaThumbnails=qx,TA.ModalDialog=hD,TA.ProgressSteps=sO,TA.RadioGroup=aQ,TA.RteEditor=z1,TA.SvgIcon=hE,TA.UploadGroup=Hm,Object.defineProperty(TA,Symbol.toStringTag,{value:"Module"})});
|
|
@@ -15,6 +15,10 @@ declare const _sfc_main: import('./vue/dist/vue.esm-bundler.js').DefineComponent
|
|
|
15
15
|
type: BooleanConstructor;
|
|
16
16
|
default: boolean;
|
|
17
17
|
};
|
|
18
|
+
options: {
|
|
19
|
+
type: ObjectConstructor;
|
|
20
|
+
default: () => {};
|
|
21
|
+
};
|
|
18
22
|
debug: {
|
|
19
23
|
type: BooleanConstructor;
|
|
20
24
|
default: boolean;
|
|
@@ -36,6 +40,10 @@ declare const _sfc_main: import('./vue/dist/vue.esm-bundler.js').DefineComponent
|
|
|
36
40
|
type: BooleanConstructor;
|
|
37
41
|
default: boolean;
|
|
38
42
|
};
|
|
43
|
+
options: {
|
|
44
|
+
type: ObjectConstructor;
|
|
45
|
+
default: () => {};
|
|
46
|
+
};
|
|
39
47
|
debug: {
|
|
40
48
|
type: BooleanConstructor;
|
|
41
49
|
default: boolean;
|
|
@@ -44,6 +52,7 @@ declare const _sfc_main: import('./vue/dist/vue.esm-bundler.js').DefineComponent
|
|
|
44
52
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
45
53
|
}, {
|
|
46
54
|
modelValue: string;
|
|
55
|
+
options: Record<string, any>;
|
|
47
56
|
fixedWidth: number;
|
|
48
57
|
renderUpdates: boolean;
|
|
49
58
|
exportToSvg: boolean;
|