PageSourceSearch

https://paperfree.com/Scripts/en/mod/htmlpage_edit.js?v=3592

js paperfree.com collected 2026-10-08 07:26:44 UTC 108,437 bytes, 10 lines download raw bytes

1function makeTranslit(t){if(!t)return"";var e={"А":"A","а":"a","Б":"B","б":"b","В":"V","в":"v","Г":"G","г":"g","Д":"D","д":"d","Е":"E","е":"e","Ё":"Yo","ё":"yo","Ж":"Zh","ж":"zh","З":"Z","з":"z","И":"I","и":"i","Й":"Y","й":"y","К":"K","к":"k","Л":"L","л":"l","М":"M","м":"m","Н":"N","н":"n","О":"O","о":"o","П":"P","п":"p","Р":"R","р":"r","С":"S","с":"s","Т":"T","т":"t","У":"U","у":"u","Ф":"F","ф":"f","Х":"Kh","х":"kh","Ц":"Ts","ц":"ts","Ч":"Ch","ч":"ch","Ш":"Sh","ш":"sh","Щ":"Sch","щ":"sch","Ъ":'"',"ъ":'"',"Ы":"Y","ы":"y","Ь":"'","ь":"'","Э":"E","э":"e","Ю":"Yu","ю":"yu","Я":"Ya","я":"ya",0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9"," ":"-"},n="",i=/[a-zA-Z]/;t=t.replace(/\s+/g," ").replace(/[^\d\w]$/g,"");for(var o=0;o<t.length;o++)t[o]in e?n+=e[t[o]]:i.test(t[o])&&(n+=t[o]);return n}function createSliderMenuItem(t){return{id:"insertSlider",text:"Image Slideshow",context:"insert",image:"/img/logo-small.png",menu:[{text:"Insert slider template/Add new slide",onAction:function(){var e=t.contentDocument;if(t.selection){var n=t.selection.getNode(),i=n.closest(".swiper-wrapper");if(i){var o=(n.classList.contains("swiper-slide")?n:n.closest(".swiper-slide"))||i.querySelector(".swiper-slide"),r=e.createElement("div");return r.className="swiper-slide",r.innerHTML='<img src="https://st.paperfree.com/img/s/hawaii.jpg" border="0" alt="Hawaii" /><strong>This is Hawaii </strong>',o.parentNode.insertBefore(r,o.nextSibling),void PF.initTinySlider(e)}}t.insertContent('<div class="swiper">\n<div class="swiper-wrapper">\n<div class="swiper-slide sel"><img src="https://st.paperfree.com/img/s/hawaii.jpg" border="0" alt="Hawaii" /><strong>This is Hawaii </strong></div>\n<div class="swiper-slide"><img src="https://st.paperfree.com/img/s/caribbean.jpg" border="0" alt="Caribbean" /><strong>Luxury Caribbean holidays</strong></div>\n<div class="swiper-slide"><img src="https://st.paperfree.com/img/s/nature.jpg" border="0" alt="Nature" /><strong>Nature photo</strong></div>\n</div>\n<div class="swiper-pagination"></div>\n<div class="swiper-button-prev"></div>\n<div class="swiper-button-next"></div>\n</div><br/>'),PF.initTinySlider(e)}},{text:"Remove slider (with all slides)",onAction:function(){var e=t.contentDocument;if(!t.selection)return alert("Please select a slider to remove.");if(confirm("Are you sure to remove slider with all images?")){var n=t.selection.getNode().closest(".swiper");if(!n)return alert("Please select a slider to remove.");n.parentNode.removeChild(n),PF.initTinySlider(e)}}},{text:"Remove current slide",onAction:function(){var e=t.contentDocument;if(!t.selection)return alert("Please select a slide to remove.");var n=t.selection.getNode(),i=n.closest(".swiper");if(!i)return alert("Please select a slide to remove.");var o=(n.classList.contains("swiper-slide")?n:n.closest(".swiper-slide"))||i.querySelector(".swiper-slide");if(!o)return alert("Please select a slide to remove.");o.parentNode.removeChild(o),PF.initTinySlider(e)}}]}}PF.translatePage=function(){window.setTimeout((function t(){var e=tinyMCE.get("htmlEditorCtl");e.dom.win?PF.translateDiv("tinymce",e.contentWindow,PF.helpCfg.language):window.setTimeout(t,50)}),50)},PF.editHtmlPage=function(t){var e=PF.helpCfg;if(!e.HtmlPageId)return alert("You must save page before edit SEO.");window.top.scrollTo(0,0),t?PF.editItem2(e.HtmlPageId,"HtmlPage",{urlParams:"seo="+t,title:"Advanced edit: Page #"+e.HtmlPageId,postFnc:function(t){}}):PF.editItem(e.HtmlPageId,"HtmlPage",null,{ajCfg:{helpTypeId:PF.helpTypeId},postFnc:function(t){PF.releaseUnload();-1===window.location.pathname.toUpperCase().indexOf("HTMLPAGE/EDITTEMPLATE")&&PF.helpCfg.HtmlPageName!==t.Href?PF.navigateTo(t.Href):window.location=window.location}})},PF.onHtmlPageLoaded=function(t){PF.menuC||PF.initCtxMenu()},PF.removeGoogleTranslate=function(){var t=tinyMCE.get("htmlEditorCtl").contentWindow.document.getElementById("goog-gt-tt");t&&Ext.get(t).destroy()},PF.changeLang=function(t){if("en"!==window.location.pathname.substring(1).toLowerCase().split("/")[0]){var e=document.createElement("iframe");e.src=PF.url("//User/ChangeLang/?lang="+t),e.style.display="none",document.body.appendChild(e)}else window.location=PF.siteRoot+t+window.location.pathname.substring(3)},PF.updateCurrLang=function(t){t=t||"en";for(var e=document.getElementsByClassName("imglang"),n=0,i=e.length;n<i;n++){var o=e[n];o.className=o.className.replace(" sel","")+(o.id==="imgLang_"+t?" sel":"")}},PF.showHtmlPageHistory=function(t){PF.wnd({url:"/HtmlPage/PageHistory/"+t+"?lang=en",title:"Page history #  "+t,help:"wnd_PageHistory"})},PF.blockUnload=function(){window.top.onbeforeunload=function(t){return t.message="You have unsaved changes in document"}},PF.releaseUnload=function(){window.top.onbeforeunload&&window.top.removeEventListener("beforeunload",window.top.onbeforeunload),window.top.onbeforeunload=null,window.top.onbeforeunload=void 0},PF.showThemes=function(t){const e=t||PF.helpCfg,n=document;let i=n.querySelector(".pf-themes");function o(){for(let t of n.querySelectorAll(".pf-theme-lnk.sel"))t.classList.remove("sel")}function r(){o();const t=n.querySelectorAll(".pf-theme-lnk");let r=t.length;for(;r--;)t[r].addEventListener("click",(function(){o(),this.classList.add("sel"),e.templateId=this.getAttribute("data-itemid")}));PF.autoResizeDivs();const a=n.querySelector('.pf-theme-lnk[data-itemid="'+e.templateId+'"]');a&&(a.classList.add("sel"),a.scrollIntoView()),i.querySelector(".saveBtn").onclick=function(){const t=e.HtmlPageId||e.id;PF.ajax("//HtmlPage/AddUpdate/"+t,(function(){PF.showInfoMsg("Saving successfully completed.")}),{cfg:{changes:["Id="+t,"TemplateId="+e.templateId]}}),i.classList.remove("shown")}}i?r():(i=n.createElement("div"),i.className="pf-themes",n.body.appendChild(i),PF.themesDiv=Ext.widget({xtype:"ingrid",url:"/HtmlPage/Themes",isHtml:!0,renderTo:i,onLoadD
1one:r})),i.classList.add("shown"),PF.autoResizeDivs()},PF.editHtmlPageTemplate=function(t){t=t||PF.helpCfg.templateId,window.open(PF.url("//HtmlPage/EditTemplate/en/"+t),"pftheme_"+t)},PF.switchTheme=function(t){PF.showThemes(PF.findPageById(t))},PF.backToPf=function(){var t=window.top.opener;t&&t.PF?(t.top.location.hash="p/HtmlPage/List",t.top.focus(),window.close()):window.top.location=PF.siteRoot+"#p/HtmlPage/List"},function(t,e,n,i,o,r){if(
2/*!
3 * @overview es6-promise - a tiny implementation of Promises/A+.
4 * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
5 * @license   Licensed under MIT license
6 *            See https://raw.githubusercontent.com/jakearchibald/es6-promise/master/LICENSE
7 * @version   2.0.1
8 */
9function(){function n(t,e){T[C]=t,T[C+1]=e,2===(C+=2)&&v()}function r(t){return"function"==typeof t}function a(){for(var t=0;t<C;t+=2)(0,T[t])(T[t+1]),T[t]=void 0,T[t+1]=void 0;C=0}function s(){}function l(t,e){if(t===e)u(t,new TypeError("You cannot resolve a promise with itself"));else if("function"==typeof e||"object"==typeof e&&null!==e)if(e.constructor===t.constructor)!function(t,e){1===e.a?d(t,e.b):2===t.a?u(t,e.b):h(e,void 0,(function(e){l(t,e)}),(function(e){u(t,e)}))}(t,e);else{var i;try{i=e.then}catch(t){I.error=t,i=I}i===I?u(t,I.error):void 0===i?d(t,e):r(i)?function(t,e,i){n((function(t){var n=!1,o=function(t,e,n,i){try{t.call(e,n,i)}catch(t){return t}}(i,e,(function(i){n||(n=!0,e!==i?l(t,i):d(t,i))}),(function(e){n||(n=!0,u(t,e))}));!n&&o&&(n=!0,u(t,o))}),t)}(t,e,i):d(t,e)}else d(t,e)}function c(t){t.f&&t.f(t.b),p(t)}function d(t,e){void 0===t.a&&(t.b=e,t.a=1,0!==t.e.length&&n(p,t))}function u(t,e){void 0===t.a&&(t.a=2,t.b=e,n(c,t))}function h(t,e,i,o){var r=t.e,a=r.length;t.f=null,r[a]=e,r[a+1]=i,r[a+2]=o,0===a&&t.a&&n(p,t)}function p(t){var e=t.e,n=t.a;if(0!==e.length){for(var i,o,r=t.b,a=0;a<e.length;a+=3)i=e[a],o=e[a+n],i?m(n,i,o,r):o(r);t.e.length=0}}function f(){this.error=null}function m(t,e,n,i){var o,a,s,c,h=r(n);if(h){try{o=n(i)}catch(t){S.error=t,o=S}if(o===S?(c=!0,a=o.error,o=null):s=!0,e===o)return void u(e,new TypeError("A promises callback cannot return that same promise."))}else o=i,s=!0;void 0===e.a&&(h&&s?l(e,o):c?u(e,a):1===t?d(e,o):2===t&&u(e,o))}function g(t,e,n,i){this.n=t,this.c=new t(s,i),this.i=n,this.o(e)?(this.m=e,this.d=this.length=e.length,this.l(),0===this.length?d(this.c,this.b):(this.length=this.length||0,this.k(),0===this.d&&d(this.c,this.b))):u(this.c,this.p())}function y(t){if(this.b=this.a=void 0,this.e=[],s!==t){if(!r(t))throw new TypeError("You must pass a resolver function as the first argument to the promise constructor");if(!(this instanceof y))throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object c
9onstructor cannot be called as a function.");!function(t,e){try{e((function(e){l(t,e)}),(function(e){u(t,e)}))}catch(e){u(t,e)}}(this,t)}}var v,w,b,P,x=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},C=0,E=(F=void 0!==t?t:{}).MutationObserver||F.WebKitMutationObserver,F="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,T=Array(1e3);v="undefined"!=typeof process&&"[object process]"==={}.toString.call(process)?function(){process.nextTick(a)}:E?(w=0,b=new E(a),P=e.createTextNode(""),b.observe(P,{characterData:!0}),function(){P.data=w=++w%2}):F?function(){var t=new MessageChannel;return t.port1.onmessage=a,function(){t.port2.postMessage(0)}}():function(){setTimeout(a,1)};var I=new f,S=new f;g.prototype.o=function(t){return x(t)},g.prototype.p=function(){return Error("Array Methods must be provided an Array")},g.prototype.l=function(){this.b=Array(this.length)},g.prototype.k=function(){for(var t=this.length,e=this.c,n=this.m,i=0;void 0===e.a&&i<t;i++)this.j(n[i],i)},g.prototype.j=function(t,e){var n=this.n;"object"==typeof t&&null!==t?t.constructor===n&&void 0!==t.a?(t.f=null,this.g(t.a,e,t.b)):this.q(n.resolve(t),e):(this.d--,this.b[e]=this.h(t))},g.prototype.g=function(t,e,n){var i=this.c;void 0===i.a&&(this.d--,this.i&&2===t?u(i,n):this.b[e]=this.h(n)),0===this.d&&d(i,this.b)},g.prototype.h=function(t){return t},g.prototype.q=function(t,e){var n=this;h(t,void 0,(function(t){n.g(1,e,t)}),(function(t){n.g(2,e,t)}))};y.all=function(t,e){return new g(this,t,!0,e).c},y.race=function(t,e){function n(t){l(o,t)}function i(t){u(o,t)}var o=new this(s,e);if(!x(t))return u(o,new TypeError("You must pass an array to race.")),o;for(var r=t.length,a=0;void 0===o.a&&a<r;a++)h(this.resolve(t[a]),void 0,n,i);return o},y.resolve=function(t,e){if(t&&"object"==typeof t&&t.constructor===this)return t;var n=new this(s,e);return l(n,t),n},y.reject=function(t,e){var n=new this(s,e);return u(n,t),n},y.prototype={constructor:y,then:function(t,e){var i=this.a;if(1===i&&!t||2===i&&!e)return this;var o=new this.constructor(s),r=this.b;if(i){var a=arguments[i-1];n((function(){m(i,o,a,r)}))}else h(this,o,t,e);return o},catch:function(t){return this.then(null,t)}};var k={Promise:y,polyfill:function(){var e;"Promise"in(e=void 0!==i?i:void 0!==t&&t.document?t:self)&&"resolve"in e.Promise&&"reject"in e.Promise&&"all"in e.Promise&&"race"in e.Promise&&function(){var t;return new e.Promise((function(e){t=e})),r(t)}()||(e.Promise=y)}};"function"==typeof o&&o.amd?o((function(){return k})):"undefined"!=typeof module&&module.exports?module.exports=k:void 0!==this&&(this.ES6Promise=k)}.call(t),t&&t.ES6Promise.polyfill(),void 0!==e&&"function"==typeof Object.create&&"function"==typeof e.createElement("canvas").getContext){!function(t){var e="object"==typeof n&&n&&!n.nodeType&&n,r="object"==typeof module&&module&&!module.nodeType&&module,a="object"==typeof i&&i;a.global!==a&&a.window!==a&&a.self!==a||(t=a);var s,l,c=2147483647,d=36,u=1,h=26,p=38,f=700,m=72,g=128,y="-",v=/^xn--/,w=/[^\x20-\x7E]/,b=/[\x2E\u3002\uFF0E\uFF61]/g,P={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},x=d-u,C=Math.floor,E=String.fromCharCode;function F(t){throw RangeError(P[t])}function T(t,e){for(var n=t.length,i=[];n--;)i[n]=e(t[n]);return i}function I(t,e){var n=t.split("@"),i="";return n.length>1&&(i=n[0]+"@",t=n[1]),i+T(t.split(b),e).join(".")}function S(t){for(var e,n,i=[],o=0,r=t.length;o<r;)(e=t.charCodeAt(o++))>=55296&&e<=56319&&o<r?56320==(64512&(n=t.charCodeAt(o++)))?i.push(((1023&e)<<10)+(1023&n)+65536):(i.push(e),o--):i.push(e);return i}function k(t){return T(t,(function(t){var e="";return t>65535&&(e+=E((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+=E(t)})).join("")}function A(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function L(t,e,n){var i=0;for(t=n?C(t/f):t>>1,t+=C(t/e);t>x*h>>1;i+=d)t=C(t/x);return C(i+(x+1)*t/(t+p))}function M(t){var e,n,i,o,r,a,s,l,p,f,v,w=[],b=t.length,P=0,x=g,E=m;for((n=t.lastIndexOf(y))<0&&(n=0),i=0;i<n;++i)t.charCodeAt(i)>=128&&F("not-basic"),w.push(t.charCodeAt(i));for(o=n>0?n+1:0;o<b;){for(r=P,a=1,s=d;o>=b&&F("invalid-input"),((l=(v=t.charCodeAt(o++))-48<10?v-22:v-65<26?v-65:v-97<26?v-97:d)>=d||l>C((c-P)/a))&&F("overflow"),P+=l*a,!(l<(p=s<=E?u:s>=E+h?h:s-E));s+=d)a>C(c/(f=d-p))&&F("overflow"),a*=f;E=L(P-r,e=w.length+1,0==r),C(P/e)>c-x&&F("overflow"),x+=C(P/e),P%=e,w.splice(P++,0,x)}return k(w)}function N(t){var e,n,i,o,r,a,s,l,p,f,v,w,b,P,x,T=[];for(w=(t=S(t)).length,e=g,n=0,r=m,a=0;a<w;++a)(v=t[a])<128&&T.push(E(v));for(i=o=T.length,o&&T.push(y);i<w;){for(s=c,a=0;a<w;++a)(v=t[a])>=e&&v<s&&(s=v);for(s-e>C((c-n)/(b=i+1))&&F("overflow"),n+=(s-e)*b,e=s,a=0;a<w;++a)if((v=t[a])<e&&++n>c&&F("overflow"),v==e){for(l=n,p=d;!(l<(f=p<=r?u:p>=r+h?h:p-r));p+=d)x=l-f,P=d-f,T.push(E(A(f+x%P,0))),l=C(x/P);T.push(E(A(l,0))),r=L(n,b,i==o),n=0,++i}++n,++e}return T.join("")}if(s={version:"1.3.1",ucs2:{decode:S,encode:k},decode:M,encode:N,toASCII:function(t){return I(t,(function(t){return w.test(t)?"xn--"+N(t):t}))},toUnicode:function(t){return I(t,(function(t){return v.test(t)?M(t.slice(4).toLowerCase()):t}))}},"function"==typeof o&&"object"==typeof o.amd&&o.amd)o("punycode",(function(){return s}));else if(e&&r)if(module.exports==e)r.exports=s;else for(l in s)s.hasOwnProperty(l)&&(e[l]=s[l]);else t.punycode=s}(this);var a="data-html2canvas-node",s="data-html2canvas-canvas-clone",l=0,c=0;t.html2canvas=function(n,i){var o,s,l=c++;if((i=i||{}).logging&&(t.html2canvas.logging=!0,t.html2canvas.start=Date.now()),i.async=void 0===i.async||i.async,i.allowTaint=void 0!==i.allowTaint&&i.allowTaint,i.removeContainer=void 0===i.removeContainer||i.removeContainer,i.javascriptEnabled=void 0!==i.javascriptEnabled&&i.javascriptEnabled,i.imageTimeout=void 0===i.imageTimeout?1e4:i.imageTimeout,i.renderer="function"==typeof i.renderer?i.renderer:Bt,i.str
9ict=!!i.strict,"string"==typeof n){if("string"!=typeof i.proxy)return Promise.reject("Proxy must be used when rendering url");var d=null!=i.width?i.width:t.innerWidth,u=null!=i.height?i.height:t.innerHeight;return E((o=n,s=e.createElement("a"),s.href=o,s.href=s.href,s),i.proxy,e,d,u,i).then((function(t){return w(t.contentWindow.document.documentElement,t,i,d,u)}))}var h=(n===r?[e.documentElement]:n.length?n:[n])[0];return h.setAttribute(a+l,l),function(t,e,n,i,o){return x(t,t,n,i,e,t.defaultView.pageXOffset,t.defaultView.pageYOffset).then((function(r){H("Document cloned");var s=a+o,l="["+s+"='"+o+"']";t.querySelector(l).removeAttribute(s);var c=r.contentWindow,d=c.document.querySelector(l);return("function"==typeof e.onclone?Promise.resolve(e.onclone(c.document)):Promise.resolve(!0)).then((function(){return w(d,r,e,n,i)}))}))}(h.ownerDocument,i,h.ownerDocument.defaultView.innerWidth,h.ownerDocument.defaultView.innerHeight,l).then((function(t){return"function"==typeof i.onrendered&&(H("options.onrendered is deprecated, html2canvas returns a Promise containing the canvas"),i.onrendered(t)),t}))},t.html2canvas.punycode=this.punycode,t.html2canvas.proxy={},S.prototype.darken=function(t){var e=1-t;return new S([Math.round(this.r*e),Math.round(this.g*e),Math.round(this.b*e),this.a])},S.prototype.isTransparent=function(){return 0===this.a},S.prototype.isBlack=function(){return 0===this.r&&0===this.g&&0===this.b},S.prototype.fromArray=function(t){return Array.isArray(t)&&(this.r=Math.min(t[0],255),this.g=Math.min(t[1],255),this.b=Math.min(t[2],255),t.length>3&&(this.a=t[3])),Array.isArray(t)};var d=/^#([a-f0-9]{3})$/i;S.prototype.hex3=function(t){var e;return null!==(e=t.match(d))&&(this.r=parseInt(e[1][0]+e[1][0],16),this.g=parseInt(e[1][1]+e[1][1],16),this.b=parseInt(e[1][2]+e[1][2],16)),null!==e};var u=/^#([a-f0-9]{6})$/i;S.prototype.hex6=function(t){var e=null;return null!==(e=t.match(u))&&(this.r=parseInt(e[1].substring(0,2),16),this.g=parseInt(e[1].substring(2,4),16),this.b=parseInt(e[1].substring(4,6),16)),null!==e};var h=/^rgb\((\d{1,3}) *, *(\d{1,3}) *, *(\d{1,3})\)$/;S.prototype.rgb=function(t){var e;return null!==(e=t.match(h))&&(this.r=Number(e[1]),this.g=Number(e[2]),this.b=Number(e[3])),null!==e};var p=/^rgba\((\d{1,3}) *, *(\d{1,3}) *, *(\d{1,3}) *, *(\d+\.?\d*)\)$/;S.prototype.rgba=function(t){var e;return null!==(e=t.match(p))&&(this.r=Number(e[1]),this.g=Number(e[2]),this.b=Number(e[3]),this.a=Number(e[4])),null!==e},S.prototype.toString=function(){return null!==this.a&&1!==this.a?"rgba("+[this.r,this.g,this.b,this.a].join(",")+")":"rgb("+[this.r,this.g,this.b].join(",")+")"},S.prototype.namedColor=function(t){var e=f[t.toLowerCase()];if(e)this.r=e[0],this.g=e[1],this.b=e[2];else if("transparent"===t.toLowerCase())return this.r=this.g=this.b=this.a=0,!0;return!!e},S.prototype.isColor=!0;var f={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],ol
9ive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};L.prototype.getMetrics=function(t,e){return this.data[t+"-"+e]===r&&(this.data[t+"-"+e]=new A(t,e)),this.data[t+"-"+e]},M.prototype.proxyLoad=function(t,e,n){var i=this.src;return E(i.src,t,i.ownerDocument,e.width,e.height,n)},N.prototype.TYPES={LINEAR:1,RADIAL:2},O.prototype.findImages=function(t){var e=[];return t.reduce((function(t,e){switch(e.node.nodeName){case"IMG":return t.concat([{args:[e.node.src],method:"url"}]);case"svg":case"IFRAME":return t.concat([{args:[e.node],method:e.node.nodeName}])}return t}),[]).forEach(this.addImage(e,this.loadImage),this),e},O.prototype.findBackgroundImage=function(t,e){return e.parseBackgroundImages().filter(this.hasImageBackground).forEach(this.addImage(t,this.loadImage),this),t},O.prototype.addImage=function(t,e){return function(n){n.args.forEach((function(i){this.imageExists(t,i)||(t.splice(0,0,e.call(this,n)),H("Added image #"+t.length,"string"==typeof i?i.substring(0,100):i))}),this)}},O.prototype.hasImageBackground=function(t){return"none"!==t.method},O.prototype.loadImage=function(t){if("url"===t.method){var e=t.args[0];return!this.isSVG(e)||this.support.svg||this.options.allowTaint?e.match(/data:image\/.*;base64,/i)?new R(e.replace(/url\(['"]{0,}|['"]{0,}\)$/gi,""),!1):this.isSameOrigin(e)||!0===this.options.allowTaint||this.isSVG(e)?new R(e,!1):this.support.cors&&!this.options.allowTaint&&this.options.useCORS?new R(e,!0):this.options.proxy?new Et(e,this.options.proxy):new k(e):new kt(e)}return"linear-gradient"===t.method?new B(t):"gradient"===t.method?new Rt(t):"svg"===t.method?new Lt(t.args[0],this.support.svg):"IFRAME"===t.method?new M(t.args[0],this.isSameOrigin(t.args[0].src),this.options):new k(t)},O.prototype.isSVG=function(t){return"svg"===t.substring(t.length-3).toLowerCase()||kt.prototype.isInline(t)},O.prototype.imageExists=function(t,e){return t.some((function(t){return t.src===e}))},O.prototype.isSameOrigin=function(t){return this.getOrigin(t)===this.origin},O.prototype.getOrigin=function(t){var n=this.link||(this.link=e.createElement("a"));return n.href=t,n.href=n.href,n.protocol+n.hostname+n.port},O.prototype.getPromise=function(t){return this.timeout(t,this.options.imageTimeout).catch((function(){return new k(t.src).promise.then((function(e){t.image=e}))}))},O.prototype.get=function(t){var e=null;return this.images.some((function(n){return(e=n).src===t}))?e:null},O.prototype.fetch=function(t){return this.images=t.reduce(pt(this.findBackgroundImage,this),this.findImages(t)),this.images.forEach((function(t,e){t.promise.then((function(){H("Succesfully loaded image #"+(e+1),t)}),(function(n){H("Failed loading image #"+(e+1),t,n)}))})),this.ready=Promise.all(this.images.map(this.getPromise,this)),H("Finished searching images"),this},O.prototype.timeout=function(t,e){var n,i=Promise.race([t.promise,new Promise((function(i,o){n=setTimeout((function(){H("Timed out loading image",t),o(t)}),e)}))]).then((function(t){return clearTimeout(n),t}));return i.catch((function(){clearTimeout(n)})),i},B.prototype=Object.create(N.prototype),B.prototype.stepRegExp=/((?:rgb|rgba)\(\d{1,3},\s\d{1,3},\s\d{1,3}(?:,\s[0-9\.]+)?\))\s*(\d{1,3})?(%|px)?/,D.prototype.cloneTo=function(t){t.visible=this.visible,t.borders=this.borders,t.bounds=this.bounds,t.clip=this.clip,t.backgroundClip=this.backgroundClip,t.computedStyles=this.computedStyles,t.styles=this.styles,t.backgroundImages=this.backgroundImages,t.opacity=this.opacity},D.prototype.getOpacity=function(){return null===this.opacity?this.opacity=this.cssFloat
9("opacity"):this.opacity},D.prototype.assignStack=function(t){this.stack=t,t.children.push(this)},D.prototype.isElementVisible=function(){return this.node.nodeType===Node.TEXT_NODE?this.parent.visible:"none"!==this.css("display")&&"hidden"!==this.css("visibility")&&!this.node.hasAttribute("data-html2canvas-ignore")&&("INPUT"!==this.node.nodeName||"hidden"!==this.node.getAttribute("type"))},D.prototype.css=function(t){return this.computedStyles||(this.computedStyles=this.isPseudoElement?this.parent.computedStyle(this.before?":before":":after"):this.computedStyle(null)),this.styles[t]||(this.styles[t]=this.computedStyles[t])},D.prototype.prefixedCss=function(t){var e=this.css(t);return e===r&&["webkit","moz","ms","o"].some((function(n){return(e=this.css(n+t.substr(0,1).toUpperCase()+t.substr(1)))!==r}),this),e===r?null:e},D.prototype.computedStyle=function(t){return this.node.ownerDocument.defaultView.getComputedStyle(this.node,t)},D.prototype.cssInt=function(t){var e=parseInt(this.css(t),10);return isNaN(e)?0:e},D.prototype.color=function(t){return this.colors[t]||(this.colors[t]=new S(this.css(t)))},D.prototype.cssFloat=function(t){var e=parseFloat(this.css(t));return isNaN(e)?0:e},D.prototype.fontWeight=function(){var t=this.css("fontWeight");switch(parseInt(t,10)){case 401:t="bold";break;case 400:t="normal"}return t},D.prototype.parseClip=function(){var t=this.css("clip").match(this.CLIP);return t?{top:parseInt(t[1],10),right:parseInt(t[2],10),bottom:parseInt(t[3],10),left:parseInt(t[4],10)}:null},D.prototype.parseBackgroundImages=function(){return this.backgroundImages||(this.backgroundImages=_(this.css("backgroundImage")))},D.prototype.cssList=function(t,e){var n=(this.css(t)||"").split(",");return 1===(n=(n=n[e||0]||n[0]||"auto").trim().split(" ")).length&&(n=[n[0],n[0]]),n},D.prototype.parseBackgroundSize=function(t,e,n){var i,o,r=this.cssList("backgroundSize",n);if(j(r[0]))i=t.width*parseFloat(r[0])/100;else{if(/contain|cover/.test(r[0])){var a=t.width/t.height,s=e.width/e.height;return a<s^"contain"===r[0]?{width:t.height*s,height:t.height}:{width:t.width,height:t.width/s}}i=parseInt(r[0],10)}return o="auto"===r[0]&&"auto"===r[1]?e.height:"auto"===r[1]?i/e.width*e.height:j(r[1])?t.height*parseFloat(r[1])/100:parseInt(r[1],10),"auto"===r[0]&&(i=o/e.height*e.width),{width:i,height:o}},D.prototype.parseBackgroundPosition=function(t,e,n,i){var o,r,a=this.cssList("backgroundPosition",n);return o=j(a[0])?(t.width-(i||e).width)*(parseFloat(a[0])/100):parseInt(a[0],10),r="auto"===a[1]?o/e.width*e.height:j(a[1])?(t.height-(i||e).height)*parseFloat(a[1])/100:parseInt(a[1],10),"auto"===a[0]&&(o=r/e.height*e.width),{left:o,top:r}},D.prototype.parseBackgroundRepeat=function(t){return this.cssList("backgroundRepeat",t)[0]},D.prototype.parseTextShadows=function(){var t=this.css("textShadow"),e=[];if(t&&"none"!==t)for(var n=t.match(this.TEXT_SHADOW_PROPERTY),i=0;n&&i<n.length;i++){var o=n[i].match(this.TEXT_SHADOW_VALUES);e.push({color:new S(o[0]),offsetX:o[1]?parseFloat(o[1].replace("px","")):0,offsetY:o[2]?parseFloat(o[2].replace("px","")):0,blur:o[3]?o[3].replace("px",""):0})}return e},D.prototype.parseTransform=function(){if(!this.transformData)if(this.hasTransform()){var t=this.parseBounds(),e=this.prefixedCss("transformOrigin").split(" ").map(U).map(q);e[0]+=t.left,e[1]+=t.top,this.transformData={origin:e,matrix:this.parseTransformMatrix()}}else this.transformData={origin:[0,0],matrix:[1,0,0,1,0,0]};return this.transformData},D.prototype.parseTransformMatrix=function(){if(!this.transformMatrix){var t=this.prefixedCss("transform"),e=t?function(t){if(t&&"matrix"===t[1])return t[2].split(",").map((function(t){return parseFloat(t.trim())}))}(t.match(this.MATRIX_PROPERTY)):null;this.transformMatrix=e||[1,0,0,1,0,0]}return this.transformMatrix},D.prototype.parseBounds=function(){return this.bounds||(this.bounds=this.hasTransform()?V(this.node):W(this.node))},D.prototype.hasTransform=function(){return"1,0,0,1,0,0"!==this.parseTransformMatrix().join(",")||this.parent&&this.parent.hasTransform()},D.prototype.getValue=function(){var t,e,n=this.node.value||"";return"SELECT"===this.node.tagName?(t=this.node,n=(e=t.options[t.selectedIndex||0])&&e.text||""):"password"===this.node.type&&(n=Array(n.length+1).join("•")),0===n.length?this.node.placeholder||"":n},D.prototype.MATRIX_PROPERTY=/(matrix)\((.+)\)/,D.prototype.TEXT_SHADOW_PROPERTY=/((rgba|rgb)\([^\)]+\)(\s-?\d+px){0,})/g,D.prototype.TEXT_SHADOW_VALUES=/(-?\d+px)|(#.+)|(rgb\(.+\))|(rgba\(.+\))/g,D.prototype.CLIP=/^rect\((\d+)px,? (\d+)px,? (\d+)px,? (\d+)px\)$/,z.prototype.calculateOverflowClips=function(){this.nodes.forEac
9h((function(t){if(dt(t)){ut(t)&&t.appendToDOM(),t.borders=this.parseBorders(t);var e="hidden"===t.css("overflow")?[t.borders.clip]:[],n=t.parseClip();n&&-1!==["absolute","fixed"].indexOf(t.css("position"))&&e.push([["rect",t.bounds.left+n.left,t.bounds.top+n.top,n.right-n.left,n.bottom-n.top]]),t.clip=G(t)?t.parent.clip.concat(e):e,t.backgroundClip="hidden"!==t.css("overflow")?t.clip.concat([t.borders.clip]):t.clip,ut(t)&&t.cleanDOM()}else ht(t)&&(t.clip=G(t)?t.parent.clip:[]);ut(t)||(t.bounds=null)}),this)},z.prototype.asyncRenderer=function(t,e,n){n=n||Date.now(),this.paint(t[this.renderIndex++]),t.length===this.renderIndex?e():n+20>Date.now()?this.asyncRenderer(t,e,n):setTimeout(pt((function(){this.asyncRenderer(t,e)}),this),0)},z.prototype.createPseudoHideStyles=function(t){this.createStyles(t,"."+Ft.prototype.PSEUDO_HIDE_ELEMENT_CLASS_BEFORE+':before { content: "" !important; display: none !important; }.'+Ft.prototype.PSEUDO_HIDE_ELEMENT_CLASS_AFTER+':after { content: "" !important; display: none !important; }')},z.prototype.disableAnimations=function(t){this.createStyles(t,"* { -webkit-animation: none !important; -moz-animation: none !important; -o-animation: none !important; animation: none !important; -webkit-transition: none !important; -moz-transition: none !important; -o-transition: none !important; transition: none !important;}")},z.prototype.createStyles=function(t,e){var n=t.createElement("style");n.innerHTML=e,t.body.appendChild(n)},z.prototype.getPseudoElements=function(t){var e=[[t]];if(t.node.nodeType===Node.ELEMENT_NODE){var n=this.getPseudoElement(t,":before"),i=this.getPseudoElement(t,":after");n&&e.push(n),i&&e.push(i)}return yt(e)},z.prototype.getPseudoElement=function(t,n){var i=t.computedStyle(n);if(!i||!i.content||"none"===i.content||"-moz-alt-content"===i.content||"none"===i.display)return null;for(var o=function(t){var e=t.substr(0,1);return e===t.substr(t.length-1)&&e.match(/'|"/)?t.substr(1,t.length-2):t}(i.content),r="url"===o.substr(0,3),a=e.createElement(r?"img":"html2canvaspseudoelement"),s=new Ft(a,t,n),l=i.length-1;l>=0;l--){var c=i.item(l).replace(/(\-[a-z])/g,(function(t){return t.toUpperCase().replace("-","")}));a.style[c]=i[c]}if(a.className=Ft.prototype.PSEUDO_HIDE_ELEMENT_CLASS_BEFORE+" "+Ft.prototype.PSEUDO_HIDE_ELEMENT_CLASS_AFTER,r)return a.src=_(o)[0].args[0],[s];var d=e.createTextNode(o);return a.appendChild(d),[s,new Mt(d,s)]},z.prototype.getChildren=function(t){return yt([].filter.call(t.node.childNodes,at).map((function(e){var n=[e.nodeType===Node.TEXT_NODE?new Mt(e,t):new D(e,t)].filter(gt);return e.nodeType===Node.ELEMENT_NODE&&n.length&&"TEXTAREA"!==e.tagName?n[0].isElementVisible()?n.concat(this.getChildren(n[0])):[]:n}),this))},z.prototype.newStackingContext=function(t,e){var n=new It(e,t.getOpacity(),t.node,t.parent);t.cloneTo(n),(e?n.getParentStack(this):n.parent.stack).contexts.push(n),t.stack=n},z.prototype.createStackingContexts=function(){this.nodes.forEach((function(t){dt(t)&&(this.isRootElement(t)||function(t){return t.getOpacity()<1}(t)||function(t){var e=t.css("position"),n=-1!==["absolute","relative","fixed"].indexOf(e)?t.css("zIndex"):"auto";return"auto"!==n}(t)||this.isBodyWithTransparentRoot(t)||t.hasTransform())?this.newStackingContext(t,!0):dt(t)&&(st(t)&&nt(t)||function(t){return-1!==["inline-block","inline-table"].indexOf(t.css("display"))}(t)||lt(t))?this.newStackingContext(t,!1):t.assignStack(t.parent.stack)}),this)},z.prototype.isBodyWithTransparentRoot=function(t){return"BODY"===t.node.nodeName&&t.parent.color("backgroundColor").isTransparent()},z.prototype.isRootElement=function(t){return null===t.parent},z.prototype.sortStackingContexts=function(t){var e;t.contexts.sort((e=t.contexts.slice(0),function(t,n){return t.cssInt("zIndex")+e.indexOf(t)/e.length-(n.cssInt("zIndex")+e.indexOf(n)/e.length)}
9)),t.contexts.forEach(this.sortStackingContexts,this)},z.prototype.parseTextBounds=function(t){return function(e,n,i){if("none"!==t.parent.css("textDecoration").substr(0,4)||0!==e.trim().length){if(this.support.rangeBounds&&!t.parent.hasTransform()){var o=i.slice(0,n).join("").length;return this.getRangeBounds(t.node,o,e.length)}if(t.node&&"string"==typeof t.node.data){var r=t.node.splitText(e.length),a=this.getWrapperBounds(t.node,t.parent.hasTransform());return t.node=r,a}}else this.support.rangeBounds&&!t.parent.hasTransform()||(t.node=t.node.splitText(e.length));return{}}},z.prototype.getWrapperBounds=function(t,e){var n=t.ownerDocument.createElement("html2canvaswrapper"),i=t.parentNode,o=t.cloneNode(!0);n.appendChild(t.cloneNode(!0)),i.replaceChild(n,t);var r=e?V(n):W(n);return i.replaceChild(o,n),r},z.prototype.getRangeBounds=function(t,e,n){var i=this.range||(this.range=t.ownerDocument.createRange());return i.setStart(t,e),i.setEnd(t,e+n),i.getBoundingClientRect()},z.prototype.parse=function(t){var e=t.contexts.filter(tt),n=t.children.filter(dt),i=n.filter(ct(lt)),o=i.filter(ct(st)).filter(ct(it)),r=n.filter(ct(st)).filter(lt),a=i.filter(ct(st)).filter(it),s=t.contexts.concat(i.filter(st)).filter(nt),l=t.children.filter(ht).filter(rt),c=t.contexts.filter(et);e.concat(o).concat(r).concat(a).concat(s).concat(l).concat(c).forEach((function(t){this.renderQueue.push(t),ot(t)&&(this.parse(t),this.renderQueue.push(new $))}),this)},z.prototype.paint=function(t){try{t instanceof $?this.renderer.ctx.restore():ht(t)?(ut(t.parent)&&t.parent.appendToDOM(),this.paintText(t),ut(t.parent)&&t.parent.cleanDOM()):this.paintNode(t)}catch(t){if(H(t),this.options.strict)throw t}},z.prototype.paintNode=function(t){ot(t)&&(this.renderer.setOpacity(t.opacity),this.renderer.ctx.save(),t.hasTransform()&&this.renderer.setTransform(t.parseTransform())),"INPUT"===t.node.nodeName&&"checkbox"===t.node.type?this.paintCheckbox(t):"INPUT"===t.node.nodeName&&"radio"===t.node.type?this.paintRadio(t):this.paintElement(t)},z.prototype.paintElement=function(t){var e=t.parseBounds();this.renderer.clip(t.backgroundClip,(function(){this.renderer.renderBackground(t,e,t.borders.borders.map(mt))}),this),this.renderer.clip(t.clip,(function(){this.renderer.renderBorders(t.borders.borders)}),this),this.renderer.clip(t.backgroundClip,(function(){switch(t.node.nodeName){case"svg":case"IFRAME":var n=this.images.get(t.node);n?this.renderer.renderImage(t,e,t.borders,n):H("Error loading <"+t.node.nodeName+">",t.node);break;case"IMG":var i=this.images.get(t.node.src);i?this.renderer.renderImage(t,e,t.borders,i):H("Error loading <img>",t.node.src);break;case"CANVAS":this.renderer.renderImage(t,e,t.borders,{image:t.node});break;case"SELECT":case"INPUT":case"TEXTAREA":this.paintFormValue(t)}}),this)},z.prototype.paintCheckbox=function(t){var e=t.parseBounds(),n=Math.min(e.width,e.height),i={width:n-1,height:n-1,top:e.top,left:e.left},o=[3,3],r=[o,o,o,o],a=[1,1,1,1].map((function(t){return{color:new S("#A5A5A5"),width:t}})),s=X(i,r,a);this.renderer.clip(t.backgroundClip,(function(){this.renderer.rectangle(i.left+1,i.top+1,i.width-2,i.height-2,new S("#DEDEDE")),this.renderer.renderBorders(Y(a,i,s,r)),t.node.checked&&(this.renderer.font(new S("#424242"),"normal","normal","bold",n-3+"px","arial"),this.renderer.text("✔",i.left+n/6,i.top+n-1))}),this)},z.prototype.paintRadio=function(t){var e=t.parseBounds(),n=Math.min(e.width,e.height)-2;this.renderer.clip(t.backgroundClip,(function(){this.renderer.circleStroke(e.left+1,e.top+1,n,new S("#DEDEDE"),1,new S("#A5A5A5")),t.node.checked&&this.renderer.circle(Math.ceil(e.left+n/4)+1,Math.ceil(e.top+n/4)+1,Math.floor(n/2),new S("#424242"))}),this)},z.prototype.paintFormValue=function(t){var e=t.getValue();if(e.length>0){var n=t.node.ownerDocument,i=n.createElement("html2canvaswrapper");["lineHeight","textAlign","fontFamily","fontWeight","fontSize","color","paddingLeft","paddingTop","paddingRight","paddingBottom","width","height","borderLeftStyle","borderTopStyle","borderLeftWidth","borderTopWidth","boxSizing","whiteSpace","wordWrap"].forEach((function(e){try{i.style[e]=t.css(e)}catch(t){H("html2canvas: Parse: Exception caught in renderFormValue: "+t.message)}}));var o=t.parseBounds();i.style.position="fixed",i.style.left=o.left+"px",i.style.top=o.top+"px",i.textContent=e,n.body.appendChild(i),this.paintText(new Mt(i.firstChild,t)),n.body.removeChild(i)}},z.prototype.paintText=function(e){e.applyTextTransform();var n,i=t.html2canvas.punycode.ucs2.decode(e.node.data),o=this.options.letterRendering&&!function(t){return/^(normal|none|0px)$/.test(t.parent.css("letterSpacing"))}(e)||(n=e.node.data,/[^\u0000-\u00ff]/.test(n))?i.map((function(e){return t.html2canvas.punycode.ucs2.encode([e])})):function(e){var n,i=[],o=0,r=!1;for(;e.length;)vt(e[o])===r?((n=e.splice(0,o)).length&&i.push(t.html2canvas.punycode.ucs2.encode(n)),r=!r,o=0):o++,o>=e.length&&(n=e.splice(0,o)).length&&i.push(t.html2canvas.punycode.ucs2.encode(n));return i}(i),r=e.parent.fontWeight(),a=e.parent.css("fontSize"),s=e.parent.css("fontFamily"),l=e.parent.parseTextShadows();this.renderer.font(e.parent.color("color"),e.parent.css("fontStyle"),e.parent.css("fontVariant"),r,a,s),l.length?this.renderer.fontShadow(l[0].color,l[0].offsetX,l[0].offsetY,l[0].blur):this.renderer.clearShadow(),this.renderer.clip(e.parent.clip,(function(){o.map(this.parseTextBounds(e),this).forEac
9h((function(t,n){t&&(this.renderer.text(o[n],t.left,t.bottom),this.renderTextDecoration(e.parent,t,this.fontMetrics.getMetrics(s,a)))}),this)}),this)},z.prototype.renderTextDecoration=function(t,e,n){switch(t.css("textDecoration").split(" ")[0]){case"underline":this.renderer.rectangle(e.left,Math.round(e.top+n.baseline+n.lineWidth),e.width,1,t.color("color"));break;case"overline":this.renderer.rectangle(e.left,Math.round(e.top),e.width,1,t.color("color"));break;case"line-through":this.renderer.rectangle(e.left,Math.ceil(e.top+n.middle+n.lineWidth),e.width,1,t.color("color"))}};var m={inset:[["darken",.6],["darken",.1],["darken",.1],["darken",.6]]};z.prototype.parseBorders=function(t){var e=t.parseBounds(),n=function(t){return["TopLeft","TopRight","BottomRight","BottomLeft"].map((function(e){var n=t.css("border"+e+"Radius").split(" ");return n.length<=1&&(n[1]=n[0]),n.map(ft)}))}(t),i=["Top","Right","Bottom","Left"].map((function(e,n){var i=t.css("border"+e+"Style"),o=t.color("border"+e+"Color");"inset"===i&&o.isBlack()&&(o=new S([255,255,255,o.a]));var r=m[i]?m[i][n]:null;return{width:t.cssInt("border"+e+"Width"),color:r?o[r[0]](r[1]):o,args:null}})),o=X(e,n,i);return{clip:this.parseBackgroundClip(t,o,i,n,e),borders:Y(i,e,o,n)}},z.prototype.parseBackgroundClip=function(t,e,n,i,o){var r=[];switch(t.css("backgroundClip")){case"content-box":case"padding-box":Z(r,i[0],i[1],e.topLeftInner,e.topRightInner,o.left+n[3].width,o.top+n[0].width),Z(r,i[1],i[2],e.topRightInner,e.bottomRightInner,o.left+o.width-n[1].width,o.top+n[0].width),Z(r,i[2],i[3],e.bottomRightInner,e.bottomLeftInner,o.left+o.width-n[1].width,o.top+o.height-n[2].width),Z(r,i[3],i[0],e.bottomLeftInner,e.topLeftInner,o.left+n[3].width,o.top+o.height-n[2].width);break;default:Z(r,i[0],i[1],e.topLeftOuter,e.topRightOuter,o.left,o.top),Z(r,i[1],i[2],e.topRightOuter,e.bottomRightOuter,o.left+o.width,o.top),Z(r,i[2],i[3],e.bottomRightOuter,e.bottomLeftOuter,o.left+o.width,o.top+o.height),Z(r,i[3],i[0],e.bottomLeftOuter,e.topLeftOuter,o.left,o.top+o.height)}return r};var g=0,y="withCredentials"in new XMLHttpRequest,v="crossOrigin"in new Image;Ft.prototype.cloneTo=function(t){Ft.prototype.cloneTo.call(this,t),t.isPseudoElement=!0,t.before=this.before},Ft.prototype=Object.create(D.prototype),Ft.prototype.appendToDOM=function(){this.before?this.parent.node.insertBefore(this.node,this.parent.node.firstChild):this.parent.node.appendChild(this.node),this.parent.node.className+=" "+this.getHideClass()},Ft.prototype.cleanDOM=function(){this.node.parentNode.removeChild(this.node),this.parent.node.className=this.parent.node.className.replace(this.getHideClass(),"")},Ft.prototype.getHideClass=function(){return this["PSEUDO_HIDE_ELEMENT_CLASS_"+(this.before?"BEFORE":"AFTER")]},Ft.prototype.PSEUDO_HIDE_ELEMENT_CLASS_BEFORE="___html2canvas___pseudoelement_before",Ft.prototype.PSEUDO_HIDE_ELEMENT_CLASS_AFTER="___html2canvas___pseudoelement_after",Tt.prototype.renderImage=function(t,e,n,i){var o=t.cssInt("paddingLeft"),r=t.cssInt("paddingTop"),a=t.cssInt("paddingRight"),s=t.cssInt("paddingBottom"),l=n.borders,c=e.width-(l[1].width+l[3].width+o+a),d=e.height-(l[0].width+l[2].width+r+s);this.drawImage(i,0,0,i.image.width||c,i.image.height||d,e.left+o+l[3].width,e.top+r+l[0].width,c,d)},Tt.prototype.renderBackground=function(t,e,n){e.height>0&&e.width>0&&(this.renderBackgroundColor(t,e),this.renderBackgroundImage(t,e,n))},Tt.prototype.renderBackgroundColor=function(t,e){var n=t.color("backgroundColor");n.isTransparent()||this.rectangle(e.left,e.top,e.width,e.height,n)},Tt.prototype.renderBorders=function(t){t.forEach(this.renderBorder,this)},Tt.prototype.renderBorder=function(t){t.color.isTransparent()||null===t.args||this.drawShape(t.args,t.color)},Tt.prototype.renderBackgroundImage=function(t,e,n){t.parseBackgroundImages().reverse().forEach((function(i,o,r){switch(i.method){case"url":var a=this.images.get(i.args[0]);a?this.renderBackgroundRepeating(t,e,a,r.length-(o+1),n):H("Error loading background-image",i.args[0]);break;case"linear-gradient":case"gradient":var s=this.images.get(i.value);
vendor: 5,247 bytes, line 9
9s?this.renderBackgroundGradient(s,e,n):H("Error loading background-image",i.args[0]);break;case"none":break;default:H("Unknown background-image type",i.args[0])}}),this)},Tt.prototype.renderBackgroundRepeating=function(t,e,n,i,o){var r=t.parseBackgroundSize(e,n.image,i),a=t.parseBackgroundPosition(e,n.image,i,r);switch(t.parseBackgroundRepeat(i)){case"repeat-x":case"repeat no-repeat":this.backgroundRepeatShape(n,a,r,e,e.left+o[3],e.top+a.top+o[0],99999,r.height,o);break;case"repeat-y":case"no-repeat repeat":this.backgroundRepeatShape(n,a,r,e,e.left+a.left+o[3],e.top+o[0],r.width,99999,o);break;case"no-repeat":this.backgroundRepeatShape(n,a,r,e,e.left+a.left+o[3],e.top+a.top+o[0],r.width,r.height,o);break;default:this.renderBackgroundRepeat(n,a,r,{top:e.top,left:e.left},o[3],o[0])}},It.prototype=Object.create(D.prototype),It.prototype.getParentStack=function(t){var e=this.parent?this.parent.stack:null;return e?e.ownStacking?e:e.getParentStack(t):t.stack},St.prototype.testRangeBounds=function(t){var e,n,i=!1;return t.createRange&&(e=t.createRange()).getBoundingClientRect&&((n=t.createElement("boundtest")).style.height="123px",n.style.display="block",t.body.appendChild(n),e.selectNode(n),123===e.getBoundingClientRect().height&&(i=!0),t.body.removeChild(n)),i},St.prototype.testCORS=function(){return void 0!==(new Image).crossOrigin},St.prototype.testSVG=function(){var t=new Image,n=e.createElement("canvas"),i=n.getContext("2d");t.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";try{i.drawImage(t,0,0),n.toDataURL()}catch(t){return!1}return!0},kt.prototype.hasFabric=function(){return html2canvas.fabric?Promise.resolve():Promise.reject(new Error("html2canvas.svg.js is not loaded, cannot render svg"))},kt.prototype.inlineFormatting=function(t){return/^data:image\/svg\+xml;base64,/.test(t)?this.decode64(this.removeContentType(t)):this.removeContentType(t)},kt.prototype.removeContentType=function(t){return t.replace(/^data:image\/svg\+xml(;base64)?,/,"")},kt.prototype.isInline=function(t){return/^data:image\/svg\+xml/i.test(t)},kt.prototype.createCanvas=function(t){var e=this;return function(n,i){var o=new html2canvas.fabric.StaticCanvas("c");e.image=o.lowerCanvasEl,o.setWidth(i.width).setHeight(i.height).add(html2canvas.fabric.util.groupSVGElements(n,i)).renderAll(),t(o.lowerCanvasEl)}},kt.prototype.decode64=function(e){return"function"==typeof t.atob?t.atob(e):At(e)},Lt.prototype=Object.create(kt.prototype),Mt.prototype=Object.create(D.prototype),Mt.prototype.applyTextTransform=function(){this.node.data=this.transform(this.parent.css("textTransform"))},Mt.prototype.transform=function(t){var e=this.node.data;switch(t){case"lowercase":return e.toLowerCase();case"capitalize":return e.replace(/(^|\s|:|-|\(|\))([a-z])/g,Nt);case"uppercase":return e.toUpperCase();default:return e}},Rt.prototype=Object.create(N.prototype),Bt.prototype=Object.create(Tt.prototype),Bt.prototype.setFillStyle=function(t){return this.ctx.fillStyle="object"==typeof t&&t.isColor?t.toString():t,this.ctx},Bt.prototype.rectangle=function(t,e,n,i,o){this.setFillStyle(o).fillRect(t,e,n,i)},Bt.prototype.circle=function(t,e,n,i){this.setFillStyle(i),this.ctx.beginPath(),this.ctx.arc(t+n/2,e+n/2,n/2,0,2*Math.PI,!0),this.ctx.closePath(),this.ctx.fill()},Bt.prototype.circleStroke=function(t,e,n,i,o,r){this.circle(t,e,n,i),this.ctx.strokeStyle=r.toString(),this.ctx.stroke()},Bt.prototype.drawShape=function(t,e){this.shape(t),this.setFillStyle(e).fill()},Bt.prototype.taints=function(t){if(null===t.tainted){this.taintCtx.drawImage(t.image,0,0);try{this.taintCtx.getImageData(0,0,1,1),t.tainted=!1}catch(n){this.taintCtx=e.createElement("canvas").getContext("2d"),t.tainted=!0}}return t.tainted},Bt.prototype.drawImage=function(t,e,n,i,o,r,a,s,l){this.taints(t)&&!this.options.allowTaint||this.ctx.drawImage(t.image,e,n,i,o,r,a,s,l)},Bt.prototype.clip=function(t,e,n){this.ctx.save(),t.filter(Ht).forEach((function(t){this.shape(t).clip()}),this),e.call(n),this.ctx.restore()},Bt.prototype.shape=function(t){return this.ctx.beginPath(),t.forEach((function(t,e){"rect"===t[0]?this.ctx.rect.apply(this.ctx,t.slice(1)):this.ctx[0===e?"moveTo":t[0]+"To"].apply(this.ctx,t.slice(1))}),this),this.ctx.closePath(),this.ctx},Bt.prototype.font=function(t,e,n,i,o,r){this.setFillStyle(t).font=[e,n,i,o,r].join(" ").split(",")[0]},Bt.prototype.fontShadow=function(t,e,n,i){this.setVariable("shadowColor",t.toString()).setVariable("shadowOffsetY",e).setVariable("shadowOffsetX",n).setVariable("shadowBlur",i)},Bt.prototype.clearShadow=function(){this.setVariable("shadowColor","rgba(0,0,0,0)")},Bt.prototype.setOpacity=function(t){this.ctx.globalAlpha=t},Bt.prototype.setTransform=function(t){this.ctx.translate(t.origin[0],t.origin[1]),this.ctx.transform.apply(this.ctx,t.matrix),this.ctx.translate(-t.origin[0],-t.origin[1])},Bt.prototype.setVariable=function(t,e){return this.variables[t]!==e&&(this.variables[t]=this.ctx[t]=e),this},Bt.prototype.text=function(t,e,n){this.ctx.fillText(t,e,n)},Bt.prototype.backgroundRepeatShape=function(t,e,n,i,o,r,a,s,l){var c=[["line",Math.round(o),Math.round(r)],["line",Math.round(o+a),Math.round(r)],["line",Math.round(o+a),Math.round(s+r)],["line",Math.round(o),Math.round(s+r)]];
9this.clip([c],(function(){this.renderBackgroundRepeat(t,e,n,i,l[3],l[0])}),this)},Bt.prototype.renderBackgroundRepeat=function(t,e,n,i,o,r){var a=Math.round(i.left+e.left+o),s=Math.round(i.top+e.top+r);this.setFillStyle(this.ctx.createPattern(this.resizeImage(t,n),"repeat")),this.ctx.translate(a,s),this.ctx.fill(),this.ctx.translate(-a,-s)},Bt.prototype.renderBackgroundGradient=function(t,e){if(t instanceof B){var n=this.ctx.createLinearGradient(e.left+e.width*t.x0,e.top+e.height*t.y0,e.left+e.width*t.x1,e.top+e.height*t.y1);t.colorStops.forEach((function(t){n.addColorStop(t.stop,t.color.toString())})),this.rectangle(e.left,e.top,e.width,e.height,n)}},Bt.prototype.resizeImage=function(t,n){var i=t.image;if(i.width===n.width&&i.height===n.height)return i;var o=e.createElement("canvas");return o.width=n.width,o.height=n.height,o.getContext("2d").drawImage(i,0,0,i.width,i.height,0,0,n.width,n.height),o}}
10/*! https://mths.be/punycode v1.3.1 by @mathias */else(t||module.exports).html2canvas=function(){return Promise.reject("No canvas support")};function w(t,n,i,o,r){var a,s=n.contentWindow,l=new St(s.document),c=new O(i,l),d=W(t),u="view"===i.type?o:(a=s.document,Math.max(Math.max(a.body.scrollWidth,a.documentElement.scrollWidth),Math.max(a.body.offsetWidth,a.documentElement.offsetWidth),Math.max(a.body.clientWidth,a.documentElement.clientWidth))),h="view"===i.type?r:function(t){return Math.max(Math.max(t.body.scrollHeight,t.documentElement.scrollHeight),Math.max(t.body.offsetHeight,t.documentElement.offsetHeight),Math.max(t.body.clientHeight,t.documentElement.clientHeight))}(s.document),p=new i.renderer(u,h,c,i,e);return new z(t,p,l,c,i).ready.then((function(){var e;return H("Finished rendering"),e="view"===i.type?b(p.canvas,{width:p.canvas.width,height:p.canvas.height,top:0,left:0,x:0,y:0}):t===s.document.body||t===s.document.documentElement||null!=i.canvas?p.canvas:b(p.canvas,{width:null!=i.width?i.width:d.width,height:null!=i.height?i.height:d.height,top:d.top,left:d.left,x:s.pageXOffset,y:s.pageYOffset}),function(t,e){e.removeContainer&&(t.parentNode.removeChild(t),H("Cleaned up container"))}(n,i),e}))}function b(t,n){var i=e.createElement("canvas"),o=Math.min(t.width-1,Math.max(0,n.left)),r=Math.min(t.width,Math.max(1,n.left+n.width)),a=Math.min(t.height-1,Math.max(0,n.top)),s=Math.min(t.height,Math.max(1,n.top+n.height));return i.width=n.width,i.height=n.height,H("Cropping canvas at:","left:",n.left,"top:",n.top,"width:",r-o,"height:",s-a),H("Resulting crop with width",n.width,"and height",n.height," with x",o,"and y",a),i.getContext("2d").drawImage(t,o,a,r-o,s-a,n.x,n.y,r-o,s-a),i}function P(t,n){for(var i=3===t.nodeType?e.createTextNode(t.nodeValue):t.cloneNode(!1),o=t.firstChild;o;)!0!==n&&1===o.nodeType&&"SCRIPT"===o.nodeName||i.appendChild(P(o,n)),o=o.nextSibling;return i}function x(t,n,i,o,r,a,c){!function(t){[].slice.call(t.querySelectorAll("canvas"),0).forEach((function(t){t.setAttribute(s,"canvas-"+l++)}))}(t);var d=e.documentMode&&e.documentMode<=9?P(t.documentElement,r.javascriptEnabled):t.documentElement.cloneNode(!0),u=n.createElement("iframe");return u.className="html2canvas-container",u.style.visibility="hidden",u.style.position="fixed",u.style.left="-10000px",u.style.top="0px",u.style.border="0",u.width=i,u.height=o,u.scrolling="no",n.body.appendChild(u),new Promise((function(e){var n=u.contentWindow.document;C(t.documentElement,d,"textarea"),C(t.documentElement,d,"select"),u.contentWindow.onload=u.onload=function(){var i=setInterval((function(){n.body.childNodes.length>0&&(!function(t,e){[].slice.call(t.querySelectorAll("["+s+"]"),0).forEach((function(t){try{var n=e.querySelector("["+s+'="'+t.getAttribute(s)+'"]');
10n&&(n.width=t.width,n.height=t.height,n.getContext("2d").putImageData(t.getContext("2d").getImageData(0,0,t.width,t.height),0,0))}catch(e){H("Unable to copy canvas content from",t,e)}t.removeAttribute(s)}))}(t,n),clearInterval(i),"view"===r.type&&u.contentWindow.scrollTo(a,c),e(u))}),50)},n.open(),n.write("<!DOCTYPE html><html></html>"),function(t,e,n){!t.defaultView||e===t.defaultView.pageXOffset&&n===t.defaultView.pageYOffset||t.defaultView.scrollTo(e,n)}(t,a,c),n.replaceChild(!0===r.javascriptEnabled?n.adoptNode(d):T(n.adoptNode(d)),n.documentElement),n.close()}))}function C(t,e,n){for(var i=t.getElementsByTagName(n),o=e.getElementsByTagName(n),r=i.length,a=0;a<r;a++)o[a].value=i[a].value}function E(e,n,i,o,r,a){return new wt(e,n,t.document).then(F(e)).then((function(t){return x(t,i,o,r,a,0,0)}))}function F(t){return function(n){var i,o=new DOMParser;try{i=o.parseFromString(n,"text/html")}catch(t){H("DOMParser not supported, falling back to createHTMLDocument"),i=e.implementation.createHTMLDocument("");try{i.open(),i.write(n),i.close()}catch(t){H("createHTMLDocument write not supported, falling back to document.body.innerHTML"),i.body.innerHTML=n}}var r=i.querySelector("base");if(!r||!r.href.host){var a=i.createElement("base");a.href=t,i.head.insertBefore(a,i.head.firstChild)}return i}}function T(t){return[].slice.call(t.childNodes,0).filter(I).forEach((function(e){"SCRIPT"===e.tagName?t.removeChild(e):T(e)})),t}function I(t){return t.nodeType===Node.ELEMENT_NODE}function S(t){this.r=0,this.g=0,this.b=0,this.a=null;this.fromArray(t)||this.namedColor(t)||this.rgb(t)||this.rgba(t)||this.hex6(t)||this.hex3(t)}function k(t){if(this.src=t,H("DummyImageContainer for",t),!this.promise||!this.image){H("Initiating DummyImageContainer"),k.prototype.image=new Image;var e=this.image;k.prototype.promise=new Promise((function(t,n){e.onload=t,e.onerror=n,e.src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",!0===e.complete&&t(e)}))}}function A(t,n){var i,o,r=e.createElement("div"),a=e.createElement("img"),s=e.createElement("span"),l="Hidden Text";r.style.visibility="hidden",r.style.fontFamily=t,r.style.fontSize=n,r.style.margin=0,r.style.padding=0,e.body.appendChild(r),a.src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",a.width=1,a.height=1,a.style.margin=0,a.style.padding=0,a.style.verticalAlign="baseline",s.style.fontFamily=t,s.style.fontSize=n,s.style.margin=0,s.style.padding=0,s.appendChild(e.createTextNode(l)),r.appendChild(s),r.appendChild(a),i=a.offsetTop-s.offsetTop+1,r.removeChild(s),r.appendChild(e.createTextNode(l)),r.style.lineHeight="normal",a.style.verticalAlign="super",o=a.offsetTop-r.offsetTop+1,e.body.removeChild(r),this.baseline=i,this.lineWidth=1,this.middle=o}function L(){this.data={}}function M(t,e,n){this.image=null,this.src=t;var i=this,o=W(t);this.promise=(e?new Promise((function(e){"about:blank"===t.contentWindow.document.URL||null==t.contentWindow.document.documentElement?t.contentWindow.onload=t.onload=function(){e(t)}:e(t)})):this.proxyLoad(n.proxy,o,n)).then((function(t){return html2canvas(t.contentWindow.document.documentElement,{type:"view",width:t.width,height:t.height,proxy:n.proxy,javascriptEnabled:n.javascriptEnabled,removeContainer:n.removeContainer,allowTaint:n.allowTaint,imageTimeout:n.imageTimeout/2})})).then((function(t){return i.image=t}))}function N(t){this.src=t.value,this.colorStops=[],this.type=null,this.x0=.5,this.y0=.5,this.x1=.5,this.y1=.5,this.promise=Promise.resolve(!0)}function R(t,e){this.src=t,this.image=new Image;var n=this;this.tainted=null,this.promise=new Promise((function(i,o){n.image.onload=i,n.image.onerror=o,e&&(n.image.crossOrigin="anonymous"),n.image.src=t,!0===n.image.complete&&i(n.image)}))}function O(e,n){this.link=null,this.options=e,this.support=n,this.origin=this.getOrigin(t.location.href)}function B(t){N.apply(this,arguments),this.type=this.TYPES.LINEAR;var e=null===t.args[0].match(this.stepRegExp);e?t.args[0].split(" ").reverse().forEach((function(t){switch(t){case"left":this.x0=0,this.x1=1;break;case"top":this.y0=0,this.y1=1;break;case"right":this.x0=1,this.x1=0;break;case"bottom":this.y0=1,this.y1=0;break;case"to":var e=this.y0,n=this.x0;this.y0=this.y1,this.x0=this.x1,this.x1=n,this.y1=e}}),this):(this.y0=0,this.y1=1),this.colorStops=t.args.slice(e?1:0).map((function(t){var e=t.match(this.stepRegExp);return{color:new S(e[1]),stop:"%"===e[3]?e[2]/100:null}}),this),null===this.colorStops[0].stop&&(this.colorStops[0].stop=0),null===this.colorStops[this.colorStops.length-1].stop&&(this.colorStops[this.colorStops.length-1].stop=1),this.colorStops.forEach((function(t,e){null===t.stop&&this.colorStops.slice(e).some((function(n,i){return null!==n.stop&&(t.stop=(n.stop-this.colorStops[e-1].stop)/(i+1)+this.colorStops[e-1].stop,!0)}),this)}),this)}function H(){t.html2canvas.logging&&t.console&&t.console.log&&Function.prototype.bind.call(t.console.log,t.console).apply(t.console,[Date.now()-t.html2canvas.start+"ms","html2canvas:"].concat([].slice.call(arguments,0)))}function D(t,e){this.node=t,this.parent=e,this.stack=null,this.bounds=null,this.borders=null,this.clip=[],this.backgroundClip=[],this.offsetBounds=null,this.visible=null,this.computedStyles=null,this.colors={},this.styles={},this.backgroundImages=null,this.transformData=null,this.transformMatrix=null,this.isPseudoElement=!1,this.opacity=null}function j(t){return-1!==t.toString().indexOf("%")}function _(t){var e,n,i,o,r,a,s,l=[],c=0,d=0,u=function(){e&&('"'
vendor: 8,917 bytes, line 10
10===n.substr(0,1)&&(n=n.substr(1,n.length-2)),n&&s.push(n),"-"===e.substr(0,1)&&(o=e.indexOf("-",1)+1)>0&&(i=e.substr(0,o),e=e.substr(o)),l.push({prefix:i,method:e.toLowerCase(),value:r,args:s,image:null})),s=[],e=i=n=r=""};return s=[],e=i=n=r="",t.split("").forEach((function(t){if(!(0===c&&" \r\n\t".indexOf(t)>-1)){switch(t){case'"':a?a===t&&(a=null):a=t;break;case"(":if(a)break;if(0===c)return c=1,void(r+=t);d++;break;case")":if(a)break;if(1===c){if(0===d)return c=0,r+=t,void u();d--}break;case",":if(a)break;if(0===c)return void u();if(1===c&&0===d&&!e.match(/^url$/i))return s.push(n),n="",void(r+=t)}r+=t,0===c?e+=t:n+=t}})),u(),l}function U(t){return t.replace("px","")}function q(t){return parseFloat(t)}function W(t){if(t.getBoundingClientRect){var e=t.getBoundingClientRect(),n=null==t.offsetWidth?e.width:t.offsetWidth;return{top:e.top,bottom:e.bottom||e.top+e.height,right:e.left+n,left:e.left,width:n,height:null==t.offsetHeight?e.height:t.offsetHeight}}return{}}function V(t){var e=t.offsetParent?V(t.offsetParent):{top:0,left:0};return{top:t.offsetTop+e.top,bottom:t.offsetTop+t.offsetHeight+e.top,right:t.offsetLeft+e.left+t.offsetWidth,left:t.offsetLeft+e.left,width:t.offsetWidth,height:t.offsetHeight}}function z(t,e,n,i,o){H("Starting NodeParser"),this.renderer=e,this.options=o,this.range=null,this.support=n,this.renderQueue=[],this.stack=new It(!0,1,t.ownerDocument,null);var r=new D(t,null);if(o.background&&e.rectangle(0,0,e.width,e.height,new S(o.background)),t===t.ownerDocument.documentElement){var a=new D(r.color("backgroundColor").isTransparent()?t.ownerDocument.body:t.ownerDocument.documentElement,null);e.rectangle(0,0,e.width,e.height,a.color("backgroundColor"))}r.visibile=r.isElementVisible(),this.createPseudoHideStyles(t.ownerDocument),this.disableAnimations(t.ownerDocument),this.nodes=yt([r].concat(this.getChildren(r)).filter((function(t){return t.visible=t.isElementVisible()})).map(this.getPseudoElements,this)),this.fontMetrics=new L,H("Fetched nodes, total:",this.nodes.length),H("Calculate overflow clips"),this.calculateOverflowClips(),H("Start fetching images"),this.images=i.fetch(this.nodes.filter(dt)),this.ready=this.images.ready.then(pt((function(){return H("Images loaded, starting parsing"),H("Creating stacking contexts"),this.createStackingContexts(),H("Sorting stacking contexts"),this.sortStackingContexts(this.stack),this.parse(this.stack),H("Render queue created with "+this.renderQueue.length+" items"),new Promise(pt((function(t){o.async?"function"==typeof o.async?o.async.call(this,this.renderQueue,t):this.renderQueue.length>0?(this.renderIndex=0,this.asyncRenderer(this.renderQueue,t)):t():(this.renderQueue.forEach(this.paint,this),t())}),this))}),this))}function G(t){return t.parent&&t.parent.clip.length}function $(){}function Y(t,e,n,i){return t.map((function(o,r){if(o.width>0){var a=e.left,s=e.top,l=e.width,c=e.height-t[2].width;switch(r){case 0:c=t[0].width,o.args=J({c1:[a,s],c2:[a+l,s],c3:[a+l-t[1].width,s+c],c4:[a+t[3].width,s+c]},i[0],i[1],n.topLeftOuter,n.topLeftInner,n.topRightOuter,n.topRightInner);break;case 1:a=e.left+e.width-t[1].width,l=t[1].width,o.args=J({c1:[a+l,s],c2:[a+l,s+c+t[2].width],c3:[a,s+c],c4:[a,s+t[0].width]},i[1],i[2],n.topRightOuter,n.topRightInner,n.bottomRightOuter,n.bottomRightInner);break;case 2:s=s+e.height-t[2].width,c=t[2].width,o.args=J({c1:[a+l,s+c],c2:[a,s+c],c3:[a+t[3].width,s],c4:[a+l-t[3].width,s]},i[2],i[3],n.bottomRightOuter,n.bottomRightInner,n.bottomLeftOuter,n.bottomLeftInner);break;case 3:l=t[3].width,o.args=J({c1:[a,s+c+t[2].width],c2:[a,s],c3:[a+l,s+t[0].width],c4:[a+l,s+c]},i[3],i[0],n.bottomLeftOuter,n.bottomLeftInner,n.topLeftOuter,n.topLeftInner)}}return o}))}function K(t,e,n,i){var o=(Math.sqrt(2)-1)/3*4,r=n*o,a=i*o,s=t+n,l=e+i;return{topLeft:Q({x:t,y:l},{x:t,y:l-a},{x:s-r,y:e},{x:s,y:e}),topRight:Q({x:t,y:e},{x:t+r,y:e},{x:s,y:l-a},{x:s,y:l}),bottomRight:Q({x:s,y:e},{x:s,y:e+a},{x:t+r,y:l},{x:t,y:l}),bottomLeft:Q({x:s,y:l},{x:s-r,y:l},{x:t,y:e+a},{x:t,y:e})}}function X(t,e,n){var i=t.left,o=t.top,r=t.width,a=t.height,s=e[0][0],l=e[0][1],c=e[1][0],d=e[1][1],u=e[2][0],h=e[2][1],p=e[3][0],f=e[3][1],m=r-c,g=a-h,y=r-u,v=a-f;return{topLeftOuter:K(i,o,s,l).topLeft.subdivide(.5),topLeftInner:K(i+n[3].width,o+n[0].width,Math.max(0,s-n[3].width),Math.max(0,l-n[0].width)).topLeft.subdivide(.5),topRightOuter:K(i+m,o,c,d).topRight.subdivide(.5),topRightInner:K(i+Math.min(m,r+n[3].width),o+n[0].width,m>r+n[3].width?0:c-n[3].width,d-n[0].width).topRight.subdivide(.5),bottomRightOuter:K(i+y,o+g,u,h).bottomRight.subdivide(.5),bottomRightInner:K(i+Math.min(y,r-n[3].width),o+Math.min(g,a+n[0].width),Math.max(0,u-n[1].width),h-n[2].width).bottomRight.subdivide(.5),bottomLeftOuter:K(i,o+v,p,f).bottomLeft.subdivide(.5),bottomLeftInner:K(i+n[3].width,o+v,Math.max(0,p-n[3].width),f-n[2].width).bottomLeft.subdivide(.5)}}function Q(t,e,n,i){var o=function(t,e,n){return{x:t.x+(e.x-t.x)*n,y:t.y+(e.y-t.y)*n}};return{start:t,startControl:e,endControl:n,end:i,subdivide:function(r){var a=o(t,e,r),s=o(e,n,r),l=o(n,i,r),c=o(a,s,r),d=o(s,l,r),u=o(c,d,r);return[Q(t,a,c,u),Q(u,d,l,i)]},curveTo:function(t){t.push(["bezierCurve",e.x,e.y,n.x,n.y,i.x,i.y])},curveToReversed:function(i){i.push(["bezierCurve",n.x,n.y,e.x,e.y,t.x,t.y])}}}function J(t,e,n,i,o,r,a){var s=[];return e[0]>0||e[1]>0?(s.push(["line",i[1].start.x,i[1].start.y]),i[1].curveTo(s)):s.push(["line",t.c1[0],t.c1[1]]),n[0]>0||n[1]>0?(s.push(["line",r[0].start.x,r[0].start.y]),r[0].curveTo(s),s.push(["line",a[0].end.x,a[0].end.y]),a[0].curveToReversed(s)):(s.push(["line",t.c2[0],t.c2[1]]),s.push(["line",t.c3[0],t.c3[1]])),e[0]>0||e[1]>0?(s.push(["line",o[1].end.x,o[1].end.y]),o[1].curveToReversed(s)):s.push(["line",t.c4[0],t.c4[1]]),s}function Z(t,e,n,i,o,r,a){e[0]>0||e[1]>0?(t.push(["line",i[0].start.x,i[0].start.y]),i[0].curveTo(t),i[1].curveTo(t)):t.push(["line",r,a]),(n[0]>0||n[1]>0)&&t.push(["line",o[0].start.x,o[0].start.y])}function tt(t){return t.cssInt("zIndex")<0}function et(t){return t.cssInt("zIndex")>0}function nt(t){return 0===t.cssInt("zIndex")}function it(t){return-1!==["inline","inline-block","inline-table"].indexOf(t.css("display"))}function ot(t){return t instanceof It}function rt(t){return t.node.data.trim().length>0}function at(t){return t.nodeType===Node.TEXT_NODE||t.nodeType===Node.ELEMENT_NODE}function st(t){return"static"!==t.css("position")}function lt(t){return"none"!==t.css("float")}function ct(t){var e=this;return function(){return!t.apply(e,arguments)}}function dt(t){return t.node.nodeType===Node.ELEMENT_NODE}function ut(t){return!0===t.isPseudoElement}function ht(t){return t.node.nodeType===Node.TEXT_NODE}function pt(t,e){return function(){return t.apply(e,arguments)}}function ft(t){return parseInt(t,10)}function mt(t){return t.width}function gt(t){return t.node.nodeType!==Node.ELEMENT_NODE||-1===["SCRIPT","HEAD","TITLE","OBJECT","BR","OPTION"].indexOf(t.node.nodeName)}function yt(t){return[].concat.apply([],t)}function vt(t){return-1!==[32,13,10,9,45].indexOf(t)}function wt(t,e,n){if(!e)return Promise.reject("No proxy configured");var i=xt(y),o=Ct(e,t,i);return y?Ot(o):Pt(n,o,i).then((function(t){return At(t.content)}))}function bt(t,e,n){var i=xt(v),o=Ct(e,t,i);return v?Promise.resolve(o):Pt(n,o,i).then((function(t){return"data:"+t.type+";base64,"+t.content}))}function Pt(e,n,i){return new Promise((function(o,r){var a=e.createElement("script"),s=function(){delete t.html2canvas.proxy[i],e.body.removeChild(a)};t.html2canvas.proxy[i]=function(t){s(),o(t)},a.src=n,a.onerror=function(t){s(),r(t)},e.body.appendChild(a)}))}function xt(t){return t?"":"html2canvas_"+Date.now()+"_"+ ++g+"_"+Math.round(1e5*Math.random())}function Ct(t,e,n){return t+"?url="+encodeURIComponent(e)+(n.length?"&callback=html2canvas.proxy."+n:"")}function Et(t,n){e.createElement("script");var i=e.createElement("a");i.href=t,t=i.href,this.src=t,this.image=new Image;var o=this;this.promise=new Promise((function(i,r){o.image.crossOrigin="Anonymous",o.image.onload=i,o.image.onerror=r,new bt(t,n,e).then((function(t){o.image.src=t})).catch(r)}))}function Ft(t,e,n){D.call(this,t,e),this.isPseudoElement=!0,this.before=":before"===n}function Tt(t,e,n,i,o){this.width=t,this.height=e,this.images=n,this.options=i,this.document=o}function It(t,e,n,i){D.call(this,n,i),this.ownStacking=t,this.contexts=[],this.children=[],this.opacity=(this.parent?this.parent.stack.opacity:1)*e}function St(t){this.rangeBounds=this.testRangeBounds(t),this.cors=this.testCORS(),this.svg=this.testSVG()}function kt(t){this.src=t,this.image=null;var e=this;this.promise=this.hasFabric().then((function(){return e.isInline(t)?Promise.resolve(e.inlineFormatting(t)):Ot(t)})).then((function(t){return new Promise((function(n){html2canvas.fabric.loadSVGFromString(t,e.createCanvas.call(e,n))}))}))}function At(t){var e,n,i,o,r,a,s,l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
10+/",c=t.length,d="";for(e=0;e<c;e+=4)r=l.indexOf(t[e])<<2|(n=l.indexOf(t[e+1]))>>4,a=(15&n)<<4|(i=l.indexOf(t[e+2]))>>2,s=(3&i)<<6|(o=l.indexOf(t[e+3])),d+=64===i?String.fromCharCode(r):64===o||-1===o?String.fromCharCode(r,a):String.fromCharCode(r,a,s);return d}function Lt(t,e){this.src=t,this.image=null;var n=this;this.promise=e?new Promise((function(e,i){n.image=new Image,n.image.onload=e,n.image.onerror=i,n.image.src="data:image/svg+xml,"+(new XMLSerializer).serializeToString(t),!0===n.image.complete&&e(n.image)})):this.hasFabric().then((function(){return new Promise((function(e){html2canvas.fabric.parseSVGDocument(t,n.createCanvas.call(n,e))}))}))}function Mt(t,e){D.call(this,t,e)}function Nt(t,e,n){if(t.length>0)return e+n.toUpperCase()}function Rt(t){N.apply(this,arguments),this.type="linear"===t.args[0]?this.TYPES.LINEAR:this.TYPES.RADIAL}function Ot(t){return new Promise((function(e,n){var i=new XMLHttpRequest;i.open("GET",t),i.onload=function(){200===i.status?e(i.responseText):n(new Error(i.statusText))},i.onerror=function(){n(new Error("Network Error"))},i.send()}))}function Bt(t,e){Tt.apply(this,arguments),this.canvas=this.options.canvas||this.document.createElement("canvas"),this.options.canvas||(this.canvas.width=t,this.canvas.height=e),this.ctx=this.canvas.getContext("2d"),this.taintCtx=this.document.createElement("canvas").getContext("2d"),this.ctx.textBaseline="bottom",this.variables={},H("Initialized CanvasRenderer with size",t,"x",e)}function Ht(t){return t.length>0}}.call({},"undefined"!=typeof window?window:void 0,"undefined"!=typeof document?document:void 0),PF.movePageTo=function(t,e){let n;n=PF.showPagesWnd((function(){var e=n.down("treepanel");const i=n.down("scombo");var o=e.selModel.getSelection()[0];if(!o||PF.rec(o).id===t)return alert("Please, select a record.");PF.updatePageParent(t,e.selModel.getSelection()[0].raw.Id,null,null,(function(t){var e=JSON.parse(t),n=PF.siteRoot+"en"+e.Url;e.Url&&n!=window.location?window.location=n:window.location.reload(!0)}),i.getValue()),n.close()}),{id:t,title:e.getAttribute("title"),okButtonTitle:"Move"})},PF.assignKeywordTo=function(t,e){let n,i;const o=[],r=[],a={multiSelect:!0,title:"Assign the keyword to ",okButtonTitle:"Assign",checkchange:function(t,e,n,i){const a=i.get("Id");n?(o.push(a),Ext.Array.remove(r,a)):(r.push(a),Ext.Array.remove(o,a))}};n=PF.showPagesWnd((function(){(o.length||r.length)&&PF.post(`//Keywords/Attach/${t}`,{pageIds:o,deletedPageIds:r}).then(e),n.close()}),a),PF.ajax(`//Keywords/RelativesData/${t}?limit=1000`,(t=>{a.checkedIds=i=JSON.parse(t).rows.filter((t=>t.Position>-1)).map((t=>t.PageId)),a.parentPages=Ext.Array.unique(i.map((t=>PF.getParentPages(t).map((t=>t.id)))).concat(i).flat());const e=n.down("treepanel").getStore();e.getRootNode().cascadeBy((t=>{Ext.Array.contains(a.parentPages,t.get("Id"))&&t.set("PSort",!0),Ext.Array.contains(i,t.get("Id"))&&t.set("Checked",!0)})),e.sort("PSort","DESC")}))},PF.showPagesWnd=function(t,e){let n,i=!0;function o(t){return{Name:t,Url:`/en/${t.toLowerCase()}`,expanded:!0}}e.id=e.id||PF.editCfg.id,e.parentPages=e.parentPages||PF.getParentPages(PF.editCfg.parentId).map((t=>t.id)),e.parentPages.push(e.id),e.checkedIds=e.checkedIds||[],e.checkedIds.push(e.id);const r=Ext.widget({xtype:"scombo",name:"CmsSiteId",value:PF.helpCfg.HelpTypeId,rawValue:PF.helpCfg.HelpTypeName,required:!0,onchange:function(t){const e=n.store;e.getRootNode().removeAll(),n.store.proxy.url="/HtmlPage/ListTreeData/?filter=HelpTypeId="+t.value,n.getRootNode().set("Name",t.options[t.selectedIndex].text),n.getRootNode().set("Url",o(t.options[t.selectedIndex].text).Url),e.load()}}),a=Ext.create("Ext.data.TreeStore",{proxy:PF.proxy("/HtmlPage/ListTreeData/?filter=HelpTypeId="+PF.helpCfg.HelpTypeId,{}),model:Ext.define("model_page",{extend:"Ext.data.Model",fields:["Id","PSort","ParentId","id","Name","Url","Href","Checked"]}),autoLoad:!1,listeners:{load:()=>{e.storeOnLoad&&e.storeOnLoad(a),a.getRootNode().cascadeBy((t=>{Ext.Array.contains(e.parentPages,t.get("Id"))&&t.set("PSort",!0),-1!==e.checkedIds.indexOf(t.get("Id"))&&t.set("Checked",!0)})),a.sort("PSort","DESC"),i&&(i=!1,setTimeout((()=>
10n.selectPath("/root/"+e.parentPages.join("/"),"id","/")),1))}}});n=Ext.create("Ext.tree.Panel",{store:a,controller:"HtmlPage",cls:"tree-cell-block",columns:[{width:40,xtype:"checkcolumn",dataIndex:"Checked",hidden:!e.multiSelect,listeners:{checkchange:e.checkchange||Ext.emptyFn}},{dataIndex:"ParentId",header:"Name",renderer:function(t,e,n){return`${n.get("Name")||""}<br/><span class="srow"><u>${n.get("Url")||""}</u></span>`},flex:2,xtype:"treecolumn"}],root:o(PF.helpCfg.HelpTypeName),viewConfig:{stripeRows:!0,loadMask:!0,getRowClass:function(t){const n=PF.rec(t).id;return-1===e.parentPages.indexOf(n)?"":"text-bold"}},listeners:{itemdblclick:function(n,i){return i.id==e.id||(e.multiSelect?i.set("Checked",!i.get("Checked")):confirm(`You are selecting ${i.get("Name")}?`)&&t()),!1}}});const s=Ext.widget({xtype:"pf-wnd",title:e.title||"Choose a page",items:n,tbar:[r],cls:"pfwnd z100k",buttons:[{xtype:"a",cls:"addNew",text:e.okButtonTitle||"Select",handler:t}]});return s.show(),s},PF.getParentPages=function(t){function e(t){return PF.editCfg.allPages.find((e=>e.id===t))}const n=[];let i=e(t);for(;i;)n.push(i),i=e(i.ParentId);return n.reverse(),n},PF.chooseLink=function(t){let e;e=PF.showPagesWnd((function(){const n=e.down("treepanel"),i=PF.rec(n.selModel.getSelection()[0]);if(!i)return alert("Please, select a record.");t({url:`https://paperfree.com/en${i.Url}`,text:i.Name}),e.close()}),{title:"Choose a page for link to"})},PF.initTinySlider=function(t){},PF.tinymceSetup=function(t){let e="",n=[];function i(){return PF.userName||PF.helpCfg.curUser}function o(e){const n=`pfbtn${e+1}`;return a(n),{text:"Type # 1",classes:n,onAction:function(){const e=`<a class="${n}" href="https://paperfree.com">Action</a> `;t.insertContent(e)}}}function r(t){const e=document.createElement("a");e.innerHTML="ACTION";const n=function(t){const e=document.createElement("a");return e.className=t,document.body.appendChild(e),e}(t);return function(t,e){const n=window.getComputedStyle(t);Array.from(n).forEach((t=>e.style.setProperty(t,n.getPropertyValue(t),n.getPropertyPriority(t))))}(n,e),n.parentNode.removeChild(n),e}function a(t){const e=document.getElementsByClassName("mce-"+t)[0];if(!e)return setTimeout((()=>a(t)),500);return e.attachShadow({mode:"open"}).appendChild(r(t))}function s(e){return e.map((e=>({onAction:()=>{var n;(n=e).onlyOne&&-1!=t.getContent().indexOf(n.id)?alert("Only one "+n.id+" template is allowed. Your page is already contain a placeholder "+n.id):t.insertContent(n.id)},text:e.text})))}const l=[];PF.placeholders.length;var c;function d(e){const n=t.selection.getContent({format:"text"}),i=[{type:"textarea",name:"gptResponse",label:"GPT Response: ",enabled:!1}];(e=e.replace("{text}",n))?i.splice(0,0,{type:"textarea",name:"original",label:"Original: ",enabled:!1}):i.push({type:"bar",items:[{type:"input",name:"question",inputMode:"text",placeholder:"Enter a question...",maximized:!0},{type:"button",text:"send",icon:"gpt",name:"send-button"}]});const o=t.windowManager.open({size:"large",title:"Ask GPT to generate content",body:{type:"panel",items:i},initialData:{question:e,original:n},buttons:[{type:"submit",text:"insert"},{type:"custom",text:"regenerate"},{type:"cancel",text:"close"}],onSubmit:()=>{const e=o.getData().gptResponse;e?(t.undoManager.add(),t.insertContent(e),o.close()):r()},onAction:()=>r()});function r(){(e=o.getData().question||e)&&(o.block("Generating GPT content..."),PF.post("//Gpt/rewrite",{request:e}).then((t=>{if(!t.mainResponse)return o.close(),void alert("Error to get GPT response.");var i;i=t.mainResponse,o.setData({gptResponse:i,original:n,question:e})})).finally((()=>{o.unblock()})))}e&&r()}function u(t,e){return{text:t,onAction:()=>d(e)}}function h(t){return t.type=t.menu?"nestedmenuitem":"menuitem",t.menu&&(t.getSubmenuItems=()=>t.menu.filter((t=>!t.hidden)).map((t=>h(t)))),t}l.push({text:"Cards",menu:s(PF.placeholders.filter((t=>t.cards)))}),l.push(...s(PF.placeholders.filter((t=>!t.cards)))),n.push({id:"insertPlaceholders",text:"Placeholder",icon:"pf",menu:l},{id:"insertPaperfreeBlock",text:"Paperfree block",icon:"pf",menu:[{text:"Vertical card",onAction:function(){t.insertContent('<div class="pf-card-vert"><img src="https://st.paperfree.com/img/s/nature.jpg" /><h3>Card title</h3><div class="subtitle">your subtitle</div><p>The bad thing about television is that everybody you see on television is doing something better than what you are doing. Did you ever see anybody on TV like just sliding off the front of the sofa with potato chip crumbs on their face?</p><div class="card-btn"><a class="pfbtn6" href="https://paperfree.com">Action</a> <a class="pfbtn6" href="https://paperfree.com">Action 2</a></div></div>')}},{text:"Navigation Menu",onAction:()=>t.insertContent('<div class="pf-nav-menu">{NavigationMenu}</div>')},{text:"Breadcrumbs",onAction:()=>t.insertContent('<div class="pf-breadcrumbs">{BreadcrumbsMenu}</div>')},{text:"See also",onAction:()=>t.insertContent('<div class="pf-seealso">{SeeAlso}</div>')},{text:"Text to speach player",onAction:()=>t.insertContent('<div class="pf-webreader">{WebReader}</div>')}]},{id:"insertPaperfreeBtns",text:"Button",icon:"pf",menu:(c=5,[...Array(c).keys()].map(o))},{id:"insertPaperFreeForm",text:"Paperfree form",icon:"pf",menu:[{text:"Default forms",onAction:function(){PF.showSelectWnd("CustomForm",{ajCfg:{norent:1},title:"Select Default forms",handler:function(e,n){var i="https://paperfree.com/en/js/"+e.FormKey+"/cform.js";t.insertContent('<script data-tip="Form '+Ext.String.htmlEncode(e.Name)+'" type="text/javascript" src="'+i+'"><\/script>')}})}},{text:"Industry: Car Rental Forms",onAction:function(){PF.showSelectWnd("CrmFormSetting",{title:"Select Industry: Car Rental Forms",handler:function(e,n){var o="https://paperfree.com/js/form.js?lang=en&owner="+i()+"&w="+e.Name+"&www="+e.Name+"&v="+(new Date).getTime()+"&f="+e.Id;t.insertContent('<script data-tip="Form '+Ext.String.htmlEncode(e.Name)+'" type="text/javascript" src="'+o+'"><\/script>')}})}}]},{id:"insertPaperFreeMod",text:"Paperfree components",icon:"pf",menu:[{text:"FAQ list",onAction:function(){t.insertContent('<div class="pf-faq">{PaperFreeModuleFaq_'+i()+"}</div>")}},{text:"Address list",onAction:function(){t.insertContent('<div class="pf-map">{PaperFreeModuleMap_'+i()+"}</div>")}},{text:"Address (map only)",onAction:function(){t.insertContent('<div class="pf-map">{PaperFreeModuleMapOnly_'+i()+"}</div>")}},{text:"Car list",onAction:function(){t.insertContent('<div class="pf-carlist">{PaperFreeModuleCarList_'+i()+"}</div>")}},{text:"Cars slider",onAction:function(){t.insertContent('<div class="pf-carslider">{PaperFreeModuleCarSlider_'+i()+"}</div>")}},{text:"Page news",onAction:function(){var e,n;function o(){var o=n.selModel.getSelection()[0];return o?(t.insertContent('<div class="pf-news" data-usr="'+i()+'" data-pid="'+o.get("Id")+'"><div class="date"></div><div class="pagetitle"></div></div>'),e.close(),!1):alert("Please, select a record.")}e=Ext.widget({xtype:"window",width:700,height:500,autoScroll:!0,title:"Select Parent page",items:n=PF.createTreeGrid({noViewPort:!0,url:"/HtmlPage/ListTreeData/?filter=HelpTypeId="+PF.helpCfg.HelpTypeId,controller:"HtmlPage",items:[{header:"Id #",dataIndex:"Id",width:80,sortable:!1,visible:!1,fixed:!0,flex:0},{dataIndex:"ParentId",sortable:!0,href:'PF.editItem({Id},"HtmlPage", null, PF.getGrid().customEdCfg)',renderer:function(t,e,n){var i=n.raw;return'<a href="javascript:PF.editItem('+Math.abs(i.Id)+",'"+(i.leaf,PF.getControllerName()+"', null, {hid:['ParentId','ParentId']});\">")+i.Name+"</a>"},flex:2,xtype:"treecolumn"},{dataIndex:"id",sortable:!1,visible:!1},{dataIndex:"Name",sortable:!1,visible:!1},{header:"Href",dataIndex:"Href",sortable:!0}]}),buttons:[{xtype:"a",cls:"addNew",text:"ok",handler:o}]}),n.onDblClick=o,e.show()}}]},{id:"insertGoogleIcon",text:"Google material icon",icon:"accessibility-check",onAction:function(){function n(){PF.tinyIconWnd=t.windowManager.open({title:"Add Material icon",width:700,height:600,autoScroll:!0,body:{type:"panel",items:[{type:"htmlpanel",html:e}]},buttons:[]})}e?n():PF.ajax("//Lookups/IconsCombo",(function(t){for(var i=PF.googleIcons=JSON.parse(t),o=i.length,r="",a=0;a<o;a++){var s=i[a];r+='<a data-icon="'+s.Id+'" title="'+s.DisplayName+'" class="pf-icon-blk" onclick="PF.insertIconToEditor(\''+s.Id+'\');"><i class="material-icons md-48">&#x'+s.Id+';</i><br/><div class="pf-icon-blk-text">'+s.DisplayName+"</div>"}e='<div class="pf-iconbox" style="white-space:normal">'+r+"</div>",n()}))}},{id:"templateTitle",text:"HTML code",icon:"pf",onAction:function(){t.windowManager.open({title:"Insert HTML code",body:{type:"panel",items:[{type:"textarea",
10name:"html",label:"HTML code"}]},buttons:[{text:"Close",type:"cancel",onclick:"close"},{text:"Insert",type:"submit",primary:!0}],onSubmit:function(e){t.insertContent(e.getData().html),e.close()}})}},{id:"pfFillColor",text:"FILL COLOR",icon:"pf",context:"edit",onAction:function(){PF.editHtmlPage()}},{id:"pfBackground",context:"edit",icon:"pf",text:"Background",onAction:function(){PF.editHtmlPage()}},{id:"pfSocialGraph",context:"edit",icon:"pf",text:"Social graph",onAction:function(){PF.editHtmlPage(3)}},{id:"pfThemes",icon:"brush",text:"Change theme",hidden:PF.helpCfg.isTemplate,onAction:function(){PF.showThemes()}},{id:"pfEditUrl",icon:"link",text:"Edit URL",hidden:PF.helpCfg.isTemplate,onAction:function(){PF.editPageUrl(PF.helpCfg?.HtmlPageId)}},{id:"pfEditTheme",icon:"palette",text:"Edit theme",hidden:PF.helpCfg.isTemplate,onAction:()=>PF.editHtmlPageTemplate()},{id:"pfHistory",context:"view",icon:"pf",text:"History",onAction:function(){PF.showHtmlPageHistory(PF.helpCfg.HtmlPageId)}},{id:"pfTranslator",context:"tools",icon:"pf",text:"Page translator",onAction:function(){PF.translatePage()}},{id:"pfAction",icon:"pf",text:"Assign Paperfree action",onAction:function(){let t,e=tinyMCE.activeEditor.contentDocument.getSelection();if(!e||!(t=e.anchorNode))return PF.alertError("");t.getAttribute||(t=t.parentElement);const n=t.getAttribute("data-pfaction"),o=PF.showModalWnd({items:[{xtype:"box",html:"Current object - "+t.tagName},{xtype:"scombo",fieldLabel:"Action",name:"action",value:n||"",data:[{Name:"Show floating rent form",Id:"cars-PF.showRentForm(null,this)"}]}],buttons:[{xtype:"a",cls:"pfbtn5",text:"ok",handler:function(){const e=o.down("scombo").getValue();t.setAttribute("data-pfaction",e),e?t.setAttribute("data-usr",i()):t.removeAttribute("data-usr"),o.close()}}],title:"Assign Paperfree action"})}}),n.push(createSliderMenuItem(t)),t.ui.registry.addMenuButton("gpt",{title:"GPT",icon:"gpt",fetch:t=>{t([u("Rewrite","Rewrite\n {text}"),u("Summarize content",'Provide the key points and concepts in this content in a succinct summary (use HTML format and bullet points). Context: \n"""{text}"""'),u("Improve writing",'Rewrite this content with no spelling mistakes, proper grammar, and with more descriptive language, using best writing practices without losing the original meaning: \n"""{text}"""'),u("Simplify language",'Rewrite with simplified language and reduce the complexity of the writing, so that the text is easier to understand: """{text}"""'),u("Expand undo",'Expand upon this content with descriptive language and more detailed explanations, to make the writing easier to understand and increase the length of the content. Content: """{text}"""'),{text:"Change tone",menu:[u("Professional",'Rewrite this content using polished, formal, and respectful language to convey professional expertise and competence. Content: """{text}"""'),u("Casual",'Rewrite this content with casual, informal language to convey a casual conversation with a real person. Content: """{text}"""'),u("Direct",'Rewrite this content with direct language using only the essential information. Content: """{text}"""'),u("Confident",'Rewrite this content using compelling, optimistic language to convey confidence in the writing. Content: """{text}"""'),u("Friendly",'Rewrite this content using friendly, comforting language, to convey understanding and empathy. Content: """{text}"""')]},{text:"Change style",menu:[u("Business",'Rewrite this content as a business professional with formal language. Content: """{text}"""'),u("Legal",'Rewrite this content as a legal professional using valid legal terminology. Content: """{text}"""'),u("Journalism",'Rewrite this content as a journalist using engaging language to convey the importance of the information. Content: """{text}"""')]},u("Enter a custom question","")].map((t=>h(t))))}}),t.ui.registry.addButton("seo",{title:"SEO",tooltip:"Show/hide SEO panel",icon:"seo",onAction:()=>document.querySelector(".sidebar-right").toggle()});for(let e of n.filter((t=>!t.hidden))){let n=h(e);n.menu?t.ui.registry.addNestedMenuItem(n.id,n):t.ui.registry.addMenuItem(n.id,n)}},Ext.define("PF.Bannar",{extend:"Ext.Component",alias:"widget.bannar",setValue:function(t,e){this.value=t},getValue:function(){return this.value},onRender:function(t,e){this.callParent(arguments);const n=this;this.initialConfig;!function t(){if(!window.fabricInitialized)return console.log("init fabric"),PF.loadCss("https://cdn.jsdelivr.net/npm/spectrum-colorpicker2/dist/spectrum.min.css"),PF.loadCss(PF.url("//Scripts/fabricjs-editor/vendor/grapick.min.css")),PF.loadCss(PF.url("//Scripts/fabricjs-editor/style.css")),void PF.loadJSPack(["https://code.jquery.com/jquery-3.5.1.min.js","https://cdnjs.cloudflare.com/ajax/libs/fabric.js/521/fabric.min.js","https://cdn.jsdelivr.net/npm/spectrum-colorpicker2/dist/spectrum.min.js","//Scripts/fabricjs-editor/vendor/grapick.min.js","//Scripts/fabricjs-editor/vendor/undo-redo-stack.js","//Scripts/fabricjs-editor/core.js","//Scripts/fabricjs-editor/toolbar.js","//Scripts/fabricjs-editor/canvas.js","//Scripts/fabricjs-editor/shapes.js","//Scripts/fabricjs-editor/freeDrawSettings.js","//Scripts/fabricjs-editor/canvasSettings.js","//Scripts/fabricjs-editor/selectionSettings.js","//Scripts/fabricjs-editor/drawingLine.js","//Scripts/fabricjs-editor/drawingPath.js","//Scripts/fabricjs-editor/drawingText.js","//Scripts/fabricjs-editor/tip.js","//Scripts/fabricjs-editor/upload.js","//Scripts/fabricjs-editor/copyPaste.js","//Scripts/fabricjs-editor/utils.js","//Scripts/fabricjs-editor/zoom.js","//Scripts/fabricjs-editor/saveInBrowser.js"]).then((()=>{console.log("scripts loaded"),window.fabricInitialized=!0,jQuery.fn.outerHTML=function(){return jQuery("<div />").append(this.eq(0).clone()).html()},Number.prototype.countDecimals=function(){return Math.floor(this.valueOf())===this.valueOf()?0:this.toString().split(".")[1].length||0}})).then(t);n.editor=new ImageEditor(`#${n.el.dom.id}`)}()},addText:function(){this.canvas.add(new fabric.IText("Any text or {Placeholder}",{fontFamily:"Open Sans",left:300,top:200,fill:"white"}))},addImage:function(t){const e=this;fabric.Image.fromURL(t,(t=>{e.canvas.add(t)}))},addLine:function(){this.canvas.add(new fabric.Line([50,100,200,200],{left:170,top:150,stroke:"red"}))},addRect:function(){this.canvas.add(new fabric.Rect({left:100,top:100,fill:"red",width:20,height:20}))},getJson:function(){return this.editor.getCanvasJSON()}}),PF.bannarDesigner=function(){const t=Ext.widget("bannar");PF.newWnd(t,{title:"Bannar Designer",autoScroll:!0,addButtons:[{text:"download image",handler:()=>{window.open(PF.url("//Bannar/Preview?img="+encodeURIComponent(JSON.stringify(t.getJson()))))}}]}).show(this)},function(){let t;PF.initCMSProperties=function(){t=document.createElement("div"),t.className="pf-page-more",t.innerHTML='<div class="pf-label">\n              <label><i class="material-icons" data-tooltip="The Placeholder is {Headline}.">&#xE88E;</i>Headline:</label>\n              <textarea rows="2" type="text" placeholder="Write the excellent name for the article" id="prop_Headline"></textarea>\n          </div>\n      <div class="pf-label">\n          <label><i class="material-icons" data-tooltip="The Placeholder is {SubHeadline}.">&#xE88E;</i>Subheadline:</label>\n          <textarea rows="2" type="text" placeholder="add a sub headline" id="prop_SubHeadline"></textarea>\n      </div>\n  <div id="pageProperties"></div>\n';const e=document.querySelector("main");e.insertBefore(t,e.firstChild)},PF.updatePageProperties=function(t){for(let e of document.querySelectorAll('[id^="prop_"]')){const n=e.id.substring(5);t[n]&&(e.value=t[n])}PF.updateMeta(t.Meta)},PF.getPageProperties=function(){const t={};for(let e of document.querySelectorAll('[id^="prop_"]')){t[e.id.substring(5)]=e.value}return t},PF.updateMeta=function(t){const e=document.createElement("head");e.innerHTML=t;const n=["keywords","pf:"];for(let t of e.querySelectorAll("meta")){const e=(t.name||"").toLowerCase();if(-1===n.indexOf(e))continue;const i=window.top.document.querySelector(`meta[name='${e}']`);i?PF.replace(i,t.outerHTML):window.top.document.head.innerHTML+=t.outerHTML}},document.querySelector(".pf-page-more")||PF.initCMSProperties()}(),PF.afterOnTinyMceLoaded=function(){tinymce.init(tinymce._settings);var t=PF.$("editHtmlButton");t&&t.classList.remove("disabled")},PF.insertIconToEditor=function(t){tinymce.activeEditor.insertContent('<i class="material-icons">&#x'+t+";</i>"),PF.tinyIconWnd.close()},PF.noTinyInit=!0,PF.onItemCtxMenu=function(t){PF.menuC||PF.initCtxMenu();var e=PF.menuC;t.preventDefault(),e.currId=this.getAttribute("data-itemid");var n=Ext.get(this);e.currentEl=this;var i=n.getXY();i[0]+=t.offsetX,i[1]+=t.offsetY,e.showAt(i)},PF.initCtxMenu=function(){var t=PF.menuC=new Ext.menu.Menu({x:100,items:[{icon:PF.getIconFullPath("add"),text:"Add child",handler:function(){PF.addCmsChild(t.currId)}},{icon:PF.getIconFullPath("add"),text:"add few childs",handler:function(){PF.addFewCmsChild(t.currId)}},{icon:PF.getIconFullPath("pencil"),text:"Edit",handler:function(){var e=t.currentEl.getElementsByTagName("a")[0],n=t.currId;PF.editPageName(n,e)}},{icon:PF.getIconFullPath("delete"),text:"Remove",handler:function(){PF.removePage(t.currId)}}]})},PF.navigateTo=function(t){PF.releaseUnload();const e=window.location.pathname.split("/")[2],n=(PF.siteRoot+"en/"+e+"/"+t).trimEnd("/");n!==window.location?window.location=n:window.location.reload(!0)};let addCmsChildShown=!1;PF.addCmsChild=function(t){window.open(PF.url(`//HtmlPage/CreateDraft/${t}?siteId=${PF.helpTypeId||PF.helpCfg.HelpTypeId}`))},PF.removePage=function(t){const e=PF.findPageById(t),n=e?.text||document.querySelector('[data-itemid="'+t+'"] a')?.textContent;PF.removeItem(t,"HtmlPage",{itemName:n,postFnc:function(){PF.releaseUnload(),window.location.reload(!0)}})},PF.editPage=function(t){return t==PF.editCfg.id?PF.onEditSaveButtonClick():PF.openEditPageInNewTab(t),t},PF.getPageUrl=function(t){return document.querySelector(`div[data-itemid="${t}"] > a.menuItem3`)?.href||PF.editCfg.allPages.find((e=>e.id==t))?.url},PF.openEditPageInNewTab=function(t){const e=PF.getPageUrl(t);window.open(e+"?edit=1",`page${t}`)},PF.editPageName=function(t){if(!t)return alert("Cannot edit this item");var e=document.querySelector('[data-itemid="'+t+'"] a'),n=prompt("Change tooltip",e.textContent);n&&PF.ajax("//HtmlPage/UpdateNode/"+t,(function(){PF.showInfoMsg("Saving successfully completed."),e.textContent=n}),{cfg:{text:n,lang:"en"}})},PF.editPageUrl=function(t){if(!t)return alert("Cannot edit this item");const e=PF.findPageById(t);if(e&&0===e.src.toLowerCase().indexOf("mainhelp_"))return;const n=e?.src||document.querySelector('[data-itemid="'+t+'"]')?.getAttribute("data-url"),i=prompt("Change tooltip",n);i&&PF.ajax("//HtmlPage/AddUpdate/"+t,(function(t){PF.showInfoMsg("Saving successfully completed."),window.location.reload(!0)}),{cfg:{changes:["Id="+t,"Href="+i]}})},PF.addFewCmsChild=function(t){function e(n){var i=n.split("\n"),o=0;if(o>=i.length)return window.location.reload();var r=Ext.String.trim(i[o++]||"");if(!r)return e(n);PF.ajax("//HtmlPage/AddUpdate",e,{cfg:{changes:PF.serializePFObject({HelpTypeId:PF.helpTypeId||PF.helpCfg.HelpTypeId,Name:r,ParentId:t,Href:makeTranslit(r)})}})}Ext.Msg.prompt("Specify a name for the new element","Enter the elements, each new - a new line.",(function(t,n){"ok"===t&&e(n)}),this,!0,"New item 1 \r\nNew item 2")},PF.initNavigationContextMenu=function(t){var e=document.getElementsByClassName("navMenu")[0];if(e)for(var n=e.getElementsByClassName("menuItem"),i=n.length;i--;){n[i].parentNode.oncontextmenu=PF.onItemCtxMenu}},PF.showCMSMenu=function(t){t.popup?t.popup.show():PF.popup({el:t,allowReplace:!0,floatLeft:!0,top:20,addToBody:!0,cls:"pf-menu",src:PF.url("//HtmlPage/CmsEditMenu/"),width:210})},PF.htmlDrop=function(t){var e=t.target,n=PF.dragEl;if("A"===e.tagName&&(e=e.parentNode),PF.dragLine&&(Ext.get(PF.dragLine).destroy(),delete PF.dragLine),PF.dragDown&&(Ext.get(PF.dragDown).destroy(),delete PF.dragDown),n)if(delete PF.dragEl,e!==n&&"DIV"===e.tagName){var i=e.getAttribute("data-parentid"),o=parseInt(e.getAttribute("data-pos")),r=n.getAttribute("data-itemid"),a=n.getAttribute("data-parentid"),s=e.nextSibling,l=s?parseInt(s.getAttribute?s.getAttribute("data-pos"):0):0,c=t.offsetX>150;if(i!=a){var d=document.querySelector('div[data-itemid="'+i+'"]'),u=document.querySelector('div[data-itemid="'+a+'"]');if(!confirm(Ext.String.format('Are you sure to move {0} from Parent "{1}" to "{2}"?',n.textContent,u?u.textContent:"TOP",d?d.textContent:"TOP")))return}c?(n.parentNode.removeChild(n),i=e.getAttribute("data-itemid")):i!=a?n.parentNode.removeChild(n):e.parentNode.insertBefore(n,e.nextSibling),PF.updatePageParent(r,i,o,l),delete n._nextSiblign}else e.parentNode.insertBefore(n,n._nextSiblign)},PF.updatePageParent=function(t,e,n,i,o,r){n||(n=1e12);var a={Id:t,ParentId:e,Position:i?n+Math.max(i-n,100)/2:n/1e12*1e12+((new Date).getTime()-new Date(2013,1,1).getTime())};r&&(a.HelpTypeId=r),PF.ajax("//HtmlPage/AddUpdate",o,{cfg:{changes:PF.serializePFObject(a)}})},PF.htmlDragEnd=function(t){PF.dragLine&&(Ext.get(PF.dragLine).destroy(),delete PF.dragLine),PF.dragDown&&(Ext.get(PF.dragDown).destroy(),delete PF.dragDown)},PF.htmldropOver=function(t){var e=t.target,n=PF.dragEl;if("A"===e.tagName&&(e=e.parentNode),e!==n&&"DIV"===e.tagName){if(t.preventDefault(),!PF.dragLine)(PF.dragLine=document.createElement("div")).className="dragline";if(e.parentNode.insertBefore(PF.dragLine,e.nextSibling),t.offsetX>
10150){if(!PF.dragDown){var i=PF.dragDown=document.createElement("div");i.innerHTML=e.textContent,i.className="dragdown"}e.parentNode.insertBefore(PF.dragDown,PF.dragLine)}else PF.dragDown&&(Ext.get(PF.dragDown).destroy(),delete PF.dragDown)}},PF.htmlStartDrag=function(t){var e=t.target;"A"===e.tagName&&(e=e.parentNode),PF.dragEl=e,e._nextSiblign=e.nextSibling},PF.autoResizeDivs=function(){for(var t=document.querySelectorAll(".auto-size"),e=t.length;e--;){var n=t[e],i=n.getAttribute("data-sheight");if(void 0!==i){var o=window.innerHeight-(0|i);n.style.height=o+"px"}}},window.addEventListener("resize",PF.autoResizeDivs),PF.initMainMenuEdit=function(t,e){var n=document.getElementsByClassName("navMenu")[0];if(n){for(var i=n.classList.contains("menu-left"),o=document.querySelectorAll(".navMenu .pf-item"),r=o.length,a=n.getElementsByClassName("back")[0];r--;){var s=o[r],l=s.getAttribute("data-itemid");if(l){var c=PF.findArrayItem(t.allPages,"id",l);c&&(s.setAttribute("data-pos",c.Position),s.setAttribute("data-parentid",c.ParentId),s.setAttribute("data-url",("#"===c.src[0]?c.src.substring(1):c.src)||""),s.insertAdjacentHTML("beforeEnd",'<a onclick="PF.showCMSMenu(this);" data-id="'+l+'" class="pf-cfg"><i class="material-icons">more_vert</i></a>'),c.createdById&&s.insertAdjacentHTML("afterBegin",`<div class="avatarDiv small"><img src="/User/ClientAvatar/${c.createdById}"></div>`),i&&(s.ondrop=PF.htmlDrop,s.ondragend=PF.htmlDragEnd,s.ondragover=PF.htmldropOver,s.ondragstart=PF.htmlStartDrag,s.setAttribute("draggable",!0)))}}a&&(a.setAttribute("data-itemid",e.id),a.setAttribute("data-parentid",e.parentId),a.ondrop=PF.htmlDrop,a.ondragend=PF.htmlDragEnd,a.ondragover=PF.htmldropOver,a.ondragstart=PF.htmlStartDrag,a.setAttribute("draggable",!0)),PF.initNavigationContextMenu(PF.helpCfg)}},function(){for(var t=document.getElementsByTagName("script"),e=0,n=t.length;e<n;e++){var i=/v=(\d+)/.exec(t[e].src);if(i&&i[1]){PF.currVersion=i[1];break}}PF.placeholders=[{text:"{Title} - page title",id:"{Title}"},{text:"{Headline} - page second title",id:"{Headline}"},{text:"{SubHeadline} - page sub headline",id:"{SubHeadline}"},{text:"{MainContent} - the page main content",id:"{MainContent}",onlyOne:!0},{text:"{LastUpdate} - Last modified page",id:"{LastUpdate}"},{text:"{SubItems} - list menu of current sub items",id:"{SubItems}"},{text:"{AvatarImage} - the Paperfree 100x100 avatar image.",id:"{AvatarImage}"},{text:"{AvatarImageUrl} - the Paperfree 100x100 avatar image. URL only.",id:"{AvatarImageUrl}"},{text:"{ImageFacebook} - the Facebook open graph image.",id:"{ImageFacebook}"},{text:"{ImageFacebookUrl} - the Facebook open graph image. URL only.",id:"{ImageFacebookUrl}"},{text:"{ImageTwitter} - the Twitter open graph image.",id:"{ImageTwitter}"},{text:"{ImageTwitterUrl} - the Twitter open graph image. URL only.",id:"{ImageTwitterUrl}"},{cards:!0,text:"{ListOfCards} - list menu of children sub items",id:"{ListOfCards}"},{cards:!0,text:"{ListOfCards /cms_like_market/url} - list menu of children sub items by URL",id:"{ListOfCards /"},{cards:!0,text:"{ListOfCardsBig /cms_like_market/url} - list menu of children sub items by URL (big cards)",id:"{ListOfCardsBig /"},{cards:!0,text:"{SubItemsWithChildren} - list menu of current sub items with its children",id:"{SubItemsWithChildren}"},{cards:!0,text:"{SubItemsWithChildrenCards} - list menu of children sub items with its children cards",id:"{SubItemsWithChildrenCards}"},{cards:!0,text:"{ListOfButtons /cms_like_market/url} - buttons row of children like buttons",id:"{ListOfButtons}"},{text:"{Description} - page main description",id:"{Description}"},{text:"{ForSocialDescription} - page description for Social Services (From Social Graph)",id:"{ForSocialDescription}"},{text:"{Keyword1} - The first keyword",id:"{Keyword1}"},{text:"{Keyword2} - The second keyword",id:"{Keyword2}"},{text:"{Keyword3} - The third keyword",id:"{Keyword3}"},{text:"{KeywordX} - The X keyword",id:"{Keyword"},{text:"{PublishedDate} - The published date",id:"{PublishedDate}"},{text:"{ListOfCardsByKeyword1} - Display list of cards for keyword #1",id:"{ListOfCardsByKeyword1}"},{text:"{ListOfCardsByKeyword2} - Display list of cards for keyword #1",id:"{ListOfCardsByKeyword2}"},{text:"{ListOfCardsByKeyword3} - Display list of cards for keyword #1",id:"{ListOfCardsByKeyword3}"},{text:"{ListOfCardsByKeyword4} - Display list of cards for keyword #1",id:"{ListOfCardsByKeyword4}"},{text:"{ListOfCardsByKeyword5} - Display list of cards for keyword #1",id:"{ListOfCardsByKeyword5}"},{text:"{ListOfRecommendedCardsByKeywords} - Display list of Recommended cards",id:"{ListOfRecommendedCardsByKeywords}"},{text:"{GoogleAdsBanner} - The Google ADS banner",id:"{GoogleAdsBanner}"}],PF.initPlaceholders=function(t,e){var n=t.ownerDocument,i=e.placeholders.slice(0),o=i.length;if(o){var r,a=n.defaultView||n.parentWindow,s=n.createElement("div");s.className="pf_popup pf-acomplete-popup",s.setAttribute("style","min-height:100px;display:none;");for(var l=n.createElement("ul"),c=0;c<o;c++){var d=n.createElement("li"),u=i[c];Ext.isObject(u)?i[c]=u.id:u={text:u,id:u},d.className="pf-acomplete",d.innerHTML=u.text,d.onclick=p,d.placeholder=u.id,l.appendChild(d)}s.appendChild(l),t==n.body?t.parentNode.appendChild(s):n.body.appendChild(s),t.addEventListener("click",h),t.addEventListener("keydown",(function(t){var e=t.which||t.keyCode,n=38==e,i=""==s.style.display;
10if((n||40==e||13==e)&&i){t.stopPropagation(),t.preventDefault();var o,r=s.querySelector(".pf-acomplete.sel:not(.hid)");if(13==e)return void(r&&p.call(r));if(r&&r.classList){o=r;var a=(n?"previous":"next")+"ElementSibling";do{o=o[a]}while(o&&o.classList.contains("hid"))}else o=s.querySelector(".pf-acomplete:not(.hid)"+(n?":last-child":""));if(!o||o.classList.contains("hid"))return;r&&r.classList.remove("sel"),o.classList.add("sel")}})),t.addEventListener("keyup",(function(e){var l=function(){if(void 0!==a.getSelection){var t=a.getSelection();if(0==t.rangeCount)return"";var e=r=t.getRangeAt(0),i=e.endContainer.nodeValue;return i?i.substring(0,e.endOffset):i}if(void 0!==n.selection&&"Control"!=n.selection.type){var o=n.selection.createRange(),s=n.body.createTextRange();return s.moveToElementText(o.startContainer),s.setEndPoint("EndToEnd",o),s.text}return""}();if(l){if(e.ctrlKey||e.altKey)return h();for(var c=[],d=0;d<o;d++){var u=i[d],p=l.lastIndexOf(u[0]);if(-1!=p){var f=l.slice(p);0==u.indexOf(f)&&c.push(d)}}!function(e){if(0==e.length)return h();var i,o=s.querySelectorAll("li"),r=o.length;for(i=0;i<r;i++)o[i].classList.add("hid");for(i=0,r=Math.min(e.length,20);i<r;i++)o[e[i]].classList.remove("hid");var l=function(t,e,i){e=e||0,i=i||0;var o=0,r=0;t&&(o=0,r=0);var s,l={left:0,top:0};if(n.selection)s=n.selection.createRange(),l.left=s.offsetLeft+e-o+"px",l.top=s.offsetTop+i-r+"px";else if(a.getSelection){s=a.getSelection().getRangeAt(0).cloneRange();try{s.setStart(s.startContainer,s.startOffset-1)}catch(t){}var c=s.getBoundingClientRect();if(0==s.endOffset||""===s.toString())if(s.startContainer==t)if(0==s.endOffset)l.top="0px",l.left="0px";else{var d=s.cloneRange();d.setStart(d.startContainer,0);var u=d.getBoundingClientRect();l.left=u.left+e-o+"px",l.top=u.top+u.height+i-r+"px"}else l.top=s.startContainer.offsetTop+"px",l.left=s.startContainer.offsetLeft+"px";else l.left=c.left+c.width+e-o+"px",l.top=c.top+i-r+"px"}return l}(t);s.style.top=parseInt(l.top)+30+"px",s.style.left=l.left,s.style.display="";var c=s.getBoundingClientRect().top-(0|parseInt(s.style.top));s.style.top=parseInt(l.top)+30-c+"px"}(c)}}))}function h(){s.style.display="none"}function p(){var e=this.placeholder;h();var n=r,i=n.endContainer.nodeValue,o=i.substring(0,n.endOffset),s=o.lastIndexOf(e[0]);n.endContainer.nodeValue=o.substring(0,s)+e+" "+i.substring(n.endOffset),n.setStart(n.endContainer,s+e.length+1),n.setEnd(n.endContainer,s+e.length+1),t.focus();var l=a.getSelection();l.removeAllRanges(),l.addRange(n)}},Ext.onReady((function(){const t=PF.helpCfg||{},e=Ext.get("htmlEditorCtl"),n=document;let i=!1;function o(e,i){if("undefined"==typeof tinyMCE)return window.setTimeout((()=>o(e,i)),50);n.getElementById("templateHtml").style.display=i?"":"none",n.getElementById("htmlEditor").style.display=i?"none":"";const r=tinyMCE.get("htmlEditorCtl");if(r){const o=r.getContent();if(e&&i&&n.getElementById("templateHtml").innerHTML!==o&&-1===function(){PF.removeGoogleTranslate();const e=tinyMCE.get("htmlEditorCtl"),i=document.getElementsByClassName("sidebar-right")[0].getElementsByTagName("iframe")[0].contentDocument,o=i.getElementById("searchTitle"),r=i.getElementById("useThemeTitle"),a=function(t){const e=PF.replaces;if(!e||!e.length)return t;let n=e.length;for(;n--;){let i=e[n];t=t.split(i.from).join(i.to)}return t}(e.getContent()),s=!t.HtmlPageId;let l=null;if(n.getElementById("templateHtml").innerHTML=a,s){if(l=prompt("Name of the new page:",o.value),!l)return-1;o.value=l,t.HtmlPageName=makeTranslit(l)}html2canvas(n.body);let c=PF.getPageProperties(),d=Ext.apply(c,{id:t.HtmlPageId,name:o?o.value:t.HtmlPageName,lang:"en",helpTypeId:PF.helpTypeId||t.HelpTypeId,newHtml:a,isNew:s,isMaster:t.isTemplate,newName:l,templateId:t.templateId,useThemeTitle:r?r.checked:null,shortTitle:(u="shortTitle",i.getElementById(u)?.value||null),fullHtml:document.documentElement.innerHTML,published:!1!==i.querySelector("#cbIndexPage input").checked?1:0});var u;return i.defaultView.getSaveParams&&(d=Object.assign(i.defaultView.getSaveParams(),d)),PF.ajax(t.UpdateUrl||PF.url("UpdateHtmlPage/","HtmlPage"),(function(t){PF.showInfoMsg("Saving successfully completed."),PF.releaseUnload();const e=Ext.decode(t);if(e.Id>0){const t=e.Url?e.Url:window.location;document.querySelector("head").insertAdjacentHTML("beforeend",'<meta http-equiv="Expires" content="-1">'),window.location=t}}),{post:!0,cfg:d}),!0}())return}Ext.getBody()[i?"removeCls":"addCls"]("pf-edit")}function r(){if(!tinyMCE.activeEditor?.contentDocument?.body?.ownerDocument)return window.setTimeout(r,100);PF.initPlaceholders(tinyMCE.activeEditor.contentDocument.body,{placeholders:PF.placeholders}),PF.initTinySlider(tinyMCE.activeEditor.contentDocument)}function a(){if(PF.seoSitebar)return;const e=PF.seoSitebar=document.createElement("div");e.className="sidebar-right","1"!==PF.lsGet("seo_t")&&e.classList.add("bottom"),e.innerHTML=`<div class="sidebar-inner"><iframe src="/HtmlPage/EditItem/${t.HtmlPageId}?lang=en&seo=1&small=1" style="width:100%;height:100%;border:none" border="no"></iframe></div>`,document.getElementsByTagName("main")[0].appendChild(e),function(t){const e=document.createElement("div");e.classList="dragbar",t.insertBefore(e,t.firstChild);const n=n=>{document.selection?document.selection.empty():window.getSelection().removeAllRanges();const i=window.innerWidth-n.pageX-e.offsetWidth/2;t.style.width=i+"px",PF.lsSet("seo_width",i)},i=()=>{document.body.classList.remove("pf-drag"),document.removeEventListener("mousemove",n),t.doLayout()},o=()=>{const e=PF.lsGet("seo_width");!e||e>window.innerWidth||(t.style.width=e+"px")},r=()=>{("0"===PF.lsGet("seo")||PF.isMobile())&&t.classList.add("hidden")};e.addEventListener("mousedown",(t=>{t.preventDefault(),document.body.classList.add("pf-drag"),document.addEventListener("mousemove",n)})),e.addEventListener("mouseup",i),t.addEventListener("mouseup",i),document.addEventListener("mouseup",i),o(),r()}(e),function(t){const e=document.createElement("button");e.classList="draghide",t.insertBefore(e,t.firstChild),e.onclick=()=>
10{t.toggle(),PF.lsSet("seo",t.classList.contains("hidden")?"0":"1")}}(e),function(t){const e=document.createElement("button");e.classList="pin",t.insertBefore(e,t.firstChild),e.onclick=()=>{t.classList.toggle("bottom"),PF.lsSet("seo_t",t.classList.contains("bottom")?"0":"1")}}(e),function(){let e=document.querySelector(".pf-savebar")||document.createElement("div");e.className="pf-savebar shadow",e.innerHTML=`<a id="cancelEditHtmlButton" onclick="PF.cancelEditClick(this)"><i class="material-icons"></i></a>\n            <div class="pf-info"><div class="avatarDiv"><img src="/User/ClientAvatar/${t.employeeId}" /></div>\n            ${t.employeeName}\n            <div><b>Parent:</b><br/><a onclick="PF.movePageTo(${t.HtmlPageId}, this.firstChild);">${function(){const t=PF.getParentPages(PF.editCfg.parentId);if(!t.length)return"<span>TOP</span>";const e=t.map((t=>t.text)).join(" > ");return`<span data-qtip="${PF.htmlEncode(e)}"> ${t[t.length-1]?.text}</span>`}()}</a></div>            \n            </div>\n<a class="addNew" style="text-transform:uppercase" id="saveHtmlButton" onclick="PF.onEditSaveButtonClick(true)">Save</a>`,e.parentNode||document.getElementsByTagName("main")[0].insertAdjacentElement("afterend",e)}(),setInterval((()=>function(t){const e=t.querySelector("iframe")?.contentDocument;if(!e)return;if(t.classList.contains("bottom")){const n=e.querySelector("#mainDiv");n&&(n.style.position="static",t.style.height=e.documentElement.scrollHeight+"px",n.style.position="")}else delete t.style.height}(e)),1e3),e.toggle=()=>{e.classList.toggle("hidden"),e.doLayout(),e.classList.contains("hidden")||document.querySelector(".sidebar-right").scrollIntoView({behavior:"smooth",block:"start"})},e.doLayout=()=>setTimeout((()=>e.querySelector("iframe").contentWindow.Ext?.ComponentQuery.query("panel").forEach((t=>t.doLayout()))),500)}function s(){function n(n){t.rec=Ext.decode(n)||{},function(t){e.dom.value=t;var n=tinyMCE.get("htmlEditorCtl");n&&n.initialized&&n.setContent(t);PF.reinitplugs&&PF.reinitplugs();r()}(t.rec.Html||""),PF.updatePageProperties(t.rec),a()}i=!0,t.HtmlPageName?PF.ajax("//HtmlPage/EditHtmlPage/"+t.HtmlPageId,n,{cfg:{helpTypeId:PF.helpTypeId,name:encodeURIComponent(t.HtmlPageName),lang:"en"}}):PF.ajax("//HtmlPage/LoadHtmlPageEditInfo/"+t.HtmlPageId,n,{cfg:{typeId:0|PF.helpCfg.HelpTypeId,lang:"en"}})}function l(){if(!window.tinymce)return window.setTimeout(l,100);for(var t=window.innerHeight,e=n.getElementsByClassName("tinymce"),i=0,o=e.length;i<o;i++){var r=n.getElementById(e[i].id+"_ifr");if(!r)return window.setTimeout(l,100);r.style.height=t-r.offsetTop-105+"px"}}PF.onEditSaveButtonClick=function(t){if("undefined"==typeof tinyMCE||void 0===tinyMCE.activeEditor?.serializer)return window.setTimeout((()=>PF.onEditSaveButtonClick(t)),50);"scrollRestoration"in history&&(history.scrollRestoration="manual"),i||s(),PF.blockUnload();var e=n.getElementById("aShowMMenu"),r=n.getElementsByClassName("navMenu")[0];e&&r&&0===r.offsetLeft&&e.onclick(),o(!0,t),l();const a=n.querySelector("#htmlEditor").getBoundingClientRect();window.top.scrollTo({top:a.top-60})},PF.cancelEditClick=function(){PF.releaseUnload(),o(!1,!0);var t=document.getElementsByClassName("pf-themes")[0];t&&t.classList.remove("shown")},function(){var t=document,e=t.getElementsByClassName("pf-car"),n=e.length;function i(){PF.editItem(this.carId,"VehicleClass",null,{postFnc:function(t){PF.ajax("//HtmlPage/ClearHtmlPageCache/"+PF.helpCfg.HtmlPageId,(function(){window.location.reload(!0)}),{cfg:{helpTypeId:PF.helpCfg.HelpTypeId}})}})}function o(e){var n=t.createElement("a");return n.className="addNew"+(e?" pf-leftbtn":""),n.innerHTML=e?"Edit":"Add",n.onclick=i,n.carId=e,n}var r=t.getElementsByClassName("pf-carlist")[0];for(r&&r.insertBefore(o(null),r.firstChild);n--;){var a=e[n],s=0|a.getAttribute("data-id");s&&a.insertBefore(o(s),a.firstChild)}}(),e.setHeight(Ext.getBody().getHeight()-105),Ext.QuickTips.init(),PF.initTinyMce(PF.afterOnTinyMceLoaded),window.onresize=l,l(),PF.updateCurrLang();const c=PF.editCfg;c?PF.initMainMenuEdit(c,c):PF.initNavigationContextMenu(PF.helpCfg),function(){var t=n.getElementsByClassName("navMenu .back")[0],e=n.getElementById("addNewPage");const i=0|t?.getAttribute("data-itemid")||0;e&&(e.setAttribute("onclick",`PF.addNewPage(${i})`),e.classList.remove("disabled"))}()})),PF._newWnd=PF.newWnd,PF.newWnd=function(t,e,n){var i=document.body;i.classList.add("pf-masked");var o=PF._newWnd.call(this,t,e,n);return o.on("close",(function(){i.classList.remove("pf-masked")})),o}}();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.