survey-pdf 1.9.18 → 1.9.21

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.
package/survey.pdf.min.js CHANGED
@@ -1,16 +1,16 @@
1
1
  /*!
2
- * surveyjs - SurveyJS PDF library v1.9.18
2
+ * surveyjs - SurveyJS PDF library v1.9.21
3
3
  * Copyright (c) 2015-2022 Devsoft Baltic OÜ - http://surveyjs.io/
4
4
  * License: MIT (http://www.opensource.org/licenses/mit-license.php)
5
5
  */
6
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("survey-core"),require("jspdf")):"function"==typeof define&&define.amd?define("SurveyPDF",["survey-core","jspdf"],e):"object"==typeof exports?exports.SurveyPDF=e(require("survey-core"),require("jspdf")):t.SurveyPDF=e(t.Survey,t.jspdf)}(this,function(t,e){return function(t){function e(i){if(n[i])return n[i].exports;var r=n[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,e),r.l=!0,r.exports}var n={};return e.m=t,e.c=n,e.i=function(t){return t},e.d=function(t,n,i){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:i})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=13)}([function(t,e,n){"use strict";function i(t,e){function n(){this.constructor=t}if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");s(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function r(t,e,n,i){function r(t){return t instanceof n?t:new n(function(e){e(t)})}return new(n||(n=Promise))(function(n,o){function a(t){try{c(i.next(t))}catch(t){o(t)}}function s(t){try{c(i.throw(t))}catch(t){o(t)}}function c(t){t.done?n(t.value):r(t.value).then(a,s)}c((i=i.apply(t,e||[])).next())})}function o(t,e){function n(t){return function(e){return i([t,e])}}function i(n){if(r)throw new TypeError("Generator is already executing.");for(;c;)try{if(r=1,o&&(a=2&n[0]?o.return:n[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,n[1])).done)return a;switch(o=0,a&&(n=[2&n[0],a.value]),n[0]){case 0:case 1:a=n;break;case 4:return c.label++,{value:n[1],done:!1};case 5:c.label++,o=n[1],n=[0];continue;case 7:n=c.ops.pop(),c.trys.pop();continue;default:if(a=c.trys,!(a=a.length>0&&a[a.length-1])&&(6===n[0]||2===n[0])){c=0;continue}if(3===n[0]&&(!a||n[1]>a[0]&&n[1]<a[3])){c.label=n[1];break}if(6===n[0]&&c.label<a[1]){c.label=a[1],a=n;break}if(a&&c.label<a[2]){c.label=a[2],c.ops.push(n);break}a[2]&&c.ops.pop(),c.trys.pop();continue}n=e.call(t,c)}catch(t){n=[6,t],o=0}finally{r=a=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}var r,o,a,s,c={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:n(0),throw:n(1),return:n(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s}function a(t,e,n){if(n||2===arguments.length)for(var i,r=0,o=e.length;r<o;r++)!i&&r in e||(i||(i=Array.prototype.slice.call(e,0,r)),i[r]=e[r]);return t.concat(i||Array.prototype.slice.call(e))}e.a=i,e.b=r,e.c=o,e.d=a;var s=function(t,e){return(s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)}},function(t,e,n){"use strict";var i=n(0),r=n(7),o=(n.n(r),n(13)),a=n(8),s=n(2),c=n(4),l=n(12),u=n(33),h=n(57),f=n(25),d=n(30),p=n(28),g=n(29),m=n(27),v=n(15),y=n(5),b=n(34);n.d(e,"a",function(){return x});var x=function(){function t(){}return t.parseWidth=function(t,e,n){if(void 0===n&&(n=1),0===t.indexOf("calc"))return e/n;var i,r=parseFloat(t),o=t.replace(/[^A-Za-z]/g,"");switch(o){case"pt":i=1;break;case"mm":i=72/25.4;break;case"cm":i=72/2.54;break;case"in":i=72;break;case"px":i=.75;break;case"pc":case"em":i=12;break;case"ex":i=6;break;default:case"%":i=e/100}return Math.min(r*i,e)},t.pxToPt=function(e){return"string"==typeof e?t.parseWidth(e,Number.MAX_VALUE):72*e/96},t.mergeRects=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n={xLeft:t[0].xLeft,xRight:t[0].xRight,yTop:t[0].yTop,yBot:t[0].yBot};return t.forEach(function(t){n.xLeft=Math.min(n.xLeft,t.xLeft),n.xRight=Math.max(n.xRight,t.xRight),n.yTop=Math.min(n.yTop,t.yTop),n.yBot=Math.max(n.yBot,t.yBot)}),n},t.createPoint=function(t,e,n){return void 0===e&&(e=!0),void 0===n&&(n=!1),{xLeft:e?t.xLeft:t.xRight,yTop:n?t.yTop:t.yBot}},t.createRect=function(t,e,n){return{xLeft:t.xLeft,xRight:t.xLeft+e,yTop:t.yTop,yBot:t.yTop+n}},t.createHeaderRect=function(t){return{xLeft:0,xRight:t.paperWidth,yTop:0,yBot:t.margins.top}},t.createFooterRect=function(t){return{xLeft:0,xRight:t.paperWidth,yTop:t.paperHeight-t.margins.bot,yBot:t.paperHeight}},t.chooseHtmlFont=function(t,e){return"standard"===e?this.isCustomFont(t,t.fontName)?this.STANDARD_FONT:t.fontName:t.useCustomFontInHtml?t.fontName:this.STANDARD_FONT},t.generateCssTextRule=function(t,e,n){return'"font-size: '.concat(t,"pt; font-weight: ").concat(e,"; font-family: ").concat(n,"; color: ").concat(this.TEXT_COLOR,';"')},t.createHtmlContainerBlock=function(t,e,n){var i=this.chooseHtmlFont(e,n);return'<div class="__surveypdf_html" style='.concat(this.generateCssTextRule(e.fontSize,e.fontStyle,i),">")+"<style>.__surveypdf_html p { margin: 0; line-height: ".concat(e.fontSize,"pt } body { margin: 0; }</style>").concat(t,"</div>")},t.splitHtmlRect=function(t,e){var r=[],o=e.height,a=t.doc.getFontSize();e.yBot=e.yTop+a;var s=Math.floor(o/a)-1;r.push(e);for(var c=this.createPoint(e),l=0;l<s;l++)r.push(new m.a(this.createRect(c,e.width,a))),c.yTop+=a;var u=o-(s+1)*a;return u>0&&r.push(new m.a(this.createRect(c,e.width,u))),new(y.a.bind.apply(y.a,n.i(i.d)([void 0],r,!1)))},t.createPlainTextFlat=function(t,e,n,i,r){var o=this,a=n.doc.splitTextToSize(i,n.paperWidth-n.margins.right-t.xLeft),s=this.clone(t),c=new y.a;return a.forEach(function(t){var i=n.measureText(t);c.addBrick(new r(e,n,o.createRect(s,i.width,i.height),t)),s.yTop+=i.height}),c},t.createTextFlat=function(t,e,r,o,a){return n.i(i.b)(this,void 0,void 0,function(){var s,c;return n.i(i.c)(this,function(n){switch(n.label){case 0:return"string"!=typeof o&&this.hasHtml(o)?[3,1]:[2,this.createPlainTextFlat(t,e,r,"string"==typeof o?o:this.getLocString(o),a)];case 1:return s=this.splitHtmlRect,c=[r],[4,this.createHTMLFlat(t,e,r,this.createHtmlContainerBlock(this.getLocString(o),r,"standard"))];case 2:return[2,s.apply(this,c.concat([n.sent()]))]}})})},t.hasHtml=function(t){var e=/<\/?[a-z][\s\S]*>/i;return t.hasHtml&&(e.test(t.renderedText)||e.test(t.renderedHtml))},t.getHtmlMargins=function(t,e){var n=t.paperWidth-e.xLeft-t.margins.right;return{top:t.margins.top,bottom:t.margins.bot,width:n>t.unitWidth?n:t.unitWidth}},t.createHTMLRect=function(e,n,i,r){var o=n.paperHeight-n.margins.bot-n.margins.top,a=(n.helperDoc.getNumberOfPages()-1)*(n.fontSize*Math.floor(o/n.fontSize))+r-i.top+t.HTML_TAIL_TEXT_SCALE*n.fontSize,s=n.helperDoc.getNumberOfPages();n.helperDoc.addPage();for(var c=0;c<s;c++)n.helperDoc.deletePage(1);return t.createRect(e,i.width,a)},t.createHTMLFlat=function(e,r,o,a){return n.i(i.b)(this,void 0,void 0,function(){var s;return n.i(i.c)(this,function(n){switch(n.label){case 0:return s=this.getHtmlMargins(o,e),[4,new Promise(function(n){o.helperDoc.fromHTML(a,e.xLeft,s.top,{pagesplit:!0,width:s.width},function(i){var c=t.createHTMLRect(e,o,s,i.y);n(new p.a(r,o,c,a))},s)})];case 1:return[2,n.sent()]}})})},t.generateFontFace=function(t,e,n){return"@font-face { font-family: ".concat(t,"; ")+"src: url(data:application/font-woff;charset=utf-8;base64,".concat(e,") format('woff'); ")+"font-weight: ".concat(n,"; }")},t.generateFontFaceWithItalicStyle=function(t,e,n){return"@font-face { font-family: ".concat(t,"; ")+"src: url(data:application/font-woff;charset=utf-8;base64,".concat(e,") format('woff'); ")+"font-weight: ".concat(n,"; font-style: italic}")},t.htmlToXml=function(t){var e=document.implementation.createHTMLDocument("");return e.write(t.replace(/\#/g,"%23")),e.documentElement.setAttribute("xmlns",e.documentElement.namespaceURI),e.body.style.margin="unset",(new XMLSerializer).serializeToString(e.body).replace(/%23/g,"#")},t.createSvgContent=function(t,e,n){var i=this,r=document.createElement("style");r.innerHTML=".__surveypdf_html p { margin: unset; line-height: 22px; } body { margin: unset; }",document.body.appendChild(r);var o=document.createElement("div");o.className="__surveypdf_html",o.style.display="block",o.style.position="fixed",o.style.top="-10000px",o.style.left="-10000px",o.style.width=e/72*96+"px",o.style.boxSizing="initial",o.style.color="initial",o.style.fontFamily="initial",o.style.font="initial",o.style.lineHeight="initial",o.insertAdjacentHTML("beforeend",t),document.body.appendChild(o);var s=o.offsetWidth,c=o.offsetHeight;o.remove(),r.remove();var l="";return n.useCustomFontInHtml?l="<defs><style>".concat(this.generateFontFace(n.fontName,n.base64Normal,"normal"))+" ".concat(this.generateFontFace(n.fontName,n.base64Bold,"bold"),"</style></defs>"):Object.keys(a.b.customFonts).forEach(function(t){var e=a.b.customFonts[t];Object.keys(e).forEach(function(n){l+="".concat("normal"===n||"bold"===n?i.generateFontFace(t,e[n],n):i.generateFontFaceWithItalicStyle(t,e[n],"italic"===n?"normal":"bold"))}),l="<defs><style>"+l+"</style></defs>"}),{svg:'<svg xmlns="http://www.w3.org/2000/svg">'+l+"<style>.__surveypdf_html p { margin: unset; line-height: 22px; }</style>"+'<foreignObject width="'.concat(s,'px" height="').concat(c,'px">')+this.htmlToXml(t)+"</foreignObject></svg>",divWidth:s,divHeight:c}},t.htmlToImage=function(e,r,o){return n.i(i.b)(this,void 0,void 0,function(){var a,s,c,l,u,h;return n.i(i.c)(this,function(n){switch(n.label){case 0:return a=t.createSvgContent(e,r,o),s=a.svg,c=a.divWidth,l=a.divHeight,u="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(s))),h=new Image,h.src=u,[4,new Promise(function(e){h.onload=function(){var n=document.createElement("canvas");n.width=c,n.height=l;var i=n.getContext("2d");i.fillStyle=t.BACKGROUND_COLOR,i.fillRect(0,0,c,l),i.drawImage(h,0,0);var r=n.toDataURL("image/jpeg",t.HTML_TO_IMAGE_QUALITY);n.remove(),e({url:r,aspect:c/l})},h.onerror=function(){e({url:"data:,",aspect:r/this.EPSILON})}})];case 1:return[2,n.sent()]}})})},t.createBoldTextFlat=function(t,e,r,o){return n.i(i.b)(this,void 0,void 0,function(){var a;return n.i(i.c)(this,function(n){switch(n.label){case 0:return r.fontStyle="bold",[4,this.createTextFlat(t,e,r,o,l.a)];case 1:return a=n.sent(),r.fontStyle="normal",[2,a]}})})},t.createTitleFlat=function(t,e,r){return n.i(i.b)(this,void 0,void 0,function(){var o,a,s,c,l,u,h,f,d,p,g;return n.i(i.c)(this,function(n){switch(n.label){case 0:return o=new y.a,(a=this.clone(t),s=r.fontSize,r.fontSize*=this.TITLE_FONT_SCALE,e.no)?(c=e.no+" ",l=void 0,this.hasHtml(e.locTitle)?(r.fontStyle="bold",r.pushMargins(),r.margins.right=r.paperWidth-r.margins.left-r.measureText(c,"bold").width,[4,this.createHTMLFlat(a,e,r,this.createHtmlContainerBlock(c,r,"standard"))]):[3,2]):[3,5];case 1:return l=n.sent(),r.popMargins(),r.fontStyle="normal",[3,4];case 2:return[4,this.createBoldTextFlat(a,e,r,c)];case 3:l=n.sent(),n.label=4;case 4:o.addBrick(l),a.xLeft=l.xRight,n.label=5;case 5:return r.pushMargins(),r.margins.left=a.xLeft,[4,this.createBoldTextFlat(a,e,r,e.locTitle)];case 6:return u=n.sent(),(o.addBrick(u),r.popMargins(),e.isRequired)?(h=e.requiredText,this.hasHtml(e.locTitle)?(a=this.createPoint(u.unfold()[0],!1,!1),r.fontStyle="bold",r.pushMargins(),r.margins.right=r.paperWidth-r.margins.left-r.measureText(h,"bold").width,d=(f=o).addBrick,[4,this.createHTMLFlat(a,e,r,this.createHtmlContainerBlock(h,r,"standard"))]):[3,8]):[3,10];case 7:return d.apply(f,[n.sent()]),r.popMargins(),r.fontStyle="normal",[3,10];case 8:return a=this.createPoint(u.unfold().pop(),!1,!0),g=(p=o).addBrick,[4,this.createBoldTextFlat(a,e,r,h)];case 9:g.apply(p,[n.sent()]),n.label=10;case 10:return r.fontSize=s,[2,o]}})})},t.createTitleSurveyPanelFlat=function(t,e,r,o){return n.i(i.b)(this,void 0,void 0,function(){var a,s;return n.i(i.c)(this,function(n){switch(n.label){case 0:return a=e.fontSize,e.fontSize=a*o,e.fontStyle="bold",[4,this.createTextFlat(t,null,e,r,u.a)];case 1:return s=n.sent(),e.fontStyle="normal",e.fontSize=a,[2,s]}})})},t.createTitleSurveyFlat=function(t,e,r){return n.i(i.b)(this,void 0,void 0,function(){return n.i(i.c)(this,function(n){switch(n.label){case 0:return[4,this.createTitleSurveyPanelFlat(t,e,r,this.TITLE_SURVEY_FONT_SIZE_SCALE)];case 1:return[2,n.sent()]}})})},t.createTitlePanelFlat=function(t,e,r,o){return void 0===o&&(o=!1),n.i(i.b)(this,void 0,void 0,function(){return n.i(i.c)(this,function(n){switch(n.label){case 0:return[4,this.createTitleSurveyPanelFlat(t,e,r,o?this.TITLE_PAGE_FONT_SIZE_SCALE:this.TITLE_PANEL_FONT_SIZE_SCALE)];case 1:return[2,n.sent()]}})})},t.createDescFlat=function(t,e,r,o){return n.i(i.b)(this,void 0,void 0,function(){var a,s;return n.i(i.c)(this,function(n){switch(n.label){case 0:return a=r.fontSize,r.fontSize=a*this.DESCRIPTION_FONT_SIZE_SCALE,[4,this.createTextFlat(t,e,r,o,h.a)];case 1:return s=n.sent(),r.fontSize=a,[2,s]}})})},t.getReadonlyRenderAs=function(t,e){return"auto"===t.readonlyRenderAs?e.readonlyRenderAs:t.readonlyRenderAs},t.createCommentFlat=function(t,e,r,o,a,s){return void 0===s&&(s=0),n.i(i.b)(this,void 0,void 0,function(){var c,l,u;return n.i(i.c)(this,function(n){switch(n.label){case 0:return c=this.createTextFieldRect(t,r,o),e.isReadOnly&&"acroform"!==this.getReadonlyRenderAs(e,r)?[4,this.createReadOnlyTextFieldTextFlat(t,r,e,this.getQuestionOrCommentValue(e,a),!1)]:[3,2];case 1:l=n.sent(),u=r.unitHeight*this.VALUE_READONLY_PADDING_SCALE,l.yBot+u>c.yBot&&(c.yBot=l.yBot+u),n.label=2;case 2:return[2,new f.a(e,r,c,a,s)]}})})},t.getQuestionOrCommentValue=function(t,e){return void 0===e&&(e=!0),e?void 0!==t.value&&null!==t.value?t.value:"":void 0!==t.comment&&null!==t.comment?t.comment:""},t.getQuestionOrCommentDisplayValue=function(e,n){return void 0===n&&(n=!0),n?e.displayValue:t.getQuestionOrCommentValue(e,n)},t.createImageFlat=function(e,r,o,a,s,c){return n.i(i.b)(this,void 0,void 0,function(){var l,u,h,f,d,m,v,y;return n.i(i.c)(this,function(n){switch(n.label){case 0:return t.inBrowser?o.applyImageFit?(s>o.paperWidth-o.margins.left-o.margins.right&&(l=o.paperWidth-o.margins.left-o.margins.right,c*=l/s,s=l),u=96/72,h=r&&r.imageFit?r.imageFit:"contain",f="<div style='overflow: hidden; width: ".concat(s*u,"px; height: ").concat(c*u,"px;'>\n <img src='").concat(a,"' style='object-fit: ").concat(h,"; width: 100%; height: 100%;'/>\n </div>"),[4,t.htmlToImage(f,s,o)]):[3,2]:[3,3];case 1:d=n.sent(),m=d.url,v=d.aspect,a=m,n.label=2;case 2:return y="<img src='".concat(a,"' width='").concat(s,"' height='").concat(c,"'/>"),[2,new p.a(r,o,this.createRect(e,s,c),y,!0)];case 3:return[2,new g.a(r,o,a,e,s,c)]}})})},t.canPreviewImage=function(t,e,n){return t.canPreviewImage(e)},t.getImageSize=function(e){return n.i(i.b)(this,void 0,void 0,function(){return n.i(i.c)(this,function(n){switch(n.label){case 0:return t.inBrowser?[3,2]:[4,new Promise(function(t){return t({width:void 0,height:void 0})})];case 1:return[2,n.sent()];case 2:return[4,new Promise(function(t){var n=new Image;n.src=e,n.onload=function(){return t({width:n.width,height:n.height})},n.onerror=function(){return t(null)}})];case 3:return[2,n.sent()]}})})},t.createRowlineFlat=function(t,e,n,i){var r=void 0===n?e.paperWidth-e.margins.right:t.xLeft+n;return r=r>t.xLeft?r:t.xLeft+this.EPSILON,new v.a(e,{xLeft:t.xLeft,xRight:r,yTop:t.yTop+this.EPSILON,yBot:t.yTop+this.EPSILON},void 0===i?null:i)},t.createLinkFlat=function(t,e,r,o,a){return n.i(i.b)(this,void 0,void 0,function(){var s,l,u=this;return n.i(i.c)(this,function(n){switch(n.label){case 0:return[4,this.createTextFlat(t,e,r,o,c.a)];case 1:return s=n.sent(),l=new y.a,s.unfold().forEach(function(t){l.addBrick(new d.a(t,a));var e=u.createPoint(l);l.addBrick(u.createRowlineFlat(e,r,l.width,d.a.COLOR))}),[2,l]}})})},t.createAcroformRect=function(t){return[t.xLeft,t.yTop,t.xRight-t.xLeft,t.yBot-t.yTop]},t.createTextFieldRect=function(t,e,n){void 0===n&&(n=1);var i=e.paperWidth-t.xLeft-e.margins.right;i=Math.max(i,e.unitWidth);var r=e.unitHeight*n;return this.createRect(t,i,r)},t.createReadOnlyTextFieldTextFlat=function(t,e,r,o,a){return n.i(i.b)(this,void 0,void 0,function(){var s,l;return n.i(i.c)(this,function(n){switch(n.label){case 0:return s=e.unitWidth*this.VALUE_READONLY_PADDING_SCALE,a||(t.yTop+=s),t.xLeft+=s,e.pushMargins(t.xLeft,e.margins.right+s),[4,this.createTextFlat(t,r,e,o.toString(),c.a)];case 1:return l=n.sent(),e.popMargins(),[2,l]}})})},t.renderFlatBorders=function(t,e){var r,o;if(this.FORM_BORDER_VISIBLE){var a=Math.min(e.width,e.height),s=t.unitHeight*this.VISIBLE_BORDER_SCALE*this.BORDER_SCALE,c=this.formScale(t,e)+s/a,l=t.unitHeight*this.UNVISIBLE_BORDER_SCALE*this.BORDER_SCALE,u=1-l/a,h=this.RADIUS_SCALE*l,f=t.doc.getDrawColor();t.doc.setDrawColor(e.formBorderColor),t.doc.setLineWidth(s),(r=t.doc).rect.apply(r,this.createAcroformRect(this.scaleRect(e,c))),t.doc.setDrawColor(this.BACKGROUND_COLOR),t.doc.setLineWidth(l),(o=t.doc).roundedRect.apply(o,n.i(i.d)(n.i(i.d)([],this.createAcroformRect(this.scaleRect(e,u)),!1),[h,h],!1)),t.doc.setDrawColor(f)}},t.renderReadOnlyTextField=function(t,e,r,o,a){return void 0===a&&(a=!0),n.i(i.b)(this,void 0,void 0,function(){var s,c,l;return n.i(i.c)(this,function(n){switch(n.label){case 0:return s=this.createPoint(r,!0,!0),c=t.fontSize,t.fontSize=r.fontSize,[4,this.createReadOnlyTextFieldTextFlat(s,t,e,o,a)];case 1:return l=n.sent(),t.fontSize=c,a?[4,l.unfold()[0].render()]:[3,3];case 2:return n.sent(),[3,5];case 3:return[4,l.render()];case 4:n.sent(),n.label=5;case 5:return this.renderFlatBorders(t,r),[2]}})})},t.getLocString=function(t){return this.hasHtml(t)?t.renderedHtml:t.renderedText||t.renderedHtml},t.getDropdownQuestionValue=function(t){var e=t;return e.isOtherSelected?e.otherText:t.displayValue?t.displayValue:e.showOptionsCaption?e.optionsCaption:""},t.getContentQuestion=function(t){return t.contentQuestion?t.contentQuestion:t},t.getRatingMinWidth=function(t){return t.measureText(this.RATING_MIN_WIDTH).width},t.getRatingItemText=function(t,e,n){var i=new r.LocalizableString(n.owner,n.useMarkdown);return i.text=this.getLocString(n),0===e&&t.minRateDescription?i.text=t.locMinRateDescription.text+" "+this.getLocString(n):e===t.visibleRateValues.length-1&&t.maxRateDescription&&(i.text=this.getLocString(n)+" "+t.locMaxRateDescription.text),i},t.getPageAvailableWidth=function(t){return t.paperWidth-t.margins.left-t.margins.right},t.getImagePickerAvailableWidth=function(t){var e=this.getPageAvailableWidth(t)-(this.IMAGEPICKER_COUNT-1)*t.unitHeight;return e>0?e:t.unitHeight},t.getColumnWidth=function(t,e){return(this.getPageAvailableWidth(t)-(e-1)*t.unitWidth*this.GAP_BETWEEN_COLUMNS)/e},t.setColumnMargins=function(t,e,n){var i=this.getColumnWidth(t,e);t.margins.left=t.margins.left+n*(i+t.unitWidth*this.GAP_BETWEEN_COLUMNS),t.margins.right=t.margins.right+(e-n-1)*(i+t.unitWidth*this.GAP_BETWEEN_COLUMNS)},t.moveRect=function(t,e,n){return void 0===e&&(e=t.xLeft),void 0===n&&(n=t.yTop),{xLeft:e,yTop:n,xRight:e+t.xRight-t.xLeft,yBot:n+t.yBot-t.yTop}},t.scaleRect=function(t,e){var n=t.xRight-t.xLeft,i=t.yBot-t.yTop,r=(n<i?n:i)*(1-e)/2;return{xLeft:t.xLeft+r,yTop:t.yTop+r,xRight:t.xRight-r,yBot:t.yBot-r}},t.formScale=function(t,e){var n=Math.min(e.width,e.height);return(n-2*t.unitWidth*this.BORDER_SCALE)/n},t.generateQuestionFlats=function(t,e,r,a){return n.i(i.b)(this,void 0,void 0,function(){var c,l,u,h,f;return n.i(i.c)(this,function(d){switch(d.label){case 0:return c=this.getContentQuestion(r),l=r.customWidget?r.customWidget.pdfQuestionType:c.getType(),u=s.a.getInstance().create(t,r,e,l),[4,u.generateFlats(a)];case 1:return h=d.sent(),f=new b.c(a,h,r,e,s.a.getInstance(),o),r.customWidget&&r.customWidget.isFit(r)&&r.customWidget.pdfRender&&t.onRenderQuestion.unshift(r.customWidget.pdfRender),[4,t.onRenderQuestion.fire(t,f)];case 2:return d.sent(),[2,n.i(i.d)([],f.bricks,!0)]}})})},t.isFontExist=function(t,e){return t.doc.internal.getFont(e).fontName===e},t.isCustomFont=function(t,e){return t.doc.internal.getFont(e).encoding===this.CUSTOM_FONT_ENCODING},t.fixFont=function(t){this.isCustomFont(t,t.fontName)&&(t.doc.text("load font",0,0),t.doc.deletePage(1),t.addPage())},t.clone=function(t){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e},t.EPSILON=2.220446049250313e-15,t.TITLE_SURVEY_FONT_SIZE_SCALE=1.7,t.TITLE_PAGE_FONT_SIZE_SCALE=1.3,t.TITLE_PANEL_FONT_SIZE_SCALE=1.3,t.DESCRIPTION_FONT_SIZE_SCALE=2/3,t.OTHER_ROWS_COUNT=2,t.RATING_MIN_WIDTH=3,t.RATING_MIN_HEIGHT=2,t.RATING_COLUMN_WIDTH=5,t.MATRIX_COLUMN_WIDTH=5,t.IMAGEPICKER_COUNT=4,t.IMAGEPICKER_RATIO=4/3,t.MULTIPLETEXT_TEXT_PERS=Math.E/10,t.HTML_TAIL_TEXT_SCALE=.24,t.SELECT_ITEM_FLAT_SCALE=.95,t.GAP_BETWEEN_ROWS=.25,t.GAP_BETWEEN_COLUMNS=1.5,t.GAP_BETWEEN_ITEM_TEXT=.25,t.FORM_BORDER_VISIBLE=!0,t.BORDER_SCALE=.1,t.VISIBLE_BORDER_SCALE=.8,t.UNVISIBLE_BORDER_SCALE=.2,t.RADIUS_SCALE=3,t.TITLE_FONT_SCALE=1.1,t.VALUE_READONLY_PADDING_SCALE=.3,t.HTML_TO_IMAGE_QUALITY=1,t.FORM_BORDER_COLOR="#9f9f9f",t.TEXT_COLOR="#404040",t.BACKGROUND_COLOR="#FFFFFF",t.TITLE_LOCATION_MATRIX="matrix",t.STANDARD_FONT="helvetica",t.CUSTOM_FONT_ENCODING="Identity-H",t.inBrowser="function"==typeof Image,t}()},function(t,e,n){"use strict";var i=n(3);n.d(e,"a",function(){return r});var r=function(){function t(){this.questions={}}return t.getInstance=function(){return t.instance},t.prototype.register=function(t,e){this.questions[t]=e},t.prototype.create=function(t,e,n,r){var o=void 0===r?e.getType():r;return new(this.questions[o]||i.a)(t,e,n)},t.instance=new t,t}()},function(t,e,n){"use strict";var i=n(0),r=n(7),o=(n.n(r),n(9)),a=n(4),s=n(5),c=n(1);n.d(e,"a",function(){return l});var l=function(){function t(t,e,n){this.survey=t,this.controller=n,this.question=e}return t.prototype.generateFlatTitle=function(t){return n.i(i.b)(this,void 0,void 0,function(){return n.i(i.c)(this,function(e){switch(e.label){case 0:return[4,c.a.createTitleFlat(t,this.question,this.controller)];case 1:return[2,e.sent()]}})})},t.prototype.generateFlatDescription=function(e){return n.i(i.b)(this,void 0,void 0,function(){var r,o;return n.i(i.c)(this,function(n){switch(n.label){case 0:return r=c.a.clone(e),r.xLeft+=this.controller.unitWidth*t.CONTENT_INDENT_SCALE,r.yTop+=t.DESC_GAP_SCALE*this.controller.unitHeight,o=this.question.locDescription,[4,c.a.createDescFlat(r,this.question,this.controller,o)];case 1:return[2,n.sent()]}})})},t.prototype.generateFlatsComment=function(t){return n.i(i.b)(this,void 0,void 0,function(){var e,r,o,l,u;return n.i(i.c)(this,function(n){switch(n.label){case 0:return e=this.question.locCommentText,[4,c.a.createTextFlat(t,this.question,this.controller,e,a.a)];case 1:return r=n.sent(),o=c.a.createPoint(r),o.yTop+=this.controller.unitHeight*c.a.GAP_BETWEEN_ROWS,l=s.a.bind,u=[void 0,r],[4,c.a.createCommentFlat(o,this.question,this.controller,c.a.OTHER_ROWS_COUNT,!1)];case 2:return[2,new(l.apply(s.a,u.concat([n.sent()])))]}})})},t.prototype.generateFlatsComposite=function(t){return n.i(i.b)(this,void 0,void 0,function(){var e;return n.i(i.c)(this,function(n){switch(n.label){case 0:return e=this.question.contentPanel,e?[4,o.a.generateFlatsPanel(this.survey,this.controller,e,t)]:[3,2];case 1:return[2,n.sent()];case 2:return this.question=c.a.getContentQuestion(this.question),[4,this.generateFlatsContent(t)];case 3:return[2,n.sent()]}})})},t.prototype.generateFlatsContent=function(t){return n.i(i.b)(this,void 0,void 0,function(){return n.i(i.c)(this,function(t){return[2,null]})})},t.prototype.generateFlats=function(e){return n.i(i.b)(this,void 0,void 0,function(){var r,o,a,l,u,h,f,d,p,g,m,p,m,v,y,b,f,d,g,f,d,p,g,m,p,x,T,F,_,w;return n.i(i.c)(this,function(n){switch(n.label){case 0:switch(this.controller.pushMargins(),this.controller.margins.left+=this.controller.measureText(this.question.indent).width,r={xLeft:e.xLeft+this.controller.measureText(this.question.indent).width,yTop:e.yTop},o=[],a=r,l=this.question.getTitleLocation(),l=this.question.hasTitle?l:"hidden",u=!!c.a.getLocString(this.question.locDescription),h=l){case"top":case"default":return[3,1];case"bottom":return[3,7];case"left":return[3,14];case"hidden":case c.a.TITLE_LOCATION_MATRIX:return[3,19]}return[3,19];case 1:return[4,this.generateFlatTitle(r)];case 2:return f=n.sent(),d=new s.a(f),p=c.a.createPoint(d),u?[4,this.generateFlatDescription(c.a.createPoint(f))]:[3,4];case 3:return g=n.sent(),d.addBrick(g),p=c.a.createPoint(g),[3,5];case 4:p.xLeft+=this.controller.unitWidth*t.CONTENT_INDENT_SCALE,n.label=5;case 5:return d.addBrick(c.a.createRowlineFlat(c.a.createPoint(d),this.controller)),p.yTop+=this.controller.unitHeight*t.CONTENT_GAP_VERT_SCALE+c.a.EPSILON,a=p,this.controller.pushMargins(),this.controller.margins.left+=this.controller.unitWidth*t.CONTENT_INDENT_SCALE,[4,this.generateFlatsComposite(p)];case 6:return m=n.sent(),this.controller.popMargins(),null!==m&&0!==m.length&&(a.yTop=c.a.mergeRects.apply(c.a,m).yBot+this.controller.unitHeight*c.a.GAP_BETWEEN_ROWS,d.addBrick(m.shift())),o.push(d),o.push.apply(o,m),[3,21];case 7:return p=c.a.clone(r),this.controller.pushMargins(),p.xLeft+=this.controller.unitWidth*t.CONTENT_INDENT_SCALE,this.controller.margins.left+=this.controller.unitWidth*t.CONTENT_INDENT_SCALE,a=p,[4,this.generateFlatsComposite(p)];case 8:return m=n.sent(),(this.controller.popMargins(),o.push.apply(o,m),null!==m&&0!=m.length&&(a=c.a.createPoint(c.a.mergeRects.apply(c.a,m)),a.yTop+=this.controller.unitHeight*c.a.GAP_BETWEEN_ROWS),this.question.hasComment)?(y=(v=o).push,[4,this.generateFlatsComment(a)]):[3,10];case 9:y.apply(v,[n.sent()]),n.label=10;case 10:return b=r,0!==o.length&&(b.yTop=o[o.length-1].yBot),b.yTop+=this.controller.unitHeight*t.CONTENT_GAP_VERT_SCALE,[4,this.generateFlatTitle(b)];case 11:return f=n.sent(),d=new s.a(f),u?[4,this.generateFlatDescription(c.a.createPoint(f))]:[3,13];case 12:g=n.sent(),d.addBrick(g),n.label=13;case 13:return o.push(d),[3,21];case 14:return this.controller.pushMargins(this.controller.margins.left,this.controller.paperWidth-this.controller.margins.left-c.a.getPageAvailableWidth(this.controller)*c.a.MULTIPLETEXT_TEXT_PERS),[4,this.generateFlatTitle(r)];case 15:return f=n.sent(),d=new s.a(f),p=c.a.createPoint(f,!1,!0),u?[4,this.generateFlatDescription(c.a.createPoint(f))]:[3,17];case 16:g=n.sent(),d.addBrick(g),p.xLeft=Math.max(p.xLeft,g.xRight),n.label=17;case 17:return this.controller.popMargins(),p.xLeft+=this.controller.unitWidth*t.CONTENT_GAP_HOR_SCALE,this.controller.margins.left=p.xLeft,a.xLeft=p.xLeft,[4,this.generateFlatsComposite(p)];case 18:return m=n.sent(),null!==m&&0!=m.length&&(a=c.a.createPoint(c.a.mergeRects.apply(c.a,m)),a.yTop+=this.controller.unitHeight*c.a.GAP_BETWEEN_ROWS,d.addBrick(m.shift())),o.push(d),o.push.apply(o,m),[3,21];case 19:return p=c.a.clone(r),this.controller.pushMargins(),l!==c.a.TITLE_LOCATION_MATRIX&&(p.xLeft+=this.controller.unitWidth*t.CONTENT_INDENT_SCALE,this.controller.margins.left+=this.controller.unitWidth*t.CONTENT_INDENT_SCALE),a=p,T=(x=o.push).apply,F=[o],[4,this.generateFlatsComposite(p)];case 20:return T.apply(x,F.concat([n.sent()])),this.controller.popMargins(),null!==o&&0!==o.length&&(a=c.a.createPoint(c.a.mergeRects.apply(c.a,o)),a.yTop+=this.controller.unitHeight*c.a.GAP_BETWEEN_ROWS),[3,21];case 21:return this.question.hasComment&&"bottom"!==this.question.titleLocation?(w=(_=o).push,[4,this.generateFlatsComment(a)]):[3,23];case 22:w.apply(_,[n.sent()]),n.label=23;case 23:return this.controller.popMargins(),[2,o]}})})},t.CONTENT_GAP_VERT_SCALE=.5,t.CONTENT_GAP_HOR_SCALE=1,t.CONTENT_INDENT_SCALE=1,t.DESC_GAP_SCALE=.0625,t}();r.Serializer.addProperty("question",{name:"readonlyRenderAs",default:"auto",choices:["auto","text","acroform"]})},function(t,e,n){"use strict";var i=n(0),r=n(6);n.d(e,"a",function(){return o});var o=function(t){function e(e,n,i,r){var o=t.call(this,e,n,i)||this;return o.text=r,o.align={align:"left",baseline:"middle"},o}return n.i(i.a)(e,t),e.prototype.escapeText=function(){for(;this.text.indexOf("\t")>-1;)this.text=this.text.replace("\t",Array(5).join(String.fromCharCode(160)));return this.text},e.prototype.renderInteractive=function(){return n.i(i.b)(this,void 0,void 0,function(){var t,e,r;return n.i(i.c)(this,function(n){return t=this.alignPoint(this),e=this.controller.fontSize,this.controller.fontSize=this.fontSize,r=this.controller.doc.getTextColor(),this.controller.doc.setTextColor(this.textColor),this.controller.doc.text(this.escapeText(),t.xLeft,t.yTop,this.align),this.controller.doc.setTextColor(r),this.controller.fontSize=e,[2]})})},e.prototype.alignPoint=function(t){return{xLeft:t.xLeft,yTop:t.yTop+(t.yBot-t.yTop)/2}},e}(r.a)},function(t,e,n){"use strict";var i=n(0),r=n(1);n.d(e,"a",function(){return o});var o=function(){function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.bricks=[],this.isPageBreak=!1,this._xLeft=0,this._xRight=0,this._yTop=0,this._yBot=0,this.addBrick.apply(this,t)}return Object.defineProperty(t.prototype,"xLeft",{get:function(){return this._xLeft},set:function(t){this.shift(t-this.xLeft,0,0,0),this._xLeft=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"xRight",{get:function(){return this._xRight},set:function(t){this.shift(0,t-this.xRight,0,0),this._xRight=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"yTop",{get:function(){return this._yTop},set:function(t){this.shift(0,0,t-this.yTop,0),this._yTop=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"yBot",{get:function(){return this._yBot},set:function(t){this.shift(0,0,0,t-this.yBot),this._yBot=t},enumerable:!1,configurable:!0}),t.prototype.shift=function(t,e,n,i){this.bricks.forEach(function(r){r.xLeft+=t,r.xRight+=e,r.yTop+=n,r.yBot+=i})},Object.defineProperty(t.prototype,"width",{get:function(){return this.xRight-this.xLeft},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.yBot-this.yTop},enumerable:!1,configurable:!0}),t.prototype.render=function(){return n.i(i.b)(this,void 0,void 0,function(){var t;return n.i(i.c)(this,function(e){switch(e.label){case 0:t=0,e.label=1;case 1:return t<this.bricks.length?[4,this.bricks[t].render()]:[3,4];case 2:e.sent(),e.label=3;case 3:return t++,[3,1];case 4:return[2]}})})},Object.defineProperty(t.prototype,"isEmpty",{get:function(){return 0===this.bricks.length},enumerable:!1,configurable:!0}),t.prototype.addBrick=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(0!=e.length){(t=this.bricks).push.apply(t,e);var i=r.a.mergeRects.apply(r.a,this.bricks);this._xLeft=i.xLeft,this._xRight=i.xRight,this._yTop=i.yTop,this._yBot=i.yBot}},t.prototype.unfold=function(){var t=[];return this.bricks.forEach(function(e){t.push.apply(t,e.unfold())}),t},t}()},function(t,e,n){"use strict";var i=n(0),r=n(8),o=n(1);n.d(e,"a",function(){return a});var a=function(){function t(t,e,n){this.question=t,this.controller=e,this.textColor=o.a.TEXT_COLOR,this.formBorderColor=o.a.FORM_BORDER_COLOR,this.isPageBreak=!1,this.xLeft=n.xLeft,this.xRight=n.xRight,this.yTop=n.yTop,this.yBot=n.yBot,this.fontSize=e?e.fontSize:r.b.FONT_SIZE}return Object.defineProperty(t.prototype,"width",{get:function(){return this.xRight-this.xLeft},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.yBot-this.yTop},enumerable:!1,configurable:!0}),t.prototype.render=function(){return n.i(i.b)(this,void 0,void 0,function(){return n.i(i.c)(this,function(t){switch(t.label){case 0:return this.question&&this.question.isReadOnly&&"acroform"!==o.a.getReadonlyRenderAs(this.question,this.controller)?[4,this.renderReadOnly()]:[3,2];case 1:return t.sent(),[3,4];case 2:return[4,this.renderInteractive()];case 3:t.sent(),t.label=4;case 4:return[2]}})})},t.prototype.renderInteractive=function(){return n.i(i.b)(this,void 0,void 0,function(){return n.i(i.c)(this,function(t){return[2]})})},t.prototype.renderReadOnly=function(){return n.i(i.b)(this,void 0,void 0,function(){return n.i(i.c)(this,function(t){switch(t.label){case 0:return[4,this.renderInteractive()];case 1:return t.sent(),[2]}})})},t.prototype.unfold=function(){return[this]},t}()},function(e,n){e.exports=t},function(t,e,n){"use strict";var i=n(0),r=n(18),o=(n.n(r),n(1)),a=n(56),s=n(59),c=(n.n(s),n(60));n.n(c);n.d(e,"a",function(){return l}),n.d(e,"b",function(){return u});var l=function(){function t(e){var n=this;this._base64Normal=void 0,this._base64Bold=void 0,void 0===e.orientation?void 0===e.format||e.format[0]<e.format[1]?this._orientation="p":this._orientation="l":this._orientation=e.orientation,this._format=e.format||"a4",Array.isArray(this._format)&&(this._format=this._format.map(function(e){return e*t.MM_TO_PT})),this._fontSize=e.fontSize||t.FONT_SIZE,this._fontName=e.fontName||"segoe",void 0===e.fontName||void 0===e.base64Normal&&void 0===e.base64Bold?"segoe"===this.fontName&&(this._base64Normal=t.SEGOE_NORMAL,this._base64Bold=t.SEGOE_BOLD):(this._base64Normal=e.base64Normal||e.base64Bold,this._base64Bold=e.base64Bold||e.base64Normal),this._useCustomFontInHtml=e.useCustomFontInHtml&&void 0!==e.base64Normal,this._margins=o.a.clone(e.margins),void 0===this._margins&&(this._margins={}),void 0===this._margins.top&&(this._margins.top=10),void 0===this._margins.bot&&(this._margins.bot=10),void 0===this._margins.left&&(this._margins.left=10),void 0===this._margins.right&&(this._margins.right=10),Object.keys(this._margins).forEach(function(e){n._margins[e]=n._margins[e]*t.MM_TO_PT}),this._htmlRenderAs=e.htmlRenderAs||"auto",this._matrixRenderAs=e.matrixRenderAs||"auto",this._readonlyRenderAs=e.readonlyRenderAs||"auto",this._textFieldRenderAs=e.textFieldRenderAs||"singleLine",this._compress=e.compress||!1,this._applyImageFit=e.applyImageFit||!1}return Object.defineProperty(t.prototype,"leftTopPoint",{get:function(){return{xLeft:this.margins.left,yTop:this.margins.top}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fontSize",{get:function(){return this._fontSize},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fontName",{get:function(){return this._fontName},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"base64Normal",{get:function(){return this._base64Normal},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"base64Bold",{get:function(){return this._base64Bold},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"useCustomFontInHtml",{get:function(){return this._useCustomFontInHtml},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"margins",{get:function(){return this._margins},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"format",{get:function(){return this._format},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"orientation",{get:function(){return this._orientation},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"htmlRenderAs",{get:function(){return this._htmlRenderAs},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"matrixRenderAs",{get:function(){return this._matrixRenderAs},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"readonlyRenderAs",{get:function(){return this._readonlyRenderAs},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"textFieldRenderAs",{get:function(){return this._textFieldRenderAs},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"compress",{get:function(){return this._compress},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"applyImageFit",{get:function(){return this._applyImageFit},enumerable:!1,configurable:!0}),t.MM_TO_PT=72/25.4,t.FONT_SIZE=14,t}(),u=function(t){function e(i){void 0===i&&(i={});var s=t.call(this,i)||this,c={orientation:s.orientation,unit:"pt",format:s.format,compress:s.compress};return s._doc=new r.jsPDF(c),void 0===s.base64Normal||o.a.isFontExist(s,s.fontName)||(e.addFont(s.fontName,s.base64Normal,"normal"),e.addFont(s.fontName,s.base64Bold,"bold"),s._doc=new r.jsPDF(c)),n.i(a.a)(s._doc),s._helperDoc=new r.jsPDF(c),s._doc.setFont(s.fontName),s._helperDoc.setFont(s.fontName),s._doc.setFontSize(s.fontSize),s._helperDoc.setFontSize(s.fontSize),s._fontStyle="normal",s.marginsStack=[],s}return n.i(i.a)(e,t),e.addFont=function(t,n,i){var o=e.customFonts[t];o||(o={},e.customFonts[t]=o),o[i]=n;var a=function(){var n=e.customFonts[t];if(n&&n[i]){var r="".concat(t,"-").concat(i,".ttf");this.addFileToVFS(r,n[i]),this.addFont(r,t,i)}};r.jsPDF.API.events.push(["addFonts",a])},Object.defineProperty(e.prototype,"doc",{get:function(){return this._doc},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"helperDoc",{get:function(){return this._helperDoc},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fontName",{get:function(){return this._fontName},set:function(t){this._fontName=t,this._doc.setFont(t),this._helperDoc.setFont(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fontSize",{get:function(){return this._fontSize},set:function(t){this._fontSize=t,this._doc.setFontSize(t),this._helperDoc.setFontSize(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fontStyle",{get:function(){return this._fontStyle},set:function(t){this._fontStyle=t,this._doc.setFont(this._fontName,t),this._helperDoc.setFont(this._fontName,t)},enumerable:!1,configurable:!0}),e.prototype.measureText=function(t,e,n){var i=this;void 0===t&&(t=1),void 0===e&&(e=this._fontStyle),void 0===n&&(n=this._fontSize);var r=this._helperDoc.getFontSize();this._helperDoc.setFontSize(n),this._helperDoc.setFont(this._fontName,e);var a=this._helperDoc.getLineHeight()/this._helperDoc.internal.scaleFactor,s=0;return"number"==typeof t?s=a*t:(t="string"==typeof t?t:o.a.getLocString(t),s=t.split("").reduce(function(t,e){return t+i._helperDoc.getTextWidth(e)},0)),this._helperDoc.setFontSize(r),this._helperDoc.setFont(this._fontName,"normal"),{width:s,height:a}},Object.defineProperty(e.prototype,"unitWidth",{get:function(){return this.measureText().width},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"unitHeight",{get:function(){return this.measureText().height},enumerable:!1,configurable:!0}),e.prototype.pushMargins=function(t,e){this.marginsStack.push({left:this.margins.left,right:this.margins.right}),void 0!==t&&(this.margins.left=t),void 0!==e&&(this.margins.right=e)},e.prototype.popMargins=function(){var t=this.marginsStack.pop();this.margins.left=t.left,this.margins.right=t.right},Object.defineProperty(e.prototype,"paperWidth",{get:function(){return this.doc.internal.pageSize.width},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"paperHeight",{get:function(){return this.doc.internal.pageSize.height},enumerable:!1,configurable:!0}),e.prototype.getNumberOfPages=function(){return this.doc.getNumberOfPages()},e.prototype.addPage=function(){this.doc.addPage()},e.prototype.setPage=function(t){this.doc.setPage(t+1)},e.customFonts={},e}(l)},function(t,e,n){"use strict";var i=n(0),r=n(7),o=(n.n(r),n(5)),a=n(15),s=n(1),c=n(34),l=n(13);n.d(e,"a",function(){return u});var u=function(){function t(){}return t.generateFlatsPanel=function(t,e,r,o){return n.i(i.b)(this,void 0,void 0,function(){var a,u,h,f,d,p;return n.i(i.c)(this,function(g){switch(g.label){case 0:return a=[],u=s.a.clone(o),e.pushMargins(),e.margins.left+=e.measureText(r.innerIndent).width,u.xLeft+=e.measureText(r.innerIndent).width,f=(h=a.push).apply,d=[a],[4,this.generateFlatsPagePanel(t,e,r,u)];case 1:return f.apply(h,d.concat([g.sent()])),e.popMargins(),p=new c.a(o,a,r,e,l.FlatRepository.getInstance(),l),[4,t.onRenderPanel.fire(t,p)];case 2:return g.sent(),[2,n.i(i.d)([],p.bricks,!0)]}})})},t.generateFlatsPagePanel=function(e,a,c,l){return n.i(i.b)(this,void 0,void 0,function(){var u,h,f,d,p,g,m,v,y,b,x,T,F,_,w,R,P,E,C,O,S,L;return n.i(i.c)(this,function(n){switch(n.label){case 0:return c.isVisible?(c.onFirstRendering(),u=[],h=s.a.clone(l),"page"!==c.getType()||e.showPageTitles?(f=new o.a,c.title?c instanceof r.PanelModel&&c.no?[4,s.a.createTitlePanelFlat(h,a,c.no,"page"===c.getType())]:[3,2]:[3,4]):[3,7]):[2];case 1:d=n.sent(),f.addBrick(d),h.xLeft=d.xRight+a.measureText(" ").width,n.label=2;case 2:return[4,s.a.createTitlePanelFlat(h,a,c.locTitle,"page"===c.getType())];case 3:p=n.sent(),f.addBrick(p),h=s.a.createPoint(p),n.label=4;case 4:return c.description?(c.title&&(h.yTop+=a.unitWidth*t.PANEL_DESC_GAP_SCALE),[4,s.a.createDescFlat(h,null,a,c.locDescription)]):[3,6];case 5:g=n.sent(),f.addBrick(g),h=s.a.createPoint(g),n.label=6;case 6:f.isEmpty||(m=s.a.createPoint(f),f.addBrick(s.a.createRowlineFlat(m,a)),u.push(f),h.yTop+=a.unitHeight*t.PANEL_CONT_GAP_SCALE+s.a.EPSILON),n.label=7;case 7:v=0,y=c.rows,n.label=8;case 8:if(!(v<y.length))return[3,16];if(b=y[v],!b.visible)return[3,15];a.pushMargins(),x=s.a.getPageAvailableWidth(a),T=a.margins.left,F=[],_=0,n.label=9;case 9:return _<b.visibleElements.length?(w=b.visibleElements[_],w.isVisible?(R=s.a.parseWidth(w.renderWidth,x-(b.visibleElements.length-1)*a.unitWidth,b.visibleElements.length),a.margins.left=T+(0!==_?a.unitWidth:0),a.margins.right=a.paperWidth-a.margins.left-R,h.xLeft=a.margins.left,T=a.margins.left+R,w instanceof r.PanelModel?(E=(P=F.push).apply,C=[F],[4,this.generateFlatsPanel(e,a,w,h)]):[3,11]):[3,13]):[3,14];case 10:return E.apply(P,C.concat([n.sent()])),[3,13];case 11:return S=(O=F.push).apply,L=[F],[4,s.a.generateQuestionFlats(e,a,w,h)];case 12:S.apply(O,L.concat([n.sent()])),n.label=13;case 13:return _++,[3,9];case 14:a.popMargins(),h.xLeft=a.margins.left,0!==F.length&&(h.yTop=s.a.mergeRects.apply(s.a,F).yBot,h.xLeft=l.xLeft,h.yTop+=a.unitHeight*t.QUES_GAP_VERT_SCALE,u.push.apply(u,F),u.push(s.a.createRowlineFlat(h,a)),h.yTop+=s.a.EPSILON),n.label=15;case 15:return v++,[3,8];case 16:return[2,u]}})})},t.popRowlines=function(t){for(;t.length>0&&t[t.length-1]instanceof a.a;)t.pop()},t.generateFlatTitle=function(e,r,a){return n.i(i.b)(this,void 0,void 0,function(){var c,l,u,h;return n.i(i.c)(this,function(n){switch(n.label){case 0:return c=new o.a,e.showTitle?e.title?[4,s.a.createTitleSurveyFlat(a,r,e.locTitle)]:[3,2]:[3,4];case 1:l=n.sent(),c.addBrick(l),a=s.a.createPoint(l),n.label=2;case 2:return e.description?(e.title&&(a.yTop+=r.unitWidth*t.PANEL_DESC_GAP_SCALE),h=(u=c).addBrick,[4,s.a.createDescFlat(a,null,r,e.locDescription)]):[3,4];case 3:h.apply(u,[n.sent()]),n.label=4;case 4:return[2,c]}})})},t.generateFlatLogoImage=function(t,e,r){return n.i(i.b)(this,void 0,void 0,function(){var o,a;return n.i(i.c)(this,function(n){switch(n.label){case 0:return[4,s.a.createImageFlat(r,null,e,s.a.getLocString(t.locLogo),s.a.pxToPt(t.logoWidth),s.a.pxToPt(t.logoHeight))];case 1:return o=n.sent(),a=0,"right"===t.logoPosition?a=s.a.getPageAvailableWidth(e)-o.width:"left"!==t.logoPosition&&(a=s.a.getPageAvailableWidth(e)/2-o.width/2),o.xLeft+=a,o.xRight+=a,[2,o]}})})},t.generateFlats=function(e,r){return n.i(i.b)(this,void 0,void 0,function(){var o,a,u,h,a,u,a,a,f,u,d,p,g,m,v,y,b,x;return n.i(i.c)(this,function(T){switch(T.label){case 0:return o=[],e.hasLogo?[3,2]:[4,this.generateFlatTitle(e,r,r.leftTopPoint)];case 1:return a=T.sent(),a.isEmpty||o.push([a]),[3,11];case 2:return e.isLogoBefore?[4,this.generateFlatLogoImage(e,r,r.leftTopPoint)]:[3,5];case 3:return u=T.sent(),o.push([u]),h=s.a.createPoint(u,"top"===e.logoPosition,"top"!==e.logoPosition),"top"!==e.logoPosition?(r.pushMargins(),h.xLeft+=r.unitWidth,r.margins.left+=u.width+r.unitWidth):(h.xLeft=r.leftTopPoint.xLeft,h.yTop+=r.unitHeight/2),[4,this.generateFlatTitle(e,r,h)];case 4:return a=T.sent(),"top"!==e.logoPosition&&r.popMargins(),a.isEmpty||o[0].push(a),[3,11];case 5:return"right"!==e.logoPosition?[3,8]:[4,this.generateFlatLogoImage(e,r,r.leftTopPoint)];case 6:return u=T.sent(),o.push([u]),r.pushMargins(),r.margins.right+=u.width+r.unitWidth,[4,this.generateFlatTitle(e,r,r.leftTopPoint)];case 7:return a=T.sent(),a.isEmpty||o[0].unshift(a),r.popMargins(),[3,11];case 8:return[4,this.generateFlatTitle(e,r,r.leftTopPoint)];case 9:return a=T.sent(),f=r.leftTopPoint,a.isEmpty||(o.push([a]),f=s.a.createPoint(a),f.yTop+=r.unitHeight/2),[4,this.generateFlatLogoImage(e,r,f)];case 10:u=T.sent(),0!==o.length?o[0].push(u):o.push([u]),T.label=11;case 11:d=r.leftTopPoint,0!==o.length&&(d.yTop=s.a.createPoint(s.a.mergeRects.apply(s.a,o[0])).yTop,o[0].push(s.a.createRowlineFlat(d,r)),d.yTop+=r.unitHeight*t.PANEL_CONT_GAP_SCALE+s.a.EPSILON),p=0,T.label=12;case 12:return p<e.visiblePages.length?(g=[],v=(m=g.push).apply,y=[g],[4,this.generateFlatsPagePanel(e,r,e.visiblePages[p],d)]):[3,16];case 13:return v.apply(m,y.concat([T.sent()])),b=new c.b(d,g,e.visiblePages[p],r,l.FlatRepository.getInstance(),l),[4,e.onRenderPage.fire(e,b)];case 14:T.sent(),g=n.i(i.d)([],b.bricks,!0),0===p&&0!==o.length?(x=o[0]).push.apply(x,g):o.push(g),this.popRowlines(o[o.length-1]),T.label=15;case 15:return p++,[3,12];case 16:return[2,o]}})})},t.QUES_GAP_VERT_SCALE=1.5,t.PANEL_CONT_GAP_SCALE=1,t.PANEL_DESC_GAP_SCALE=.25,t}()},function(t,e,n){"use strict";var i=n(0),r=n(6),o=n(4),a=n(1);n.d(e,"a",function(){return s});var s=function(t){function e(e,n,i,r,o,a){var s=t.call(this,e,n,i)||this;return s.fieldName=r,s.readonly=o,s.checked=a,s.question=e,s.textColor=s.formBorderColor,s}return n.i(i.a)(e,t),e.prototype.renderInteractive=function(){return n.i(i.b)(this,void 0,void 0,function(){var t,r;return n.i(i.c)(this,function(n){switch(n.label){case 0:return this.readonly&&"acroform"!==a.a.getReadonlyRenderAs(this.question,this.controller)?[4,this.renderReadOnly()]:[3,2];case 1:return[2,n.sent()];case 2:return t=new this.controller.doc.AcroFormCheckBox,r=a.a.formScale(this.controller,this),t.maxFontSize=this.height*r*e.FONT_SIZE_SCALE,t.caption=e.CHECKMARK_READONLY_SYMBOL,t.textAlign="center",t.fieldName=this.fieldName,t.readOnly=this.readonly,t.color=this.formBorderColor,t.value=!!this.checked&&"On",t.AS=this.checked?"/On":"/Off",t.Rect=a.a.createAcroformRect(a.a.scaleRect(this,r)),this.controller.doc.addField(t),a.a.renderFlatBorders(this.controller,this),[2]}})})},e.prototype.renderReadOnly=function(){return n.i(i.b)(this,void 0,void 0,function(){var t,r,s,c,l;return n.i(i.c)(this,function(n){switch(n.label){case 0:return a.a.renderFlatBorders(this.controller,this),this.checked?(t=a.a.createPoint(this,!0,!0),r=this.controller.fontName,this.controller.fontName=e.CHECKMARK_READONLY_FONT,s=this.controller.fontSize,this.controller.fontSize=s*e.CHECKMARK_READONLY_FONT_SIZE_SCALE,c=this.controller.measureText(e.CHECKMARK_READONLY_SYMBOL),t.xLeft+=this.width/2-c.width/2,t.yTop+=this.height/2-c.height/2,[4,a.a.createTextFlat(t,this.question,this.controller,e.CHECKMARK_READONLY_SYMBOL,o.a)]):[3,3];case 1:return l=n.sent(),l.unfold()[0].textColor=this.textColor,this.controller.fontSize=s,[4,l.render()];case 2:n.sent(),this.controller.fontName=r,n.label=3;case 3:return[2]}})})},e.FONT_SIZE_SCALE=.7,e.CHECKMARK_READONLY_SYMBOL="3",e.CHECKMARK_READONLY_FONT="zapfdingbats",e.CHECKMARK_READONLY_FONT_SIZE_SCALE=1-Math.E/10,e}(r.a)},function(t,e,n){"use strict";var i=n(0),r=n(2),o=n(31),a=n(14);n.d(e,"a",function(){return s});var s=function(t){function e(e,n,i){var r=t.call(this,e,n,i)||this;return r.survey=e,r.controller=i,r.question=n,r}return n.i(i.a)(e,t),e.prototype.generateFlatItem=function(t,e,n,i,r){0===n?(this.radioGroupWrap=new o.b(this.question.id+(void 0===i?"":i),this.controller,this.question.isReadOnly),this.question.pdfRadioGroupWrap=this.radioGroupWrap):void 0===this.radioGroupWrap&&(this.radioGroupWrap=this.question.pdfRadioGroupWrap);var a=void 0===r?e===this.question.otherItem?this.question.isOtherSelected:e.value===this.question.value||void 0!==this.question.isItemSelected&&this.question.isItemSelected(e):r;return new o.a(this.question,this.controller,t,n,a,this.radioGroupWrap)},e}(a.a);r.a.getInstance().register("radiogroup",s),r.a.getInstance().register("buttongroup",s)},function(t,e,n){"use strict";var i=n(0),r=n(4);n.d(e,"a",function(){return o});var o=function(t){function e(e,n,i,r){return t.call(this,e,n,i,r)||this}return n.i(i.a)(e,t),e.prototype.renderInteractive=function(){return n.i(i.b)(this,void 0,void 0,function(){return n.i(i.c)(this,function(e){switch(e.label){case 0:return this.controller.fontStyle="bold",[4,t.prototype.renderInteractive.call(this)];case 1:return e.sent(),this.controller.fontStyle="normal",[2]}})})},e}(r.a)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(53);n.d(e,"SurveyPDF",function(){return i.a});var r=n(1);n.d(e,"SurveyHelper",function(){return r.a});var o=n(8);n.d(e,"DocOptions",function(){return o.a}),n.d(e,"DocController",function(){return o.b});var a=n(2);n.d(e,"FlatRepository",function(){return a.a});var s=n(3);n.d(e,"FlatQuestion",function(){return s.a});var c=n(35);n.d(e,"FlatBoolean",function(){return c.a});var l=n(36);n.d(e,"FlatCheckbox",function(){return l.a});var u=n(37);n.d(e,"FlatComment",function(){return u.a});var h=n(38);n.d(e,"FlatDropdown",function(){return h.a});var f=n(39);n.d(e,"FlatExpression",function(){return f.a});var d=n(40);n.d(e,"FlatFile",function(){return d.a});var p=n(41);n.d(e,"FlatHTML",function(){return p.a});var g=n(42);n.d(e,"FlatImage",function(){return g.a});var m=n(43);n.d(e,"FlatImagePicker",function(){return m.a});var v=n(47);n.d(e,"FlatPanelDynamic",function(){return v.a});var y=n(11);n.d(e,"FlatRadiogroup",function(){return y.a});var b=n(48);n.d(e,"FlatRanking",function(){return b.a});var x=n(49);n.d(e,"FlatRating",function(){return x.a});var T=n(14);n.d(e,"FlatSelectBase",function(){return T.a});var F=n(50);n.d(e,"FlatSignaturePad",function(){return F.a});var _=n(51);n.d(e,"FlatTextbox",function(){return _.a});var w=n(9);n.d(e,"FlatSurvey",function(){return w.a});var R=n(44);n.d(e,"FlatMatrix",function(){return R.a});var P=n(21);n.d(e,"FlatMatrixMultiple",function(){return P.a});var E=n(45);n.d(e,"FlatMatrixDynamic",function(){return E.a});var C=n(46);n.d(e,"FlatMultipleText",function(){return C.a});var O=n(22);n.d(e,"PagePacker",function(){return O.a});var S=n(20);n.d(e,"EventHandler",function(){return S.a});var L=n(19);n.d(e,"HorizontalAlign",function(){return L.a}),n.d(e,"VerticalAlign",function(){return L.b}),n.d(e,"DrawCanvas",function(){return L.c});var A=n(6);n.d(e,"PdfBrick",function(){return A.a});var B=n(23);n.d(e,"BooleanItemBrick",function(){return B.a});var N=n(24);n.d(e,"CheckboxItemBrick",function(){return N.a});var I=n(10);n.d(e,"CheckItemBrick",function(){return I.a});var M=n(25);n.d(e,"CommentBrick",function(){return M.a});var W=n(5);n.d(e,"CompositeBrick",function(){return W.a});var q=n(52);n.d(e,"CustomBrick",function(){return q.a});var k=n(26);n.d(e,"DropdownBrick",function(){return k.a});var H=n(27);n.d(e,"EmptyBrick",function(){return H.a});var D=n(28);n.d(e,"HTMLBrick",function(){return D.a});var j=n(29);n.d(e,"ImageBrick",function(){return j.a});var z=n(30);n.d(e,"LinkBrick",function(){return z.a});var G=n(31);n.d(e,"RadioItemBrick",function(){return G.a});var V=n(32);n.d(e,"RankingItemBrick",function(){return V.a});var U=n(15);n.d(e,"RowlineBrick",function(){return U.a});var Q=n(17);n.d(e,"TextFieldBrick",function(){return Q.a});var Y=n(12);n.d(e,"TextBoldBrick",function(){return Y.a});var K=n(16);n.d(e,"TextBoxBrick",function(){return K.a});var X=n(4);n.d(e,"TextBrick",function(){return X.a});var Z=n(33);n.d(e,"TitlePanelBrick",function(){return Z.a})},function(t,e,n){"use strict";var i=n(0),r=n(3),o=n(4),a=n(5),s=n(1);n.d(e,"a",function(){return c});var c=function(t){function e(e,n,i){var r=t.call(this,e,n,i)||this;return r.survey=e,r.controller=i,r.question=n,r}return n.i(i.a)(e,t),e.prototype.generateFlatComposite=function(t,e,r){return n.i(i.b)(this,void 0,void 0,function(){var c,l,u,h,f,d,p,g,m;return n.i(i.c)(this,function(n){switch(n.label){case 0:return c=new a.a,(l=s.a.createRect(t,this.controller.unitWidth,this.controller.unitHeight),u=this.generateFlatItem(s.a.moveRect(s.a.scaleRect(l,s.a.SELECT_ITEM_FLAT_SCALE),t.xLeft),e,r),c.addBrick(u),h=s.a.clone(t),h.xLeft=u.xRight+this.controller.unitWidth*s.a.GAP_BETWEEN_ITEM_TEXT,null===e.locText.renderedHtml)?[3,2]:(d=(f=c).addBrick,[4,s.a.createTextFlat(h,this.question,this.controller,e.locText,o.a)]);case 1:d.apply(f,[n.sent()]),n.label=2;case 2:return e===this.question.otherItem&&(e.value===this.question.value||void 0!==this.question.isOtherSelected&&this.question.isOtherSelected)?(p=s.a.createPoint(c),p.yTop+=this.controller.unitHeight*s.a.GAP_BETWEEN_ROWS,m=(g=c).addBrick,[4,s.a.createCommentFlat(p,this.question,this.controller,s.a.OTHER_ROWS_COUNT,!1,r)]):[3,4];case 3:m.apply(g,[n.sent()]),n.label=4;case 4:return[2,c]}})})},e.prototype.generateFlatsContent=function(t){return n.i(i.b)(this,void 0,void 0,function(){var e,r;return n.i(i.c)(this,function(n){switch(n.label){case 0:return e=this.question.colCount,0==this.question.colCount?(e=Math.floor(s.a.getPageAvailableWidth(this.controller)/this.controller.measureText(s.a.MATRIX_COLUMN_WIDTH).width)||1,this.question.visibleChoices.length<e&&(e=this.question.visibleChoices.length)):this.question.colCount>1&&(e=s.a.getColumnWidth(this.controller,this.question.colCount)<this.controller.measureText(s.a.MATRIX_COLUMN_WIDTH).width?1:this.question.colCount),1!=e?[3,2]:[4,this.generateVerticallyItems(t,this.question.visibleChoices)];case 1:return r=n.sent(),[3,4];case 2:return[4,this.generateHorisontallyItems(t,e)];case 3:r=n.sent(),n.label=4;case 4:return[2,r]}})})},e.prototype.generateVerticallyItems=function(t,e){return n.i(i.b)(this,void 0,void 0,function(){var r,o,a,c;return n.i(i.c)(this,function(n){switch(n.label){case 0:r=s.a.clone(t),o=[],a=0,n.label=1;case 1:return a<e.length?[4,this.generateFlatComposite(r,e[a],a)]:[3,4];case 2:c=n.sent(),r.yTop=c.yBot+s.a.GAP_BETWEEN_ROWS*this.controller.unitHeight,o.push(c),n.label=3;case 3:return a++,[3,1];case 4:return[2,o]}})})},e.prototype.generateHorisontallyItems=function(t,e){return n.i(i.b)(this,void 0,void 0,function(){var r,o,c,l,u,h;return n.i(i.c)(this,function(n){switch(n.label){case 0:r=s.a.clone(t),o=[],c=new a.a,l=0,n.label=1;case 1:return l<this.question.visibleChoices.length?(this.controller.pushMargins(this.controller.margins.left,this.controller.margins.right),s.a.setColumnMargins(this.controller,e,l%e),r.xLeft=this.controller.margins.left,[4,this.generateFlatComposite(r,this.question.visibleChoices[l],l)]):[3,4];case 2:u=n.sent(),c.addBrick(u),this.controller.popMargins(),l%e!=e-1&&l!==this.question.visibleChoices.length-1||(h=s.a.createRowlineFlat(s.a.createPoint(c),this.controller),r.yTop=h.yBot+s.a.GAP_BETWEEN_ROWS*this.controller.unitHeight,o.push(c,h),c=new a.a),n.label=3;case 3:return l++,[3,1];case 4:return[2,o]}})})},e}(r.a)},function(t,e,n){"use strict";var i=n(0);n.d(e,"a",function(){return r});var r=function(){function t(t,e,n){this.controller=t,this.color=n,this.isPageBreak=!1,this.xLeft=e.xLeft,this.xRight=e.xRight,this.yTop=e.yTop,this.yBot=e.yBot}return Object.defineProperty(t.prototype,"width",{get:function(){return this.xRight-this.xLeft},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.yBot-this.yTop},enumerable:!1,configurable:!0}),t.prototype.render=function(){return n.i(i.b)(this,void 0,void 0,function(){var t;return n.i(i.c)(this,function(e){return null!==this.color&&(t=this.controller.doc.getDrawColor(),this.controller.doc.setDrawColor(this.color),this.controller.doc.line(this.xLeft,this.yTop,this.xRight,this.yTop),this.controller.doc.setDrawColor(t)),[2]})})},t.prototype.unfold=function(){return[this]},t}()},function(t,e,n){"use strict";var i=n(0),r=n(17),o=n(1);n.d(e,"a",function(){return a});var a=function(t){function e(e,n,i,r,a,s){void 0===r&&(r=!0),void 0===a&&(a=!1),void 0===s&&(s=0);var c=t.call(this,e,n,i,r,e.id+(r?"":"_comment"+s),o.a.getQuestionOrCommentValue(e,r),r?o.a.getLocString(e.locPlaceHolder):"",e.isReadOnly,a,e.inputType)||this;return c.isQuestion=r,c.isMultiline=a,c}return n.i(i.a)(e,t),e}(r.a)},function(t,e,n){"use strict";var i=n(0),r=n(6),o=n(1);n.d(e,"a",function(){return a});var a=function(t){function e(e,n,i,r,o,a,s,c,l,u){var h=t.call(this,e,n,i)||this;return h.isQuestion=r,h.fieldName=o,h.value=a,h.placeholder=s,h.isReadOnly=c,h.isMultiline=l,h.inputType=u,h.question=e,h}return n.i(i.a)(e,t),e.prototype.renderColorQuestion=function(){var t=this.controller.doc.getFillColor();this.controller.doc.setFillColor(this.question.value||"black"),this.controller.doc.rect(this.xLeft,this.yTop,this.width,this.height,"F"),this.controller.doc.setFillColor(t)},e.prototype.renderInteractive=function(){return n.i(i.b)(this,void 0,void 0,function(){var t,e;return n.i(i.c)(this,function(n){return"color"===this.inputType?(this.renderColorQuestion(),[2]):(t="password"===this.inputType?new this.controller.doc.AcroFormPasswordField:new this.controller.doc.AcroFormTextField,t.fieldName=this.fieldName,t.fontName=this.controller.fontName,t.fontSize=this.fontSize,t.isUnicode=o.a.isCustomFont(this.controller,t.fontName),"password"!==this.inputType?(t.V=" "+this.value,t.DV=" "+this.placeholder):t.value="",t.multiline=this.isMultiline,t.readOnly=this.isReadOnly,t.color=this.textColor,e=o.a.formScale(this.controller,this),t.maxFontSize=this.controller.fontSize*e,t.Rect=o.a.createAcroformRect(o.a.scaleRect(this,e)),this.controller.doc.addField(t),o.a.renderFlatBorders(this.controller,this),[2])})})},e.prototype.renderReadOnly=function(){return n.i(i.b)(this,void 0,void 0,function(){return n.i(i.c)(this,function(t){switch(t.label){case 0:return this.controller.pushMargins(this.xLeft,this.controller.paperWidth-this.xRight),"color"!==this.inputType?[3,1]:(this.renderColorQuestion(),[3,3]);case 1:return[4,o.a.renderReadOnlyTextField(this.controller,this.question,this,o.a.getQuestionOrCommentDisplayValue(this.question,this.isQuestion),!this.isMultiline)];case 2:t.sent(),t.label=3;case 3:return this.controller.popMargins(),[2]}})})},e}(r.a)},function(t,n){t.exports=e},function(t,e,n){"use strict";var i=n(0),r=n(8),o=n(4),a=n(12),s=n(1);n.d(e,"a",function(){return c}),n.d(e,"b",function(){return l}),n.d(e,"c",function(){return u});var c;!function(t){t.NotSet="notset",t.Left="left",t.Center="center",t.Right="right"}(c||(c={}));var l;!function(t){t.NotSet="notset",t.Top="top",t.Middle="middle",t.Bottom="bottom"}(l||(l={}));var u=function(){function t(t,e,n,i,r){this.packs=t,this.controller=e,this._rect=n,this._countPages=i,this._pageNumber=r}return Object.defineProperty(t.prototype,"countPages",{get:function(){return this._countPages},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pageNumber",{get:function(){return this._pageNumber},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rect",{get:function(){return this._rect},enumerable:!1,configurable:!0}),t.prototype.alignRect=function(t,e){void 0===t.margins?t.margins={left:0,right:0,top:0,bot:0}:(void 0===t.margins.left&&(t.margins.left=0),void 0===t.margins.right&&(t.margins.right=0),void 0===t.margins.top&&(t.margins.top=0),void 0===t.margins.bot&&(t.margins.bot=0)),void 0===t.rect&&(void 0!==t.horizontalAlign&&t.horizontalAlign!==c.NotSet||(t.horizontalAlign=c.Center),void 0!==t.verticalAlign&&t.verticalAlign!==l.NotSet||(t.verticalAlign=l.Middle));var n=s.a.clone(this.rect);if(void 0!==t.horizontalAlign)switch(t.horizontalAlign){case c.Left:n.xLeft=this.rect.xLeft+t.margins.left,n.xRight=Math.min(this.rect.xRight-t.margins.right,this.rect.xLeft+t.margins.left+e.width);break;case c.Center:n.xLeft=Math.max(this.rect.xLeft+t.margins.left,(this.rect.xLeft+this.rect.xRight-e.width)/2),n.xRight=Math.min(this.rect.xRight-t.margins.right,(this.rect.xLeft+this.rect.xRight+e.width)/2);break;case c.Right:n.xLeft=Math.max(this.rect.xLeft+t.margins.left,this.rect.xRight-t.margins.right-e.width),n.xRight=this.rect.xRight-t.margins.right}else n.xLeft=t.rect.xLeft||this.rect.xLeft,n.xRight=t.rect.xRight||this.rect.xRight;if(void 0!==t.verticalAlign)switch(t.verticalAlign){case l.Top:n.yTop=this.rect.yTop+t.margins.top,n.yBot=Math.min(this.rect.yBot-t.margins.bot,this.rect.yTop+t.margins.top+e.height);break;case l.Middle:n.yTop=Math.max(this.rect.yTop+t.margins.top,(this.rect.yTop+this.rect.yBot-e.height)/2),n.yBot=Math.min(this.rect.yBot-t.margins.bot,(this.rect.yTop+this.rect.yBot+e.height)/2);break;case l.Bottom:n.yTop=Math.max(this.rect.yTop+t.margins.top,this.rect.yBot-t.margins.bot-e.height),n.yBot=this.rect.yBot-t.margins.bot}else n.yTop=t.rect.yTop||this.rect.yTop,n.yBot=t.rect.yBot||this.rect.yBot;return n},t.prototype.drawText=function(t){t=s.a.clone(t),void 0===t.fontSize&&(t.fontSize=r.a.FONT_SIZE),void 0===t.isBold&&(t.isBold=!1);var e=this.controller.measureText(t.text,t.isBold?"bold":"normal",t.fontSize),n=this.alignRect(t,e);t.isBold?this.packs.push(new a.a(null,this.controller,n,t.text)):this.packs.push(new o.a(null,this.controller,n,t.text)),this.packs[this.packs.length-1].fontSize=t.fontSize},t.prototype.drawImage=function(t){return n.i(i.b)(this,void 0,void 0,function(){var e,r,o,a;return n.i(i.c)(this,function(n){switch(n.label){case 0:return t=s.a.clone(t),void 0===t.width&&(t.width=this.rect.xRight-this.rect.xLeft),void 0===t.height&&(t.height=this.rect.yBot-this.rect.yTop),e={width:t.width,height:t.height},r=this.alignRect(t,e),a=(o=this.packs).push,[4,s.a.createImageFlat(s.a.createPoint(r,!0,!0),null,this.controller,t.base64,r.xRight-r.xLeft,r.yBot-r.yTop)];case 1:return a.apply(o,[n.sent()]),[2]}})})},t}()},function(t,e,n){"use strict";var i=n(0),r=n(7),o=(n.n(r),n(19)),a=n(1);n.d(e,"b",function(){return s}),n.d(e,"a",function(){return c});var s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.i(i.a)(e,t),e.prototype.unshift=function(t){this.hasFunc(t)||(null==this.callbacks&&(this.callbacks=new Array),this.callbacks.unshift(t))},e.prototype.fire=function(t,e){return n.i(i.b)(this,void 0,void 0,function(){var r;return n.i(i.c)(this,function(n){switch(n.label){case 0:if(null==this.callbacks)return[2];r=0,n.label=1;case 1:return r<this.callbacks.length?[4,this.callbacks[r](t,e)]:[3,4];case 2:n.sent(),n.label=3;case 3:return r++,[3,1];case 4:return[2]}})})},e}(r.Event),c=function(){function t(){}return t.process_header_events=function(t,e,n){t.haveCommercialLicense||t.onRenderHeader.add(function(t,e){e.drawText({text:"SurveyJS PDF | Please purchase a SurveyJS PDF developer license to use it in your app | https://surveyjs.io/Buy",fontSize:10})});for(var i=0;i<n.length;i++)t.onRenderHeader.fire(t,new o.c(n[i],e,a.a.createHeaderRect(e),n.length,i+1)),t.onRenderFooter.fire(t,new o.c(n[i],e,a.a.createFooterRect(e),n.length,i+1))},t}()},function(t,e,n){"use strict";var i=n(0),r=n(7),o=(n.n(r),n(3)),a=n(2),s=n(4),c=n(5),l=n(1),u=n(9);n.d(e,"a",function(){return h});var h=function(t){function e(e,n,i,r){void 0===r&&(r=!0);var o=t.call(this,e,n,i)||this;return o.survey=e,o.isMultiple=r,o.question=n,o}return n.i(i.a)(e,t),e.prototype.generateFlatsCell=function(t,e,r){return n.i(i.b)(this,void 0,void 0,function(){var o,u,h,f,d,p,g,m,v,y;return n.i(i.c)(this,function(n){switch(n.label){case 0:return o=new c.a,e.hasQuestion?e.cell.column.isShowInMultipleColumns?(u=a.a.getInstance().create(this.survey,e.question,this.controller,e.question.getType()),h=l.a.moveRect(l.a.scaleRect(l.a.createRect(t,this.controller.unitHeight,this.controller.unitHeight),l.a.SELECT_ITEM_FLAT_SCALE),t.xLeft),o.addBrick(u.generateFlatItem(h,e.item,e.choiceIndex)),[3,3]):[3,1]:[3,4];case 1:return e.question.titleLocation=l.a.TITLE_LOCATION_MATRIX,d=(f=o.addBrick).apply,p=[o],[4,l.a.generateQuestionFlats(this.survey,this.controller,e.question,t)];case 2:d.apply(f,p.concat([n.sent()])),n.label=3;case 3:return[3,8];case 4:return e.hasTitle?r?(m=(g=o).addBrick,[4,l.a.createBoldTextFlat(t,this.question,this.controller,e.locTitle)]):[3,6]:[3,8];case 5:return m.apply(g,[n.sent()]),[3,8];case 6:return y=(v=o).addBrick,[4,l.a.createTextFlat(t,this.question,this.controller,e.locTitle,s.a)];case 7:y.apply(v,[n.sent()]),n.label=8;case 8:return[2,o]}})})},e.prototype.generateFlatsRowHorisontal=function(t,e,r,o){return n.i(i.b)(this,void 0,void 0,function(){var a,s,u,h,f,d;return n.i(i.c)(this,function(n){switch(n.label){case 0:a=new c.a,s=l.a.clone(t),u=this.controller.paperWidth-this.controller.margins.left+this.controller.unitWidth*l.a.GAP_BETWEEN_COLUMNS,this.controller.pushMargins(),h=0,f="none"!==this.question.detailPanelMode?1:0,n.label=1;case 1:return f<e.cells.length?h==r?[3,4]:(this.controller.margins.left=this.controller.paperWidth-u+this.controller.unitWidth*l.a.GAP_BETWEEN_COLUMNS,this.controller.margins.right=this.controller.paperWidth-this.controller.margins.left-o[h],u=this.controller.margins.right,s.xLeft=this.controller.margins.left,[4,this.generateFlatsCell(s,e.cells[f],e===this.question.renderedTable.headerRow)]):[3,4];case 2:d=n.sent(),d.isEmpty||(a.addBrick(d),h++),n.label=3;case 3:return f++,[3,1];case 4:return this.controller.popMargins(),[2,a]}})})},e.prototype.generateFlatsRowVertical=function(t,r,o){return n.i(i.b)(this,void 0,void 0,function(){var a,s,u,h,f,d,p;return n.i(i.c)(this,function(n){switch(n.label){case 0:a=new c.a,s=l.a.clone(t),u=0,n.label=1;case 1:return u<Math.min(o,r.cells.length)?this.question.renderedTable.showHeader&&(!this.isMultiple||u>0)?(f=(h=a).addBrick,[4,this.generateFlatsCell(s,this.question.renderedTable.headerRow.cells[u],!1)]):[3,3]:[3,6];case 2:f.apply(h,[n.sent()]),s.yTop=a.yBot+e.GAP_BETWEEN_ROWS*this.controller.unitHeight,n.label=3;case 3:return p=(d=a).addBrick,[4,this.generateFlatsCell(s,r.cells[u],!1)];case 4:p.apply(d,[n.sent()]),s.yTop=a.yBot+e.GAP_BETWEEN_ROWS*this.controller.unitHeight,n.label=5;case 5:return u++,[3,1];case 6:return[2,a]}})})},e.prototype.calculateColumnWidth=function(t,e){for(var n=l.a.getPageAvailableWidth(this.controller)-(e-1)*this.controller.unitWidth*l.a.GAP_BETWEEN_COLUMNS,i=n,r=e,o=[],a=0;a<e;a++){var s=l.a.parseWidth(t[0].cells[a].width,n,e)||0;i-=s,0!==s&&r--,o.push(s)}if(0===r)return o;for(var c=this.controller.measureText(l.a.MATRIX_COLUMN_WIDTH).width,u=l.a.parseWidth(t[0].cells[0].minWidth,i,e)||0,h=i/r,f=Math.max(c,u,h),a=0;a<o.length;a++)0===o[a]&&(o[a]=f);return o},e.prototype.generateOneRow=function(t,e,r,o,a){return n.i(i.b)(this,void 0,void 0,function(){return n.i(i.c)(this,function(n){switch(n.label){case 0:return o?[4,this.generateFlatsRowHorisontal(t,e,r,a)]:[3,2];case 1:return[2,n.sent()];case 2:return[4,this.generateFlatsRowVertical(t,e,r)];case 3:return[2,n.sent()]}})})},e.prototype.generateFlatsRows=function(t,r,o,a){return n.i(i.b)(this,void 0,void 0,function(){var s,h,f,d,p,g,m,v,y;return n.i(i.c)(this,function(n){switch(n.label){case 0:s=l.a.clone(t),h=[],f=0,n.label=1;case 1:return f<r.length?[4,this.generateOneRow(s,r[f],o,a,this.calculateColumnWidth(r,o))]:[3,6];case 2:if(d=n.sent(),d.isEmpty)return[3,5];if(f!==r.length-1&&(s.yTop=d.yBot,d.addBrick(l.a.createRowlineFlat(s,this.controller))),h.push(d),s.yTop=d.yBot+e.GAP_BETWEEN_ROWS*this.controller.unitHeight,!("none"!==this.question.detailPanelMode&&f>0))return[3,5];for(p=this.question.detailPanelValue,g=0;g<p.questions.length;g++)p.questions[g].id+="_"+f;return[4,u.a.generateFlatsPanel(this.survey,this.controller,p,s)];case 3:return m=n.sent(),v=new c.a,v.addBrick.apply(v,m),s.yTop=v.yBot+e.GAP_BETWEEN_ROWS*this.controller.unitHeight,h.push(v),f!==r.length-1&&this.question.renderedTable.showHeader&&a?[4,this.generateOneRow(s,r[0],o,a,this.calculateColumnWidth(r,o))]:[3,5];case 4:y=n.sent(),s.yTop=y.yBot+e.GAP_BETWEEN_ROWS*this.controller.unitHeight,h.push(y),n.label=5;case 5:return f++,[3,1];case 6:return[2,h]}})})},e.prototype.generateFlatsContent=function(t){return n.i(i.b)(this,void 0,void 0,function(){var e,r,o,a,s,u;return n.i(i.c)(this,function(n){switch(n.label){case 0:return e=this.question.renderedTable,(r="vertical"===this.question.columnLayout,0===(o=e.rows[0]?e.rows[0].cells.length-(e.hasRemoveRows&&!r?"none"!==this.question.detailPanelMode?2:1:0):e.showHeader&&e.headerRow?e.headerRow.cells.length:e.showFooter&&e.footerRow?e.footerRow.cells.length:0))?[2,[new c.a(l.a.createRowlineFlat(t,this.controller))]]:(a=[],s=l.a.getColumnWidth(this.controller,o),u="list"!==this.question.renderAs&&"list"!==this.controller.matrixRenderAs&&s>=this.controller.measureText(l.a.MATRIX_COLUMN_WIDTH).width,e.showHeader&&u&&a.push(e.headerRow),a.push.apply(a,e.rows),e.hasRemoveRows&&r&&a.pop(),e.showFooter&&u&&a.push(e.footerRow),[4,this.generateFlatsRows(t,a,o,u)]);case 1:return[2,n.sent()]}})})},e.GAP_BETWEEN_ROWS=.5,e}(o.a);r.Serializer.removeProperty("matrixdropdown","renderAs"),r.Serializer.addProperty("matrixdropdown",{name:"renderAs",default:"auto",choices:["auto","list"]}),a.a.getInstance().register("matrixdropdown",h)},function(t,e,n){"use strict";var i=n(54),r=n.n(i),o=n(1);n.d(e,"a",function(){return a});var a=function(){function t(){}return t.findBotInterval=function(t,e,n,i){var r=t.search(e,n);return r.push({pageIndex:0,xLeft:i.margins.left,xRight:i.margins.left,yBot:i.margins.top,absBot:i.margins.top}),r.reduce(function(t,i){return Math.abs(i.xRight-e)<o.a.EPSILON||Math.abs(i.xLeft-n)<o.a.EPSILON?t:i.pageIndex<t.pageIndex?t:i.pageIndex>t.pageIndex?i:i.yBot>t.yBot?i:t},r[r.length-1])},t.addPack=function(t,e,n){for(var i=t.length;i<=e;i++)t.push([]);t[e].push(n)},t.pack=function(e,n){var i=n.paperHeight-n.margins.top-n.margins.bot,a=[];e.forEach(function(t){a.push([]),t.forEach(function(t){var e;t.height>i+o.a.EPSILON?(e=a[a.length-1]).push.apply(e,t.unfold()):a[a.length-1].push(t)})}),a.forEach(function(t){t.sort(function(t,e){return t.yTop<e.yTop?-1:t.yTop>e.yTop?1:t.xLeft>e.xLeft?1:t.xLeft<e.xLeft?-1:0})});var s=0,c=[],l=n.paperHeight-n.margins.bot;return a.forEach(function(e){var i=new r.a,a=0;e.forEach(function(e){var r=t.findBotInterval(i,e.xLeft,e.xRight,n),u=r.pageIndex,h=r.yBot,f=r.absBot,d=e.height;e.yTop=h+e.yTop-f,(Math.abs(e.yTop-n.margins.top)>o.a.EPSILON&&e.yTop+d>l+o.a.EPSILON||e.isPageBreak)&&(e.yTop=n.margins.top,u++,a=Math.max(a,u)),i.insert(e.xLeft,e.xRight,{pageIndex:u,xLeft:e.xLeft,xRight:e.xRight,yBot:e.yTop+d,absBot:e.yBot}),e.yBot=e.yTop+d,t.addPack(c,s+u,e)}),s+=a+1}),c},t}()},function(t,e,n){"use strict";var i=n(0),r=n(10);n.d(e,"a",function(){return o});var o=function(t){function e(e,n,i){return t.call(this,e,n,i,e.id,e.isReadOnly,e.checkedValue)||this}return n.i(i.a)(e,t),e}(r.a)},function(t,e,n){"use strict";var i=n(0),r=n(10);n.d(e,"a",function(){return o});var o=function(t){function e(e,n,i,r,o){return t.call(this,e,n,i,e.id+"index"+o,e.isReadOnly||!r.isEnabled,e.isItemSelected(r))||this}return n.i(i.a)(e,t),e}(r.a)},function(t,e,n){"use strict";var i=n(0),r=n(16);n.d(e,"a",function(){return o});var o=function(t){function e(e,n,i,r,o){void 0===o&&(o=0);var a=t.call(this,e,n,i,r,!0,o)||this;return a.controller=n,a}return n.i(i.a)(e,t),e}(r.a)},function(t,e,n){"use strict";var i=n(0),r=n(6),o=n(1);n.d(e,"a",function(){return a});var a=function(t){function e(e,n,i){var r=t.call(this,e,n,i)||this;return r.controller=n,r.question=e,r}return n.i(i.a)(e,t),e.prototype.renderInteractive=function(){return n.i(i.b)(this,void 0,void 0,function(){var t,e;return n.i(i.c)(this,function(n){return t=new this.controller.doc.AcroFormComboBox,t.fieldName=this.question.id,t.Rect=o.a.createAcroformRect(o.a.scaleRect(this,o.a.formScale(this.controller,this))),t.edit=!1,t.color=this.textColor,e=[],this.question.showOptionsCaption&&e.push(this.question.optionsCaption),this.question.visibleChoices.forEach(function(t){e.push(o.a.getLocString(t.locText))}),t.setOptions(e),t.fontName=this.controller.fontName,t.fontSize=this.fontSize,t.readOnly=this.question.isReadOnly,t.isUnicode=o.a.isCustomFont(this.controller,t.fontName),t.V=o.a.getDropdownQuestionValue(this.question),this.controller.doc.addField(t),o.a.renderFlatBorders(this.controller,this),[2]})})},e.prototype.renderReadOnly=function(){return n.i(i.b)(this,void 0,void 0,function(){return n.i(i.c)(this,function(t){switch(t.label){case 0:return this.controller.pushMargins(this.xLeft,this.controller.paperWidth-this.xRight),[4,o.a.renderReadOnlyTextField(this.controller,this.question,this,o.a.getDropdownQuestionValue(this.question),!(this.question.isReadOnly&&"multiLine"===this.controller.textFieldRenderAs))];case 1:return t.sent(),this.controller.popMargins(),[2]}})})},e}(r.a)},function(t,e,n){"use strict";var i=n(0),r=n(6),o=n(1);n.d(e,"a",function(){return a});var a=function(t){function e(e,n,i){void 0===n&&(n=null),void 0===i&&(i=!1);var r=t.call(this,null,n,e)||this;return r.controller=n,r.isBorderVisible=!1,r.isBorderVisible=i,r}return n.i(i.a)(e,t),e.prototype.resizeBorder=function(t){var e=t?1:-1,n=this.controller.doc.getFontSize()*o.a.VALUE_READONLY_PADDING_SCALE;this.xLeft-=e*n,this.xRight+=e*n,this.yBot+=e*n},e.prototype.renderInteractive=function(){return n.i(i.b)(this,void 0,void 0,function(){return n.i(i.c)(this,function(t){return this.isBorderVisible&&(this.resizeBorder(!0),o.a.renderFlatBorders(this.controller,this),this.resizeBorder(!1)),[2]})})},e}(r.a)},function(t,e,n){"use strict";var i=n(0),r=n(6);n.d(e,"a",function(){return o});var o=function(t){function e(e,n,i,r,o){void 0===o&&(o=!1);var a=t.call(this,e,n,i)||this;return a.html=r,a.margins=o?{top:0,bottom:0}:{top:n.margins.top,bottom:n.margins.bot},a}return n.i(i.a)(e,t),e.prototype.renderInteractive=function(){return n.i(i.b)(this,void 0,void 0,function(){var t,e=this;return n.i(i.c)(this,function(n){switch(n.label){case 0:return t=this.controller.fontSize,this.controller.fontSize=this.fontSize,[4,new Promise(function(t){e.controller.doc.fromHTML(e.html,e.xLeft,e.yTop,{width:e.width,pagesplit:!0},function(){[].slice.call(document.querySelectorAll("iframe")).forEach(function(t){0===t.name.lastIndexOf("jsPDFhtmlText",0)&&t.parentNode.removeChild(t)}),t()},e.margins)})];case 1:return n.sent(),this.controller.fontSize=t,[2]}})})},e}(r.a)},function(t,e,n){"use strict";var i=n(0),r=n(6);n.d(e,"a",function(){return o});var o=function(t){function e(e,n,i,r,o,a){var s=t.call(this,e,n,{xLeft:r.xLeft,xRight:r.xLeft+(o||0),yTop:r.yTop,yBot:r.yTop+(a||0)})||this;return s.image=i,s.originalWidth=o,s.originalHeight=a,s.isPageBreak=void 0===s.originalHeight,s}return n.i(i.a)(e,t),e.prototype.renderInteractive=function(){return n.i(i.b)(this,void 0,void 0,function(){var t=this;return n.i(i.c)(this,function(e){switch(e.label){case 0:return[4,new Promise(function(e){t.controller.doc.addImage(t.image,t.xLeft,t.yTop,t.originalWidth,t.originalHeight),e()})];case 1:return e.sent(),[2]}})})},e}(r.a)},function(t,e,n){"use strict";var i=n(0),r=n(4),o=n(1);n.d(e,"a",function(){return a});var a=function(t){function e(n,i){var r=t.call(this,n.question,n.controller,n,n.text)||this;return r.link=i,r.textColor=e.COLOR,r}return n.i(i.a)(e,t),e.prototype.renderInteractive=function(){return n.i(i.b)(this,void 0,void 0,function(){var r,a,s;return n.i(i.c)(this,function(n){switch(n.label){case 0:return r=this.controller.doc.getTextColor(),this.controller.doc.setTextColor(o.a.BACKGROUND_COLOR),a=this.controller.unitHeight*(this.controller.doc.getLineHeightFactor()-e.SCALE_FACTOR_MAGIC),s=this.yTop+(this.yBot-this.yTop)-a,this.controller.doc.textWithLink(this.text,this.xLeft,s,{url:this.link}),[4,t.prototype.renderInteractive.call(this)];case 1:return n.sent(),this.controller.doc.setTextColor(r),[2]}})})},e.prototype.renderReadOnly=function(){return n.i(i.b)(this,void 0,void 0,function(){return n.i(i.c)(this,function(e){switch(e.label){case 0:return"text"!==o.a.getReadonlyRenderAs(this.question,this.controller)?[2,this.renderInteractive()]:[4,t.prototype.renderInteractive.call(this)];case 1:return e.sent(),[2]}})})},e.SCALE_FACTOR_MAGIC=.955,e.COLOR="#0000EE",e}(r.a)},function(t,e,n){"use strict";var i=n(0),r=n(6),o=n(4),a=n(1);n.d(e,"b",function(){return s}),n.d(e,"a",function(){return c});var s=function(){function t(t,e,n){this.name=t,this.controller=e,this._readOnly=n}return t.prototype.addToPdf=function(t){this._radioGroup=new this.controller.doc.AcroFormRadioButton,this._radioGroup.fieldName=this.name,this._radioGroup.value="",this._radioGroup.readOnly=this.readOnly,this._radioGroup.color=t,this.controller.doc.addField(this._radioGroup)},Object.defineProperty(t.prototype,"radioGroup",{get:function(){return this._radioGroup},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"readOnly",{get:function(){return this._readOnly},enumerable:!1,configurable:!0}),t}(),c=function(t){function e(e,n,i,r,o,a){var s=t.call(this,e,n,i)||this;return s.index=r,s.checked=o,s.radioGroupWrap=a,s.textColor=s.formBorderColor,s}return n.i(i.a)(e,t),e.prototype.renderInteractive=function(){return n.i(i.b)(this,void 0,void 0,function(){var t,e,r;return n.i(i.c)(this,function(n){switch(n.label){case 0:return this.radioGroupWrap.readOnly&&"acroform"!==a.a.getReadonlyRenderAs(this.question,this.controller)?[4,this.renderReadOnly()]:[3,2];case 1:return[2,n.sent()];case 2:return 0==this.index&&this.radioGroupWrap.addToPdf(this.formBorderColor),t=this.radioGroupWrap.name+"index"+this.index,e=this.radioGroupWrap.radioGroup.createOption(t),e.Rect=a.a.createAcroformRect(this),this.checked?(e.AS="/"+t,this.radioGroupWrap.radioGroup.value=t):e.AS="/Off",r=a.a.formScale(this.controller,this),e.Rect=a.a.createAcroformRect(a.a.scaleRect(this,r)),e.color=this.formBorderColor,a.a.renderFlatBorders(this.controller,this),this.radioGroupWrap.radioGroup.setAppearance(this.controller.doc.AcroForm.Appearance.RadioButton.Circle),[2]}})})},e.prototype.renderReadOnly=function(){return n.i(i.b)(this,void 0,void 0,function(){var t,r,s,c;return n.i(i.c)(this,function(n){switch(n.label){case 0:return a.a.renderFlatBorders(this.controller,this),this.checked?(t=a.a.createPoint(this,!0,!0),r=this.controller.fontSize,this.controller.fontSize=r*e.RADIOMARKER_READONLY_FONT_SIZE_SCALE,s=this.controller.measureText(e.RADIOMARKER_READONLY_SYMBOL),t.xLeft+=this.width/2-s.width/2,t.yTop+=this.height/2-s.height/1.9,[4,a.a.createTextFlat(t,this.question,this.controller,e.RADIOMARKER_READONLY_SYMBOL,o.a)]):[3,3];case 1:return c=n.sent(),c.unfold()[0].textColor=this.textColor,this.controller.fontSize=r,[4,c.render()];case 2:n.sent(),n.label=3;case 3:return[2]}})})},e.RADIOMARKER_READONLY_SYMBOL="•",e.RADIOMARKER_READONLY_FONT_SIZE_SCALE=1.575,e}(r.a)},function(t,e,n){"use strict";var i=n(0),r=n(6),o=n(4),a=n(10),s=n(1);n.d(e,"a",function(){return c});var c=function(t){function e(e,n,i,r){var o=t.call(this,e,n,i)||this;return o.number=r,o.question=e,o.textColor=o.formBorderColor,o}return n.i(i.a)(e,t),e.prototype.renderInteractive=function(){return n.i(i.b)(this,void 0,void 0,function(){var t,e,r,c;return n.i(i.c)(this,function(n){switch(n.label){case 0:return s.a.renderFlatBorders(this.controller,this),t=s.a.createPoint(this,!0,!0),e=this.controller.fontSize,this.controller.fontSize=e*a.a.CHECKMARK_READONLY_FONT_SIZE_SCALE,r=this.controller.measureText(this.number),t.xLeft+=this.width/2-r.width/2,t.yTop+=this.height/2-r.height/2,[4,s.a.createTextFlat(t,this.question,this.controller,this.number,o.a)];case 1:return c=n.sent(),c.unfold()[0].textColor=this.textColor,this.controller.fontSize=e,[4,c.render()];case 2:return n.sent(),[2]}})})},e}(r.a)},function(t,e,n){"use strict";var i=n(0),r=n(12),o=n(1);n.d(e,"a",function(){return a});var a=function(t){function e(e,n,i,r){return t.call(this,e,n,i,r)||this}return n.i(i.a)(e,t),e.prototype.renderInteractive=function(){return n.i(i.b)(this,void 0,void 0,function(){var e;return n.i(i.c)(this,function(n){switch(n.label){case 0:return e=this.controller.fontSize,this.controller.fontSize=e*o.a.TITLE_PANEL_FONT_SIZE_SCALE,[4,t.prototype.renderInteractive.call(this)];case 1:return n.sent(),this.controller.fontSize=e,[2]}})})},e}(r.a)},function(t,e,n){"use strict";var i=n(0);n.d(e,"c",function(){return o}),n.d(e,"a",function(){return a}),n.d(e,"b",function(){return s});var r=function(){function t(t,e,n,i,r){this.point=t,this.bricks=e,this.controller=n,this.repository=i,this.module=r}return t}(),o=function(t){function e(e,n,i,r,o,a){var s=t.call(this,e,n,r,o,a)||this;return s.question=i,s}return n.i(i.a)(e,t),e}(r),a=function(t){function e(e,n,i,r,o,a){var s=t.call(this,e,n,r,o,a)||this;return s.panel=i,s}return n.i(i.a)(e,t),e}(r),s=function(t){function e(e,n,i,r,o,a){var s=t.call(this,e,n,r,o,a)||this;return s.page=i,s}return n.i(i.a)(e,t),e}(r)},function(t,e,n){"use strict";var i=n(0),r=n(3),o=n(2),a=n(4),s=n(23),c=n(5),l=n(1);n.d(e,"a",function(){return u});var u=function(t){function e(e,n,i){var r=t.call(this,e,n,i)||this;return r.survey=e,r.controller=i,r.question=n,r}return n.i(i.a)(e,t),e.prototype.generateFlatsContent=function(t){return n.i(i.b)(this,void 0,void 0,function(){var e,r,o,u,h,f,d;return n.i(i.c)(this,function(n){switch(n.label){case 0:return e=new c.a,(r=this.controller.unitHeight,o=new s.a(this.question,this.controller,l.a.moveRect(l.a.scaleRect(l.a.createRect(t,r,r),l.a.SELECT_ITEM_FLAT_SCALE),t.xLeft)),e.addBrick(o),u=l.a.clone(t),u.xLeft=o.xRight+this.controller.unitWidth*l.a.GAP_BETWEEN_ITEM_TEXT,null===(h=this.question.isIndeterminate?null:this.question.checkedValue?this.question.locLabelTrue:this.question.locLabelFalse)||null===h.renderedHtml)?[3,2]:(d=(f=e).addBrick,[4,l.a.createTextFlat(u,this.question,this.controller,h,a.a)]);case 1:d.apply(f,[n.sent()]),n.label=2;case 2:return[2,[e]]}})})},e}(r.a);o.a.getInstance().register("boolean",u)},function(t,e,n){"use strict";var i=n(0),r=n(14),o=n(2),a=n(24);n.d(e,"a",function(){return s});var s=function(t){function e(e,n,i){var r=t.call(this,e,n,i)||this;return r.survey=e,r.controller=i,r.question=n,r}return n.i(i.a)(e,t),e.prototype.generateFlatItem=function(t,e,n){return new a.a(this.question,this.controller,t,e,n)},e}(r.a);o.a.getInstance().register("checkbox",s)},function(t,e,n){"use strict";var i=n(0),r=n(3),o=n(2),a=n(1);n.d(e,"a",function(){return s});var s=function(t){function e(e,n,i){var r=t.call(this,e,n,i)||this;return r.survey=e,r.controller=i,r.question=n,r}return n.i(i.a)(e,t),e.prototype.generateFlatsContent=function(t){return n.i(i.b)(this,void 0,void 0,function(){return n.i(i.c)(this,function(e){switch(e.label){case 0:return[4,a.a.createCommentFlat(t,this.question,this.controller,this.question.rows,!0)];case 1:return[2,[e.sent()]]}})})},e}(r.a);o.a.getInstance().register("comment",s)},function(t,e,n){"use strict";var i=n(0),r=n(3),o=n(2),a=n(26),s=n(5),c=n(1);n.d(e,"a",function(){return l});var l=function(t){function e(e,n,i){var r=t.call(this,e,n,i)||this;return r.survey=e,r.controller=i,r.question=n,r}return n.i(i.a)(e,t),e.prototype.generateFlatsContent=function(t){return n.i(i.b)(this,void 0,void 0,function(){var e,r,o,l,u,h;return n.i(i.c)(this,function(n){switch(n.label){case 0:return e=c.a.createTextFieldRect(t,this.controller),this.question.isReadOnly&&"multiLine"===this.controller.textFieldRenderAs?[4,c.a.createReadOnlyTextFieldTextFlat(t,this.controller,this.question,c.a.getDropdownQuestionValue(this.question),!1)]:[3,2];case 1:r=n.sent(),e.yBot=Math.max(e.yBot,r.yBot+this.controller.unitHeight*c.a.VALUE_READONLY_PADDING_SCALE),n.label=2;case 2:return o=new s.a(new a.a(this.question,this.controller,e)),this.question.isOtherSelected?(l=c.a.createPoint(o),l.yTop+=this.controller.unitHeight*c.a.GAP_BETWEEN_ROWS,h=(u=o).addBrick,[4,c.a.createCommentFlat(l,this.question,this.controller,c.a.OTHER_ROWS_COUNT,!1)]):[3,4];case 3:h.apply(u,[n.sent()]),n.label=4;case 4:return[2,[o]]}})})},e}(r.a);o.a.getInstance().register("dropdown",l)},function(t,e,n){"use strict";var i=n(0),r=n(3),o=n(2),a=n(17),s=n(1);n.d(e,"a",function(){return c});var c=function(t){function e(e,n,i){var r=t.call(this,e,n,i)||this;return r.survey=e,r.question=n,r}return n.i(i.a)(e,t),e.prototype.generateFlatsContent=function(t){return n.i(i.b)(this,void 0,void 0,function(){var e;return n.i(i.c)(this,function(n){return e=s.a.createTextFieldRect(t,this.controller),[2,[new a.a(this.question,this.controller,e,!0,this.question.id,this.question.displayValue,"",!0,!1,"text")]]})})},e}(r.a);o.a.getInstance().register("expression",c)},function(t,e,n){"use strict";var i=n(0),r=n(7),o=(n.n(r),n(3)),a=n(2),s=n(4),c=n(5),l=n(1);n.d(e,"a",function(){return u});var u=function(t){function e(e,n,i){var r=t.call(this,e,n,i)||this;return r.survey=e,r.question=n,r}return n.i(i.a)(e,t),e.prototype.generateFlatItem=function(t,r){return n.i(i.b)(this,void 0,void 0,function(){var o,a,s,u,h,f;return n.i(i.c)(this,function(n){switch(n.label){case 0:return a=c.a.bind,[4,l.a.createLinkFlat(t,this.question,this.controller,void 0===r.name?"image":r.name,r.content)];case 1:return o=new(a.apply(c.a,[void 0,n.sent()])),l.a.canPreviewImage(this.question,r,r.content)?[4,l.a.getImageSize(r.content)]:[3,4];case 2:return s=n.sent(),this.question.imageWidth&&(s.width=l.a.parseWidth(this.question.imageWidth,l.a.getPageAvailableWidth(this.controller))),this.question.imageHeight&&(s.height=l.a.parseWidth(this.question.imageHeight,l.a.getPageAvailableWidth(this.controller))),u=l.a.createPoint(o),u.yTop+=this.controller.unitHeight*e.IMAGE_GAP_SCALE,f=(h=o).addBrick,[4,l.a.createImageFlat(u,this.question,this.controller,r.content,s.width,s.height)];case 3:f.apply(h,[n.sent()]),n.label=4;case 4:return[2,o]}})})},e.prototype.addLine=function(t,e,n){n!==this.question.previewValue.length-1&&(t[t.length-1].addBrick(l.a.createRowlineFlat(e,this.controller)),e.yTop+=l.a.EPSILON,t.push(new c.a))},e.prototype.generateFlatsContent=function(t){return n.i(i.b)(this,void 0,void 0,function(){var o,a,u,h,f,d,p,g,m,m;return n.i(i.c)(this,function(n){switch(n.label){case 0:return 0!==this.question.previewValue.length?[3,2]:[4,l.a.createTextFlat(t,this.question,this.controller,r.surveyLocalization.getString("noFileChosen"),s.a)];case 1:return[2,[n.sent()]];case 2:o=[new c.a],a=l.a.clone(t),u=a.yTop,h=0,n.label=3;case 3:return h<this.question.previewValue.length?(f=this.question.previewValue[h],d=this.controller.paperWidth-this.controller.margins.right-a.xLeft,l.a.canPreviewImage(this.question,f,f.content)?[4,l.a.getImageSize(f.content)]:[3,6]):[3,10];case 4:return p=n.sent().width,void 0===p&&(p=this.question.imageWidth?l.a.parseWidth(this.question.imageWidth,l.a.getPageAvailableWidth(this.controller)):0),g=Math.max(p,e.TEXT_MIN_SCALE*this.controller.unitWidth),d<g&&(a.xLeft=t.xLeft,a.yTop=u,this.addLine(o,a,h)),this.controller.pushMargins(a.xLeft,this.controller.paperWidth-a.xLeft-g),[4,this.generateFlatItem(a,f)];case 5:return m=n.sent(),o[o.length-1].addBrick(m),a.xLeft+=m.width,u=Math.max(u,m.yBot),this.controller.popMargins(),[3,8];case 6:return d<this.controller.unitWidth&&(a.xLeft=t.xLeft,a.yTop=u,this.addLine(o,a,h)),[4,this.generateFlatItem(a,f)];case 7:m=n.sent(),o[o.length-1].addBrick(m),a.xLeft+=m.xRight-m.xLeft,u=Math.max(u,m.yBot),n.label=8;case 8:a.xLeft+=this.controller.unitWidth,n.label=9;case 9:return h++,[3,3];case 10:return[2,o]}})})},e.IMAGE_GAP_SCALE=.195,e.TEXT_MIN_SCALE=5,e}(o.a);a.a.getInstance().register("file",u)},function(t,e,n){"use strict";var i=n(0),r=n(7),o=(n.n(r),n(3)),a=n(2),s=n(1);n.d(e,"a",function(){return c});var c=function(t){function e(e,n,i){var r=t.call(this,e,n,i)||this;return r.survey=e,r}return n.i(i.a)(e,t),e.prototype.chooseRender=function(t){return/<[^>]*style[^<]*>/.test(t)||/<[^>]*table[^<]*>/.test(t)||/&\w+;/.test(t)?"image":"standard"},e.prototype.generateFlatsContent=function(t){return n.i(i.b)(this,void 0,void 0,function(){var e,r,o,a,c,l,u,h,f,d;return n.i(i.c)(this,function(n){switch(n.label){case 0:return e=this.question.renderAs,("auto"===e&&(e=this.controller.htmlRenderAs),"auto"===e&&(e=this.chooseRender(s.a.getLocString(this.question.locHtml))),r=s.a.createHtmlContainerBlock(s.a.getLocString(this.question.locHtml),this.controller,e),"image"!==e)?[3,3]:(o=s.a.getPageAvailableWidth(this.controller),[4,s.a.htmlToImage(r,o,this.controller)]);case 1:return a=n.sent(),c=a.url,l=a.aspect,u=o/l,[4,s.a.createImageFlat(t,this.question,this.controller,c,o,u)];case 2:return[2,[n.sent()]];case 3:return f=(h=s.a).splitHtmlRect,d=[this.controller],[4,s.a.createHTMLFlat(t,this.question,this.controller,r)];case 4:return[2,[f.apply(h,d.concat([n.sent()]))]]}})})},e}(o.a);r.Serializer.removeProperty("html","renderAs"),r.Serializer.addProperty("html",{name:"renderAs",default:"auto",choices:["auto","standard","image"]}),a.a.getInstance().register("html",c)},function(t,e,n){"use strict";var i=n(0),r=n(3),o=n(2),a=n(1);n.d(e,"a",function(){return s});var s=function(t){function e(e,n,i){var r=t.call(this,e,n,i)||this;return r.survey=e,r.question=n,r}return n.i(i.a)(e,t),e.prototype.generateFlatsContent=function(t){return n.i(i.b)(this,void 0,void 0,function(){var e,r;return n.i(i.c)(this,function(n){switch(n.label){case 0:return e=a.a.pxToPt(this.question.imageWidth),r=a.a.pxToPt(this.question.imageHeight),[4,a.a.createImageFlat(t,this.question,this.controller,this.question.imageLink,e,r)];case 1:return[2,[n.sent()]]}})})},e}(r.a);o.a.getInstance().register("image",s)},function(t,e,n){"use strict";var i=n(0),r=n(3),o=n(2),a=n(4),s=n(11),c=n(10),l=n(5),u=n(1);n.d(e,"a",function(){return h});var h=function(t){function e(e,n,i){var r=t.call(this,e,n,i)||this;return r.survey=e,r.question=n,r}return n.i(i.a)(e,t),e.prototype.generateFlatItem=function(t,e,r){return n.i(i.b)(this,void 0,void 0,function(){var o,s,h,f,d,p,g;return n.i(i.c)(this,function(n){switch(n.label){case 0:return o=u.a.getPageAvailableWidth(this.controller),[4,u.a.createImageFlat(t,this.question,this.controller,e.imageLink,o,o/u.a.IMAGEPICKER_RATIO)];case 1:return s=n.sent(),h=new l.a(s),f=u.a.createPoint(h),this.question.showLabel?[4,u.a.createTextFlat(f,this.question,this.controller,e.text||e.value,a.a)]:[3,3];case 2:d=n.sent(),h.addBrick(d),f=u.a.createPoint(d),n.label=3;case 3:return p=this.controller.unitHeight,g=u.a.createRect(f,o,p),this.question.multiSelect?h.addBrick(new c.a(this.question,this.controller,g,this.question.id+"index"+r,this.question.isReadOnly||!e.isEnabled,-1!==this.question.value.indexOf(e.value))):h.addBrick(this.radio.generateFlatItem(g,e,r)),[2,h]}})})},e.prototype.generateFlatsContent=function(t){return n.i(i.b)(this,void 0,void 0,function(){var e,r,o,a,c,h,f,d,p,g,m,v;return n.i(i.c)(this,function(n){switch(n.label){case 0:this.radio=this.question.multiSelect?null:new s.a(this.survey,this.question,this.controller),e=[new l.a],r=u.a.getImagePickerAvailableWidth(this.controller)/u.a.IMAGEPICKER_COUNT,o=~~(u.a.getPageAvailableWidth(this.controller)/r)||1,a=this.question.visibleChoices.length,o=o<=a?o:a,c=~~Math.ceil(a/o),h=u.a.clone(t),f=0,n.label=1;case 1:if(!(f<c))return[3,7];d=h.yTop,this.controller.pushMargins(),p=this.controller.margins.left,g=0,n.label=2;case 2:return g<o?(m=f*o+g)==a?[3,5]:(this.controller.margins.left=p,this.controller.margins.right=this.controller.paperWidth-p-r,p=this.controller.paperWidth-this.controller.margins.right+this.controller.unitWidth,h.xLeft=this.controller.margins.left,[4,this.generateFlatItem(h,this.question.visibleChoices[m],m)]):[3,5];case 3:v=n.sent(),e[e.length-1].addBrick(v),d=Math.max(d,v.yBot),n.label=4;case 4:return g++,[3,2];case 5:this.controller.popMargins(),h.xLeft=t.xLeft,h.yTop=d,f!==c-1&&(e[e.length-1].addBrick(u.a.createRowlineFlat(h,this.controller)),h.yTop+=u.a.EPSILON,e.push(new l.a)),n.label=6;case 6:return f++,[3,1];case 7:return[2,e]}})})},e}(r.a);o.a.getInstance().register("imagepicker",h)},function(t,e,n){"use strict";var i=n(0),r=n(7),o=(n.n(r),n(3)),a=n(11),s=n(2),c=n(4),l=n(5),u=n(1);n.d(e,"a",function(){return h});var h=function(t){function e(e,n,i){var r=t.call(this,e,n,i)||this;return r.survey=e,r.controller=i,r.question=n,r}return n.i(i.a)(e,t),e.prototype.generateFlatsHeader=function(t){return n.i(i.b)(this,void 0,void 0,function(){var e,r,o,a,s,c,h,f;return n.i(i.c)(this,function(d){switch(d.label){case 0:e=[],r=u.a.clone(t),o=this.question.visibleColumns.length+(this.question.hasRows?1:0),a=0,d.label=1;case 1:return a<this.question.visibleColumns.length?(s=this.question.hasRows?a+1:a,this.controller.pushMargins(),u.a.setColumnMargins(this.controller,o,s),r.xLeft=this.controller.margins.left,h=(c=e).push,[4,u.a.createBoldTextFlat(r,this.question,this.controller,this.question.visibleColumns[a].locText)]):[3,4];case 2:h.apply(c,[d.sent()]),this.controller.popMargins(),d.label=3;case 3:return a++,[3,1];case 4:return f=new(l.a.bind.apply(l.a,n.i(i.d)([void 0],e,!1))),[2,[f,u.a.createRowlineFlat(u.a.createPoint(f),this.controller)]]}})})},e.prototype.generateFlatsRows=function(t,r){return n.i(i.b)(this,void 0,void 0,function(){var o,a,s,c,l;return n.i(i.c)(this,function(n){switch(n.label){case 0:o=[],a=u.a.clone(t),s=0,n.label=1;case 1:return s<this.question.visibleRows.length?(c="row"+s,[4,new f(this.survey,this.question,this.controller,this.question.visibleRows[s],c,0==s,r).generateFlatsContent(a)]):[3,4];case 2:l=n.sent(),a=u.a.createPoint(u.a.mergeRects.apply(u.a,l)),a.yTop+=this.controller.unitHeight*e.GAP_BETWEEN_ROWS,o.push.apply(o,l),n.label=3;case 3:return s++,[3,1];case 4:return[2,o]}})})},e.prototype.generateFlatsContent=function(t){return n.i(i.b)(this,void 0,void 0,function(){var r,o,a,s,c,l,h,f;return n.i(i.c)(this,function(n){switch(n.label){case 0:return r=u.a.getColumnWidth(this.controller,this.question.visibleColumns.length+(this.question.hasRows?1:0)),o="list"===this.question.renderAs||"list"===this.controller.matrixRenderAs||r<this.controller.measureText(u.a.MATRIX_COLUMN_WIDTH).width,a=u.a.clone(t),s=[],o||!this.question.showHeader||0==this.question.visibleColumns.length?[3,2]:[4,this.generateFlatsHeader(a)];case 1:c=n.sent(),a=u.a.createPoint(u.a.mergeRects.apply(u.a,c)),a.yTop+=e.GAP_BETWEEN_ROWS*this.controller.unitHeight,s.push.apply(s,c),n.label=2;case 2:return h=(l=s.push).apply,f=[s],[4,this.generateFlatsRows(a,o)];case 3:return h.apply(l,f.concat([n.sent()])),[2,s]}})})},e.GAP_BETWEEN_ROWS=.5,e}(o.a),f=function(t){function e(e,n,i,r,o,a,s){void 0===a&&(a=!1),void 0===s&&(s=!1);var c=t.call(this,e,n,i)||this;return c.survey=e,c.controller=i,c.row=r,c.key=o,c.isFirst=a,c.isVertical=s,c.questionMatrix=n,c}return n.i(i.a)(e,t),e.prototype.generateFlatsContent=function(t){return n.i(i.b)(this,void 0,void 0,function(){var e;return n.i(i.c)(this,function(n){switch(n.label){case 0:return this.isVertical?[4,this.generateFlatsVerticallyCells(t)]:[3,2];case 1:return e=n.sent(),[3,4];case 2:return[4,this.generateFlatsHorizontallyCells(t)];case 3:e=n.sent(),n.label=4;case 4:return[2,e]}})})},e.prototype.generateTextComposite=function(t,e,r){return n.i(i.b)(this,void 0,void 0,function(){var o,a,s,h,f;return n.i(i.c)(this,function(n){switch(n.label){case 0:return o=u.a.clone(t),a=this.row.value==e.value,s=u.a.createRect(o,u.a.getPageAvailableWidth(this.controller),this.controller.unitHeight),h=this.generateFlatItem(s,e,r,this.key,a),o.yTop=h.yBot+this.controller.unitHeight*u.a.GAP_BETWEEN_ITEM_TEXT,[4,u.a.createTextFlat(o,this.questionMatrix,this.controller,this.questionMatrix.getCellDisplayLocText(this.row.name,e),c.a)];case 1:return f=n.sent(),[2,new l.a(h,f)]}})})},e.prototype.generateItemCompoiste=function(t,e,r){return n.i(i.b)(this,void 0,void 0,function(){var o,a,s,h,f;return n.i(i.c)(this,function(n){switch(n.label){case 0:return o=u.a.clone(t),a=this.row.value==e.value,s=u.a.createRect(o,this.controller.unitHeight,this.controller.unitHeight),h=this.generateFlatItem(u.a.moveRect(u.a.scaleRect(s,u.a.SELECT_ITEM_FLAT_SCALE),s.xLeft),e,r,this.key,a),o.xLeft=h.xRight+this.controller.unitWidth*u.a.GAP_BETWEEN_ITEM_TEXT,[4,u.a.createTextFlat(o,this.questionMatrix,this.controller,e.locText,c.a)];case 1:return f=n.sent(),[2,new l.a(h,f)]}})})},e.prototype.generateFlatsHorizontallyCells=function(t){return n.i(i.b)(this,void 0,void 0,function(){var e,r,o,a,s,h,f,d,p,g,m,v,y;return n.i(i.c)(this,function(b){switch(b.label){case 0:return e=[],(r=u.a.clone(t),o=this.questionMatrix.visibleColumns.length+(this.questionMatrix.hasRows?1:0),this.questionMatrix.hasRows)?(this.controller.pushMargins(),u.a.setColumnMargins(this.controller,o,0),r.xLeft=this.controller.margins.left,s=(a=e).push,[4,u.a.createTextFlat(r,this.questionMatrix,this.controller,this.row.locText,c.a)]):[3,2];case 1:s.apply(a,[b.sent()]),this.controller.popMargins(),b.label=2;case 2:h=0,b.label=3;case 3:return h<this.questionMatrix.visibleColumns.length?(f=this.questionMatrix.visibleColumns[h],d=this.row.value==f.value,p=this.questionMatrix.hasRows?h+1:h,this.controller.pushMargins(),u.a.setColumnMargins(this.controller,o,p),r.xLeft=this.controller.margins.left,this.questionMatrix.hasCellText?(m=(g=e).push,[4,this.generateTextComposite(r,f,h)]):[3,5]):[3,8];case 4:return m.apply(g,[b.sent()]),[3,6];case 5:v=u.a.createRect(r,this.controller.unitHeight,this.controller.unitHeight),e.push(this.generateFlatItem(u.a.moveRect(u.a.scaleRect(v,u.a.SELECT_ITEM_FLAT_SCALE),r.xLeft),f,h,this.key,d)),b.label=6;case 6:this.controller.popMargins(),b.label=7;case 7:return h++,[3,3];case 8:return y=new(l.a.bind.apply(l.a,n.i(i.d)([void 0],e,!1))),[2,[y,u.a.createRowlineFlat(u.a.createPoint(y),this.controller)]]}})})},e.prototype.generateFlatsVerticallyCells=function(t){return n.i(i.b)(this,void 0,void 0,function(){var e,r,a,s,h,f,d;return n.i(i.c)(this,function(p){switch(p.label){case 0:return e=[],r=u.a.clone(t),this.questionMatrix.hasRows?[4,u.a.createTextFlat(r,this.questionMatrix,this.controller,this.row.locText,c.a)]:[3,2];case 1:a=p.sent(),r.yTop=a.yBot+o.a.CONTENT_GAP_VERT_SCALE*this.controller.unitHeight,e.push(a),p.label=2;case 2:return this.generateFlatComposite=this.questionMatrix.hasCellText?this.generateTextComposite:this.generateItemCompoiste,h=(s=e.push).apply,f=[e],[4,this.generateVerticallyItems(r,this.questionMatrix.visibleColumns)];case 3:return h.apply(s,f.concat([p.sent()])),d=new(l.a.bind.apply(l.a,n.i(i.d)([void 0],e,!1))),[2,[d,u.a.createRowlineFlat(u.a.createPoint(d),this.controller)]]}})})},e}(a.a);r.Serializer.removeProperty("matrix","renderAs"),r.Serializer.addProperty("matrix",{name:"renderAs",default:"auto",choices:["auto","list"]}),s.a.getInstance().register("matrix",h)},function(t,e,n){"use strict";var i=n(0),r=n(7),o=(n.n(r),n(2)),a=n(21);n.d(e,"a",function(){return s});var s=function(t){function e(e,n,i){var r=t.call(this,e,n,i,!1)||this;return r.survey=e,r}return n.i(i.a)(e,t),e}(a.a);r.Serializer.removeProperty("matrixdynamic","renderAs"),r.Serializer.addProperty("matrixdynamic",{name:"renderAs",default:"auto",choices:["auto","list"]}),o.a.getInstance().register("matrixdynamic",s)},function(t,e,n){"use strict";var i=n(0),r=n(3),o=n(2),a=n(5),s=n(1);n.d(e,"a",function(){return c});var c=function(t){function e(e,n,i){var r=t.call(this,e,n,i)||this;return r.survey=e,r.controller=i,r.question=n,r}return n.i(i.a)(e,t),e.prototype.generateFlatItem=function(t,e,r,c){return n.i(i.b)(this,void 0,void 0,function(){var e,r,l,u,h,f,d,p;return n.i(i.c)(this,function(n){switch(n.label){case 0:return e=s.a.getPageAvailableWidth(this.controller),this.controller.pushMargins(),this.controller.margins.right=this.controller.paperWidth-this.controller.margins.left-e*s.a.MULTIPLETEXT_TEXT_PERS,l=a.a.bind,[4,s.a.createBoldTextFlat(t,this.question,this.controller,c.locTitle)];case 1:return r=new(l.apply(a.a,[void 0,n.sent()])),this.controller.popMargins(),u=o.a.getInstance().create(this.survey,c.editor,this.controller,"text"),h=s.a.createTextFieldRect({xLeft:t.xLeft+e*s.a.MULTIPLETEXT_TEXT_PERS,yTop:t.yTop},this.controller),d=(f=r.addBrick).apply,p=[r],[4,u.generateFlatsContent(h)];case 2:return d.apply(f,p.concat([n.sent()])),[2,r]}})})},e.prototype.generateFlatsContent=function(t){return n.i(i.b)(this,void 0,void 0,function(){var r,o,c,l,u,h,f;return n.i(i.c)(this,function(n){switch(n.label){case 0:r=[],o=s.a.clone(t),c=this.question.getRows(),l=0,n.label=1;case 1:if(!(l<c.length))return[3,7];r.push(new a.a),u=o.yTop,this.controller.pushMargins(),h=0,n.label=2;case 2:return h<c[l].length?(this.controller.pushMargins(),s.a.setColumnMargins(this.controller,this.question.colCount,h),o.xLeft=this.controller.margins.left,[4,this.generateFlatItem(o,l,h,c[l][h])]):[3,5];case 3:f=n.sent(),r[r.length-1].addBrick(f),u=Math.max(u,f.yBot),this.controller.popMargins(),n.label=4;case 4:return h++,[3,2];case 5:this.controller.popMargins(),o.xLeft=t.xLeft,o.yTop=u,r[r.length-1].addBrick(s.a.createRowlineFlat(o,this.controller)),o.yTop+=s.a.EPSILON,o.yTop+=this.controller.unitHeight*e.ROWS_GAP_SCALE,n.label=6;case 6:return l++,[3,1];case 7:return[2,r]}})})},e.ROWS_GAP_SCALE=.195,e}(r.a);o.a.getInstance().register("multipletext",c)},function(t,e,n){"use strict";var i=n(0),r=n(9),o=n(3),a=n(2),s=n(1);n.d(e,"a",function(){return c});var c=function(t){function e(e,n,i){var r=t.call(this,e,n,i)||this;return r.survey=e,r.controller=i,r.question=n,r}return n.i(i.a)(e,t),e.prototype.generateFlatsContent=function(t){return n.i(i.b)(this,void 0,void 0,function(){var o,a,c,l,u,h;return n.i(i.c)(this,function(n){switch(n.label){case 0:o=[],a=s.a.clone(t),c=0,l=this.question.panels,n.label=1;case 1:return c<l.length?(u=l[c],[4,r.a.generateFlatsPanel(this.survey,this.controller,u,a)]):[3,4];case 2:h=n.sent(),0!==h.length&&(a.yTop=s.a.mergeRects.apply(s.a,h).yBot,a.yTop+=this.controller.unitHeight*e.GAP_BETWEEN_PANELS,o.push.apply(o,h)),n.label=3;case 3:return c++,[3,1];case 4:return[2,o]}})})},e.GAP_BETWEEN_PANELS=.75,e}(o.a);a.a.getInstance().register("paneldynamic",c)},function(t,e,n){"use strict";var i=n(0),r=n(3),o=n(2),a=n(4),s=n(32),c=n(5),l=n(1);n.d(e,"a",function(){return u});var u=function(t){function e(e,n,i){var r=t.call(this,e,n,i)||this;return r.survey=e,r.controller=i,r.question=n,r}return n.i(i.a)(e,t),e.prototype.generateFlatComposite=function(t,e,r){return n.i(i.b)(this,void 0,void 0,function(){var o,u,h,f,d;return n.i(i.c)(this,function(n){switch(n.label){case 0:return o=l.a.createRect(t,this.controller.unitWidth,this.controller.unitHeight),u=l.a.moveRect(l.a.scaleRect(o,l.a.SELECT_ITEM_FLAT_SCALE),t.xLeft),h=new s.a(this.question,this.controller,u,this.question.getNumberByIndex(r)),f=l.a.clone(t),f.xLeft=h.xRight+this.controller.unitWidth*l.a.GAP_BETWEEN_ITEM_TEXT,[4,l.a.createTextFlat(f,this.question,this.controller,e.locText,a.a)];case 1:return d=n.sent(),[2,new c.a(h,d)]}})})},e.prototype.generateFlatsContent=function(t){return n.i(i.b)(this,void 0,void 0,function(){var e,r,o,a;return n.i(i.c)(this,function(n){switch(n.label){case 0:e=l.a.clone(t),r=[],o=0,n.label=1;case 1:return o<this.question.rankingChoices.length?[4,this.generateFlatComposite(e,this.question.rankingChoices[o],o)]:[3,4];case 2:a=n.sent(),e.yTop=a.yBot+l.a.GAP_BETWEEN_ROWS*this.controller.unitHeight,r.push(a),n.label=3;case 3:return o++,[3,1];case 4:return[2,r]}})})},e}(r.a);o.a.getInstance().register("ranking",u)},function(t,e,n){"use strict";var i=n(0),r=n(11),o=n(2),a=n(4),s=n(5),c=n(1);n.d(e,"a",function(){return l});var l=function(t){function e(e,n,i){var r=t.call(this,e,n,i)||this;return r.survey=e,r.controller=i,r.questionRating=n,r}return n.i(i.a)(e,t),e.prototype.generateFlatHorisontalComposite=function(t,e,r){return n.i(i.b)(this,void 0,void 0,function(){var o,a,l,u,h,f,d;return n.i(i.c)(this,function(n){switch(n.label){case 0:return o=c.a.getRatingItemText(this.questionRating,r,e.locText),this.controller.pushMargins(),a=this.controller.unitWidth/2,this.controller.margins.left+=a,this.controller.margins.right+=a,l=c.a.clone(t),l.xLeft+=a,h=s.a.bind,[4,c.a.createBoldTextFlat(l,this.questionRating,this.controller,o)];case 1:return u=new(h.apply(s.a,[void 0,n.sent()])),this.controller.popMargins(),f=u.width,f<c.a.getRatingMinWidth(this.controller)?(u.xLeft+=(c.a.getRatingMinWidth(this.controller)-f)/2-a,f=c.a.getRatingMinWidth(this.controller)):f+=this.controller.unitWidth,d=c.a.createPoint(u),d.xLeft=t.xLeft,u.addBrick(this.generateFlatItem(c.a.createRect(d,f,this.controller.unitHeight),e,r)),[2,u]}})})},e.prototype.generateFlatComposite=function(t,e,r){return n.i(i.b)(this,void 0,void 0,function(){var o,l,u,h,f,d,p,g;return n.i(i.c)(this,function(n){switch(n.label){case 0:return o=new s.a,(l=c.a.createRect(t,this.controller.unitHeight,this.controller.unitHeight),u=this.generateFlatItem(c.a.moveRect(c.a.scaleRect(l,c.a.SELECT_ITEM_FLAT_SCALE),t.xLeft),e,r),o.addBrick(u),h=c.a.clone(t),h.xLeft=u.xRight+this.controller.unitWidth*c.a.GAP_BETWEEN_ITEM_TEXT,f=c.a.getRatingItemText(this.questionRating,r,e.locText),d=null==f)?[3,2]:(g=(p=o).addBrick,[4,c.a.createTextFlat(h,this.question,this.controller,f,a.a)]);case 1:d=g.apply(p,[n.sent()]),n.label=2;case 2:return[2,o]}})})},e.prototype.generateHorisontallyItems=function(t){return n.i(i.b)(this,void 0,void 0,function(){var e,r,o,a,l;return n.i(i.c)(this,function(n){switch(n.label){case 0:e=[new s.a],r=c.a.clone(t),o=0,n.label=1;case 1:return o<this.questionRating.visibleRateValues.length?[4,this.generateFlatHorisontalComposite(r,this.questionRating.visibleRateValues[o],o)]:[3,4];case 2:a=n.sent(),e[e.length-1].addBrick(a),l=this.controller.paperWidth-this.controller.margins.right-a.xRight,c.a.getRatingMinWidth(this.controller)<=l+c.a.EPSILON?r.xLeft=a.xRight:(r.xLeft=t.xLeft,r.yTop=a.yBot,o!==this.questionRating.visibleRateValues.length-1&&(e[e.length-1].addBrick(c.a.createRowlineFlat(r,this.controller)),r.yTop+=c.a.EPSILON,e.push(new s.a))),n.label=3;case 3:return o++,[3,1];case 4:return[2,e]}})})},e.prototype.generateFlatsContent=function(t){return n.i(i.b)(this,void 0,void 0,function(){var e,r,o;return n.i(i.c)(this,function(n){for(e=!1,r=0;r<this.questionRating.visibleRateValues.length;r++)o=c.a.getRatingItemText(this.questionRating,r,this.questionRating.visibleRateValues[r].locText),this.controller.measureText(o).width>this.controller.measureText(c.a.RATING_COLUMN_WIDTH).width&&(e=!0);return[2,e?this.generateVerticallyItems(t,this.questionRating.visibleRateValues):this.generateHorisontallyItems(t)]})})},e}(r.a);o.a.getInstance().register("rating",l)},function(t,e,n){"use strict";var i=n(0),r=n(3),o=n(2),a=n(1);n.d(e,"a",function(){return s});var s=function(t){function e(e,n,i){var r=t.call(this,e,n,i)||this;return r.survey=e,r.question=n,r}return n.i(i.a)(e,t),e.prototype.generateFlatsContent=function(t){return n.i(i.b)(this,void 0,void 0,function(){var e;return n.i(i.c)(this,function(n){switch(n.label){case 0:return[4,a.a.createImageFlat(t,this.question,this.controller,this.question.value,a.a.pxToPt(this.question.width),a.a.pxToPt(this.question.height))];case 1:return e=n.sent(),[2,[e]]}})})},e}(r.a);o.a.getInstance().register("signaturepad",s)},function(t,e,n){"use strict";var i=n(0),r=n(3),o=n(2),a=n(16),s=n(1);n.d(e,"a",function(){return c});var c=function(t){function e(e,n,i){var r=t.call(this,e,n,i)||this;return r.survey=e,r.question=n,r}return n.i(i.a)(e,t),e.prototype.generateFlatsContent=function(t){return n.i(i.b)(this,void 0,void 0,function(){var r;return n.i(i.c)(this,function(n){switch(n.label){case 0:return"singleLine"===this.controller.textFieldRenderAs?(r=s.a.createTextFieldRect(t,this.controller),[2,[new a.a(this.question,this.controller,r)]]):[4,s.a.createCommentFlat(t,this.question,this.controller,e.MULTILINE_TEXT_ROWS_COUNT,!0)];case 1:return[2,[n.sent()]]}})})},e.MULTILINE_TEXT_ROWS_COUNT=1,e}(r.a);o.a.getInstance().register("text",c)},function(t,e,n){"use strict";var i=n(0),r=n(6);n.d(e,"a",function(){return o});var o=function(t){function e(e,n,i){var r=t.call(this,e,n,i(n.helperDoc,e,0,0))||this;return r.renderFunc=i,r}return n.i(i.a)(e,t),e.prototype.renderInteractive=function(){return n.i(i.b)(this,void 0,void 0,function(){var t=this;return n.i(i.c)(this,function(e){switch(e.label){case 0:return[4,new Promise(function(e){t.renderFunc(t.controller.doc,t.question,t.xLeft,t.yTop),e()})];case 1:return e.sent(),[2]}})})},e}(r.a)},function(t,e,n){"use strict";var i=n(0),r=n(7),o=(n.n(r),n(8)),a=n(9),s=n(22),c=n(20),l=n(1);n.d(e,"a",function(){return u});var u=function(t){function e(e,n){var i=t.call(this,e)||this;return i.onRenderHeader=new r.Event,i.onRenderFooter=new r.Event,i.onRenderQuestion=new c.b,i.onRenderPanel=new c.b,i.onRenderPage=new c.b,void 0===n&&(n={}),i.options=l.a.clone(n),i._haveCommercialLicense=n.commercial||n.haveCommercialLicense,i}return n.i(i.a)(e,t),Object.defineProperty(e.prototype,"haveCommercialLicense",{get:function(){return this._haveCommercialLicense},set:function(t){this._haveCommercialLicense=t},enumerable:!1,configurable:!0}),e.prototype.waitForQuestionIsReady=function(t){return new Promise(function(e){if(t.isReady)e();else{var n=function(i,r){r.isReady&&(t.onReadyChanged.remove(n),e())};t.onReadyChanged.add(n)}})},e.prototype.waitForCoreIsReady=function(){return n.i(i.b)(this,void 0,void 0,function(){var t,e,r,o,a,s,c;return n.i(i.c)(this,function(n){switch(n.label){case 0:t=0,e=this.getAllQuestions(),n.label=1;case 1:if(!(t<e.length))return[3,9];if(r=e[t],!r.contentPanel)return[3,6];o=[],r.contentPanel.addQuestionsToList(o),a=0,s=o,n.label=2;case 2:return a<s.length?(c=s[a],[4,this.waitForQuestionIsReady(c)]):[3,5];case 3:n.sent(),n.label=4;case 4:return a++,[3,2];case 5:return[3,8];case 6:return[4,this.waitForQuestionIsReady(l.a.getContentQuestion(r))];case 7:n.sent(),n.label=8;case 8:return t++,[3,1];case 9:return[2]}})})},e.prototype.renderSurvey=function(t){return n.i(i.b)(this,void 0,void 0,function(){var e,r,o,l;return n.i(i.c)(this,function(n){switch(n.label){case 0:return[4,this.waitForCoreIsReady()];case 1:return n.sent(),[4,a.a.generateFlats(this,t)];case 2:e=n.sent(),r=s.a.pack(e,t),c.a.process_header_events(this,t,r),o=0,n.label=3;case 3:if(!(o<r.length))return[3,8];l=0,n.label=4;case 4:return l<r[o].length?(t.getNumberOfPages()===o&&t.addPage(),t.setPage(o),[4,r[o][l].render()]):[3,7];case 5:n.sent(),n.label=6;case 6:return l++,[3,4];case 7:return o++,[3,3];case 8:return[2]}})})},e.prototype.save=function(t){return void 0===t&&(t="survey_result.pdf"),n.i(i.b)(this,void 0,void 0,function(){var e;return n.i(i.c)(this,function(n){switch(n.label){case 0:return e=new o.b(this.options),l.a.fixFont(e),[4,this.renderSurvey(e)];case 1:return n.sent(),[2,e.doc.save(t,{returnPromise:!0})]}})})},e.prototype.raw=function(t){return n.i(i.b)(this,void 0,void 0,function(){var e;return n.i(i.c)(this,function(n){switch(n.label){case 0:return e=new o.b(this.options),l.a.fixFont(e),[4,this.renderSurvey(e)];case 1:return n.sent(),[2,e.doc.output(t)]}})})},e}(r.SurveyModel)},function(t,e,n){"use strict";function i(t){return void 0===t?-1:t.height}Object.defineProperty(e,"__esModule",{value:!0});var r=n(55),o=function(){function t(t,e){this.intervalTree=t,this.records=[],this.height=0,this.key=e.low,this.max=e.high,this.records.push(e)}return t.prototype.getNodeHigh=function(){for(var t=this.records[0].high,e=1;e<this.records.length;e++)this.records[e].high>t&&(t=this.records[e].high);return t},t.prototype.updateHeight=function(){this.height=Math.max(i(this.left),i(this.right))+1},t.prototype.updateMaxOfParents=function(){if(void 0!==this){var t=this.getNodeHigh();void 0!==this.left&&void 0!==this.right?this.max=Math.max(Math.max(this.left.max,this.right.max),t):void 0!==this.left&&void 0===this.right?this.max=Math.max(this.left.max,t):void 0===this.left&&void 0!==this.right?this.max=Math.max(this.right.max,t):this.max=t,this.parent&&this.parent.updateMaxOfParents()}},t.prototype._updateMaxAfterRightRotate=function(){var t=this.parent,e=t.left,n=e.getNodeHigh();void 0===e.left&&void 0!==e.right?e.max=Math.max(n,e.right.max):void 0!==e.left&&void 0===e.right?e.max=Math.max(n,e.left.max):void 0===e.left&&void 0===e.right?e.max=n:e.max=Math.max(Math.max(e.left.max,e.right.max),n);var i=this.getNodeHigh();void 0===this.left&&void 0!==this.right?this.max=Math.max(i,this.right.max):void 0!==this.left&&void 0===this.right?this.max=Math.max(i,this.left.max):void 0===this.left&&void 0===this.right?this.max=i:this.max=Math.max(Math.max(this.left.max,this.right.max),i),t.max=Math.max(Math.max(t.left.max,t.right.max),t.getNodeHigh())},t.prototype._updateMaxAfterLeftRotate=function(){var t=this.parent,e=t.right,n=e.getNodeHigh();void 0===e.left&&void 0!==e.right?e.max=Math.max(n,e.right.max):void 0!==e.left&&void 0===e.right?e.max=Math.max(n,e.left.max):void 0===e.left&&void 0===e.right?e.max=n:e.max=Math.max(Math.max(e.left.max,e.right.max),n);var i=this.getNodeHigh();void 0===this.left&&void 0!==this.right?this.max=Math.max(i,this.right.max):void 0!==this.left&&void 0===this.right?this.max=Math.max(i,this.left.max):void 0===this.left&&void 0===this.right?this.max=i:this.max=Math.max(Math.max(this.left.max,this.right.max),i),t.max=Math.max(Math.max(t.left.max,e.max),t.getNodeHigh())},t.prototype._leftRotate=function(){var t=this.right;t.parent=this.parent,void 0===t.parent?this.intervalTree.root=t:t.parent.left===this?t.parent.left=t:t.parent.right===this&&(t.parent.right=t),this.right=t.left,void 0!==this.right&&(this.right.parent=this),t.left=this,this.parent=t,this.updateHeight(),t.updateHeight()},t.prototype._rightRotate=function(){var t=this.left;t.parent=this.parent,void 0===t.parent?this.intervalTree.root=t:t.parent.left===this?t.parent.left=t:t.parent.right===this&&(t.parent.right=t),this.left=t.right,void 0!==this.left&&(this.left.parent=this),t.right=this,this.parent=t,this.updateHeight(),t.updateHeight()},t.prototype._rebalance=function(){if(i(this.left)>=2+i(this.right)){var t=this.left;i(t.left)>=i(t.right)?(this._rightRotate(),this._updateMaxAfterRightRotate()):(t._leftRotate(),this._rightRotate(),this._updateMaxAfterRightRotate())}else if(i(this.right)>=2+i(this.left)){var e=this.right;i(e.right)>=i(e.left)?(this._leftRotate(),this._updateMaxAfterLeftRotate()):(e._rightRotate(),this._leftRotate(),this._updateMaxAfterLeftRotate())}},t.prototype.insert=function(e){e.low<this.key?void 0===this.left?(this.left=new t(this.intervalTree,e),this.left.parent=this):this.left.insert(e):void 0===this.right?(this.right=new t(this.intervalTree,e),this.right.parent=this):this.right.insert(e),this.max<e.high&&(this.max=e.high),this.updateHeight(),this._rebalance()},t.prototype._getOverlappingRecords=function(t,e,n){if(t.key<=n&&e<=t.getNodeHigh()){for(var i=[],r=0;r<t.records.length;r++)t.records[r].high>=e&&i.push(t.records[r]);return i}return[]},t.prototype.search=function(t,e){if(void 0===this)return[];var n=[],i=[],r=[];return t>this.max?[]:(void 0!==this.left&&this.left.max>=t&&(n=this.left.search(t,e)),i=this._getOverlappingRecords(this,t,e),e<this.key?n.concat(i):(void 0!==this.right&&(r=this.right.search(t,e)),n.concat(i,r)))},t.prototype.searchExisting=function(t){if(void 0!==this){if(this.key===t)return this;if(t<this.key){if(void 0!==this.left)return this.left.searchExisting(t)}else if(void 0!==this.right)return this.right.searchExisting(t)}},t.prototype._minValue=function(){return void 0===this.left?this:this.left._minValue()},t.prototype.remove=function(t){var e=this.parent;if(t.key<this.key)return void 0!==this.left?this.left.remove(t):void 0;if(t.key>this.key)return void 0!==this.right?this.right.remove(t):void 0;if(void 0!==this.left&&void 0!==this.right){var n=this.right._minValue();return this.key=n.key,this.records=n.records,this.right.remove(this)}return e.left===this?(void 0!==this.right?(e.left=this.right,this.right.parent=e):(e.left=this.left,void 0!==this.left&&(this.left.parent=e)),e.updateMaxOfParents(),e.updateHeight(),e._rebalance(),this):e.right===this?(void 0!==this.right?(e.right=this.right,this.right.parent=e):(e.right=this.left,void 0!==this.left&&(this.left.parent=e)),e.updateMaxOfParents(),e.updateHeight(),e._rebalance(),this):void 0},t}();e.Node=o;var a=function(){function t(){this.count=0}return t.prototype.insert=function(t){if(t.low>t.high)throw new Error("`low` value must be lower or equal to `high` value");if(void 0===this.root)return this.root=new o(this,t),this.count++,!0;var e=this.root.searchExisting(t.low);if(void 0!==e){for(var n=0;n<e.records.length;n++)if(r(e.records[n],t))return!1;return e.records.push(t),t.high>e.max&&(e.max=t.high,e.parent&&e.parent.updateMaxOfParents()),this.count++,!0}return this.root.insert(t),this.count++,!0},t.prototype.search=function(t,e){return void 0===this.root?[]:this.root.search(t,e)},t.prototype.remove=function(t){if(void 0===this.root)return!1;var e=this.root.searchExisting(t.low);if(void 0===e)return!1;if(e.records.length>1){for(var n=void 0,i=0;i<e.records.length;i++)if(r(e.records[i],t)){n=e.records[i],e.records.splice(i,1);break}if(n){if(n=void 0,t.high===e.max){var a=e.getNodeHigh();void 0!==e.left&&void 0!==e.right?e.max=Math.max(Math.max(e.left.max,e.right.max),a):void 0!==e.left&&void 0===e.right?e.max=Math.max(e.left.max,a):void 0===e.left&&void 0!==e.right?e.max=Math.max(e.right.max,a):e.max=a,e.parent&&e.parent.updateMaxOfParents()}return this.count--,!0}return!1}if(1===e.records.length){if(r(e.records[0],t)){if(this.root.key===e.key){var s=new o(this,{low:t.low,high:t.low});s.left=this.root,this.root.parent=s;var c=this.root.remove(e);return this.root=s.left,void 0!==this.root&&(this.root.parent=void 0),!!c&&(c=void 0,this.count--,!0)}var c=this.root.remove(e);return!!c&&(c=void 0,this.count--,!0)}return!1}return!1},t.prototype.inOrder=function(){return new c(this.root)},t.prototype.preOrder=function(){return new l(this.root)},t}();e.IntervalTree=a;var s=function(){function t(){this.tree=new a}return t.prototype.insert=function(t,e,n){return this.tree.insert({low:t,high:e,data:n})},t.prototype.remove=function(t,e,n){return this.tree.remove({low:t,high:e,data:n})},t.prototype.search=function(t,e){return this.tree.search(t,e).map(function(t){return t.data})},t.prototype.inOrder=function(){return this.tree.inOrder()},t.prototype.preOrder=function(){return this.tree.preOrder()},Object.defineProperty(t.prototype,"count",{get:function(){return this.tree.count},enumerable:!0,configurable:!0}),t}();e.default=s;var c=function(){function t(t){this.stack=[],void 0!==t&&this.push(t)}return t.prototype.next=function(){return void 0===this.currentNode?{done:!0,value:void 0}:this.i<this.currentNode.records.length?{done:!1,value:this.currentNode.records[this.i++]}:(void 0!==this.currentNode.right?this.push(this.currentNode.right):this.pop(),this.next())},t.prototype.push=function(t){for(this.currentNode=t,this.i=0;void 0!==this.currentNode.left;)this.stack.push(this.currentNode),this.currentNode=this.currentNode.left},t.prototype.pop=function(){this.currentNode=this.stack.pop(),this.i=0},t}();e.InOrder=c,"function"==typeof Symbol&&(c.prototype[Symbol.iterator]=function(){return this});var l=function(){function t(t){this.stack=[],this.i=0,this.currentNode=t}return t.prototype.next=function(){return void 0===this.currentNode?{done:!0,value:void 0}:this.i<this.currentNode.records.length?{done:!1,value:this.currentNode.records[this.i++]}:(void 0!==this.currentNode.right&&this.push(this.currentNode.right),void 0!==this.currentNode.left&&this.push(this.currentNode.left),this.pop(),this.next())},t.prototype.push=function(t){this.stack.push(t)},t.prototype.pop=function(){this.currentNode=this.stack.pop(),this.i=0},t}();e.PreOrder=l,"function"==typeof Symbol&&(l.prototype[Symbol.iterator]=function(){return this})},function(t,e){t.exports=function(t,e,n,i){var r=n?n.call(i,t,e):void 0;if(void 0!==r)return!!r;if(t===e)return!0;if("object"!=typeof t||!t||"object"!=typeof e||!e)return!1;var o=Object.keys(t),a=Object.keys(e);if(o.length!==a.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(e),c=0;c<o.length;c++){var l=o[c];if(!s(l))return!1;var u=t[l],h=e[l];if(!1===(r=n?n.call(i,u,h,l):void 0)||void 0===r&&u!==h)return!1}return!0}},function(t,e,n){"use strict";function i(t){var e=t.AcroFormAppearance.RadioButton.Circle.YesNormal;t.AcroFormAppearance.RadioButton.Circle.YesNormal=function(n){var i=e(n),r=i.stream.split("\n"),o=t.__private__.encodeColorString(n.color);return r[0]=r[0]+"\n"+o+"\n"+o.toUpperCase(),i.stream=r.join("\n"),i}}e.a=i},function(t,e,n){"use strict";var i=n(0),r=n(4);n.d(e,"a",function(){return o});var o=function(t){function e(e,n,i,r){return t.call(this,e,n,i,r)||this}return n.i(i.a)(e,t),e}(r.a)},function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){(function(t){/**
6
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("survey-core"),require("jspdf")):"function"==typeof define&&define.amd?define("SurveyPDF",["survey-core","jspdf"],e):"object"==typeof exports?exports.SurveyPDF=e(require("survey-core"),require("jspdf")):t.SurveyPDF=e(t.Survey,t.jspdf)}(this,function(t,e){return function(t){function e(i){if(n[i])return n[i].exports;var r=n[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,e),r.l=!0,r.exports}var n={};return e.m=t,e.c=n,e.i=function(t){return t},e.d=function(t,n,i){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:i})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=13)}([function(t,e,n){"use strict";function i(t,e){function n(){this.constructor=t}if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");s(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function r(t,e,n,i){function r(t){return t instanceof n?t:new n(function(e){e(t)})}return new(n||(n=Promise))(function(n,o){function a(t){try{c(i.next(t))}catch(t){o(t)}}function s(t){try{c(i.throw(t))}catch(t){o(t)}}function c(t){t.done?n(t.value):r(t.value).then(a,s)}c((i=i.apply(t,e||[])).next())})}function o(t,e){function n(t){return function(e){return i([t,e])}}function i(n){if(r)throw new TypeError("Generator is already executing.");for(;c;)try{if(r=1,o&&(a=2&n[0]?o.return:n[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,n[1])).done)return a;switch(o=0,a&&(n=[2&n[0],a.value]),n[0]){case 0:case 1:a=n;break;case 4:return c.label++,{value:n[1],done:!1};case 5:c.label++,o=n[1],n=[0];continue;case 7:n=c.ops.pop(),c.trys.pop();continue;default:if(a=c.trys,!(a=a.length>0&&a[a.length-1])&&(6===n[0]||2===n[0])){c=0;continue}if(3===n[0]&&(!a||n[1]>a[0]&&n[1]<a[3])){c.label=n[1];break}if(6===n[0]&&c.label<a[1]){c.label=a[1],a=n;break}if(a&&c.label<a[2]){c.label=a[2],c.ops.push(n);break}a[2]&&c.ops.pop(),c.trys.pop();continue}n=e.call(t,c)}catch(t){n=[6,t],o=0}finally{r=a=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}var r,o,a,s,c={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:n(0),throw:n(1),return:n(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s}function a(t,e,n){if(n||2===arguments.length)for(var i,r=0,o=e.length;r<o;r++)!i&&r in e||(i||(i=Array.prototype.slice.call(e,0,r)),i[r]=e[r]);return t.concat(i||Array.prototype.slice.call(e))}e.a=i,e.b=r,e.c=o,e.d=a;var s=function(t,e){return(s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)}},function(t,e,n){"use strict";var i=n(0),r=n(7),o=(n.n(r),n(13)),a=n(8),s=n(2),c=n(4),l=n(12),u=n(33),h=n(58),f=n(25),d=n(30),p=n(28),g=n(29),m=n(27),v=n(15),y=n(5),b=n(34);n.d(e,"a",function(){return x});var x=function(){function t(){}return t.parseWidth=function(t,e,n){if(void 0===n&&(n=1),0===t.indexOf("calc"))return e/n;var i,r=parseFloat(t),o=t.replace(/[^A-Za-z]/g,"");switch(o){case"pt":i=1;break;case"mm":i=72/25.4;break;case"cm":i=72/2.54;break;case"in":i=72;break;case"px":i=.75;break;case"pc":case"em":i=12;break;case"ex":i=6;break;default:case"%":i=e/100}return Math.min(r*i,e)},t.pxToPt=function(e){return"string"==typeof e?t.parseWidth(e,Number.MAX_VALUE):72*e/96},t.mergeRects=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n={xLeft:t[0].xLeft,xRight:t[0].xRight,yTop:t[0].yTop,yBot:t[0].yBot};return t.forEach(function(t){n.xLeft=Math.min(n.xLeft,t.xLeft),n.xRight=Math.max(n.xRight,t.xRight),n.yTop=Math.min(n.yTop,t.yTop),n.yBot=Math.max(n.yBot,t.yBot)}),n},t.createPoint=function(t,e,n){return void 0===e&&(e=!0),void 0===n&&(n=!1),{xLeft:e?t.xLeft:t.xRight,yTop:n?t.yTop:t.yBot}},t.createRect=function(t,e,n){return{xLeft:t.xLeft,xRight:t.xLeft+e,yTop:t.yTop,yBot:t.yTop+n}},t.createHeaderRect=function(t){return{xLeft:0,xRight:t.paperWidth,yTop:0,yBot:t.margins.top}},t.createFooterRect=function(t){return{xLeft:0,xRight:t.paperWidth,yTop:t.paperHeight-t.margins.bot,yBot:t.paperHeight}},t.chooseHtmlFont=function(t,e){return"standard"===e?this.isCustomFont(t,t.fontName)?this.STANDARD_FONT:t.fontName:t.useCustomFontInHtml?t.fontName:this.STANDARD_FONT},t.generateCssTextRule=function(t,e,n){return'"font-size: '.concat(t,"pt; font-weight: ").concat(e,"; font-family: ").concat(n,"; color: ").concat(this.TEXT_COLOR,';"')},t.createHtmlContainerBlock=function(t,e,n){var i=this.chooseHtmlFont(e,n);return'<div class="__surveypdf_html" style='.concat(this.generateCssTextRule(e.fontSize,e.fontStyle,i),">")+"<style>.__surveypdf_html p { margin: 0; line-height: ".concat(e.fontSize,"pt } body { margin: 0; }</style>").concat(t,"</div>")},t.splitHtmlRect=function(t,e){var r=[],o=e.height,a=t.doc.getFontSize();e.yBot=e.yTop+a;var s=Math.floor(o/a)-1;r.push(e);for(var c=this.createPoint(e),l=0;l<s;l++)r.push(new m.a(this.createRect(c,e.width,a))),c.yTop+=a;var u=o-(s+1)*a;return u>0&&r.push(new m.a(this.createRect(c,e.width,u))),new(y.a.bind.apply(y.a,n.i(i.d)([void 0],r,!1)))},t.createPlainTextFlat=function(t,e,n,i,r){var o=this,a=n.doc.splitTextToSize(i,n.paperWidth-n.margins.right-t.xLeft),s=this.clone(t),c=new y.a;return a.forEach(function(t){var i=n.measureText(t);c.addBrick(new r(e,n,o.createRect(s,i.width,i.height),t)),s.yTop+=i.height}),c},t.createTextFlat=function(t,e,r,o,a){return n.i(i.b)(this,void 0,void 0,function(){var s,c;return n.i(i.c)(this,function(n){switch(n.label){case 0:return"string"!=typeof o&&this.hasHtml(o)?[3,1]:[2,this.createPlainTextFlat(t,e,r,"string"==typeof o?o:this.getLocString(o),a)];case 1:return s=this.splitHtmlRect,c=[r],[4,this.createHTMLFlat(t,e,r,this.createHtmlContainerBlock(this.getLocString(o),r,"standard"))];case 2:return[2,s.apply(this,c.concat([n.sent()]))]}})})},t.hasHtml=function(t){var e=/<\/?[a-z][\s\S]*>/i;return t.hasHtml&&(e.test(t.renderedText)||e.test(t.renderedHtml))},t.getHtmlMargins=function(t,e){var n=t.paperWidth-e.xLeft-t.margins.right;return{top:t.margins.top,bottom:t.margins.bot,width:n>t.unitWidth?n:t.unitWidth}},t.createHTMLRect=function(e,n,i,r){var o=n.paperHeight-n.margins.bot-n.margins.top,a=(n.helperDoc.getNumberOfPages()-1)*(n.fontSize*Math.floor(o/n.fontSize))+r-i.top+t.HTML_TAIL_TEXT_SCALE*n.fontSize,s=n.helperDoc.getNumberOfPages();n.helperDoc.addPage();for(var c=0;c<s;c++)n.helperDoc.deletePage(1);return t.createRect(e,i.width,a)},t.createHTMLFlat=function(e,r,o,a){return n.i(i.b)(this,void 0,void 0,function(){var s;return n.i(i.c)(this,function(n){switch(n.label){case 0:return s=this.getHtmlMargins(o,e),[4,new Promise(function(n){o.helperDoc.fromHTML(a,e.xLeft,s.top,{pagesplit:!0,width:s.width},function(i){var c=t.createHTMLRect(e,o,s,i.y);n(new p.a(r,o,c,a))},s)})];case 1:return[2,n.sent()]}})})},t.generateFontFace=function(t,e,n){return"@font-face { font-family: ".concat(t,"; ")+"src: url(data:application/font-woff;charset=utf-8;base64,".concat(e,") format('woff'); ")+"font-weight: ".concat(n,"; }")},t.generateFontFaceWithItalicStyle=function(t,e,n){return"@font-face { font-family: ".concat(t,"; ")+"src: url(data:application/font-woff;charset=utf-8;base64,".concat(e,") format('woff'); ")+"font-weight: ".concat(n,"; font-style: italic}")},t.htmlToXml=function(t){var e=document.implementation.createHTMLDocument("");return e.write(t.replace(/\#/g,"%23")),e.documentElement.setAttribute("xmlns",e.documentElement.namespaceURI),e.body.style.margin="unset",(new XMLSerializer).serializeToString(e.body).replace(/%23/g,"#")},t.createSvgContent=function(t,e,n){var i=this,r=document.createElement("style");r.innerHTML=".__surveypdf_html p { margin: unset; line-height: 22px; } body { margin: unset; }",document.body.appendChild(r);var o=document.createElement("div");o.className="__surveypdf_html",o.style.display="block",o.style.position="fixed",o.style.top="-10000px",o.style.left="-10000px",o.style.width=e/72*96+"px",o.style.boxSizing="initial",o.style.color="initial",o.style.fontFamily="initial",o.style.font="initial",o.style.lineHeight="initial",o.insertAdjacentHTML("beforeend",t),document.body.appendChild(o);var s=o.offsetWidth,c=o.offsetHeight;o.remove(),r.remove();var l="";return n.useCustomFontInHtml?l="<defs><style>".concat(this.generateFontFace(n.fontName,n.base64Normal,"normal"))+" ".concat(this.generateFontFace(n.fontName,n.base64Bold,"bold"),"</style></defs>"):Object.keys(a.b.customFonts).forEach(function(t){var e=a.b.customFonts[t];Object.keys(e).forEach(function(n){l+="".concat("normal"===n||"bold"===n?i.generateFontFace(t,e[n],n):i.generateFontFaceWithItalicStyle(t,e[n],"italic"===n?"normal":"bold"))}),l="<defs><style>"+l+"</style></defs>"}),{svg:'<svg xmlns="http://www.w3.org/2000/svg">'+l+"<style>.__surveypdf_html p { margin: unset; line-height: 22px; }</style>"+'<foreignObject width="'.concat(s,'px" height="').concat(c,'px">')+this.htmlToXml(t)+"</foreignObject></svg>",divWidth:s,divHeight:c}},t.htmlToImage=function(e,r,o){return n.i(i.b)(this,void 0,void 0,function(){var a,s,c,l,u,h;return n.i(i.c)(this,function(n){switch(n.label){case 0:return a=t.createSvgContent(e,r,o),s=a.svg,c=a.divWidth,l=a.divHeight,u="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(s))),h=new Image,h.src=u,[4,new Promise(function(e){h.onload=function(){var n=document.createElement("canvas");n.width=c,n.height=l;var i=n.getContext("2d");i.fillStyle=t.BACKGROUND_COLOR,i.fillRect(0,0,c,l),i.drawImage(h,0,0);var r=n.toDataURL("image/jpeg",t.HTML_TO_IMAGE_QUALITY);n.remove(),e({url:r,aspect:c/l})},h.onerror=function(){e({url:"data:,",aspect:r/this.EPSILON})}})];case 1:return[2,n.sent()]}})})},t.createBoldTextFlat=function(t,e,r,o){return n.i(i.b)(this,void 0,void 0,function(){var a;return n.i(i.c)(this,function(n){switch(n.label){case 0:return r.fontStyle="bold",[4,this.createTextFlat(t,e,r,o,l.a)];case 1:return a=n.sent(),r.fontStyle="normal",[2,a]}})})},t.createTitleFlat=function(t,e,r){return n.i(i.b)(this,void 0,void 0,function(){var o,a,s,c,l,u,h,f,d,p,g;return n.i(i.c)(this,function(n){switch(n.label){case 0:return o=new y.a,(a=this.clone(t),s=r.fontSize,r.fontSize*=this.TITLE_FONT_SCALE,e.no)?(c=e.no+" ",l=void 0,this.hasHtml(e.locTitle)?(r.fontStyle="bold",r.pushMargins(),r.margins.right=r.paperWidth-r.margins.left-r.measureText(c,"bold").width,[4,this.createHTMLFlat(a,e,r,this.createHtmlContainerBlock(c,r,"standard"))]):[3,2]):[3,5];case 1:return l=n.sent(),r.popMargins(),r.fontStyle="normal",[3,4];case 2:return[4,this.createBoldTextFlat(a,e,r,c)];case 3:l=n.sent(),n.label=4;case 4:o.addBrick(l),a.xLeft=l.xRight,n.label=5;case 5:return r.pushMargins(),r.margins.left=a.xLeft,[4,this.createBoldTextFlat(a,e,r,e.locTitle)];case 6:return u=n.sent(),(o.addBrick(u),r.popMargins(),e.isRequired)?(h=e.requiredText,this.hasHtml(e.locTitle)?(a=this.createPoint(u.unfold()[0],!1,!1),r.fontStyle="bold",r.pushMargins(),r.margins.right=r.paperWidth-r.margins.left-r.measureText(h,"bold").width,d=(f=o).addBrick,[4,this.createHTMLFlat(a,e,r,this.createHtmlContainerBlock(h,r,"standard"))]):[3,8]):[3,10];case 7:return d.apply(f,[n.sent()]),r.popMargins(),r.fontStyle="normal",[3,10];case 8:return a=this.createPoint(u.unfold().pop(),!1,!0),g=(p=o).addBrick,[4,this.createBoldTextFlat(a,e,r,h)];case 9:g.apply(p,[n.sent()]),n.label=10;case 10:return r.fontSize=s,[2,o]}})})},t.createTitleSurveyPanelFlat=function(t,e,r,o){return n.i(i.b)(this,void 0,void 0,function(){var a,s;return n.i(i.c)(this,function(n){switch(n.label){case 0:return a=e.fontSize,e.fontSize=a*o,e.fontStyle="bold",[4,this.createTextFlat(t,null,e,r,u.a)];case 1:return s=n.sent(),e.fontStyle="normal",e.fontSize=a,[2,s]}})})},t.createTitleSurveyFlat=function(t,e,r){return n.i(i.b)(this,void 0,void 0,function(){return n.i(i.c)(this,function(n){switch(n.label){case 0:return[4,this.createTitleSurveyPanelFlat(t,e,r,this.TITLE_SURVEY_FONT_SIZE_SCALE)];case 1:return[2,n.sent()]}})})},t.createTitlePanelFlat=function(t,e,r,o){return void 0===o&&(o=!1),n.i(i.b)(this,void 0,void 0,function(){return n.i(i.c)(this,function(n){switch(n.label){case 0:return[4,this.createTitleSurveyPanelFlat(t,e,r,o?this.TITLE_PAGE_FONT_SIZE_SCALE:this.TITLE_PANEL_FONT_SIZE_SCALE)];case 1:return[2,n.sent()]}})})},t.createDescFlat=function(t,e,r,o){return n.i(i.b)(this,void 0,void 0,function(){var a,s;return n.i(i.c)(this,function(n){switch(n.label){case 0:return a=r.fontSize,r.fontSize=a*this.DESCRIPTION_FONT_SIZE_SCALE,[4,this.createTextFlat(t,e,r,o,h.a)];case 1:return s=n.sent(),r.fontSize=a,[2,s]}})})},t.getReadonlyRenderAs=function(t,e){return"auto"===t.readonlyRenderAs?e.readonlyRenderAs:t.readonlyRenderAs},t.createCommentFlat=function(t,e,r,o,a,s){return void 0===s&&(s=0),n.i(i.b)(this,void 0,void 0,function(){var c,l,u;return n.i(i.c)(this,function(n){switch(n.label){case 0:return c=this.createTextFieldRect(t,r,o),e.isReadOnly&&"acroform"!==this.getReadonlyRenderAs(e,r)?[4,this.createReadOnlyTextFieldTextFlat(t,r,e,this.getQuestionOrCommentValue(e,a),!1)]:[3,2];case 1:l=n.sent(),u=r.unitHeight*this.VALUE_READONLY_PADDING_SCALE,l.yBot+u>c.yBot&&(c.yBot=l.yBot+u),n.label=2;case 2:return[2,new f.a(e,r,c,a,s)]}})})},t.getQuestionOrCommentValue=function(t,e){return void 0===e&&(e=!0),e?void 0!==t.value&&null!==t.value?t.value:"":void 0!==t.comment&&null!==t.comment?t.comment:""},t.getQuestionOrCommentDisplayValue=function(e,n){return void 0===n&&(n=!0),n?e.displayValue:t.getQuestionOrCommentValue(e,n)},t.createImageFlat=function(e,r,o,a,s,c){return n.i(i.b)(this,void 0,void 0,function(){var l,u,h,f,d,m,v,y;return n.i(i.c)(this,function(n){switch(n.label){case 0:return t.inBrowser?o.applyImageFit?(s>o.paperWidth-o.margins.left-o.margins.right&&(l=o.paperWidth-o.margins.left-o.margins.right,c*=l/s,s=l),u=96/72,h=r&&r.imageFit?r.imageFit:"contain",f="<div style='overflow: hidden; width: ".concat(s*u,"px; height: ").concat(c*u,"px;'>\n <img src='").concat(a,"' style='object-fit: ").concat(h,"; width: 100%; height: 100%;'/>\n </div>"),[4,t.htmlToImage(f,s,o)]):[3,2]:[3,3];case 1:d=n.sent(),m=d.url,v=d.aspect,a=m,n.label=2;case 2:return y="<img src='".concat(a,"' width='").concat(s,"' height='").concat(c,"'/>"),[2,new p.a(r,o,this.createRect(e,s,c),y,!0)];case 3:return[2,new g.a(r,o,a,e,s,c)]}})})},t.canPreviewImage=function(t,e,n){return t.canPreviewImage(e)},t.getImageSize=function(e){return n.i(i.b)(this,void 0,void 0,function(){return n.i(i.c)(this,function(n){switch(n.label){case 0:return t.inBrowser?[3,2]:[4,new Promise(function(t){return t({width:void 0,height:void 0})})];case 1:return[2,n.sent()];case 2:return[4,new Promise(function(t){var n=new Image;n.src=e,n.onload=function(){return t({width:n.width,height:n.height})},n.onerror=function(){return t(null)}})];case 3:return[2,n.sent()]}})})},t.createRowlineFlat=function(t,e,n,i){var r=void 0===n?e.paperWidth-e.margins.right:t.xLeft+n;return r=r>t.xLeft?r:t.xLeft+this.EPSILON,new v.a(e,{xLeft:t.xLeft,xRight:r,yTop:t.yTop+this.EPSILON,yBot:t.yTop+this.EPSILON},void 0===i?null:i)},t.createLinkFlat=function(t,e,r,o,a){return n.i(i.b)(this,void 0,void 0,function(){var s,l,u=this;return n.i(i.c)(this,function(n){switch(n.label){case 0:return[4,this.createTextFlat(t,e,r,o,c.a)];case 1:return s=n.sent(),l=new y.a,s.unfold().forEach(function(t){l.addBrick(new d.a(t,a));var e=u.createPoint(l);l.addBrick(u.createRowlineFlat(e,r,l.width,d.a.COLOR))}),[2,l]}})})},t.createAcroformRect=function(t){return[t.xLeft,t.yTop,t.xRight-t.xLeft,t.yBot-t.yTop]},t.createTextFieldRect=function(t,e,n){void 0===n&&(n=1);var i=e.paperWidth-t.xLeft-e.margins.right;i=Math.max(i,e.unitWidth);var r=e.unitHeight*n;return this.createRect(t,i,r)},t.createReadOnlyTextFieldTextFlat=function(t,e,r,o,a){return n.i(i.b)(this,void 0,void 0,function(){var s,l;return n.i(i.c)(this,function(n){switch(n.label){case 0:return s=e.unitWidth*this.VALUE_READONLY_PADDING_SCALE,a||(t.yTop+=s),t.xLeft+=s,e.pushMargins(t.xLeft,e.margins.right+s),[4,this.createTextFlat(t,r,e,o.toString(),c.a)];case 1:return l=n.sent(),e.popMargins(),[2,l]}})})},t.renderFlatBorders=function(t,e){var r,o;if(this.FORM_BORDER_VISIBLE){var a=Math.min(e.width,e.height),s=t.unitHeight*this.VISIBLE_BORDER_SCALE*this.BORDER_SCALE,c=this.formScale(t,e)+s/a,l=t.unitHeight*this.UNVISIBLE_BORDER_SCALE*this.BORDER_SCALE,u=1-l/a,h=this.RADIUS_SCALE*l,f=t.doc.getDrawColor();t.doc.setDrawColor(e.formBorderColor),t.doc.setLineWidth(s),(r=t.doc).rect.apply(r,this.createAcroformRect(this.scaleRect(e,c))),t.doc.setDrawColor(this.BACKGROUND_COLOR),t.doc.setLineWidth(l),(o=t.doc).roundedRect.apply(o,n.i(i.d)(n.i(i.d)([],this.createAcroformRect(this.scaleRect(e,u)),!1),[h,h],!1)),t.doc.setDrawColor(f)}},t.renderReadOnlyTextField=function(t,e,r,o,a){return void 0===a&&(a=!0),n.i(i.b)(this,void 0,void 0,function(){var s,c,l;return n.i(i.c)(this,function(n){switch(n.label){case 0:return s=this.createPoint(r,!0,!0),c=t.fontSize,t.fontSize=r.fontSize,[4,this.createReadOnlyTextFieldTextFlat(s,t,e,o,a)];case 1:return l=n.sent(),t.fontSize=c,a?[4,l.unfold()[0].render()]:[3,3];case 2:return n.sent(),[3,5];case 3:return[4,l.render()];case 4:n.sent(),n.label=5;case 5:return this.renderFlatBorders(t,r),[2]}})})},t.getLocString=function(t){return this.hasHtml(t)?t.renderedHtml:t.renderedText||t.renderedHtml},t.getDropdownQuestionValue=function(t){var e=t;return e.isOtherSelected?e.otherText:t.displayValue?t.displayValue:e.showOptionsCaption?e.optionsCaption:""},t.getContentQuestion=function(t){return t.contentQuestion?t.contentQuestion:t},t.getContentQuestionType=function(t){return t.customWidget?t.customWidget.pdfQuestionType:t.contentQuestion?"custom_model":t.getType()},t.getRatingMinWidth=function(t){return t.measureText(this.RATING_MIN_WIDTH).width},t.getRatingItemText=function(t,e,n){var i=new r.LocalizableString(n.owner,n.useMarkdown);return i.text=this.getLocString(n),0===e&&t.minRateDescription?i.text=t.locMinRateDescription.text+" "+this.getLocString(n):e===t.visibleRateValues.length-1&&t.maxRateDescription&&(i.text=this.getLocString(n)+" "+t.locMaxRateDescription.text),i},t.getPageAvailableWidth=function(t){return t.paperWidth-t.margins.left-t.margins.right},t.getImagePickerAvailableWidth=function(t){var e=this.getPageAvailableWidth(t)-(this.IMAGEPICKER_COUNT-1)*t.unitHeight;return e>0?e:t.unitHeight},t.getColumnWidth=function(t,e){return(this.getPageAvailableWidth(t)-(e-1)*t.unitWidth*this.GAP_BETWEEN_COLUMNS)/e},t.setColumnMargins=function(t,e,n){var i=this.getColumnWidth(t,e);t.margins.left=t.margins.left+n*(i+t.unitWidth*this.GAP_BETWEEN_COLUMNS),t.margins.right=t.margins.right+(e-n-1)*(i+t.unitWidth*this.GAP_BETWEEN_COLUMNS)},t.moveRect=function(t,e,n){return void 0===e&&(e=t.xLeft),void 0===n&&(n=t.yTop),{xLeft:e,yTop:n,xRight:e+t.xRight-t.xLeft,yBot:n+t.yBot-t.yTop}},t.scaleRect=function(t,e){var n=t.xRight-t.xLeft,i=t.yBot-t.yTop,r=(n<i?n:i)*(1-e)/2;return{xLeft:t.xLeft+r,yTop:t.yTop+r,xRight:t.xRight-r,yBot:t.yBot-r}},t.formScale=function(t,e){var n=Math.min(e.width,e.height);return(n-2*t.unitWidth*this.BORDER_SCALE)/n},t.generateQuestionFlats=function(t,e,r,a){return n.i(i.b)(this,void 0,void 0,function(){var c,l,u,h;return n.i(i.c)(this,function(f){switch(f.label){case 0:return c=this.getContentQuestionType(r),l=s.a.getInstance().create(t,r,e,c),[4,l.generateFlats(a)];case 1:return u=f.sent(),h=new b.c(a,u,r,e,s.a.getInstance(),o),r.customWidget&&r.customWidget.isFit(r)&&r.customWidget.pdfRender&&t.onRenderQuestion.unshift(r.customWidget.pdfRender),[4,t.onRenderQuestion.fire(t,h)];case 2:return f.sent(),[2,n.i(i.d)([],h.bricks,!0)]}})})},t.isFontExist=function(t,e){return t.doc.internal.getFont(e).fontName===e},t.isCustomFont=function(t,e){return t.doc.internal.getFont(e).encoding===this.CUSTOM_FONT_ENCODING},t.fixFont=function(t){this.isCustomFont(t,t.fontName)&&(t.doc.text("load font",0,0),t.doc.deletePage(1),t.addPage())},t.clone=function(t){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e},t.EPSILON=2.220446049250313e-15,t.TITLE_SURVEY_FONT_SIZE_SCALE=1.7,t.TITLE_PAGE_FONT_SIZE_SCALE=1.3,t.TITLE_PANEL_FONT_SIZE_SCALE=1.3,t.DESCRIPTION_FONT_SIZE_SCALE=2/3,t.OTHER_ROWS_COUNT=2,t.RATING_MIN_WIDTH=3,t.RATING_MIN_HEIGHT=2,t.RATING_COLUMN_WIDTH=5,t.MATRIX_COLUMN_WIDTH=5,t.IMAGEPICKER_COUNT=4,t.IMAGEPICKER_RATIO=4/3,t.MULTIPLETEXT_TEXT_PERS=Math.E/10,t.HTML_TAIL_TEXT_SCALE=.24,t.SELECT_ITEM_FLAT_SCALE=.95,t.GAP_BETWEEN_ROWS=.25,t.GAP_BETWEEN_COLUMNS=1.5,t.GAP_BETWEEN_ITEM_TEXT=.25,t.FORM_BORDER_VISIBLE=!0,t.BORDER_SCALE=.1,t.VISIBLE_BORDER_SCALE=.8,t.UNVISIBLE_BORDER_SCALE=.2,t.RADIUS_SCALE=3,t.TITLE_FONT_SCALE=1.1,t.VALUE_READONLY_PADDING_SCALE=.3,t.HTML_TO_IMAGE_QUALITY=1,t.FORM_BORDER_COLOR="#9f9f9f",t.TEXT_COLOR="#404040",t.BACKGROUND_COLOR="#FFFFFF",t.TITLE_LOCATION_MATRIX="matrix",t.STANDARD_FONT="helvetica",t.CUSTOM_FONT_ENCODING="Identity-H",t.inBrowser="function"==typeof Image,t}()},function(t,e,n){"use strict";var i=n(3);n.d(e,"a",function(){return r});var r=function(){function t(){this.questions={}}return t.getInstance=function(){return t.instance},t.prototype.register=function(t,e){this.questions[t]=e},t.prototype.create=function(t,e,n,r){var o=void 0===r?e.getType():r;return new(this.questions[o]||i.a)(t,e,n)},t.instance=new t,t}()},function(t,e,n){"use strict";var i=n(0),r=n(7),o=(n.n(r),n(9)),a=n(4),s=n(5),c=n(1);n.d(e,"a",function(){return l});var l=function(){function t(t,e,n){this.survey=t,this.controller=n,this.question=e}return t.prototype.generateFlatTitle=function(t){return n.i(i.b)(this,void 0,void 0,function(){return n.i(i.c)(this,function(e){switch(e.label){case 0:return[4,c.a.createTitleFlat(t,this.question,this.controller)];case 1:return[2,e.sent()]}})})},t.prototype.generateFlatDescription=function(e){return n.i(i.b)(this,void 0,void 0,function(){var r,o;return n.i(i.c)(this,function(n){switch(n.label){case 0:return r=c.a.clone(e),r.xLeft+=this.controller.unitWidth*t.CONTENT_INDENT_SCALE,r.yTop+=t.DESC_GAP_SCALE*this.controller.unitHeight,o=this.question.locDescription,[4,c.a.createDescFlat(r,this.question,this.controller,o)];case 1:return[2,n.sent()]}})})},t.prototype.generateFlatsComment=function(t){return n.i(i.b)(this,void 0,void 0,function(){var e,r,o,l,u;return n.i(i.c)(this,function(n){switch(n.label){case 0:return e=this.question.locCommentText,[4,c.a.createTextFlat(t,this.question,this.controller,e,a.a)];case 1:return r=n.sent(),o=c.a.createPoint(r),o.yTop+=this.controller.unitHeight*c.a.GAP_BETWEEN_ROWS,l=s.a.bind,u=[void 0,r],[4,c.a.createCommentFlat(o,this.question,this.controller,c.a.OTHER_ROWS_COUNT,!1)];case 2:return[2,new(l.apply(s.a,u.concat([n.sent()])))]}})})},t.prototype.generateFlatsComposite=function(t){return n.i(i.b)(this,void 0,void 0,function(){var e;return n.i(i.c)(this,function(n){switch(n.label){case 0:return e=this.question.contentPanel,e?[4,o.a.generateFlatsPanel(this.survey,this.controller,e,t)]:[3,2];case 1:return[2,n.sent()];case 2:return this.question=c.a.getContentQuestion(this.question),[4,this.generateFlatsContent(t)];case 3:return[2,n.sent()]}})})},t.prototype.generateFlatsContent=function(t){return n.i(i.b)(this,void 0,void 0,function(){return n.i(i.c)(this,function(t){return[2,null]})})},t.prototype.generateFlats=function(e){return n.i(i.b)(this,void 0,void 0,function(){var r,o,a,l,u,h,f,d,p,g,m,p,m,v,y,b,f,d,g,f,d,p,g,m,p,x,T,F,_,w;return n.i(i.c)(this,function(n){switch(n.label){case 0:switch(this.controller.pushMargins(),this.controller.margins.left+=this.controller.measureText(this.question.indent).width,r={xLeft:e.xLeft+this.controller.measureText(this.question.indent).width,yTop:e.yTop},o=[],a=r,l=this.question.getTitleLocation(),l=this.question.hasTitle?l:"hidden",u=!!c.a.getLocString(this.question.locDescription),h=l){case"top":case"default":return[3,1];case"bottom":return[3,7];case"left":return[3,14];case"hidden":case c.a.TITLE_LOCATION_MATRIX:return[3,19]}return[3,19];case 1:return[4,this.generateFlatTitle(r)];case 2:return f=n.sent(),d=new s.a(f),p=c.a.createPoint(d),u?[4,this.generateFlatDescription(c.a.createPoint(f))]:[3,4];case 3:return g=n.sent(),d.addBrick(g),p=c.a.createPoint(g),[3,5];case 4:p.xLeft+=this.controller.unitWidth*t.CONTENT_INDENT_SCALE,n.label=5;case 5:return d.addBrick(c.a.createRowlineFlat(c.a.createPoint(d),this.controller)),p.yTop+=this.controller.unitHeight*t.CONTENT_GAP_VERT_SCALE+c.a.EPSILON,a=p,this.controller.pushMargins(),this.controller.margins.left+=this.controller.unitWidth*t.CONTENT_INDENT_SCALE,[4,this.generateFlatsComposite(p)];case 6:return m=n.sent(),this.controller.popMargins(),null!==m&&0!==m.length&&(a.yTop=c.a.mergeRects.apply(c.a,m).yBot+this.controller.unitHeight*c.a.GAP_BETWEEN_ROWS,d.addBrick(m.shift())),o.push(d),o.push.apply(o,m),[3,21];case 7:return p=c.a.clone(r),this.controller.pushMargins(),p.xLeft+=this.controller.unitWidth*t.CONTENT_INDENT_SCALE,this.controller.margins.left+=this.controller.unitWidth*t.CONTENT_INDENT_SCALE,a=p,[4,this.generateFlatsComposite(p)];case 8:return m=n.sent(),(this.controller.popMargins(),o.push.apply(o,m),null!==m&&0!=m.length&&(a=c.a.createPoint(c.a.mergeRects.apply(c.a,m)),a.yTop+=this.controller.unitHeight*c.a.GAP_BETWEEN_ROWS),this.question.hasComment)?(y=(v=o).push,[4,this.generateFlatsComment(a)]):[3,10];case 9:y.apply(v,[n.sent()]),n.label=10;case 10:return b=r,0!==o.length&&(b.yTop=o[o.length-1].yBot),b.yTop+=this.controller.unitHeight*t.CONTENT_GAP_VERT_SCALE,[4,this.generateFlatTitle(b)];case 11:return f=n.sent(),d=new s.a(f),u?[4,this.generateFlatDescription(c.a.createPoint(f))]:[3,13];case 12:g=n.sent(),d.addBrick(g),n.label=13;case 13:return o.push(d),[3,21];case 14:return this.controller.pushMargins(this.controller.margins.left,this.controller.paperWidth-this.controller.margins.left-c.a.getPageAvailableWidth(this.controller)*c.a.MULTIPLETEXT_TEXT_PERS),[4,this.generateFlatTitle(r)];case 15:return f=n.sent(),d=new s.a(f),p=c.a.createPoint(f,!1,!0),u?[4,this.generateFlatDescription(c.a.createPoint(f))]:[3,17];case 16:g=n.sent(),d.addBrick(g),p.xLeft=Math.max(p.xLeft,g.xRight),n.label=17;case 17:return this.controller.popMargins(),p.xLeft+=this.controller.unitWidth*t.CONTENT_GAP_HOR_SCALE,this.controller.margins.left=p.xLeft,a.xLeft=p.xLeft,[4,this.generateFlatsComposite(p)];case 18:return m=n.sent(),null!==m&&0!=m.length&&(a=c.a.createPoint(c.a.mergeRects.apply(c.a,m)),a.yTop+=this.controller.unitHeight*c.a.GAP_BETWEEN_ROWS,d.addBrick(m.shift())),o.push(d),o.push.apply(o,m),[3,21];case 19:return p=c.a.clone(r),this.controller.pushMargins(),l!==c.a.TITLE_LOCATION_MATRIX&&(p.xLeft+=this.controller.unitWidth*t.CONTENT_INDENT_SCALE,this.controller.margins.left+=this.controller.unitWidth*t.CONTENT_INDENT_SCALE),a=p,T=(x=o.push).apply,F=[o],[4,this.generateFlatsComposite(p)];case 20:return T.apply(x,F.concat([n.sent()])),this.controller.popMargins(),null!==o&&0!==o.length&&(a=c.a.createPoint(c.a.mergeRects.apply(c.a,o)),a.yTop+=this.controller.unitHeight*c.a.GAP_BETWEEN_ROWS),[3,21];case 21:return this.question.hasComment&&"bottom"!==this.question.titleLocation?(w=(_=o).push,[4,this.generateFlatsComment(a)]):[3,23];case 22:w.apply(_,[n.sent()]),n.label=23;case 23:return this.controller.popMargins(),[2,o]}})})},t.CONTENT_GAP_VERT_SCALE=.5,t.CONTENT_GAP_HOR_SCALE=1,t.CONTENT_INDENT_SCALE=1,t.DESC_GAP_SCALE=.0625,t}();r.Serializer.addProperty("question",{name:"readonlyRenderAs",default:"auto",choices:["auto","text","acroform"]})},function(t,e,n){"use strict";var i=n(0),r=n(6);n.d(e,"a",function(){return o});var o=function(t){function e(e,n,i,r){var o=t.call(this,e,n,i)||this;return o.text=r,o.align={align:"left",baseline:"middle"},o}return n.i(i.a)(e,t),e.prototype.escapeText=function(){for(;this.text.indexOf("\t")>-1;)this.text=this.text.replace("\t",Array(5).join(String.fromCharCode(160)));return this.text},e.prototype.renderInteractive=function(){return n.i(i.b)(this,void 0,void 0,function(){var t,e,r;return n.i(i.c)(this,function(n){return t=this.alignPoint(this),e=this.controller.fontSize,this.controller.fontSize=this.fontSize,r=this.controller.doc.getTextColor(),this.controller.doc.setTextColor(this.textColor),this.controller.doc.text(this.escapeText(),t.xLeft,t.yTop,this.align),this.controller.doc.setTextColor(r),this.controller.fontSize=e,[2]})})},e.prototype.alignPoint=function(t){return{xLeft:t.xLeft,yTop:t.yTop+(t.yBot-t.yTop)/2}},e}(r.a)},function(t,e,n){"use strict";var i=n(0),r=n(1);n.d(e,"a",function(){return o});var o=function(){function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.bricks=[],this.isPageBreak=!1,this._xLeft=0,this._xRight=0,this._yTop=0,this._yBot=0,this.addBrick.apply(this,t)}return Object.defineProperty(t.prototype,"xLeft",{get:function(){return this._xLeft},set:function(t){this.shift(t-this.xLeft,0,0,0),this._xLeft=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"xRight",{get:function(){return this._xRight},set:function(t){this.shift(0,t-this.xRight,0,0),this._xRight=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"yTop",{get:function(){return this._yTop},set:function(t){this.shift(0,0,t-this.yTop,0),this._yTop=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"yBot",{get:function(){return this._yBot},set:function(t){this.shift(0,0,0,t-this.yBot),this._yBot=t},enumerable:!1,configurable:!0}),t.prototype.shift=function(t,e,n,i){this.bricks.forEach(function(r){r.xLeft+=t,r.xRight+=e,r.yTop+=n,r.yBot+=i})},Object.defineProperty(t.prototype,"width",{get:function(){return this.xRight-this.xLeft},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.yBot-this.yTop},enumerable:!1,configurable:!0}),t.prototype.render=function(){return n.i(i.b)(this,void 0,void 0,function(){var t;return n.i(i.c)(this,function(e){switch(e.label){case 0:t=0,e.label=1;case 1:return t<this.bricks.length?[4,this.bricks[t].render()]:[3,4];case 2:e.sent(),e.label=3;case 3:return t++,[3,1];case 4:return[2]}})})},Object.defineProperty(t.prototype,"isEmpty",{get:function(){return 0===this.bricks.length},enumerable:!1,configurable:!0}),t.prototype.addBrick=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(0!=e.length){(t=this.bricks).push.apply(t,e);var i=r.a.mergeRects.apply(r.a,this.bricks);this._xLeft=i.xLeft,this._xRight=i.xRight,this._yTop=i.yTop,this._yBot=i.yBot}},t.prototype.unfold=function(){var t=[];return this.bricks.forEach(function(e){t.push.apply(t,e.unfold())}),t},t}()},function(t,e,n){"use strict";var i=n(0),r=n(8),o=n(1);n.d(e,"a",function(){return a});var a=function(){function t(t,e,n){this.question=t,this.controller=e,this.textColor=o.a.TEXT_COLOR,this.formBorderColor=o.a.FORM_BORDER_COLOR,this.isPageBreak=!1,this.xLeft=n.xLeft,this.xRight=n.xRight,this.yTop=n.yTop,this.yBot=n.yBot,this.fontSize=e?e.fontSize:r.b.FONT_SIZE}return Object.defineProperty(t.prototype,"width",{get:function(){return this.xRight-this.xLeft},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.yBot-this.yTop},enumerable:!1,configurable:!0}),t.prototype.render=function(){return n.i(i.b)(this,void 0,void 0,function(){return n.i(i.c)(this,function(t){switch(t.label){case 0:return this.question&&this.question.isReadOnly&&"acroform"!==o.a.getReadonlyRenderAs(this.question,this.controller)?[4,this.renderReadOnly()]:[3,2];case 1:return t.sent(),[3,4];case 2:return[4,this.renderInteractive()];case 3:t.sent(),t.label=4;case 4:return[2]}})})},t.prototype.renderInteractive=function(){return n.i(i.b)(this,void 0,void 0,function(){return n.i(i.c)(this,function(t){return[2]})})},t.prototype.renderReadOnly=function(){return n.i(i.b)(this,void 0,void 0,function(){return n.i(i.c)(this,function(t){switch(t.label){case 0:return[4,this.renderInteractive()];case 1:return t.sent(),[2]}})})},t.prototype.unfold=function(){return[this]},t}()},function(e,n){e.exports=t},function(t,e,n){"use strict";var i=n(0),r=n(18),o=(n.n(r),n(1)),a=n(57),s=n(60),c=(n.n(s),n(61));n.n(c);n.d(e,"a",function(){return l}),n.d(e,"b",function(){return u});var l=function(){function t(e){var n=this;this._base64Normal=void 0,this._base64Bold=void 0,void 0===e.orientation?void 0===e.format||e.format[0]<e.format[1]?this._orientation="p":this._orientation="l":this._orientation=e.orientation,this._format=e.format||"a4",Array.isArray(this._format)&&(this._format=this._format.map(function(e){return e*t.MM_TO_PT})),this._fontSize=e.fontSize||t.FONT_SIZE,this._fontName=e.fontName||"segoe",void 0===e.fontName||void 0===e.base64Normal&&void 0===e.base64Bold?"segoe"===this.fontName&&(this._base64Normal=t.SEGOE_NORMAL,this._base64Bold=t.SEGOE_BOLD):(this._base64Normal=e.base64Normal||e.base64Bold,this._base64Bold=e.base64Bold||e.base64Normal),this._useCustomFontInHtml=e.useCustomFontInHtml&&void 0!==e.base64Normal,this._margins=o.a.clone(e.margins),void 0===this._margins&&(this._margins={}),void 0===this._margins.top&&(this._margins.top=10),void 0===this._margins.bot&&(this._margins.bot=10),void 0===this._margins.left&&(this._margins.left=10),void 0===this._margins.right&&(this._margins.right=10),Object.keys(this._margins).forEach(function(e){n._margins[e]=n._margins[e]*t.MM_TO_PT}),this._htmlRenderAs=e.htmlRenderAs||"auto",this._matrixRenderAs=e.matrixRenderAs||"auto",this._readonlyRenderAs=e.readonlyRenderAs||"auto",this._textFieldRenderAs=e.textFieldRenderAs||"singleLine",this._compress=e.compress||!1,this._applyImageFit=e.applyImageFit||!1}return Object.defineProperty(t.prototype,"leftTopPoint",{get:function(){return{xLeft:this.margins.left,yTop:this.margins.top}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fontSize",{get:function(){return this._fontSize},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fontName",{get:function(){return this._fontName},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"base64Normal",{get:function(){return this._base64Normal},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"base64Bold",{get:function(){return this._base64Bold},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"useCustomFontInHtml",{get:function(){return this._useCustomFontInHtml},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"margins",{get:function(){return this._margins},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"format",{get:function(){return this._format},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"orientation",{get:function(){return this._orientation},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"htmlRenderAs",{get:function(){return this._htmlRenderAs},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"matrixRenderAs",{get:function(){return this._matrixRenderAs},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"readonlyRenderAs",{get:function(){return this._readonlyRenderAs},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"textFieldRenderAs",{get:function(){return this._textFieldRenderAs},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"compress",{get:function(){return this._compress},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"applyImageFit",{get:function(){return this._applyImageFit},enumerable:!1,configurable:!0}),t.MM_TO_PT=72/25.4,t.FONT_SIZE=14,t}(),u=function(t){function e(i){void 0===i&&(i={});var s=t.call(this,i)||this,c={orientation:s.orientation,unit:"pt",format:s.format,compress:s.compress};return s._doc=new r.jsPDF(c),void 0===s.base64Normal||o.a.isFontExist(s,s.fontName)||(e.addFont(s.fontName,s.base64Normal,"normal"),e.addFont(s.fontName,s.base64Bold,"bold"),s._doc=new r.jsPDF(c)),n.i(a.a)(s._doc),s._helperDoc=new r.jsPDF(c),s._doc.setFont(s.fontName),s._helperDoc.setFont(s.fontName),s._doc.setFontSize(s.fontSize),s._helperDoc.setFontSize(s.fontSize),s._fontStyle="normal",s.marginsStack=[],s}return n.i(i.a)(e,t),e.addFont=function(t,n,i){var o=e.customFonts[t];o||(o={},e.customFonts[t]=o),o[i]=n;var a=function(){var n=e.customFonts[t];if(n&&n[i]){var r="".concat(t,"-").concat(i,".ttf");this.addFileToVFS(r,n[i]),this.addFont(r,t,i)}};r.jsPDF.API.events.push(["addFonts",a])},Object.defineProperty(e.prototype,"doc",{get:function(){return this._doc},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"helperDoc",{get:function(){return this._helperDoc},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fontName",{get:function(){return this._fontName},set:function(t){this._fontName=t,this._doc.setFont(t),this._helperDoc.setFont(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fontSize",{get:function(){return this._fontSize},set:function(t){this._fontSize=t,this._doc.setFontSize(t),this._helperDoc.setFontSize(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fontStyle",{get:function(){return this._fontStyle},set:function(t){this._fontStyle=t,this._doc.setFont(this._fontName,t),this._helperDoc.setFont(this._fontName,t)},enumerable:!1,configurable:!0}),e.prototype.measureText=function(t,e,n){var i=this;void 0===t&&(t=1),void 0===e&&(e=this._fontStyle),void 0===n&&(n=this._fontSize);var r=this._helperDoc.getFontSize();this._helperDoc.setFontSize(n),this._helperDoc.setFont(this._fontName,e);var a=this._helperDoc.getLineHeight()/this._helperDoc.internal.scaleFactor,s=0;return"number"==typeof t?s=a*t:(t="string"==typeof t?t:o.a.getLocString(t),s=t.split("").reduce(function(t,e){return t+i._helperDoc.getTextWidth(e)},0)),this._helperDoc.setFontSize(r),this._helperDoc.setFont(this._fontName,"normal"),{width:s,height:a}},Object.defineProperty(e.prototype,"unitWidth",{get:function(){return this.measureText().width},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"unitHeight",{get:function(){return this.measureText().height},enumerable:!1,configurable:!0}),e.prototype.pushMargins=function(t,e){this.marginsStack.push({left:this.margins.left,right:this.margins.right}),void 0!==t&&(this.margins.left=t),void 0!==e&&(this.margins.right=e)},e.prototype.popMargins=function(){var t=this.marginsStack.pop();this.margins.left=t.left,this.margins.right=t.right},Object.defineProperty(e.prototype,"paperWidth",{get:function(){return this.doc.internal.pageSize.width},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"paperHeight",{get:function(){return this.doc.internal.pageSize.height},enumerable:!1,configurable:!0}),e.prototype.getNumberOfPages=function(){return this.doc.getNumberOfPages()},e.prototype.addPage=function(){this.doc.addPage()},e.prototype.setPage=function(t){this.doc.setPage(t+1)},e.customFonts={},e}(l)},function(t,e,n){"use strict";var i=n(0),r=n(7),o=(n.n(r),n(5)),a=n(15),s=n(1),c=n(34),l=n(13);n.d(e,"a",function(){return u});var u=function(){function t(){}return t.generateFlatsPanel=function(t,e,r,o){return n.i(i.b)(this,void 0,void 0,function(){var a,u,h,f,d,p;return n.i(i.c)(this,function(g){switch(g.label){case 0:return a=[],u=s.a.clone(o),e.pushMargins(),e.margins.left+=e.measureText(r.innerIndent).width,u.xLeft+=e.measureText(r.innerIndent).width,f=(h=a.push).apply,d=[a],[4,this.generateFlatsPagePanel(t,e,r,u)];case 1:return f.apply(h,d.concat([g.sent()])),e.popMargins(),p=new c.a(o,a,r,e,l.FlatRepository.getInstance(),l),[4,t.onRenderPanel.fire(t,p)];case 2:return g.sent(),[2,n.i(i.d)([],p.bricks,!0)]}})})},t.generateFlatsPagePanel=function(e,a,c,l){return n.i(i.b)(this,void 0,void 0,function(){var u,h,f,d,p,g,m,v,y,b,x,T,F,_,w,R,P,E,C,O,S,L;return n.i(i.c)(this,function(n){switch(n.label){case 0:return c.isVisible?(c.onFirstRendering(),u=[],h=s.a.clone(l),"page"!==c.getType()||e.showPageTitles?(f=new o.a,c.title?c instanceof r.PanelModel&&c.no?[4,s.a.createTitlePanelFlat(h,a,c.no,"page"===c.getType())]:[3,2]:[3,4]):[3,7]):[2];case 1:d=n.sent(),f.addBrick(d),h.xLeft=d.xRight+a.measureText(" ").width,n.label=2;case 2:return[4,s.a.createTitlePanelFlat(h,a,c.locTitle,"page"===c.getType())];case 3:p=n.sent(),f.addBrick(p),h=s.a.createPoint(p),n.label=4;case 4:return c.description?(c.title&&(h.yTop+=a.unitWidth*t.PANEL_DESC_GAP_SCALE),[4,s.a.createDescFlat(h,null,a,c.locDescription)]):[3,6];case 5:g=n.sent(),f.addBrick(g),h=s.a.createPoint(g),n.label=6;case 6:f.isEmpty||(m=s.a.createPoint(f),f.addBrick(s.a.createRowlineFlat(m,a)),u.push(f),h.yTop+=a.unitHeight*t.PANEL_CONT_GAP_SCALE+s.a.EPSILON),n.label=7;case 7:v=0,y=c.rows,n.label=8;case 8:if(!(v<y.length))return[3,16];if(b=y[v],!b.visible)return[3,15];a.pushMargins(),x=s.a.getPageAvailableWidth(a),T=a.margins.left,F=[],_=0,n.label=9;case 9:return _<b.visibleElements.length?(w=b.visibleElements[_],w.isVisible?(R=s.a.parseWidth(w.renderWidth,x-(b.visibleElements.length-1)*a.unitWidth,b.visibleElements.length),a.margins.left=T+(0!==_?a.unitWidth:0),a.margins.right=a.paperWidth-a.margins.left-R,h.xLeft=a.margins.left,T=a.margins.left+R,w instanceof r.PanelModel?(E=(P=F.push).apply,C=[F],[4,this.generateFlatsPanel(e,a,w,h)]):[3,11]):[3,13]):[3,14];case 10:return E.apply(P,C.concat([n.sent()])),[3,13];case 11:return S=(O=F.push).apply,L=[F],[4,s.a.generateQuestionFlats(e,a,w,h)];case 12:S.apply(O,L.concat([n.sent()])),n.label=13;case 13:return _++,[3,9];case 14:a.popMargins(),h.xLeft=a.margins.left,0!==F.length&&(h.yTop=s.a.mergeRects.apply(s.a,F).yBot,h.xLeft=l.xLeft,h.yTop+=a.unitHeight*t.QUES_GAP_VERT_SCALE,u.push.apply(u,F),u.push(s.a.createRowlineFlat(h,a)),h.yTop+=s.a.EPSILON),n.label=15;case 15:return v++,[3,8];case 16:return[2,u]}})})},t.popRowlines=function(t){for(;t.length>0&&t[t.length-1]instanceof a.a;)t.pop()},t.generateFlatTitle=function(e,r,a){return n.i(i.b)(this,void 0,void 0,function(){var c,l,u,h;return n.i(i.c)(this,function(n){switch(n.label){case 0:return c=new o.a,e.showTitle?e.title?[4,s.a.createTitleSurveyFlat(a,r,e.locTitle)]:[3,2]:[3,4];case 1:l=n.sent(),c.addBrick(l),a=s.a.createPoint(l),n.label=2;case 2:return e.description?(e.title&&(a.yTop+=r.unitWidth*t.PANEL_DESC_GAP_SCALE),h=(u=c).addBrick,[4,s.a.createDescFlat(a,null,r,e.locDescription)]):[3,4];case 3:h.apply(u,[n.sent()]),n.label=4;case 4:return[2,c]}})})},t.generateFlatLogoImage=function(t,e,r){return n.i(i.b)(this,void 0,void 0,function(){var o,a;return n.i(i.c)(this,function(n){switch(n.label){case 0:return[4,s.a.createImageFlat(r,null,e,s.a.getLocString(t.locLogo),s.a.pxToPt(t.logoWidth),s.a.pxToPt(t.logoHeight))];case 1:return o=n.sent(),a=0,"right"===t.logoPosition?a=s.a.getPageAvailableWidth(e)-o.width:"left"!==t.logoPosition&&(a=s.a.getPageAvailableWidth(e)/2-o.width/2),o.xLeft+=a,o.xRight+=a,[2,o]}})})},t.generateFlats=function(e,r){return n.i(i.b)(this,void 0,void 0,function(){var o,a,u,h,a,u,a,a,f,u,d,p,g,m,v,y,b,x;return n.i(i.c)(this,function(T){switch(T.label){case 0:return o=[],e.hasLogo?[3,2]:[4,this.generateFlatTitle(e,r,r.leftTopPoint)];case 1:return a=T.sent(),a.isEmpty||o.push([a]),[3,11];case 2:return e.isLogoBefore?[4,this.generateFlatLogoImage(e,r,r.leftTopPoint)]:[3,5];case 3:return u=T.sent(),o.push([u]),h=s.a.createPoint(u,"top"===e.logoPosition,"top"!==e.logoPosition),"top"!==e.logoPosition?(r.pushMargins(),h.xLeft+=r.unitWidth,r.margins.left+=u.width+r.unitWidth):(h.xLeft=r.leftTopPoint.xLeft,h.yTop+=r.unitHeight/2),[4,this.generateFlatTitle(e,r,h)];case 4:return a=T.sent(),"top"!==e.logoPosition&&r.popMargins(),a.isEmpty||o[0].push(a),[3,11];case 5:return"right"!==e.logoPosition?[3,8]:[4,this.generateFlatLogoImage(e,r,r.leftTopPoint)];case 6:return u=T.sent(),o.push([u]),r.pushMargins(),r.margins.right+=u.width+r.unitWidth,[4,this.generateFlatTitle(e,r,r.leftTopPoint)];case 7:return a=T.sent(),a.isEmpty||o[0].unshift(a),r.popMargins(),[3,11];case 8:return[4,this.generateFlatTitle(e,r,r.leftTopPoint)];case 9:return a=T.sent(),f=r.leftTopPoint,a.isEmpty||(o.push([a]),f=s.a.createPoint(a),f.yTop+=r.unitHeight/2),[4,this.generateFlatLogoImage(e,r,f)];case 10:u=T.sent(),0!==o.length?o[0].push(u):o.push([u]),T.label=11;case 11:d=r.leftTopPoint,0!==o.length&&(d.yTop=s.a.createPoint(s.a.mergeRects.apply(s.a,o[0])).yTop,o[0].push(s.a.createRowlineFlat(d,r)),d.yTop+=r.unitHeight*t.PANEL_CONT_GAP_SCALE+s.a.EPSILON),p=0,T.label=12;case 12:return p<e.visiblePages.length?(g=[],v=(m=g.push).apply,y=[g],[4,this.generateFlatsPagePanel(e,r,e.visiblePages[p],d)]):[3,16];case 13:return v.apply(m,y.concat([T.sent()])),b=new c.b(d,g,e.visiblePages[p],r,l.FlatRepository.getInstance(),l),[4,e.onRenderPage.fire(e,b)];case 14:T.sent(),g=n.i(i.d)([],b.bricks,!0),0===p&&0!==o.length?(x=o[0]).push.apply(x,g):o.push(g),this.popRowlines(o[o.length-1]),d.yTop=r.leftTopPoint.yTop,T.label=15;case 15:return p++,[3,12];case 16:return[2,o]}})})},t.QUES_GAP_VERT_SCALE=1.5,t.PANEL_CONT_GAP_SCALE=1,t.PANEL_DESC_GAP_SCALE=.25,t}()},function(t,e,n){"use strict";var i=n(0),r=n(6),o=n(4),a=n(1);n.d(e,"a",function(){return s});var s=function(t){function e(e,n,i,r,o,a){var s=t.call(this,e,n,i)||this;return s.fieldName=r,s.readonly=o,s.checked=a,s.question=e,s.textColor=s.formBorderColor,s}return n.i(i.a)(e,t),e.prototype.renderInteractive=function(){return n.i(i.b)(this,void 0,void 0,function(){var t,r;return n.i(i.c)(this,function(n){switch(n.label){case 0:return this.readonly&&"acroform"!==a.a.getReadonlyRenderAs(this.question,this.controller)?[4,this.renderReadOnly()]:[3,2];case 1:return[2,n.sent()];case 2:return t=new this.controller.doc.AcroFormCheckBox,r=a.a.formScale(this.controller,this),t.maxFontSize=this.height*r*e.FONT_SIZE_SCALE,t.caption=e.CHECKMARK_READONLY_SYMBOL,t.textAlign="center",t.fieldName=this.fieldName,t.readOnly=this.readonly,t.color=this.formBorderColor,t.value=!!this.checked&&"On",t.AS=this.checked?"/On":"/Off",t.Rect=a.a.createAcroformRect(a.a.scaleRect(this,r)),this.controller.doc.addField(t),a.a.renderFlatBorders(this.controller,this),[2]}})})},e.prototype.renderReadOnly=function(){return n.i(i.b)(this,void 0,void 0,function(){var t,r,s,c,l;return n.i(i.c)(this,function(n){switch(n.label){case 0:return a.a.renderFlatBorders(this.controller,this),this.checked?(t=a.a.createPoint(this,!0,!0),r=this.controller.fontName,this.controller.fontName=e.CHECKMARK_READONLY_FONT,s=this.controller.fontSize,this.controller.fontSize=s*e.CHECKMARK_READONLY_FONT_SIZE_SCALE,c=this.controller.measureText(e.CHECKMARK_READONLY_SYMBOL),t.xLeft+=this.width/2-c.width/2,t.yTop+=this.height/2-c.height/2,[4,a.a.createTextFlat(t,this.question,this.controller,e.CHECKMARK_READONLY_SYMBOL,o.a)]):[3,3];case 1:return l=n.sent(),l.unfold()[0].textColor=this.textColor,this.controller.fontSize=s,[4,l.render()];case 2:n.sent(),this.controller.fontName=r,n.label=3;case 3:return[2]}})})},e.FONT_SIZE_SCALE=.7,e.CHECKMARK_READONLY_SYMBOL="3",e.CHECKMARK_READONLY_FONT="zapfdingbats",e.CHECKMARK_READONLY_FONT_SIZE_SCALE=1-Math.E/10,e}(r.a)},function(t,e,n){"use strict";var i=n(0),r=n(2),o=n(31),a=n(14);n.d(e,"a",function(){return s});var s=function(t){function e(e,n,i){var r=t.call(this,e,n,i)||this;return r.survey=e,r.controller=i,r.question=n,r}return n.i(i.a)(e,t),e.prototype.generateFlatItem=function(t,e,n,i,r){0===n?(this.radioGroupWrap=new o.b(this.question.id+(void 0===i?"":i),this.controller,this.question.isReadOnly),this.question.pdfRadioGroupWrap=this.radioGroupWrap):void 0===this.radioGroupWrap&&(this.radioGroupWrap=this.question.pdfRadioGroupWrap);var a=void 0===r?e===this.question.otherItem?this.question.isOtherSelected:e.value===this.question.value||void 0!==this.question.isItemSelected&&this.question.isItemSelected(e):r;return new o.a(this.question,this.controller,t,n,a,this.radioGroupWrap)},e}(a.a);r.a.getInstance().register("radiogroup",s),r.a.getInstance().register("buttongroup",s)},function(t,e,n){"use strict";var i=n(0),r=n(4);n.d(e,"a",function(){return o});var o=function(t){function e(e,n,i,r){return t.call(this,e,n,i,r)||this}return n.i(i.a)(e,t),e.prototype.renderInteractive=function(){return n.i(i.b)(this,void 0,void 0,function(){return n.i(i.c)(this,function(e){switch(e.label){case 0:return this.controller.fontStyle="bold",[4,t.prototype.renderInteractive.call(this)];case 1:return e.sent(),this.controller.fontStyle="normal",[2]}})})},e}(r.a)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(54);n.d(e,"SurveyPDF",function(){return i.a});var r=n(1);n.d(e,"SurveyHelper",function(){return r.a});var o=n(8);n.d(e,"DocOptions",function(){return o.a}),n.d(e,"DocController",function(){return o.b});var a=n(2);n.d(e,"FlatRepository",function(){return a.a});var s=n(3);n.d(e,"FlatQuestion",function(){return s.a});var c=n(35);n.d(e,"FlatBoolean",function(){return c.a});var l=n(36);n.d(e,"FlatCheckbox",function(){return l.a});var u=n(38);n.d(e,"FlatCustomModel",function(){return u.a});var h=n(37);n.d(e,"FlatComment",function(){return h.a});var f=n(39);n.d(e,"FlatDropdown",function(){return f.a});var d=n(40);n.d(e,"FlatExpression",function(){return d.a});var p=n(41);n.d(e,"FlatFile",function(){return p.a});var g=n(42);n.d(e,"FlatHTML",function(){return g.a});var m=n(43);n.d(e,"FlatImage",function(){return m.a});var v=n(44);n.d(e,"FlatImagePicker",function(){return v.a});var y=n(48);n.d(e,"FlatPanelDynamic",function(){return y.a});var b=n(11);n.d(e,"FlatRadiogroup",function(){return b.a});var x=n(49);n.d(e,"FlatRanking",function(){return x.a});var T=n(50);n.d(e,"FlatRating",function(){return T.a});var F=n(14);n.d(e,"FlatSelectBase",function(){return F.a});var _=n(51);n.d(e,"FlatSignaturePad",function(){return _.a});var w=n(52);n.d(e,"FlatTextbox",function(){return w.a});var R=n(9);n.d(e,"FlatSurvey",function(){return R.a});var P=n(45);n.d(e,"FlatMatrix",function(){return P.a});var E=n(21);n.d(e,"FlatMatrixMultiple",function(){return E.a});var C=n(46);n.d(e,"FlatMatrixDynamic",function(){return C.a});var O=n(47);n.d(e,"FlatMultipleText",function(){return O.a});var S=n(22);n.d(e,"PagePacker",function(){return S.a});var L=n(20);n.d(e,"EventHandler",function(){return L.a});var A=n(19);n.d(e,"HorizontalAlign",function(){return A.a}),n.d(e,"VerticalAlign",function(){return A.b}),n.d(e,"DrawCanvas",function(){return A.c});var B=n(6);n.d(e,"PdfBrick",function(){return B.a});var N=n(23);n.d(e,"BooleanItemBrick",function(){return N.a});var I=n(24);n.d(e,"CheckboxItemBrick",function(){return I.a});var M=n(10);n.d(e,"CheckItemBrick",function(){return M.a});var W=n(25);n.d(e,"CommentBrick",function(){return W.a});var q=n(5);n.d(e,"CompositeBrick",function(){return q.a});var k=n(53);n.d(e,"CustomBrick",function(){return k.a});var H=n(26);n.d(e,"DropdownBrick",function(){return H.a});var D=n(27);n.d(e,"EmptyBrick",function(){return D.a});var j=n(28);n.d(e,"HTMLBrick",function(){return j.a});var z=n(29);n.d(e,"ImageBrick",function(){return z.a});var G=n(30);n.d(e,"LinkBrick",function(){return G.a});var V=n(31);n.d(e,"RadioItemBrick",function(){return V.a});var U=n(32);n.d(e,"RankingItemBrick",function(){return U.a});var Q=n(15);n.d(e,"RowlineBrick",function(){return Q.a});var Y=n(17);n.d(e,"TextFieldBrick",function(){return Y.a});var K=n(12);n.d(e,"TextBoldBrick",function(){return K.a});var X=n(16);n.d(e,"TextBoxBrick",function(){return X.a});var Z=n(4);n.d(e,"TextBrick",function(){return Z.a});var J=n(33);n.d(e,"TitlePanelBrick",function(){return J.a})},function(t,e,n){"use strict";var i=n(0),r=n(3),o=n(4),a=n(5),s=n(1);n.d(e,"a",function(){return c});var c=function(t){function e(e,n,i){var r=t.call(this,e,n,i)||this;return r.survey=e,r.controller=i,r.question=n,r}return n.i(i.a)(e,t),e.prototype.generateFlatComposite=function(t,e,r){return n.i(i.b)(this,void 0,void 0,function(){var c,l,u,h,f,d,p,g,m;return n.i(i.c)(this,function(n){switch(n.label){case 0:return c=new a.a,(l=s.a.createRect(t,this.controller.unitWidth,this.controller.unitHeight),u=this.generateFlatItem(s.a.moveRect(s.a.scaleRect(l,s.a.SELECT_ITEM_FLAT_SCALE),t.xLeft),e,r),c.addBrick(u),h=s.a.clone(t),h.xLeft=u.xRight+this.controller.unitWidth*s.a.GAP_BETWEEN_ITEM_TEXT,null===e.locText.renderedHtml)?[3,2]:(d=(f=c).addBrick,[4,s.a.createTextFlat(h,this.question,this.controller,e.locText,o.a)]);case 1:d.apply(f,[n.sent()]),n.label=2;case 2:return e===this.question.otherItem&&(e.value===this.question.value||void 0!==this.question.isOtherSelected&&this.question.isOtherSelected)?(p=s.a.createPoint(c),p.yTop+=this.controller.unitHeight*s.a.GAP_BETWEEN_ROWS,m=(g=c).addBrick,[4,s.a.createCommentFlat(p,this.question,this.controller,s.a.OTHER_ROWS_COUNT,!1,r)]):[3,4];case 3:m.apply(g,[n.sent()]),n.label=4;case 4:return[2,c]}})})},e.prototype.generateFlatsContent=function(t){return n.i(i.b)(this,void 0,void 0,function(){var e,r;return n.i(i.c)(this,function(n){switch(n.label){case 0:return e=this.question.colCount,0==this.question.colCount?(e=Math.floor(s.a.getPageAvailableWidth(this.controller)/this.controller.measureText(s.a.MATRIX_COLUMN_WIDTH).width)||1,this.question.visibleChoices.length<e&&(e=this.question.visibleChoices.length)):this.question.colCount>1&&(e=s.a.getColumnWidth(this.controller,this.question.colCount)<this.controller.measureText(s.a.MATRIX_COLUMN_WIDTH).width?1:this.question.colCount),1!=e?[3,2]:[4,this.generateVerticallyItems(t,this.question.visibleChoices)];case 1:return r=n.sent(),[3,4];case 2:return[4,this.generateHorisontallyItems(t,e)];case 3:r=n.sent(),n.label=4;case 4:return[2,r]}})})},e.prototype.generateVerticallyItems=function(t,e){return n.i(i.b)(this,void 0,void 0,function(){var r,o,a,c;return n.i(i.c)(this,function(n){switch(n.label){case 0:r=s.a.clone(t),o=[],a=0,n.label=1;case 1:return a<e.length?[4,this.generateFlatComposite(r,e[a],a)]:[3,4];case 2:c=n.sent(),r.yTop=c.yBot+s.a.GAP_BETWEEN_ROWS*this.controller.unitHeight,o.push(c),n.label=3;case 3:return a++,[3,1];case 4:return[2,o]}})})},e.prototype.generateHorisontallyItems=function(t,e){return n.i(i.b)(this,void 0,void 0,function(){var r,o,c,l,u,h;return n.i(i.c)(this,function(n){switch(n.label){case 0:r=s.a.clone(t),o=[],c=new a.a,l=0,n.label=1;case 1:return l<this.question.visibleChoices.length?(this.controller.pushMargins(this.controller.margins.left,this.controller.margins.right),s.a.setColumnMargins(this.controller,e,l%e),r.xLeft=this.controller.margins.left,[4,this.generateFlatComposite(r,this.question.visibleChoices[l],l)]):[3,4];case 2:u=n.sent(),c.addBrick(u),this.controller.popMargins(),l%e!=e-1&&l!==this.question.visibleChoices.length-1||(h=s.a.createRowlineFlat(s.a.createPoint(c),this.controller),r.yTop=h.yBot+s.a.GAP_BETWEEN_ROWS*this.controller.unitHeight,o.push(c,h),c=new a.a),n.label=3;case 3:return l++,[3,1];case 4:return[2,o]}})})},e}(r.a)},function(t,e,n){"use strict";var i=n(0);n.d(e,"a",function(){return r});var r=function(){function t(t,e,n){this.controller=t,this.color=n,this.isPageBreak=!1,this.xLeft=e.xLeft,this.xRight=e.xRight,this.yTop=e.yTop,this.yBot=e.yBot}return Object.defineProperty(t.prototype,"width",{get:function(){return this.xRight-this.xLeft},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.yBot-this.yTop},enumerable:!1,configurable:!0}),t.prototype.render=function(){return n.i(i.b)(this,void 0,void 0,function(){var t;return n.i(i.c)(this,function(e){return null!==this.color&&(t=this.controller.doc.getDrawColor(),this.controller.doc.setDrawColor(this.color),this.controller.doc.line(this.xLeft,this.yTop,this.xRight,this.yTop),this.controller.doc.setDrawColor(t)),[2]})})},t.prototype.unfold=function(){return[this]},t}()},function(t,e,n){"use strict";var i=n(0),r=n(17),o=n(1);n.d(e,"a",function(){return a});var a=function(t){function e(e,n,i,r,a,s){void 0===r&&(r=!0),void 0===a&&(a=!1),void 0===s&&(s=0);var c=t.call(this,e,n,i,r,e.id+(r?"":"_comment"+s),o.a.getQuestionOrCommentValue(e,r),r?o.a.getLocString(e.locPlaceHolder):"",e.isReadOnly,a,e.inputType)||this;return c.isQuestion=r,c.isMultiline=a,c}return n.i(i.a)(e,t),e}(r.a)},function(t,e,n){"use strict";var i=n(0),r=n(6),o=n(1);n.d(e,"a",function(){return a});var a=function(t){function e(e,n,i,r,o,a,s,c,l,u){var h=t.call(this,e,n,i)||this;return h.isQuestion=r,h.fieldName=o,h.value=a,h.placeholder=s,h.isReadOnly=c,h.isMultiline=l,h.inputType=u,h.question=e,h}return n.i(i.a)(e,t),e.prototype.renderColorQuestion=function(){var t=this.controller.doc.getFillColor();this.controller.doc.setFillColor(this.question.value||"black"),this.controller.doc.rect(this.xLeft,this.yTop,this.width,this.height,"F"),this.controller.doc.setFillColor(t)},e.prototype.renderInteractive=function(){return n.i(i.b)(this,void 0,void 0,function(){var t,e;return n.i(i.c)(this,function(n){return"color"===this.inputType?(this.renderColorQuestion(),[2]):(t="password"===this.inputType?new this.controller.doc.AcroFormPasswordField:new this.controller.doc.AcroFormTextField,t.fieldName=this.fieldName,t.fontName=this.controller.fontName,t.fontSize=this.fontSize,t.isUnicode=o.a.isCustomFont(this.controller,t.fontName),"password"!==this.inputType?(t.V=" "+this.value,t.DV=" "+this.placeholder):t.value="",t.multiline=this.isMultiline,t.readOnly=this.isReadOnly,t.color=this.textColor,e=o.a.formScale(this.controller,this),t.maxFontSize=this.controller.fontSize*e,t.Rect=o.a.createAcroformRect(o.a.scaleRect(this,e)),this.controller.doc.addField(t),o.a.renderFlatBorders(this.controller,this),[2])})})},e.prototype.renderReadOnly=function(){return n.i(i.b)(this,void 0,void 0,function(){return n.i(i.c)(this,function(t){switch(t.label){case 0:return this.controller.pushMargins(this.xLeft,this.controller.paperWidth-this.xRight),"color"!==this.inputType?[3,1]:(this.renderColorQuestion(),[3,3]);case 1:return[4,o.a.renderReadOnlyTextField(this.controller,this.question,this,o.a.getQuestionOrCommentDisplayValue(this.question,this.isQuestion),!this.isMultiline)];case 2:t.sent(),t.label=3;case 3:return this.controller.popMargins(),[2]}})})},e}(r.a)},function(t,n){t.exports=e},function(t,e,n){"use strict";var i=n(0),r=n(8),o=n(4),a=n(12),s=n(1);n.d(e,"a",function(){return c}),n.d(e,"b",function(){return l}),n.d(e,"c",function(){return u});var c;!function(t){t.NotSet="notset",t.Left="left",t.Center="center",t.Right="right"}(c||(c={}));var l;!function(t){t.NotSet="notset",t.Top="top",t.Middle="middle",t.Bottom="bottom"}(l||(l={}));var u=function(){function t(t,e,n,i,r){this.packs=t,this.controller=e,this._rect=n,this._countPages=i,this._pageNumber=r}return Object.defineProperty(t.prototype,"countPages",{get:function(){return this._countPages},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pageNumber",{get:function(){return this._pageNumber},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rect",{get:function(){return this._rect},enumerable:!1,configurable:!0}),t.prototype.alignRect=function(t,e){void 0===t.margins?t.margins={left:0,right:0,top:0,bot:0}:(void 0===t.margins.left&&(t.margins.left=0),void 0===t.margins.right&&(t.margins.right=0),void 0===t.margins.top&&(t.margins.top=0),void 0===t.margins.bot&&(t.margins.bot=0)),void 0===t.rect&&(void 0!==t.horizontalAlign&&t.horizontalAlign!==c.NotSet||(t.horizontalAlign=c.Center),void 0!==t.verticalAlign&&t.verticalAlign!==l.NotSet||(t.verticalAlign=l.Middle));var n=s.a.clone(this.rect);if(void 0!==t.horizontalAlign)switch(t.horizontalAlign){case c.Left:n.xLeft=this.rect.xLeft+t.margins.left,n.xRight=Math.min(this.rect.xRight-t.margins.right,this.rect.xLeft+t.margins.left+e.width);break;case c.Center:n.xLeft=Math.max(this.rect.xLeft+t.margins.left,(this.rect.xLeft+this.rect.xRight-e.width)/2),n.xRight=Math.min(this.rect.xRight-t.margins.right,(this.rect.xLeft+this.rect.xRight+e.width)/2);break;case c.Right:n.xLeft=Math.max(this.rect.xLeft+t.margins.left,this.rect.xRight-t.margins.right-e.width),n.xRight=this.rect.xRight-t.margins.right}else n.xLeft=t.rect.xLeft||this.rect.xLeft,n.xRight=t.rect.xRight||this.rect.xRight;if(void 0!==t.verticalAlign)switch(t.verticalAlign){case l.Top:n.yTop=this.rect.yTop+t.margins.top,n.yBot=Math.min(this.rect.yBot-t.margins.bot,this.rect.yTop+t.margins.top+e.height);break;case l.Middle:n.yTop=Math.max(this.rect.yTop+t.margins.top,(this.rect.yTop+this.rect.yBot-e.height)/2),n.yBot=Math.min(this.rect.yBot-t.margins.bot,(this.rect.yTop+this.rect.yBot+e.height)/2);break;case l.Bottom:n.yTop=Math.max(this.rect.yTop+t.margins.top,this.rect.yBot-t.margins.bot-e.height),n.yBot=this.rect.yBot-t.margins.bot}else n.yTop=t.rect.yTop||this.rect.yTop,n.yBot=t.rect.yBot||this.rect.yBot;return n},t.prototype.drawText=function(t){t=s.a.clone(t),void 0===t.fontSize&&(t.fontSize=r.a.FONT_SIZE),void 0===t.isBold&&(t.isBold=!1);var e=this.controller.measureText(t.text,t.isBold?"bold":"normal",t.fontSize),n=this.alignRect(t,e);t.isBold?this.packs.push(new a.a(null,this.controller,n,t.text)):this.packs.push(new o.a(null,this.controller,n,t.text)),this.packs[this.packs.length-1].fontSize=t.fontSize},t.prototype.drawImage=function(t){return n.i(i.b)(this,void 0,void 0,function(){var e,r,o,a;return n.i(i.c)(this,function(n){switch(n.label){case 0:return t=s.a.clone(t),void 0===t.width&&(t.width=this.rect.xRight-this.rect.xLeft),void 0===t.height&&(t.height=this.rect.yBot-this.rect.yTop),e={width:t.width,height:t.height},r=this.alignRect(t,e),a=(o=this.packs).push,[4,s.a.createImageFlat(s.a.createPoint(r,!0,!0),null,this.controller,t.base64,r.xRight-r.xLeft,r.yBot-r.yTop)];case 1:return a.apply(o,[n.sent()]),[2]}})})},t}()},function(t,e,n){"use strict";var i=n(0),r=n(7),o=(n.n(r),n(19)),a=n(1);n.d(e,"b",function(){return s}),n.d(e,"a",function(){return c});var s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.i(i.a)(e,t),e.prototype.unshift=function(t){this.hasFunc(t)||(null==this.callbacks&&(this.callbacks=new Array),this.callbacks.unshift(t))},e.prototype.fire=function(t,e){return n.i(i.b)(this,void 0,void 0,function(){var r;return n.i(i.c)(this,function(n){switch(n.label){case 0:if(null==this.callbacks)return[2];r=0,n.label=1;case 1:return r<this.callbacks.length?[4,this.callbacks[r](t,e)]:[3,4];case 2:n.sent(),n.label=3;case 3:return r++,[3,1];case 4:return[2]}})})},e}(r.Event),c=function(){function t(){}return t.process_header_events=function(t,e,n){t.haveCommercialLicense||t.onRenderHeader.add(function(t,e){e.drawText({text:"SurveyJS PDF | Please purchase a SurveyJS PDF developer license to use it in your app | https://surveyjs.io/Buy",fontSize:10})});for(var i=0;i<n.length;i++)t.onRenderHeader.fire(t,new o.c(n[i],e,a.a.createHeaderRect(e),n.length,i+1)),t.onRenderFooter.fire(t,new o.c(n[i],e,a.a.createFooterRect(e),n.length,i+1))},t}()},function(t,e,n){"use strict";var i=n(0),r=n(7),o=(n.n(r),n(3)),a=n(2),s=n(4),c=n(5),l=n(1),u=n(9);n.d(e,"a",function(){return h});var h=function(t){function e(e,n,i,r){void 0===r&&(r=!0);var o=t.call(this,e,n,i)||this;return o.survey=e,o.isMultiple=r,o.question=n,o}return n.i(i.a)(e,t),e.prototype.generateFlatsCell=function(t,e,r){return n.i(i.b)(this,void 0,void 0,function(){var o,u,h,f,d,p,g,m,v,y;return n.i(i.c)(this,function(n){switch(n.label){case 0:return o=new c.a,e.hasQuestion?e.cell.column.isShowInMultipleColumns?(u=a.a.getInstance().create(this.survey,e.question,this.controller,e.question.getType()),h=l.a.moveRect(l.a.scaleRect(l.a.createRect(t,this.controller.unitHeight,this.controller.unitHeight),l.a.SELECT_ITEM_FLAT_SCALE),t.xLeft),o.addBrick(u.generateFlatItem(h,e.item,e.choiceIndex)),[3,3]):[3,1]:[3,4];case 1:return e.question.titleLocation=l.a.TITLE_LOCATION_MATRIX,d=(f=o.addBrick).apply,p=[o],[4,l.a.generateQuestionFlats(this.survey,this.controller,e.question,t)];case 2:d.apply(f,p.concat([n.sent()])),n.label=3;case 3:return[3,8];case 4:return e.hasTitle?r?(m=(g=o).addBrick,[4,l.a.createBoldTextFlat(t,this.question,this.controller,e.locTitle)]):[3,6]:[3,8];case 5:return m.apply(g,[n.sent()]),[3,8];case 6:return y=(v=o).addBrick,[4,l.a.createTextFlat(t,this.question,this.controller,e.locTitle,s.a)];case 7:y.apply(v,[n.sent()]),n.label=8;case 8:return[2,o]}})})},e.prototype.generateFlatsRowHorisontal=function(t,e,r,o){return n.i(i.b)(this,void 0,void 0,function(){var a,s,u,h,f,d;return n.i(i.c)(this,function(n){switch(n.label){case 0:a=new c.a,s=l.a.clone(t),u=this.controller.paperWidth-this.controller.margins.left+this.controller.unitWidth*l.a.GAP_BETWEEN_COLUMNS,this.controller.pushMargins(),h=0,f="none"!==this.question.detailPanelMode?1:0,n.label=1;case 1:return f<e.cells.length?h==r?[3,4]:(this.controller.margins.left=this.controller.paperWidth-u+this.controller.unitWidth*l.a.GAP_BETWEEN_COLUMNS,this.controller.margins.right=this.controller.paperWidth-this.controller.margins.left-o[h],u=this.controller.margins.right,s.xLeft=this.controller.margins.left,[4,this.generateFlatsCell(s,e.cells[f],e===this.question.renderedTable.headerRow)]):[3,4];case 2:d=n.sent(),d.isEmpty||(a.addBrick(d),h++),n.label=3;case 3:return f++,[3,1];case 4:return this.controller.popMargins(),[2,a]}})})},e.prototype.generateFlatsRowVertical=function(t,r,o){return n.i(i.b)(this,void 0,void 0,function(){var a,s,u,h,f,d,p;return n.i(i.c)(this,function(n){switch(n.label){case 0:a=new c.a,s=l.a.clone(t),u=0,n.label=1;case 1:return u<Math.min(o,r.cells.length)?this.question.renderedTable.showHeader&&(!this.isMultiple||u>0)?(f=(h=a).addBrick,[4,this.generateFlatsCell(s,this.question.renderedTable.headerRow.cells[u],!1)]):[3,3]:[3,6];case 2:f.apply(h,[n.sent()]),s.yTop=a.yBot+e.GAP_BETWEEN_ROWS*this.controller.unitHeight,n.label=3;case 3:return p=(d=a).addBrick,[4,this.generateFlatsCell(s,r.cells[u],!1)];case 4:p.apply(d,[n.sent()]),s.yTop=a.yBot+e.GAP_BETWEEN_ROWS*this.controller.unitHeight,n.label=5;case 5:return u++,[3,1];case 6:return[2,a]}})})},e.prototype.calculateColumnWidth=function(t,e){for(var n=l.a.getPageAvailableWidth(this.controller)-(e-1)*this.controller.unitWidth*l.a.GAP_BETWEEN_COLUMNS,i=n,r=e,o=[],a=0;a<e;a++){var s=l.a.parseWidth(t[0].cells[a].width,n,e)||0;i-=s,0!==s&&r--,o.push(s)}if(0===r)return o;for(var c=this.controller.measureText(l.a.MATRIX_COLUMN_WIDTH).width,u=l.a.parseWidth(t[0].cells[0].minWidth,i,e)||0,h=i/r,f=Math.max(c,u,h),a=0;a<o.length;a++)0===o[a]&&(o[a]=f);return o},e.prototype.generateOneRow=function(t,e,r,o,a){return n.i(i.b)(this,void 0,void 0,function(){return n.i(i.c)(this,function(n){switch(n.label){case 0:return o?[4,this.generateFlatsRowHorisontal(t,e,r,a)]:[3,2];case 1:return[2,n.sent()];case 2:return[4,this.generateFlatsRowVertical(t,e,r)];case 3:return[2,n.sent()]}})})},e.prototype.generateFlatsRows=function(t,r,o,a){return n.i(i.b)(this,void 0,void 0,function(){var s,h,f,d,p,g,m,v,y;return n.i(i.c)(this,function(n){switch(n.label){case 0:s=l.a.clone(t),h=[],f=0,n.label=1;case 1:return f<r.length?[4,this.generateOneRow(s,r[f],o,a,this.calculateColumnWidth(r,o))]:[3,6];case 2:if(d=n.sent(),d.isEmpty)return[3,5];if(f!==r.length-1&&(s.yTop=d.yBot,d.addBrick(l.a.createRowlineFlat(s,this.controller))),h.push(d),s.yTop=d.yBot+e.GAP_BETWEEN_ROWS*this.controller.unitHeight,!("none"!==this.question.detailPanelMode&&f>0))return[3,5];for(p=this.question.detailPanelValue,g=0;g<p.questions.length;g++)p.questions[g].id+="_"+f;return[4,u.a.generateFlatsPanel(this.survey,this.controller,p,s)];case 3:return m=n.sent(),v=new c.a,v.addBrick.apply(v,m),s.yTop=v.yBot+e.GAP_BETWEEN_ROWS*this.controller.unitHeight,h.push(v),f!==r.length-1&&this.question.renderedTable.showHeader&&a?[4,this.generateOneRow(s,r[0],o,a,this.calculateColumnWidth(r,o))]:[3,5];case 4:y=n.sent(),s.yTop=y.yBot+e.GAP_BETWEEN_ROWS*this.controller.unitHeight,h.push(y),n.label=5;case 5:return f++,[3,1];case 6:return[2,h]}})})},e.prototype.generateFlatsContent=function(t){return n.i(i.b)(this,void 0,void 0,function(){var e,r,o,a,s,u;return n.i(i.c)(this,function(n){switch(n.label){case 0:return e=this.question.renderedTable,(r="vertical"===this.question.columnLayout,0===(o=e.rows[0]?e.rows[0].cells.length-(e.hasRemoveRows&&!r?"none"!==this.question.detailPanelMode?2:1:0):e.showHeader&&e.headerRow?e.headerRow.cells.length:e.showFooter&&e.footerRow?e.footerRow.cells.length:0))?[2,[new c.a(l.a.createRowlineFlat(t,this.controller))]]:(a=[],s=l.a.getColumnWidth(this.controller,o),u="list"!==this.question.renderAs&&"list"!==this.controller.matrixRenderAs&&s>=this.controller.measureText(l.a.MATRIX_COLUMN_WIDTH).width,e.showHeader&&u&&a.push(e.headerRow),a.push.apply(a,e.rows),e.hasRemoveRows&&r&&a.pop(),e.showFooter&&u&&a.push(e.footerRow),[4,this.generateFlatsRows(t,a,o,u)]);case 1:return[2,n.sent()]}})})},e.GAP_BETWEEN_ROWS=.5,e}(o.a);r.Serializer.removeProperty("matrixdropdown","renderAs"),r.Serializer.addProperty("matrixdropdown",{name:"renderAs",default:"auto",choices:["auto","list"]}),a.a.getInstance().register("matrixdropdown",h)},function(t,e,n){"use strict";var i=n(55),r=n.n(i),o=n(1);n.d(e,"a",function(){return a});var a=function(){function t(){}return t.findBotInterval=function(t,e,n,i){var r=t.search(e,n);return r.push({pageIndex:0,xLeft:i.margins.left,xRight:i.margins.left,yBot:i.margins.top,absBot:i.margins.top}),r.reduce(function(t,i){return Math.abs(i.xRight-e)<o.a.EPSILON||Math.abs(i.xLeft-n)<o.a.EPSILON?t:i.pageIndex<t.pageIndex?t:i.pageIndex>t.pageIndex?i:i.yBot>t.yBot?i:t},r[r.length-1])},t.addPack=function(t,e,n){for(var i=t.length;i<=e;i++)t.push([]);t[e].push(n)},t.pack=function(e,n){var i=n.paperHeight-n.margins.top-n.margins.bot,a=[];e.forEach(function(t){a.push([]),t.forEach(function(t){var e;t.height>i+o.a.EPSILON?(e=a[a.length-1]).push.apply(e,t.unfold()):a[a.length-1].push(t)})}),a.forEach(function(t){t.sort(function(t,e){return t.yTop<e.yTop?-1:t.yTop>e.yTop?1:t.xLeft>e.xLeft?1:t.xLeft<e.xLeft?-1:0})});var s=0,c=[],l=n.paperHeight-n.margins.bot;return a.forEach(function(e){var i=new r.a,a=0;e.forEach(function(e){var r=t.findBotInterval(i,e.xLeft,e.xRight,n),u=r.pageIndex,h=r.yBot,f=r.absBot,d=e.height;e.yTop=h+e.yTop-f,(Math.abs(e.yTop-n.margins.top)>o.a.EPSILON&&e.yTop+d>l+o.a.EPSILON||e.isPageBreak)&&(e.yTop=n.margins.top,u++,a=Math.max(a,u)),i.insert(e.xLeft,e.xRight,{pageIndex:u,xLeft:e.xLeft,xRight:e.xRight,yBot:e.yTop+d,absBot:e.yBot}),e.yBot=e.yTop+d,t.addPack(c,s+u,e)}),s+=a+1}),c},t}()},function(t,e,n){"use strict";var i=n(0),r=n(10);n.d(e,"a",function(){return o});var o=function(t){function e(e,n,i){return t.call(this,e,n,i,e.id,e.isReadOnly,e.checkedValue)||this}return n.i(i.a)(e,t),e}(r.a)},function(t,e,n){"use strict";var i=n(0),r=n(10);n.d(e,"a",function(){return o});var o=function(t){function e(e,n,i,r,o){return t.call(this,e,n,i,e.id+"index"+o,e.isReadOnly||!r.isEnabled,e.isItemSelected(r))||this}return n.i(i.a)(e,t),e}(r.a)},function(t,e,n){"use strict";var i=n(0),r=n(16);n.d(e,"a",function(){return o});var o=function(t){function e(e,n,i,r,o){void 0===o&&(o=0);var a=t.call(this,e,n,i,r,!0,o)||this;return a.controller=n,a}return n.i(i.a)(e,t),e}(r.a)},function(t,e,n){"use strict";var i=n(0),r=n(6),o=n(1);n.d(e,"a",function(){return a});var a=function(t){function e(e,n,i){var r=t.call(this,e,n,i)||this;return r.controller=n,r.question=e,r}return n.i(i.a)(e,t),e.prototype.renderInteractive=function(){return n.i(i.b)(this,void 0,void 0,function(){var t,e;return n.i(i.c)(this,function(n){return t=new this.controller.doc.AcroFormComboBox,t.fieldName=this.question.id,t.Rect=o.a.createAcroformRect(o.a.scaleRect(this,o.a.formScale(this.controller,this))),t.edit=!1,t.color=this.textColor,e=[],this.question.showOptionsCaption&&e.push(this.question.optionsCaption),this.question.visibleChoices.forEach(function(t){e.push(o.a.getLocString(t.locText))}),t.setOptions(e),t.fontName=this.controller.fontName,t.fontSize=this.fontSize,t.readOnly=this.question.isReadOnly,t.isUnicode=o.a.isCustomFont(this.controller,t.fontName),t.V=o.a.getDropdownQuestionValue(this.question),this.controller.doc.addField(t),o.a.renderFlatBorders(this.controller,this),[2]})})},e.prototype.renderReadOnly=function(){return n.i(i.b)(this,void 0,void 0,function(){return n.i(i.c)(this,function(t){switch(t.label){case 0:return this.controller.pushMargins(this.xLeft,this.controller.paperWidth-this.xRight),[4,o.a.renderReadOnlyTextField(this.controller,this.question,this,o.a.getDropdownQuestionValue(this.question),!(this.question.isReadOnly&&"multiLine"===this.controller.textFieldRenderAs))];case 1:return t.sent(),this.controller.popMargins(),[2]}})})},e}(r.a)},function(t,e,n){"use strict";var i=n(0),r=n(6),o=n(1);n.d(e,"a",function(){return a});var a=function(t){function e(e,n,i){void 0===n&&(n=null),void 0===i&&(i=!1);var r=t.call(this,null,n,e)||this;return r.controller=n,r.isBorderVisible=!1,r.isBorderVisible=i,r}return n.i(i.a)(e,t),e.prototype.resizeBorder=function(t){var e=t?1:-1,n=this.controller.doc.getFontSize()*o.a.VALUE_READONLY_PADDING_SCALE;this.xLeft-=e*n,this.xRight+=e*n,this.yBot+=e*n},e.prototype.renderInteractive=function(){return n.i(i.b)(this,void 0,void 0,function(){return n.i(i.c)(this,function(t){return this.isBorderVisible&&(this.resizeBorder(!0),o.a.renderFlatBorders(this.controller,this),this.resizeBorder(!1)),[2]})})},e}(r.a)},function(t,e,n){"use strict";var i=n(0),r=n(6);n.d(e,"a",function(){return o});var o=function(t){function e(e,n,i,r,o){void 0===o&&(o=!1);var a=t.call(this,e,n,i)||this;return a.html=r,a.margins=o?{top:0,bottom:0}:{top:n.margins.top,bottom:n.margins.bot},a}return n.i(i.a)(e,t),e.prototype.renderInteractive=function(){return n.i(i.b)(this,void 0,void 0,function(){var t,e=this;return n.i(i.c)(this,function(n){switch(n.label){case 0:return t=this.controller.fontSize,this.controller.fontSize=this.fontSize,[4,new Promise(function(t){e.controller.doc.fromHTML(e.html,e.xLeft,e.yTop,{width:e.width,pagesplit:!0},function(){[].slice.call(document.querySelectorAll("iframe")).forEach(function(t){0===t.name.lastIndexOf("jsPDFhtmlText",0)&&t.parentNode.removeChild(t)}),t()},e.margins)})];case 1:return n.sent(),this.controller.fontSize=t,[2]}})})},e}(r.a)},function(t,e,n){"use strict";var i=n(0),r=n(6);n.d(e,"a",function(){return o});var o=function(t){function e(e,n,i,r,o,a){var s=t.call(this,e,n,{xLeft:r.xLeft,xRight:r.xLeft+(o||0),yTop:r.yTop,yBot:r.yTop+(a||0)})||this;return s.image=i,s.originalWidth=o,s.originalHeight=a,s.isPageBreak=void 0===s.originalHeight,s}return n.i(i.a)(e,t),e.prototype.renderInteractive=function(){return n.i(i.b)(this,void 0,void 0,function(){var t=this;return n.i(i.c)(this,function(e){switch(e.label){case 0:return[4,new Promise(function(e){t.controller.doc.addImage(t.image,t.xLeft,t.yTop,t.originalWidth,t.originalHeight),e()})];case 1:return e.sent(),[2]}})})},e}(r.a)},function(t,e,n){"use strict";var i=n(0),r=n(4),o=n(1);n.d(e,"a",function(){return a});var a=function(t){function e(n,i){var r=t.call(this,n.question,n.controller,n,n.text)||this;return r.link=i,r.textColor=e.COLOR,r}return n.i(i.a)(e,t),e.prototype.renderInteractive=function(){return n.i(i.b)(this,void 0,void 0,function(){var r,a,s;return n.i(i.c)(this,function(n){switch(n.label){case 0:return r=this.controller.doc.getTextColor(),this.controller.doc.setTextColor(o.a.BACKGROUND_COLOR),a=this.controller.unitHeight*(this.controller.doc.getLineHeightFactor()-e.SCALE_FACTOR_MAGIC),s=this.yTop+(this.yBot-this.yTop)-a,this.controller.doc.textWithLink(this.text,this.xLeft,s,{url:this.link}),[4,t.prototype.renderInteractive.call(this)];case 1:return n.sent(),this.controller.doc.setTextColor(r),[2]}})})},e.prototype.renderReadOnly=function(){return n.i(i.b)(this,void 0,void 0,function(){return n.i(i.c)(this,function(e){switch(e.label){case 0:return"text"!==o.a.getReadonlyRenderAs(this.question,this.controller)?[2,this.renderInteractive()]:[4,t.prototype.renderInteractive.call(this)];case 1:return e.sent(),[2]}})})},e.SCALE_FACTOR_MAGIC=.955,e.COLOR="#0000EE",e}(r.a)},function(t,e,n){"use strict";var i=n(0),r=n(6),o=n(4),a=n(1);n.d(e,"b",function(){return s}),n.d(e,"a",function(){return c});var s=function(){function t(t,e,n){this.name=t,this.controller=e,this._readOnly=n}return t.prototype.addToPdf=function(t){this._radioGroup=new this.controller.doc.AcroFormRadioButton,this._radioGroup.fieldName=this.name,this._radioGroup.value="",this._radioGroup.readOnly=this.readOnly,this._radioGroup.color=t,this.controller.doc.addField(this._radioGroup)},Object.defineProperty(t.prototype,"radioGroup",{get:function(){return this._radioGroup},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"readOnly",{get:function(){return this._readOnly},enumerable:!1,configurable:!0}),t}(),c=function(t){function e(e,n,i,r,o,a){var s=t.call(this,e,n,i)||this;return s.index=r,s.checked=o,s.radioGroupWrap=a,s.textColor=s.formBorderColor,s}return n.i(i.a)(e,t),e.prototype.renderInteractive=function(){return n.i(i.b)(this,void 0,void 0,function(){var t,e,r;return n.i(i.c)(this,function(n){switch(n.label){case 0:return this.radioGroupWrap.readOnly&&"acroform"!==a.a.getReadonlyRenderAs(this.question,this.controller)?[4,this.renderReadOnly()]:[3,2];case 1:return[2,n.sent()];case 2:return 0==this.index&&this.radioGroupWrap.addToPdf(this.formBorderColor),t=this.radioGroupWrap.name+"index"+this.index,e=this.radioGroupWrap.radioGroup.createOption(t),e.Rect=a.a.createAcroformRect(this),this.checked?(e.AS="/"+t,this.radioGroupWrap.radioGroup.value=t):e.AS="/Off",r=a.a.formScale(this.controller,this),e.Rect=a.a.createAcroformRect(a.a.scaleRect(this,r)),e.color=this.formBorderColor,a.a.renderFlatBorders(this.controller,this),this.radioGroupWrap.radioGroup.setAppearance(this.controller.doc.AcroForm.Appearance.RadioButton.Circle),[2]}})})},e.prototype.renderReadOnly=function(){return n.i(i.b)(this,void 0,void 0,function(){var t,r,s,c;return n.i(i.c)(this,function(n){switch(n.label){case 0:return a.a.renderFlatBorders(this.controller,this),this.checked?(t=a.a.createPoint(this,!0,!0),r=this.controller.fontSize,this.controller.fontSize=r*e.RADIOMARKER_READONLY_FONT_SIZE_SCALE,s=this.controller.measureText(e.RADIOMARKER_READONLY_SYMBOL),t.xLeft+=this.width/2-s.width/2,t.yTop+=this.height/2-s.height/1.9,[4,a.a.createTextFlat(t,this.question,this.controller,e.RADIOMARKER_READONLY_SYMBOL,o.a)]):[3,3];case 1:return c=n.sent(),c.unfold()[0].textColor=this.textColor,this.controller.fontSize=r,[4,c.render()];case 2:n.sent(),n.label=3;case 3:return[2]}})})},e.RADIOMARKER_READONLY_SYMBOL="•",e.RADIOMARKER_READONLY_FONT_SIZE_SCALE=1.575,e}(r.a)},function(t,e,n){"use strict";var i=n(0),r=n(6),o=n(4),a=n(10),s=n(1);n.d(e,"a",function(){return c});var c=function(t){function e(e,n,i,r){var o=t.call(this,e,n,i)||this;return o.number=r,o.question=e,o.textColor=o.formBorderColor,o}return n.i(i.a)(e,t),e.prototype.renderInteractive=function(){return n.i(i.b)(this,void 0,void 0,function(){var t,e,r,c;return n.i(i.c)(this,function(n){switch(n.label){case 0:return s.a.renderFlatBorders(this.controller,this),t=s.a.createPoint(this,!0,!0),e=this.controller.fontSize,this.controller.fontSize=e*a.a.CHECKMARK_READONLY_FONT_SIZE_SCALE,r=this.controller.measureText(this.number),t.xLeft+=this.width/2-r.width/2,t.yTop+=this.height/2-r.height/2,[4,s.a.createTextFlat(t,this.question,this.controller,this.number,o.a)];case 1:return c=n.sent(),c.unfold()[0].textColor=this.textColor,this.controller.fontSize=e,[4,c.render()];case 2:return n.sent(),[2]}})})},e}(r.a)},function(t,e,n){"use strict";var i=n(0),r=n(12),o=n(1);n.d(e,"a",function(){return a});var a=function(t){function e(e,n,i,r){return t.call(this,e,n,i,r)||this}return n.i(i.a)(e,t),e.prototype.renderInteractive=function(){return n.i(i.b)(this,void 0,void 0,function(){var e;return n.i(i.c)(this,function(n){switch(n.label){case 0:return e=this.controller.fontSize,this.controller.fontSize=e*o.a.TITLE_PANEL_FONT_SIZE_SCALE,[4,t.prototype.renderInteractive.call(this)];case 1:return n.sent(),this.controller.fontSize=e,[2]}})})},e}(r.a)},function(t,e,n){"use strict";var i=n(0);n.d(e,"c",function(){return o}),n.d(e,"a",function(){return a}),n.d(e,"b",function(){return s});var r=function(){function t(t,e,n,i,r){this.point=t,this.bricks=e,this.controller=n,this.repository=i,this.module=r}return t}(),o=function(t){function e(e,n,i,r,o,a){var s=t.call(this,e,n,r,o,a)||this;return s.question=i,s}return n.i(i.a)(e,t),e}(r),a=function(t){function e(e,n,i,r,o,a){var s=t.call(this,e,n,r,o,a)||this;return s.panel=i,s}return n.i(i.a)(e,t),e}(r),s=function(t){function e(e,n,i,r,o,a){var s=t.call(this,e,n,r,o,a)||this;return s.page=i,s}return n.i(i.a)(e,t),e}(r)},function(t,e,n){"use strict";var i=n(0),r=n(3),o=n(2),a=n(4),s=n(23),c=n(5),l=n(1);n.d(e,"a",function(){return u});var u=function(t){function e(e,n,i){var r=t.call(this,e,n,i)||this;return r.survey=e,r.controller=i,r.question=n,r}return n.i(i.a)(e,t),e.prototype.generateFlatsContent=function(t){return n.i(i.b)(this,void 0,void 0,function(){var e,r,o,u,h,f,d;return n.i(i.c)(this,function(n){switch(n.label){case 0:return e=new c.a,(r=this.controller.unitHeight,o=new s.a(this.question,this.controller,l.a.moveRect(l.a.scaleRect(l.a.createRect(t,r,r),l.a.SELECT_ITEM_FLAT_SCALE),t.xLeft)),e.addBrick(o),u=l.a.clone(t),u.xLeft=o.xRight+this.controller.unitWidth*l.a.GAP_BETWEEN_ITEM_TEXT,null===(h=this.question.isIndeterminate?null:this.question.checkedValue?this.question.locLabelTrue:this.question.locLabelFalse)||null===h.renderedHtml)?[3,2]:(d=(f=e).addBrick,[4,l.a.createTextFlat(u,this.question,this.controller,h,a.a)]);case 1:d.apply(f,[n.sent()]),n.label=2;case 2:return[2,[e]]}})})},e}(r.a);o.a.getInstance().register("boolean",u)},function(t,e,n){"use strict";var i=n(0),r=n(14),o=n(2),a=n(24);n.d(e,"a",function(){return s});var s=function(t){function e(e,n,i){var r=t.call(this,e,n,i)||this;return r.survey=e,r.controller=i,r.question=n,r}return n.i(i.a)(e,t),e.prototype.generateFlatItem=function(t,e,n){return new a.a(this.question,this.controller,t,e,n)},e}(r.a);o.a.getInstance().register("checkbox",s)},function(t,e,n){"use strict";var i=n(0),r=n(3),o=n(2),a=n(1);n.d(e,"a",function(){return s});var s=function(t){function e(e,n,i){var r=t.call(this,e,n,i)||this;return r.survey=e,r.controller=i,r.question=n,r}return n.i(i.a)(e,t),e.prototype.generateFlatsContent=function(t){return n.i(i.b)(this,void 0,void 0,function(){return n.i(i.c)(this,function(e){switch(e.label){case 0:return[4,a.a.createCommentFlat(t,this.question,this.controller,this.question.rows,!0)];case 1:return[2,[e.sent()]]}})})},e}(r.a);o.a.getInstance().register("comment",s)},function(t,e,n){"use strict";var i=n(0),r=n(3),o=n(2);n.d(e,"a",function(){return a});var a=function(t){function e(e,n,i){var r=t.call(this,e,n,i)||this;return r.survey=e,r.controller=i,r}return n.i(i.a)(e,t),e.prototype.generateFlatsContent=function(t){return n.i(i.b)(this,void 0,void 0,function(){var e;return n.i(i.c)(this,function(n){return e=o.a.getInstance().create(this.survey,this.question,this.controller,this.question.getType()),[2,e.generateFlatsContent(t)]})})},e}(r.a);o.a.getInstance().register("custom_model",a)},function(t,e,n){"use strict";var i=n(0),r=n(3),o=n(2),a=n(26),s=n(5),c=n(1);n.d(e,"a",function(){return l});var l=function(t){function e(e,n,i){var r=t.call(this,e,n,i)||this;return r.survey=e,r.controller=i,r.question=n,r}return n.i(i.a)(e,t),e.prototype.generateFlatsContent=function(t){return n.i(i.b)(this,void 0,void 0,function(){var e,r,o,l,u,h;return n.i(i.c)(this,function(n){switch(n.label){case 0:return e=c.a.createTextFieldRect(t,this.controller),this.question.isReadOnly&&"multiLine"===this.controller.textFieldRenderAs?[4,c.a.createReadOnlyTextFieldTextFlat(t,this.controller,this.question,c.a.getDropdownQuestionValue(this.question),!1)]:[3,2];case 1:r=n.sent(),e.yBot=Math.max(e.yBot,r.yBot+this.controller.unitHeight*c.a.VALUE_READONLY_PADDING_SCALE),n.label=2;case 2:return o=new s.a(new a.a(this.question,this.controller,e)),this.question.isOtherSelected?(l=c.a.createPoint(o),l.yTop+=this.controller.unitHeight*c.a.GAP_BETWEEN_ROWS,h=(u=o).addBrick,[4,c.a.createCommentFlat(l,this.question,this.controller,c.a.OTHER_ROWS_COUNT,!1)]):[3,4];case 3:h.apply(u,[n.sent()]),n.label=4;case 4:return[2,[o]]}})})},e}(r.a);o.a.getInstance().register("dropdown",l)},function(t,e,n){"use strict";var i=n(0),r=n(3),o=n(2),a=n(17),s=n(1);n.d(e,"a",function(){return c});var c=function(t){function e(e,n,i){var r=t.call(this,e,n,i)||this;return r.survey=e,r.question=n,r}return n.i(i.a)(e,t),e.prototype.generateFlatsContent=function(t){return n.i(i.b)(this,void 0,void 0,function(){var e;return n.i(i.c)(this,function(n){return e=s.a.createTextFieldRect(t,this.controller),[2,[new a.a(this.question,this.controller,e,!0,this.question.id,this.question.displayValue,"",!0,!1,"text")]]})})},e}(r.a);o.a.getInstance().register("expression",c)},function(t,e,n){"use strict";var i=n(0),r=n(7),o=(n.n(r),n(3)),a=n(2),s=n(4),c=n(5),l=n(1);n.d(e,"a",function(){return u});var u=function(t){function e(e,n,i){var r=t.call(this,e,n,i)||this;return r.survey=e,r.question=n,r}return n.i(i.a)(e,t),e.prototype.generateFlatItem=function(t,r){return n.i(i.b)(this,void 0,void 0,function(){var o,a,s,u,h,f;return n.i(i.c)(this,function(n){switch(n.label){case 0:return a=c.a.bind,[4,l.a.createLinkFlat(t,this.question,this.controller,void 0===r.name?"image":r.name,r.content)];case 1:return o=new(a.apply(c.a,[void 0,n.sent()])),l.a.canPreviewImage(this.question,r,r.content)?[4,l.a.getImageSize(r.content)]:[3,4];case 2:return s=n.sent(),this.question.imageWidth&&(s.width=l.a.parseWidth(this.question.imageWidth,l.a.getPageAvailableWidth(this.controller))),this.question.imageHeight&&(s.height=l.a.parseWidth(this.question.imageHeight,l.a.getPageAvailableWidth(this.controller))),u=l.a.createPoint(o),u.yTop+=this.controller.unitHeight*e.IMAGE_GAP_SCALE,f=(h=o).addBrick,[4,l.a.createImageFlat(u,this.question,this.controller,r.content,s.width,s.height)];case 3:f.apply(h,[n.sent()]),n.label=4;case 4:return[2,o]}})})},e.prototype.addLine=function(t,e,n){n!==this.question.previewValue.length-1&&(t[t.length-1].addBrick(l.a.createRowlineFlat(e,this.controller)),e.yTop+=l.a.EPSILON,t.push(new c.a))},e.prototype.generateFlatsContent=function(t){return n.i(i.b)(this,void 0,void 0,function(){var o,a,u,h,f,d,p,g,m,m;return n.i(i.c)(this,function(n){switch(n.label){case 0:return 0!==this.question.previewValue.length?[3,2]:[4,l.a.createTextFlat(t,this.question,this.controller,r.surveyLocalization.getString("noFileChosen"),s.a)];case 1:return[2,[n.sent()]];case 2:o=[new c.a],a=l.a.clone(t),u=a.yTop,h=0,n.label=3;case 3:return h<this.question.previewValue.length?(f=this.question.previewValue[h],d=this.controller.paperWidth-this.controller.margins.right-a.xLeft,l.a.canPreviewImage(this.question,f,f.content)?[4,l.a.getImageSize(f.content)]:[3,6]):[3,10];case 4:return p=n.sent().width,void 0===p&&(p=this.question.imageWidth?l.a.parseWidth(this.question.imageWidth,l.a.getPageAvailableWidth(this.controller)):0),g=Math.max(p,e.TEXT_MIN_SCALE*this.controller.unitWidth),d<g&&(a.xLeft=t.xLeft,a.yTop=u,this.addLine(o,a,h)),this.controller.pushMargins(a.xLeft,this.controller.paperWidth-a.xLeft-g),[4,this.generateFlatItem(a,f)];case 5:return m=n.sent(),o[o.length-1].addBrick(m),a.xLeft+=m.width,u=Math.max(u,m.yBot),this.controller.popMargins(),[3,8];case 6:return d<this.controller.unitWidth&&(a.xLeft=t.xLeft,a.yTop=u,this.addLine(o,a,h)),[4,this.generateFlatItem(a,f)];case 7:m=n.sent(),o[o.length-1].addBrick(m),a.xLeft+=m.xRight-m.xLeft,u=Math.max(u,m.yBot),n.label=8;case 8:a.xLeft+=this.controller.unitWidth,n.label=9;case 9:return h++,[3,3];case 10:return[2,o]}})})},e.IMAGE_GAP_SCALE=.195,e.TEXT_MIN_SCALE=5,e}(o.a);a.a.getInstance().register("file",u)},function(t,e,n){"use strict";var i=n(0),r=n(7),o=(n.n(r),n(3)),a=n(2),s=n(1);n.d(e,"a",function(){return c});var c=function(t){function e(e,n,i){var r=t.call(this,e,n,i)||this;return r.survey=e,r}return n.i(i.a)(e,t),e.prototype.chooseRender=function(t){return/<[^>]*style[^<]*>/.test(t)||/<[^>]*table[^<]*>/.test(t)||/&\w+;/.test(t)?"image":"standard"},e.prototype.generateFlatsContent=function(t){return n.i(i.b)(this,void 0,void 0,function(){var e,r,o,a,c,l,u,h,f,d;return n.i(i.c)(this,function(n){switch(n.label){case 0:return e=this.question.renderAs,("auto"===e&&(e=this.controller.htmlRenderAs),"auto"===e&&(e=this.chooseRender(s.a.getLocString(this.question.locHtml))),r=s.a.createHtmlContainerBlock(s.a.getLocString(this.question.locHtml),this.controller,e),"image"!==e)?[3,3]:(o=s.a.getPageAvailableWidth(this.controller),[4,s.a.htmlToImage(r,o,this.controller)]);case 1:return a=n.sent(),c=a.url,l=a.aspect,u=o/l,[4,s.a.createImageFlat(t,this.question,this.controller,c,o,u)];case 2:return[2,[n.sent()]];case 3:return f=(h=s.a).splitHtmlRect,d=[this.controller],[4,s.a.createHTMLFlat(t,this.question,this.controller,r)];case 4:return[2,[f.apply(h,d.concat([n.sent()]))]]}})})},e}(o.a);r.Serializer.removeProperty("html","renderAs"),r.Serializer.addProperty("html",{name:"renderAs",default:"auto",choices:["auto","standard","image"]}),a.a.getInstance().register("html",c)},function(t,e,n){"use strict";var i=n(0),r=n(3),o=n(2),a=n(1);n.d(e,"a",function(){return s});var s=function(t){function e(e,n,i){var r=t.call(this,e,n,i)||this;return r.survey=e,r.question=n,r}return n.i(i.a)(e,t),e.prototype.generateFlatsContent=function(t){return n.i(i.b)(this,void 0,void 0,function(){var e,r;return n.i(i.c)(this,function(n){switch(n.label){case 0:return e=a.a.pxToPt(this.question.imageWidth),r=a.a.pxToPt(this.question.imageHeight),[4,a.a.createImageFlat(t,this.question,this.controller,this.question.imageLink,e,r)];case 1:return[2,[n.sent()]]}})})},e}(r.a);o.a.getInstance().register("image",s)},function(t,e,n){"use strict";var i=n(0),r=n(3),o=n(2),a=n(4),s=n(11),c=n(10),l=n(5),u=n(1);n.d(e,"a",function(){return h});var h=function(t){function e(e,n,i){var r=t.call(this,e,n,i)||this;return r.survey=e,r.question=n,r}return n.i(i.a)(e,t),e.prototype.generateFlatItem=function(t,e,r){return n.i(i.b)(this,void 0,void 0,function(){var o,s,h,f,d,p,g;return n.i(i.c)(this,function(n){switch(n.label){case 0:return o=u.a.getPageAvailableWidth(this.controller),[4,u.a.createImageFlat(t,this.question,this.controller,e.imageLink,o,o/u.a.IMAGEPICKER_RATIO)];case 1:return s=n.sent(),h=new l.a(s),f=u.a.createPoint(h),this.question.showLabel?[4,u.a.createTextFlat(f,this.question,this.controller,e.text||e.value,a.a)]:[3,3];case 2:d=n.sent(),h.addBrick(d),f=u.a.createPoint(d),n.label=3;case 3:return p=this.controller.unitHeight,g=u.a.createRect(f,o,p),this.question.multiSelect?h.addBrick(new c.a(this.question,this.controller,g,this.question.id+"index"+r,this.question.isReadOnly||!e.isEnabled,-1!==this.question.value.indexOf(e.value))):h.addBrick(this.radio.generateFlatItem(g,e,r)),[2,h]}})})},e.prototype.generateFlatsContent=function(t){return n.i(i.b)(this,void 0,void 0,function(){var e,r,o,a,c,h,f,d,p,g,m,v;return n.i(i.c)(this,function(n){switch(n.label){case 0:this.radio=this.question.multiSelect?null:new s.a(this.survey,this.question,this.controller),e=[new l.a],r=u.a.getImagePickerAvailableWidth(this.controller)/u.a.IMAGEPICKER_COUNT,o=~~(u.a.getPageAvailableWidth(this.controller)/r)||1,a=this.question.visibleChoices.length,o=o<=a?o:a,c=~~Math.ceil(a/o),h=u.a.clone(t),f=0,n.label=1;case 1:if(!(f<c))return[3,7];d=h.yTop,this.controller.pushMargins(),p=this.controller.margins.left,g=0,n.label=2;case 2:return g<o?(m=f*o+g)==a?[3,5]:(this.controller.margins.left=p,this.controller.margins.right=this.controller.paperWidth-p-r,p=this.controller.paperWidth-this.controller.margins.right+this.controller.unitWidth,h.xLeft=this.controller.margins.left,[4,this.generateFlatItem(h,this.question.visibleChoices[m],m)]):[3,5];case 3:v=n.sent(),e[e.length-1].addBrick(v),d=Math.max(d,v.yBot),n.label=4;case 4:return g++,[3,2];case 5:this.controller.popMargins(),h.xLeft=t.xLeft,h.yTop=d,f!==c-1&&(e[e.length-1].addBrick(u.a.createRowlineFlat(h,this.controller)),h.yTop+=u.a.EPSILON,e.push(new l.a)),n.label=6;case 6:return f++,[3,1];case 7:return[2,e]}})})},e}(r.a);o.a.getInstance().register("imagepicker",h)},function(t,e,n){"use strict";var i=n(0),r=n(7),o=(n.n(r),n(3)),a=n(11),s=n(2),c=n(4),l=n(5),u=n(1);n.d(e,"a",function(){return h});var h=function(t){function e(e,n,i){var r=t.call(this,e,n,i)||this;return r.survey=e,r.controller=i,r.question=n,r}return n.i(i.a)(e,t),e.prototype.generateFlatsHeader=function(t){return n.i(i.b)(this,void 0,void 0,function(){var e,r,o,a,s,c,h,f;return n.i(i.c)(this,function(d){switch(d.label){case 0:e=[],r=u.a.clone(t),o=this.question.visibleColumns.length+(this.question.hasRows?1:0),a=0,d.label=1;case 1:return a<this.question.visibleColumns.length?(s=this.question.hasRows?a+1:a,this.controller.pushMargins(),u.a.setColumnMargins(this.controller,o,s),r.xLeft=this.controller.margins.left,h=(c=e).push,[4,u.a.createBoldTextFlat(r,this.question,this.controller,this.question.visibleColumns[a].locText)]):[3,4];case 2:h.apply(c,[d.sent()]),this.controller.popMargins(),d.label=3;case 3:return a++,[3,1];case 4:return f=new(l.a.bind.apply(l.a,n.i(i.d)([void 0],e,!1))),[2,[f,u.a.createRowlineFlat(u.a.createPoint(f),this.controller)]]}})})},e.prototype.generateFlatsRows=function(t,r){return n.i(i.b)(this,void 0,void 0,function(){var o,a,s,c,l;return n.i(i.c)(this,function(n){switch(n.label){case 0:o=[],a=u.a.clone(t),s=0,n.label=1;case 1:return s<this.question.visibleRows.length?(c="row"+s,[4,new f(this.survey,this.question,this.controller,this.question.visibleRows[s],c,0==s,r).generateFlatsContent(a)]):[3,4];case 2:l=n.sent(),a=u.a.createPoint(u.a.mergeRects.apply(u.a,l)),a.yTop+=this.controller.unitHeight*e.GAP_BETWEEN_ROWS,o.push.apply(o,l),n.label=3;case 3:return s++,[3,1];case 4:return[2,o]}})})},e.prototype.generateFlatsContent=function(t){return n.i(i.b)(this,void 0,void 0,function(){var r,o,a,s,c,l,h,f;return n.i(i.c)(this,function(n){switch(n.label){case 0:return r=u.a.getColumnWidth(this.controller,this.question.visibleColumns.length+(this.question.hasRows?1:0)),o="list"===this.question.renderAs||"list"===this.controller.matrixRenderAs||r<this.controller.measureText(u.a.MATRIX_COLUMN_WIDTH).width,a=u.a.clone(t),s=[],o||!this.question.showHeader||0==this.question.visibleColumns.length?[3,2]:[4,this.generateFlatsHeader(a)];case 1:c=n.sent(),a=u.a.createPoint(u.a.mergeRects.apply(u.a,c)),a.yTop+=e.GAP_BETWEEN_ROWS*this.controller.unitHeight,s.push.apply(s,c),n.label=2;case 2:return h=(l=s.push).apply,f=[s],[4,this.generateFlatsRows(a,o)];case 3:return h.apply(l,f.concat([n.sent()])),[2,s]}})})},e.GAP_BETWEEN_ROWS=.5,e}(o.a),f=function(t){function e(e,n,i,r,o,a,s){void 0===a&&(a=!1),void 0===s&&(s=!1);var c=t.call(this,e,n,i)||this;return c.survey=e,c.controller=i,c.row=r,c.key=o,c.isFirst=a,c.isVertical=s,c.questionMatrix=n,c}return n.i(i.a)(e,t),e.prototype.generateFlatsContent=function(t){return n.i(i.b)(this,void 0,void 0,function(){var e;return n.i(i.c)(this,function(n){switch(n.label){case 0:return this.isVertical?[4,this.generateFlatsVerticallyCells(t)]:[3,2];case 1:return e=n.sent(),[3,4];case 2:return[4,this.generateFlatsHorizontallyCells(t)];case 3:e=n.sent(),n.label=4;case 4:return[2,e]}})})},e.prototype.generateTextComposite=function(t,e,r){return n.i(i.b)(this,void 0,void 0,function(){var o,a,s,h,f;return n.i(i.c)(this,function(n){switch(n.label){case 0:return o=u.a.clone(t),a=this.row.value==e.value,s=u.a.createRect(o,u.a.getPageAvailableWidth(this.controller),this.controller.unitHeight),h=this.generateFlatItem(s,e,r,this.key,a),o.yTop=h.yBot+this.controller.unitHeight*u.a.GAP_BETWEEN_ITEM_TEXT,[4,u.a.createTextFlat(o,this.questionMatrix,this.controller,this.questionMatrix.getCellDisplayLocText(this.row.name,e),c.a)];case 1:return f=n.sent(),[2,new l.a(h,f)]}})})},e.prototype.generateItemCompoiste=function(t,e,r){return n.i(i.b)(this,void 0,void 0,function(){var o,a,s,h,f;return n.i(i.c)(this,function(n){switch(n.label){case 0:return o=u.a.clone(t),a=this.row.value==e.value,s=u.a.createRect(o,this.controller.unitHeight,this.controller.unitHeight),h=this.generateFlatItem(u.a.moveRect(u.a.scaleRect(s,u.a.SELECT_ITEM_FLAT_SCALE),s.xLeft),e,r,this.key,a),o.xLeft=h.xRight+this.controller.unitWidth*u.a.GAP_BETWEEN_ITEM_TEXT,[4,u.a.createTextFlat(o,this.questionMatrix,this.controller,e.locText,c.a)];case 1:return f=n.sent(),[2,new l.a(h,f)]}})})},e.prototype.generateFlatsHorizontallyCells=function(t){return n.i(i.b)(this,void 0,void 0,function(){var e,r,o,a,s,h,f,d,p,g,m,v,y;return n.i(i.c)(this,function(b){switch(b.label){case 0:return e=[],(r=u.a.clone(t),o=this.questionMatrix.visibleColumns.length+(this.questionMatrix.hasRows?1:0),this.questionMatrix.hasRows)?(this.controller.pushMargins(),u.a.setColumnMargins(this.controller,o,0),r.xLeft=this.controller.margins.left,s=(a=e).push,[4,u.a.createTextFlat(r,this.questionMatrix,this.controller,this.row.locText,c.a)]):[3,2];case 1:s.apply(a,[b.sent()]),this.controller.popMargins(),b.label=2;case 2:h=0,b.label=3;case 3:return h<this.questionMatrix.visibleColumns.length?(f=this.questionMatrix.visibleColumns[h],d=this.row.value==f.value,p=this.questionMatrix.hasRows?h+1:h,this.controller.pushMargins(),u.a.setColumnMargins(this.controller,o,p),r.xLeft=this.controller.margins.left,this.questionMatrix.hasCellText?(m=(g=e).push,[4,this.generateTextComposite(r,f,h)]):[3,5]):[3,8];case 4:return m.apply(g,[b.sent()]),[3,6];case 5:v=u.a.createRect(r,this.controller.unitHeight,this.controller.unitHeight),e.push(this.generateFlatItem(u.a.moveRect(u.a.scaleRect(v,u.a.SELECT_ITEM_FLAT_SCALE),r.xLeft),f,h,this.key,d)),b.label=6;case 6:this.controller.popMargins(),b.label=7;case 7:return h++,[3,3];case 8:return y=new(l.a.bind.apply(l.a,n.i(i.d)([void 0],e,!1))),[2,[y,u.a.createRowlineFlat(u.a.createPoint(y),this.controller)]]}})})},e.prototype.generateFlatsVerticallyCells=function(t){return n.i(i.b)(this,void 0,void 0,function(){var e,r,a,s,h,f,d;return n.i(i.c)(this,function(p){switch(p.label){case 0:return e=[],r=u.a.clone(t),this.questionMatrix.hasRows?[4,u.a.createTextFlat(r,this.questionMatrix,this.controller,this.row.locText,c.a)]:[3,2];case 1:a=p.sent(),r.yTop=a.yBot+o.a.CONTENT_GAP_VERT_SCALE*this.controller.unitHeight,e.push(a),p.label=2;case 2:return this.generateFlatComposite=this.questionMatrix.hasCellText?this.generateTextComposite:this.generateItemCompoiste,h=(s=e.push).apply,f=[e],[4,this.generateVerticallyItems(r,this.questionMatrix.visibleColumns)];case 3:return h.apply(s,f.concat([p.sent()])),d=new(l.a.bind.apply(l.a,n.i(i.d)([void 0],e,!1))),[2,[d,u.a.createRowlineFlat(u.a.createPoint(d),this.controller)]]}})})},e}(a.a);r.Serializer.removeProperty("matrix","renderAs"),r.Serializer.addProperty("matrix",{name:"renderAs",default:"auto",choices:["auto","list"]}),s.a.getInstance().register("matrix",h)},function(t,e,n){"use strict";var i=n(0),r=n(7),o=(n.n(r),n(2)),a=n(21);n.d(e,"a",function(){return s});var s=function(t){function e(e,n,i){var r=t.call(this,e,n,i,!1)||this;return r.survey=e,r}return n.i(i.a)(e,t),e}(a.a);r.Serializer.removeProperty("matrixdynamic","renderAs"),r.Serializer.addProperty("matrixdynamic",{name:"renderAs",default:"auto",choices:["auto","list"]}),o.a.getInstance().register("matrixdynamic",s)},function(t,e,n){"use strict";var i=n(0),r=n(3),o=n(2),a=n(5),s=n(1);n.d(e,"a",function(){return c});var c=function(t){function e(e,n,i){var r=t.call(this,e,n,i)||this;return r.survey=e,r.controller=i,r.question=n,r}return n.i(i.a)(e,t),e.prototype.generateFlatItem=function(t,e,r,c){return n.i(i.b)(this,void 0,void 0,function(){var e,r,l,u,h,f,d,p;return n.i(i.c)(this,function(n){switch(n.label){case 0:return e=s.a.getPageAvailableWidth(this.controller),this.controller.pushMargins(),this.controller.margins.right=this.controller.paperWidth-this.controller.margins.left-e*s.a.MULTIPLETEXT_TEXT_PERS,l=a.a.bind,[4,s.a.createBoldTextFlat(t,this.question,this.controller,c.locTitle)];case 1:return r=new(l.apply(a.a,[void 0,n.sent()])),this.controller.popMargins(),u=o.a.getInstance().create(this.survey,c.editor,this.controller,"text"),h=s.a.createTextFieldRect({xLeft:t.xLeft+e*s.a.MULTIPLETEXT_TEXT_PERS,yTop:t.yTop},this.controller),d=(f=r.addBrick).apply,p=[r],[4,u.generateFlatsContent(h)];case 2:return d.apply(f,p.concat([n.sent()])),[2,r]}})})},e.prototype.generateFlatsContent=function(t){return n.i(i.b)(this,void 0,void 0,function(){var r,o,c,l,u,h,f;return n.i(i.c)(this,function(n){switch(n.label){case 0:r=[],o=s.a.clone(t),c=this.question.getRows(),l=0,n.label=1;case 1:if(!(l<c.length))return[3,7];r.push(new a.a),u=o.yTop,this.controller.pushMargins(),h=0,n.label=2;case 2:return h<c[l].length?(this.controller.pushMargins(),s.a.setColumnMargins(this.controller,this.question.colCount,h),o.xLeft=this.controller.margins.left,[4,this.generateFlatItem(o,l,h,c[l][h])]):[3,5];case 3:f=n.sent(),r[r.length-1].addBrick(f),u=Math.max(u,f.yBot),this.controller.popMargins(),n.label=4;case 4:return h++,[3,2];case 5:this.controller.popMargins(),o.xLeft=t.xLeft,o.yTop=u,r[r.length-1].addBrick(s.a.createRowlineFlat(o,this.controller)),o.yTop+=s.a.EPSILON,o.yTop+=this.controller.unitHeight*e.ROWS_GAP_SCALE,n.label=6;case 6:return l++,[3,1];case 7:return[2,r]}})})},e.ROWS_GAP_SCALE=.195,e}(r.a);o.a.getInstance().register("multipletext",c)},function(t,e,n){"use strict";var i=n(0),r=n(9),o=n(3),a=n(2),s=n(1);n.d(e,"a",function(){return c});var c=function(t){function e(e,n,i){var r=t.call(this,e,n,i)||this;return r.survey=e,r.controller=i,r.question=n,r}return n.i(i.a)(e,t),e.prototype.generateFlatsContent=function(t){return n.i(i.b)(this,void 0,void 0,function(){var o,a,c,l,u,h;return n.i(i.c)(this,function(n){switch(n.label){case 0:o=[],a=s.a.clone(t),c=0,l=this.question.panels,n.label=1;case 1:return c<l.length?(u=l[c],[4,r.a.generateFlatsPanel(this.survey,this.controller,u,a)]):[3,4];case 2:h=n.sent(),0!==h.length&&(a.yTop=s.a.mergeRects.apply(s.a,h).yBot,a.yTop+=this.controller.unitHeight*e.GAP_BETWEEN_PANELS,o.push.apply(o,h)),n.label=3;case 3:return c++,[3,1];case 4:return[2,o]}})})},e.GAP_BETWEEN_PANELS=.75,e}(o.a);a.a.getInstance().register("paneldynamic",c)},function(t,e,n){"use strict";var i=n(0),r=n(3),o=n(2),a=n(4),s=n(32),c=n(5),l=n(1);n.d(e,"a",function(){return u});var u=function(t){function e(e,n,i){var r=t.call(this,e,n,i)||this;return r.survey=e,r.controller=i,r.question=n,r}return n.i(i.a)(e,t),e.prototype.generateFlatComposite=function(t,e,r){return n.i(i.b)(this,void 0,void 0,function(){var o,u,h,f,d;return n.i(i.c)(this,function(n){switch(n.label){case 0:return o=l.a.createRect(t,this.controller.unitWidth,this.controller.unitHeight),u=l.a.moveRect(l.a.scaleRect(o,l.a.SELECT_ITEM_FLAT_SCALE),t.xLeft),h=new s.a(this.question,this.controller,u,this.question.getNumberByIndex(r)),f=l.a.clone(t),f.xLeft=h.xRight+this.controller.unitWidth*l.a.GAP_BETWEEN_ITEM_TEXT,[4,l.a.createTextFlat(f,this.question,this.controller,e.locText,a.a)];case 1:return d=n.sent(),[2,new c.a(h,d)]}})})},e.prototype.generateFlatsContent=function(t){return n.i(i.b)(this,void 0,void 0,function(){var e,r,o,a;return n.i(i.c)(this,function(n){switch(n.label){case 0:e=l.a.clone(t),r=[],o=0,n.label=1;case 1:return o<this.question.rankingChoices.length?[4,this.generateFlatComposite(e,this.question.rankingChoices[o],o)]:[3,4];case 2:a=n.sent(),e.yTop=a.yBot+l.a.GAP_BETWEEN_ROWS*this.controller.unitHeight,r.push(a),n.label=3;case 3:return o++,[3,1];case 4:return[2,r]}})})},e}(r.a);o.a.getInstance().register("ranking",u)},function(t,e,n){"use strict";var i=n(0),r=n(11),o=n(2),a=n(4),s=n(5),c=n(1);n.d(e,"a",function(){return l});var l=function(t){function e(e,n,i){var r=t.call(this,e,n,i)||this;return r.survey=e,r.controller=i,r.questionRating=n,r}return n.i(i.a)(e,t),e.prototype.generateFlatHorisontalComposite=function(t,e,r){return n.i(i.b)(this,void 0,void 0,function(){var o,a,l,u,h,f,d;return n.i(i.c)(this,function(n){switch(n.label){case 0:return o=c.a.getRatingItemText(this.questionRating,r,e.locText),this.controller.pushMargins(),a=this.controller.unitWidth/2,this.controller.margins.left+=a,this.controller.margins.right+=a,l=c.a.clone(t),l.xLeft+=a,h=s.a.bind,[4,c.a.createBoldTextFlat(l,this.questionRating,this.controller,o)];case 1:return u=new(h.apply(s.a,[void 0,n.sent()])),this.controller.popMargins(),f=u.width,f<c.a.getRatingMinWidth(this.controller)?(u.xLeft+=(c.a.getRatingMinWidth(this.controller)-f)/2-a,f=c.a.getRatingMinWidth(this.controller)):f+=this.controller.unitWidth,d=c.a.createPoint(u),d.xLeft=t.xLeft,u.addBrick(this.generateFlatItem(c.a.createRect(d,f,this.controller.unitHeight),e,r)),[2,u]}})})},e.prototype.generateFlatComposite=function(t,e,r){return n.i(i.b)(this,void 0,void 0,function(){var o,l,u,h,f,d,p,g;return n.i(i.c)(this,function(n){switch(n.label){case 0:return o=new s.a,(l=c.a.createRect(t,this.controller.unitHeight,this.controller.unitHeight),u=this.generateFlatItem(c.a.moveRect(c.a.scaleRect(l,c.a.SELECT_ITEM_FLAT_SCALE),t.xLeft),e,r),o.addBrick(u),h=c.a.clone(t),h.xLeft=u.xRight+this.controller.unitWidth*c.a.GAP_BETWEEN_ITEM_TEXT,f=c.a.getRatingItemText(this.questionRating,r,e.locText),d=null==f)?[3,2]:(g=(p=o).addBrick,[4,c.a.createTextFlat(h,this.question,this.controller,f,a.a)]);case 1:d=g.apply(p,[n.sent()]),n.label=2;case 2:return[2,o]}})})},e.prototype.generateHorisontallyItems=function(t){return n.i(i.b)(this,void 0,void 0,function(){var e,r,o,a,l;return n.i(i.c)(this,function(n){switch(n.label){case 0:e=[new s.a],r=c.a.clone(t),o=0,n.label=1;case 1:return o<this.questionRating.visibleRateValues.length?[4,this.generateFlatHorisontalComposite(r,this.questionRating.visibleRateValues[o],o)]:[3,4];case 2:a=n.sent(),e[e.length-1].addBrick(a),l=this.controller.paperWidth-this.controller.margins.right-a.xRight,c.a.getRatingMinWidth(this.controller)<=l+c.a.EPSILON?r.xLeft=a.xRight:(r.xLeft=t.xLeft,r.yTop=a.yBot,o!==this.questionRating.visibleRateValues.length-1&&(e[e.length-1].addBrick(c.a.createRowlineFlat(r,this.controller)),r.yTop+=c.a.EPSILON,e.push(new s.a))),n.label=3;case 3:return o++,[3,1];case 4:return[2,e]}})})},e.prototype.generateFlatsContent=function(t){return n.i(i.b)(this,void 0,void 0,function(){var e,r,o;return n.i(i.c)(this,function(n){for(e=!1,r=0;r<this.questionRating.visibleRateValues.length;r++)o=c.a.getRatingItemText(this.questionRating,r,this.questionRating.visibleRateValues[r].locText),this.controller.measureText(o).width>this.controller.measureText(c.a.RATING_COLUMN_WIDTH).width&&(e=!0);return[2,e?this.generateVerticallyItems(t,this.questionRating.visibleRateValues):this.generateHorisontallyItems(t)]})})},e}(r.a);o.a.getInstance().register("rating",l)},function(t,e,n){"use strict";var i=n(0),r=n(3),o=n(2),a=n(1);n.d(e,"a",function(){return s});var s=function(t){function e(e,n,i){var r=t.call(this,e,n,i)||this;return r.survey=e,r.question=n,r}return n.i(i.a)(e,t),e.prototype.generateFlatsContent=function(t){return n.i(i.b)(this,void 0,void 0,function(){var e;return n.i(i.c)(this,function(n){switch(n.label){case 0:return[4,a.a.createImageFlat(t,this.question,this.controller,this.question.value,a.a.pxToPt(this.question.width),a.a.pxToPt(this.question.height))];case 1:return e=n.sent(),[2,[e]]}})})},e}(r.a);o.a.getInstance().register("signaturepad",s)},function(t,e,n){"use strict";var i=n(0),r=n(3),o=n(2),a=n(16),s=n(1);n.d(e,"a",function(){return c});var c=function(t){function e(e,n,i){var r=t.call(this,e,n,i)||this;return r.survey=e,r.question=n,r}return n.i(i.a)(e,t),e.prototype.generateFlatsContent=function(t){return n.i(i.b)(this,void 0,void 0,function(){var r;return n.i(i.c)(this,function(n){switch(n.label){case 0:return"singleLine"===this.controller.textFieldRenderAs?(r=s.a.createTextFieldRect(t,this.controller),[2,[new a.a(this.question,this.controller,r)]]):[4,s.a.createCommentFlat(t,this.question,this.controller,e.MULTILINE_TEXT_ROWS_COUNT,!0)];case 1:return[2,[n.sent()]]}})})},e.MULTILINE_TEXT_ROWS_COUNT=1,e}(r.a);o.a.getInstance().register("text",c)},function(t,e,n){"use strict";var i=n(0),r=n(6);n.d(e,"a",function(){return o});var o=function(t){function e(e,n,i){var r=t.call(this,e,n,i(n.helperDoc,e,0,0))||this;return r.renderFunc=i,r}return n.i(i.a)(e,t),e.prototype.renderInteractive=function(){return n.i(i.b)(this,void 0,void 0,function(){var t=this;return n.i(i.c)(this,function(e){switch(e.label){case 0:return[4,new Promise(function(e){t.renderFunc(t.controller.doc,t.question,t.xLeft,t.yTop),e()})];case 1:return e.sent(),[2]}})})},e}(r.a)},function(t,e,n){"use strict";var i=n(0),r=n(7),o=(n.n(r),n(8)),a=n(9),s=n(22),c=n(20),l=n(1);n.d(e,"a",function(){return u});var u=function(t){function e(e,n){var i=t.call(this,e)||this;return i.onRenderHeader=new r.Event,i.onRenderFooter=new r.Event,i.onRenderQuestion=new c.b,i.onRenderPanel=new c.b,i.onRenderPage=new c.b,void 0===n&&(n={}),i.options=l.a.clone(n),i._haveCommercialLicense=n.commercial||n.haveCommercialLicense,i}return n.i(i.a)(e,t),Object.defineProperty(e.prototype,"haveCommercialLicense",{get:function(){return this._haveCommercialLicense},set:function(t){this._haveCommercialLicense=t},enumerable:!1,configurable:!0}),e.prototype.waitForQuestionIsReady=function(t){return new Promise(function(e){if(t.isReady)e();else{var n=function(i,r){r.isReady&&(t.onReadyChanged.remove(n),e())};t.onReadyChanged.add(n)}})},e.prototype.waitForCoreIsReady=function(){return n.i(i.b)(this,void 0,void 0,function(){var t,e,r,o,a,s,c;return n.i(i.c)(this,function(n){switch(n.label){case 0:t=0,e=this.getAllQuestions(),n.label=1;case 1:if(!(t<e.length))return[3,9];if(r=e[t],!r.contentPanel)return[3,6];o=[],r.contentPanel.addQuestionsToList(o),a=0,s=o,n.label=2;case 2:return a<s.length?(c=s[a],[4,this.waitForQuestionIsReady(c)]):[3,5];case 3:n.sent(),n.label=4;case 4:return a++,[3,2];case 5:return[3,8];case 6:return[4,this.waitForQuestionIsReady(l.a.getContentQuestion(r))];case 7:n.sent(),n.label=8;case 8:return t++,[3,1];case 9:return[2]}})})},e.prototype.renderSurvey=function(t){return n.i(i.b)(this,void 0,void 0,function(){var e,r,o,l;return n.i(i.c)(this,function(n){switch(n.label){case 0:return[4,this.waitForCoreIsReady()];case 1:return n.sent(),[4,a.a.generateFlats(this,t)];case 2:e=n.sent(),r=s.a.pack(e,t),c.a.process_header_events(this,t,r),o=0,n.label=3;case 3:if(!(o<r.length))return[3,8];l=0,n.label=4;case 4:return l<r[o].length?(t.getNumberOfPages()===o&&t.addPage(),t.setPage(o),[4,r[o][l].render()]):[3,7];case 5:n.sent(),n.label=6;case 6:return l++,[3,4];case 7:return o++,[3,3];case 8:return[2]}})})},e.prototype.save=function(t){return void 0===t&&(t="survey_result.pdf"),n.i(i.b)(this,void 0,void 0,function(){var e;return n.i(i.c)(this,function(n){switch(n.label){case 0:return e=new o.b(this.options),l.a.fixFont(e),[4,this.renderSurvey(e)];case 1:return n.sent(),[2,e.doc.save(t,{returnPromise:!0})]}})})},e.prototype.raw=function(t){return n.i(i.b)(this,void 0,void 0,function(){var e;return n.i(i.c)(this,function(n){switch(n.label){case 0:return e=new o.b(this.options),l.a.fixFont(e),[4,this.renderSurvey(e)];case 1:return n.sent(),[2,e.doc.output(t)]}})})},e}(r.SurveyModel)},function(t,e,n){"use strict";function i(t){return void 0===t?-1:t.height}Object.defineProperty(e,"__esModule",{value:!0});var r=n(56),o=function(){function t(t,e){this.intervalTree=t,this.records=[],this.height=0,this.key=e.low,this.max=e.high,this.records.push(e)}return t.prototype.getNodeHigh=function(){for(var t=this.records[0].high,e=1;e<this.records.length;e++)this.records[e].high>t&&(t=this.records[e].high);return t},t.prototype.updateHeight=function(){this.height=Math.max(i(this.left),i(this.right))+1},t.prototype.updateMaxOfParents=function(){if(void 0!==this){var t=this.getNodeHigh();void 0!==this.left&&void 0!==this.right?this.max=Math.max(Math.max(this.left.max,this.right.max),t):void 0!==this.left&&void 0===this.right?this.max=Math.max(this.left.max,t):void 0===this.left&&void 0!==this.right?this.max=Math.max(this.right.max,t):this.max=t,this.parent&&this.parent.updateMaxOfParents()}},t.prototype._updateMaxAfterRightRotate=function(){var t=this.parent,e=t.left,n=e.getNodeHigh();void 0===e.left&&void 0!==e.right?e.max=Math.max(n,e.right.max):void 0!==e.left&&void 0===e.right?e.max=Math.max(n,e.left.max):void 0===e.left&&void 0===e.right?e.max=n:e.max=Math.max(Math.max(e.left.max,e.right.max),n);var i=this.getNodeHigh();void 0===this.left&&void 0!==this.right?this.max=Math.max(i,this.right.max):void 0!==this.left&&void 0===this.right?this.max=Math.max(i,this.left.max):void 0===this.left&&void 0===this.right?this.max=i:this.max=Math.max(Math.max(this.left.max,this.right.max),i),t.max=Math.max(Math.max(t.left.max,t.right.max),t.getNodeHigh())},t.prototype._updateMaxAfterLeftRotate=function(){var t=this.parent,e=t.right,n=e.getNodeHigh();void 0===e.left&&void 0!==e.right?e.max=Math.max(n,e.right.max):void 0!==e.left&&void 0===e.right?e.max=Math.max(n,e.left.max):void 0===e.left&&void 0===e.right?e.max=n:e.max=Math.max(Math.max(e.left.max,e.right.max),n);var i=this.getNodeHigh();void 0===this.left&&void 0!==this.right?this.max=Math.max(i,this.right.max):void 0!==this.left&&void 0===this.right?this.max=Math.max(i,this.left.max):void 0===this.left&&void 0===this.right?this.max=i:this.max=Math.max(Math.max(this.left.max,this.right.max),i),t.max=Math.max(Math.max(t.left.max,e.max),t.getNodeHigh())},t.prototype._leftRotate=function(){var t=this.right;t.parent=this.parent,void 0===t.parent?this.intervalTree.root=t:t.parent.left===this?t.parent.left=t:t.parent.right===this&&(t.parent.right=t),this.right=t.left,void 0!==this.right&&(this.right.parent=this),t.left=this,this.parent=t,this.updateHeight(),t.updateHeight()},t.prototype._rightRotate=function(){var t=this.left;t.parent=this.parent,void 0===t.parent?this.intervalTree.root=t:t.parent.left===this?t.parent.left=t:t.parent.right===this&&(t.parent.right=t),this.left=t.right,void 0!==this.left&&(this.left.parent=this),t.right=this,this.parent=t,this.updateHeight(),t.updateHeight()},t.prototype._rebalance=function(){if(i(this.left)>=2+i(this.right)){var t=this.left;i(t.left)>=i(t.right)?(this._rightRotate(),this._updateMaxAfterRightRotate()):(t._leftRotate(),this._rightRotate(),this._updateMaxAfterRightRotate())}else if(i(this.right)>=2+i(this.left)){var e=this.right;i(e.right)>=i(e.left)?(this._leftRotate(),this._updateMaxAfterLeftRotate()):(e._rightRotate(),this._leftRotate(),this._updateMaxAfterLeftRotate())}},t.prototype.insert=function(e){e.low<this.key?void 0===this.left?(this.left=new t(this.intervalTree,e),this.left.parent=this):this.left.insert(e):void 0===this.right?(this.right=new t(this.intervalTree,e),this.right.parent=this):this.right.insert(e),this.max<e.high&&(this.max=e.high),this.updateHeight(),this._rebalance()},t.prototype._getOverlappingRecords=function(t,e,n){if(t.key<=n&&e<=t.getNodeHigh()){for(var i=[],r=0;r<t.records.length;r++)t.records[r].high>=e&&i.push(t.records[r]);return i}return[]},t.prototype.search=function(t,e){if(void 0===this)return[];var n=[],i=[],r=[];return t>this.max?[]:(void 0!==this.left&&this.left.max>=t&&(n=this.left.search(t,e)),i=this._getOverlappingRecords(this,t,e),e<this.key?n.concat(i):(void 0!==this.right&&(r=this.right.search(t,e)),n.concat(i,r)))},t.prototype.searchExisting=function(t){if(void 0!==this){if(this.key===t)return this;if(t<this.key){if(void 0!==this.left)return this.left.searchExisting(t)}else if(void 0!==this.right)return this.right.searchExisting(t)}},t.prototype._minValue=function(){return void 0===this.left?this:this.left._minValue()},t.prototype.remove=function(t){var e=this.parent;if(t.key<this.key)return void 0!==this.left?this.left.remove(t):void 0;if(t.key>this.key)return void 0!==this.right?this.right.remove(t):void 0;if(void 0!==this.left&&void 0!==this.right){var n=this.right._minValue();return this.key=n.key,this.records=n.records,this.right.remove(this)}return e.left===this?(void 0!==this.right?(e.left=this.right,this.right.parent=e):(e.left=this.left,void 0!==this.left&&(this.left.parent=e)),e.updateMaxOfParents(),e.updateHeight(),e._rebalance(),this):e.right===this?(void 0!==this.right?(e.right=this.right,this.right.parent=e):(e.right=this.left,void 0!==this.left&&(this.left.parent=e)),e.updateMaxOfParents(),e.updateHeight(),e._rebalance(),this):void 0},t}();e.Node=o;var a=function(){function t(){this.count=0}return t.prototype.insert=function(t){if(t.low>t.high)throw new Error("`low` value must be lower or equal to `high` value");if(void 0===this.root)return this.root=new o(this,t),this.count++,!0;var e=this.root.searchExisting(t.low);if(void 0!==e){for(var n=0;n<e.records.length;n++)if(r(e.records[n],t))return!1;return e.records.push(t),t.high>e.max&&(e.max=t.high,e.parent&&e.parent.updateMaxOfParents()),this.count++,!0}return this.root.insert(t),this.count++,!0},t.prototype.search=function(t,e){return void 0===this.root?[]:this.root.search(t,e)},t.prototype.remove=function(t){if(void 0===this.root)return!1;var e=this.root.searchExisting(t.low);if(void 0===e)return!1;if(e.records.length>1){for(var n=void 0,i=0;i<e.records.length;i++)if(r(e.records[i],t)){n=e.records[i],e.records.splice(i,1);break}if(n){if(n=void 0,t.high===e.max){var a=e.getNodeHigh();void 0!==e.left&&void 0!==e.right?e.max=Math.max(Math.max(e.left.max,e.right.max),a):void 0!==e.left&&void 0===e.right?e.max=Math.max(e.left.max,a):void 0===e.left&&void 0!==e.right?e.max=Math.max(e.right.max,a):e.max=a,e.parent&&e.parent.updateMaxOfParents()}return this.count--,!0}return!1}if(1===e.records.length){if(r(e.records[0],t)){if(this.root.key===e.key){var s=new o(this,{low:t.low,high:t.low});s.left=this.root,this.root.parent=s;var c=this.root.remove(e);return this.root=s.left,void 0!==this.root&&(this.root.parent=void 0),!!c&&(c=void 0,this.count--,!0)}var c=this.root.remove(e);return!!c&&(c=void 0,this.count--,!0)}return!1}return!1},t.prototype.inOrder=function(){return new c(this.root)},t.prototype.preOrder=function(){return new l(this.root)},t}();e.IntervalTree=a;var s=function(){function t(){this.tree=new a}return t.prototype.insert=function(t,e,n){return this.tree.insert({low:t,high:e,data:n})},t.prototype.remove=function(t,e,n){return this.tree.remove({low:t,high:e,data:n})},t.prototype.search=function(t,e){return this.tree.search(t,e).map(function(t){return t.data})},t.prototype.inOrder=function(){return this.tree.inOrder()},t.prototype.preOrder=function(){return this.tree.preOrder()},Object.defineProperty(t.prototype,"count",{get:function(){return this.tree.count},enumerable:!0,configurable:!0}),t}();e.default=s;var c=function(){function t(t){this.stack=[],void 0!==t&&this.push(t)}return t.prototype.next=function(){return void 0===this.currentNode?{done:!0,value:void 0}:this.i<this.currentNode.records.length?{done:!1,value:this.currentNode.records[this.i++]}:(void 0!==this.currentNode.right?this.push(this.currentNode.right):this.pop(),this.next())},t.prototype.push=function(t){for(this.currentNode=t,this.i=0;void 0!==this.currentNode.left;)this.stack.push(this.currentNode),this.currentNode=this.currentNode.left},t.prototype.pop=function(){this.currentNode=this.stack.pop(),this.i=0},t}();e.InOrder=c,"function"==typeof Symbol&&(c.prototype[Symbol.iterator]=function(){return this});var l=function(){function t(t){this.stack=[],this.i=0,this.currentNode=t}return t.prototype.next=function(){return void 0===this.currentNode?{done:!0,value:void 0}:this.i<this.currentNode.records.length?{done:!1,value:this.currentNode.records[this.i++]}:(void 0!==this.currentNode.right&&this.push(this.currentNode.right),void 0!==this.currentNode.left&&this.push(this.currentNode.left),this.pop(),this.next())},t.prototype.push=function(t){this.stack.push(t)},t.prototype.pop=function(){this.currentNode=this.stack.pop(),this.i=0},t}();e.PreOrder=l,"function"==typeof Symbol&&(l.prototype[Symbol.iterator]=function(){return this})},function(t,e){t.exports=function(t,e,n,i){var r=n?n.call(i,t,e):void 0;if(void 0!==r)return!!r;if(t===e)return!0;if("object"!=typeof t||!t||"object"!=typeof e||!e)return!1;var o=Object.keys(t),a=Object.keys(e);if(o.length!==a.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(e),c=0;c<o.length;c++){var l=o[c];if(!s(l))return!1;var u=t[l],h=e[l];if(!1===(r=n?n.call(i,u,h,l):void 0)||void 0===r&&u!==h)return!1}return!0}},function(t,e,n){"use strict";function i(t){var e=t.AcroFormAppearance.RadioButton.Circle.YesNormal;t.AcroFormAppearance.RadioButton.Circle.YesNormal=function(n){var i=e(n),r=i.stream.split("\n"),o=t.__private__.encodeColorString(n.color);return r[0]=r[0]+"\n"+o+"\n"+o.toUpperCase(),i.stream=r.join("\n"),i}}e.a=i},function(t,e,n){"use strict";var i=n(0),r=n(4);n.d(e,"a",function(){return o});var o=function(t){function e(e,n,i,r){return t.call(this,e,n,i,r)||this}return n.i(i.a)(e,t),e}(r.a)},function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){(function(t){/**
7
7
  * @license
8
8
  * Copyright (c) 2016 Alexander Weidt,
9
9
  * https://github.com/BiggA94
10
10
  *
11
11
  * Licensed under the MIT License. http://opensource.org/licenses/mit-license
12
12
  */
13
- var e=n(18);!function(t,e){"use strict";function n(t){for(var e="",n=0;n<t.length;n++){for(var i=t.charCodeAt(n).toString(16).toUpperCase();i.length<4;)i="0"+i;e+=i}return"<FEFF"+e+">"}function i(t){for(var e="[ ",i=0;i<t.length;i++)e+=n(t[i]);return e+=" ]"}function r(t,e,n){n||(n=1);for(var i,r=[];i=e.exec(t);)r.push(i[n]);return r}var o,a=t.API,s=1,c=function(t){return t.replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},l=function(t){return t.replace(/\\\\/g,"\\").replace(/\\\(/g,"(").replace(/\\\)/g,")")},u=function(t){return t.toFixed(2)},h=function(t){return t.toFixed(5)};a.__acroform__={};var f=function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t},d=function(t){return t*s},p=function(t){return t/s},g=function(t){var e=new k,n=$.internal.getHeight(t)||0,i=$.internal.getWidth(t)||0;return e.BBox=[0,0,Number(u(i)),Number(u(n))],e},m=a.__acroform__.setBit=function(t,e){if(t=t||0,e=e||0,isNaN(t)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBit");return t|=1<<e},v=a.__acroform__.clearBit=function(t,e){if(t=t||0,e=e||0,isNaN(t)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBit");return t&=~(1<<e)},y=a.__acroform__.getBit=function(t,e){if(isNaN(t)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBit");return 0==(t&1<<e)?0:1},b=a.__acroform__.getBitForPdf=function(t,e){if(isNaN(t)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBitForPdf");return y(t,e-1)},x=a.__acroform__.setBitForPdf=function(t,e){if(isNaN(t)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBitForPdf");return m(t,e-1)},T=a.__acroform__.clearBitForPdf=function(t,e){if(isNaN(t)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBitForPdf");return v(t,e-1)},F=a.__acroform__.calculateCoordinates=function(t){var e=this.internal.getHorizontalCoordinate,n=this.internal.getVerticalCoordinate,i=t[0],r=t[1],o=t[2],a=t[3],s={};return s.lowerLeft_X=e(i)||0,s.lowerLeft_Y=n(r+a)||0,s.upperRight_X=e(i+o)||0,s.upperRight_Y=n(r)||0,[Number(u(s.lowerLeft_X)),Number(u(s.lowerLeft_Y)),Number(u(s.upperRight_X)),Number(u(s.upperRight_Y))]},_=function(t){if(t.appearanceStreamContent)return t.appearanceStreamContent;if(t.V||t.DV){var e=[],n=t.V||t.DV,i=w(t,n),r=o.internal.getFont(t.fontName,t.fontStyle).id;e.push("/Tx BMC"),e.push("q"),e.push("BT"),e.push(o.__private__.encodeColorString(t.color)),e.push("/"+r+" "+u(i.fontSize)+" Tf"),e.push("1 0 0 1 0 0 Tm"),e.push(i.text),e.push("ET"),e.push("Q"),e.push("EMC");var a=new g(t);return a.stream=e.join("\n"),a}},w=function(t,e){t.isUnicode&&(e=t.trueValue);var n=0===t.fontSize?t.maxFontSize:t.fontSize,i={text:"",fontSize:""};e="("==e.substr(0,1)?e.substr(1):e,e=")"==e.substr(e.length-1)?e.substr(0,e.length-1):e;var r=e.split(" ");r=r.map(function(t){return t.split("\n")}),t.multiline||(r=r.map(function(t){return[t.join(" ")]}));var a=n,s=2,l=2,h=$.internal.getHeight(t)||0;h=h<0?-h:h;var f=$.internal.getWidth(t)||0;f=f<0?-f:f;var d=function(e,n,i){if(e+1<r.length){var o=n+" "+r[e+1][0];return R(o,t,i).width<=f-2*l}return!1};a++;t:for(;a>0;){e="",a--;var p=R("3",t,a).height,g=t.multiline?h-a:(h-p)/2;g+=s;var m,v,y=g,b=0,x=0,T=0;if(a<=0){a=12,e="(...) Tj\n",e+="% Width of Text: "+R(e,t,a).width+", FieldWidth:"+f+"\n";break}for(var F="",_=0,w=0;w<r.length;w++)if(r.hasOwnProperty(w)){var P=!1;if(1!==r[w].length&&T!==r[w].length-1){if((p+s)*(_+2)+s>h)continue t;F+=r[w][T],P=!0,x=w,w--}else{F+=r[w][T]+" ",F=" "==F.substr(F.length-1)?F.substr(0,F.length-1):F;var E=parseInt(w),C=d(E,F,a),O=w>=r.length-1;if(C&&!O){F+=" ",T=0;continue}if(C||O){if(O)x=E;else if(t.multiline&&(p+s)*(_+2)+s>h)continue t}else{if(!t.multiline)continue t;if((p+s)*(_+2)+s>h)continue t;x=E}}for(var S="",L=b;L<=x;L++){var A=r[L];if(t.multiline){if(L===x){S+=A[T]+" ",T=(T+1)%A.length;continue}if(L===b){S+=A[A.length-1]+" ";continue}}S+=A[0]+" "}switch(S=" "==S.substr(S.length-1)?S.substr(0,S.length-1):S,v=R(S,t,a).width,t.textAlign){case"right":m=f-v-l;break;case"center":m=(f-v)/2;break;case"left":default:m=l}if(e+=u(m)+" "+u(y)+" Td\n",t.isUnicode){var B={};B[o.internal.getFont().id]=o.internal.getFont();var N={text:S,x:null,y:null,options:{lang:null},mutex:{pdfEscape:c,activeFontKey:o.internal.getFont().id,fonts:B,activeFontSize:t.fontSize}};o.internal.events.publish("postProcessText",N),e+="<"+N.text+"> Tj\n"}else e+="("+c(S)+") Tj\n";e+=-u(m)+" 0 Td\n",y=-(a+s),v=0,b=P?x:x+1,_++,F=""}else;break}return i.text=e,i.fontSize=a,i},R=function(t,e,n){var i=o.internal.getFont(e.fontName,e.fontStyle),r=o.getStringUnitWidth(t,{font:i,fontSize:parseFloat(n),charSpace:0})*parseFloat(n);return{height:o.getStringUnitWidth("3",{font:i,fontSize:parseFloat(n),charSpace:0})*parseFloat(n)*1.5,width:r}},P={fields:[],xForms:[],acroFormDictionaryRoot:null,printedOut:!1,internal:null,isInitialized:!1},E=function(){o.internal.acroformPlugin.acroFormDictionaryRoot.objId=void 0;var t=o.internal.acroformPlugin.acroFormDictionaryRoot.Fields;for(var e in t)if(t.hasOwnProperty(e)){var n=t[e];n.objId=void 0,n.hasAnnotation&&O.call(o,n)}},C=function(t){o.internal.acroformPlugin.printedOut&&(o.internal.acroformPlugin.printedOut=!1,o.internal.acroformPlugin.acroFormDictionaryRoot=null),o.internal.acroformPlugin.acroFormDictionaryRoot||N.call(o),o.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(t)},O=function(t){var e={type:"reference",object:t},n=function(t){return t.type===e.type&&t.object===e.object};void 0===o.internal.getPageInfo(t.page).pageContext.annotations.find(n)&&o.internal.getPageInfo(t.page).pageContext.annotations.push(e)},S=function(){if(void 0===o.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("putCatalogCallback: Root missing.");o.internal.write("/AcroForm "+o.internal.acroformPlugin.acroFormDictionaryRoot.objId+" 0 R")},L=function(){o.internal.events.unsubscribe(o.internal.acroformPlugin.acroFormDictionaryRoot._eventID),delete o.internal.acroformPlugin.acroFormDictionaryRoot._eventID,o.internal.acroformPlugin.printedOut=!0},A=function(t){var e=!t;t||(o.internal.newObjectDeferredBegin(o.internal.acroformPlugin.acroFormDictionaryRoot.objId,!0),o.internal.acroformPlugin.acroFormDictionaryRoot.putStream()),t=t||o.internal.acroformPlugin.acroFormDictionaryRoot.Kids;for(var n in t)if(t.hasOwnProperty(n)){var i=t[n],r=[],a=i.Rect;if(i.Rect&&(i.Rect=F.call(this,i.Rect)),o.internal.newObjectDeferredBegin(i.objId,!0),i.DA=$.createDefaultAppearanceStream(i),"object"==typeof i&&"function"==typeof i.getKeyValueListForStream&&(r=i.getKeyValueListForStream()),i.Rect=a,i.hasAppearanceStream&&!i.appearanceStreamContent){var s=_.call(this,i);r.push({key:"AP",value:"<</N "+s+">>"}),o.internal.acroformPlugin.xForms.push(s)}if(i.appearanceStreamContent){var c="";for(var l in i.appearanceStreamContent)if(i.appearanceStreamContent.hasOwnProperty(l)){var u=i.appearanceStreamContent[l];if(c+="/"+l+" ",c+="<<",Object.keys(u).length>=1||Array.isArray(u)){for(var n in u)if(u.hasOwnProperty(n)){var h=u[n];"function"==typeof h&&(h=h.call(this,i)),c+="/"+n+" "+h+" ",o.internal.acroformPlugin.xForms.indexOf(h)>=0||o.internal.acroformPlugin.xForms.push(h)}}else h=u,"function"==typeof h&&(h=h.call(this,i)),c+="/"+n+" "+h,o.internal.acroformPlugin.xForms.indexOf(h)>=0||o.internal.acroformPlugin.xForms.push(h);c+=">>"}r.push({key:"AP",value:"<<\n"+c+">>"})}o.internal.putStream({additionalKeyValues:r}),o.internal.out("endobj")}e&&B.call(this,o.internal.acroformPlugin.xForms)},B=function(t){for(var e in t)if(t.hasOwnProperty(e)){var n=e,i=t[e];o.internal.newObjectDeferredBegin(i&&i.objId,!0),"object"==typeof i&&"function"==typeof i.putStream&&i.putStream(),delete t[n]}},N=function(){if(void 0!==this.internal&&(void 0===this.internal.acroformPlugin||!1===this.internal.acroformPlugin.isInitialized)){if(o=this,D.FieldNum=0,this.internal.acroformPlugin=JSON.parse(JSON.stringify(P)),this.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("Exception while creating AcroformDictionary");s=o.internal.scaleFactor,o.internal.acroformPlugin.acroFormDictionaryRoot=new H,o.internal.acroformPlugin.acroFormDictionaryRoot._eventID=o.internal.events.subscribe("postPutResources",L),o.internal.events.subscribe("buildDocument",E),o.internal.events.subscribe("putCatalog",S),o.internal.events.subscribe("postPutPages",A),o.internal.acroformPlugin.isInitialized=!0}},I=a.__acroform__.arrayToPdfArray=function(t){if(Array.isArray(t)){for(var e="[",n=0;n<t.length;n++)switch(0!==n&&(e+=" "),typeof t[n]){case"boolean":case"number":case"object":e+=t[n].toString();break;case"string":"/"!==t[n].substr(0,1)?e+="("+c(t[n].toString())+")":e+=t[n].toString()}return e+="]"}throw new Error("Invalid argument passed to jsPDF.__acroform__.arrayToPdfArray")},M=function(t){var e=[];return"string"==typeof t&&(e=r(t,/\((.*?)\)/g)),e},W=function(t){return t=t||"",t.toString(),t="("+c(t)+")"},q=function(){var t;Object.defineProperty(this,"objId",{configurable:!0,get:function(){return t||(t=o.internal.newObjectDeferred()),t},set:function(e){t=e}})};q.prototype.toString=function(){return this.objId+" 0 R"},q.prototype.putStream=function(){var t=this.getKeyValueListForStream();o.internal.putStream({data:this.stream,additionalKeyValues:t}),o.internal.out("endobj")},q.prototype.getKeyValueListForStream=function(){return function(t){var e=[],n=Object.getOwnPropertyNames(t).filter(function(t){return"content"!=t&&"appearanceStreamContent"!=t&&"_"!=t.substring(0,1)});for(var i in n){var r=Object.getOwnPropertyDescriptor(t,n[i]);if(r&&!1===r.configurable){var o=n[i],a=t[o];a&&(Array.isArray(a)?e.push({key:o,value:I(a)}):a instanceof q?e.push({key:o,value:a.objId+" 0 R"}):"function"!=typeof a&&e.push({key:o,value:a}))}}return e}(this)};var k=function(){q.call(this),Object.defineProperty(this,"Type",{value:"/XObject",configurable:!1,writeable:!0}),Object.defineProperty(this,"Subtype",{value:"/Form",configurable:!1,writeable:!0}),Object.defineProperty(this,"FormType",{value:1,configurable:!1,writeable:!0});var t=[];Object.defineProperty(this,"BBox",{configurable:!1,writeable:!0,get:function(){return t},set:function(e){t=e}}),Object.defineProperty(this,"Resources",{value:"2 0 R",configurable:!1,writeable:!0});var e;Object.defineProperty(this,"stream",{enumerable:!1,configurable:!0,set:function(t){e=t.trim()},get:function(){return e||null}})};f(k,q);var H=function(){q.call(this);var t=[];Object.defineProperty(this,"Kids",{enumerable:!1,configurable:!0,get:function(){return t.length>0?t:void 0}}),Object.defineProperty(this,"Fields",{enumerable:!1,configurable:!1,get:function(){return t}});var e;Object.defineProperty(this,"DA",{enumerable:!1,configurable:!1,get:function(){if(e)return"("+e+")"},set:function(t){e=t}})};f(H,q);var D=function(){q.call(this);var t=4;this.isUnicode=!1,this.trueValue="",Object.defineProperty(this,"F",{enumerable:!1,configurable:!1,get:function(){return t},set:function(e){if(isNaN(e))throw new Error('Invalid value "'+e+'" for attribute F supplied.');t=e}}),Object.defineProperty(this,"showWhenPrinted",{enumerable:!0,configurable:!0,get:function(){return Boolean(b(t,3))},set:function(e){!0===Boolean(e)?this.F=x(t,3):this.F=T(t,3)}});var e=0;Object.defineProperty(this,"Ff",{enumerable:!1,configurable:!1,get:function(){return e},set:function(t){if(isNaN(t))throw new Error('Invalid value "'+t+'" for attribute Ff supplied.');e=t}});var i=[];Object.defineProperty(this,"Rect",{enumerable:!1,configurable:!1,get:function(){if(0!==i.length)return i},set:function(t){i=void 0!==t?t:[]}}),Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,get:function(){return!i||isNaN(i[0])?0:p(i[0])},set:function(t){i[0]=d(t)}}),Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,get:function(){return!i||isNaN(i[1])?0:p(i[1])},set:function(t){i[1]=d(t)}}),Object.defineProperty(this,"width",{enumerable:!0,configurable:!0,get:function(){return!i||isNaN(i[2])?0:p(i[2])},set:function(t){i[2]=d(t)}}),Object.defineProperty(this,"height",{enumerable:!0,configurable:!0,get:function(){return!i||isNaN(i[3])?0:p(i[3])},set:function(t){i[3]=d(t)}});var r="";Object.defineProperty(this,"FT",{enumerable:!0,configurable:!1,get:function(){return r},set:function(t){switch(t){case"/Btn":case"/Tx":case"/Ch":case"/Sig":r=t;break;default:throw new Error('Invalid value "'+t+'" for attribute FT supplied.')}}});var o=null;Object.defineProperty(this,"T",{enumerable:!0,configurable:!1,get:function(){if(!o||o.length<1){if(this instanceof K)return;o="FieldObject"+D.FieldNum++}return"("+c(o)+")"},set:function(t){o=t.toString()}}),Object.defineProperty(this,"fieldName",{configurable:!0,enumerable:!0,get:function(){return o},set:function(t){o=t}});var a="helvetica";Object.defineProperty(this,"fontName",{enumerable:!0,configurable:!0,get:function(){return a},set:function(t){a=t}});var s="normal";Object.defineProperty(this,"fontStyle",{enumerable:!0,configurable:!0,get:function(){return s},set:function(t){s=t}});var u=0;Object.defineProperty(this,"fontSize",{enumerable:!0,configurable:!0,get:function(){return p(u)},set:function(t){u=d(t)}});var h=50;Object.defineProperty(this,"maxFontSize",{enumerable:!0,configurable:!0,get:function(){return p(h)},set:function(t){h=d(t)}});var f="black";Object.defineProperty(this,"color",{enumerable:!0,configurable:!0,get:function(){return f},set:function(t){f=t}});var g="/F1 0 Tf 0 g";Object.defineProperty(this,"DA",{enumerable:!0,configurable:!1,get:function(){if(!(!g||this instanceof K||this instanceof Z))return W(g)},set:function(t){t=t.toString(),g=t}});var m=null;Object.defineProperty(this,"DV",{enumerable:!1,configurable:!1,get:function(){if(m)return this instanceof U==!1?W(m):m},set:function(t){t=t.toString(),m=this instanceof U==!1?l("("===t.substr(0,1)?t.substr(1,t.length-2):t):t}}),Object.defineProperty(this,"defaultValue",{enumerable:!0,configurable:!0,get:function(){return this instanceof U==!0?l(m.substr(1,m.length-1)):m},set:function(t){t=t.toString(),m=this instanceof U==!0?"/"+t:t}});var v=null;Object.defineProperty(this,"V",{enumerable:!1,configurable:!1,get:function(){if(this.isUnicode)return v;if(v)return this instanceof U==!1?W(v):v},set:function(t){t=t.toString(),this.isUnicode?(v=n(t),this.trueValue=t):v=this instanceof U==!1?l("("===t.substr(0,1)?t.substr(1,t.length-2):t):t}}),Object.defineProperty(this,"value",{enumerable:!0,configurable:!0,get:function(){return this instanceof U==!0?l(v.substr(1,v.length-1)):v},set:function(t){t=t.toString(),v=this instanceof U==!0?"/"+t:t}}),Object.defineProperty(this,"hasAnnotation",{enumerable:!0,configurable:!0,get:function(){return this.Rect}}),Object.defineProperty(this,"Type",{enumerable:!0,configurable:!1,get:function(){return this.hasAnnotation?"/Annot":null}}),Object.defineProperty(this,"Subtype",{enumerable:!0,configurable:!1,get:function(){return this.hasAnnotation?"/Widget":null}});var y=!1;Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,writeable:!0,get:function(){return y},set:function(t){t=Boolean(t),y=t}});var F;Object.defineProperty(this,"page",{enumerable:!0,configurable:!0,writeable:!0,get:function(){if(F)return F},set:function(t){F=t}}),Object.defineProperty(this,"readOnly",{enumerable:!0,configurable:!0,get:function(){return Boolean(b(this.Ff,1))},set:function(t){!0===Boolean(t)?this.Ff=x(this.Ff,1):this.Ff=T(this.Ff,1)}}),Object.defineProperty(this,"required",{enumerable:!0,configurable:!0,get:function(){return Boolean(b(this.Ff,2))},set:function(t){!0===Boolean(t)?this.Ff=x(this.Ff,2):this.Ff=T(this.Ff,2)}}),Object.defineProperty(this,"noExport",{enumerable:!0,configurable:!0,get:function(){return Boolean(b(this.Ff,3))},set:function(t){!0===Boolean(t)?this.Ff=x(this.Ff,3):this.Ff=T(this.Ff,3)}});var _=null;Object.defineProperty(this,"Q",{enumerable:!0,configurable:!1,get:function(){if(null!==_)return _},set:function(t){if(-1===[0,1,2].indexOf(t))throw new Error('Invalid value "'+t+'" for attribute Q supplied.');_=t}}),Object.defineProperty(this,"textAlign",{get:function(){var t;switch(_){case 0:default:t="left";break;case 1:t="center";break;case 2:t="right"}return t},configurable:!0,enumerable:!0,set:function(t){switch(t){case"right":case 2:_=2;break;case"center":case 1:_=1;break;case"left":case 0:default:_=0}}})};f(D,q);var j=function(){D.call(this),this.FT="/Ch",this.V="()",this.fontName="zapfdingbats";var t=0;Object.defineProperty(this,"TI",{enumerable:!0,configurable:!1,get:function(){return t},set:function(e){t=e}});var e="<< /BG [ 0.975 0.975 0.975 ] >>";Object.defineProperty(this,"MK",{enumerable:!0,configurable:!1,get:function(){return e},set:function(t){e=t}}),Object.defineProperty(this,"topIndex",{enumerable:!0,configurable:!0,get:function(){return t},set:function(e){t=e}});var n=[];Object.defineProperty(this,"Opt",{enumerable:!0,configurable:!1,get:function(){return this.isUnicode?i(n):I(n)},set:function(t){n=M(t)}}),this.getOptions=function(){return n},this.setOptions=function(t){n=t,this.sort&&n.sort()},this.addOption=function(t){t=t||"",t=t.toString(),n.push(t),this.sort&&n.sort()},this.removeOption=function(t,e){for(e=e||!1,t=t||"",t=t.toString();-1!==n.indexOf(t)&&(n.splice(n.indexOf(t),1),!1!==e););},Object.defineProperty(this,"combo",{enumerable:!0,configurable:!0,get:function(){return Boolean(b(this.Ff,18))},set:function(t){!0===Boolean(t)?this.Ff=x(this.Ff,18):this.Ff=T(this.Ff,18)}}),Object.defineProperty(this,"edit",{enumerable:!0,configurable:!0,get:function(){return Boolean(b(this.Ff,19))},set:function(t){!0===this.combo&&(!0===Boolean(t)?this.Ff=x(this.Ff,19):this.Ff=T(this.Ff,19))}}),Object.defineProperty(this,"sort",{enumerable:!0,configurable:!0,get:function(){return Boolean(b(this.Ff,20))},set:function(t){!0===Boolean(t)?(this.Ff=x(this.Ff,20),n.sort()):this.Ff=T(this.Ff,20)}}),Object.defineProperty(this,"multiSelect",{enumerable:!0,configurable:!0,get:function(){return Boolean(b(this.Ff,22))},set:function(t){!0===Boolean(t)?this.Ff=x(this.Ff,22):this.Ff=T(this.Ff,22)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return Boolean(b(this.Ff,23))},set:function(t){!0===Boolean(t)?this.Ff=x(this.Ff,23):this.Ff=T(this.Ff,23)}}),Object.defineProperty(this,"commitOnSelChange",{enumerable:!0,configurable:!0,get:function(){return Boolean(b(this.Ff,27))},set:function(t){!0===Boolean(t)?this.Ff=x(this.Ff,27):this.Ff=T(this.Ff,27)}}),this.hasAppearanceStream=!1};f(j,D);var z=function(){j.call(this),this.fontName="helvetica",this.combo=!1};f(z,j);var G=function(){z.call(this),this.combo=!0};f(G,z);var V=function(){G.call(this),this.edit=!0};f(V,G);var U=function(){D.call(this),this.FT="/Btn",Object.defineProperty(this,"noToggleToOff",{enumerable:!0,configurable:!0,get:function(){return Boolean(b(this.Ff,15))},set:function(t){!0===Boolean(t)?this.Ff=x(this.Ff,15):this.Ff=T(this.Ff,15)}}),Object.defineProperty(this,"radio",{enumerable:!0,configurable:!0,get:function(){return Boolean(b(this.Ff,16))},set:function(t){!0===Boolean(t)?this.Ff=x(this.Ff,16):this.Ff=T(this.Ff,16)}}),Object.defineProperty(this,"pushButton",{enumerable:!0,configurable:!0,get:function(){return Boolean(b(this.Ff,17))},set:function(t){!0===Boolean(t)?this.Ff=x(this.Ff,17):this.Ff=T(this.Ff,17)}}),Object.defineProperty(this,"radioIsUnison",{enumerable:!0,configurable:!0,get:function(){return Boolean(b(this.Ff,26))},set:function(t){!0===Boolean(t)?this.Ff=x(this.Ff,26):this.Ff=T(this.Ff,26)}});var t={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){if(0!==Object.keys(t).length){var e=[];e.push("<<");var n;for(n in t)e.push("/"+n+" ("+t[n]+")");return e.push(">>"),e.join("\n")}},set:function(e){"object"==typeof e&&(t=e)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return t.CA||""},set:function(e){"string"==typeof e&&(t.CA=e)}});var e;Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return e},set:function(t){e=t}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return e.substr(1,e.length-1)},set:function(t){e="/"+t}})};f(U,D);var Q=function(){U.call(this),this.pushButton=!0};f(Q,U);var Y=function(){U.call(this),this.radio=!0,this.pushButton=!1;var t=[];Object.defineProperty(this,"Kids",{enumerable:!0,configurable:!1,get:function(){return t},set:function(e){t=void 0!==e?e:[]}})};f(Y,U);var K=function(){D.call(this);var t;Object.defineProperty(this,"Parent",{enumerable:!1,configurable:!1,get:function(){return t},set:function(e){t=e}});var e;Object.defineProperty(this,"optionName",{enumerable:!1,configurable:!0,get:function(){return e},set:function(t){e=t}});var n={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var t=[];t.push("<<");var e;for(e in n)t.push("/"+e+" ("+n[e]+")");return t.push(">>"),t.join("\n")},set:function(t){"object"==typeof t&&(n=t)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return n.CA||""},set:function(t){"string"==typeof t&&(n.CA=t)}});var i;Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return i},set:function(t){i=t}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return i.substr(1,i.length-1)},set:function(t){i="/"+t}}),this.caption="l",this.appearanceState="Off",this._AppearanceType=$.RadioButton.Circle,this.appearanceStreamContent=this._AppearanceType.createAppearanceStream(this.optionName)};f(K,D),Y.prototype.setAppearance=function(t){if(!("createAppearanceStream"in t&&"getCA"in t))throw new Error("Couldn't assign Appearance to RadioButton. Appearance was Invalid!");for(var e in this.Kids)if(this.Kids.hasOwnProperty(e)){var n=this.Kids[e];n.appearanceStreamContent=t.createAppearanceStream(n.optionName),n.caption=t.getCA()}},Y.prototype.createOption=function(t){var e=new K;return e.Parent=this,e.optionName=t,this.Kids.push(e),tt.call(this,e),e};var X=function(){U.call(this),this.fontName="zapfdingbats",this.caption="3",this.appearanceState="On",this.value="On",this.textAlign="center",this.appearanceStreamContent=$.CheckBox.createAppearanceStream()};f(X,U);var Z=function(){D.call(this),this.FT="/Tx",Object.defineProperty(this,"multiline",{enumerable:!0,configurable:!0,get:function(){return Boolean(b(this.Ff,13))},set:function(t){!0===Boolean(t)?this.Ff=x(this.Ff,13):this.Ff=T(this.Ff,13)}}),Object.defineProperty(this,"fileSelect",{enumerable:!0,configurable:!0,get:function(){return Boolean(b(this.Ff,21))},set:function(t){!0===Boolean(t)?this.Ff=x(this.Ff,21):this.Ff=T(this.Ff,21)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return Boolean(b(this.Ff,23))},set:function(t){!0===Boolean(t)?this.Ff=x(this.Ff,23):this.Ff=T(this.Ff,23)}}),Object.defineProperty(this,"doNotScroll",{enumerable:!0,configurable:!0,get:function(){return Boolean(b(this.Ff,24))},set:function(t){!0===Boolean(t)?this.Ff=x(this.Ff,24):this.Ff=T(this.Ff,24)}}),Object.defineProperty(this,"comb",{enumerable:!0,configurable:!0,get:function(){return Boolean(b(this.Ff,25))},set:function(t){!0===Boolean(t)?this.Ff=x(this.Ff,25):this.Ff=T(this.Ff,25)}}),Object.defineProperty(this,"richText",{enumerable:!0,configurable:!0,get:function(){return Boolean(b(this.Ff,26))},set:function(t){!0===Boolean(t)?this.Ff=x(this.Ff,26):this.Ff=T(this.Ff,26)}});var t=null;Object.defineProperty(this,"MaxLen",{enumerable:!0,configurable:!1,get:function(){return t},set:function(e){t=e}}),Object.defineProperty(this,"maxLength",{enumerable:!0,configurable:!0,get:function(){return t},set:function(e){Number.isInteger(e)&&(t=e)}}),Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return this.V||this.DV}})};f(Z,D);var J=function(){Z.call(this),Object.defineProperty(this,"password",{enumerable:!0,configurable:!0,get:function(){return Boolean(b(this.Ff,14))},set:function(t){!0===Boolean(t)?this.Ff=x(this.Ff,14):this.Ff=T(this.Ff,14)}}),this.password=!0};f(J,Z);var $={CheckBox:{createAppearanceStream:function(){return{N:{On:$.CheckBox.YesNormal},D:{On:$.CheckBox.YesPushDown,Off:$.CheckBox.OffPushDown}}},YesPushDown:function(t){var e=new g(t),n=[],i=o.internal.getFont(t.fontName,t.fontStyle).id,r=o.__private__.encodeColorString(t.color),a=w(t,t.caption);return n.push("0.749023 g"),n.push("0 0 "+u($.internal.getWidth(t))+" "+u($.internal.getHeight(t))+" re"),n.push("f"),n.push("BMC"),n.push("q"),n.push("0 0 1 rg"),n.push("/"+i+" "+u(a.fontSize)+" Tf "+r),n.push("BT"),n.push(a.text),n.push("ET"),n.push("Q"),n.push("EMC"),e.stream=n.join("\n"),e},YesNormal:function(t){var e=new g(t),n=o.internal.getFont(t.fontName,t.fontStyle).id,i=o.__private__.encodeColorString(t.color),r=[],a=$.internal.getHeight(t),s=$.internal.getWidth(t),c=w(t,t.caption);return r.push("1 g"),r.push("0 0 "+u(s)+" "+u(a)+" re"),r.push("f"),r.push("q"),r.push("0 0 1 rg"),r.push("0 0 "+u(s-1)+" "+u(a-1)+" re"),r.push("W"),r.push("n"),r.push("0 g"),r.push("BT"),r.push("/"+n+" "+u(c.fontSize)+" Tf "+i),r.push(c.text),r.push("ET"),r.push("Q"),e.stream=r.join("\n"),e},OffPushDown:function(t){var e=new g(t),n=[];return n.push("0.749023 g"),n.push("0 0 "+u($.internal.getWidth(t))+" "+u($.internal.getHeight(t))+" re"),n.push("f"),e.stream=n.join("\n"),e}},RadioButton:{Circle:{createAppearanceStream:function(t){var e={D:{Off:$.RadioButton.Circle.OffPushDown},N:{}};return e.N[t]=$.RadioButton.Circle.YesNormal,e.D[t]=$.RadioButton.Circle.YesPushDown,e},getCA:function(){return"l"},YesNormal:function(t){var e=new g(t),n=[],i=$.internal.getWidth(t)<=$.internal.getHeight(t)?$.internal.getWidth(t)/4:$.internal.getHeight(t)/4;i=Number((.9*i).toFixed(5));var r=$.internal.Bezier_C,o=Number((i*r).toFixed(5));return n.push("q"),n.push("1 0 0 1 "+h($.internal.getWidth(t)/2)+" "+h($.internal.getHeight(t)/2)+" cm"),n.push(i+" 0 m"),n.push(i+" "+o+" "+o+" "+i+" 0 "+i+" c"),n.push("-"+o+" "+i+" -"+i+" "+o+" -"+i+" 0 c"),n.push("-"+i+" -"+o+" -"+o+" -"+i+" 0 -"+i+" c"),n.push(o+" -"+i+" "+i+" -"+o+" "+i+" 0 c"),n.push("f"),n.push("Q"),e.stream=n.join("\n"),e},YesPushDown:function(t){var e=new g(t),n=[],i=$.internal.getWidth(t)<=$.internal.getHeight(t)?$.internal.getWidth(t)/4:$.internal.getHeight(t)/4,i=Number((.9*i).toFixed(5)),r=Number((2*i).toFixed(5)),o=Number((r*$.internal.Bezier_C).toFixed(5)),a=Number((i*$.internal.Bezier_C).toFixed(5));return n.push("0.749023 g"),n.push("q"),n.push("1 0 0 1 "+h($.internal.getWidth(t)/2)+" "+h($.internal.getHeight(t)/2)+" cm"),n.push(r+" 0 m"),n.push(r+" "+o+" "+o+" "+r+" 0 "+r+" c"),n.push("-"+o+" "+r+" -"+r+" "+o+" -"+r+" 0 c"),n.push("-"+r+" -"+o+" -"+o+" -"+r+" 0 -"+r+" c"),n.push(o+" -"+r+" "+r+" -"+o+" "+r+" 0 c"),n.push("f"),n.push("Q"),n.push("0 g"),n.push("q"),n.push("1 0 0 1 "+h($.internal.getWidth(t)/2)+" "+h($.internal.getHeight(t)/2)+" cm"),n.push(i+" 0 m"),n.push(i+" "+a+" "+a+" "+i+" 0 "+i+" c"),n.push("-"+a+" "+i+" -"+i+" "+a+" -"+i+" 0 c"),n.push("-"+i+" -"+a+" -"+a+" -"+i+" 0 -"+i+" c"),n.push(a+" -"+i+" "+i+" -"+a+" "+i+" 0 c"),n.push("f"),n.push("Q"),e.stream=n.join("\n"),e},OffPushDown:function(t){var e=new g(t),n=[],i=$.internal.getWidth(t)<=$.internal.getHeight(t)?$.internal.getWidth(t)/4:$.internal.getHeight(t)/4;i=Number((.9*i).toFixed(5));var r=Number((2*i).toFixed(5)),o=Number((r*$.internal.Bezier_C).toFixed(5));return n.push("0.749023 g"),n.push("q"),n.push("1 0 0 1 "+h($.internal.getWidth(t)/2)+" "+h($.internal.getHeight(t)/2)+" cm"),n.push(r+" 0 m"),n.push(r+" "+o+" "+o+" "+r+" 0 "+r+" c"),n.push("-"+o+" "+r+" -"+r+" "+o+" -"+r+" 0 c"),n.push("-"+r+" -"+o+" -"+o+" -"+r+" 0 -"+r+" c"),n.push(o+" -"+r+" "+r+" -"+o+" "+r+" 0 c"),n.push("f"),n.push("Q"),e.stream=n.join("\n"),e}},Cross:{createAppearanceStream:function(t){var e={D:{Off:$.RadioButton.Cross.OffPushDown},N:{}};return e.N[t]=$.RadioButton.Cross.YesNormal,e.D[t]=$.RadioButton.Cross.YesPushDown,e},getCA:function(){return"8"},YesNormal:function(t){var e=new g(t),n=[],i=$.internal.calculateCross(t);return n.push("q"),n.push("1 1 "+u($.internal.getWidth(t)-2)+" "+u($.internal.getHeight(t)-2)+" re"),n.push("W"),n.push("n"),n.push(u(i.x1.x)+" "+u(i.x1.y)+" m"),n.push(u(i.x2.x)+" "+u(i.x2.y)+" l"),n.push(u(i.x4.x)+" "+u(i.x4.y)+" m"),n.push(u(i.x3.x)+" "+u(i.x3.y)+" l"),n.push("s"),n.push("Q"),e.stream=n.join("\n"),e},YesPushDown:function(t){var e=new g(t),n=$.internal.calculateCross(t),i=[];return i.push("0.749023 g"),i.push("0 0 "+u($.internal.getWidth(t))+" "+u($.internal.getHeight(t))+" re"),i.push("f"),i.push("q"),i.push("1 1 "+u($.internal.getWidth(t)-2)+" "+u($.internal.getHeight(t)-2)+" re"),i.push("W"),i.push("n"),i.push(u(n.x1.x)+" "+u(n.x1.y)+" m"),i.push(u(n.x2.x)+" "+u(n.x2.y)+" l"),i.push(u(n.x4.x)+" "+u(n.x4.y)+" m"),i.push(u(n.x3.x)+" "+u(n.x3.y)+" l"),i.push("s"),i.push("Q"),e.stream=i.join("\n"),e},OffPushDown:function(t){var e=new g(t),n=[];return n.push("0.749023 g"),n.push("0 0 "+u($.internal.getWidth(t))+" "+u($.internal.getHeight(t))+" re"),n.push("f"),e.stream=n.join("\n"),e}}},createDefaultAppearanceStream:function(t){var e=o.internal.getFont(t.fontName,t.fontStyle).id,n=o.__private__.encodeColorString(t.color);return"/"+e+" "+t.fontSize+" Tf "+n}};$.internal={Bezier_C:.551915024494,calculateCross:function(t){var e=$.internal.getWidth(t),n=$.internal.getHeight(t),i=Math.min(e,n);return{x1:{x:(e-i)/2,y:(n-i)/2+i},x2:{x:(e-i)/2+i,y:(n-i)/2},x3:{x:(e-i)/2,y:(n-i)/2},x4:{x:(e-i)/2+i,y:(n-i)/2+i}}}},$.internal.getWidth=function(t){var e=0;return"object"==typeof t&&(e=d(t.Rect[2])),e},$.internal.getHeight=function(t){var e=0;return"object"==typeof t&&(e=d(t.Rect[3])),e};var tt=a.addField=function(t){if(N.call(this),!(t instanceof D))throw new Error("Invalid argument passed to jsPDF.addField.");return C.call(this,t),t.page=o.internal.getCurrentPageInfo().pageNumber,this};a.addButton=function(t){if(t instanceof U==!1)throw new Error("Invalid argument passed to jsPDF.addButton.");return tt.call(this,t)},a.addTextField=function(t){if(t instanceof Z==!1)throw new Error("Invalid argument passed to jsPDF.addTextField.");return tt.call(this,t)},a.addChoiceField=function(t){if(t instanceof j==!1)throw new Error("Invalid argument passed to jsPDF.addChoiceField.");return tt.call(this,t)},"object"==typeof e&&void 0===e.ChoiceField&&void 0===e.ListBox&&void 0===e.ComboBox&&void 0===e.EditBox&&void 0===e.Button&&void 0===e.PushButton&&void 0===e.RadioButton&&void 0===e.CheckBox&&void 0===e.TextField&&void 0===e.PasswordField&&(e.ChoiceField=j,e.ListBox=z,e.ComboBox=G,e.EditBox=V,e.Button=U,e.PushButton=Q,e.RadioButton=Y,e.CheckBox=X,e.TextField=Z,e.PasswordField=J,e.AcroForm={Appearance:$}),a.AcroFormChoiceField=j,a.AcroFormListBox=z,a.AcroFormComboBox=G,a.AcroFormEditBox=V,a.AcroFormButton=U,a.AcroFormPushButton=Q,a.AcroFormRadioButton=Y,a.AcroFormCheckBox=X,a.AcroFormTextField=Z,a.AcroFormPasswordField=J,a.AcroFormAppearance=$,a.AcroForm={ChoiceField:j,ListBox:z,ComboBox:G,EditBox:V,Button:U,PushButton:Q,RadioButton:Y,CheckBox:X,TextField:Z,PasswordField:J,Appearance:$},t.AcroForm={ChoiceField:j,ListBox:z,ComboBox:G,EditBox:V,Button:U,PushButton:Q,RadioButton:Y,CheckBox:X,TextField:Z,PasswordField:J,Appearance:$}}(e.jsPDF,"undefined"!=typeof window&&window||void 0!==t&&t)}).call(e,n(58))},function(t,e,n){/**
13
+ var e=n(18);!function(t,e){"use strict";function n(t){for(var e="",n=0;n<t.length;n++){for(var i=t.charCodeAt(n).toString(16).toUpperCase();i.length<4;)i="0"+i;e+=i}return"<FEFF"+e+">"}function i(t){for(var e="[ ",i=0;i<t.length;i++)e+=n(t[i]);return e+=" ]"}function r(t,e,n){n||(n=1);for(var i,r=[];i=e.exec(t);)r.push(i[n]);return r}var o,a=t.API,s=1,c=function(t){return t.replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},l=function(t){return t.replace(/\\\\/g,"\\").replace(/\\\(/g,"(").replace(/\\\)/g,")")},u=function(t){return t.toFixed(2)},h=function(t){return t.toFixed(5)};a.__acroform__={};var f=function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t},d=function(t){return t*s},p=function(t){return t/s},g=function(t){var e=new k,n=$.internal.getHeight(t)||0,i=$.internal.getWidth(t)||0;return e.BBox=[0,0,Number(u(i)),Number(u(n))],e},m=a.__acroform__.setBit=function(t,e){if(t=t||0,e=e||0,isNaN(t)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBit");return t|=1<<e},v=a.__acroform__.clearBit=function(t,e){if(t=t||0,e=e||0,isNaN(t)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBit");return t&=~(1<<e)},y=a.__acroform__.getBit=function(t,e){if(isNaN(t)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBit");return 0==(t&1<<e)?0:1},b=a.__acroform__.getBitForPdf=function(t,e){if(isNaN(t)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBitForPdf");return y(t,e-1)},x=a.__acroform__.setBitForPdf=function(t,e){if(isNaN(t)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBitForPdf");return m(t,e-1)},T=a.__acroform__.clearBitForPdf=function(t,e){if(isNaN(t)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBitForPdf");return v(t,e-1)},F=a.__acroform__.calculateCoordinates=function(t){var e=this.internal.getHorizontalCoordinate,n=this.internal.getVerticalCoordinate,i=t[0],r=t[1],o=t[2],a=t[3],s={};return s.lowerLeft_X=e(i)||0,s.lowerLeft_Y=n(r+a)||0,s.upperRight_X=e(i+o)||0,s.upperRight_Y=n(r)||0,[Number(u(s.lowerLeft_X)),Number(u(s.lowerLeft_Y)),Number(u(s.upperRight_X)),Number(u(s.upperRight_Y))]},_=function(t){if(t.appearanceStreamContent)return t.appearanceStreamContent;if(t.V||t.DV){var e=[],n=t.V||t.DV,i=w(t,n),r=o.internal.getFont(t.fontName,t.fontStyle).id;e.push("/Tx BMC"),e.push("q"),e.push("BT"),e.push(o.__private__.encodeColorString(t.color)),e.push("/"+r+" "+u(i.fontSize)+" Tf"),e.push("1 0 0 1 0 0 Tm"),e.push(i.text),e.push("ET"),e.push("Q"),e.push("EMC");var a=new g(t);return a.stream=e.join("\n"),a}},w=function(t,e){t.isUnicode&&(e=t.trueValue);var n=0===t.fontSize?t.maxFontSize:t.fontSize,i={text:"",fontSize:""};e="("==e.substr(0,1)?e.substr(1):e,e=")"==e.substr(e.length-1)?e.substr(0,e.length-1):e;var r=e.split(" ");r=r.map(function(t){return t.split("\n")}),t.multiline||(r=r.map(function(t){return[t.join(" ")]}));var a=n,s=2,l=2,h=$.internal.getHeight(t)||0;h=h<0?-h:h;var f=$.internal.getWidth(t)||0;f=f<0?-f:f;var d=function(e,n,i){if(e+1<r.length){var o=n+" "+r[e+1][0];return R(o,t,i).width<=f-2*l}return!1};a++;t:for(;a>0;){e="",a--;var p=R("3",t,a).height,g=t.multiline?h-a:(h-p)/2;g+=s;var m,v,y=g,b=0,x=0,T=0;if(a<=0){a=12,e="(...) Tj\n",e+="% Width of Text: "+R(e,t,a).width+", FieldWidth:"+f+"\n";break}for(var F="",_=0,w=0;w<r.length;w++)if(r.hasOwnProperty(w)){var P=!1;if(1!==r[w].length&&T!==r[w].length-1){if((p+s)*(_+2)+s>h)continue t;F+=r[w][T],P=!0,x=w,w--}else{F+=r[w][T]+" ",F=" "==F.substr(F.length-1)?F.substr(0,F.length-1):F;var E=parseInt(w),C=d(E,F,a),O=w>=r.length-1;if(C&&!O){F+=" ",T=0;continue}if(C||O){if(O)x=E;else if(t.multiline&&(p+s)*(_+2)+s>h)continue t}else{if(!t.multiline)continue t;if((p+s)*(_+2)+s>h)continue t;x=E}}for(var S="",L=b;L<=x;L++){var A=r[L];if(t.multiline){if(L===x){S+=A[T]+" ",T=(T+1)%A.length;continue}if(L===b){S+=A[A.length-1]+" ";continue}}S+=A[0]+" "}switch(S=" "==S.substr(S.length-1)?S.substr(0,S.length-1):S,v=R(S,t,a).width,t.textAlign){case"right":m=f-v-l;break;case"center":m=(f-v)/2;break;case"left":default:m=l}if(e+=u(m)+" "+u(y)+" Td\n",t.isUnicode){var B={};B[o.internal.getFont().id]=o.internal.getFont();var N={text:S,x:null,y:null,options:{lang:null},mutex:{pdfEscape:c,activeFontKey:o.internal.getFont().id,fonts:B,activeFontSize:t.fontSize}};o.internal.events.publish("postProcessText",N),e+="<"+N.text+"> Tj\n"}else e+="("+c(S)+") Tj\n";e+=-u(m)+" 0 Td\n",y=-(a+s),v=0,b=P?x:x+1,_++,F=""}else;break}return i.text=e,i.fontSize=a,i},R=function(t,e,n){var i=o.internal.getFont(e.fontName,e.fontStyle),r=o.getStringUnitWidth(t,{font:i,fontSize:parseFloat(n),charSpace:0})*parseFloat(n);return{height:o.getStringUnitWidth("3",{font:i,fontSize:parseFloat(n),charSpace:0})*parseFloat(n)*1.5,width:r}},P={fields:[],xForms:[],acroFormDictionaryRoot:null,printedOut:!1,internal:null,isInitialized:!1},E=function(){o.internal.acroformPlugin.acroFormDictionaryRoot.objId=void 0;var t=o.internal.acroformPlugin.acroFormDictionaryRoot.Fields;for(var e in t)if(t.hasOwnProperty(e)){var n=t[e];n.objId=void 0,n.hasAnnotation&&O.call(o,n)}},C=function(t){o.internal.acroformPlugin.printedOut&&(o.internal.acroformPlugin.printedOut=!1,o.internal.acroformPlugin.acroFormDictionaryRoot=null),o.internal.acroformPlugin.acroFormDictionaryRoot||N.call(o),o.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(t)},O=function(t){var e={type:"reference",object:t},n=function(t){return t.type===e.type&&t.object===e.object};void 0===o.internal.getPageInfo(t.page).pageContext.annotations.find(n)&&o.internal.getPageInfo(t.page).pageContext.annotations.push(e)},S=function(){if(void 0===o.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("putCatalogCallback: Root missing.");o.internal.write("/AcroForm "+o.internal.acroformPlugin.acroFormDictionaryRoot.objId+" 0 R")},L=function(){o.internal.events.unsubscribe(o.internal.acroformPlugin.acroFormDictionaryRoot._eventID),delete o.internal.acroformPlugin.acroFormDictionaryRoot._eventID,o.internal.acroformPlugin.printedOut=!0},A=function(t){var e=!t;t||(o.internal.newObjectDeferredBegin(o.internal.acroformPlugin.acroFormDictionaryRoot.objId,!0),o.internal.acroformPlugin.acroFormDictionaryRoot.putStream()),t=t||o.internal.acroformPlugin.acroFormDictionaryRoot.Kids;for(var n in t)if(t.hasOwnProperty(n)){var i=t[n],r=[],a=i.Rect;if(i.Rect&&(i.Rect=F.call(this,i.Rect)),o.internal.newObjectDeferredBegin(i.objId,!0),i.DA=$.createDefaultAppearanceStream(i),"object"==typeof i&&"function"==typeof i.getKeyValueListForStream&&(r=i.getKeyValueListForStream()),i.Rect=a,i.hasAppearanceStream&&!i.appearanceStreamContent){var s=_.call(this,i);r.push({key:"AP",value:"<</N "+s+">>"}),o.internal.acroformPlugin.xForms.push(s)}if(i.appearanceStreamContent){var c="";for(var l in i.appearanceStreamContent)if(i.appearanceStreamContent.hasOwnProperty(l)){var u=i.appearanceStreamContent[l];if(c+="/"+l+" ",c+="<<",Object.keys(u).length>=1||Array.isArray(u)){for(var n in u)if(u.hasOwnProperty(n)){var h=u[n];"function"==typeof h&&(h=h.call(this,i)),c+="/"+n+" "+h+" ",o.internal.acroformPlugin.xForms.indexOf(h)>=0||o.internal.acroformPlugin.xForms.push(h)}}else h=u,"function"==typeof h&&(h=h.call(this,i)),c+="/"+n+" "+h,o.internal.acroformPlugin.xForms.indexOf(h)>=0||o.internal.acroformPlugin.xForms.push(h);c+=">>"}r.push({key:"AP",value:"<<\n"+c+">>"})}o.internal.putStream({additionalKeyValues:r}),o.internal.out("endobj")}e&&B.call(this,o.internal.acroformPlugin.xForms)},B=function(t){for(var e in t)if(t.hasOwnProperty(e)){var n=e,i=t[e];o.internal.newObjectDeferredBegin(i&&i.objId,!0),"object"==typeof i&&"function"==typeof i.putStream&&i.putStream(),delete t[n]}},N=function(){if(void 0!==this.internal&&(void 0===this.internal.acroformPlugin||!1===this.internal.acroformPlugin.isInitialized)){if(o=this,D.FieldNum=0,this.internal.acroformPlugin=JSON.parse(JSON.stringify(P)),this.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("Exception while creating AcroformDictionary");s=o.internal.scaleFactor,o.internal.acroformPlugin.acroFormDictionaryRoot=new H,o.internal.acroformPlugin.acroFormDictionaryRoot._eventID=o.internal.events.subscribe("postPutResources",L),o.internal.events.subscribe("buildDocument",E),o.internal.events.subscribe("putCatalog",S),o.internal.events.subscribe("postPutPages",A),o.internal.acroformPlugin.isInitialized=!0}},I=a.__acroform__.arrayToPdfArray=function(t){if(Array.isArray(t)){for(var e="[",n=0;n<t.length;n++)switch(0!==n&&(e+=" "),typeof t[n]){case"boolean":case"number":case"object":e+=t[n].toString();break;case"string":"/"!==t[n].substr(0,1)?e+="("+c(t[n].toString())+")":e+=t[n].toString()}return e+="]"}throw new Error("Invalid argument passed to jsPDF.__acroform__.arrayToPdfArray")},M=function(t){var e=[];return"string"==typeof t&&(e=r(t,/\((.*?)\)/g)),e},W=function(t){return t=t||"",t.toString(),t="("+c(t)+")"},q=function(){var t;Object.defineProperty(this,"objId",{configurable:!0,get:function(){return t||(t=o.internal.newObjectDeferred()),t},set:function(e){t=e}})};q.prototype.toString=function(){return this.objId+" 0 R"},q.prototype.putStream=function(){var t=this.getKeyValueListForStream();o.internal.putStream({data:this.stream,additionalKeyValues:t}),o.internal.out("endobj")},q.prototype.getKeyValueListForStream=function(){return function(t){var e=[],n=Object.getOwnPropertyNames(t).filter(function(t){return"content"!=t&&"appearanceStreamContent"!=t&&"_"!=t.substring(0,1)});for(var i in n){var r=Object.getOwnPropertyDescriptor(t,n[i]);if(r&&!1===r.configurable){var o=n[i],a=t[o];a&&(Array.isArray(a)?e.push({key:o,value:I(a)}):a instanceof q?e.push({key:o,value:a.objId+" 0 R"}):"function"!=typeof a&&e.push({key:o,value:a}))}}return e}(this)};var k=function(){q.call(this),Object.defineProperty(this,"Type",{value:"/XObject",configurable:!1,writeable:!0}),Object.defineProperty(this,"Subtype",{value:"/Form",configurable:!1,writeable:!0}),Object.defineProperty(this,"FormType",{value:1,configurable:!1,writeable:!0});var t=[];Object.defineProperty(this,"BBox",{configurable:!1,writeable:!0,get:function(){return t},set:function(e){t=e}}),Object.defineProperty(this,"Resources",{value:"2 0 R",configurable:!1,writeable:!0});var e;Object.defineProperty(this,"stream",{enumerable:!1,configurable:!0,set:function(t){e=t.trim()},get:function(){return e||null}})};f(k,q);var H=function(){q.call(this);var t=[];Object.defineProperty(this,"Kids",{enumerable:!1,configurable:!0,get:function(){return t.length>0?t:void 0}}),Object.defineProperty(this,"Fields",{enumerable:!1,configurable:!1,get:function(){return t}});var e;Object.defineProperty(this,"DA",{enumerable:!1,configurable:!1,get:function(){if(e)return"("+e+")"},set:function(t){e=t}})};f(H,q);var D=function(){q.call(this);var t=4;this.isUnicode=!1,this.trueValue="",Object.defineProperty(this,"F",{enumerable:!1,configurable:!1,get:function(){return t},set:function(e){if(isNaN(e))throw new Error('Invalid value "'+e+'" for attribute F supplied.');t=e}}),Object.defineProperty(this,"showWhenPrinted",{enumerable:!0,configurable:!0,get:function(){return Boolean(b(t,3))},set:function(e){!0===Boolean(e)?this.F=x(t,3):this.F=T(t,3)}});var e=0;Object.defineProperty(this,"Ff",{enumerable:!1,configurable:!1,get:function(){return e},set:function(t){if(isNaN(t))throw new Error('Invalid value "'+t+'" for attribute Ff supplied.');e=t}});var i=[];Object.defineProperty(this,"Rect",{enumerable:!1,configurable:!1,get:function(){if(0!==i.length)return i},set:function(t){i=void 0!==t?t:[]}}),Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,get:function(){return!i||isNaN(i[0])?0:p(i[0])},set:function(t){i[0]=d(t)}}),Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,get:function(){return!i||isNaN(i[1])?0:p(i[1])},set:function(t){i[1]=d(t)}}),Object.defineProperty(this,"width",{enumerable:!0,configurable:!0,get:function(){return!i||isNaN(i[2])?0:p(i[2])},set:function(t){i[2]=d(t)}}),Object.defineProperty(this,"height",{enumerable:!0,configurable:!0,get:function(){return!i||isNaN(i[3])?0:p(i[3])},set:function(t){i[3]=d(t)}});var r="";Object.defineProperty(this,"FT",{enumerable:!0,configurable:!1,get:function(){return r},set:function(t){switch(t){case"/Btn":case"/Tx":case"/Ch":case"/Sig":r=t;break;default:throw new Error('Invalid value "'+t+'" for attribute FT supplied.')}}});var o=null;Object.defineProperty(this,"T",{enumerable:!0,configurable:!1,get:function(){if(!o||o.length<1){if(this instanceof K)return;o="FieldObject"+D.FieldNum++}return"("+c(o)+")"},set:function(t){o=t.toString()}}),Object.defineProperty(this,"fieldName",{configurable:!0,enumerable:!0,get:function(){return o},set:function(t){o=t}});var a="helvetica";Object.defineProperty(this,"fontName",{enumerable:!0,configurable:!0,get:function(){return a},set:function(t){a=t}});var s="normal";Object.defineProperty(this,"fontStyle",{enumerable:!0,configurable:!0,get:function(){return s},set:function(t){s=t}});var u=0;Object.defineProperty(this,"fontSize",{enumerable:!0,configurable:!0,get:function(){return p(u)},set:function(t){u=d(t)}});var h=50;Object.defineProperty(this,"maxFontSize",{enumerable:!0,configurable:!0,get:function(){return p(h)},set:function(t){h=d(t)}});var f="black";Object.defineProperty(this,"color",{enumerable:!0,configurable:!0,get:function(){return f},set:function(t){f=t}});var g="/F1 0 Tf 0 g";Object.defineProperty(this,"DA",{enumerable:!0,configurable:!1,get:function(){if(!(!g||this instanceof K||this instanceof Z))return W(g)},set:function(t){t=t.toString(),g=t}});var m=null;Object.defineProperty(this,"DV",{enumerable:!1,configurable:!1,get:function(){if(m)return this instanceof U==!1?W(m):m},set:function(t){t=t.toString(),m=this instanceof U==!1?l("("===t.substr(0,1)?t.substr(1,t.length-2):t):t}}),Object.defineProperty(this,"defaultValue",{enumerable:!0,configurable:!0,get:function(){return this instanceof U==!0?l(m.substr(1,m.length-1)):m},set:function(t){t=t.toString(),m=this instanceof U==!0?"/"+t:t}});var v=null;Object.defineProperty(this,"V",{enumerable:!1,configurable:!1,get:function(){if(this.isUnicode)return v;if(v)return this instanceof U==!1?W(v):v},set:function(t){t=t.toString(),this.isUnicode?(v=n(t),this.trueValue=t):v=this instanceof U==!1?l("("===t.substr(0,1)?t.substr(1,t.length-2):t):t}}),Object.defineProperty(this,"value",{enumerable:!0,configurable:!0,get:function(){return this instanceof U==!0?l(v.substr(1,v.length-1)):v},set:function(t){t=t.toString(),v=this instanceof U==!0?"/"+t:t}}),Object.defineProperty(this,"hasAnnotation",{enumerable:!0,configurable:!0,get:function(){return this.Rect}}),Object.defineProperty(this,"Type",{enumerable:!0,configurable:!1,get:function(){return this.hasAnnotation?"/Annot":null}}),Object.defineProperty(this,"Subtype",{enumerable:!0,configurable:!1,get:function(){return this.hasAnnotation?"/Widget":null}});var y=!1;Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,writeable:!0,get:function(){return y},set:function(t){t=Boolean(t),y=t}});var F;Object.defineProperty(this,"page",{enumerable:!0,configurable:!0,writeable:!0,get:function(){if(F)return F},set:function(t){F=t}}),Object.defineProperty(this,"readOnly",{enumerable:!0,configurable:!0,get:function(){return Boolean(b(this.Ff,1))},set:function(t){!0===Boolean(t)?this.Ff=x(this.Ff,1):this.Ff=T(this.Ff,1)}}),Object.defineProperty(this,"required",{enumerable:!0,configurable:!0,get:function(){return Boolean(b(this.Ff,2))},set:function(t){!0===Boolean(t)?this.Ff=x(this.Ff,2):this.Ff=T(this.Ff,2)}}),Object.defineProperty(this,"noExport",{enumerable:!0,configurable:!0,get:function(){return Boolean(b(this.Ff,3))},set:function(t){!0===Boolean(t)?this.Ff=x(this.Ff,3):this.Ff=T(this.Ff,3)}});var _=null;Object.defineProperty(this,"Q",{enumerable:!0,configurable:!1,get:function(){if(null!==_)return _},set:function(t){if(-1===[0,1,2].indexOf(t))throw new Error('Invalid value "'+t+'" for attribute Q supplied.');_=t}}),Object.defineProperty(this,"textAlign",{get:function(){var t;switch(_){case 0:default:t="left";break;case 1:t="center";break;case 2:t="right"}return t},configurable:!0,enumerable:!0,set:function(t){switch(t){case"right":case 2:_=2;break;case"center":case 1:_=1;break;case"left":case 0:default:_=0}}})};f(D,q);var j=function(){D.call(this),this.FT="/Ch",this.V="()",this.fontName="zapfdingbats";var t=0;Object.defineProperty(this,"TI",{enumerable:!0,configurable:!1,get:function(){return t},set:function(e){t=e}});var e="<< /BG [ 0.975 0.975 0.975 ] >>";Object.defineProperty(this,"MK",{enumerable:!0,configurable:!1,get:function(){return e},set:function(t){e=t}}),Object.defineProperty(this,"topIndex",{enumerable:!0,configurable:!0,get:function(){return t},set:function(e){t=e}});var n=[];Object.defineProperty(this,"Opt",{enumerable:!0,configurable:!1,get:function(){return this.isUnicode?i(n):I(n)},set:function(t){n=M(t)}}),this.getOptions=function(){return n},this.setOptions=function(t){n=t,this.sort&&n.sort()},this.addOption=function(t){t=t||"",t=t.toString(),n.push(t),this.sort&&n.sort()},this.removeOption=function(t,e){for(e=e||!1,t=t||"",t=t.toString();-1!==n.indexOf(t)&&(n.splice(n.indexOf(t),1),!1!==e););},Object.defineProperty(this,"combo",{enumerable:!0,configurable:!0,get:function(){return Boolean(b(this.Ff,18))},set:function(t){!0===Boolean(t)?this.Ff=x(this.Ff,18):this.Ff=T(this.Ff,18)}}),Object.defineProperty(this,"edit",{enumerable:!0,configurable:!0,get:function(){return Boolean(b(this.Ff,19))},set:function(t){!0===this.combo&&(!0===Boolean(t)?this.Ff=x(this.Ff,19):this.Ff=T(this.Ff,19))}}),Object.defineProperty(this,"sort",{enumerable:!0,configurable:!0,get:function(){return Boolean(b(this.Ff,20))},set:function(t){!0===Boolean(t)?(this.Ff=x(this.Ff,20),n.sort()):this.Ff=T(this.Ff,20)}}),Object.defineProperty(this,"multiSelect",{enumerable:!0,configurable:!0,get:function(){return Boolean(b(this.Ff,22))},set:function(t){!0===Boolean(t)?this.Ff=x(this.Ff,22):this.Ff=T(this.Ff,22)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return Boolean(b(this.Ff,23))},set:function(t){!0===Boolean(t)?this.Ff=x(this.Ff,23):this.Ff=T(this.Ff,23)}}),Object.defineProperty(this,"commitOnSelChange",{enumerable:!0,configurable:!0,get:function(){return Boolean(b(this.Ff,27))},set:function(t){!0===Boolean(t)?this.Ff=x(this.Ff,27):this.Ff=T(this.Ff,27)}}),this.hasAppearanceStream=!1};f(j,D);var z=function(){j.call(this),this.fontName="helvetica",this.combo=!1};f(z,j);var G=function(){z.call(this),this.combo=!0};f(G,z);var V=function(){G.call(this),this.edit=!0};f(V,G);var U=function(){D.call(this),this.FT="/Btn",Object.defineProperty(this,"noToggleToOff",{enumerable:!0,configurable:!0,get:function(){return Boolean(b(this.Ff,15))},set:function(t){!0===Boolean(t)?this.Ff=x(this.Ff,15):this.Ff=T(this.Ff,15)}}),Object.defineProperty(this,"radio",{enumerable:!0,configurable:!0,get:function(){return Boolean(b(this.Ff,16))},set:function(t){!0===Boolean(t)?this.Ff=x(this.Ff,16):this.Ff=T(this.Ff,16)}}),Object.defineProperty(this,"pushButton",{enumerable:!0,configurable:!0,get:function(){return Boolean(b(this.Ff,17))},set:function(t){!0===Boolean(t)?this.Ff=x(this.Ff,17):this.Ff=T(this.Ff,17)}}),Object.defineProperty(this,"radioIsUnison",{enumerable:!0,configurable:!0,get:function(){return Boolean(b(this.Ff,26))},set:function(t){!0===Boolean(t)?this.Ff=x(this.Ff,26):this.Ff=T(this.Ff,26)}});var t={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){if(0!==Object.keys(t).length){var e=[];e.push("<<");var n;for(n in t)e.push("/"+n+" ("+t[n]+")");return e.push(">>"),e.join("\n")}},set:function(e){"object"==typeof e&&(t=e)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return t.CA||""},set:function(e){"string"==typeof e&&(t.CA=e)}});var e;Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return e},set:function(t){e=t}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return e.substr(1,e.length-1)},set:function(t){e="/"+t}})};f(U,D);var Q=function(){U.call(this),this.pushButton=!0};f(Q,U);var Y=function(){U.call(this),this.radio=!0,this.pushButton=!1;var t=[];Object.defineProperty(this,"Kids",{enumerable:!0,configurable:!1,get:function(){return t},set:function(e){t=void 0!==e?e:[]}})};f(Y,U);var K=function(){D.call(this);var t;Object.defineProperty(this,"Parent",{enumerable:!1,configurable:!1,get:function(){return t},set:function(e){t=e}});var e;Object.defineProperty(this,"optionName",{enumerable:!1,configurable:!0,get:function(){return e},set:function(t){e=t}});var n={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var t=[];t.push("<<");var e;for(e in n)t.push("/"+e+" ("+n[e]+")");return t.push(">>"),t.join("\n")},set:function(t){"object"==typeof t&&(n=t)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return n.CA||""},set:function(t){"string"==typeof t&&(n.CA=t)}});var i;Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return i},set:function(t){i=t}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return i.substr(1,i.length-1)},set:function(t){i="/"+t}}),this.caption="l",this.appearanceState="Off",this._AppearanceType=$.RadioButton.Circle,this.appearanceStreamContent=this._AppearanceType.createAppearanceStream(this.optionName)};f(K,D),Y.prototype.setAppearance=function(t){if(!("createAppearanceStream"in t&&"getCA"in t))throw new Error("Couldn't assign Appearance to RadioButton. Appearance was Invalid!");for(var e in this.Kids)if(this.Kids.hasOwnProperty(e)){var n=this.Kids[e];n.appearanceStreamContent=t.createAppearanceStream(n.optionName),n.caption=t.getCA()}},Y.prototype.createOption=function(t){var e=new K;return e.Parent=this,e.optionName=t,this.Kids.push(e),tt.call(this,e),e};var X=function(){U.call(this),this.fontName="zapfdingbats",this.caption="3",this.appearanceState="On",this.value="On",this.textAlign="center",this.appearanceStreamContent=$.CheckBox.createAppearanceStream()};f(X,U);var Z=function(){D.call(this),this.FT="/Tx",Object.defineProperty(this,"multiline",{enumerable:!0,configurable:!0,get:function(){return Boolean(b(this.Ff,13))},set:function(t){!0===Boolean(t)?this.Ff=x(this.Ff,13):this.Ff=T(this.Ff,13)}}),Object.defineProperty(this,"fileSelect",{enumerable:!0,configurable:!0,get:function(){return Boolean(b(this.Ff,21))},set:function(t){!0===Boolean(t)?this.Ff=x(this.Ff,21):this.Ff=T(this.Ff,21)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return Boolean(b(this.Ff,23))},set:function(t){!0===Boolean(t)?this.Ff=x(this.Ff,23):this.Ff=T(this.Ff,23)}}),Object.defineProperty(this,"doNotScroll",{enumerable:!0,configurable:!0,get:function(){return Boolean(b(this.Ff,24))},set:function(t){!0===Boolean(t)?this.Ff=x(this.Ff,24):this.Ff=T(this.Ff,24)}}),Object.defineProperty(this,"comb",{enumerable:!0,configurable:!0,get:function(){return Boolean(b(this.Ff,25))},set:function(t){!0===Boolean(t)?this.Ff=x(this.Ff,25):this.Ff=T(this.Ff,25)}}),Object.defineProperty(this,"richText",{enumerable:!0,configurable:!0,get:function(){return Boolean(b(this.Ff,26))},set:function(t){!0===Boolean(t)?this.Ff=x(this.Ff,26):this.Ff=T(this.Ff,26)}});var t=null;Object.defineProperty(this,"MaxLen",{enumerable:!0,configurable:!1,get:function(){return t},set:function(e){t=e}}),Object.defineProperty(this,"maxLength",{enumerable:!0,configurable:!0,get:function(){return t},set:function(e){Number.isInteger(e)&&(t=e)}}),Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return this.V||this.DV}})};f(Z,D);var J=function(){Z.call(this),Object.defineProperty(this,"password",{enumerable:!0,configurable:!0,get:function(){return Boolean(b(this.Ff,14))},set:function(t){!0===Boolean(t)?this.Ff=x(this.Ff,14):this.Ff=T(this.Ff,14)}}),this.password=!0};f(J,Z);var $={CheckBox:{createAppearanceStream:function(){return{N:{On:$.CheckBox.YesNormal},D:{On:$.CheckBox.YesPushDown,Off:$.CheckBox.OffPushDown}}},YesPushDown:function(t){var e=new g(t),n=[],i=o.internal.getFont(t.fontName,t.fontStyle).id,r=o.__private__.encodeColorString(t.color),a=w(t,t.caption);return n.push("0.749023 g"),n.push("0 0 "+u($.internal.getWidth(t))+" "+u($.internal.getHeight(t))+" re"),n.push("f"),n.push("BMC"),n.push("q"),n.push("0 0 1 rg"),n.push("/"+i+" "+u(a.fontSize)+" Tf "+r),n.push("BT"),n.push(a.text),n.push("ET"),n.push("Q"),n.push("EMC"),e.stream=n.join("\n"),e},YesNormal:function(t){var e=new g(t),n=o.internal.getFont(t.fontName,t.fontStyle).id,i=o.__private__.encodeColorString(t.color),r=[],a=$.internal.getHeight(t),s=$.internal.getWidth(t),c=w(t,t.caption);return r.push("1 g"),r.push("0 0 "+u(s)+" "+u(a)+" re"),r.push("f"),r.push("q"),r.push("0 0 1 rg"),r.push("0 0 "+u(s-1)+" "+u(a-1)+" re"),r.push("W"),r.push("n"),r.push("0 g"),r.push("BT"),r.push("/"+n+" "+u(c.fontSize)+" Tf "+i),r.push(c.text),r.push("ET"),r.push("Q"),e.stream=r.join("\n"),e},OffPushDown:function(t){var e=new g(t),n=[];return n.push("0.749023 g"),n.push("0 0 "+u($.internal.getWidth(t))+" "+u($.internal.getHeight(t))+" re"),n.push("f"),e.stream=n.join("\n"),e}},RadioButton:{Circle:{createAppearanceStream:function(t){var e={D:{Off:$.RadioButton.Circle.OffPushDown},N:{}};return e.N[t]=$.RadioButton.Circle.YesNormal,e.D[t]=$.RadioButton.Circle.YesPushDown,e},getCA:function(){return"l"},YesNormal:function(t){var e=new g(t),n=[],i=$.internal.getWidth(t)<=$.internal.getHeight(t)?$.internal.getWidth(t)/4:$.internal.getHeight(t)/4;i=Number((.9*i).toFixed(5));var r=$.internal.Bezier_C,o=Number((i*r).toFixed(5));return n.push("q"),n.push("1 0 0 1 "+h($.internal.getWidth(t)/2)+" "+h($.internal.getHeight(t)/2)+" cm"),n.push(i+" 0 m"),n.push(i+" "+o+" "+o+" "+i+" 0 "+i+" c"),n.push("-"+o+" "+i+" -"+i+" "+o+" -"+i+" 0 c"),n.push("-"+i+" -"+o+" -"+o+" -"+i+" 0 -"+i+" c"),n.push(o+" -"+i+" "+i+" -"+o+" "+i+" 0 c"),n.push("f"),n.push("Q"),e.stream=n.join("\n"),e},YesPushDown:function(t){var e=new g(t),n=[],i=$.internal.getWidth(t)<=$.internal.getHeight(t)?$.internal.getWidth(t)/4:$.internal.getHeight(t)/4,i=Number((.9*i).toFixed(5)),r=Number((2*i).toFixed(5)),o=Number((r*$.internal.Bezier_C).toFixed(5)),a=Number((i*$.internal.Bezier_C).toFixed(5));return n.push("0.749023 g"),n.push("q"),n.push("1 0 0 1 "+h($.internal.getWidth(t)/2)+" "+h($.internal.getHeight(t)/2)+" cm"),n.push(r+" 0 m"),n.push(r+" "+o+" "+o+" "+r+" 0 "+r+" c"),n.push("-"+o+" "+r+" -"+r+" "+o+" -"+r+" 0 c"),n.push("-"+r+" -"+o+" -"+o+" -"+r+" 0 -"+r+" c"),n.push(o+" -"+r+" "+r+" -"+o+" "+r+" 0 c"),n.push("f"),n.push("Q"),n.push("0 g"),n.push("q"),n.push("1 0 0 1 "+h($.internal.getWidth(t)/2)+" "+h($.internal.getHeight(t)/2)+" cm"),n.push(i+" 0 m"),n.push(i+" "+a+" "+a+" "+i+" 0 "+i+" c"),n.push("-"+a+" "+i+" -"+i+" "+a+" -"+i+" 0 c"),n.push("-"+i+" -"+a+" -"+a+" -"+i+" 0 -"+i+" c"),n.push(a+" -"+i+" "+i+" -"+a+" "+i+" 0 c"),n.push("f"),n.push("Q"),e.stream=n.join("\n"),e},OffPushDown:function(t){var e=new g(t),n=[],i=$.internal.getWidth(t)<=$.internal.getHeight(t)?$.internal.getWidth(t)/4:$.internal.getHeight(t)/4;i=Number((.9*i).toFixed(5));var r=Number((2*i).toFixed(5)),o=Number((r*$.internal.Bezier_C).toFixed(5));return n.push("0.749023 g"),n.push("q"),n.push("1 0 0 1 "+h($.internal.getWidth(t)/2)+" "+h($.internal.getHeight(t)/2)+" cm"),n.push(r+" 0 m"),n.push(r+" "+o+" "+o+" "+r+" 0 "+r+" c"),n.push("-"+o+" "+r+" -"+r+" "+o+" -"+r+" 0 c"),n.push("-"+r+" -"+o+" -"+o+" -"+r+" 0 -"+r+" c"),n.push(o+" -"+r+" "+r+" -"+o+" "+r+" 0 c"),n.push("f"),n.push("Q"),e.stream=n.join("\n"),e}},Cross:{createAppearanceStream:function(t){var e={D:{Off:$.RadioButton.Cross.OffPushDown},N:{}};return e.N[t]=$.RadioButton.Cross.YesNormal,e.D[t]=$.RadioButton.Cross.YesPushDown,e},getCA:function(){return"8"},YesNormal:function(t){var e=new g(t),n=[],i=$.internal.calculateCross(t);return n.push("q"),n.push("1 1 "+u($.internal.getWidth(t)-2)+" "+u($.internal.getHeight(t)-2)+" re"),n.push("W"),n.push("n"),n.push(u(i.x1.x)+" "+u(i.x1.y)+" m"),n.push(u(i.x2.x)+" "+u(i.x2.y)+" l"),n.push(u(i.x4.x)+" "+u(i.x4.y)+" m"),n.push(u(i.x3.x)+" "+u(i.x3.y)+" l"),n.push("s"),n.push("Q"),e.stream=n.join("\n"),e},YesPushDown:function(t){var e=new g(t),n=$.internal.calculateCross(t),i=[];return i.push("0.749023 g"),i.push("0 0 "+u($.internal.getWidth(t))+" "+u($.internal.getHeight(t))+" re"),i.push("f"),i.push("q"),i.push("1 1 "+u($.internal.getWidth(t)-2)+" "+u($.internal.getHeight(t)-2)+" re"),i.push("W"),i.push("n"),i.push(u(n.x1.x)+" "+u(n.x1.y)+" m"),i.push(u(n.x2.x)+" "+u(n.x2.y)+" l"),i.push(u(n.x4.x)+" "+u(n.x4.y)+" m"),i.push(u(n.x3.x)+" "+u(n.x3.y)+" l"),i.push("s"),i.push("Q"),e.stream=i.join("\n"),e},OffPushDown:function(t){var e=new g(t),n=[];return n.push("0.749023 g"),n.push("0 0 "+u($.internal.getWidth(t))+" "+u($.internal.getHeight(t))+" re"),n.push("f"),e.stream=n.join("\n"),e}}},createDefaultAppearanceStream:function(t){var e=o.internal.getFont(t.fontName,t.fontStyle).id,n=o.__private__.encodeColorString(t.color);return"/"+e+" "+t.fontSize+" Tf "+n}};$.internal={Bezier_C:.551915024494,calculateCross:function(t){var e=$.internal.getWidth(t),n=$.internal.getHeight(t),i=Math.min(e,n);return{x1:{x:(e-i)/2,y:(n-i)/2+i},x2:{x:(e-i)/2+i,y:(n-i)/2},x3:{x:(e-i)/2,y:(n-i)/2},x4:{x:(e-i)/2+i,y:(n-i)/2+i}}}},$.internal.getWidth=function(t){var e=0;return"object"==typeof t&&(e=d(t.Rect[2])),e},$.internal.getHeight=function(t){var e=0;return"object"==typeof t&&(e=d(t.Rect[3])),e};var tt=a.addField=function(t){if(N.call(this),!(t instanceof D))throw new Error("Invalid argument passed to jsPDF.addField.");return C.call(this,t),t.page=o.internal.getCurrentPageInfo().pageNumber,this};a.addButton=function(t){if(t instanceof U==!1)throw new Error("Invalid argument passed to jsPDF.addButton.");return tt.call(this,t)},a.addTextField=function(t){if(t instanceof Z==!1)throw new Error("Invalid argument passed to jsPDF.addTextField.");return tt.call(this,t)},a.addChoiceField=function(t){if(t instanceof j==!1)throw new Error("Invalid argument passed to jsPDF.addChoiceField.");return tt.call(this,t)},"object"==typeof e&&void 0===e.ChoiceField&&void 0===e.ListBox&&void 0===e.ComboBox&&void 0===e.EditBox&&void 0===e.Button&&void 0===e.PushButton&&void 0===e.RadioButton&&void 0===e.CheckBox&&void 0===e.TextField&&void 0===e.PasswordField&&(e.ChoiceField=j,e.ListBox=z,e.ComboBox=G,e.EditBox=V,e.Button=U,e.PushButton=Q,e.RadioButton=Y,e.CheckBox=X,e.TextField=Z,e.PasswordField=J,e.AcroForm={Appearance:$}),a.AcroFormChoiceField=j,a.AcroFormListBox=z,a.AcroFormComboBox=G,a.AcroFormEditBox=V,a.AcroFormButton=U,a.AcroFormPushButton=Q,a.AcroFormRadioButton=Y,a.AcroFormCheckBox=X,a.AcroFormTextField=Z,a.AcroFormPasswordField=J,a.AcroFormAppearance=$,a.AcroForm={ChoiceField:j,ListBox:z,ComboBox:G,EditBox:V,Button:U,PushButton:Q,RadioButton:Y,CheckBox:X,TextField:Z,PasswordField:J,Appearance:$},t.AcroForm={ChoiceField:j,ListBox:z,ComboBox:G,EditBox:V,Button:U,PushButton:Q,RadioButton:Y,CheckBox:X,TextField:Z,PasswordField:J,Appearance:$}}(e.jsPDF,"undefined"!=typeof window&&window||void 0!==t&&t)}).call(e,n(59))},function(t,e,n){/**
14
14
  * jsPDF fromHTML plugin. BETA stage. API subject to change. Needs browser
15
15
  * Copyright (c) 2012 Willow Systems Corporation, willow-systems.com
16
16
  * 2014 Juan Pablo Gaviria, https://github.com/juanpgaviria