/* Stimulsoft.Reports.JS ES5 Version: 2020.4.1 Build date: 2020.08.07 License: https://www.stimulsoft.com/en/licensing/reports */ var __extends=this&&this.__extends||function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),__values=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],i=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Stimulsoft,Stimulsoft,Stimulsoft,Stimulsoft,Stimulsoft,Stimulsoft,Stimulsoft,Stimulsoft,Stimulsoft,Stimulsoft,Stimulsoft,Stimulsoft,Stimulsoft,Stimulsoft,Stimulsoft,Stimulsoft,Stimulsoft,Stimulsoft,Stimulsoft,Stimulsoft,Stimulsoft;!function(t){var e;!function(e){var r;!function(r){var i=t.Report.Export.StiExportService,n=t.System.IO.StreamWriter,o=t.Base.Localization.StiLocalization,a=function(t){function i(){var e=null!==t&&t.apply(this,arguments)||this;return e.multipleFiles=!1,e}return __extends(i,t),i.prototype.implements=function(){return[r.IStiCsvExportService]},Object.defineProperty(i.prototype,"defaultExtension",{get:function(){return"csv"},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"exportFormat",{get:function(){return e.StiExportFormat.Csv},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"groupCategory",{get:function(){return"Data"},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"position",{get:function(){return r.StiExportPosition.Data},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"exportNameInMenu",{get:function(){return o.get("Export","ExportTypeCsvFile")},enumerable:!1,configurable:!0}),i.prototype.exportTo=function(t,e,i){this.exportCsv(t,e,i.stimulsoft.as(r.StiDataExportSettings))},i.prototype.exportToAsync=function(t,e,r,i){var n=this;setTimeout((function(){n.exportTo(e,r,i),t()}))},Object.defineProperty(i.prototype,"getFilter",{get:function(){return o.get("FileFilters","CsvFiles")},enumerable:!1,configurable:!0}),i.prototype.exportCsv=function(t,i,o){if(e.StiLogService.write(this.stimulsoft.getType(),"Export report to Csv format"),null==o)throw new Error("The 'settings' argument cannot be equal in null.");var a=o.pageRange,s=o.separator,l=o.encoding,m=o.skipColumnHeaders,c=o.dataExportMode;"\\t"==s&&(s="\t");var p=a.getSelectedPages(t.renderedPages);this.currentPassNumber=0,this.maximumPassNumber=3;var g=new r.StiMatrix(p,!1,this,null,c);if(g.scanComponentsPlacement(!1),this.isStopped)return;if(g.prepareDocument(this,c),this.writer=new n(i,l),!m){for(var h=0;h"),this.htmlWriter.writeLine(),this.htmlWriter.indent++,this.htmlWriter.writeFullBeginTag("head"),this.htmlWriter.writeLine(),this.htmlWriter.indent++,this.htmlWriter.writeFullBeginTag("title"),this.htmlWriter.write(this.report.reportAlias),this.htmlWriter.writeEndTag("title"),this.htmlWriter.writeLine(),this.htmlWriter.writeBeginTag("meta"),this.htmlWriter.writeAttribute("charset",e.webName),this.htmlWriter.writeEndTag("meta"),this.htmlWriter.writeLine(),this.htmlWriter.indent--,this.htmlWriter.writeEndTag("head"),this.htmlWriter.writeLine(),this.htmlWriter.writeBeginTag("body"),this.htmlWriter.writeAttribute("bgcolor",n.toHtml(o.lightBlue)),this.htmlWriter.writeAttribute("style","text-align:center;"),this.htmlWriter.write(">"),this.htmlWriter.indent++,this.htmlWriter.writeLine()},l.prototype.renderEndDoc=function(){this.htmlWriter.indent--,this.htmlWriter.writeEndTag("body"),this.htmlWriter.indent--,this.htmlWriter.writeLine(),this.htmlWriter.writeEndTag("html")},l.prototype.exportHtml=function(r,n,o){var a,s;if(e.StiLogService.write(this.stimulsoft.getType(),"Export report to Html format"),null==o)throw new Error("The 'settings' argument cannot be equal in null.");var l=o.pageRange;this.imageFormat=o.imageFormat,this.imageResolution=o.imageResolution,this.imageQuality=o.imageQuality,this.compressToArchive=o.compressToArchive;var m=o.continuousPages;this.htmlWriter=n;var c=o.pageRange.getSelectedPages(r.renderedPages);try{if(this.report=r,1==this.renderAsDocument&&this.renderStartDoc(c,o.encoding),!(t.Base.izjrG.dVOOk.TvUDM()||(t.Base.izjrG.dVOOk.ekkVf()||t.Base.izjrG.dVOOk.yoidW())&&t.System.NodeJs.isStandaloneVersion)){var p=i.format("{3}{0}{2}{4}{1}",String.fromCharCode(114),String.fromCharCode(108),String.fromCharCode(105),String.fromCharCode(84),String.fromCharCode(97));n.write('
"+"Stimulsoft Reports - "+p+" Version
")}this.htmlWriter.indent=0;var g=1;try{for(var h=__values(c.list),w=h.next();!w.done;w=h.next()){var u=w.value;this.invokeExporting(u,c,0,1);var d={ref:g};this.renderPage(r,u,d),g=d.ref,m&&this.htmlWriter.write("
"),this.htmlWriter.writeLine()}}catch(t){a={error:t}}finally{try{w&&!w.done&&(s=h.return)&&s.call(h)}finally{if(a)throw a.error}}1==this.renderAsDocument&&this.renderEndDoc(),this.htmlWriter.flush()}finally{r=null}},l}(r.StiExportService);r.StiHtml5ExportService=s}(r=e.Export||(e.Export={}))}(e=t.Report||(t.Report={}))}(Stimulsoft||(Stimulsoft={})),function(t){var e;!function(e){var r;!function(r){var i=t.System.StiArray,n=t.System.StiString,o=t.Report.Dashboard.StiDashboardExport,a=t.Report.Dashboard.IStiDashboard,s=t.System.Collections.Hashtable,l=t.System.Drawing.Color,m=t.System.Char,c=t.Report.Components.StiPagesCollection,p=t.System.Drawing.Size,g=t.Base.Drawing.StiTextHorAlignment,h=t.Base.Drawing.StiPenStyle,w=t.Base.Drawing.StiVertAlignment,u=t.Report.Components.StiText,d=t.Base.Drawing.StiBrush,S=t.System.Text.StringBuilder,f=t.Report.Components.IStiExportImageExtended,v=t.System.Text.Encoding,E=t.Base.Drawing.StiTextRenderer,b=t.Report.Components.StiRichText,y=t.System.IO.MemoryStream,x=t.System.Xml.XmlTextWriter,A=t.System.DateTime,T=t.Report.Components.StiCheckBox,P=t.Base.Zip.StiZipWriter20,L=t.System.Globalization.CultureInfo,C=t.Report.Components.StiPageOrientation,F=t.Base.Drawing.StiHtmlState,B=t.Base.Drawing.StiHtmlTagsState,k=function(k){function W(){var t=null!==k&&k.apply(this,arguments)||this;return t.matrix=null,t.fontList=null,t.fillList=null,t.borderList=null,t.xfList=null,t.sstList=null,t.sstHash=null,t.sstHashIsTags=null,t.imageList=null,t.formatList=null,t.sstCount=0,t.sheetNameList=null,t.imageListOffset=0,t.printAreasList=null,t.matrixList=null,t.firstPageIndexList=null,t.hyperlinkList=null,t.minRowList=null,t.maxRowList=null,t.useOnePageHeaderAndFooter=!1,t.exportDataOnly=!1,t.exportObjectFormatting=!0,t.exportEachPageToSheet=!1,t.exportHorizontalPageBreaks=!1,t.imageResolution=1,t.imageQuality=.75,t.imageCache=null,t.restrictEditing=r.StiExcel2007RestrictEditing.No,t.reportCulture=null,t.docCompanyString=null,t.docLastModifiedString=null,t.xmlIndentation=1,t.wrongUrlSymbols=" \"#'*,;<>[^`{|}",t.refChars="ABCDEFGHIJKLMNOPQRSTUVWXYZ",t.HiToTwips=14.4/20*1.01,t.TwipsToColinfo=2.438*.976*.075,t}return __extends(W,k),W.prototype.implements=function(){return[r.IStiExcel2007ExportService]},W.prototype.getDefaultExtension=function(){return"xlsx"},W.prototype.exportTo=function(t,e,r){this.exportExcel(t,e,r)},W.prototype.exportToAsync=function(e,r,i,n){var s=this;t.Report.Export.StiExportImageHelper.convertAllImages(r,t.System.Drawing.Imaging.ImageFormat.Jpeg).try((function(){if(!r.isDocument&&r.getCurrentPage().stimulsoft.is(a))return void o.exportAsync(r,i,n).try((function(){return e()}));s.exportTo(r,i,n),null!=r&&null!=r.preparedExportImages&&(r.preparedExportImages.clear(),r.preparedExportImages=null),e()}))},W.prototype.getLineStyle=function(t){var e=h.None,r=0,i=1.5,n=3;switch(null!=t&&(e=t.style,r=t.size),e){case h.Solid:if(r>n)return"thick";if(r>i)return"medium";return"thin";case h.Dot:if(r>i)return"dotted";return"hair";case h.Dash:if(r>i)return"mediumDashed";return"dashed";case h.DashDot:if(r>i)return"mediumDashDot";return"dashDot";case h.DashDotDot:if(r>i)return"mediumDashDotDot";return"dashDotDot";case h.Double:return"double";default:return null}},W.prototype.getRefString=function(t,e){var r=Math.trunc(t/26),i=Math.trunc(t%26),n=new S;return r>0&&n.append(this.refChars.charAt(r-1)),n.append(this.refChars.charAt(i)),n.append((e+1).toString()),n.toString()},W.prototype.getRefAbsoluteString=function(t,e){var r=Math.trunc(t/26),i=Math.trunc(t%26),n=new S;return n.append("$"),r>0&&n.append(this.refChars.charAt(r-1)),n.append(this.refChars.charAt(i)),n.append("$"),n.append((e+1).toString()),n.toString()},W.prototype.floatToString=function(t){var e;return t.toString().stimulsoft.replaceAll(",",".")},W.prototype.stringToUrl=function(t){for(var e=new S,r=0;r0)for(var e=0;e0)for(var e=0;e0)for(var e=0;e0)for(var e=0;e0&&this.sstHash.containsKey(t))return this.sstHash.get(t);this.sstList.push(t);var e=this.sstList.length-1;return this.sstHash.add(t,e),e},W.prototype.getFormatNumber=function(t){if(this.formatList.length>0)for(var e=0;e0&&(e.writeStartElement("Override"),e.writeAttributeString("PartName","/xl/sharedStrings.xml"),e.writeAttributeString("ContentType","application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml"),e.writeEndElement()),e.writeFullEndElement(),e.writeEndDocument(),e.flush(),t},W.prototype.writeMainRels=function(){var t=new y,e=new x(v.UTF8,t);return e.writeStartDocument(),e.writeStartElement("Relationships"),e.writeAttributeString("xmlns","http://schemas.openxmlformats.org/package/2006/relationships"),e.writeStartElement("Relationship"),e.writeAttributeString("Id","rId1"),e.writeAttributeString("Type","http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument"),e.writeAttributeString("Target","xl/workbook.xml"),e.writeEndElement(),e.writeStartElement("Relationship"),e.writeAttributeString("Id","rId2"),e.writeAttributeString("Type","http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties"),e.writeAttributeString("Target","docProps/core.xml"),e.writeEndElement(),e.writeStartElement("Relationship"),e.writeAttributeString("Id","rId3"),e.writeAttributeString("Type","http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties"),e.writeAttributeString("Target","docProps/app.xml"),e.writeEndElement(),e.writeFullEndElement(),e.writeEndDocument(),e.flush(),t},W.prototype.writeDocPropsApp=function(){var t=new y,e=new x(v.UTF8,t);e.writeStartDocument(),e.writeStartElement("Properties"),e.writeAttributeString("xmlns","http://schemas.openxmlformats.org/officeDocument/2006/extended-properties"),e.writeAttributeString("xmlns:vt","http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"),e.writeElementString("Application","Microsoft Excel"),e.writeElementString("DocSecurity","0"),e.writeElementString("ScaleCrop","false"),e.writeElementString("Company",null==this.docCompanyString?"":this.docCompanyString),e.writeElementString("LinksUpToDate","false"),e.writeElementString("SharedDoc","false"),e.writeElementString("HyperlinksChanged","false"),e.writeElementString("AppVersion","12.0000"),e.writeStartElement("HeadingPairs"),e.writeStartElement("vt:vector"),e.writeAttributeString("size","4"),e.writeAttributeString("baseType","variant"),e.writeStartElement("vt:variant"),e.writeElementString("vt:lpstr","Worksheets"),e.writeEndElement(),e.writeStartElement("vt:variant"),e.writeElementString("vt:i4",n.format("{0}",this.sheetNameList.length)),e.writeEndElement(),e.writeStartElement("vt:variant"),e.writeElementString("vt:lpstr","Named Ranges"),e.writeEndElement(),e.writeStartElement("vt:variant"),e.writeElementString("vt:i4",n.format("{0}",this.sheetNameList.length)),e.writeEndElement(),e.writeEndElement(),e.writeEndElement(),e.writeStartElement("TitlesOfParts"),e.writeStartElement("vt:vector"),e.writeAttributeString("size",n.format("{0}",2*this.sheetNameList.length)),e.writeAttributeString("baseType","lpstr");for(var r=0;r0&&(e.writeStartElement("Relationship"),e.writeAttributeString("Id",n.format("rId{0}",this.sheetNameList.length+3)),e.writeAttributeString("Type","http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings"),e.writeAttributeString("Target","sharedStrings.xml"),e.writeEndElement()),e.writeFullEndElement(),e.writeEndDocument(),e.flush(),t},W.prototype.writeWorkbook=function(){var t=new y,e=new x(v.UTF8,t);e.writeStartDocument(),e.writeStartElement("workbook"),e.writeAttributeString("xmlns","http://schemas.openxmlformats.org/spreadsheetml/2006/main"),e.writeAttributeString("xmlns:r","http://schemas.openxmlformats.org/officeDocument/2006/relationships"),e.writeStartElement("fileVersion"),e.writeAttributeString("appName","xl"),e.writeAttributeString("lastEdited","4"),e.writeAttributeString("lowestEdited","4"),e.writeAttributeString("rupBuild","4505"),e.writeEndElement(),e.writeStartElement("workbookPr"),e.writeAttributeString("defaultThemeVersion","124226"),e.writeEndElement(),e.writeStartElement("bookViews"),e.writeStartElement("workbookView"),e.writeAttributeString("xWindow","120"),e.writeAttributeString("yWindow","15"),e.writeAttributeString("windowWidth","18975"),e.writeAttributeString("windowHeight","11955"),e.writeEndElement(),e.writeEndElement(),e.writeStartElement("sheets");for(var r=0;r1048575&&(i.height=1048575),i.width>16383&&(i.width=16383);var o=this.getRefAbsoluteString(i.width,i.height);e.writeStartElement("definedName"),e.writeAttributeString("name","_xlnm.Print_Area"),e.writeAttributeString("localSheetId",n.format("{0}",r)),e.writeString(n.format("'{0}'!$A$1:{1}",this.sheetNameList[r],o)),e.writeEndElement()}return e.writeEndElement(),e.writeStartElement("calcPr"),e.writeAttributeString("calcId","124519"),e.writeEndElement(),e.writeFullEndElement(),e.writeEndDocument(),e.flush(),t},W.prototype.writeSheetRels=function(e){var r=new y,i=new x(v.UTF8,r);if(i.writeStartDocument(),i.writeStartElement("Relationships"),i.writeAttributeString("xmlns","http://schemas.openxmlformats.org/package/2006/relationships"),this.imageList.length-this.imageListOffset>0&&(i.writeStartElement("Relationship"),i.writeAttributeString("Id",n.format("rId{0}",1)),i.writeAttributeString("Type","http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing"),i.writeAttributeString("Target",n.format("../drawings/drawing{0}.xml",e+1)),i.writeEndElement()),this.hyperlinkList.length>0)for(var o=0;o0&&(B.stimulsoft.startsWith("rt")||B.stimulsoft.startsWith("ph")||B.stimulsoft.startsWith("h"))){E=F.left,A=F.top+F.height+1;break}}}c.writeStartElement("sheetViews"),c.writeStartElement("sheetView"),t["StiOptions"].Export.Excel.ColumnsRightToLeft&&c.writeAttributeString("rightToLeft","1"),t["StiOptions"].Export.Excel.ShowGridLines||c.writeAttributeString("showGridLines","0"),c.writeAttributeString("tabSelected","1"),c.writeAttributeString("workbookViewId","0"),0==E&&0==A?(c.writeStartElement("selection"),c.writeAttributeString("activeCell","A1"),c.writeAttributeString("sqref","A1"),c.writeEndElement()):0==E?(c.writeStartElement("pane"),c.writeAttributeString("ySplit",A.toString()),c.writeAttributeString("topLeftCell",this.getRefString(E,A)),c.writeAttributeString("activePane","bottomLeft"),c.writeAttributeString("state","frozen"),c.writeEndElement(),c.writeStartElement("selection"),c.writeAttributeString("pane","bottomLeft"),c.writeAttributeString("activeCell",this.getRefString(0,A)),c.writeAttributeString("sqref",this.getRefString(0,A)),c.writeEndElement()):(c.writeStartElement("pane"),c.writeAttributeString("xSplit",E.toString()),c.writeAttributeString("ySplit",A.toString()),c.writeAttributeString("topLeftCell",this.getRefString(E,A)),c.writeAttributeString("activePane","bottomRight"),c.writeAttributeString("state","frozen"),c.writeEndElement(),c.writeStartElement("selection"),c.writeAttributeString("pane","topRight"),c.writeAttributeString("activeCell",this.getRefString(E,0)),c.writeAttributeString("sqref",this.getRefString(E,0)),c.writeEndElement(),c.writeStartElement("selection"),c.writeAttributeString("pane","bottomLeft"),c.writeAttributeString("activeCell",this.getRefString(0,A)),c.writeAttributeString("sqref",this.getRefString(0,A)),c.writeEndElement(),c.writeStartElement("selection"),c.writeAttributeString("pane","bottomRight"),c.writeAttributeString("activeCell",this.getRefString(E,A)),c.writeAttributeString("sqref",this.getRefString(E,A)),c.writeEndElement()),c.writeEndElement(),c.writeEndElement(),c.writeStartElement("sheetFormatPr"),c.writeAttributeString("defaultRowHeight",n.format("{0}",15)),c.writeEndElement();var k=this.matrix.coordX.getKeys(),W=this.matrix.coordY.getKeys();if(this.exportObjectFormatting){c.writeStartElement("cols");for(var U=0;U0&&(tt=!0,Z=$.excelDataValue);var et=null;if(null!=F.component.hyperlinkValue&&(et=F.component.hyperlinkValue.toString().trim()).length>0&&!et.stimulsoft.startsWith("javascript:")){var rt=Z;null!=rt&&0!=rt.length||(rt=et);var it=new H(P-g,P-g+F.height,L,L+F.width),nt=new M(it,rt,et);q.push(nt)}var ot=!1,at=F.component.stimulsoft.as(f);if(null!=at){var st=this.imageResolution,lt=null;if(F.component.isExportAsImage(e.StiExportFormat.Excel2007)){var mt={ref:this.imageResolution};lt=at.getImage(mt,e.StiExportFormat.Excel)}if(null!=lt){var ct=this.matrix.getRealImageData(F,lt);null!=ct&&(lt=ct);var pt=this.imageCache.addImageIntRaw(lt,lt.imageFormat),gt=new O(P-g,0,L,0,P-g+1+F.height,0,L+1+F.width,0,pt,et);this.imageList.push(gt),ot=!0}}var ht=!1,wt;if(null!=F.component&&null!=F.component.tagValue)-1!=F.component.tagValue.toString().toLowerCase().indexOf("exceltext")&&(ht=!0,d.push(this.getRefString(L,P)));var ut="";null!=J&&(ut=J.format);var dt=!1,St=!1,ft=!1,vt=!1,Et=!1,bt=!1,yt=!1,xt="",At=2,Tt=0,Pt=this.reportCulture.numberFormat.currencySymbol,Lt=0==this.reportCulture.numberFormat.currencyPositivePattern||2==this.reportCulture.numberFormat.currencyPositivePattern,Ct=!1,Ft=null!=J&&J.hideZeros,Bt=null,kt=null,Rt=ut.indexOf("|");if(-1!=Rt&&(Bt=r.StiExportUtils.getPositivePattern(ut.charCodeAt(Rt+1)-65),kt=r.StiExportUtils.getNegativePattern(ut.charCodeAt(Rt+2)-65),ut=ut.substr(0,Rt)),null!=ut&&ut.length>0)if("C"==ut[0]?dt=!0:"N"==ut[0]?St=!0:"P"==ut[0]?ft=!0:"D"==ut[0]?vt=!0:"T"==ut[0]?Et=!0:"U"==ut[0]&&(bt=!0),1==ut.length)yt=!0;else if(dt||St||ft){var It=1;if(m.isDigit(ut[It])){var Dt=new S;while(It1&&(Nt.append("#,"),Nt.appendCount("#",Tt-1)),Nt.append("0"),At>0&&(Nt.append("."),Nt.appendCount("0",At));var Ot=Nt.toString(),Ht,Mt;xt=Bt.stimulsoft.replaceAll("n",Ot).stimulsoft.replaceAll("$",'"'+Pt+'"')+";"+(Mt=kt.stimulsoft.replaceAll("n",Ot).stimulsoft.replaceAll("$",'"'+Pt+'"'))+(Ft?";":"")}else{var Nt=new S;dt&&1==Lt&&(Nt.append('"'),Nt.append(Pt),Nt.append('"')),Tt>1&&(Nt.append("#,"),Nt.appendCount("#",Tt-1)),Nt.append("0"),At>0&&(Nt.append("."),Nt.appendCount("0",At)),dt&&0==Lt&&(Nt.append('"'),Nt.append(Pt),Nt.append('"')),ft&&Nt.append("%");var Mt=(Ct?"(":"-")+(xt=Nt.toString())+(Ct?")":"");Ft?xt=xt+";"+Mt+";":Ct&&(xt=xt+";"+Mt)}var Wt=0;yt?(St&&(Wt=4),ft&&(Wt=10),vt&&(Wt=14),Et&&(Wt=21),ht&&(Wt=49)):Wt=this.getFormatNumber(xt);var Ut=0;if(this.exportObjectFormatting){var Xt=F.cellStyle,zt=new R(Xt.font.name,Xt.font.bold,Xt.font.italic,Xt.font.underline,Xt.font.strikeout,Math.round(Xt.font.sizeInPoints),Xt.textColor,1,0);tt&&(zt=new R(t["StiOptions"].Export.CheckBoxReplacementForExcelValue.Font.name,t["StiOptions"].Export.CheckBoxReplacementForExcelValue.Font.bold,t["StiOptions"].Export.CheckBoxReplacementForExcelValue.Font.italic,t["StiOptions"].Export.CheckBoxReplacementForExcelValue.Font.underline,t["StiOptions"].Export.CheckBoxReplacementForExcelValue.Font.strikeout,Math.round(t["StiOptions"].Export.CheckBoxReplacementForExcelValue.Font.sizeInPoints),Xt.textColor,1,0));var Vt=new I("solid",Xt.color,Xt.color);ot&&(Vt=new I("solid",l.transparent,l.transparent));for(var Gt=!0,Yt=!0,jt=0;jt=0&&$t<=90&&(Zt=$t),$t>=270&&$t<360&&(Zt=360-$t+90)}var te=this.restrictEditing==r.StiExcel2007RestrictEditing.ExceptEditableFields&&null!=F.component&&F.component.stimulsoft.is(u)&&F.component.stimulsoft.as(u).Editable,ee=new N(Wt,this.getFontNumber(zt),this.getFillNumber(Vt),this.getBorderNumber(Kt),0,tt?t["StiOptions"].Export.CheckBoxReplacementForExcelValue.HorAlignment:Xt.horAlignment,tt?t["StiOptions"].Export.CheckBoxReplacementForExcelValue.VertAlignment:Xt.vertAlignment,Zt,Jt,Qt,te);Ut=this.getXFNumber(ee)}if(c.writeStartElement("c"),c.writeAttributeString("r",this.getRefString(L,P-g)),c.writeAttributeString("s",Ut.toString()),this.exportObjectFormatting){for(var re=0;re<=F.width;re++)for(var ie=0;ie<=F.height;ie++)Y[P+ie][L+re]=!0,j[P+ie][L+re]=Ut;if(F.width>0||F.height>0){var ne=new H(P-g,P-g+F.height,L,L+F.width);_.push(ne)}}else Y[P][L]=!0,j[P][L]=Ut;if(!F.component.isExportAsImage(e.StiExportFormat.Excel2007)&&(null!=Z&&Z.length>0||null!=J&&null!=J.excelDataValue)){var oe=!1,ae=!1,se=0;if(null!=J&&null!=J.excelDataValue&&"-"!=J.excelDataValue){var le=J.excelDataValue,me=le.trim().stimulsoft.replaceAll(",",".");if(null!=me&&me.length>0&&this.checkForNumber(me)){ae=!0;try{vt||Et?ae=!1:(se=parseFloat(me),isNaN(se)&&(ae=!1,se=0))}catch(e){t.System.StiError.showError(e,!1),ae=!1}}bt&&(ae=!1),le!=Z&&le.stimulsoft.startsWith("=")&&(oe=!0),ae||null!=Z||(Z=le)}if(oe){var ce=J.excelDataValue.stimulsoft.replaceAll("\r","").stimulsoft.replaceAll("\t"," ").substring(1);t["StiOptions"].Export.Excel.TrimTrailingSpaces&&(ce=r.StiExportUtils.trimEndWhiteSpace(ce)),c.writeElementString("f",ce)}else if(1==ae)c.writeElementString("v",se.toString().stimulsoft.replaceAll(",","."));else{var ce=Z.stimulsoft.replaceAll("\r","").stimulsoft.replaceAll("\t"," ");t["StiOptions"].Export.Excel.TrimTrailingSpaces&&(ce=r.StiExportUtils.trimEndWhiteSpace(ce));var pe=0;null!=J&&J.checkAllowHtmlTags()?(ce=this.convertAllowHtmlTagsToExcelString(J,ce),pe=this.getSSTNumber(ce),this.sstHashIsTags.add(pe,null)):pe=this.getSSTNumber(ce),c.writeAttributeString("t","s"),c.writeElementString("v",pe.toString())}}c.writeEndElement()}else{var Ut=0;Y[P][L]&&(Ut=j[P][L]);var Gt=null!=this.matrix.bordersY[P+0][L+0],Yt=null!=this.matrix.bordersY[P+0][L+1],_t=null!=this.matrix.bordersX[P+0][L+0],qt=void 0;try{qt=null!=this.matrix.bordersX[P+1][L+0]}catch(e){t.System.StiError.showError(e,!1)}if(Gt||Yt||_t||qt||0!=Ut){var Kt=new D(Gt?this.matrix.bordersY[P+0][L+0]:null,Yt?this.matrix.bordersY[P+0][L+1]:null,_t?this.matrix.bordersX[P+0][L+0]:null,qt?this.matrix.bordersX[P+1][L+0]:null),ge=this.xfList[Ut],ee=new N(ge.FormatIndex,ge.FontIndex,ge.FillIndex,this.getBorderNumber(Kt),ge.XFId,ge.HorAlign,ge.VertAlign,ge.TextRotationAngle,ge.TextWrapped,ge.RightToLeft,ge.Editable),he=this.getXFNumber(ee);this.exportObjectFormatting||(he=0),c.writeStartElement("c"),c.writeAttributeString("r",this.getRefString(L,P-g)),c.writeAttributeString("s",he.toString()),c.writeEndElement()}}}c.writeEndElement()}if(c.writeEndElement(),this.restrictEditing!=r.StiExcel2007RestrictEditing.No&&(c.writeStartElement("sheetProtection"),c.writeAttributeString("password","F05F"),c.writeAttributeString("sheet","1"),c.writeAttributeString("objects","1"),c.writeAttributeString("scenarios","1"),c.writeEndElement()),_.length>0&&(!this.exportDataOnly||this.exportObjectFormatting)){c.writeStartElement("mergeCells"),c.writeAttributeString("count",n.format("{0}",_.length));for(var jt=0;jt<_.length;jt++){var ne=_[jt];c.writeStartElement("mergeCell"),c.writeAttributeString("ref",n.format("{0}:{1}",this.getRefString(ne.FirstColumn,ne.FirstRow),this.getRefString(ne.LastColumn,ne.LastRow))),c.writeEndElement()}c.writeEndElement()}if(q.length>0){for(var we=!1,ue=0;ue=Ee&&ye.height=Ee&&ye.height0){c.writeStartElement("rowBreaks"),c.writeAttributeString("count",Ae.toString()),c.writeAttributeString("manualBreakCount",Ae.toString());for(var Te=0;Tethis.imageListOffset&&(c.writeStartElement("drawing"),c.writeAttributeString("r:id",n.format("rId{0}",1)),c.writeEndElement()),t.Base.izjrG.dVOOk.TvUDM()||t.Base.izjrG.dVOOk.AWlWm()||(t.Base.izjrG.dVOOk.ekkVf()||t.Base.izjrG.dVOOk.yoidW()||t.Base.izjrG.dVOOk.ohwaJ())&&t.System.NodeJs.isStandaloneVersion||(c.writeStartElement("legacyDrawingHF"),c.writeAttributeString("r:id","dId1"),c.writeEndElement()),d.length>0){for(var Pe in c.writeStartElement("ignoredErrors"),d)c.writeStartElement("ignoredError"),c.writeAttributeString("sqref",d[Pe]),c.writeAttributeString("numberStoredAsText","1"),c.writeEndElement();c.writeEndElement()}return c.writeFullEndElement(),c.writeEndDocument(),c.flush(),s},W.prototype.checkForNumber=function(t){var e=t.match(W.regexCheckInteger1);if(null!=e)return!0;if(null!=(e=t.match(W.regexCheckFloat1)))return!0;return!1},W.prototype.prepareMatrix=function(e){var i=r.StiDataExportMode.AllBands;if(this.exportDataOnly&&(i=r.StiDataExportMode.Data|r.StiDataExportMode.Headers,t["StiOptions"].Export.Excel.AllowExportFootersInDataOnlyMode&&(i|=r.StiDataExportMode.Footers)),this.matrix=new r.StiMatrix(e,t["StiOptions"].Export.Excel.DivideBigCells,this,null,i),this.useOnePageHeaderAndFooter){this.matrix.scanComponentsPlacement(!0,this.exportObjectFormatting);var n=0,o;while(this.matrix.linePlacement[n]!=r.StiTableLineInfo.PageHeader&&n0)n--;if(this.matrix.linePlacement[n]==r.StiTableLineInfo.PageFooter){while(this.matrix.linePlacement[n]==r.StiTableLineInfo.PageFooter&&n>0)n--;while(n>0)this.matrix.linePlacement[n]==r.StiTableLineInfo.PageFooter&&(this.matrix.linePlacement[n]=r.StiTableLineInfo.Trash),n--}for(var a=0,l=0;l0)for(var w=0;w0)for(var w=0;w0&&(m.isWhitespace(e,e.length-1)||-1!=e.indexOf("\n"))&&t.writeAttributeString("xml:space","preserve"),t.writeString(e),t.writeFullEndElement()},W.prototype.writeDrawingRels=function(t){var e=new y,r=new x(v.UTF8,e);r.writeStartDocument(),r.writeStartElement("Relationships"),r.writeAttributeString("xmlns","http://schemas.openxmlformats.org/package/2006/relationships");for(var i=this.imageListOffset;i0){e.writeStartElement("numFmts"),e.writeAttributeString("count",n.format("{0}",this.formatList.length));for(var r=0;r=32||"\n"==i.charAt(a))&&o.append(i.charAt(a));i=o.toString(),this.sstHashIsTags.containsKey(r)?e.writeRaw(i):this.convertTextToExcelString(e,i),e.writeEndElement()}return e.writeFullEndElement(),e.writeEndDocument(),e.flush(),t},W.prototype.writeAdditionalData=function(e,r){var i=new y,n=null;return n=r?t.System.Convert.fromBase64String(e):v.ASCII.getBytes(e),i.write(n,0,n.length),i},W.prototype.writeImage=function(t){var e=new y,r=this.imageList[t],i=this.imageCache.imagePackedStore[t];return null!=i&&e.write(i,0,i.length),e},W.prototype.exportExcel=function(i,o,a){e.StiLogService.write(this.stimulsoft.getType(),"Export report to Excel 2007 format");var l=a.pageRange;this.useOnePageHeaderAndFooter=a.useOnePageHeaderAndFooter,this.exportDataOnly=a.exportDataOnly,this.exportObjectFormatting=a.exportObjectFormatting,this.exportEachPageToSheet=a.exportEachPageToSheet,this.exportHorizontalPageBreaks=a.exportPageBreaks,this.imageResolution=a.imageResolution,this.imageQuality=a.imageQuality,this.docCompanyString=a.companyString,this.docLastModifiedString=a.lastModifiedString,this.restrictEditing=a.restrictEditing,this.xmlIndentation=-1,this.imageResolution<10&&(this.imageResolution=10),this.imageResolution=this.imageResolution/100,this.exportDataOnly?this.useOnePageHeaderAndFooter=!1:this.exportObjectFormatting=!0,t["StiOptions"].Export.Excel.RestrictEditing>this.restrictEditing&&(this.restrictEditing=t["StiOptions"].Export.Excel.RestrictEditing),this.report=i;try{this.reportCulture=L.currentCulture;var m=l.getSelectedPages(i.renderedPages);this.currentPassNumber=0,this.maximumPassNumber=3,this.prepareData();var p=0;while(pt["StiOptions"].Export.Excel.MaximumSheetHeight?v=f+t["StiOptions"].Export.Excel.MaximumSheetHeight:this.matrix=null,this.minRowList.push(f),this.maxRowList.push(v),f=v,null!=this.matrix||d.length>0?(d=n.format(" part{0}",S++),u.length>24&&(u=u.substr(0,24))):u.length>30&&(u=u.substr(0,30)),this.sheetNameList.push(u+d)}while(null!=this.matrix);p++}for(var E=new s,b=0;b0&&(A.addFile(n.format("xl/drawings/_rels/drawing{0}.xml.rels",T+1),this.writeDrawingRels(T)),A.addFile(n.format("xl/drawings/drawing{0}.xml",T+1),this.writeDrawing(T))),this.imageListOffset=this.imageList.length;if(A.addFile("[Content_Types].xml",this.writeContentTypes()),A.addFile("_rels/.rels",this.writeMainRels()),A.addFile("docProps/app.xml",this.writeDocPropsApp()),A.addFile("docProps/core.xml",this.writeDocPropsCore()),A.addFile("xl/_rels/workbook.xml.rels",this.writeWorkbookRels()),A.addFile("xl/workbook.xml",this.writeWorkbook()),A.addFile("xl/styles.xml",this.writeStyles()),this.sstList.length>0&&A.addFile("xl/sharedStrings.xml",this.writeSST()),this.imageCache.imagePackedStore.length>0)for(var b=0;b\r\n',!1)),A.addFile("xl/drawings/vmlDrawingAdditional.vml",this.writeAdditionalData('\r\n \r\n \r\n'+' \r\n \r\n '+'\r\n \r\n \r\n \r\n \r\n \r\n \r\n '+'\r\n \r\n \r\n \r\n \r\n \r\n \r\n '+'\r\n \r\n '+'\r\n \r\n \r\n ',!1))),A.end()}catch(e){t.System.StiError.showError(e,!1)}finally{null!=this.matrix&&(this.matrix.clear(),this.matrix=null),this.fontList=null,this.fillList=null,this.borderList=null,this.xfList=null,this.sstList=null,this.sstHash=null,this.sstHashIsTags=null,this.formatList=null,this.sheetNameList=null,this.imageList.stimulsoft.clear(),this.imageList=null,this.imageCache.clear(),this.printAreasList=null,this.matrixList=null,this.firstPageIndexList=null,this.hyperlinkList=null,this.minRowList=null,this.maxRowList=null}},W.regexCheckInteger1=new RegExp("^[+-]?d+$"),W.regexCheckFloat1=new RegExp("^[+-]?([0-9]+([.][0-9]*)?|[.][0-9]+)$"),W}(r.StiExportService);r.StiExcel2007ExportService=k;var R=function(){function t(t,e,r,i,n,o,a,s,l){this.Name=t,this.Bold=e,this.Italic=r,this.Underlined=i,this.Strikeout=n,this.Height=o,this.Color=a,this.Charset=s,this.Family=l}return t.prototype.equals=function(t){return this.Name==t.Name&&this.Bold==t.Bold&&this.Italic==t.Italic&&this.Underlined==t.Underlined&&this.Strikeout==t.Strikeout&&this.Height==t.Height&&this.Color.stimulsoft.equals(t.Color)&&this.Charset==t.Charset&&this.Family==t.Family},t}();r.DataFont=R;var I=function(){function t(t,e,r){this.Type=t,this.FgColor=e,this.BgColor=r}return t.prototype.equals=function(t){return this.Type==t.Type&&this.FgColor.stimulsoft.equals(t.FgColor)&&this.BgColor.stimulsoft.equals(t.BgColor)},t}();r.DataFill=I;var D=function(){function t(t,e,r,i){this.BorderLeft=t,this.BorderRight=e,this.BorderTop=r,this.BorderBottom=i}return t.prototype.equals=function(t){return this.eq(this.BorderLeft,t.BorderLeft)&&this.eq(this.BorderRight,t.BorderRight)&&this.eq(this.BorderTop,t.BorderTop)&&this.eq(this.BorderBottom,t.BorderBottom)},t.prototype.eq=function(t,e){return null==t&&null==e||null!=t&&null!=e&&t.stimulsoft.equals(e)},t}();r.DataBorder=D;var N=function(){function t(t,e,r,i,n,o,a,s,l,m,c){this.FormatIndex=t,this.FontIndex=e,this.FillIndex=r,this.BorderIndex=i,this.XFId=n,this.HorAlign=o,this.VertAlign=a,this.TextRotationAngle=s,this.TextWrapped=l,this.RightToLeft=m,this.Editable=c}return t.prototype.equalDataXF=function(t){if(this.FormatIndex!=t.FormatIndex||this.FontIndex!=t.FontIndex||this.FillIndex!=t.FillIndex||this.BorderIndex!=t.BorderIndex||this.XFId!=t.XFId||this.HorAlign!=t.HorAlign||this.VertAlign!=t.VertAlign||this.TextRotationAngle!=t.TextRotationAngle||this.TextWrapped!=t.TextWrapped||this.RightToLeft!=t.RightToLeft||this.Editable!=t.Editable)return!1;return!0},t}();r.DataXF=N;var O=function(){function t(t,e,r,i,n,o,a,s,l,m){this.FirstRowIndex=t,this.FirstRowOffset=e,this.FirstColumnIndex=r,this.FirstColumnOffset=i,this.LastRowIndex=n,this.LastRowOffset=o,this.LastColumnIndex=a,this.LastColumnOffset=s,this.ImageIndex=l,this.Hyperlink=m}return t}();r.ExcelImageData=O;var H=function(){function t(t,e,r,i){this.FirstRow=t,this.LastRow=e,this.FirstColumn=r,this.LastColumn=i}return t}();r.CellRangeAddress=H;var M=function(){function t(t,e,r){this.Range=t,this.Description=e,this.Bookmark=r}return t}();r.HlinkData=M}(r=e.Export||(e.Export={}))}(e=t.Report||(t.Report={}))}(Stimulsoft||(Stimulsoft={})),function(t){var e;!function(t){var e;!function(t){var e=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return __extends(r,e),r.prototype.implements=function(){return[t.IStiExcelXmlExportService]},r}(t.StiExportService);t.StiExcelXmlExportService=e}(e=t.Export||(t.Export={}))}(e=t.Report||(t.Report={}))}(Stimulsoft||(Stimulsoft={})),function(t){var e;!function(e){var r;!function(r){var i=t.Base.Drawing.StiPenStyle,n=t.Base.Zip.StiZipWriter20,o=t.Report.Components.StiImage,a=t.Base.Drawing.StiHorAlignment,s=t.Base.Drawing.StiCapStyle,l=t.Report.Components.StiVerticalLinePrimitive,m=t.Report.Components.StiHorizontalLinePrimitive,c=t.Base.Drawing.StiAdvancedBorder,p=t.Base.Drawing.StiBorderSides,g=t.Report.Components.IStiBorder,h=t.Report.Components.StiShape,w=t.Report.Components.IStiBrush,u=t.Report.Components.IStiTextOptions,d=t.Report.Components.StiLinePrimitive,S=t.Report.Components.IStiExportImageExtended,f=t.Base.Drawing.StiTextRenderer,v=t.Report.Components.StiTextQuality,E=t.Base.Drawing.StiBrush,b=t.Report.Components.StiContainer,y=t.Report.Components.StiText,x=t.System.DateTime,A=t.System.StiString,T=t.System.Text.StringBuilder,P=t.System.Globalization.CultureInfo,L=t.System.Xml.Formatting,C=t.System.Text.Encoding,F=t.System.Xml.XmlTextWriter,B=t.Report.Dashboard.StiDashboardExport,k=t.Report.Dashboard.IStiDashboard,R=t.System.IO.MemoryStream,I=function(I){function D(){var t=null!==I&&I.apply(this,arguments)||this;return t.imageListOffset=0,t.imageResolution=1,t.imageQuality=.75,t.imageCache=null,t.idCounter=2,t.hyperlinkList=null,t.xmlIndentation=1,t.currentCulture=null,t.newCulture=null,t.wrongUrlSymbols=" \"#'*,;<>[^`{|}",t.HiToTwips=14.4*.995,t}return __extends(D,I),D.prototype.implements=function(){return[r.IStiPpt2007ExportService]},D.prototype.getDefaultExtension=function(){return"pptx"},D.prototype.exportTo=function(t,e,r){this.exportPowerPoint(t,e,r)},D.prototype.exportToAsync=function(e,r,i,n){var o=this;t.Report.Export.StiExportImageHelper.convertAllImages(r,t["StiOptions"].Export.PowerPoint.StoreImagesAsPng?t.System.Drawing.Imaging.ImageFormat.Png:t.System.Drawing.Imaging.ImageFormat.Jpeg).try((function(){if(!r.isDocument&&r.getCurrentPage().stimulsoft.is(k))return void B.exportAsync(r,i,n).try((function(){return e()}));o.exportTo(r,i,n),null!=r&&null!=r.preparedExportImages&&(r.preparedExportImages.clear(),r.preparedExportImages=null),e()}))},D.prototype.getLineStyle=function(t){switch(t){case i.Solid:return"solid";case i.Dot:return"sysDot";case i.Dash:return"sysDash";case i.DashDot:return"sysDashDot";case i.DashDotDot:return"sysDashDotDot";case i.Double:return"solid";default:return"solid"}},D.prototype.stringToUrl=function(t){var e,r,i=C.UTF8.getBytes(t),n=new T;try{for(var o=__values(i),a=o.next();!a.done;a=o.next()){var s=a.value,l=String.fromCharCode(s);s<32||s>127||-1!=this.wrongUrlSymbols.indexOf(l)?n.append(A.format("%{0:x2}",s)):n.append(l)}}catch(t){e={error:t}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}return n.toString()},D.prototype.convert=function(t){return 0|Math.round(t*this.HiToTwips)},D.prototype.convertTwipsToEmu=function(t){return 0|Math.round(t/this.HiToTwips/100*914400)},D.prototype.convertToEmu=function(t){return 0|Math.round(t/100*914400)},D.prototype.writeColor=function(t,e){if(t.writeStartElement("a:srgbClr"),t.writeAttributeString("val",A.format("{0:X6}",16777215&e.toArgb())),255!=e.a){var r=e.a/256*1e5|0;t.writeStartElement("a:alpha"),t.writeAttributeString("val",A.format("{0}",r)),t.writeEndElement()}t.writeEndElement()},D.prototype.writeContentTypes=function(t){var e=new R,r=new F(C.UTF8,e);r.indentation=this.xmlIndentation<0?0:this.xmlIndentation,r.formatting=this.xmlIndentation<0?L.None:L.Indented,r.writeStartDocument(),r.writeStartElement("Types"),r.writeAttributeString("xmlns","http://schemas.openxmlformats.org/package/2006/content-types");for(var i=0;i<11;i++)r.writeStartElement("Override"),r.writeAttributeString("PartName",A.format("/ppt/slideLayouts/slideLayout{0}.xml",i+1)),r.writeAttributeString("ContentType","application/vnd.openxmlformats-officedocument.presentationml.slideLayout+xml"),r.writeEndElement();r.writeStartElement("Override"),r.writeAttributeString("PartName","/ppt/slideMasters/slideMaster1.xml"),r.writeAttributeString("ContentType","application/vnd.openxmlformats-officedocument.presentationml.slideMaster+xml"),r.writeEndElement(),r.writeStartElement("Override"),r.writeAttributeString("PartName","/ppt/presProps.xml"),r.writeAttributeString("ContentType","application/vnd.openxmlformats-officedocument.presentationml.presProps+xml"),r.writeEndElement();for(var i=0;i'+''+''+''+''+''+''+''+''+''+''+'';return e.writeRaw(r),e.writeEndDocument(),e.flush(),t},D.prototype.writeSlideMasterRels=function(){var t=new R,e=new F(C.UTF8,t);e.indentation=this.xmlIndentation<0?0:this.xmlIndentation,e.formatting=this.xmlIndentation<0?L.None:L.Indented,e.writeStartDocument(),e.writeStartElement("Relationships"),e.writeAttributeString("xmlns","http://schemas.openxmlformats.org/package/2006/relationships");for(var r=0;r<11;r++)e.writeStartElement("Relationship"),e.writeAttributeString("Id",A.format("rId{0}",r+1)),e.writeAttributeString("Type","http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideLayout"),e.writeAttributeString("Target",A.format("../slideLayouts/slideLayout{0}.xml",r+1)),e.writeEndElement();return e.writeStartElement("Relationship"),e.writeAttributeString("Id","rId12"),e.writeAttributeString("Type","http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme"),e.writeAttributeString("Target","../theme/theme1.xml"),e.writeEndElement(),e.writeFullEndElement(),e.writeEndDocument(),e.flush(),t},D.prototype.writeSlideMaster=function(){var t=new R,e=new F(C.UTF8,t);e.indentation=this.xmlIndentation<0?0:this.xmlIndentation,e.formatting=this.xmlIndentation<0?L.None:L.Indented,e.writeStartDocument();var r=''+''+'Click to edit Master title style'+'Click to edit Master text stylesSecond level'+'Third levelFourth levelFifth level'+''+'15.04.2009'+''+''+'‹#›'+''+''+''+''+''+''+''+''+''+''+''+''+''+''+''+''+'';return e.writeRaw(r),e.writeEndDocument(),e.flush(),t},D.prototype.writeSlideLayoutRels=function(){var t=new R,e=new F(C.UTF8,t);return e.indentation=this.xmlIndentation<0?0:this.xmlIndentation,e.formatting=this.xmlIndentation<0?L.None:L.Indented,e.writeStartDocument(),e.writeStartElement("Relationships"),e.writeAttributeString("xmlns","http://schemas.openxmlformats.org/package/2006/relationships"),e.writeStartElement("Relationship"),e.writeAttributeString("Id","rId1"),e.writeAttributeString("Type","http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideMaster"),e.writeAttributeString("Target","../slideMasters/slideMaster1.xml"),e.writeEndElement(),e.writeFullEndElement(),e.writeEndDocument(),e.flush(),t},D.prototype.writeSlideLayout=function(e,r){var i=new R,n=new F(C.UTF8,i);if(n.indentation=this.xmlIndentation<0?0:this.xmlIndentation,n.formatting=this.xmlIndentation<0?L.None:L.Indented,n.writeStartDocument(),n.writeStartElement("p:sldLayout"),n.writeAttributeString("xmlns:a","http://schemas.openxmlformats.org/drawingml/2006/main"),n.writeAttributeString("xmlns:r","http://schemas.openxmlformats.org/officeDocument/2006/relationships"),n.writeAttributeString("xmlns:p","http://schemas.openxmlformats.org/presentationml/2006/main"),1==e){n.writeAttributeString("type","title"),n.writeAttributeString("preserve","1");var o='Click to edit Master title style'+''+''+'Click to edit Master subtitle style'+'15.04.2009'+'‹#›';n.writeRaw(o)}if(2==e){n.writeAttributeString("type","obj"),n.writeAttributeString("preserve","1");var o='Click to edit Master title style'+'Click to edit Master text stylesSecond levelThird levelFourth levelFifth level'+'15.04.2009'+'‹#›';n.writeRaw(o)}if(3==e){n.writeAttributeString("type","secHead"),n.writeAttributeString("preserve","1");var o=''+'Click to edit Master title style'+''+''+'Click to edit Master text styles15.04.2009'+'‹#›';n.writeRaw(o)}if(4==e){n.writeAttributeString("type","twoObj"),n.writeAttributeString("preserve","1");var o='Click to edit Master title style'+''+'Click to edit Master text stylesSecond levelThird levelFourth levelFifth level'+'Click to edit Master text styles'+'Second levelThird levelFourth levelFifth level'+'15.04.2009'+'‹#›';n.writeRaw(o)}if(5==e){n.writeAttributeString("type","twoTxTwoObj"),n.writeAttributeString("preserve","1");var o='Click to edit Master title style'+''+'Click to edit Master text styles'+'Click to edit Master text styles'+'Second levelThird levelFourth levelFifth level'+''+'Click to edit Master text styles'+'Click to edit Master text stylesSecond levelThird level'+'Fourth levelFifth level15.04.2009'+'‹#›';n.writeRaw(o)}if(6==e){n.writeAttributeString("type","titleOnly"),n.writeAttributeString("preserve","1");var o='Click to edit Master title style'+'15.04.2009'+'‹#›';n.writeRaw(o)}if(7==e){if(n.writeAttributeString("type","blank"),n.writeAttributeString("preserve","1"),n.writeStartElement("p:cSld"),n.writeAttributeString("name","Blank"),n.writeStartElement("p:spTree"),n.writeStartElement("p:nvGrpSpPr"),n.writeStartElement("p:cNvPr"),n.writeAttributeString("id","1"),n.writeAttributeString("name",""),n.writeEndElement(),n.writeStartElement("p:cNvGrpSpPr"),n.writeEndElement(),n.writeStartElement("p:nvPr"),n.writeEndElement(),n.writeFullEndElement(),n.writeStartElement("p:grpSpPr"),n.writeStartElement("a:xfrm"),n.writeStartElement("a:off"),n.writeAttributeString("x","0"),n.writeAttributeString("y","0"),n.writeEndElement(),n.writeStartElement("a:ext"),n.writeAttributeString("cx","0"),n.writeAttributeString("cy","0"),n.writeEndElement(),n.writeStartElement("a:chOff"),n.writeAttributeString("x","0"),n.writeAttributeString("y","0"),n.writeEndElement(),n.writeStartElement("a:chExt"),n.writeAttributeString("cx","0"),n.writeAttributeString("cy","0"),n.writeEndElement(),n.writeFullEndElement(),n.writeFullEndElement(),n.writeStartElement("p:sp"),n.writeStartElement("p:nvSpPr"),n.writeStartElement("p:cNvPr"),n.writeAttributeString("id","2"),n.writeAttributeString("name","Date Placeholder 1"),n.writeEndElement(),n.writeStartElement("p:cNvSpPr"),n.writeStartElement("a:spLocks"),n.writeAttributeString("noGrp","1"),n.writeEndElement(),n.writeFullEndElement(),n.writeStartElement("p:nvPr"),n.writeStartElement("p:ph"),n.writeAttributeString("type","dt"),n.writeAttributeString("sz","half"),n.writeAttributeString("idx","10"),n.writeEndElement(),n.writeFullEndElement(),n.writeFullEndElement(),n.writeStartElement("p:spPr"),n.writeEndElement(),n.writeStartElement("p:txBody"),n.writeStartElement("a:bodyPr"),n.writeEndElement(),n.writeStartElement("a:lstStyle"),n.writeEndElement(),n.writeStartElement("a:p"),n.writeStartElement("a:fld"),n.writeAttributeString("id","{BBCD0B08-7874-4091-A11F-B0CCB138CA98}"),n.writeAttributeString("type","datetimeFigureOut"),n.writeStartElement("a:rPr"),n.writeAttributeString("lang","ru-RU"),n.writeAttributeString("smtClean","0"),n.writeEndElement(),n.writeStartElement("a:t"),n.writeString("15.04.2009"),n.writeFullEndElement(),n.writeFullEndElement(),n.writeStartElement("a:endParaRPr"),n.writeAttributeString("lang","ru-RU"),n.writeEndElement(),n.writeFullEndElement(),n.writeFullEndElement(),n.writeFullEndElement(),n.writeStartElement("p:sp"),n.writeStartElement("p:nvSpPr"),n.writeStartElement("p:cNvPr"),n.writeAttributeString("id","3"),n.writeAttributeString("name","Footer Placeholder 2"),n.writeEndElement(),n.writeStartElement("p:cNvSpPr"),n.writeStartElement("a:spLocks"),n.writeAttributeString("noGrp","1"),n.writeEndElement(),n.writeFullEndElement(),n.writeStartElement("p:nvPr"),n.writeStartElement("p:ph"),n.writeAttributeString("type","ftr"),n.writeAttributeString("sz","quarter"),n.writeAttributeString("idx","11"),n.writeEndElement(),n.writeFullEndElement(),n.writeFullEndElement(),n.writeStartElement("p:spPr"),n.writeEndElement(),n.writeStartElement("p:txBody"),n.writeStartElement("a:bodyPr"),n.writeEndElement(),n.writeStartElement("a:lstStyle"),n.writeEndElement(),n.writeStartElement("a:p"),n.writeStartElement("a:endParaRPr"),n.writeAttributeString("lang","ru-RU"),n.writeEndElement(),n.writeFullEndElement(),n.writeFullEndElement(),n.writeFullEndElement(),n.writeStartElement("p:sp"),n.writeStartElement("p:nvSpPr"),n.writeStartElement("p:cNvPr"),n.writeAttributeString("id","4"),n.writeAttributeString("name","Slide Number Placeholder 3"),n.writeEndElement(),n.writeStartElement("p:cNvSpPr"),n.writeStartElement("a:spLocks"),n.writeAttributeString("noGrp","1"),n.writeEndElement(),n.writeFullEndElement(),n.writeStartElement("p:nvPr"),n.writeStartElement("p:ph"),n.writeAttributeString("type","sldNum"),n.writeAttributeString("sz","quarter"),n.writeAttributeString("idx","12"),n.writeEndElement(),n.writeFullEndElement(),n.writeFullEndElement(),n.writeStartElement("p:spPr"),n.writeEndElement(),n.writeStartElement("p:txBody"),n.writeStartElement("a:bodyPr"),n.writeEndElement(),n.writeStartElement("a:lstStyle"),n.writeEndElement(),n.writeStartElement("a:p"),n.writeStartElement("a:fld"),n.writeAttributeString("id","{F548980B-80A5-4AC9-8F15-D7D0FD0AEED9}"),n.writeAttributeString("type","slidenum"),n.writeStartElement("a:rPr"),n.writeAttributeString("lang","ru-RU"),n.writeAttributeString("smtClean","0"),n.writeEndElement(),n.writeStartElement("a:t"),n.writeString("‹#›"),n.writeFullEndElement(),n.writeFullEndElement(),n.writeStartElement("a:endParaRPr"),n.writeAttributeString("lang","ru-RU"),n.writeEndElement(),n.writeFullEndElement(),n.writeFullEndElement(),n.writeFullEndElement(),!(t.Base.izjrG.dVOOk.TvUDM()||t.Base.izjrG.dVOOk.AWlWm()||(t.Base.izjrG.dVOOk.ekkVf()||t.Base.izjrG.dVOOk.yoidW()||t.Base.izjrG.dVOOk.ohwaJ())&&t.System.NodeJs.isStandaloneVersion)){var a=r.unit.convertToHInches(r.pageWidth-r.margins.left-r.margins.right),s=r.unit.convertToHInches(r.pageHeight-r.margins.top-r.margins.bottom),l=r.unit.convertToHInches(r.margins.left),m=r.unit.convertToHInches(r.margins.top);n.writeRaw(''+''+''+''+''+''+"Trial")}n.writeFullEndElement(),n.writeFullEndElement()}if(8==e){n.writeAttributeString("type","objTx"),n.writeAttributeString("preserve","1");var o=''+'Click to edit Master title style'+'Click to edit Master text stylesSecond levelThird levelFourth levelFifth level'+''+'Click to edit Master text styles'+'15.04.2009'+'‹#›';n.writeRaw(o)}if(9==e){n.writeAttributeString("type","picTx"),n.writeAttributeString("preserve","1");var o=''+'Click to edit Master title style'+''+''+'Click to edit Master text styles'+'15.04.2009'+'‹#›';n.writeRaw(o)}if(10==e){n.writeAttributeString("type","vertTx"),n.writeAttributeString("preserve","1");var o='Click to edit Master title style'+'Click to edit Master text stylesSecond levelThird levelFourth level'+'Fifth level15.04.2009'+'‹#›';n.writeRaw(o)}if(11==e){n.writeAttributeString("type","vertTitleAndTx"),n.writeAttributeString("preserve","1");var o=''+'Click to edit Master title styleClick to edit Master text stylesSecond level'+'Third levelFourth levelFifth level'+'15.04.2009'+'‹#›';n.writeRaw(o)}return n.writeStartElement("p:clrMapOvr"),n.writeStartElement("a:masterClrMapping"),n.writeEndElement(),n.writeFullEndElement(),n.writeFullEndElement(),n.writeEndDocument(),n.flush(),i},D.prototype.writePresentationRels=function(t){var e=new R,r=new F(C.UTF8,e);r.indentation=this.xmlIndentation<0?0:this.xmlIndentation,r.formatting=this.xmlIndentation<0?L.None:L.Indented,r.writeStartDocument(),r.writeStartElement("Relationships"),r.writeAttributeString("xmlns","http://schemas.openxmlformats.org/package/2006/relationships"),r.writeStartElement("Relationship"),r.writeAttributeString("Id","rId1"),r.writeAttributeString("Type","http://schemas.openxmlformats.org/officeDocument/2006/relationships/tableStyles"),r.writeAttributeString("Target","tableStyles.xml"),r.writeEndElement(),r.writeStartElement("Relationship"),r.writeAttributeString("Id","rId2"),r.writeAttributeString("Type","http://schemas.openxmlformats.org/officeDocument/2006/relationships/viewProps"),r.writeAttributeString("Target","viewProps.xml"),r.writeEndElement(),r.writeStartElement("Relationship"),r.writeAttributeString("Id","rId3"),r.writeAttributeString("Type","http://schemas.openxmlformats.org/officeDocument/2006/relationships/presProps"),r.writeAttributeString("Target","presProps.xml"),r.writeEndElement(),r.writeStartElement("Relationship"),r.writeAttributeString("Id","rId4"),r.writeAttributeString("Type","http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme"),r.writeAttributeString("Target","theme/theme1.xml"),r.writeEndElement(),r.writeStartElement("Relationship"),r.writeAttributeString("Id","rId5"),r.writeAttributeString("Type","http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideMaster"),r.writeAttributeString("Target","slideMasters/slideMaster1.xml"),r.writeEndElement();for(var i=0;ithis.imageListOffset)for(var n=0;n0)for(var n=0;n0&&c.height>0){var p=c.stimulsoft.as(y);if(null==p||p.checkAllowHtmlTags())if(c.stimulsoft.is(b)){var g=new y(c.clientRectangle);g.page=c.page,g.border=c.stimulsoft.as(b).border,g.brush=c.stimulsoft.as(b).brush,g.hyperlinkValue=c.hyperlinkValue,this.writeStiTextbox(a,g)}else this.writeStiImage(a,c);else{var h=p.angle%360;if(h<0&&(h=360+h),0==h||90==h||270==h)this.writeStiTextbox(a,c);else{var w=p.clone(!0);w.text=null,w.angle=0,this.writeStiTextbox(a,w),(w=p.clone(!0)).border=null,w.brush=null,w.horAlignment=StiTextHorAlignment.Center,w.vertAlignment=StiVertAlignment.Center,this.writeStiTextbox(a,w)}}this.idCounter++}}}catch(t){i={error:t}}finally{try{m&&!m.done&&(n=l.return)&&n.call(l)}finally{if(i)throw i.error}}if(this.writeWatermark(a,s,!1),!(t.Base.izjrG.dVOOk.TvUDM()||t.Base.izjrG.dVOOk.AWlWm()||(t.Base.izjrG.dVOOk.ekkVf()||t.Base.izjrG.dVOOk.yoidW()||t.Base.izjrG.dVOOk.ohwaJ())&&t.System.NodeJs.isStandaloneVersion)){var u=s.unit.convertToHInches(s.pageWidth-s.margins.left-s.margins.right),d=s.unit.convertToHInches(s.pageHeight-s.margins.top-s.margins.bottom),S=s.unit.convertToHInches(s.margins.left),f=s.unit.convertToHInches(s.margins.top);a.writeRaw(''+''+''+''+''+''+"Trial")}return a.writeFullEndElement(),a.writeEndElement(),a.writeStartElement("p:clrMapOvr"),a.writeStartElement("a:masterClrMapping"),a.writeEndElement(),a.writeFullEndElement(),a.writeFullEndElement(),a.writeEndDocument(),a.flush(),o},D.prototype.writeStiTextbox=function(t,e){var r=e;t.writeStartElement("p:sp"),t.writeStartElement("p:nvSpPr"),t.writeStartElement("p:cNvPr"),t.writeAttributeString("id",A.format("{0}",this.idCounter)),t.writeAttributeString("name",A.format("TextBox {0}",this.idCounter)),this.writeHyperlinkInfo(t,e),t.writeEndElement(),t.writeStartElement("p:cNvSpPr"),t.writeAttributeString("txBox","1"),t.writeEndElement(),t.writeStartElement("p:nvPr"),t.writeEndElement(),t.writeEndElement();var i=this.writeSpPr(t,e);t.writeStartElement("p:txBody"),t.writeStartElement("a:bodyPr");var n=!1,o="";if(null!=r.textOptions){n=r.textOptions.wordWrap;var a=r.textOptions.angle%360;a<0&&(a=360+a),90==a&&(o="vert270"),270==a&&(o="vert")}o.length>0&&t.writeAttributeString("vert",o),t.writeAttributeString("horzOverflow","clip"),t.writeAttributeString("vertOverflow","clip");var s=this.convertToEmu(r.margins.left),l=this.convertToEmu(r.margins.right),m=this.convertToEmu(r.margins.top),c=this.convertToEmu(r.margins.bottom);t.writeAttributeString("lIns",A.format("{0}",s)),t.writeAttributeString("tIns",A.format("{0}",m)),t.writeAttributeString("rIns",A.format("{0}",l)),t.writeAttributeString("bIns",A.format("{0}",c)),t.writeAttributeString("wrap",n?"square":"none"),t.writeAttributeString("rtlCol","0");var p="t";r.vertAlignment==StiVertAlignment.Center&&(p="ctr"),r.vertAlignment==StiVertAlignment.Bottom&&(p="b"),t.writeAttributeString("anchor",p),t.writeAttributeString("anchorCtr","0"),t.writeStartElement("a:noAutofit"),t.writeEndElement(),t.writeEndElement(),t.writeStartElement("a:lstStyle"),t.writeEndElement(),t.writeStartElement("a:p");var g=!1;null!=r.textOptions&&(g=r.textOptions.rightToLeft),t.writeStartElement("a:pPr");var h="";r.horAlignment==StiTextHorAlignment.Center&&(h="ctr"),(r.horAlignment==StiTextHorAlignment.Right&&!g||r.horAlignment==StiTextHorAlignment.Left&&g)&&(h="r"),r.horAlignment==StiTextHorAlignment.Width&&(h="just"),h.length>0&&t.writeAttributeString("algn",h),g&&t.writeAttributeString("rtl","1"),t.writeStartElement("a:lnSpc"),t.writeStartElement("a:spcPct"),t.writeAttributeString("val",Math.round(.94*r.lineSpacing*1e5).toString()),t.writeEndElement(),t.writeEndElement(),t.writeEndElement(),t.writeStartElement("a:r"),t.writeStartElement("a:rPr"),t.writeAttributeString("lang","en-US"),t.writeAttributeString("sz",(100*r.font.sizeInPoints*.984|0).toString()),r.font.bold&&t.writeAttributeString("b","1"),r.font.italic&&t.writeAttributeString("i","1"),r.font.underline&&t.writeAttributeString("u","sng"),r.font.strikeout&&t.writeAttributeString("strike","sngStrike"),t.writeAttributeString("dirty","0"),t.writeAttributeString("smtClean","0"),t.writeStartElement("a:solidFill"),this.writeColor(t,E.toColor(r.textBrush)),t.writeFullEndElement();var w="";null!=r.text&&(w=r.text.toString()),r.textQuality!=v.Wysiwyg&&r.horAlignment!=StiTextHorAlignment.Width||A.isNullOrEmpty(w)||!w.stimulsoft.endsWith(f.StiForceWidthAlignTag)||(w=w.substr(0,w.length-f.StiForceWidthAlignTag.length)),t.writeStartElement("a:latin"),t.writeAttributeString("typeface",r.font.name),t.writeAttributeString("pitchFamily","18"),t.writeAttributeString("charset","0"),t.writeEndElement(),t.writeStartElement("a:cs"),t.writeAttributeString("typeface",r.font.name),t.writeAttributeString("pitchFamily","18"),t.writeAttributeString("charset","0"),t.writeEndElement(),t.writeEndElement(),t.writeElementString("a:t",w),t.writeEndElement(),t.writeEndElement(),t.writeEndElement(),t.writeEndElement(),i&&this.writeBorder(t,e)},D.prototype.writeStiImage=function(t,r){var i=!1,n=r.stimulsoft.as(S);if(null!=n){var o=null;if(r.isExportAsImage(e.StiExportFormat.Ppt2007))try{P.currentCulture=this.currentCulture;var a={ref:this.imageResolution};o=n.getImage(a,e.StiExportFormat.ImagePng)}finally{P.currentCulture=this.newCulture}if(null!=o){var s=this.imageCache.addImageInt(o);o.dispose(),t.writeStartElement("p:pic"),t.writeStartElement("p:nvPicPr"),t.writeStartElement("p:cNvPr"),t.writeAttributeString("id",A.format("{0}",this.idCounter)),t.writeAttributeString("name",A.format("Picture {0}",this.idCounter+1)),t.writeAttributeString("descr",A.format("Picture {0} description",this.idCounter+1)),this.writeHyperlinkInfo(t,r),t.writeEndElement(),t.writeStartElement("p:cNvPicPr"),t.writeStartElement("a:picLocks"),t.writeAttributeString("noChangeAspect","1"),t.writeEndElement(),t.writeFullEndElement(),t.writeStartElement("p:nvPr"),t.writeEndElement(),t.writeFullEndElement(),t.writeStartElement("p:blipFill"),t.writeStartElement("a:blip"),t.writeAttributeString("r:embed",A.format("rId{0}",1+this.imageCache.imageIndex.stimulsoft.countItems-this.imageListOffset)),t.writeEndElement(),t.writeStartElement("a:stretch"),t.writeStartElement("a:fillRect"),t.writeEndElement(),t.writeFullEndElement(),t.writeFullEndElement(),i=this.writeSpPr(t,r),t.writeFullEndElement()}}(i||r.stimulsoft.is(d))&&this.writeBorder(t,r)},D.prototype.writeSpPr=function(t,e){var r=this.convertToEmu(e.report.unit.convertToHInches(e.left+e.page.margins.left)),n=this.convertToEmu(e.report.unit.convertToHInches(e.top+e.page.margins.top)),a=this.convertToEmu(e.report.unit.convertToHInches(e.right+e.page.margins.left)),s=this.convertToEmu(e.report.unit.convertToHInches(e.bottom+e.page.margins.top)),l=0,m=e.stimulsoft.as(u);null!=m&&null!=m.textOptions&&(90!=(l=m.textOptions.angle%360)&&270!=l&&-90!=l&&-270!=l||(l=0)),t.writeStartElement("p:spPr"),t.writeStartElement("a:xfrm"),0!=l&&t.writeAttributeString("rot",A.format("{0}",0|Math.round(6e4*-l))),t.writeStartElement("a:off"),t.writeAttributeString("x",A.format("{0}",r)),t.writeAttributeString("y",A.format("{0}",n)),t.writeEndElement(),t.writeStartElement("a:ext"),t.writeAttributeString("cx",A.format("{0}",a-r)),t.writeAttributeString("cy",A.format("{0}",s-n)),t.writeEndElement(),t.writeEndElement(),t.writeStartElement("a:prstGeom"),t.writeAttributeString("prst","rect"),t.writeStartElement("a:avLst"),t.writeEndElement(),t.writeEndElement();var d=e.stimulsoft.is(h)||e.stimulsoft.is(o),S=Color.transparent;e.stimulsoft.is(w)&&(S=E.toColor(e.stimulsoft.as(w).brush)),0==S.a||d?(t.writeStartElement("a:noFill"),t.writeEndElement()):(t.writeStartElement("a:solidFill"),this.writeColor(t,S),t.writeFullEndElement());var f=!1,v=null;return e.stimulsoft.is(g)&&(v=e.stimulsoft.as(g).border),null!=v&&v.side!=p.None&&v.style!=i.None&&(v.side!=p.All||v.stimulsoft.is(c)?f=!0:(t.writeStartElement("a:ln"),t.writeAttributeString("w",A.format("{0}",this.convertToEmu(v.size))),t.writeStartElement("a:solidFill"),this.writeColor(t,v.color),t.writeFullEndElement(),t.writeStartElement("a:prstDash"),t.writeAttributeString("val",this.getLineStyle(v.style)),t.writeEndElement(),t.writeStartElement("a:miter"),t.writeAttributeString("lim","800000"),t.writeEndElement(),t.writeFullEndElement())),t.writeEndElement(),f},D.prototype.writeBorder=function(t,e){var r=e.stimulsoft.as(g).border;if(r.stimulsoft.is(c)){var i=r.stimulsoft.as(c);i.isLeftBorderSidePresent&&this.writeLine(t,e,new Rectangle(e.left,e.top,0,e.height),i.leftSide.size,i.leftSide.style,i.leftSide.color),i.isRightBorderSidePresent&&this.writeLine(t,e,new Rectangle(e.right,e.top,0,e.height),i.rightSide.size,i.rightSide.style,i.rightSide.color),i.isTopBorderSidePresent&&this.writeLine(t,e,new Rectangle(e.left,e.top,e.width,0),i.topSide.size,i.topSide.style,i.topSide.color),i.isBottomBorderSidePresent&&this.writeLine(t,e,new Rectangle(e.left,e.bottom,e.width,0),i.bottomSide.size,i.bottomSide.style,i.bottomSide.color)}else r.isLeftBorderSidePresent&&this.writeLine(t,e,new Rectangle(e.left,e.top,0,e.height),r.size,r.style,r.color),r.isRightBorderSidePresent&&this.writeLine(t,e,new Rectangle(e.right,e.top,0,e.height),r.size,r.style,r.color),r.isTopBorderSidePresent&&this.writeLine(t,e,new Rectangle(e.left,e.top,e.width,0),r.size,r.style,r.color),r.isBottomBorderSidePresent&&this.writeLine(t,e,new Rectangle(e.left,e.bottom,e.width,0),r.size,r.style,r.color)},D.prototype.writeLine=function(t,e,r,n,o,a){if(o==i.None||0==a.a)return;t.writeStartElement("p:cxnSp"),t.writeStartElement("p:nvCxnSpPr"),t.writeStartElement("p:cNvPr"),t.writeAttributeString("id",A.format("{0}",this.idCounter)),t.writeAttributeString("name",A.format("Line {0}",this.idCounter)),t.writeEndElement(),t.writeStartElement("p:cNvCxnSpPr"),t.writeEndElement(),t.writeStartElement("p:nvPr"),t.writeEndElement(),t.writeEndElement();var s=this.convertToEmu(e.report.unit.convertToHInches(r.left+e.page.margins.left)),c=this.convertToEmu(e.report.unit.convertToHInches(r.top+e.page.margins.top)),p=this.convertToEmu(e.report.unit.convertToHInches(r.right+e.page.margins.left)),g=this.convertToEmu(e.report.unit.convertToHInches(r.bottom+e.page.margins.top));t.writeStartElement("p:spPr"),t.writeStartElement("a:xfrm"),t.writeStartElement("a:off"),t.writeAttributeString("x",A.format("{0}",s)),t.writeAttributeString("y",A.format("{0}",c)),t.writeEndElement(),t.writeStartElement("a:ext"),t.writeAttributeString("cx",A.format("{0}",p-s)),t.writeAttributeString("cy",A.format("{0}",g-c)),t.writeEndElement(),t.writeEndElement(),t.writeStartElement("a:prstGeom"),t.writeAttributeString("prst","line"),t.writeStartElement("a:avLst"),t.writeEndElement(),t.writeEndElement(),t.writeStartElement("a:ln"),t.writeAttributeString("w",A.format("{0}",this.convertToEmu(n))),t.writeStartElement("a:solidFill"),this.writeColor(t,a),t.writeFullEndElement(),t.writeStartElement("a:prstDash"),t.writeAttributeString("val",this.getLineStyle(o)),t.writeEndElement();var h=e.stimulsoft.as(d);if(null!=h){var w=null,u=null;if(h.stimulsoft.is(m)&&(w=h.stimulsoft.as(m).startCap,u=h.stimulsoft.as(m).endCap),h.stimulsoft.is(l)&&(w=h.stimulsoft.as(l).startCap,u=h.stimulsoft.as(l).endCap),null!=w){var S=this.capStyleToPptStyle(w.style);A.isNullOrEmpty(S)||(t.writeStartElement("a:headEnd"),t.writeAttributeString("type",S),t.writeEndElement())}if(null!=u){var S=this.capStyleToPptStyle(u.style);A.isNullOrEmpty(S)||(t.writeStartElement("a:tailEnd"),t.writeAttributeString("type",S),t.writeEndElement())}}t.writeFullEndElement(),t.writeEndElement(),t.writeEndElement()},D.prototype.capStyleToPptStyle=function(t){switch(t){case s.Arrow:return"triangle";case s.Diamond:return"diamond";case s.Square:return"diamond";case s.Open:return"arrow";case s.Oval:return"oval";case s.Stealth:return"stealth"}return null},D.prototype.writeWatermark=function(t,e,r){if(null!=e.watermark&&(null!=e.watermark.image||!A.isNullOrWhiteSpace(e.watermark.imageHyperlink))&&e.watermark.showImageBehind==r){var i=new o;i.page=e,i.image=e.watermark.image,i.left=-e.margins.left,i.top=-e.margins.top,i.width=e.pageWidth,i.height=e.pageHeight,e.watermark.imageStretch&&(i.stretch=!0),i.vertAlignment=StiVertAlignment.Center,i.horAlignment=a.Center,this.writeStiImage(t,i)}},D.prototype.writeHyperlinkInfo=function(t,e){if(null!=e.hyperlinkValue){var r=e.hyperlinkValue.toString().trim(),i=void 0;if(r.length>0&&!r.stimulsoft.startsWith("javascript:"))if(r.stimulsoft.startsWith("#"));else{var n=this.stringToUrl(r);-1==(i=this.hyperlinkList.indexOf(n))&&(this.hyperlinkList.push(n),i=this.hyperlinkList.stimulsoft.countItems),t.writeStartElement("a:hlinkClick"),t.writeAttributeString("r:id",A.format("hId{0}",i)),t.writeEndElement()}}},D.prototype.writeImage=function(t){var e=new R,r=this.imageCache.imagePackedStore.stimulsoft.getByIndex(t);return e.write(r,0,r.length),e},D.prototype.exportPowerPoint=function(r,i,o){e.StiLogService.write(this.stimulsoft.getType(),"Export report to PowerPoint 2007 format");var a=o.pageRange;this.imageResolution=o.imageResolution,this.imageQuality=o.imageQuality,this.xmlIndentation=-1,this.imageResolution<10&&(this.imageResolution=10),this.imageResolution=this.imageResolution/100,this.currentCulture=P.currentCulture,this.newCulture=P.cultures["en-US"];try{P.currentCulture=this.newCulture;var s=a.getSelectedPages(r.renderedPages);if(this.isStopped)return;this.imageCache=new e.StiImageCache(t["StiOptions"].Export.PowerPoint.AllowImageComparer,!0,t["StiOptions"].Export.PowerPoint.StoreImagesAsPng?e.ImageFormat.Png:e.ImageFormat.Jpeg,this.imageQuality);var l=new n;l.begin(i,!0),l.addFile("[Content_Types].xml",this.writeContentTypes(s.count)),l.addFile("_rels/.rels",this.writeMainRels()),l.addFile("docProps/app.xml",this.writeDocPropsApp(s.count)),l.addFile("docProps/core.xml",this.writeDocPropsCore()),l.addFile("ppt/tableStyles.xml",this.writeTableStyles()),l.addFile("ppt/presProps.xml",this.writePresProps()),l.addFile("ppt/viewProps.xml",this.writeViewProps()),l.addFile("ppt/theme/theme1.xml",this.writeTheme()),l.addFile("ppt/slideMasters/slideMaster1.xml",this.writeSlideMaster()),l.addFile("ppt/slideMasters/_rels/slideMaster1.xml.rels",this.writeSlideMasterRels());for(var m=0;m<11;m++)l.addFile(A.format("ppt/slideLayouts/slideLayout{0}.xml",m+1),this.writeSlideLayout(m+1,s.getByIndex(0))),l.addFile(A.format("ppt/slideLayouts/_rels/slideLayout{0}.xml.rels",m+1),this.writeSlideLayoutRels());l.addFile("ppt/presentation.xml",this.writePresentation(s)),l.addFile("ppt/_rels/presentation.xml.rels",this.writePresentationRels(s)),this.imageListOffset=0,this.hyperlinkList=[];for(var c=0;c0)for(var m=0;m[^`{|}",e}return __extends(D,I),D.prototype.implements=function(){return[r.IStiWord2007ExportService]},Object.defineProperty(D.prototype,"defaultExtension",{get:function(){return"docx"},enumerable:!1,configurable:!0}),Object.defineProperty(D.prototype,"exportFormat",{get:function(){return e.StiExportFormat.Word2007},enumerable:!1,configurable:!0}),Object.defineProperty(D.prototype,"groupCategory",{get:function(){return"Word"},enumerable:!1,configurable:!0}),Object.defineProperty(D.prototype,"position",{get:function(){return r.StiExportPosition.Word2007},enumerable:!1,configurable:!0}),Object.defineProperty(D.prototype,"exportNameInMenu",{get:function(){return L.get("Export","ExportTypeWord2007File")},enumerable:!1,configurable:!0}),D.prototype.exportTo=function(t,e,r){this.exportWord(t,e,r)},D.prototype.exportToAsync=function(e,r,i,n){var o=this;t.Report.Export.StiExportImageHelper.convertAllImages(r,t.System.Drawing.Imaging.ImageFormat.Jpeg).try((function(){o.exportTo(r,i,n),null!=r&&null!=r.preparedExportImages&&(r.preparedExportImages.clear(),r.preparedExportImages=null),e()}))},Object.defineProperty(D.prototype,"multipleFiles",{get:function(){return!1},enumerable:!1,configurable:!0}),D.prototype.getFilter=function(){return L.get("FileFilters","Word2007Files")},Object.defineProperty(D.prototype,"matrix",{get:function(){return this._matrix},enumerable:!1,configurable:!0}),Object.defineProperty(D.prototype,"removeEmptySpaceAtBottom",{get:function(){return this._removeEmptySpaceAtBottom},enumerable:!1,configurable:!0}),D.prototype.checkFontsToCorrectHeight=function(t){return"Arial Unicode MS"==t||"Microsoft YaHei"==t},D.prototype.getLineStyle=function(t){switch(t){case A.Solid:return"single";case A.Dot:return"dotted";case A.Dash:return"dashSmallGap";case A.DashDot:return"dotDash";case A.DashDotDot:return"dotDotDash";case A.Double:return"double";default:return""}},D.prototype.getColorString=function(t){if(0==t.a)return"auto";if(t.a<32)return"FFFFFF";return n.format("{0:X8}",t.toArgb()).substr(2)},D.prototype.getStyleNumber=function(t,e){if(t.length>0)for(var r=0;r0&&null!=i.toString()[0]&&S.isDigit(i.toString()[0])&&i.insert(0,"b"),i.toString()},D.prototype.writeFromMatrix=function(o,a,s,l){for(var m,c,p=this.matrix.coordX.countItems,d=this.matrix.coordY.countItems,S=i.create(Number,p),f=this.matrix.coordX.getKeys(),v=0;v=a&&x-1<=s;0==l&&(this.matrix.linePlacement[x-1]!=r.StiTableLineInfo.PageHeader&&this.matrix.linePlacement[x-1]!=r.StiTableLineInfo.PageFooter&&this.matrix.linePlacement[x-1]!=r.StiTableLineInfo.Trash||(B=!1)),P>0&&(P--,B=!1);var k=100005,R=[],I=!1;if(B)for(var N=1;N0&&(k=0))}}k*=D.hiToTwips;var W=Math.round2(k);if(I&&(T&&(o.writeFullEndElement(),T=!1),o.writeStartElement("w:p"),o.writeStartElement("w:r"),o.writeStartElement("w:br"),o.writeAttributeString("w:type","page"),o.writeEndElement(),o.writeEndElement(),o.writeEndElement()),B){if(this.usePageHeadersAndFooters&&this.matrix.linePlacement[x-1]==r.StiTableLineInfo.HeaderAP){var U=this.matrix.parentBandName[x-1],X=U.indexOf("");-1!=X&&(U=U.substr(0,X)),U!=F&&(F=U,T&&o.writeFullEndElement(),o.writeStartElement("w:p"),o.writeEndElement(),o.writeStartElement("w:tbl"),this.writeTableInfo(o,S,p),T=!0)}T||(o.writeStartElement("w:tbl"),this.writeTableInfo(o,S,p),T=!0),o.writeStartElement("w:tr");var z=b[x]-b[x-1];o.writeStartElement("w:trPr"),this.usePageHeadersAndFooters&&!t["StiOptions"].Export.Word.forceLineHeight||(o.writeStartElement("w:trHeight"),(!this.usePageHeadersAndFooters&&t["StiOptions"].Export.Word.lineHeightExactly||this.usePageHeadersAndFooters&&t["StiOptions"].Export.Word.lineHeightExactlyForPHFMode)&&o.writeAttributeString("w:hRule","exact"),o.writeAttributeString("w:val",n.format("{0}",z)),o.writeEndElement()),this.usePageHeadersAndFooters&&this.matrix.linePlacement[x-1]==r.StiTableLineInfo.HeaderAP&&(o.writeStartElement("w:tblHeader"),o.writeEndElement()),o.writeEndElement()}for(var V=0,v=1;v0)for(var j=1;j<=O.height;j++)C[x+j][v]=!0}if(B){if(o.writeStartElement("w:tc"),null!=O){o.writeStartElement("w:tcPr");for(var q=0,K=0;K0&&(o.writeStartElement("w:gridSpan"),o.writeAttributeString("w:val",n.format("{0}",O.width+1)),o.writeEndElement()),O.height>0&&(C[x][v]?(o.writeStartElement("w:vMerge"),o.writeEndElement()):(o.writeStartElement("w:vMerge"),o.writeAttributeString("w:val","restart"),o.writeEndElement())),null!=O.cellStyle.textOptions){var Q=O.cellStyle.textOptions.angle,J="";Q>45&&Q<135&&(J="btLr"),Q>225&&Q<315&&(J="tbRl"),""!=J&&(o.writeStartElement("w:textDirection"),o.writeAttributeString("w:val",J),o.writeEndElement())}var Z=O.component.stimulsoft.is(u)&&O.component.checkAllowHtmlTags()&&!t["StiOptions"].Export.Word.renderHtmlTagsAsImage;if(G&&O.component.stimulsoft.is(u)&&(!O.component.isExportAsImage(e.StiExportFormat.Word2007)||Z)){var $=O.component,tt=this.convert($.margins.left),et=this.convert($.margins.right-t["StiOptions"].Export.Word.rightMarginCorrection),rt=this.convert($.margins.top);rt>W&&(rt=W),(tt>0||et>0||rt>0)&&(o.writeStartElement("w:tcMar"),rt>0&&(o.writeStartElement("w:top"),o.writeAttributeString("w:w",n.format("{0}",rt)),o.writeAttributeString("w:type","dxa"),o.writeEndElement()),tt>0&&(o.writeStartElement("w:left"),o.writeAttributeString("w:w",n.format("{0}",tt)),o.writeAttributeString("w:type","dxa"),o.writeEndElement()),et>0&&(o.writeStartElement("w:right"),o.writeAttributeString("w:w",n.format("{0}",et)),o.writeAttributeString("w:type","dxa"),o.writeEndElement()),o.writeEndElement())}var it="";switch(O.cellStyle.vertAlignment){case h.Center:it="center";break;case h.Bottom:it="bottom";break}""!=it&&(o.writeStartElement("w:vAlign"),o.writeAttributeString("w:val",it),o.writeEndElement()),this.writeBorders(o,O.top,O.left,O.height+1,O.width+1),O.component.isExportAsImage(e.StiExportFormat.Word2007)||(o.writeStartElement("w:shd"),o.writeAttributeString("w:val","clear"),o.writeAttributeString("w:color","auto"),o.writeAttributeString("w:fill",this.getColorString(O.cellStyle.color)),o.writeEndElement()),o.writeEndElement();var nt=this.restrictEditing==r.StiWord2007RestrictEditing.ExceptEditableFields&&null!=O.component&&O.component.stimulsoft.is(u)&&O.component.editable;nt&&(o.writeStartElement("w:permStart"),o.writeAttributeString("w:id","0"),o.writeEndElement());var ot=!0;if(G){var at={ref:ot};this.writeCellContent(o,O,at,x,v,S,b),ot=at.ref}ot&&(o.writeStartElement("w:p"),o.writeFullEndElement()),nt&&(o.writeStartElement("w:permEnd"),o.writeAttributeString("w:id","0"),o.writeEndElement())}else{var st=null,lt={ref:st},mt=this.renderBorder2TableGetValues(x,v,lt),ct=0;if(0==(mt&g.Right)){while(v+ct+10)break;if((ht&(g.Top|g.Bottom))!=(mt&(g.Top|g.Bottom)))break;if(st!=pt)break;if(ct++,(ht&g.Right)>0)break}if(ct>0)for(var _=1;_<=ct;_++)L[x][v+_]=!0}o.writeStartElement("w:tcPr");var q=S[v+ct]-S[v-1];o.writeStartElement("w:tcW"),o.writeAttributeString("w:w",n.format("{0}",q)),o.writeAttributeString("w:type","dxa"),o.writeEndElement(),ct>0&&(o.writeStartElement("w:gridSpan"),o.writeAttributeString("w:val",n.format("{0}",ct+1)),o.writeEndElement()),this.writeBorders(o,x-1,v-1,1,ct+1),o.writeEndElement(),o.writeStartElement("w:p"),o.writeFullEndElement()}o.writeFullEndElement()}}if(V>=64)break}B&&o.writeFullEndElement();try{for(var wt=(m=void 0,__values(R)),ut=wt.next();!ut.done;ut=wt.next()){var dt=ut.value;T&&o.writeEndElement(),T=!1,P=dt.height;var St=!1,ft={ref:St};this.writeCellContent(o,dt,ft,dt.top+1,dt.left+1,S,b),St=ft.ref}}catch(t){m={error:t}}finally{try{ut&&!ut.done&&(c=wt.return)&&c.call(wt)}finally{if(m)throw m.error}}}T&&o.writeEndElement()},D.prototype.writeCellContent=function(r,i,o,a,s,l,m){var c,p,g,h,d=o.ref,v=null,b=-1,x=this.matrix.bookmarks[a-1][s-1];null==x||this.bookmarkList.containsKey(x)||(b=this.bookmarkList.count,v=this.convertStringToBookmark(x),this.bookmarkList.set(x,b));var A=null,T=-1;if(null!=i.component&&null!=i.component.hyperlinkValue){var L=i.component.hyperlinkValue.toString().trim();L.length>0&&!L.stimulsoft.startsWith("javascript:")&&(L.stimulsoft.startsWith("#")?A=this.convertStringToBookmark(L.substr(1)):(A=this.stringToUrl(L),this.hyperlinkList.containsKey(A)?T=Math.trunc(this.hyperlinkList.get(A)):(T=this.hyperlinkList.count,this.hyperlinkList.add(A,T))))}if(!i.component.stimulsoft.is(u)||i.component.isExportAsImage(e.StiExportFormat.Word2007)||i.component.checkAllowHtmlTags())if(i.component.stimulsoft.is(w)&&!t["StiOptions"].Export.Word.renderRichTextAsImage)var F=i.component;else if(i.component.stimulsoft.is(u)&&i.component.checkAllowHtmlTags()&&!t["StiOptions"].Export.Word.renderHtmlTagsAsImage)n.isNullOrWhiteSpace(i.text)||this.writeHtmlTags(r,i);else if(i.component.isExportAsImage(e.StiExportFormat.Word2007)){var B=i.component.stimulsoft.as(k);if(null!=B){var R=this.imageResolution,I={ref:R},D=B.getImage(I);if(R=I.ref,null!=D){var N=this.matrix.getRealImageData(i,D);d=!1;var O=0;O=null!=N?this.imageCache.addImageIntRaw(N,N.imageFormat):this.imageCache.addImageIntRaw(D,D.imageFormat);var H=-1,M=-1;r.writeStartElement("w:p"),r.writeStartElement("w:pPr");var W=i.cellStyle.horAlignment,U=!1;if(null!=i.cellStyle.textOptions&&(U=i.cellStyle.textOptions.rightToLeft),null==i.component.stimulsoft.as(y))var X=i.component.stimulsoft.as(C);var z="";(W==P.Left&&1==U||W==P.Right&&0==U)&&(z="right"),W==P.Center&&(z="center"),W==P.Width&&(z="both"),""!=z&&(r.writeStartElement("w:jc"),r.writeAttributeString("w:val",z),r.writeEndElement()),r.writeEndElement(),-1!=b&&(r.writeStartElement("w:bookmarkStart"),r.writeAttributeString("w:id",b.toString()),r.writeAttributeString("w:name",v),r.writeEndElement()),r.writeStartElement("w:r"),r.writeStartElement("w:rPr"),r.writeElementString("w:noProof",""),r.writeEndElement(),r.writeStartElement("w:drawing"),r.writeStartElement("wp:inline"),r.writeAttributeString("distT","0"),r.writeAttributeString("distB","0"),r.writeAttributeString("distL","0"),r.writeAttributeString("distR","0");var V=m[a-1+i.height+1]-m[a-1],G=l[s-1+i.width+1]-l[s-1];-1!=H&&(G=H,V=M),r.writeStartElement("wp:extent"),r.writeAttributeString("cx",n.format("{0}",this.convertTwipsToEmu(G))),r.writeAttributeString("cy",n.format("{0}",this.convertTwipsToEmu(V))),r.writeEndElement(),r.writeStartElement("wp:effectExtent"),r.writeAttributeString("l","0"),r.writeAttributeString("t","0"),r.writeAttributeString("r","0"),r.writeAttributeString("b","0"),r.writeEndElement(),r.writeStartElement("wp:docPr"),r.writeAttributeString("id",n.format("{0}",O+2)),r.writeAttributeString("name",n.format("Picture {0}",O+1)),r.writeAttributeString("descr",n.format("Image{0:D5}.jpg",O+1)),null!=A&&(-1==T&&(A="#"+A,this.hyperlinkList.containsKey(A)?T=this.hyperlinkList.get(A):(T=this.hyperlinkList.count,this.hyperlinkList.add(A,T))),r.writeStartElement("a:hlinkClick"),r.writeAttributeString("xmlns:a","http://schemas.openxmlformats.org/drawingml/2006/main"),r.writeAttributeString("r:id",n.format("hId{0}",T)),r.writeEndElement()),r.writeEndElement(),r.writeStartElement("wp:cNvGraphicFramePr"),r.writeStartElement("a:graphicFrameLocks"),r.writeAttributeString("xmlns:a","http://schemas.openxmlformats.org/drawingml/2006/main"),r.writeAttributeString("noChangeAspect","1"),r.writeEndElement(),r.writeEndElement(),r.writeStartElement("a:graphic"),r.writeAttributeString("xmlns:a","http://schemas.openxmlformats.org/drawingml/2006/main"),r.writeStartElement("a:graphicData"),r.writeAttributeString("uri","http://schemas.openxmlformats.org/drawingml/2006/picture"),r.writeStartElement("pic:pic"),r.writeAttributeString("xmlns:pic","http://schemas.openxmlformats.org/drawingml/2006/picture"),r.writeStartElement("pic:nvPicPr"),r.writeStartElement("pic:cNvPr"),r.writeAttributeString("id","0"),r.writeAttributeString("name",n.format("Image{0:D5}.jpg",O+1)),r.writeEndElement(),r.writeStartElement("pic:cNvPicPr"),r.writeEndElement(),r.writeEndElement(),r.writeStartElement("pic:blipFill"),r.writeStartElement("a:blip"),r.writeAttributeString("r:embed",n.format("rId{0}",5+O)),r.writeAttributeString("cstate","print"),r.writeEndElement(),r.writeStartElement("a:stretch"),r.writeStartElement("a:fillRect"),r.writeEndElement(),r.writeEndElement(),r.writeEndElement(),r.writeStartElement("pic:spPr"),r.writeStartElement("a:xfrm"),r.writeStartElement("a:off"),r.writeAttributeString("x","0"),r.writeAttributeString("y","0"),r.writeEndElement(),r.writeStartElement("a:ext"),r.writeAttributeString("cx",n.format("{0}",this.convertTwipsToEmu(G))),r.writeAttributeString("cy",n.format("{0}",this.convertTwipsToEmu(V))),r.writeEndElement(),r.writeEndElement(),r.writeStartElement("a:prstGeom"),r.writeAttributeString("prst","rect"),r.writeStartElement("a:avLst"),r.writeEndElement(),r.writeEndElement(),r.writeEndElement(),r.writeEndElement(),r.writeEndElement(),r.writeEndElement(),r.writeEndElement(),r.writeEndElement(),r.writeEndElement(),-1!=b&&(r.writeStartElement("w:bookmarkEnd"),r.writeAttributeString("w:id",b.toString()),r.writeEndElement()),r.writeEndElement()}}}else-1!=b&&(r.writeStartElement("w:bookmarkStart"),r.writeAttributeString("w:id",b.toString()),r.writeAttributeString("w:name",v),r.writeEndElement(),r.writeStartElement("w:bookmarkEnd"),r.writeAttributeString("w:id",b.toString()),r.writeEndElement());else{var Y=new f(i.text);if(this.usePageHeadersAndFooters){var j=i.component.tagValue;n.isNullOrEmpty(j)||-1!=j.toLowerCase().indexOf("rtfnewpage")||-1==j.indexOf("#PageNumber#")&&-1==j.indexOf("#TotalPageCount#")&&-1==j.indexOf("#PageRef")||(Y=new f(j))}var _=[],q="";try{for(var K=__values(Y.toString().split("")),Q=K.next();!Q.done;Q=K.next()){var J=Q.value;S.isControl(J)&&"\t"!=J?"\n"==J&&(_.push(q),q=""):q+=J}}catch(t){c={error:t}}finally{try{Q&&!Q.done&&(p=K.return)&&p.call(K)}finally{if(c)throw c.error}}""!=q&&_.push(q),0==_.length&&_.push(q),_.length>0&&(d=!1);for(var Z=this.getStyleFromComponent(i.component),$=0;$<_.length;$++){var tt=_[$];r.writeStartElement("w:p"),r.writeStartElement("w:pPr");var et=i.component.stimulsoft.as(u).lineSpacing;if(null!=this.lineSpace||1!=et){var rt=this.lineSpace;1!=et&&(rt=Math.round2(240*t["StiOptions"].Export.Word.lineSpacing*et).toString());var it=i.component.stimulsoft.as(E);null!=it&&null!=it.font&&this.checkFontsToCorrectHeight(it.font.name)&&(rt=this.lineSpace2,1!=et&&(rt=Math.round2(240*t["StiOptions"].Export.Word.lineSpacing*.772*et).toString())),r.writeStartElement("w:spacing"),r.writeAttributeString("w:line",rt),r.writeEndElement()}-1!=Z&&(r.writeStartElement("w:pStyle"),r.writeAttributeString("w:val",n.format("Style{0}",Z)),r.writeEndElement());var W=i.cellStyle.horAlignment,U=!1;null!=i.cellStyle.textOptions&&(U=i.cellStyle.textOptions.rightToLeft);var z="";if((W==P.Left&&1==U||W==P.Right&&0==U)&&(z="right"),W==P.Center&&(z="center"),W==P.Width&&(z="both"),""!=z&&(r.writeStartElement("w:jc"),r.writeAttributeString("w:val",z),r.writeEndElement()),-1==Z&&this.writeRunProperties(r,i),r.writeEndElement(),null!=A&&(r.writeStartElement("w:hyperlink"),-1==T?r.writeAttributeString("w:anchor",A):r.writeAttributeString("r:id",n.format("hId{0}",T))),-1!=b&&(r.writeStartElement("w:bookmarkStart"),r.writeAttributeString("w:id",b.toString()),r.writeAttributeString("w:name",v),r.writeEndElement()),""!=tt)if(this.usePageHeadersAndFooters){tt=tt.stimulsoft.replaceAll("#PageNumber#","").stimulsoft.replaceAll("#TotalPageCount#","");var nt=[],ot=new f;try{for(var at=(g=void 0,__values(tt.split(""))),st=at.next();!st.done;st=at.next()){var J;""==(J=st.value)||""==J?(ot.length>0&&nt.push(ot.toString()),nt.push(J.toString()),ot=new f):ot.append(J)}}catch(t){g={error:t}}finally{try{st&&!st.done&&(h=at.return)&&h.call(at)}finally{if(g)throw g.error}}ot.length>0&&nt.push(ot.toString()),0==nt.length&&nt.push(tt);for(var lt=0;lt0&&(""==mt[0]||""==mt[0])){switch(r.writeStartElement("w:r"),-1==Z&&this.writeRunProperties(r,i),r.writeStartElement("w:fldChar"),r.writeAttributeString("w:fldCharType","begin"),r.writeEndElement(),r.writeEndElement(),r.writeStartElement("w:r"),this.writeRunProperties(r,i),r.writeStartElement("w:instrText"),mt.charAt(0)){case"":r.writeString("PAGE");break;case"":r.writeString("NUMPAGES");break}r.writeEndElement(),r.writeEndElement(),r.writeStartElement("w:r"),this.writeRunProperties(r,i),r.writeStartElement("w:fldChar"),r.writeAttributeString("w:fldCharType","end"),r.writeEndElement(),r.writeEndElement()}else r.writeStartElement("w:r"),-1==Z&&this.writeRunProperties(r,i),r.writeStartElement("w:t"),r.writeAttributeString("xml:space","preserve"),r.writeString(mt),r.writeEndElement(),r.writeEndElement()}}else r.writeStartElement("w:r"),-1==Z&&this.writeRunProperties(r,i),r.writeStartElement("w:t"),r.writeAttributeString("xml:space","preserve"),r.writeString(tt),r.writeEndElement(),r.writeEndElement();-1!=b&&(r.writeStartElement("w:bookmarkEnd"),r.writeAttributeString("w:id",b.toString()),r.writeEndElement()),null!=A&&r.writeEndElement(),r.writeEndElement()}}o.ref=d},D.prototype.writeTableInfo=function(t,e,r){t.writeStartElement("w:tblPr"),t.writeStartElement("w:tblStyle"),t.writeAttributeString("w:val","a1"),t.writeEndElement(),t.writeStartElement("w:tblW"),t.writeAttributeString("w:w","0"),t.writeAttributeString("w:type","dxa"),t.writeEndElement(),t.writeStartElement("w:tblLayout"),t.writeAttributeString("w:type","fixed"),t.writeEndElement(),t.writeStartElement("w:tblCellMar"),t.writeStartElement("w:top"),t.writeAttributeString("w:w","0"),t.writeAttributeString("w:type","dxa"),t.writeEndElement(),t.writeStartElement("w:left"),t.writeAttributeString("w:w","0"),t.writeAttributeString("w:type","dxa"),t.writeEndElement(),t.writeStartElement("w:bottom"),t.writeAttributeString("w:w","0"),t.writeAttributeString("w:type","dxa"),t.writeEndElement(),t.writeStartElement("w:right"),t.writeAttributeString("w:w","0"),t.writeAttributeString("w:type","dxa"),t.writeEndElement(),t.writeEndElement(),t.writeStartElement("w:tblLook"),t.writeAttributeString("w:val","04A0"),t.writeEndElement(),t.writeEndElement(),t.writeStartElement("w:tblGrid");for(var i=1;i0&&this.matrix.linePlacement[f]!=r.StiTableLineInfo.PageHeader)f--;if(f>=0&&this.matrix.linePlacement[f]==r.StiTableLineInfo.PageHeader){S=0;while(this.matrix.linePlacement[S]!=r.StiTableLineInfo.PageHeader)S++;v=!0}this.headersData.push(this.writeHeader(S,f,v)),this.imageCache.imagePackedStore.length>0?this.headersRels.push(this.writeHeaderFooterRels()):this.headersRels.push(null);var E=!1;S=0;while(this.matrix.linePlacement[S]!=r.StiTableLineInfo.PageFooter&&S0?this.footersRels.push(this.writeHeaderFooterRels()):this.footersRels.push(null),this._matrix=new r.StiMatrix(e,t["StiOptions"].Export.Word.divideBigCells,this),this.matrix.scanComponentsPlacement(!0),f=this.matrix.coordY.countItems-1-1,this.writeFromMatrix(l,0,f,!1)}else this._matrix=new r.StiMatrix(e,t["StiOptions"].Export.Word.divideBigCells,this,null,r.StiDataExportMode.AllBands,n),this.writeFromMatrix(l,0,this.matrix.coordY.countItems-1-1,!0);g0&&this.writePageInfo(l,e.getByIndex(0),h-1),l.writeFullEndElement(),l.writeFullEndElement(),l.writeEndDocument(),l.flush(),s},D.prototype.comparePages=function(t,e){var r=t.excelSheetValue;n.isNullOrEmpty(r)&&(r="");var i=e.excelSheetValue;if(n.isNullOrEmpty(i)&&(i=""),r!=i)return!1;if(t.orientation!=e.orientation)return!1;if(!t.margins.equals(e.margins))return!1;if(t.unlimitedHeight!=e.unlimitedHeight)return!1;return!0},D.prototype.writePageInfo=function(e,r,i){var o=this.convertHiToTwips(r.unit.convertToHInches(r.pageHeight*(this.usePageHeadersAndFooters?1:r.segmentPerHeight))),a=this.convertHiToTwips(r.unit.convertToHInches(r.pageWidth*(this.usePageHeadersAndFooters?1:r.segmentPerWidth))),s=this.convertHiToTwips(r.unit.convertToHInches(r.margins.left)),l=this.convertHiToTwips(r.unit.convertToHInches(r.margins.right)),m=this.convertHiToTwips(r.unit.convertToHInches(r.margins.top)),p=this.convertHiToTwips(r.unit.convertToHInches(r.margins.bottom))-t["StiOptions"].Export.Word.bottomMarginCorrection;p<0&&(p=0),a>31500&&(a=31500),o>31500&&(o=31500),e.writeStartElement("w:sectPr"),this.usePageHeadersAndFooters?(e.writeStartElement("w:headerReference"),e.writeAttributeString("w:type","default"),e.writeAttributeString("r:id",n.format("rIdh{0}",i+1)),e.writeEndElement(),e.writeStartElement("w:footerReference"),e.writeAttributeString("w:type","default"),e.writeAttributeString("r:id",n.format("rIdf{0}",i+1)),e.writeEndElement()):t.Base.izjrG.dVOOk.TvUDM()||t.Base.izjrG.dVOOk.AWlWm()||(t.Base.izjrG.dVOOk.ekkVf()||t.Base.izjrG.dVOOk.yoidW()||t.Base.izjrG.dVOOk.ohwaJ())&&t.System.NodeJs.isStandaloneVersion||(e.writeStartElement("w:headerReference"),e.writeAttributeString("w:type","default"),e.writeAttributeString("r:id","rIdh1"),e.writeEndElement()),e.writeStartElement("w:pgSz"),e.writeAttributeString("w:w",n.format("{0}",a)),e.writeAttributeString("w:h",n.format("{0}",o)),r.orientation==c.Landscape&&e.writeAttributeString("w:orient","landscape"),e.writeEndElement(),e.writeStartElement("w:pgMar"),e.writeAttributeString("w:top",n.format("{0}",m)),e.writeAttributeString("w:right",n.format("{0}",l)),e.writeAttributeString("w:bottom",n.format("{0}",p)),e.writeAttributeString("w:left",n.format("{0}",s)),e.writeAttributeString("w:header",n.format("{0}",m)),e.writeAttributeString("w:footer",n.format("{0}",p)),e.writeAttributeString("w:gutter","0"),e.writeEndElement(),e.writeEndElement()},D.prototype.writeBorders=function(t,e,r,i,n){for(var o=!0,a=!0,s=0;s0)try{for(var c=__values(this.hyperlinkList.keys),p=c.next();!p.done;p=c.next()){var g=p.value;s.writeStartElement("Relationship"),s.writeAttributeString("Id",n.format("hId{0}",Math.trunc(this.hyperlinkList.get(g)))),s.writeAttributeString("Type","http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink"),s.writeAttributeString("Target",g),s.writeAttributeString("TargetMode","External"),s.writeEndElement()}}catch(t){e={error:t}}finally{try{p&&!p.done&&(r=c.return)&&r.call(c)}finally{if(e)throw e.error}}if(this.embedsList.length>0)for(var l=0;l1&&(this.imageQuality=1),this.imageResolution<10&&(this.imageResolution=10),this.imageResolution=this.imageResolution/100,1!=t["StiOptions"].Export.Word.lineSpacing&&(this.lineSpace=Math.round2(240*t["StiOptions"].Export.Word.lineSpacing).toString(),this.lineSpace2=Math.round2(.772*t["StiOptions"].Export.Word.lineSpacing*240).toString()),t["StiOptions"].Export.Word.restrictEditing>this.restrictEditing&&(this.restrictEditing=t["StiOptions"].Export.Word.restrictEditing),this.report=i;try{this.styleList=[],this.fontList=new T,this.imageCache=new e.StiImageCache(t["StiOptions"].Export.Word.allowImageComparer,!0,e.ImageFormat.Jpeg,this.imageQuality,!1),this.bookmarkList=new T,this.hyperlinkList=new T,this.embedsList=[],this.currentPassNumber=0,this.maximumPassNumber=3+(t["StiOptions"].Export.Word.divideSegmentPages?1:0);var m=!1,c=s.getSelectedPages(i.renderedPages);if(t["StiOptions"].Export.Word.divideSegmentPages){var p=!0;if(this.usePageHeadersAndFooters&&c.count>0&&c.getByIndex(0).unlimitedHeight&&1==c.getByIndex(0).segmentPerWidth&&(p=!1),p){var g=r.StiSegmentPagesDivider.divide(c,this);c!=g&&(m=!0),c=g,this.currentPassNumber++}}var h=new l;if(h.begin(o,!0),this.usePageHeadersAndFooters&&(this.headersData=[],this.headersRels=[],this.footersData=[],this.footersRels=[]),h.addFile("word/document.xml",this.writeDocument(c,i,m),!0),this.usePageHeadersAndFooters)for(var w=0;w0)for(var w=0;w\r\n'+' '+''+''+'',!1)),h.addFile("word/_rels/headerAdditional.xml.rels",this.writeAdditionalData('\r\n',!1))),h.end()}finally{null!=this.matrix&&(this.matrix.clear(),this._matrix=null),this.fontList.clear(),this.fontList=null,this.imageCache.clear(),this.imageCache=null,this.styleList.stimulsoft.clear(),this.styleList=null,this.bookmarkList.clear(),this.bookmarkList=null,this.hyperlinkList.clear(),this.hyperlinkList=null,this.embedsList.stimulsoft.clear(),this.embedsList=null,this.usePageHeadersAndFooters&&(this.headersData.stimulsoft.clear(),this.headersData=null,this.headersRels.stimulsoft.clear(),this.headersRels=null,this.footersData.stimulsoft.clear(),this.footersData=null,this.footersRels.stimulsoft.clear(),this.footersRels=null),i.renderedPages.cacheMode&&r.StiMatrix.GCCollect()}},D}(r.StiExportService);r.StiWord2007ExportService=I}(r=e.Export||(e.Export={}))}(e=t.Report||(t.Report={}))}(Stimulsoft||(Stimulsoft={})),function(t){var e;!function(e){var r;!function(r){var i=t.Base.Drawing.StiColorUtils,n=t.Report.Components.StiDataBarIndicator,o=t.Report.Components.StiIconSetHelper,a=t.Report.Components.StiIcon,s=t.Report.Components.StiIconSetIndicator,l=t.System.StiArray,m=t.Report.Components.StiBookmarksCollection,c=t.Report.Components.StiBookmark,p=t.System.Char,g=t.Base.Drawing.StiHtmlTag,h=t.Report.Components.StiImageRotation,w=t.System.StiString,u=t.Report.Dashboard.StiDashboardExport,d=t.Report.Dashboard.IStiDashboard,S=t.System.Drawing.Color,f=t.System.IO.MemoryStream,v=t.Report.Components.StiContainer,E=t.Base.Drawing.StiBrush,b=t.Base.Drawing.StiGradientBrush,y=t.Base.Drawing.StiGlareBrush,x=t.Base.Drawing.StiHatchBrush,A=t.Base.Drawing.StiGlassBrush,T=t.System.Collections.Hashtable,P=t.System.Text.StringBuilder,L=t.Report.Components.StiText,C=t.Report.Components.StiShape,F=t.Report.Components.StiRectanglePrimitive,B=t.Report.Components.IStiFont,k=t.Report.Components.IStiBrush,R=t.Report.Components.IStiTextBrush,I=t.Report.Components.IStiTextOptions,D=t.Report.Components.IStiBorder,N=t.System.Xml.XmlTextWriter,O=t.System.DateTime,H=t.Report.Chart.IStiChart,M=t.Report.Components.StiImage,W=t.System.Drawing.Rectangle,U=t.Base.Drawing.StiHorAlignment,X=t.Base.Drawing.StiVertAlignment,z=t.Report.Components.IStiExportImageExtended,V=t.Report.Components.StiCheckBox,G=t.Report.BarCodes.StiBarCode,Y=t.Report.Components.IStiTextHorAlignment,j=t.System.Drawing.FontStyle,_=function(){function t(t){this.X=0,this.Y=0,this.Width=0,this.Height=0,this.Component=null,this.service=null,this.service=t}return Object.defineProperty(t.prototype,"Right",{get:function(){return this.X+this.Width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Top",{get:function(){return this.Y+this.Height},enumerable:!1,configurable:!0}),t}();r.StiPdfData=_;var q=function(){function t(){}return t}();r.StiImageData=q;var K=function(){function t(){}return t}();r.StiShadingData=K;var Q=function(){function t(){}return t}();r.StiShadingFunctionData=Q;var J=function(){function t(){}return t}();r.StiEditableObject=J;var Z=function(){function t(){}return t}(),$=function(){function t(){}return t}(),tt=function(tt){function et(){var t=null!==tt&&tt.apply(this,arguments)||this;return t.imageQuality=.75,t.imageResolutionMain=1,t.imageResolutionMode=r.StiImageResolutionMode.Auto,t.sw=null,t.pageStream=null,t.imageList=null,t.imageCache=null,t.imageInterpolationTable=null,t.imageCacheIndexToList=null,t.imageInfoList=null,t.imageInfoCounter=0,t.colorTable=l.create(String,256),t.alphaTable=l.create(Boolean,256),t.pdfFont=null,t.bidi=null,t.standardPdfFonts=!0,t.embeddedFonts=!1,t.useUnicodeMode=!1,t.reduceFontSize=!0,t.compressed=!1,t.compressedFonts=!1,t.encrypted=!1,t.usePdfA=!1,t.pdfComplianceMode=r.StiPdfComplianceMode.None,t.exportRtfTextAsImage=!1,t.autoPrint=r.StiPdfAutoPrintMode.None,t.imageCompressionMethod=r.StiPdfImageCompressionMethod.Jpeg,t.imageFormat=r.StiImageFormat.Color,t.monochromeDitheringType=r.StiMonochromeDitheringType.FloydSteinberg,t.allowEditable=r.StiPdfAllowEditable.No,t.useTransparency=!0,t.fontGlyphsReduceNotNeed=null,t.bookmarksTree=null,t.bookmarksTreeTemp=null,t.linksArray=null,t.tagsArray=null,t.tooltipsArray=null,t.shadingArray=null,t.hatchArray=null,t.shadingFunctionArray=null,t.haveBookmarks=!1,t.haveLinks=!1,t.haveAnnots=!1,t.haveTooltips=!1,t.CodePage1252part80AF=[8364,8226,8218,402,8222,8230,8224,8225,710,8240,352,8249,338,8226,381,8226,8226,8216,8217,8220,8221,8226,8211,8212,732,8482,353,8250,339,8226,382,376],t.CodePage1252=l.create(Number,256),t.hiToTwips=.72,t.precision_digits_font=3,t.pdfCKT=.55228,t.IDValue=null,t.IDValueString="",t.IDValueStringMeta="",t.currentDateTime="",t.currentDateTimeMeta="",t.producerName="Stimulsoft Reports",t.creatorName="",t.keywords="",t.keyLength=r.StiPdfEncryptionKeyLength.Bit40,t.lastColorStrokeA=255,t.lastColorNonStrokeA=255,t.colorStack=null,t.info=null,t.haveDigitalSignature=!1,t.pdfSecurity=null,t.printScaling=!0,t.colorHash1=new T,t.colorHash2=new T,t._gsTable=null,t}return __extends(et,tt),et.prototype.implements=function(){return[r.IStiPdfExportService]},Object.defineProperty(et.prototype,"exportFormat",{get:function(){return e.StiExportFormat.Pdf},enumerable:!1,configurable:!0}),et.prototype.exportTo=function(t,e,r){this.exportPdf1(t,e,r)},et.prototype.exportToAsync=function(e,i,n,o){var a=this,s=o.imageCompressionMethod==r.StiPdfImageCompressionMethod.Flate;t.Report.Export.StiExportImageHelper.convertAllImages(i,t.System.Drawing.Imaging.ImageFormat.Jpeg,s).try((function(){if(!i.isDocument&&i.getCurrentPage().is(d))return void u.exportAsync(i,n,o).try((function(){return e()}));a.exportTo(i,n,o),null!=i&&null!=i.preparedExportImages&&(i.preparedExportImages.clear(),i.preparedExportImages=null),e()}))},Object.defineProperty(et.prototype,"multipleFiles",{get:function(){return!1},enumerable:!1,configurable:!0}),et.prototype.stringReplace=function(t,e,r){e=e.replace(et.regexEscape,"\\$1");var i=new RegExp(e,"g");return t.replace(i,r)},et.prototype.getHatchNumber=function(t){if(this.hatchArray.length>0)for(var e=0;e0)for(var i=0;i127&&(a=!0);if(this.encrypted){var l=null;if(1==a){l=[];for(var o=0;o>8&255,l[2+2*o+1]=255&m}l[0]=254,l[1]=255}else{l=[];for(var o=0;o"}else r+=e?"("+et.convertToEscapeSequencePlusTabs(t)+")":"("+t+")"}return r},et.prototype.storeMemoryStream2=function(t,e){if(this.encrypted){var r=this.pdfSecurity.encryptData(t.toArray(),this.currentObjectNumber,this.currentGenerationNumber);this.sw.writeLine1(w.format(e,r.length)),this.sw.writeLine(">>"),this.sw.writeLine("stream"),this.sw.write(r,0,r.length)}else this.sw.writeLine1(w.format(e,t.length)),this.sw.writeLine(">>"),this.sw.writeLine("stream"),t.writeTo(this.sw);t.close()},et.prototype.storeMemoryStream3=function(t,e){for(var r=new f,i=0;i>>>"),this.keyLength==r.StiPdfEncryptionKeyLength.Bit256_r6&&this.sw.writeLine("/Extensions<>>>"),this.sw.writeLine("/Type /Catalog"),this.sw.writeLine1("/Pages {0} 0 R",this.info.pages.ref),this.sw.writeLine("/MarkInfo<>"),this.sw.writeLine1("/Metadata {0} 0 R",this.info.metadata.ref),this.sw.writeLine1("/OutputIntents {0} 0 R",this.info.outputIntents.ref),this.sw.writeLine1("/StructTreeRoot {0} 0 R",this.info.structTreeRoot.ref),this.haveBookmarks?(this.sw.writeLine1("/Outlines {0} 0 R",this.info.outlines.ref),this.sw.writeLine("/PageMode /UseOutlines")):this.sw.writeLine("/PageMode /UseNone"),this.printScaling||(this.sw.writeLine("/ViewerPreferences"),this.sw.writeLine("<<"),this.sw.writeLine("/PrintScaling /None"),this.sw.writeLine(">>")),(this.haveAnnots||this.haveDigitalSignature)&&this.sw.writeLine1("/AcroForm {0} 0 R",this.info.acroForm.ref),this.autoPrint!=r.StiPdfAutoPrintMode.None&&this.sw.writeLine1("/Names <>",this.info.embeddedJS.ref),this.usePdfA||this.sw.writeLine1("/OCProperties << /OCGs [{0} 0 R] /D << /ON [{0} 0 R] /AS [<>] >> >>",this.info.optionalContentGroup.ref),this.sw.writeLine(">>"),this.sw.writeLine("endobj"),this.sw.writeLine(""),this.addXref(2),this.sw.writeLine("2 0 obj"),this.sw.writeLine("<<"),this.storeStringLine("/Producer ",this.producerName,!0),this.storeStringLine("/Creator ",this.creatorName,!0),w.isNullOrEmpty(i.reportAuthor)||this.storeStringLine("/Author ",i.reportAuthor,!0),w.isNullOrEmpty(i.reportAlias)||this.storeStringLine("/Subject ",i.reportAlias,!0),w.isNullOrEmpty(i.reportName)||this.storeStringLine("/Title ",i.reportName,!0),w.isNullOrEmpty(this.keywords)||this.storeStringLine("/Keywords ",this.keywords,!0),this.storeStringLine("/CreationDate ","D:"+this.currentDateTime),this.storeStringLine("/ModDate ","D:"+this.currentDateTime);try{for(var s=__values(i.metaTags.list),l=s.next();!l.done;l=s.next()){var m=l.value;m.name.stimulsoft.startsWith("pdf:")&&this.storeStringLine(w.format("/{0} ",e.StiNameValidator.correctName(m.name.substr(4),!1)),m.tag)}}catch(t){o={error:t}}finally{try{l&&!l.done&&(a=s.return)&&a.call(s)}finally{if(o)throw o.error}}this.sw.writeLine(">>"),this.sw.writeLine("endobj"),this.sw.writeLine(""),this.addXref(3),this.sw.writeLine("3 0 obj"),this.sw.writeLine("<<"),this.sw.writeLine("/Cs1 [/Pattern /DeviceRGB]"),this.sw.writeLine(">>"),this.sw.writeLine("endobj"),this.sw.writeLine(""),this.addXref(this.info.pages.ref),this.sw.writeLine1("{0} 0 obj",this.info.pages.ref),this.sw.writeLine("<<"),this.sw.writeLine("/Type /Pages"),this.sw.writeString("/Kids [ ");for(var c=0;c>"),this.imageCache.imageStore.length>0){p.push("/XObject"),p.push("<<");for(var c=0;c>")}p.push("/Pattern"),p.push("<<"),p.push(w.format("/P1 {0} 0 R",this.info.patterns.first.ref));for(var g=0;g>"),p.push("/ColorSpace 3 0 R"),t["StiOptions"].Export.Pdf.allowExtGState&&this.useTransparency&&p.push(w.format("/ExtGState {0} 0 R",this.info.extGState.ref)),this.usePdfA||p.push(w.format("/Properties << /oc1 {0} 0 R >>",this.info.optionalContentGroup.ref)),p.push(">>");for(var h=0;h>"),this.sw.writeLine("endobj"),this.sw.writeLine(""),this.addXref(5),this.sw.writeLine("5 0 obj"),this.sw.writeLine("<<"),this.sw.writeLine("/Type /StructTreeRoot"),this.sw.writeLine(">>"),this.sw.writeLine("endobj"),this.sw.writeLine(""),this.addXref(6),this.sw.writeLine("6 0 obj"),this.sw.writeLine("<<"),this.sw.writeLine("/Type /OCG"),this.sw.writeLine("/Name (Printable off)"),this.sw.writeLine("/Usage <<"),this.sw.writeLine("/Print << /PrintState /OFF >>"),this.sw.writeLine("/View << /ViewState /ON >>"),this.sw.writeLine(">>"),this.sw.writeLine(">>"),this.sw.writeLine("endobj"),this.sw.writeLine("");for(var u=0;u14400&&(S=14400),f>14400&&(f=14400),this.sw.writeLine1("/MediaBox [ 0 0 {0} {1} ]",this.convertToString(f),this.convertToString(S)),!t["StiOptions"].Export.Pdf.allowInheritedPageResources){var p;(p=[]).push("/Resources"),p.push("<<"),p.push("/ProcSet [/PDF /Text /ImageC]"),p.push("/Font"),p.push("<<");for(var c=0;c>"),this.imageCache.imageStore.length>0){p.push("/XObject"),p.push("<<");for(var c=0;c>")}var v=new P;v.append(w.format("/P1 {0} 0 R",this.info.patterns.first.ref));for(var g=0;g>"),p.push("/ColorSpace 3 0 R"),t["StiOptions"].Export.Pdf.allowExtGState&&this.useTransparency&&p.push(w.format("/ExtGState {0} 0 R",this.info.extGState.ref)),this.usePdfA||p.push(w.format("/Properties << /oc1 {0} 0 R >>",this.info.optionalContentGroup.ref)),p.push(">>");for(var h=0;h>")),this.haveLinks||this.haveAnnots||this.haveDigitalSignature||this.haveTooltips){if(this.sw.writeLine("/Annots ["),this.haveLinks)for(var b=0;b>"),this.sw.writeLine("endobj"),this.sw.writeLine("")}},et.prototype.renderEndDoc=function(){var e=this.sw.position;this.sw.writeLine("xref"),this.sw.writeLine1("0 {0}",this.xref.stimulsoft.countItems+1),this.sw.writeLine("0000000000 65535 f");for(var i=0;i<{0}>]",this.IDValueString),this.sw.writeLine(">>"),this.sw.writeLine("%"+r.StiExportUtils.getReportVersion()),this.sw.writeLine("%"+t.StiVersion.platform()),this.sw.writeLine("startxref"),this.sw.writeLine1("{0}",e),this.sw.writeLine("%%EOF")},et.prototype.renderPageHeader=function(t){this.addXref(this.info.pageList[t].content.ref),this.sw.writeLine1("{0} 0 obj",this.info.pageList[t].content.ref),this.sw.writeLine("<<"),this.pageStream=new f,this.pageStream.writeLine("2 J")},et.prototype.renderPageFooter=function(e,i){if(!(t.Base.izjrG.dVOOk.TvUDM()||t.Base.izjrG.dVOOk.AWlWm()||(t.Base.izjrG.dVOOk.ekkVf()||t.Base.izjrG.dVOOk.yoidW()||t.Base.izjrG.dVOOk.ohwaJ())&&t.System.NodeJs.isStandaloneVersion)){var n=i/596*1.4,o=e/840*1.4;n>o?n=o:o=n,this.pageStream.writeLine("q"),this.pushColorToStack(),this.pageStream.writeLine("1 J 1 j 20 w"),this.setStrokeColor(S.fromArgb(64,100,100,100)),this.pageStream.writeLine1("{0} 0 0 {1} {2} {3} cm 0.707 0.707 -0.707 0.707 0 0 cm 1 0 0 1 -155 -50 cm",this.convertToString(n),this.convertToString(o),this.convertToString(i/2),this.convertToString(e/2)),this.pageStream.writeLine("40 0 m 40 100 l 0 100 m 80 100 l S"),this.pageStream.writeLine("100 0 m 100 70 l 100 45 m 120 65 l 130 72 l 140 68 l S"),this.pageStream.writeLine("170 0 m 170 70 l 169 100 m 171 100 l S"),this.pageStream.writeLine("215 60 m 222 69 l 232 71 l 255 70 l 265 60 l 265 5 l 270 0 l 265 44 m 220 31 l 212 20 l 212 10 l 225 0 l 235 0 l 250 5 l 265 18 l S"),this.pageStream.writeLine("310 0 m 310 100 l S"),this.pageStream.writeLine("Q"),this.popColorFromStack()}if(this.pageStream.position>"),this.sw.writeLine("endobj"),this.sw.writeLine(""),this.addXref(this.info.fontList[e].descendantFont.ref),this.sw.writeLine1("{0} 0 obj",this.info.fontList[e].descendantFont.ref),this.sw.writeLine("<<"),this.sw.writeLine("/Type /Font"),this.sw.writeLine("/Subtype /CIDFontType2"),this.sw.writeLine1("/BaseFont /{0}",i),this.sw.writeLine("/CIDSystemInfo"),this.sw.writeLine("<<"),this.storeStringLine("/Registry","Adobe"),this.storeStringLine("/Ordering","Identity"),this.sw.writeLine("/Supplement 0"),this.sw.writeLine(">>"),this.sw.writeLine1("/FontDescriptor {0} 0 R",this.info.fontList[e].fontDescriptor.ref),this.usePdfA&&this.sw.writeLine("/CIDToGIDMap /Identity"),this.sw.writeLine("/W [0 [1000]");for(var a=this.pdfFont.GlyphList,s=a.length,m=l.create(Number,s),c=l.create(Number,s),p=32;pm[h]){var u=m[g];m[g]=m[h],m[h]=u;var d=c[g];c[g]=c[h],c[h]=d}var S=new P,v=32;while(v>"),this.sw.writeLine("endobj"),this.sw.writeLine(""),this.addXref(this.info.fontList[e].toUnicode.ref);var E="SR+F"+e.toString();this.sw.writeLine1("{0} 0 obj",this.info.fontList[e].toUnicode.ref),this.sw.writeLine("<<");var b=new f;b.writeLine("/CIDInit /ProcSet findresource begin"),b.writeLine("12 dict begin"),b.writeLine("begincmap"),b.writeLine("/CIDSystemInfo"),b.writeLine("<<"),b.writeLine("/Registry (Adobe)"),b.writeLine1("/Ordering ({0})",E),b.writeLine("/Supplement 0"),b.writeLine(">> def"),b.writeLine1("/CMapName /{0} def",E),b.writeLine("/CMapType 2 def"),b.writeLine("1 begincodespacerange"),b.writeLine("<0000> "),b.writeLine("endcodespacerange");var y=this.pdfFont.MappedSymbolsCount-32,x=32;while(y>0){var A=y;A>100&&(A=100),b.writeLine1("{0} beginbfchar",A);for(var T=0;T <{1:X4}>",this.pdfFont.GlyphList[x],this.pdfFont.UnicodeMapBack[x]),x++;b.writeLine("endbfchar"),y-=A}b.writeLine("endcmap"),b.writeLine("CMapName currentdict /CMap defineresource pop"),b.writeLine("end"),b.writeLine("end"),b.flush();var L=b.toArray();if(b.close(),1==this.compressed){var C=r.StiExportUtils.makePdfDeflateStream(L);this.storeMemoryStream2(C,"/Length {0} /Filter [/FlateDecode] /Length1 "+L.length.toString())}else this.storeMemoryStream4(L,"/Length {0} /Filter [] /Length1 {0}");this.sw.writeLine(""),this.sw.writeLine("endstream"),this.sw.writeLine("endobj"),this.sw.writeLine(""),this.addXref(this.info.fontList[e].cIDSet.ref),this.sw.writeLine1("{0} 0 obj",this.info.fontList[e].cIDSet.ref),this.sw.writeLine("<<");for(var F=l.create(Boolean,65536+32),B=0,k=0;kB&&(B=R))}if(null!=this.pdfFont.GlyphWidths&&0!=this.pdfFont.GlyphWidths[65535])for(var k=0;k<65535;k++)this.pdfFont.GlyphWidths[k]>0&&0==this.pdfFont.GlyphBackList[k]&&(F[k]=!0,k>B&&(B=k));var I=Math.trunc(B/8)+1,D=l.create(Number,I+1),N=0;while(N>"),this.sw.writeLine("endobj"),this.sw.writeLine(""),this.addXref(this.info.fontList[e].encoding.ref),this.sw.writeLine1("{0} 0 obj",this.info.fontList[e].encoding.ref),this.sw.writeLine("<<"),this.sw.writeLine("/Type /Encoding"),this.sw.writeLine("/BaseEncoding /WinAnsiEncoding"),this.pdfFont.MappedSymbolsCount>this.pdfFont.firstMappedSymbol){for(var W=new P(this.pdfFont.firstMappedSymbol.toString()+" "),T=this.pdfFont.firstMappedSymbol;T>"),this.sw.writeLine("endobj"),this.sw.writeLine("")}var U=null;if(this.embeddedFonts){var X=t.Base.StiFontCollection.getBinFont(n.Font.name,n.Font.style);if(null==(U=null!=X?X.data:null)||U.stimulsoft.is(Uint8Array)||(U=null),null==U){var z=(n.Font.style&j.Bold)>0,V=(n.Font.style&j.Italic)>0;z&&V?(null!=(X=t.Base.StiFontCollection.getBinFont(n.Font.name,j.Italic))&&null!=X.data||null!=(X=t.Base.StiFontCollection.getBinFont(n.Font.name,j.Bold))&&null!=X.data||null!=(X=t.Base.StiFontCollection.getBinFont(n.Font.name,j.Regular))&&null!=X.data)&&(U=X.data):(z&&null!=(X=t.Base.StiFontCollection.getBinFont(n.Font.name,j.Regular))&&null!=X.data&&(U=X.data),V&&null!=(X=t.Base.StiFontCollection.getBinFont(n.Font.name,j.Regular))&&null!=X.data&&(U=X.data))}if(null==U){var G=this.report.dictionary.resources.getByName(n.Font.name);null==G&&(G=this.report.dictionary.resources.getByAlias(n.Font.name)),null!=G&&null!=G.content&&G.content.length>0&&(U=new Uint8Array(G.content))}}if(0==this.standardPdfFonts){this.addXref(this.info.fontList[e].fontDescriptor.ref),this.sw.writeLine1("{0} 0 obj",this.info.fontList[e].fontDescriptor.ref),this.sw.writeLine("<<"),this.sw.writeLine("/Type /FontDescriptor"),this.sw.writeLine1("/FontName /{0}",i),this.sw.writeLine("/Flags 32"),this.sw.writeLine1("/Ascent {0}",this.pdfFont.tmASC),this.sw.writeLine1("/CapHeight {0}",this.pdfFont.CH),this.sw.writeLine1("/Descent {0}",this.pdfFont.tmDESC),this.sw.writeLine1("/FontBBox [{0} {1} {2} {3}]",this.pdfFont.LLX,this.pdfFont.LLY,this.pdfFont.URX,this.pdfFont.URY),this.sw.writeLine1("/ItalicAngle {0}",this.pdfFont.ItalicAngle),this.sw.writeLine1("/StemV {0}",this.pdfFont.StemV),1==this.embeddedFonts&&null!=U&&this.sw.writeLine1("/FontFile2 {0} 0 R",this.info.fontList[-1==n.ParentFontNumber?e:n.ParentFontNumber].fontFile2.ref);var Y=1==this.useUnicodeMode;this.pdfComplianceMode!=r.StiPdfComplianceMode.A2&&this.pdfComplianceMode!=r.StiPdfComplianceMode.A3||(Y=!1),Y&&this.sw.writeLine1("/CIDSet {0} 0 R",this.info.fontList[e].cIDSet.ref),this.sw.writeLine(">>"),this.sw.writeLine("endobj"),this.sw.writeLine("")}if(this.embeddedFonts)if(null!=U&&U.length>0&&-1==n.ParentFontNumber){var D;if(this.reduceFontSize)null!=(D=this.pdfFont.reduceFontSize(U,n.Name,!this.fontGlyphsReduceNotNeed[e]))&&(U=D);if(this.addXref(this.info.fontList[e].fontFile2.ref),this.sw.writeLine1("{0} 0 obj",this.info.fontList[e].fontFile2.ref),this.sw.writeLine("<<"),1==this.compressedFonts){if(U.stimulsoft.is(Uint8Array)){var C=r.StiExportUtils.makePdfDeflateStream(U);this.storeMemoryStream2(C,"/Length {0} /Filter [/FlateDecode] /Length1 "+U.length.toString())}if(U.stimulsoft.is(f)){var _=U.toArray(),C=r.StiExportUtils.makePdfDeflateStream(_);this.storeMemoryStream2(C,"/Length {0} /Filter [/FlateDecode] /Length1 "+U.length.toString())}}else U.stimulsoft.is(Uint8Array)&&this.storeMemoryStream3(U,"/Length {0} /Filter [] /Length1 "+U.length.toString()),U.stimulsoft.is(f)&&this.storeMemoryStream2(U,"/Length {0} /Filter [] /Length1 "+U.length.toString());this.sw.writeLine(""),this.sw.writeLine("endstream"),this.sw.writeLine("endobj"),this.sw.writeLine("")}else this.addXref(this.info.fontList[e].fontFile2.ref),this.sw.writeLine1("{0} 0 obj",this.info.fontList[e].fontFile2.ref),this.sw.writeLine("<< >>"),this.sw.writeLine("endobj"),this.sw.writeLine("")}},et.prototype.renderImageTable=function(){if(this.imageCache.imageStore.length>0)for(var t=0;t>"),this.sw.writeLine("endobj"),this.sw.writeLine("");for(var t=0;t0&&(0==t?this.sw.writeLine1("/Count {0}",e.Count):this.sw.writeLine1("/Count {0}",-e.Count)),e.Y>-1&&this.sw.writeLine1("/Dest [{0} 0 R /XYZ null {1} null]",this.info.pageList[e.Page].ref,this.convertToString(e.Y)),this.sw.writeLine(">>"),this.sw.writeLine("endobj"),this.sw.writeLine("")}}},et.prototype.renderPatternTable=function(){if(this.addXref(this.info.patterns.resources.ref),this.sw.writeLine1("{0} 0 obj",this.info.patterns.resources.ref),this.sw.writeLine("<< /ProcSet [/PDF] >>"),this.sw.writeLine("endobj"),this.sw.writeLine(""),this.addXref(this.info.patterns.first.ref),this.sw.writeLine1("{0} 0 obj",this.info.patterns.first.ref),this.sw.writeLine("<<"),this.sw.writeLine("/Type /Pattern"),this.sw.writeLine("/PatternType 1"),this.sw.writeLine("/PaintType 1"),this.sw.writeLine("/TilingType 1"),this.sw.writeLine("/BBox [0 0 2 2]"),this.sw.writeLine("/XStep 3"),this.sw.writeLine("/YStep 3"),this.sw.writeLine1("/Resources {0} 0 R",this.info.patterns.resources.ref),this.pageStream=new f,this.pageStream.writeLine("1 J 1 j 1 w"),this.pageStream.writeLine("1 0 0 RG"),this.pageStream.writeString("1 1 m 1.1 1.1 l S"),this.storeMemoryStream2(this.pageStream,"/Length {0}"),this.sw.writeLine(""),this.sw.writeLine("endstream"),this.sw.writeLine("endobj"),this.sw.writeLine(""),this.hatchArray.length>0)for(var t=0;t0)for(var e=0;e0){for(var r=0;r53&&(i=53),this.addXref(this.info.patterns.hatchItems[t].ref),this.sw.writeLine1("{0} 0 obj",this.info.patterns.hatchItems[t].ref),this.sw.writeLine("<<"),this.sw.writeLine("/Type /Pattern"),this.sw.writeLine("/PatternType 1"),this.sw.writeLine("/PaintType 1"),this.sw.writeLine("/TilingType 1"),this.sw.writeLine("/BBox [0 0 1 1]"),this.sw.writeLine("/XStep 1"),this.sw.writeLine("/YStep 1"),this.sw.writeLine1("/Resources {0} 0 R",this.info.patterns.resources.ref),this.sw.writeLine("/Matrix [5.5 0 0 5.5 0 0]");var n=new f;0!=e.backColor.a&&(n.writeLine1("{0} {1} {2} rg",this.colorTable[e.backColor.r],this.colorTable[e.backColor.g],this.colorTable[e.backColor.b]),n.writeLine("0 0 1 1 re f")),n.writeLine1("{0} {1} {2} rg",this.colorTable[e.foreColor.r],this.colorTable[e.foreColor.g],this.colorTable[e.foreColor.b]),n.writeLine("BI"),n.writeLine("/W 8"),n.writeLine("/H 8"),n.writeLine("/BPC 1"),n.writeLine("/IM true"),n.writeLine("/D [1 0]"),n.writeLine("/F [/AHx]"),n.writeLine("ID"),n.writeLine(r.StiPdfResources.hatchData[i]+">"),n.writeLine("EI"),n.flush(),this.storeMemoryStream2(n,"/Length {0}"),this.sw.writeLine("endstream"),this.sw.writeLine("endobj"),this.sw.writeLine("")},et.prototype.writeShadingPattern=function(t){var e=this.shadingArray[t],r=1,i=1,n=e.Angle;n<0&&(n+=360),n>=270&&n<360&&(n=360-n,i=-1),n>=180&&n<270&&(n-=180,i=-1,r=-1),n>=90&&n<180&&(n=180-n,r=-1),n=n*Math.PI/180;var o=e.X+e.Width/2,a=e.Y+e.Height/2,s=Math.sqrt(e.Width*e.Width+e.Height*e.Height)/2,l=Math.atan2(e.Height,e.Width),m=Math.PI/2-n+l,c=s*Math.sin(m),p=c*Math.cos(n)*r,g=c*Math.sin(n)*i,h=o-p,u=o+p,d=a+g,S=a-g;this.addXref(this.info.patterns.shadingItems[t].ref),this.sw.writeLine1("{0} 0 obj",this.info.patterns.shadingItems[t].ref),this.sw.writeString("<<"),this.sw.writeString("/PatternType 2"),this.sw.writeString("/Shading <<"),this.sw.writeString("/ColorSpace /DeviceRGB"),this.sw.writeString("/ShadingType 2"),this.sw.writeString(w.format("/Coords [{0} {1} {2} {3}]",this.convertToString(h),this.convertToString(d),this.convertToString(u),this.convertToString(S))),this.sw.writeString("/Extend [true true]"),this.sw.writeString(w.format("/Function {0} 0 R",this.info.patterns.shadingFunctionItems[e.FunctionIndex].ref)),this.sw.writeString(">> "),this.sw.writeLine(">>"),this.sw.writeLine("endobj")},et.prototype.writeShadingFunction=function(t){var e=this.shadingFunctionArray[t];this.addXref(this.info.patterns.shadingFunctionItems[t].ref),this.sw.writeLine1("{0} 0 obj",this.info.patterns.shadingFunctionItems[t].ref),this.sw.writeString("<<"),this.sw.writeString("/FunctionType 0"),this.sw.writeString("/Size [3]"),this.sw.writeString("/Decode [0 1 0 1 0 1]"),this.sw.writeString("/Range [0 1 0 1 0 1]"),this.sw.writeString("/BitsPerSample 8"),this.sw.writeString("/Domain [0 1]"),this.sw.writeString(w.format("/Encode [0 {0}]",e.IsGlare?2:1)),this.sw.writeString("/Order 1");var r=new f;r.writeByte(e.Color1.r),r.writeByte(e.Color1.g),r.writeByte(e.Color1.b),r.writeByte(e.Color2.r),r.writeByte(e.Color2.g),r.writeByte(e.Color2.b),r.writeByte(e.Color1.r),r.writeByte(e.Color1.g),r.writeByte(e.Color1.b),this.storeMemoryStream2(r,"/Length {0}"),this.sw.writeLine(""),this.sw.writeLine("endstream"),this.sw.writeLine("endobj")},et.prototype.renderLinkTable=function(){if(this.haveLinks)for(var t=0;t0)for(var i=e.Link.substr(2),n=0;n2){var a=i.lastIndexOf(i.charAt(1));a-1?this.sw.writeLine1("/Dest [{0} 0 R /XYZ null {1} null]",this.info.pageList[e.DestPage].ref,this.convertToString(e.DestY)):this.sw.writeLine1("/Dest [{0} 0 R /XYZ null null null]",this.info.pageList[0].ref);else{var m=this.stringReplace(e.Link,"\\","/"),c=m.length>6&&p.isLetter(m,0)&&":"==m.charAt(1)&&"/"==m.charAt(2)||"/"==m.charAt(0)&&p.isLetter(m,1)&&"/"==m.charAt(2);c&&":"==m.charAt(1)&&(m="/"+m.charAt(0)+m.substr(2)),this.sw.writeLine("/A <<"),this.sw.writeLine("/Type /Action"),c?(this.sw.writeLine("/S /Launch"),this.sw.writeLine("/F <<"),this.sw.writeLine("/Type /Filespec"),this.storeStringLine("/F ",m),this.storeStringLine("/UF ",m),this.sw.writeLine(">>")):(this.sw.writeLine("/S /URI"),this.storeStringLine("/URI ",r.StiExportUtils.stringToUrl(m))),this.sw.writeLine(">>")}this.sw.writeLine(">>"),this.sw.writeLine("endobj"),this.sw.writeLine("")}},et.prototype.renderAnnotTable=function(){if(this.haveAnnots||this.haveDigitalSignature||this.haveTooltips){this.addXref(this.info.acroForm.ref),this.sw.writeLine1("{0} 0 obj",this.info.acroForm.ref),this.sw.writeLine("<<"),this.sw.writeLine("/Fields [");for(var e=0;e0||this.annots2Counter>0){ this.sw.writeLine("/Font <<");for(var e=0;e>")}if(this.sw.writeLine(">>"),this.haveAnnots&&this.fontsCounter>0&&this.storeStringLine("/DA ","/FA0 0 Tf 0 g"),this.haveDigitalSignature&&this.sw.writeLine("/SigFlags 3"),this.sw.writeLine(">>"),this.sw.writeLine("endobj"),this.sw.writeLine(""),this.haveAnnots){for(var n=new T,e=0;e>"),this.storeStringLine("/T ",a),this.sw.writeLine("/MK << /TP 2 >>"),this.sw.writeLine("/H /P"),this.sw.writeLine1("/AP << /N {0} 0 R >>",this.info.acroForm.annots[e].aP.ref);var m=o.Multiline?4096:0,c;null!=o.Component.as(L)&&null!=o.Component.as(L).TextOptions&&o.Component.as(L).TextOptions.LineLimit&&(m|=8388608),this.sw.writeLine1("/Ff {0}",m),this.storeStringLine("/DA ",w.format("/FA{0} {1} Tf {2} {3} {4} rg",o.FontNumber,this.convertToString(o.FontSize,this.precision_digits_font),this.colorTable[o.FontColor.r],this.colorTable[o.FontColor.g],this.colorTable[o.FontColor.b])),this.storeStringLine("/V ",o.Text),this.storeStringLine("/DV ",o.Text),this.sw.writeLine1("/Q {0}",(o.Alignment==t.Base.Drawing.StiTextHorAlignment.Center?1:0)+(o.Alignment==t.Base.Drawing.StiTextHorAlignment.Right?2:0)),this.sw.writeLine(">>"),this.sw.writeLine("endobj"),this.sw.writeLine(""),this.addXref(this.info.acroForm.annots[e].aP.ref),this.sw.writeLine1("{0} 0 obj",this.info.acroForm.annots[e].aP.ref),this.sw.writeLine("<<"),this.sw.writeLine("/Subtype /Form"),this.sw.writeLine1("/BBox [{0} {1} {2} {3}]",this.convertToString(0),this.convertToString(0),this.convertToString(o.Width),this.convertToString(o.Height)),this.sw.writeLine("/Resources <<"),this.sw.writeLine("/ProcSet [ /PDF /Text ]"),this.sw.writeLine1("/Font << /F{0} {1} 0 R >> >>",o.FontNumber,this.info.fontList[o.FontNumber].ref),(c=new f).writeLine("/Tx BMC"),c.writeLine("q");var p=1;c.writeLine1("{0} {1} {2} {3} re W n",this.convertToString(p),this.convertToString(p),this.convertToString(o.Width-p),this.convertToString(o.Height-p)),c.flush(),c.write(o.Content,0,o.Content.length),c.writeLine("Q"),c.writeLine("EMC"),c.flush(),this.storeMemoryStream2(c,"/Filter [] /Length {0}"),this.sw.writeLine(""),c.close(),this.sw.writeLine("endstream"),this.sw.writeLine("endobj"),this.sw.writeLine("")}for(var g=0;g>"),this.sw.writeLine("endobj"),this.sw.writeLine(""),this.addXref(this.info.acroForm.annotFontItems[g].fontDescriptor.ref),this.sw.writeLine1("{0} 0 obj",this.info.acroForm.annotFontItems[g].fontDescriptor.ref),this.sw.writeLine("<<"),this.sw.writeLine("/Type /FontDescriptor"),this.sw.writeLine1("/FontName /{0}",d),this.sw.writeLine("/Flags 32"),this.sw.writeLine1("/Ascent {0}",this.pdfFont.tmASC),this.sw.writeLine1("/CapHeight {0}",this.pdfFont.CH),this.sw.writeLine1("/Descent {0}",-this.pdfFont.tmDESC),this.sw.writeLine1("/FontBBox [{0} {1} {2} {3}]",-500,-200,1500,1e3),this.sw.writeLine1("/ItalicAngle {0}",this.pdfFont.ItalicAngle),this.sw.writeLine1("/StemV {0}",this.pdfFont.StemV),1==this.embeddedFonts&&this.sw.writeLine1("/FontFile2 {0} 0 R",this.info.fontList[g].fontFile2.ref),this.sw.writeLine(">>"),this.sw.writeLine("endobj"),this.sw.writeLine("")}for(var e=0;e1){var x=this.info.acroForm.checkBoxes[e].items[0],c;this.addXref(x.ref),this.sw.writeLine1("{0} 0 obj",x.ref),this.sw.writeLine("<<"),this.sw.writeLine("/Type /Annot"),this.sw.writeLine("/Subtype /Widget"),this.sw.writeLine("/FT /Btn"),this.sw.writeLine1("/Rect [{0} {1} {2} {3}]",this.convertToString(o.X),this.convertToString(o.Y),this.convertToString(o.X+o.Width-E),this.convertToString(o.Y+o.Height-E)),this.sw.writeLine1("/F {0}",4+(3==this.info.acroForm.checkBoxes[e].items.length||0==y?2:0)),this.sw.writeLine1("/P {0} 0 R",this.info.pageList[o.Page].ref),this.storeStringLine("/T ",a+"Yes"),this.sw.writeLine("/MK << >>"),this.sw.writeLine("/Ff 65536"),this.sw.writeLine1("/A {0} 0 R",x.aA[0].ref),this.sw.writeLine1("/AP << /N {0} 0 R >>",x.aP.ref),this.sw.writeLine("/H /O"),this.sw.writeLine(">>"),this.sw.writeLine("endobj"),this.sw.writeLine(""),this.addXref(x.aP.ref),this.sw.writeLine1("{0} 0 obj",x.aP.ref),this.sw.writeLine("<<"),this.sw.writeLine("/Type /XObject"),this.sw.writeLine("/Subtype /Form"),this.sw.writeLine("/FormType 1"),this.sw.writeLine1("/BBox [{0} {1} {2} {3}]",this.convertToString(0),this.convertToString(0),this.convertToString(o.Width),this.convertToString(o.Height)),this.sw.writeLine("/Matrix [ 1 0 0 1 0 0 ]"),this.sw.writeLine("/Resources <<"),this.sw.writeLine("/ProcSet [ /PDF ]"),this.sw.writeLine("/Pattern"),this.sw.writeLine("<<");for(var A=0;A>"),this.sw.writeLine("/ColorSpace 3 0 R"),this.sw.writeLine(">>"),(c=new f).writeLine("/Tx BMC"),c.writeLine("q");var p=1;c.writeLine1("{0} {1} {2} {3} re W n",this.convertToString(p),this.convertToString(p),this.convertToString(o.Width-p),this.convertToString(o.Height-p)),c.flush(),c.write(o.Content,0,o.Content.length),c.writeLine("Q"),c.writeLine("EMC"),c.flush(),this.storeMemoryStream2(c,"/Filter [] /Length {0}"),this.sw.writeLine(""),c.close(),this.sw.writeLine("endstream"),this.sw.writeLine("endobj"),this.sw.writeLine(""),this.addXref(x.aA[0].ref),this.sw.writeLine1("{0} 0 obj",x.aA[0].ref),this.sw.writeLine("<<"),this.sw.writeLine1("/Next {0} 0 R",x.aA[1].ref),this.sw.writeLine("/S /Hide"),this.sw.writeLine1("/T ({0})",a+"Yes"),this.sw.writeLine(">>"),this.sw.writeLine("endobj"),this.sw.writeLine(""),this.addXref(x.aA[1].ref),this.sw.writeLine1("{0} 0 obj",x.aA[1].ref),this.sw.writeLine("<<"),this.sw.writeLine("/H false"),this.sw.writeLine("/S /Hide"),this.sw.writeLine1("/T ({0})",a+"No"),this.sw.writeLine(">>"),this.sw.writeLine("endobj"),this.sw.writeLine(""),x=this.info.acroForm.checkBoxes[e].items[1],this.addXref(x.ref),this.sw.writeLine1("{0} 0 obj",x.ref),this.sw.writeLine("<<"),this.sw.writeLine("/Type /Annot"),this.sw.writeLine("/Subtype /Widget"),this.sw.writeLine("/FT /Btn"),this.sw.writeLine1("/Rect [{0} {1} {2} {3}]",this.convertToString(o.X),this.convertToString(o.Y),this.convertToString(o.X+o.Width-E),this.convertToString(o.Y+o.Height-E)),this.sw.writeLine1("/F {0}",4+(3==this.info.acroForm.checkBoxes[e].items.length||1==y?2:0)),this.sw.writeLine1("/P {0} 0 R",this.info.pageList[o.Page].ref),this.storeStringLine("/T ",a+"No"),this.sw.writeLine("/MK << >>"),this.sw.writeLine("/Ff 65536"),this.sw.writeLine1("/A {0} 0 R",x.aA[0].ref),this.sw.writeLine1("/AP << /N {0} 0 R >>",x.aP.ref),this.sw.writeLine("/H /O"),this.sw.writeLine(">>"),this.sw.writeLine("endobj"),this.sw.writeLine(""),this.addXref(x.aP.ref),this.sw.writeLine1("{0} 0 obj",x.aP.ref),this.sw.writeLine("<<"),this.sw.writeLine("/Type /XObject"),this.sw.writeLine("/Subtype /Form"),this.sw.writeLine("/FormType 1"),this.sw.writeLine1("/BBox [{0} {1} {2} {3}]",this.convertToString(0),this.convertToString(0),this.convertToString(o.Width),this.convertToString(o.Height)),this.sw.writeLine("/Matrix [ 1 0 0 1 0 0 ]"),this.sw.writeLine("/Resources <<"),this.sw.writeLine("/ProcSet [ /PDF ]"),this.sw.writeLine("/Pattern"),this.sw.writeLine("<<");for(var A=0;A>"),this.sw.writeLine("/ColorSpace 3 0 R"),this.sw.writeLine(">>"),(c=new f).writeLine("/Tx BMC"),c.writeLine("q"),p=1,c.writeLine1("{0} {1} {2} {3} re W n",this.convertToString(p),this.convertToString(p),this.convertToString(o.Width-p),this.convertToString(o.Height-p)),c.flush(),c.write(o.Content2,0,o.Content2.length),c.writeLine("Q"),c.writeLine("EMC"),c.flush(),this.storeMemoryStream2(c,"/Filter [] /Length {0}"),this.sw.writeLine(""),c.close(),this.sw.writeLine("endstream"),this.sw.writeLine("endobj"),this.sw.writeLine(""),this.addXref(x.aA[0].ref),this.sw.writeLine1("{0} 0 obj",x.aA[0].ref),this.sw.writeLine("<<"),this.sw.writeLine("/H false"),this.sw.writeLine1("/Next {0} 0 R",x.aA[1].ref),this.sw.writeLine("/S /Hide"),this.sw.writeLine1("/T ({0})",a+"Yes"),this.sw.writeLine(">>"),this.sw.writeLine("endobj"),this.sw.writeLine(""),this.addXref(x.aA[1].ref),this.sw.writeLine1("{0} 0 obj",x.aA[1].ref),this.sw.writeLine("<<"),this.sw.writeLine("/S /Hide"),this.sw.writeLine1("/T ({0})",a+"No"),this.sw.writeLine(">>"),this.sw.writeLine("endobj"),this.sw.writeLine("")}if(3==this.info.acroForm.checkBoxes[e].items.length){var x=this.info.acroForm.checkBoxes[e].items[2];this.addXref(x.ref),this.sw.writeLine1("{0} 0 obj",x.ref),this.sw.writeLine("<<"),this.sw.writeLine("/Type /Annot"),this.sw.writeLine("/Subtype /Widget"),this.sw.writeLine("/FT /Btn"),this.sw.writeLine1("/Rect [{0} {1} {2} {3}]",this.convertToString(o.X),this.convertToString(o.Y),this.convertToString(o.X+o.Width-E),this.convertToString(o.Y+o.Height-E)),this.sw.writeLine("/F 4"),this.sw.writeLine1("/P {0} 0 R",this.info.pageList[o.Page].ref),this.storeStringLine("/T ",a+"None"),this.sw.writeLine("/MK << >>"),this.sw.writeLine("/Ff 65536"),this.sw.writeLine1("/A {0} 0 R",x.aA[0].ref),this.sw.writeLine("/H /O"),this.sw.writeLine(">>"),this.sw.writeLine("endobj"),this.sw.writeLine(""),this.addXref(x.aA[0].ref),this.sw.writeLine1("{0} 0 obj",x.aA[0].ref),this.sw.writeLine("<<"),this.sw.writeLine1("/Next {0} 0 R",x.aA[1].ref),this.sw.writeLine("/S /Hide"),this.sw.writeLine1("/T ({0})",a+"None"),this.sw.writeLine(">>"),this.sw.writeLine("endobj"),this.sw.writeLine(""),this.addXref(x.aA[1].ref),this.sw.writeLine1("{0} 0 obj",x.aA[1].ref),this.sw.writeLine("<<"),this.sw.writeLine("/H false"),this.sw.writeLine("/S /Hide"),this.sw.writeLine1("/T ({0})",a+(b.checkStyleForTrue==t.Report.Components.StiCheckStyle.None?"No":"Yes")),this.sw.writeLine(">>"),this.sw.writeLine("endobj"),this.sw.writeLine("")}}for(var e=0;e>"),this.sw.writeLine(">>"),this.sw.writeLine("endobj"),this.sw.writeLine("")}}}},et.prototype.renderTooltipTable=function(){if(this.haveTooltips)for(var t=0;t>"),i&&("#"==n.Link.charAt(0)?n.DestY>-1?this.sw.writeLine1("/Dest [{0} 0 R /XYZ null {1} null]",this.info.pageList[n.DestPage].ref,this.convertToString(n.DestY)):this.sw.writeLine1("/Dest [{0} 0 R /XYZ null null null]",this.info.pageList[0].ref):(this.sw.writeLine("/A <<"),this.sw.writeLine("/Type /Action"),this.sw.writeLine("/S /URI"),this.storeStringLine("/URI ",r.StiExportUtils.stringToUrl(this.stringReplace(n.Link,"\\","/"))),this.sw.writeLine(">>"))),this.sw.writeLine(">>"),this.sw.writeLine("endobj"),this.sw.writeLine("")}},et.prototype.renderEncodeRecord=function(){this.encrypted&&(this.addXref(this.info.encode.ref),this.sw.writeLine1("{0} 0 obj",this.info.encode.ref),this.sw.writeLine("<<"),this.pdfSecurity.renderEncodeRecord(this.sw),this.sw.writeLine(">>"),this.sw.writeLine("endobj"),this.sw.writeLine(""))},et.prototype.renderExtGStateRecord=function(){this.addXref(this.info.extGState.ref),this.sw.writeLine1("{0} 0 obj",this.info.extGState.ref),this.sw.writeLine("<<");for(var t=0;t<256;t++)if(this.alphaTable[t]){var e=w.format("{0:X2}",t).toUpperCase();this.sw.writeLine1("/GS{0}S <>",e,this.colorTable[t]),this.sw.writeLine1("/GS{0}N <>",e,this.colorTable[t])}this.sw.writeLine(">>"),this.sw.writeLine("endobj"),this.sw.writeLine("")},et.prototype.storeImageData=function(e,r,i,n,o){void 0===o&&(o=!1),null!=e&&e.tryConvertSync(t.System.Drawing.Imaging.ImageFormat.Jpeg);var a=this.imageCache.addImageInt(e),s=new q;return null!=e&&null!=e.bytes?(s.Width=e.width,s.Height=e.height):(s.Width=1,s.Height=1),s.Name=w.format("Image{0}",a),s.ImageFormat=this.imageFormat,this.imageList.push(s),this.imageCacheIndexToList.set(a,s),n&&this.imageInterpolationTable.set(a,!0),r},et.prototype.storeImageDataForGeom=function(t){var e=t.imageToDraw.horizontalResolution/100;this.imageResolutionMode==r.StiImageResolutionMode.NoMoreThan&&(e=t.stretch?t.imageToDraw.width/this.report.unit.convertToHInches(t.width):1/t.multipleFactor),e=this.storeImageData(t.imageToDraw,e,!0,t.smoothing),this.imageInfoList.set(this.imageInfoCounter,e)},et.prototype.writeImageInfo=function(t,e){var i=this.imageList[this.imagesCurrent];this.imagesCurrent++;var n=t.Component.as(M);if(this.imageResolutionMode!=r.StiImageResolutionMode.Exactly&&null!=n&&!n.margins.isEmpty){var o=this.hiToTwips*n.margins.left,a=this.hiToTwips*n.margins.right,s=this.hiToTwips*n.margins.top,l=this.hiToTwips*n.margins.bottom;0!=o&&(t.X+=o,t.Width-=o),0!=l&&(t.Y+=l,t.Height-=l),0!=a&&(t.Width-=a),0!=s&&(t.Height-=s)}var m=h.None;null!=n&&(m=n.imageRotation);var c=i.Width,p=i.Height;m!=h.Rotate90CCW&&m!=h.Rotate90CW||(c=i.Height,p=i.Width);var g=t.X,w=t.Y,u=this.hiToTwips*(c-1)/e,d=this.hiToTwips*(p-1)/e,f=!1;if(this.imageResolutionMode!=r.StiImageResolutionMode.Exactly&&null!=n&&null!=n.imageToDraw){var v=n.imageToDraw,E=n.getPaintRectangle(!0,!1);E=n.convertImageMargins(E,!1);var b=new W(0,0,E.width,E.height);if(n.stretch){var y=c,x=p;if(null==v&&(y=1,x=1),n.aspectRatio){var A=b.width/y,T=b.height/x;switch(A>T?b.width=y*T:b.height=x*A,n.vertAlignment){case X.Center:b.y=(E.height-b.height)/2;break;case X.Top:b.y=E.height-b.height;break}switch(n.horAlignment){case U.Center:b.x=(E.width-b.width)/2;break;case U.Right:b.x=E.width-b.width;break}g+=b.x*this.hiToTwips,w+=b.y*this.hiToTwips,u=b.width*this.hiToTwips,d=b.height*this.hiToTwips}else u=t.Width,d=t.Height}else{var y=c*n.multipleFactor,x=p*n.multipleFactor;switch(null!=v&&null!=v.bytes||(y=1,x=1),b.width=y,b.height=x,n.horAlignment){case U.Center:b.x=(E.width-y)/2;break;case U.Right:b.x=E.width-y;break}switch(n.vertAlignment){case X.Center:b.y=(E.height-x)/2;break;case X.Top:b.y=E.height-x;break}g+=b.x*this.hiToTwips,w+=b.y*this.hiToTwips,u=b.width*this.hiToTwips,d=b.height*this.hiToTwips,f=!0}}this.pageStream.writeLine("q"),this.pushColorToStack(),this.setNonStrokeColor(S.black),f&&this.pageStream.writeLine1("{0} {1} {2} {3} re W n",this.convertToString(t.X),this.convertToString(t.Y),this.convertToString(t.Width),this.convertToString(t.Height)),m==h.None?this.pageStream.writeLine1("{0} 0 0 {1} {2} {3} cm",this.convertToString(u),this.convertToString(d),this.convertToString(g),this.convertToString(w)):(this.pageStream.writeLine1("1 0 0 1 {0} {1} cm",this.convertToString(g+u/2),this.convertToString(w+d/2)),m==h.Rotate90CCW&&this.pageStream.writeLine("0 1 -1 0 0 0 cm"),m==h.Rotate90CW&&this.pageStream.writeLine("0 -1 1 0 0 0 cm"),m==h.Rotate180&&this.pageStream.writeLine("-1 0 0 -1 0 0 cm"),m==h.FlipHorizontal&&this.pageStream.writeLine("-1 0 0 1 0 0 cm"),m==h.FlipVertical&&this.pageStream.writeLine("1 0 0 -1 0 0 cm"),m==h.Rotate90CCW||m==h.Rotate90CW?this.pageStream.writeLine1("{0} 0 0 {1} {2} {3} cm",this.convertToString(d),this.convertToString(u),this.convertToString(-d/2),this.convertToString(-u/2)):this.pageStream.writeLine1("{0} 0 0 {1} {2} {3} cm",this.convertToString(u),this.convertToString(d),this.convertToString(-u/2),this.convertToString(-d/2))),this.pageStream.writeLine1("/{0} Do",i.Name),this.pageStream.writeLine("Q"),this.popColorFromStack()},et.prototype.writeImageInfo2=function(t,e,r){var i=this.imageList[this.imagesCurrent];this.imagesCurrent++,this.pageStream.writeLine("q"),this.pushColorToStack(),this.setNonStrokeColor(S.black),this.pageStream.writeLine1("{0} 0 0 {1} {2} {3} cm",this.convertToString(this.hiToTwips*i.Width/e),this.convertToString(this.hiToTwips*i.Height/r),this.convertToString(t.X),this.convertToString(t.Y)),this.pageStream.writeLine1("/{0} Do",i.Name),this.pageStream.writeLine("Q"),this.popColorFromStack()},et.prototype.renderImage=function(t,r){if(this.imageInfoList.containsKey(this.imageInfoCounter)){var i=this.imageInfoList.get(this.imageInfoCounter);this.writeImageInfo(t,i)}else{var n=t.Component.as(z);if(null!=n&&t.Component.isExportAsImage(e.StiExportFormat.Pdf)){var i,o={ref:i=r},a=n.getImage(o,e.StiExportFormat.Pdf);i=o.ref,null!=a&&null!=a.bytes&&this.writeImageInfo(t,i)}}},et.prototype.renderWatermark=function(e,i,n,o,a){var s=e.watermark;if(null!=s&&s.enabled){if(null!=s.image&&s.showImageBehind==i){var l=this.imageList[this.imagesCurrent],m=l.Width*this.hiToTwips*s.imageMultipleFactor,c=l.Height*this.hiToTwips*s.imageMultipleFactor,p=0,g=0,h=1,u=1,d=s.imageAlignment,f=s.imageTiling;if(s.imageStretch){var v=c/m;m=n,c=o,f=!1,s.aspectRatio&&(o/n>v?c=m*v:m=c/v)}switch((s.imageStretch||s.imageMultipleFactor>1)&&this.imageInterpolationTable.set(this.imageCache.imageIndex[this.imagesCurrent],!0),f&&(d=t.System.Drawing.ContentAlignment.TopLeft,h=Math.round2(n/m)+1,u=Math.round2(o/c)+1),d){case t.System.Drawing.ContentAlignment.TopCenter:case t.System.Drawing.ContentAlignment.MiddleCenter:case t.System.Drawing.ContentAlignment.BottomCenter:p=(n-m)/2;break;case t.System.Drawing.ContentAlignment.TopRight:case t.System.Drawing.ContentAlignment.MiddleRight:case t.System.Drawing.ContentAlignment.BottomRight:p=n-m;break}switch(d){case t.System.Drawing.ContentAlignment.TopLeft:case t.System.Drawing.ContentAlignment.TopCenter:case t.System.Drawing.ContentAlignment.TopRight:g=o-c;break;case t.System.Drawing.ContentAlignment.MiddleLeft:case t.System.Drawing.ContentAlignment.MiddleCenter:case t.System.Drawing.ContentAlignment.MiddleRight:g=(o-c)/2;break}this.setNonStrokeColor(S.fromArgb(255-s.imageTransparency,S.black));for(var E=0;E'),this.addXref(this.info.metadata.ref),this.sw.writeLine1("{0} 0 obj",this.info.metadata.ref),this.sw.writeLine("<<"),this.sw.writeLine("/Type /Metadata"),this.sw.writeLine("/Subtype /XML"),this.storeMemoryStream2(s,"/Length {0}"),this.sw.writeLine(""),this.sw.writeLine("endstream"),this.sw.writeLine("endobj"),this.sw.writeLine("")},et.prototype.renderColorSpace=function(){this.addXref(this.info.destOutputProfile.ref),this.sw.writeLine1("{0} 0 obj",this.info.destOutputProfile.ref),this.sw.writeLine("<<"),this.sw.writeLine("/N 3");var t=null,e=null;1==this.compressed?(t=r.StiExportUtils.makePdfDeflateStream(r.StiPdfResources.sRGBprofile),e="/Length {0} /Filter [/FlateDecode] /Length1 "+r.StiPdfResources.sRGBprofile.length.toString(),this.storeMemoryStream2(t,e)):((t=new f).write(r.StiPdfResources.sRGBprofile,0,r.StiPdfResources.sRGBprofile.length),e="/Length {0}",this.storeMemoryStream2(t,e)),this.sw.writeLine(""),this.sw.writeLine("endstream"),this.sw.writeLine("endobj"),this.sw.writeLine(""),this.addXref(this.info.outputIntents.ref),this.sw.writeLine1("{0} 0 obj",this.info.outputIntents.ref),this.sw.writeLine("[<<"),this.storeStringLine("/Info","sRGB IEC61966-2.1"),this.storeStringLine("/OutputConditionIdentifier","Custom"),this.storeStringLine("/OutputCondition",""),this.storeStringLine("/RegistryName",""),this.sw.writeLine("/S /GTS_PDFA1"),this.sw.writeLine1("/DestOutputProfile {0} 0 R",this.info.destOutputProfile.ref),this.sw.writeLine("/Type /OutputIntent"),this.sw.writeLine(">>]"),this.sw.writeLine("endobj"),this.sw.writeLine("")},et.prototype.renderAutoPrint=function(){this.autoPrint!=r.StiPdfAutoPrintMode.None&&(this.addXref(this.info.embeddedJS.ref),this.sw.writeLine1("{0} 0 obj",this.info.embeddedJS.ref),this.sw.writeLine("<<"),this.sw.writeLine1("/Names [(EmbeddedJS) {0} 0 R]",this.info.embeddedJS.content.ref),this.sw.writeLine(">>"),this.sw.writeLine("endobj"),this.sw.writeLine(""),this.addXref(this.info.embeddedJS.content.ref),this.sw.writeLine1("{0} 0 obj",this.info.embeddedJS.content.ref),this.sw.writeLine("<<"),this.sw.writeLine("/S /JavaScript"),this.sw.writeLine1("/JS (print\\({0}\\);)",this.autoPrint==r.StiPdfAutoPrintMode.Dialog?"true":"false"),this.sw.writeLine(">>"),this.sw.writeLine("endobj"),this.sw.writeLine(""))},et.prototype.addBookmarkNode=function(t,e){var r=new $;r.Parent=-1,r.First=-1,r.Last=-1,r.Prev=-1,r.Next=-1,r.Count=-1,r.Page=-1,r.Y=-1,r.Title="",r.Guid="",r.Used=-1==e,this.bookmarksTree.push(r);var i=this.bookmarksTree.stimulsoft.countItems-1;if(r.Parent=e,r.Title=t.text,r.Guid=t.componentGuid,0==t.bookmarks.count)r.Count=0;else{for(var n=-1,o=0;o<=t.bookmarks.count-1;o++){var a=this.bookmarksTree.stimulsoft.countItems,s=t.bookmarks.list[o];this.addBookmarkNode(s,i);var l=this.bookmarksTree[a];o0&&(l.Prev=n),this.bookmarksTree[a]=l,n=a}r.First=i+1,r.Last=this.bookmarksTree.stimulsoft.countItems-1,r.Count=this.bookmarksTree.stimulsoft.countItems-i-1}this.bookmarksTree[i]=r},et.prototype.makeBookmarkFromTree=function(t,e){if(t.text=e.Title,t.bookmarks=new m,e.Count>0){var r=e.First;while(-1!=r){var i=this.bookmarksTree[r];if(i.Used){var n=new c;t.bookmarks.add(n),this.makeBookmarkFromTree(n,i)}r=i.Next}}},et.prototype.exportPdf=function(t,e,r){try{this.exportPdf1(t,e,r)}finally{}},et.prototype.exportPdf1=function(m,p,h){var u,d,S,f,b,y,x,A,N,M;if(null==h)throw new Error("The 'settings' argument cannot be equal in null.");this.report=m;var W=h.pageRange,U=h.imageResolution;this.imageResolutionMode=h.imageResolutionMode,this.imageQuality=h.imageQuality,this.embeddedFonts=h.embeddedFonts,this.standardPdfFonts=!!h.standardPdfFonts,this.compressed=!!h.compressed,this.useUnicodeMode=h.useUnicode;var X=h.passwordInputUser,j=h.passwordInputOwner,q=h.userAccessPrivileges;this.keyLength=h.keyLength,this.pdfComplianceMode=h.pdfComplianceMode,this.autoPrint=h.autoPrintMode,this.allowEditable=h.allowEditable,this.creatorName=t["StiOptions"].Export.Pdf.creatorString,this.keywords=t["StiOptions"].Export.Pdf.keywordsString,w.isNullOrEmpty(h.creatorString)||(this.creatorName=h.creatorString),w.isNullOrEmpty(h.keywordsString)||(this.keywords=h.keywordsString),w.isNullOrEmpty(this.creatorName)&&(this.creatorName=this.producerName),this.usePdfA=this.pdfComplianceMode!=r.StiPdfComplianceMode.None,this.useTransparency=this.pdfComplianceMode!=r.StiPdfComplianceMode.A1,this.compressed=!0,this.compressedFonts=!0,this.usePdfA&&(this.standardPdfFonts=!1,this.embeddedFonts=!0,this.useUnicodeMode=!0);var Q=W.rangeType!=e.StiRangeType.All,tt=!this.usePdfA;this.embeddedFonts&&(this.standardPdfFonts=!1),this.imageQuality<0&&(this.imageQuality=0),this.imageQuality>1&&(this.imageQuality=1),this.useUnicodeMode&&(this.standardPdfFonts=!1),U<10&&(U=10),U/=100,this.imageResolutionMain=U,this.bidi=new r.StiBidirectionalConvert(!0),this.pdfFont=new r.PdfFonts,this.pdfFont.standardPdfFonts=this.standardPdfFonts,this.pdfFont.useUnicode=this.useUnicodeMode,this.fontGlyphsReduceNotNeed=null;for(var et=0;et<=255;et++){var rt,it=Math.round2(et/255,3).toString().split(",").join(t.System.Globalization.CultureInfo.currentCulture.numberFormat.numberDecimalSeparator);this.colorTable[et]=it,this.alphaTable[et]=!1}switch(this.lastColorStrokeA=255,this.lastColorNonStrokeA=255,this.colorStack=new Array,this.imageList=new Array,this.imageCompressionMethod){case r.StiPdfImageCompressionMethod.Flate:this.imageCache=new e.StiImageCache(!0,!0,e.ImageFormat.MemoryBmp,this.imageQuality,tt);break;default:this.imageCache=new e.StiImageCache(!0,!0,e.ImageFormat.Jpeg,this.imageQuality,tt);break}this.imageInterpolationTable=new T,this.imageCacheIndexToList=new T,this.imageInfoList=new T,this.imageInfoCounter=0,this.pdfFont.fontList=new Array,this.xref=new Array,this.bookmarksTree=new Array,this.haveBookmarks=!1,this.linksArray=new Array,this.annotsArray=new Array,this.annots2Array=new Array,this.unsignedSignaturesArray=new Array,this.shadingArray=new Array,this.shadingFunctionArray=new Array,this.hatchArray=new Array,this.tooltipsArray=new Array,this.sw=p,this.fontsCounter=0,this.bookmarksCounter=0,this.linksCounter=0,this.annotsCounter=0,this.annots2Counter=0,this.tooltipsCounter=0;for(var nt=0;nt<256;nt++)this.CodePage1252[nt]=nt;for(var nt=0;nt<32;nt++)this.CodePage1252[128+nt]=this.CodePage1252part80AF[nt];this.fontGlyphsReduceNotNeed=l.create(Boolean,256);var ot=O.now,at=ot.toString("yyyyMMddHHmmsszzz");this.currentDateTime=at.substr(0,17)+"'"+at.substr(18,2)+"'",this.currentDateTimeMeta=ot.toString("yyyy-MM-ddTHH:mm:sszzz");var st=ot.toString("yyyyMMddHHmmssffff");st+=this.producerName,st+=this.creatorName,st+=m.reportAuthor,st+=m.reportAlias,st+=m.reportName;for(var lt="",nt=0;nt0&&!wt.hyperlinkValue.toString().trim().stimulsoft.startsWith("javascript:")&&!this.usePdfA)(ut=new Z).Link=wt.hyperlinkValue.ToString(),ut.Page=pt,this.linksArray.push(ut);if(null!=wt.watermark&&wt.watermark.enabled){if(!w.isNullOrEmpty(wt.watermark.text)){null!=wt.watermark.font&&this.pdfFont.getFontNumber(wt.watermark.font);var dt=new P(wt.watermark.text);dt=this.bidi.convert(dt,!1),this.pdfFont.storeUnicodeSymbolsInMap(dt.toString()),this.storeShadingData1(wt.watermark.textBrush,pt),this.storeHatchData(wt.watermark.textBrush)}1==wt.watermark.showImageBehind&&null!=wt.watermark.image&&this.storeImageData(wt.watermark.image,U,!1,!1)}try{for(var St=(S=void 0,__values(wt.components.list)),ft=St.next();!ft.done;ft=St.next()){var vt;if((vt=ft.value).enabled&&(!m.isPrinting||vt.printable)){var Et,ut,ut,ut;if(this.imageInfoCounter++,Et=vt.width>0&&vt.height>0){var bt=vt.as(k);null!=bt&&(this.storeShadingData1(bt.brush,pt),this.storeHatchData(bt.brush));var yt=vt.as(C),xt;if(null!=yt&&r.StiPdfRenderPrimitives.checkShape(yt))continue;if(vt.stimulsoft.is(V)){var At=vt,Tt;if(this.storeShadingData1(At.textBrush,pt),this.storeHatchData(At.textBrush),this.allowEditable==r.StiPdfAllowEditable.Yes&&At.editable)(Tt=new J).Page=pt,Tt.Component=vt,this.annots2Array.push(Tt);continue}if(xt=vt.isExportAsImage(e.StiExportFormat.Pdf)){var Pt=!1,Lt=vt;if(this.imageResolutionMode!=r.StiImageResolutionMode.Exactly&&null!=Lt&&null!=Lt.imageToDraw&&null!=Lt.imageToDraw.bytes){Pt=!0;var Ct=Lt.imageToDraw.horizontalResolution/100;this.imageResolutionMode==r.StiImageResolutionMode.NoMoreThan&&(Ct=Lt.stretch?Lt.imageToDraw.width/m.unit.convertToHInches(vt.width):1/Lt.multipleFactor),Ct=this.storeImageData(Lt.imageToDraw,Ct,!0,Lt.smoothing),this.imageInfoList.set(this.imageInfoCounter,Ct)}if(!Pt){var Ft=vt.as(z);if(null!=Ft){var Ct,Bt={ref:Ct=U},kt=Ft.getImage(Bt,e.StiExportFormat.Pdf);Ct=Bt.ref,null!=kt&&(this.storeImageData(kt,Ct,!1,!1),this.imageInfoList.set(this.imageInfoCounter,Ct))}}}var Rt=vt.as(B);if(null!=Rt)var It=this.pdfFont.getFontNumber(Rt.font);var Dt=vt.stimulsoft.as(I);if(vt.is(L)&&!xt){var Nt=vt,Ot=null!=Dt&&null!=Dt.textOptions&&Dt.textOptions.rightToLeft,dt=new P(Nt.text);if(Nt.allowHtmlTags){var Ht=new t.Base.Drawing.StiHtmlTagsState(Nt.font.bold,Nt.font.italic,Nt.font.underline,Nt.font.strikeout,Nt.font.size,Nt.font.name,E.toColor(Nt.textBrush),E.toColor(Nt.brush),!1,!1,0,0,1,Nt.horAlignment),Mt=new t.Base.Drawing.StiHtmlState(Ht,0),Wt=t.Base.Drawing.StiTextRenderer.parseHtmlToStates(Nt.text,Mt);dt=new P;for(var Ut=0;Ut0&&!vt.hyperlinkValue.toString().trim().stimulsoft.startsWith("javascript:")&&!this.usePdfA)(ut=new Z).Link=vt.hyperlinkValue.toString(),ut.Page=pt,this.linksArray.push(ut);if(null!=vt.toolTipValue&&vt.toolTipValue.toString().trim().length>0&&!this.usePdfA)(ut=new Z).Page=pt,this.tooltipsArray.push(ut);if(null!=vt.tagValue&&"pdfunsignedsignaturefield"==vt.tagValue.toString().toLowerCase()&&!this.usePdfA)(ut=new J).Page=pt,this.unsignedSignaturesArray.push(ut)}}}catch(t){S={error:t}}finally{try{ft&&!ft.done&&(f=St.return)&&f.call(St)}finally{if(S)throw S.error}}pt++,null!=wt.watermark&&wt.watermark.enabled&&0==wt.watermark.showImageBehind&&null!=wt.watermark.image&&this.storeImageData(wt.watermark.image,U,!1,!1)}}catch(t){u={error:t}}finally{try{ht&&!ht.done&&(d=gt.return)&&d.call(gt)}finally{if(u)throw u.error}}for(var $t=0;$t0&&(this.annotsArray.stimulsoft.countItems>0||this.annots2Array.stimulsoft.countItems>0))for(var $t=0;$t0,this.annotsCounter=this.annotsArray.length,this.annots2Counter=this.annots2Array.length,this.unsignedSignaturesCounter=this.unsignedSignaturesArray.length,this.haveAnnots=this.annotsCounter>0||this.annots2Counter>0||this.unsignedSignaturesCounter>0,this.tooltipsCounter=this.tooltipsArray.stimulsoft.countItems,this.haveTooltips=this.tooltipsCounter>0,this.pdfFont.InitFontsData(m),this.fontsCounter=this.pdfFont.fontList.length,this.info=new r.StiPdfStructure;for(var nt=0;nt14400&&(se=14400),this.haveBookmarks&&(!w.isNullOrEmpty(wt.guid)||null!=wt.bookmarkValue&&""!=wt.bookmarkValue.toString())){var we=0;while(we0&&ue.Title==wt.bookmarkValue&&(de=!0):w.isNullOrEmpty(wt.guid)||ue.Guid!=wt.guid||(de=!0),de){ue.Page=ne-1,ue.Y=se,ue.Used=!0,this.bookmarksTree[we]=ue;break}}we++}}if(null!=wt.hyperlinkValue&&wt.hyperlinkValue.toString().trim().length>0&&!wt.hyperlinkValue.toString().trim().stimulsoft.startsWith("javascript:")&&!this.usePdfA)(ut=new Z).Link=wt.hyperlinkValue.toString(),ut.X=0,ut.Y=0,ut.Width=le,ut.Height=se,ut.Page=ne,ut.DestPage=-1,ut.DestY=-1,this.linksArray.push(ut);if(null!=wt.brush)(Zt=new _(this)).X=0,Zt.Y=0,Zt.Width=le,Zt.Height=se,(he=new v).brush=wt.brush,he.border=null,Zt.Component=he,r.StiPdfRenderPrimitives.renderBorder1(Zt);this.renderWatermark(wt,!0,le,se,U);var Se=new Array,Zt,he;try{for(var fe=(x=void 0,__values(wt.components.list)),ve=fe.next();!ve.done;ve=fe.next()){var vt;if((vt=ve.value).enabled&&(!m.isPrinting||vt.printable)){this.imageInfoCounter++;var Ee=this.hiToTwips*m.unit.convertToHInches(vt.left),be=this.hiToTwips*m.unit.convertToHInches(vt.top),ye=this.hiToTwips*m.unit.convertToHInches(vt.right),xe=this.hiToTwips*m.unit.convertToHInches(vt.bottom),Zt,Et,ut,ut,ut;if((Zt=new _(this)).X=Ee+me,Zt.Y=be+pe,Zt.Width=ye-Ee,Zt.Height=xe-be,Zt.Y=se-(Zt.Y+Zt.Height),Zt.Component=vt,Et=vt.width>0&&vt.height>0){var xt=vt.isExportAsImage(e.StiExportFormat.Pdf);if(this.usePdfA||vt.printable||this.pageStream.writeLine("/OC /oc1 BDC"),vt.is(C)||r.StiPdfRenderPrimitives.renderBorder1(Zt),vt.is(L)&&!xt){var Ae=vt,Te=0;this.haveAnnots&&Ae.editable&&(Te=this.pageStream.position,this.pushColorToStack(),this.lastColorStrokeA=255,this.lastColorNonStrokeA=255);var Pe=r.StiPdfRenderIndicators.renderIndicators(Zt);if(Ae.allowHtmlTags){for(var Ht=new t.Base.Drawing.StiHtmlTagsState(Ae.font.bold,Ae.font.italic,Ae.font.underline,Ae.font.strikeout,Ae.font.size,Ae.font.name,E.toColor(Ae.textBrush),E.toColor(Ae.brush),!1,!1,0,0,1,Ae.horAlignment),Mt=new t.Base.Drawing.StiHtmlState(Ht,0),Wt=t.Base.Drawing.StiTextRenderer.parseHtmlToStates(Ae.text,Mt),Le=Ae.text.stimulsoft.startsWith(""),dt="",Ut=0;Ut0&&ue.Title==vt.bookmarkValue&&(de=!0):w.isNullOrEmpty(vt.guid)||ue.Guid!=vt.guid||(de=!0),de){ue.Page=ne-1,ue.Y=Zt.Y+Zt.Height,ue.Used=!0,this.bookmarksTree[we]=ue;break}}we++}}if(null!=vt.hyperlinkValue&&vt.hyperlinkValue.toString().trim().length>0&&!vt.hyperlinkValue.toString().trim().stimulsoft.startsWith("javascript:")&&!this.usePdfA)(ut=new Z).Link=vt.hyperlinkValue.toString(),ut.X=Zt.X,ut.Y=Zt.Y,ut.Width=Zt.Width,ut.Height=Zt.Height,ut.Page=ne,ut.DestPage=-1,ut.DestY=-1,this.linksArray.push(ut);if(null!=vt.tagValue&&vt.tagValue.toString().trim().length>0)if((ut=new Z).Link=vt.tagValue.toString(),ut.X=Zt.X,ut.Y=Zt.Y,ut.Width=Zt.Width,ut.Height=Zt.Height,ut.Page=ne-1,ut.DestPage=-1,ut.DestY=-1,this.tagsArray.push(ut),"pdfunsignedsignaturefield"==ut.Link.trim().toLowerCase()&&!this.usePdfA){var Me=new J;Me.X=ut.X,Me.Y=ut.Y,Me.Width=ut.Width,Me.Height=ut.Height,Me.Page=ut.Page,Me.Component=vt,this.unsignedSignaturesArray.push(Me)}if(null!=vt.toolTipValue&&vt.toolTipValue.toString().trim().length>0&&!this.usePdfA)(ut=new Z).Link=vt.toolTipValue.toString().trim(),ut.X=Zt.X,ut.Y=Zt.Y,ut.Width=Zt.Width,ut.Height=Zt.Height,ut.Page=ne-1,ut.DestPage=-1,ut.DestY=-1,this.tooltipsArray.push(ut)}}}catch(t){x={error:t}}finally{try{ve&&!ve.done&&(A=fe.return)&&A.call(fe)}finally{if(x)throw x.error}}try{for(var We=(N=void 0,__values(Se)),Ue=We.next();!Ue.done;Ue=We.next()){var Xe=Ue.value;r.StiPdfRenderPrimitives.renderBorder2(Xe)}}catch(t){N={error:t}}finally{try{Ue&&!Ue.done&&(M=We.return)&&M.call(We)}finally{if(N)throw N.error}}if(Se.stimulsoft.clear(),null!=wt.border)(Zt=new _(this)).X=me,Zt.Y=ge,Zt.Width=le-me-ce,Zt.Height=se-pe-ge,(he=new v).border=wt.border,Zt.Component=he,r.StiPdfRenderPrimitives.renderBorder2(Zt);this.renderWatermark(wt,!1,le,se,U),this.renderPageFooter(se,le)}}catch(t){b={error:t}}finally{try{ae&&!ae.done&&(y=oe.return)&&y.call(oe)}finally{if(b)throw b.error}}if(this.bookmarksTreeTemp=null,this.haveBookmarks&&Q){for(var ze=0;ze0){var ue;(ue=new $).Parent=-1,ue.First=-1,ue.Last=-1,ue.Prev=-1,ue.Next=-1,ue.Count=-1,ue.Page=-1,ue.Y=-1,ue.Title="";for(var ze=0;ze0,d=(e.style&s.Italic)>0;u&&d?null!=(h=t.Base.StiFontCollection.getBinFont(e.name,s.Italic))&&null!=h.data?(w=h.data,this.NeedSyntBold=!0):null!=(h=t.Base.StiFontCollection.getBinFont(e.name,s.Bold))&&null!=h.data?(w=h.data,this.NeedSyntItalic=!0):null!=(h=t.Base.StiFontCollection.getBinFont(e.name,s.Regular))&&null!=h.data&&(w=h.data,this.NeedSyntItalic=!0,this.NeedSyntBold=!0):(u&&null!=(h=t.Base.StiFontCollection.getBinFont(e.name,s.Regular))&&null!=h.data&&(w=h.data,this.NeedSyntBold=!0),d&&null!=(h=t.Base.StiFontCollection.getBinFont(e.name,s.Regular))&&null!=h.data&&(w=h.data,this.NeedSyntItalic=!0))}if(null==w){var S=a.dictionary.resources.getByName(e.name);null==S&&(S=a.dictionary.resources.getByAlias(e.name)),null!=S&&null!=S.content&&S.content.length>0&&(w=new Uint8Array(S.content),this.NeedSyntBold=!0,this.NeedSyntItalic=!0)}if(null!=w&&w.stimulsoft.is(Uint8Array)&&w.byteLength>0){var f=this.getCharToGlyphTable(w,e.name);if(null!=f){var v=0;"Wingdings"!=e.name&&"Wingdings 2"!=e.name&&"Wingdings 3"!=e.name||(v=61440);for(var g=0;g=128&&E<=255&&(E+=v),i.GlyphList[g]=f[E]}}}i.NeedSyntBold=this.NeedSyntBold,i.NeedSyntItalic=this.NeedSyntItalic},Object.defineProperty(g.prototype,"currentFont",{get:function(){return this._currentFont},set:function(t){this._currentFont!=t&&(this._currentFont=t,null!=this.fonts&&this.fonts.length>0&&(this.Widths=this.fonts[this._currentFont].Widths,this.CH=this.fonts[this._currentFont].CH,this.XH=this.fonts[this._currentFont].XH,this.ASC=this.fonts[this._currentFont].ASC,this.DESC=this.fonts[this._currentFont].DESC,this.tmASC=this.fonts[this._currentFont].tmASC,this.tmDESC=this.fonts[this._currentFont].tmDESC,this.tmExternal=this.fonts[this._currentFont].tmExternal,this.MacAscend=this.fonts[this._currentFont].MacAscend,this.MacDescend=this.fonts[this._currentFont].MacDescend,this.MacLineGap=this.fonts[this._currentFont].MacLineGap,this.LLX=this.fonts[this._currentFont].LLX,this.LLY=this.fonts[this._currentFont].LLY,this.URX=this.fonts[this._currentFont].URX,this.URY=this.fonts[this._currentFont].URY,this.StemV=this.fonts[this._currentFont].StemV,this.ItalicAngle=this.fonts[this._currentFont].ItalicAngle,this.LineGap=this.fonts[this._currentFont].LineGap,this.NtmFlags=this.fonts[this._currentFont].NtmFlags,this.UnderscoreSize=this.fonts[this._currentFont].UnderscoreSize,this.UnderscorePosition=this.fonts[this._currentFont].UnderscorePosition,this.StrikeoutSize=this.fonts[this._currentFont].StrikeoutSize,this.StrikeoutPosition=this.fonts[this._currentFont].StrikeoutPosition,this.UnicodeMap=this.fonts[this._currentFont].UnicodeMap,this.UnicodeMapBack=this.fonts[this._currentFont].UnicodeMapBack,this.GlyphList=this.fonts[this._currentFont].GlyphList,this.GlyphBackList=this.fonts[this._currentFont].GlyphBackList,this.GlyphRtfList=this.fonts[this._currentFont].GlyphRtfList,this.SymsToPDF=this.fonts[this._currentFont].SymsToPDF,this.CharPdfNames=this.fonts[this._currentFont].CharPdfNames,this.MappedSymbolsCount=this.fonts[this._currentFont].MappedSymbolsCount,this.NeedSyntBold=this.fonts[this._currentFont].NeedSyntBold,this.NeedSyntItalic=this.fonts[this._currentFont].NeedSyntItalic,this.GlyphWidths=this.fonts[this._currentFont].GlyphWidths,this.ChildFontsMap=this.fonts[this._currentFont].ChildFontsMap))},enumerable:!1,configurable:!0}),g.prototype.InitFontsData=function(t){if(!this.useUnicode)for(var i=this.fontList.length,n=0;n0&&a++;if(a>255){for(var c=this.fontList[n],p=null,g=r.create(Number,65536),h=this.fontList.length,s=0;s0&&(p[s]=1,g[s]=h,254==++a&&(w=!0))}c.ChildFontsMap=g,this.fontList[n]=c}}this.fonts=r.create(l,this.fontList.length);for(var n=0;nthis.maxSymbols&&(v=this.maxSymbols),this.useUnicode||92!=v||(d.UnicodeMapBack[v]=E,v++));var b=8226;d.UnicodeMap[b]=v,d.UnicodeMapBack[v]=b,v++,d.MappedSymbolsCount=v;for(var E=0;E0)for(var c=0;c0&&-1!=this.currentFont)for(var e=this.UnicodeMapsList[this.currentFont],r=0;r0?(u+=2,u+=2):u+=2,(d&this.WE_HAVE_A_SCALE)>0?u+=2:(d&this.WE_HAVE_AN_X_AND_Y_SCALE)>0?(u+=2,u+=2):(d&this.WE_HAVE_A_TWO_BY_TWO)>0&&(u+=2,u+=2,u+=2,u+=2)}while((d&this.MORE_COMPONENTS)>0)}}}for(var f=0,v=p,m=0;m0&&(D+=4-O);var H=this.TtfHeaderSize+16*I;this.SetUInt32(C,H,n.Tables[N].Tag),this.SetUInt32(C,H+4,n.Tables[N].CheckSum),this.SetUInt32(C,H+8,n.Tables[N].NewOffset),this.SetUInt32(C,H+12,n.Tables[N].NewLength),I++}(o=new a).writeBytes(C,0,C.length);for(var N=0;N0&&o.write(r.create(Number,4-O),0,4-O)}o.flush()}return o},g.prototype.scanFontFile=function(t,e){var r=null,i=this.GetUInt32(t,0);if(65536==i)r=this.getTtfInfo(t,0);else{var n=this.GetUInt32(t,4);if(1953784678==i&&(65536==n||131072==n))for(var o,a=this.GetUInt32(t,8)-1;a>=0;a--){var s=this.GetUInt32(t,12+4*a),l;if(65536==this.GetUInt32(t,s)&&(r=this.getTtfInfo(t,s)).FontName.contains(e))break}}return r},g.prototype.getCmapTable=function(t,e){for(var i=null,n=e.Tables[e.IndexCmapTable].Offset,o=this.GetUInt16(t,n+2),a=0;a32767?r-65536:r},g.prototype.SetUInt16=function(t,e,r){t[e+0]=r>>>8&255,t[e+1]=255&r},g.prototype.SetUInt32=function(t,e,r){t[e+0]=r>>>24&255,t[e+1]=r>>>16&255,t[e+2]=r>>>8&255,t[e+3]=255&r},g.prototype.clear=function(){this.fonts=null,this.fontList=null,this.UnicodeMapsList=null,this.GlyphMapsList=null,this.Widths=null,this.CharPdfNames=null,this.UnicodeMap=null,this.UnicodeMapBack=null,this.GlyphList=null,this.GlyphBackList=null,this.GlyphRtfList=null,this.SymsToPDF=null,this.GlyphWidths=null,this.fontsInfoStore.clear()},g}(l);e.PdfFonts=g;var h=function(){function t(){}return t.prototype.clear=function(){},t}();e.FontsInfoStore=h}(r=e.Export||(e.Export={}))}(e=t.Report||(t.Report={}))}(Stimulsoft||(Stimulsoft={})),function(t){var e;!function(e){var r;!function(e){var r=t.Report.Components.StiImage,i=t.System.StiArray,n=t.System.StiString,o=t.System.Drawing.Point,a=t.System.Drawing.Rectangle,s=t.System.Text.StringBuilder,l=t.Base.Context.StiPenGeom,m=t.System.Drawing.Color,c=t.Base.Drawing.StiBrush,p=t.Base.Drawing.StiGradientBrush,g=t.Base.Drawing.StiGlareBrush,h=t.Base.Drawing.StiHatchBrush,w=t.Base.Drawing.StiGlassBrush,u=t.Base.Drawing.StiPenStyle,d=t.Base.Drawing.StiPenUtils,S=t.System.Drawing.Drawing2D.DashStyle,f=t.System.Drawing.StringFormat,v=t.Report.Components.StiText,E=t.System.Drawing.Rectangle,b=t.System.Drawing.StringAlignment,y=t.Base.Drawing.StiTextHorAlignment,x=t.Base.Drawing.StiVertAlignment,A=t.System.Drawing.StringFormatFlags,T=t.System.Drawing.Size,P=function(){function P(t,e,r){void 0===r&&(r=!1),this.penWidthDefault=.1,this.precision_digits=3,this.hiToTwips=.72,this.pdfCKT=.55228,this.makepath=!1,this.pathClosed=!1,this.path=null,this.pageStream=null,this.pdfService=null,this.assembleData=!1,this.pageNumber=0,this.matrixCache=null,this.xmin=null,this.xmax=null,this.ymin=null,this.ymax=null,this.pageStream=t,this.pdfService=e,this.assembleData=r,this.matrixCache=new Array}return P.prototype.calculateMinMax=function(t){null==this.xmin?this.xmin=t.x:this.xmin=Math.min(this.xmin,t.x),null==this.xmax?this.xmax=t.x:this.xmax=Math.max(this.xmax,t.x),null==this.ymin?this.ymin=t.y:this.ymin=Math.min(this.ymin,t.y),null==this.ymax?this.ymax=t.y:this.ymax=Math.max(this.ymax,t.y)},P.prototype.convertToString=function(e){return Math.round2(e,this.precision_digits).toString().stimulsoft.replaceAll(",",t.System.Globalization.CultureInfo.currentCulture.numberFormat.numberDecimalSeparator)},P.prototype.setPen=function(e,r){if(void 0===r&&(r=!1),null==e)return!1;var i=!1;if(e.stimulsoft.is(t.Base.Context.StiPenGeom)){var n=e.stimulsoft.as(l),o=m.transparent;n.brush.stimulsoft.is(m)&&(o=n.brush.stimulsoft.as(m)),n.brush.stimulsoft.is(c)&&(o=c.toColor(n.brush.stimulsoft.as(c))),this.pdfService.setStrokeColor(o);var a=n.thickness>1?n.thickness:n.thickness*this.hiToTwips;0==a&&(a=this.penWidthDefault),this.pageStream.writeLine1("{0} w",this.convertToString(a)),(i=r&&n.penStyle!=u.Solid)&&this.pageStream.writeLine("q");var s=this.getPenStyleDashString(d.getPenStyle(n.penStyle),.025*n.thickness);null!=s&&this.pageStream.writeLine(s)}return i},P.prototype.setBrush=function(t,e,r){if(void 0===r&&(r=!1),null==t)return!1;if(this.assembleData)return(t.stimulsoft.is(p)||t.stimulsoft.is(g)||t.stimulsoft.is(h)||t.stimulsoft.is(w))&&(this.pdfService.storeShadingData1(t.stimulsoft.as(c),this.pageNumber),this.pdfService.storeHatchData(t.stimulsoft.as(c))),!1;var i=!1,n=m.transparent;if(t.stimulsoft.is(m)&&(n=t.stimulsoft.as(m)),t.stimulsoft.is(c)&&(n=c.toColor(t.stimulsoft.as(c))),this.pdfService.setNonStrokeColor(n),t.stimulsoft.is(p)||t.stimulsoft.is(g)||t.stimulsoft.is(h)||t.stimulsoft.is(w)){var s=this.matrixCache.stimulsoft.peek(),l,u,d=[new o(e.x,e.bottom),new o(e.right,e.y)];s.transformPoints(d);var S=new a(d[0].x,d[0].y,d[1].x-d[0].x,d[1].y-d[0].y),f=this.pdfService.storeShadingData2(S.x,S.y,S.width,S.height,t.stimulsoft.as(c));if((t.stimulsoft.is(p)||t.stimulsoft.is(g))&&this.pageStream.writeLine1("/Pattern cs /P{0} scn",1+f),t.stimulsoft.is(h)){var v=t.stimulsoft.as(h);this.pageStream.writeLine1("/Cs1 cs /PH{0} scn",this.pdfService.getHatchNumber(v)+1)}i=!0}return(i=i&&r)&&this.pageStream.writeLine("q"),i},P.prototype.outputLineString=function(t,e){if(null!=e){var r=this.setPen(e,!0);this.pageStream.writeLine(t),r&&this.pageStream.writeLine("Q")}},P.prototype.convertArcToBezierPoints=function(t,e,r){var n=t.x+t.width/2,a=t.y+t.height/2,s=t.width/2;e*=Math.PI/180,r*=Math.PI/180;var l=Math.ceil(Math.abs(r)/(Math.PI/2)),m=i.create(o,3*l+1,!0),c=r/l,p=Math.sin(c/2),g=Math.cos(c/2),h=4*(1-g)/3,w=p-h*g/(p+1e-4),u=[],d=[];u[0]=g,d[0]=-p,u[1]=g+h,d[1]=-w,u[2]=g+h,d[2]=w,u[3]=g,d[3]=p;var S=Math.sin(e+c/2),f=Math.cos(e+c/2);m[0].x=n+s*(u[0]*f-d[0]*S),m[0].y=a+s*(u[0]*S+d[0]*f);for(var v=0;v0?"l":"m")},P.prototype.getLineToString=function(t){return this.calculateMinMax(t),n.format("{0} {1} l ",this.convertToString(t.x),this.convertToString(t.y))},P.prototype.getRectString4=function(t,e,r,i){return this.getRectString(new a(t,e,r,i))},P.prototype.getRectString=function(t){return n.format("{0} {1} {2} {3} re ",this.convertToString(t.x),this.convertToString(t.top),this.convertToString(t.right-t.x),this.convertToString(t.bottom-t.y))},P.prototype.getBezierString=function(t,e,r){return this.calculateMinMax(t),this.calculateMinMax(e),this.calculateMinMax(r),n.format("{0} {1} {2} {3} {4} {5} c ",this.convertToString(t.x),this.convertToString(t.y),this.convertToString(e.x),this.convertToString(e.y),this.convertToString(r.x),this.convertToString(r.y))},P.prototype.getBezierString2=function(t,e,r,i,a,s){return this.calculateMinMax(new o(t,e)),this.calculateMinMax(new o(r,i)),this.calculateMinMax(new o(a,s)),n.format("{0} {1} {2} {3} {4} {5} c ",this.convertToString(t),this.convertToString(e),this.convertToString(r),this.convertToString(i),this.convertToString(a),this.convertToString(s))},P.prototype.getPolylineString=function(t,e,r){var i=new s;r||i.append(this.getPointString(t[0]));for(var n=r?0:1;n0&&this.matrixCache.push(this.matrixCache.stimulsoft.peek().clone())},P.prototype.restoreState=function(){if(this.assembleData)return;this.pageStream.writeLine("Q"),this.pdfService.popColorFromStack(),this.matrixCache.length>0&&this.matrixCache.pop()},P.prototype.translateTransform=function(t,e){if(this.assembleData)return;this.pageStream.writeLine1("1 0 0 1 {0} {1} cm",this.convertToString(t),this.convertToString(e)),this.matrixCache.length>0&&this.matrixCache.stimulsoft.peek().translate(t,e)},P.prototype.rotateTransform=function(t){if(this.assembleData)return;var e=t*Math.PI/180;this.pageStream.writeLine1("{0} {1} {2} {3} 0 0 cm",this.convertToString(Math.cos(e)),this.convertToString(Math.sin(e)),this.convertToString(-Math.sin(e)),this.convertToString(Math.cos(e))),this.matrixCache.length>0&&this.matrixCache.stimulsoft.peek().rotate(t)},P.prototype.setClip=function(t){if(this.assembleData)return;this.pageStream.writeLine(this.getRectString(t)+"W n")},P.prototype.drawArc2=function(t,e,r,i){},P.prototype.drawText=function(t,e,r,i,n,o,a){},P.prototype.setPixel=function(t,e){},P.prototype.measureString=function(t,e){return new T(0,0)},P.prototype.drawImage=function(t,i){var n=new r;if(n.clientRectangle=i,n.imageToDraw=t,n.smoothing=!0,n.stretch=!0,this.assembleData)return void this.pdfService.storeImageDataForGeom(n);var o=new e.StiPdfData(this.pdfService);o.Component=n,o.Width=i.width,o.Height=i.height,this.pageStream.writeLine("q"),this.pdfService.pushColorToStack(),this.pageStream.writeLine1("1 0 0 1 {0} {1} cm",this.convertToString(i.x),this.convertToString(i.y+i.height)),this.pageStream.writeLine("1 0 0 -1 0 0 cm"),this.pdfService.renderImage(o,100),this.pageStream.writeLine("Q"),this.pdfService.popColorFromStack()},P}();e.StiPdfGeomWriter=P}(r=e.Export||(e.Export={}))}(e=t.Report||(t.Report={}))}(Stimulsoft||(Stimulsoft={})),function(t){var e;!function(e){var r;!function(e){var r=t.System.Drawing.Color,i=t.System.Drawing.Graphics,n=t.Base.Context.StiContext,o=t.Base.Context.StiContextPainter,a=t.System.Drawing.Point,s=t.System.Drawing.Point,l=t.System.Drawing.Rectangle,m=t.System.Drawing.Rectangle,c=t.System.Drawing.StringFormat,p=t.Base.Drawing.StiRotationMode,g=t.Base.Context.StiPushTranslateTransformGeom,h=t.Base.Context.StiPushRotateTransformGeom,w=t.Base.Context.StiPopTransformGeom,u=t.Base.Context.StiBorderGeom,d=t.Base.Context.StiLineGeom,S=t.Base.Context.StiLinesGeom,f=t.Base.Context.StiPushClipGeom,v=t.Base.Context.StiPopClipGeom,E=t.Base.Context.StiPushSmothingModeToAntiAliasGeom,b=t.Base.Context.StiPopSmothingModeGeom,y=t.Base.Context.StiPushTextRenderingHintToAntiAliasGeom,x=t.Base.Context.StiPopTextRenderingHintGeom,A=t.Base.Context.StiCurveGeom,T=t.Base.Context.StiEllipseGeom,P=t.Base.Context.StiCachedShadowGeom,L=t.Base.Drawing.StiShadowSides,C=t.Base.Drawing.StiSolidBrush,F=t.Base.Context.StiShadowGeom,B=t.Base.Context.StiTextGeom,k=t.Base.Context.StiPathGeom,R=t.Base.Context.StiPieSegmentGeom,I=t.Base.Context.StiArcSegmentGeom,D=t.Base.Context.StiLineSegmentGeom,N=t.Base.Context.StiLinesSegmentGeom,O=t.Base.Context.StiCurveSegmentGeom,H=t.Base.Context.StiCloseFigureSegmentGeom,M=t.System.Drawing.Drawing2D.Matrix,W=t.Report.Chart.IStiChart,U=t.Base.Drawing.StiPenStyle,X=t.System.Drawing.Font,z=t.Base.Drawing.StiBrush,V=t.Report.Components.StiImageRotation,G=function(){function G(){}return G.renderChart=function(p,U,z){var G,Y,j,_,q=p.Component.stimulsoft.as(W),K=.96,Q=p.service.report.unit.convertToHInches(p.Component.width)*K,J=p.service.report.unit.convertToHInches(p.Component.height)*K,Z=0,$=0,tt=0,et=1,rt=1;switch(q.rotation){case V.Rotate90CCW:Z=-90,tt=J;break;case V.Rotate90CW:Z=90,$=Q;break;case V.Rotate180:Z=-180,$=Q,tt=J;break;case V.FlipVertical:rt=-1,tt=J;break;case V.FlipHorizontal:et=-1,$=Q;break}switch(q.rotation){case V.Rotate90CCW:case V.Rotate90CW:var it=Q;Q=J,J=it;break}if(!U&&q.rotation!=V.None){var nt=new M(1,0,0,1,0,0);nt.translate($,tt),nt.scale(et,rt),nt.rotate(Z),p.service.pageStream.writeLine1("{0} {1} {2} {3} {4} {5} cm",p.service.convertToString(nt.elements[0]),p.service.convertToString(nt.elements[1]),p.service.convertToString(nt.elements[2]),p.service.convertToString(nt.elements[3]),p.service.convertToString(nt.elements[4]),p.service.convertToString(nt.elements[5]))}var ot=new o,at=new n(ot,!0,!1,!1,1),st=q.isAnimation,lt;q.isAnimation=!1,q.core.render(at,new m(0,0,Q,J),!0).drawGeom(at),q.isAnimation=st;var mt=new M(1,0,0,1,0,0),ct=p.service.hiToTwips/.96;mt.translate(p.X,p.Y+p.Height),mt.scale(1,-1),mt.scale(ct,ct);var pt=new e.StiPdfGeomWriter(p.service.pageStream,p.service,U);pt.pageNumber=z,pt.matrixCache.push(mt);try{for(var gt=__values(at.geoms),ht=gt.next();!ht.done;ht=gt.next()){var wt=ht.value;if(wt.stimulsoft.is(g)){var ut=wt.stimulsoft.as(g);pt.saveState(),pt.translateTransform(ut.x,ut.y)}if(wt.stimulsoft.is(h)){var dt=wt.stimulsoft.as(h);pt.saveState(),pt.rotateTransform(dt.angle)}if(wt.stimulsoft.is(w)&&pt.restoreState(),wt.stimulsoft.is(f)){var St=wt.stimulsoft.as(f);pt.saveState(),pt.setClip(St.clipRectangle)}if(wt.stimulsoft.is(v)&&pt.restoreState(),wt.stimulsoft.is(E)&&pt.saveState(),wt.stimulsoft.is(b)&&pt.restoreState(),wt.stimulsoft.is(y)&&pt.saveState(),wt.stimulsoft.is(x)&&pt.restoreState(),wt.stimulsoft.is(u)){var ft=wt.stimulsoft.as(u);null!=ft.background&&pt.fillRectangle(this.rectToRectangle(ft.rect),ft.background),this.checkPenGeom(ft.borderPen)&&pt.drawRectangle(this.rectToRectangle(ft.rect),ft.borderPen)}if(wt.stimulsoft.is(d)){var vt=wt.stimulsoft.as(d);this.checkPenGeom(vt.pen)&&pt.drawLine(new a(vt.x1,vt.y1),new a(vt.x2,vt.y2),vt.pen)}if(wt.stimulsoft.is(S)){var Et=wt.stimulsoft.as(S);this.checkPenGeom(Et.pen)&&pt.drawPolyline(Et.points,Et.pen)}if(wt.stimulsoft.is(A)){var bt=wt.stimulsoft.as(A);this.checkPenGeom(bt.pen)&&pt.drawSpline(bt.points,bt.tension,bt.pen)}if(wt.stimulsoft.is(T)){var yt=wt.stimulsoft.as(T);null!=yt.background&&pt.fillEllipse(this.rectToRectangle(yt.rect),yt.background),this.checkPenGeom(yt.borderPen)&&pt.drawEllipse(this.rectToRectangle(yt.rect),yt.borderPen)}if(wt.stimulsoft.is(P)){var xt=wt.stimulsoft.as(P),At=xt.rect,Tt=xt.sides,Pt=At.y+8,Lt=At.x+8,Ct=(Tt&L.Edge)>0?4:0;(Tt&L.Top)>0&&(Pt=At.y+4),(Tt&L.Left)>0&&(Lt=At.x+4);for(var Ft=0;Ft<3;Ft++){var Bt=new Array;(Tt&L.Right)>0?(Bt.push(new a(At.right,Pt)),(Tt&L.Bottom)>0?(Bt.push(new a(At.right,At.bottom)),Bt.push(new a(Lt,At.bottom)),Bt.push(new a(Lt,At.bottom+Ft+1)),Bt.push(new a(At.right+Ft+1,At.bottom+Ft+1))):(Bt.push(new a(At.right,At.bottom+Ct)),Bt.push(new a(At.right+Ft+1,At.bottom+Ct))),Bt.push(new a(At.right+Ft+1,Pt))):(Bt.push(new a(Lt,At.bottom)),Bt.push(new a(At.right+Ct,At.bottom)),Bt.push(new a(At.right+Ct,At.bottom+Ft+1)),Bt.push(new a(Lt,At.bottom+Ft+1)));var kt=new C(r.fromArgb(40-10*Ft,r.black));pt.fillPolygon(Bt,kt)}}if(wt.stimulsoft.is(F))var Rt=wt.stimulsoft.as(F);if(wt.stimulsoft.is(B)){var It=wt.stimulsoft.as(B),Dt=new X(It.font.fontName,It.font.fontSize,It.font.fontStyle,It.font.unit),Nt=new c;Nt.alignment=It.stringFormat.alignment,Nt.formatFlags=It.stringFormat.formatFlags,Nt.hotkeyPrefix=It.stringFormat.hotkeyPrefix,Nt.lineAlignment=It.stringFormat.lineAlignment,Nt.trimming=It.stringFormat.trimming;var Ot=this.brushToStiBrush(It.brush);if(It.isRotatedText){var Ht=new a;if(It.location.stimulsoft.is(a))Ht=It.location.stimulsoft.as(a);else if(It.location.stimulsoft.is(s)){var Mt=It.location.stimulsoft.as(s);Ht=new a(Mt.x,Mt.y)}else{var Wt=this.rectToRectangle(It.location);Ht=new a(Wt.x+Wt.width/2,Wt.y+Wt.height/2)}var Ut=i.measureString(It.text,Dt,It.maximalWidth),Xt=new l(0,0,Ut.width,Ut.height),zt=this.getStartPoint(It.rotationMode,Xt);Xt.x-=zt.x,Xt.y-=zt.y,Nt.alignment==t.System.Drawing.StringAlignment.Center&&(Xt.x-=1),Nt.alignment==t.System.Drawing.StringAlignment.Far&&(Xt.x-=2),Xt.width+=2.5,pt.saveState(),pt.translateTransform(Ht.x,Ht.y),0!=It.angle&&pt.rotateTransform(It.angle),pt.drawString(It.text,Dt,Ot,Xt,Nt),pt.restoreState()}else pt.drawString(It.text,Dt,Ot,this.rectToRectangle(It.location),Nt)}if(wt.stimulsoft.is(k)){var Vt=wt.stimulsoft.as(k);pt.beginPath();try{for(var Gt=(j=void 0,__values(Vt.geoms)),Yt=Gt.next();!Yt.done;Yt=Gt.next()){var jt=Yt.value;if(jt.stimulsoft.is(R)){var _t=jt.stimulsoft.as(R);pt.drawPie(_t.rect,_t.startAngle,_t.sweepAngle)}if(jt.stimulsoft.is(I)){var qt=jt.stimulsoft.as(I);pt.drawArc(qt.rect,qt.startAngle,qt.sweepAngle)}if(jt.stimulsoft.is(D)){var Kt=jt.stimulsoft.as(D);pt.drawLine(new a(Kt.x1,Kt.y1),new a(Kt.x2,Kt.y2),null)}if(jt.stimulsoft.is(N)){var Qt=jt.stimulsoft.as(N);pt.drawPolyline(Qt.points,null)}if(jt.stimulsoft.is(O)){var Jt=jt.stimulsoft.as(O);pt.drawSpline(Jt.points,Jt.tension,null)}jt.stimulsoft.is(H)&&pt.closeFigure()}}catch(t){j={error:t}}finally{try{Yt&&!Yt.done&&(_=Gt.return)&&_.call(Gt)}finally{if(j)throw j.error}}pt.closeFigure(),pt.endPath(),null!=Vt.background&&pt.fillPath(Vt.background),this.checkPenGeom(Vt.pen)&&pt.strokePath(Vt.pen)}}}catch(t){G={error:t}}finally{try{ht&&!ht.done&&(Y=gt.return)&&Y.call(gt)}finally{if(G)throw G.error}}},G.getStartPoint=function(t,e){var r=new a(e.x+e.width/2,e.y+e.height/2);switch(t){case p.LeftCenter:return new a(e.x,r.y);case p.LeftBottom:return new a(e.x,e.bottom);case p.CenterTop:return new a(r.x,e.top);case p.CenterCenter:return r;case p.CenterBottom:return new a(r.x,e.bottom);case p.RightTop:return new a(e.right,e.top);case p.RightCenter:return new a(e.right,r.y);case p.RightBottom:return new a(e.right,e.bottom);default:return new a(e.x,e.y)}},G.rectToRectangle=function(t){if(null==t)return new l;if(t.stimulsoft.is(l))return t.stimulsoft.as(l);if(t.stimulsoft.is(m)){var e=t.stimulsoft.as(m);return new l(e.x,e.y,e.width,e.height)}return new l},G.brushToStiBrush=function(t){if(null==t)return null;if(t.stimulsoft.is(r))return new C(t.stimulsoft.as(r));if(t.stimulsoft.is(z))return t.stimulsoft.as(z);return null},G.checkPenGeom=function(t){return!(null==t||null==t.brush||t.penStyle==U.None)},G}();e.StiPdfRenderChart=G}(r=e.Export||(e.Export={}))}(e=t.Report||(t.Report={}))}(Stimulsoft||(Stimulsoft={})),function(t){var e;!function(e){var r;!function(e){var r=t.Base.Drawing.StiSolidBrush,i=t.Base.Drawing.StiGradientBrush,n=t.Base.Drawing.StiColorUtils,o=t.Report.Components.StiDataBarDirection,a=t.Report.Components.StiDataBarIndicator,s=t.System.Drawing.ContentAlignment,l=t.Report.Components.StiIcon,m=t.Report.Components.StiIconSetIndicator,c=t.Report.Components.StiText,p=function(){function p(){}return p.renderIndicators=function(p){var g=p.Component.as(c);if(null==g||null==g.indicator)return p;var h=new Rectangle(p.X,p.Y,p.Width,p.Height),w=g.indicator.stimulsoft.as(m);if(null!=w&&(w.icon!=l.None||null!=w.customIcon)){var u=p.service.imageList[p.service.imagesCurrent],d=u.Width*p.service.hiToTwips,S=u.Height*p.service.hiToTwips,f=h.clone(),v=p.service.hiToTwips;switch(f.inflate(-v,-v),w.alignment){case s.TopLeft:f=new Rectangle(f.x,f.bottom-S,d,S),h.x+=f.width+1,h.width-=f.width+1;break;case s.TopCenter:f=new Rectangle(f.x+(f.width-d)/2,f.bottom-S,d,S);break;case s.TopRight:f=new Rectangle(f.right-d,f.bottom-S,d,S),h.width-=f.width+1;break;case s.MiddleLeft:f=new Rectangle(f.x,f.y+(f.height-S)/2,d,S),h.x+=f.width+1,h.width-=f.width+1;break;case s.MiddleCenter:f=new Rectangle(f.x+(f.width-d)/2,f.y+(f.height-S)/2,d,S);break;case s.MiddleRight:f=new Rectangle(f.right-d,f.y+(f.height-S)/2,d,S),h.width-=f.width+1;break;case s.BottomLeft:f=new Rectangle(f.x,f.y,d,S),h.x+=f.width+1,h.width-=f.width+1;break;case s.BottomCenter:f=new Rectangle(f.x+(f.width-d)/2,f.y,d,S);break;case s.BottomRight:f=new Rectangle(f.right-d,f.y,d,S),h.width-=f.width+1;break}var E=new e.StiPdfData(p.service);E.X=f.x,E.Y=f.y,E.Width=f.width,E.Height=f.height,p.service.writeImageInfo2(E,1,1)}var b=g.indicator.stimulsoft.as(a);if(null!=b&&0!=b.value){var y=h.clone(),v=p.service.hiToTwips;y.inflate(-2*v,-2*v);var x=b.maximum+Math.abs(b.minimum),A=y.width*Math.abs(b.minimum)/x,T=y.width*b.maximum/x,P=y.width*Math.abs(b.value)/x,L=b.direction;L==o.Default&&(L=null!=g.textOptions&&g.textOptions.rightToLeft?o.RighToLeft:o.LeftToRight);var C=0;L==o.LeftToRight?(b.value<0?y.x+=A-P:y.x+=A,y.width=P):(C=180,b.value<0?y.x=y.right-A:y.x=y.right-A-P,y.width=P),b.value<0&&(C+=180);var F=!1;if(y.width>0&&y.height>0){if(b.brushType==t.Report.Components.StiBrushType.Gradient){var B=void 0;if(B=L==o.LeftToRight?b.value>0?new Rectangle(h.left+A,h.top,T,h.height):new Rectangle(h.left,h.top,A,h.height):b.value<0?new Rectangle(h.left+T,h.top,A,h.height):new Rectangle(h.left,h.top,T,h.height),y.width>0&&y.width<1&&(y.width=1),B.width>0&&B.width<1&&(B.width=1),B.width>0&&y.width>0){var k=b.value<0?b.negativeColor:b.positiveColor,R=n.light(k,200);B.x-=.1*B.width,B.width+=.2*B.width;var I=new i(k,R,C);p.service.fillRectBrush(I,y);var D=p.service.shadingArray[p.service.shadingCurrent-1];D.Angle=C,D.X=B.x,D.Y=B.y,D.Width=B.width,D.Height=B.height,D.FunctionIndex=p.service.getShadingFunctionNumber(k,R,!1),p.service.shadingArray[p.service.shadingCurrent-1]=D,F=!0}}else{var I=new r(b.value<0?b.negativeColor:b.positiveColor);p.service.fillRectBrush(I,y)}b.showBorder&&(p.service.pageStream.writeLine("q"),p.service.pushColorToStack(),p.service.setStrokeColor(b.value<0?b.negativeBorderColor:b.positiveBorderColor),p.service.pageStream.writeLine1("{0} {1} {2} {3} re S",p.service.convertToString(y.x),p.service.convertToString(y.y),p.service.convertToString(y.width),p.service.convertToString(y.height)),p.service.pageStream.writeLine("Q"),p.service.popColorFromStack())}F||b.brushType!=t.Report.Components.StiBrushType.Gradient||p.service.shadingCurrent++}var N=new e.StiPdfData(p.service);return N.X=h.x,N.Y=p.Y,N.Width=h.width,N.Height=p.Height,N.Component=p.Component,N},p}();e.StiPdfRenderIndicators=p}(r=e.Export||(e.Export={}))}(e=t.Report||(t.Report={}))}(Stimulsoft||(Stimulsoft={})),function(t){var e;!function(e){var r;!function(e){var r=t.System.Drawing.Color,i=t.Base.Drawing.StiBrush,n=t.Base.Drawing.StiGradientBrush,o=t.Base.Drawing.StiGlareBrush,a=t.Base.Drawing.StiHatchBrush,s=t.Report.Components.IStiBrush,l=t.Base.Drawing.StiBorderSides,m=t.Report.Components.IStiBorder,c=t.Base.Drawing.StiBorderSide,p=t.Base.Drawing.StiAdvancedBorder,g=t.Base.Drawing.StiPenStyle,h=t.Report.Components.StiShape,w=t.Report.Components.StiVerticalLineShapeType,u=t.Report.Components.StiHorizontalLineShapeType,d=t.Report.Components.StiTopAndBottomLineShapeType,S=t.Report.Components.StiLeftAndRightLineShapeType,f=t.Report.Components.StiRectangleShapeType,v=t.Report.Components.StiRoundedRectangleShapeType,E=t.Report.Components.StiDiagonalDownLineShapeType,b=t.Report.Components.StiDiagonalUpLineShapeType,y=t.Report.Components.StiTriangleShapeType,x=t.Report.Components.StiOvalShapeType,A=t.Report.Components.StiArrowShapeType,T=t.Report.Components.StiOctagonShapeType,P=t.Report.Components.StiComplexArrowShapeType,L=t.Report.Components.StiBentArrowShapeType,C=t.Report.Components.StiChevronShapeType,F=t.Report.Components.StiDivisionShapeType,B=t.Report.Components.StiEqualShapeType,k=t.Report.Components.StiFlowchartCardShapeType,R=t.Report.Components.StiFlowchartCollateShapeType,I=t.Report.Components.StiFlowchartDecisionShapeType,D=t.Report.Components.StiFlowchartManualInputShapeType,N=t.Report.Components.StiFlowchartOffPageConnectorShapeType,O=t.Report.Components.StiFlowchartPreparationShapeType,H=t.Report.Components.StiFlowchartSortShapeType,M=t.Report.Components.StiFrameShapeType,W=t.Report.Components.StiMinusShapeType,U=t.Report.Components.StiMultiplyShapeType,X=t.Report.Components.StiParallelogramShapeType,z=t.Report.Components.StiPlusShapeType,V=t.Report.Components.StiRegularPentagonShapeType,G=t.Report.Components.StiTrapezoidShapeType,Y=t.Report.Components.StiSnipSameSideCornerRectangleShapeType,j=t.Report.Components.StiSnipDiagonalSideCornerRectangleShapeType,_=t.Report.Components.StiShapeDirection,q=t.System.Drawing.Rectangle,K=t.Report.Components.StiCheckBox,Q=t.Report.Components.StiCheckStyle,J=t.Report.Components.StiRoundedRectanglePrimitive,Z=t.System.StiString,$=function(){function t(){}return t.renderBorder1=function(t){var e=null,r=t.Component.stimulsoft.as(s);null!=r&&null!=r.brush&&(e=r.brush),null!=e&&t.service.fillRectBrush(e,new q(t.X,t.Y,t.Width,t.Height))},t.renderBorder2=function(t){var e=t.Component.stimulsoft.as(m);if(null!=e){var n=r.transparent;if(e.border.dropShadow&&null!=e.border.shadowBrush&&0!=(n=i.toColor(e.border.shadowBrush)).a){var o=.8*e.border.shadowSize;t.service.setNonStrokeColor(n),t.service.pageStream.writeLine1("{0} {1} {2} {3} re f",t.service.convertToString(t.X+o),t.service.convertToString(t.Y-o),t.service.convertToString(t.Width-o),t.service.convertToString(o)),t.service.pageStream.writeLine1("{0} {1} {2} {3} re f",t.service.convertToString(t.X+t.Width),t.service.convertToString(t.Y-o),t.service.convertToString(o),t.service.convertToString(t.Height))}var a=new c(e.border.color,e.border.size,e.border.style),s=e.border.stimulsoft.as(p),h=null!=s,w=e.border.isLeftBorderSidePresent,u=e.border.isRightBorderSidePresent,d=e.border.isTopBorderSidePresent,S=e.border.isBottomBorderSidePresent,f=e.border.style!=g.None&&e.border.style!=g.Solid,v=e.border.side!=l.None&&e.border.style!=g.None;if(h&&(v=s.side!=l.None),v){var E=0;h||(f&&(t.service.pageStream.writeLine("q"),t.service.pushColorToStack()),E=this.storeBorderSideData(a,t)),h||e.border.side!=l.All?(w&&(h&&((a=s.leftSide).style!=g.Solid&&(t.service.pageStream.writeLine("q"),t.service.pushColorToStack()),E=this.storeBorderSideData(a,t)),t.service.pageStream.writeLine1("{0} {1} m",t.service.convertToString(t.X-E),t.service.convertToString(t.Y-E)),t.service.pageStream.writeLine1("{0} {1} l S",t.service.convertToString(t.X-E),t.service.convertToString(t.Y+t.Height+E)),a.style==g.Double&&(t.service.pageStream.writeLine1("{0} {1} m",t.service.convertToString(t.X+E),t.service.convertToString(t.Y+(S?E:-E))),t.service.pageStream.writeLine1("{0} {1} l S",t.service.convertToString(t.X+E),t.service.convertToString(t.Y+t.Height+(d?-E:E)))),h&&a.style!=g.Solid&&(t.service.pageStream.writeLine("Q"),t.service.popColorFromStack())),u&&(h&&((a=s.rightSide).style!=g.Solid&&(t.service.pageStream.writeLine("q"),t.service.pushColorToStack()),E=this.storeBorderSideData(a,t)),t.service.pageStream.writeLine1("{0} {1} m",t.service.convertToString(t.X+t.Width+E),t.service.convertToString(t.Y-E)),t.service.pageStream.writeLine1("{0} {1} l S",t.service.convertToString(t.X+t.Width+E),t.service.convertToString(t.Y+t.Height+E)),a.style==g.Double&&(t.service.pageStream.writeLine1("{0} {1} m",t.service.convertToString(t.X+t.Width-E),t.service.convertToString(t.Y+(S?E:-E))),t.service.pageStream.writeLine1("{0} {1} l S",t.service.convertToString(t.X+t.Width-E),t.service.convertToString(t.Y+t.Height+(d?-E:E)))),h&&a.style!=g.Solid&&(t.service.pageStream.writeLine("Q"),t.service.popColorFromStack())),d&&(h&&((a=s.topSide).style!=g.Solid&&(t.service.pageStream.writeLine("q"),t.service.pushColorToStack()),E=this.storeBorderSideData(a,t)),t.service.pageStream.writeLine1("{0} {1} m",t.service.convertToString(t.X-E),t.service.convertToString(t.Y+t.Height+E)),t.service.pageStream.writeLine1("{0} {1} l S",t.service.convertToString(t.X+t.Width+E),t.service.convertToString(t.Y+t.Height+E)),a.style==g.Double&&(t.service.pageStream.writeLine1("{0} {1} m",t.service.convertToString(t.X+(w?E:-E)),t.service.convertToString(t.Y+t.Height-E)),t.service.pageStream.writeLine1("{0} {1} l S",t.service.convertToString(t.X+t.Width+(u?-E:E)),t.service.convertToString(t.Y+t.Height-E))),h&&a.style!=g.Solid&&(t.service.pageStream.writeLine("Q"),t.service.popColorFromStack())),S&&(h&&((a=s.bottomSide).style!=g.Solid&&(t.service.pageStream.writeLine("q"),t.service.pushColorToStack()),E=this.storeBorderSideData(a,t)),t.service.pageStream.writeLine1("{0} {1} m",t.service.convertToString(t.X-E),t.service.convertToString(t.Y-E)),t.service.pageStream.writeLine1("{0} {1} l S",t.service.convertToString(t.X+t.Width+E),t.service.convertToString(t.Y-E)),a.style==g.Double&&(t.service.pageStream.writeLine1("{0} {1} m",t.service.convertToString(t.X+(w?E:-E)),t.service.convertToString(t.Y+E)),t.service.pageStream.writeLine1("{0} {1} l S",t.service.convertToString(t.X+t.Width+(u?-E:E)),t.service.convertToString(t.Y+E))),h&&a.style!=g.Solid&&(t.service.pageStream.writeLine("Q"),t.service.popColorFromStack()))):(t.service.pageStream.writeLine1("{0} {1} {2} {3} re S",t.service.convertToString(t.X-E),t.service.convertToString(t.Y-E),t.service.convertToString(t.Width+2*E),t.service.convertToString(t.Height+2*E)),e.border.style==g.Double&&t.service.pageStream.writeLine1("{0} {1} {2} {3} re S",t.service.convertToString(t.X+E),t.service.convertToString(t.Y+E),t.service.convertToString(t.Width-2*E),t.service.convertToString(t.Height-2*E))),!h&&f&&(t.service.pageStream.writeLine("Q"),t.service.popColorFromStack())}}},t.storeBorderSideData=function(t,e){var r=t.size;r<1&&(r=1),t.style==g.Double&&(r=1);var i=r*e.service.hiToTwips*.955;e.service.pageStream.writeLine1("{0} w",e.service.convertToString(i));var n=this.getPenStyleDashString(t.style,.04*i,e);return null!=n&&e.service.pageStream.writeLine(n),e.service.setStrokeColor(t.color),t.style==g.Double?i:0},t.getPenStyleDashString=function(t,e,r){switch(t){case g.Dot:return Z.format("[{0} {1}] 0 d",r.service.convertToString(e),r.service.convertToString(58*e));case g.Dash:return Z.format("[{0} {1}] 0 d",r.service.convertToString(49.5*e),r.service.convertToString(62*e));case g.DashDot:return Z.format("[{0} {1} {2} {1}] 0 d",r.service.convertToString(50*e),r.service.convertToString(55*e),r.service.convertToString(e));case g.DashDotDot:return Z.format("[{0} {1} {2} {1} {2} {1}] 0 d",r.service.convertToString(50*e),r.service.convertToString(55*e),r.service.convertToString(e))}return null},t.checkShape=function(t){if(t.shapeType.stimulsoft.is(w)||t.shapeType.stimulsoft.is(u)||t.shapeType.stimulsoft.is(d)||t.shapeType.stimulsoft.is(S)||t.shapeType.stimulsoft.is(f)||t.shapeType.stimulsoft.is(v)||t.shapeType.stimulsoft.is(E)||t.shapeType.stimulsoft.is(b)||t.shapeType.stimulsoft.is(y)||t.shapeType.stimulsoft.is(x)||t.shapeType.stimulsoft.is(A)||t.shapeType.stimulsoft.is(T)||t.shapeType.stimulsoft.is(P)||t.shapeType.stimulsoft.is(L)||t.shapeType.stimulsoft.is(C)||t.shapeType.stimulsoft.is(F)||t.shapeType.stimulsoft.is(B)||t.shapeType.stimulsoft.is(k)||t.shapeType.stimulsoft.is(R)||t.shapeType.stimulsoft.is(I)||t.shapeType.stimulsoft.is(D)||t.shapeType.stimulsoft.is(N)||t.shapeType.stimulsoft.is(O)||t.shapeType.stimulsoft.is(H)||t.shapeType.stimulsoft.is(M)||t.shapeType.stimulsoft.is(W)||t.shapeType.stimulsoft.is(U)||t.shapeType.stimulsoft.is(X)||t.shapeType.stimulsoft.is(z)||t.shapeType.stimulsoft.is(V)||t.shapeType.stimulsoft.is(G)||t.shapeType.stimulsoft.is(Y)||t.shapeType.stimulsoft.is(j))return!0;return!1},t.renderShape=function(t,l){var m=t.Component.stimulsoft.as(h);if(null!=m)if(1==this.checkShape(m)){var c=t.Component.stimulsoft.as(s),p=new e.StiPdfGeomWriter(t.service.pageStream,t.service,!1),K=r.transparent;if(null!=c&&(K=i.toColor(c.brush)),0!=K.a&&t.service.setNonStrokeColor(K),null!=c&&((c.brush.stimulsoft.is(n)||c.brush.stimulsoft.is(o))&&(t.service.storeShadingData2(t.X,t.Y,t.Width,t.Height,c.brush),t.service.pageStream.writeLine1("/Pattern cs /P{0} scn",1+t.service.shadingCurrent)),c.brush.stimulsoft.is(a))){var Q=c.brush.stimulsoft.as(a);t.service.pageStream.writeLine1("/Cs1 cs /PH{0} scn",t.service.getHatchNumber(Q)+1)}var J=m.borderColor;t.service.setStrokeColor(J);var Z=K.a>0,$=m.style!=g.None;if(!Z&&!$)return;var tt=Z?$?"B":"f":$?"S":"n";t.service.pageStream.writeLine1("{0} w",t.service.convertToString(m.size*t.service.hiToTwips)),t.service.pageStream.writeLine("q");var et=m.size*t.service.hiToTwips*.04,rt;switch(m.style){case g.Dot:t.service.pageStream.writeLine1("[{0} {1}] 0 d",t.service.convertToString(et),t.service.convertToString(55*et));break;case g.Dash:t.service.pageStream.writeLine1("[{0} {1}] 0 d",t.service.convertToString(50*et),t.service.convertToString(55*et));break;case g.DashDot:t.service.pageStream.writeLine1("[{0} {1} {2} {1}] 0 d",t.service.convertToString(50*et),t.service.convertToString(55*et),t.service.convertToString(et));break;case g.DashDotDot:t.service.pageStream.writeLine1("[{0} {1} {2} {1} {2} {1}] 0 d",t.service.convertToString(50*et),t.service.convertToString(55*et),t.service.convertToString(et));break}if(m.shapeType.stimulsoft.is(w)&&(Z&&t.service.pageStream.writeLine1("{0} {1} {2} {3} re f",t.service.convertToString(t.X),t.service.convertToString(t.Y),t.service.convertToString(t.Width),t.service.convertToString(t.Height)),$&&(t.service.pageStream.writeLine1("{0} {1} m",t.service.convertToString(t.X+t.Width/2),t.service.convertToString(t.Y)),t.service.pageStream.writeLine1("{0} {1} l S",t.service.convertToString(t.X+t.Width/2),t.service.convertToString(t.Y+t.Height)))),m.shapeType.stimulsoft.is(u)&&(Z&&t.service.pageStream.writeLine1("{0} {1} {2} {3} re f",t.service.convertToString(t.X),t.service.convertToString(t.Y),t.service.convertToString(t.Width),t.service.convertToString(t.Height)),$&&(t.service.pageStream.writeLine1("{0} {1} m",t.service.convertToString(t.X),t.service.convertToString(t.Y+t.Height/2)),t.service.pageStream.writeLine1("{0} {1} l S",t.service.convertToString(t.X+t.Width),t.service.convertToString(t.Y+t.Height/2)))),m.shapeType.stimulsoft.is(d)&&(Z&&t.service.pageStream.writeLine1("{0} {1} {2} {3} re f",t.service.convertToString(t.X),t.service.convertToString(t.Y),t.service.convertToString(t.Width),t.service.convertToString(t.Height)),$&&(t.service.pageStream.writeLine1("{0} {1} m",t.service.convertToString(t.X),t.service.convertToString(t.Y+t.Height)),t.service.pageStream.writeLine1("{0} {1} l S",t.service.convertToString(t.X+t.Width),t.service.convertToString(t.Y+t.Height)),t.service.pageStream.writeLine1("{0} {1} m",t.service.convertToString(t.X),t.service.convertToString(t.Y)),t.service.pageStream.writeLine1("{0} {1} l S",t.service.convertToString(t.X+t.Width),t.service.convertToString(t.Y)))),m.shapeType.stimulsoft.is(S)&&(Z&&t.service.pageStream.writeLine1("{0} {1} {2} {3} re f",t.service.convertToString(t.X),t.service.convertToString(t.Y),t.service.convertToString(t.Width),t.service.convertToString(t.Height)),$&&(t.service.pageStream.writeLine1("{0} {1} m",t.service.convertToString(t.X),t.service.convertToString(t.Y)),t.service.pageStream.writeLine1("{0} {1} l S",t.service.convertToString(t.X),t.service.convertToString(t.Y+t.Height)),t.service.pageStream.writeLine1("{0} {1} m",t.service.convertToString(t.X+t.Width),t.service.convertToString(t.Y)),t.service.pageStream.writeLine1("{0} {1} l S",t.service.convertToString(t.X+t.Width),t.service.convertToString(t.Y+t.Height)))),m.shapeType.stimulsoft.is(f)&&(t.service.pageStream.writeLine1("{0} {1} m",t.service.convertToString(t.X),t.service.convertToString(t.Y)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.X),t.service.convertToString(t.Y+t.Height)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.X+t.Width),t.service.convertToString(t.Y+t.Height)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.X+t.Width),t.service.convertToString(t.Y)),t.service.pageStream.writeLine1("{0} {1} l "+tt,t.service.convertToString(t.X),t.service.convertToString(t.Y))),m.shapeType.stimulsoft.is(E)&&(Z&&t.service.pageStream.writeLine1("{0} {1} {2} {3} re f",t.service.convertToString(t.X),t.service.convertToString(t.Y),t.service.convertToString(t.Width),t.service.convertToString(t.Height)),$&&(t.service.pageStream.writeLine1("{0} {1} m",t.service.convertToString(t.X),t.service.convertToString(t.Y+t.Height)),t.service.pageStream.writeLine1("{0} {1} l S",t.service.convertToString(t.X+t.Width),t.service.convertToString(t.Y)))),m.shapeType.stimulsoft.is(b)&&(Z&&t.service.pageStream.writeLine1("{0} {1} {2} {3} re f",t.service.convertToString(t.X),t.service.convertToString(t.Y),t.service.convertToString(t.Width),t.service.convertToString(t.Height)),$&&(t.service.pageStream.writeLine1("{0} {1} m",t.service.convertToString(t.X),t.service.convertToString(t.Y)),t.service.pageStream.writeLine1("{0} {1} l S",t.service.convertToString(t.X+t.Width),t.service.convertToString(t.Y+t.Height)))),m.shapeType.stimulsoft.is(y))(rt=m.shapeType.stimulsoft.as(y).direction)==_.Up&&(t.service.pageStream.writeLine1("{0} {1} m",t.service.convertToString(t.X),t.service.convertToString(t.Y)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.X+t.Width/2),t.service.convertToString(t.Y+t.Height)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.X+t.Width),t.service.convertToString(t.Y)),t.service.pageStream.writeLine1("{0} {1} l "+tt,t.service.convertToString(t.X),t.service.convertToString(t.Y))),rt==_.Down&&(tt=Z?$?"B*":"f*":$?"S":"n",t.service.pageStream.writeLine1("{0} {1} m",t.service.convertToString(t.X),t.service.convertToString(t.Y+t.Height)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.X+t.Width/2),t.service.convertToString(t.Y)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.X+t.Width),t.service.convertToString(t.Y+t.Height)),t.service.pageStream.writeLine1("{0} {1} l "+tt,t.service.convertToString(t.X),t.service.convertToString(t.Y+t.Height))),rt==_.Left&&(t.service.pageStream.writeLine1("{0} {1} m",t.service.convertToString(t.X+t.Width),t.service.convertToString(t.Y)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.X),t.service.convertToString(t.Y+t.Height/2)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.X+t.Width),t.service.convertToString(t.Y+t.Height)),t.service.pageStream.writeLine1("{0} {1} l "+tt,t.service.convertToString(t.X+t.Width),t.service.convertToString(t.Y))),rt==_.Right&&(tt=Z?$?"B*":"f*":$?"S":"n",t.service.pageStream.writeLine1("{0} {1} m",t.service.convertToString(t.X),t.service.convertToString(t.Y)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.X+t.Width),t.service.convertToString(t.Y+t.Height/2)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.X),t.service.convertToString(t.Y+t.Height)),t.service.pageStream.writeLine1("{0} {1} l "+tt,t.service.convertToString(t.X),t.service.convertToString(t.Y)));if(m.shapeType.stimulsoft.is(x)&&t.service.pageStream.writeLine1(p.getEllipseString(new q(t.X,t.Y,t.Width,t.Height))+tt),m.shapeType.stimulsoft.is(v)){var it=m.shapeType.stimulsoft.as(v).round,nt=t.Width;nt>t.Height&&(nt=t.Height);var ot=Math.min(nt,70)*it,at=ot*(1-t.service.pdfCKT);t.service.pageStream.writeLine1("{0} {1} m",t.service.convertToString(t.X),t.service.convertToString(t.Y+ot)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.X),t.service.convertToString(t.Y+t.Height-ot)),t.service.pageStream.writeLine1("{0} {1} {2} {3} {4} {5} c",t.service.convertToString(t.X),t.service.convertToString(t.Y+t.Height-at),t.service.convertToString(t.X+at),t.service.convertToString(t.Y+t.Height),t.service.convertToString(t.X+ot),t.service.convertToString(t.Y+t.Height)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.X+t.Width-ot),t.service.convertToString(t.Y+t.Height)),t.service.pageStream.writeLine1("{0} {1} {2} {3} {4} {5} c",t.service.convertToString(t.X+t.Width-at),t.service.convertToString(t.Y+t.Height),t.service.convertToString(t.X+t.Width),t.service.convertToString(t.Y+t.Height-at),t.service.convertToString(t.X+t.Width),t.service.convertToString(t.Y+t.Height-ot)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.X+t.Width),t.service.convertToString(t.Y+ot)),t.service.pageStream.writeLine1("{0} {1} {2} {3} {4} {5} c",t.service.convertToString(t.X+t.Width),t.service.convertToString(t.Y+at),t.service.convertToString(t.X+t.Width-at),t.service.convertToString(t.Y),t.service.convertToString(t.X+t.Width-ot),t.service.convertToString(t.Y)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.X+ot),t.service.convertToString(t.Y)),t.service.pageStream.writeLine1("{0} {1} {2} {3} {4} {5} c "+tt,t.service.convertToString(t.X+at),t.service.convertToString(t.Y),t.service.convertToString(t.X),t.service.convertToString(t.Y+at),t.service.convertToString(t.X),t.service.convertToString(t.Y+ot))}if(m.shapeType.stimulsoft.is(A)){var rt=m.shapeType.stimulsoft.as(A).direction,st=m.shapeType.stimulsoft.as(A).arrowWidth,lt=m.shapeType.stimulsoft.as(A).arrowHeight,mt=t.Width*st,ct=t.Height*lt;rt!=_.Left&&rt!=_.Right||(mt=t.Height*st,ct=t.Width*lt),0==lt&&(ct=Math.min(t.Width/2,t.Height/2)),rt==_.Up&&(t.service.pageStream.writeLine1("{0} {1} m",t.service.convertToString(t.X+mt),t.service.convertToString(t.Y)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.X+mt),t.service.convertToString(t.Y+t.Height-ct)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.X),t.service.convertToString(t.Y+t.Height-ct)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.X+t.Width/2),t.service.convertToString(t.Y+t.Height)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.X+t.Width),t.service.convertToString(t.Y+t.Height-ct)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.X+t.Width-mt),t.service.convertToString(t.Y+t.Height-ct)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.X+t.Width-mt),t.service.convertToString(t.Y)),t.service.pageStream.writeLine1("{0} {1} l "+tt,t.service.convertToString(t.X+mt),t.service.convertToString(t.Y))),rt==_.Down&&(t.service.pageStream.writeLine1("{0} {1} m",t.service.convertToString(t.X+t.Width-mt),t.service.convertToString(t.Y+t.Height)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.X+t.Width-mt),t.service.convertToString(t.Y+ct)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.X+t.Width),t.service.convertToString(t.Y+ct)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.X+t.Width/2),t.service.convertToString(t.Y)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.X),t.service.convertToString(t.Y+ct)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.X+mt),t.service.convertToString(t.Y+ct)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.X+mt),t.service.convertToString(t.Y+t.Height)),t.service.pageStream.writeLine1("{0} {1} l "+tt,t.service.convertToString(t.X+t.Width-mt),t.service.convertToString(t.Y+t.Height))),rt==_.Left&&(t.service.pageStream.writeLine1("{0} {1} m",t.service.convertToString(t.X+t.Width),t.service.convertToString(t.Y+mt)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.X+ct),t.service.convertToString(t.Y+mt)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.X+ct),t.service.convertToString(t.Y)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.X),t.service.convertToString(t.Y+t.Height/2)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.X+ct),t.service.convertToString(t.Y+t.Height)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.X+ct),t.service.convertToString(t.Y+t.Height-mt)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.X+t.Width),t.service.convertToString(t.Y+t.Height-mt)),t.service.pageStream.writeLine1("{0} {1} l "+tt,t.service.convertToString(t.X+t.Width),t.service.convertToString(t.Y+mt))),rt==_.Right&&(t.service.pageStream.writeLine1("{0} {1} m",t.service.convertToString(t.X),t.service.convertToString(t.Y+t.Height-mt)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.X+t.Width-ct),t.service.convertToString(t.Y+t.Height-mt)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.X+t.Width-ct),t.service.convertToString(t.Y+t.Height)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.X+t.Width),t.service.convertToString(t.Y+t.Height/2)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.X+t.Width-ct),t.service.convertToString(t.Y)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.X+t.Width-ct),t.service.convertToString(t.Y+mt)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.X),t.service.convertToString(t.Y+mt)),t.service.pageStream.writeLine1("{0} {1} l "+tt,t.service.convertToString(t.X),t.service.convertToString(t.Y+t.Height-mt)))}if(m.shapeType.stimulsoft.is(T)){var pt=m.shapeType.stimulsoft.as(T),gt=(null!=m.report?m.report.unit.convertToHInches(pt.bevel):pt.bevel)*t.service.hiToTwips,ht=gt;pt.autoSize&&(gt=t.Width/(2.414*1.414),ht=t.Height/(2.414*1.414)),gt>t.Width/2&&(gt=t.Width/2),ht>t.Height/2&&(ht=t.Height/2),t.service.pageStream.writeLine1("{0} {1} m",t.service.convertToString(t.X+gt),t.service.convertToString(t.Y)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.X+t.Width-gt),t.service.convertToString(t.Y)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.X+t.Width),t.service.convertToString(t.Y+ht)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.X+t.Width),t.service.convertToString(t.Y+t.Height-ht)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.X+t.Width-gt),t.service.convertToString(t.Y+t.Height)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.X+gt),t.service.convertToString(t.Y+t.Height)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.X),t.service.convertToString(t.Y+t.Height-ht)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.X),t.service.convertToString(t.Y+ht)),t.service.pageStream.writeLine1("{0} {1} l "+tt,t.service.convertToString(t.X+gt),t.service.convertToString(t.Y))}if(m.shapeType.stimulsoft.is(P)){var wt=t.Widtht.Width?(ft=vt=t.Width/4,Et=vt/2):Et=(vt=ft=Math.floor(t.Height/4))/2,m.shapeType.stimulsoft.as(L).direction){case _.Up:t.service.pageStream.writeLine1("{0} {1} m",t.service.convertToString(t.X),t.service.convertToString(t.Y)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.X),t.service.convertToString(t.Y+ft)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.Right-(Et+ft)),t.service.convertToString(t.Y+ft)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.Right-(Et+ft)),t.service.convertToString(t.Top-vt)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.Right-2*vt),t.service.convertToString(t.Top-vt)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.Right-vt),t.service.convertToString(t.Top)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.Right),t.service.convertToString(t.Top-vt)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.Right-Et),t.service.convertToString(t.Top-vt)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.Right-Et),t.service.convertToString(t.Y)),t.service.pageStream.writeLine1("{0} {1} l h "+tt,t.service.convertToString(t.X),t.service.convertToString(t.Y));break;case _.Left:t.service.pageStream.writeLine1("{0} {1} m",t.service.convertToString(t.Right),t.service.convertToString(t.Y)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.Right),t.service.convertToString(t.Top-Et)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.X+vt),t.service.convertToString(t.Top-Et)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.X+vt),t.service.convertToString(t.Top)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.X),t.service.convertToString(t.Top-vt)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.X+vt),t.service.convertToString(t.Top-2*vt)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.X+vt),t.service.convertToString(t.Top-vt-Et)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.Right-ft),t.service.convertToString(t.Top-vt-Et)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.Right-ft),t.service.convertToString(t.Y)),t.service.pageStream.writeLine1("{0} {1} l h "+tt,t.service.convertToString(t.Right),t.service.convertToString(t.Y));break;case _.Down:t.service.pageStream.writeLine1("{0} {1} m",t.service.convertToString(t.Right),t.service.convertToString(t.Top)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.X+Et),t.service.convertToString(t.Top)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.X+Et),t.service.convertToString(t.Y+vt)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.X),t.service.convertToString(t.Y+vt)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.X+vt),t.service.convertToString(t.Y)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.X+2*vt),t.service.convertToString(t.Y+vt)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.X+vt+Et),t.service.convertToString(t.Y+vt)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.X+vt+Et),t.service.convertToString(t.Top-ft)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.Right),t.service.convertToString(t.Top-ft)),t.service.pageStream.writeLine1("{0} {1} l h "+tt,t.service.convertToString(t.Right),t.service.convertToString(t.Top));break;case _.Right:t.service.pageStream.writeLine1("{0} {1} m",t.service.convertToString(t.X),t.service.convertToString(t.Top)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.X),t.service.convertToString(t.Y+Et)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.Right-vt),t.service.convertToString(t.Y+Et)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.Right-vt),t.service.convertToString(t.Y)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.Right),t.service.convertToString(t.Y+vt)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.Right-vt),t.service.convertToString(t.Y+2*vt)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.Right-vt),t.service.convertToString(t.Y+vt+Et)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.X+ft),t.service.convertToString(t.Y+vt+Et)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.X+ft),t.service.convertToString(t.Top)),t.service.pageStream.writeLine1("{0} {1} l h "+tt,t.service.convertToString(t.X),t.service.convertToString(t.Top));break}}if(m.shapeType.stimulsoft.is(C)){var bt=t.Width>t.Height?t.Height/2:t.Width/2;switch(m.shapeType.stimulsoft.as(C).direction){case _.Right:t.service.pageStream.writeLine1("{0} {1} m",t.service.convertToString(t.X),t.service.convertToString(t.Top)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.X+bt),t.service.convertToString(t.Top-t.Height/2)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.X),t.service.convertToString(t.Y)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.Right-bt),t.service.convertToString(t.Y)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.Right),t.service.convertToString(t.Top-t.Height/2)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.Right-bt),t.service.convertToString(t.Top)),t.service.pageStream.writeLine1("{0} {1} l h "+tt,t.service.convertToString(t.X),t.service.convertToString(t.Top));break;case _.Left:t.service.pageStream.writeLine1("{0} {1} m",t.service.convertToString(t.Right),t.service.convertToString(t.Top)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.X+bt),t.service.convertToString(t.Top)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.X),t.service.convertToString(t.Top-t.Height/2)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.X+bt),t.service.convertToString(t.Y)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.Right),t.service.convertToString(t.Y)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.Right-bt),t.service.convertToString(t.Top-t.Height/2)),t.service.pageStream.writeLine1("{0} {1} l h "+tt,t.service.convertToString(t.Right),t.service.convertToString(t.Top));break;case _.Up:t.service.pageStream.writeLine1("{0} {1} m",t.service.convertToString(t.X),t.service.convertToString(t.Top-bt)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.X+t.Width/2),t.service.convertToString(t.Top)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.Right),t.service.convertToString(t.Top-bt)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.Right),t.service.convertToString(t.Y)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.X+t.Width/2),t.service.convertToString(t.Y+bt)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.X),t.service.convertToString(t.Y)),t.service.pageStream.writeLine1("{0} {1} l h "+tt,t.service.convertToString(t.X),t.service.convertToString(t.Top-bt));break;case _.Down:t.service.pageStream.writeLine1("{0} {1} m",t.service.convertToString(t.X),t.service.convertToString(t.Top)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.X+t.Width/2),t.service.convertToString(t.Top-bt)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.Right),t.service.convertToString(t.Top)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.Right),t.service.convertToString(t.Y+bt)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.X+t.Width/2),t.service.convertToString(t.Y)),t.service.pageStream.writeLine1("{0} {1} l",t.service.convertToString(t.X),t.service.convertToString(t.Y+bt)),t.service.pageStream.writeLine1("{0} {1} l h "+tt,t.service.convertToString(t.X),t.service.convertToString(t.Top));break}}if(m.shapeType.stimulsoft.is(F)){var wt=t.Height/3,yt=4*t.service.hiToTwips;t.service.pageStream.writeLine1(p.getRectString4(t.X,t.Y+wt+yt,t.Width,wt-2*yt)+tt),t.service.pageStream.writeLine1(p.getEllipseString4(t.X+t.Width/2-wt/2,t.Top-t.service.hiToTwips-wt,wt,wt)+tt),t.service.pageStream.writeLine1(p.getEllipseString4(t.X+t.Width/2-wt/2,t.Y+2*t.service.hiToTwips,wt,wt)+tt)}if(m.shapeType.stimulsoft.is(B)){var xt=(t.Height-t.Height/6)/2;t.service.pageStream.writeLine1(p.getRectString4(t.X,t.Top-xt,t.Width,xt)+tt),t.service.pageStream.writeLine1(p.getRectString4(t.X,t.Y,t.Width,xt)+tt)}if(m.shapeType.stimulsoft.is(k)&&(t.service.pageStream.writeLine1("{0} {1} m {2} {3} l",t.service.convertToString(t.Right),t.service.convertToString(t.Top),t.service.convertToString(t.Right),t.service.convertToString(t.Y)),t.service.pageStream.writeLine1("{0} {1} l {2} {3} l {4} {5} l {6} {7} l h "+tt,t.service.convertToString(t.X),t.service.convertToString(t.Y),t.service.convertToString(t.X),t.service.convertToString(t.Top-t.Height/5),t.service.convertToString(t.X+t.Width/5),t.service.convertToString(t.Top),t.service.convertToString(t.Right),t.service.convertToString(t.Top))),m.shapeType.stimulsoft.is(R))switch(m.shapeType.stimulsoft.as(R).direction){case _.Down:case _.Up:t.service.pageStream.writeLine1("{0} {1} m {2} {3} l {4} {5} l h "+tt,t.service.convertToString(t.X),t.service.convertToString(t.Top),t.service.convertToString(t.Right),t.service.convertToString(t.Top),t.service.convertToString(t.X+t.Width/2),t.service.convertToString(t.Y+t.Height/2)),t.service.pageStream.writeLine1("{0} {1} m {2} {3} l {4} {5} l h "+tt,t.service.convertToString(t.X),t.service.convertToString(t.Y),t.service.convertToString(t.X+t.Width/2),t.service.convertToString(t.Y+t.Height/2),t.service.convertToString(t.Right),t.service.convertToString(t.Y));break;case _.Left:case _.Right:t.service.pageStream.writeLine1("{0} {1} m {2} {3} l {4} {5} l h "+tt,t.service.convertToString(t.X),t.service.convertToString(t.Y),t.service.convertToString(t.X),t.service.convertToString(t.Top),t.service.convertToString(t.X+t.Width/2),t.service.convertToString(t.Y+t.Height/2)),t.service.pageStream.writeLine1("{0} {1} m {2} {3} l {4} {5} l h "+tt,t.service.convertToString(t.Right),t.service.convertToString(t.Y),t.service.convertToString(t.X+t.Width/2),t.service.convertToString(t.Y+t.Height/2),t.service.convertToString(t.Right),t.service.convertToString(t.Top));break}if(m.shapeType.stimulsoft.is(I)&&(t.service.pageStream.writeLine1("{0} {1} m",t.service.convertToString(t.X),t.service.convertToString(t.Top-t.Height/2)),t.service.pageStream.writeLine1("{0} {1} l {2} {3} l {4} {5} l {6} {7} l h "+tt,t.service.convertToString(t.X+t.Width/2),t.service.convertToString(t.Top),t.service.convertToString(t.Right),t.service.convertToString(t.Top-t.Height/2),t.service.convertToString(t.X+t.Width/2),t.service.convertToString(t.Y),t.service.convertToString(t.X),t.service.convertToString(t.Top-t.Height/2))),m.shapeType.stimulsoft.is(D)&&(t.service.pageStream.writeLine1("{0} {1} m",t.service.convertToString(t.X),t.service.convertToString(t.Top-t.Height/5)),t.service.pageStream.writeLine1("{0} {1} l {2} {3} l {4} {5} l {6} {7} l h "+tt,t.service.convertToString(t.Right),t.service.convertToString(t.Top),t.service.convertToString(t.Right),t.service.convertToString(t.Y),t.service.convertToString(t.X),t.service.convertToString(t.Y),t.service.convertToString(t.X),t.service.convertToString(t.Top-t.Height/5))),m.shapeType.stimulsoft.is(N)){var wt=t.Height/5,St=t.Width/5;switch(m.shapeType.stimulsoft.as(N).direction){case _.Down:t.service.pageStream.writeLine1("{0} {1} m {2} {3} l",t.service.convertToString(t.X),t.service.convertToString(t.Top),t.service.convertToString(t.Right),t.service.convertToString(t.Top)),t.service.pageStream.writeLine1("{0} {1} l {2} {3} l {4} {5} l {6} {7} l h "+tt,t.service.convertToString(t.Right),t.service.convertToString(t.Y+wt),t.service.convertToString(t.X+t.Width/2),t.service.convertToString(t.Y),t.service.convertToString(t.X),t.service.convertToString(t.Y+wt),t.service.convertToString(t.X),t.service.convertToString(t.Top));break;case _.Up:t.service.pageStream.writeLine1("{0} {1} m {2} {3} l",t.service.convertToString(t.X),t.service.convertToString(t.Y),t.service.convertToString(t.X),t.service.convertToString(t.Top-wt)),t.service.pageStream.writeLine1("{0} {1} l {2} {3} l {4} {5} l {6} {7} l h "+tt,t.service.convertToString(t.X+t.Width/2),t.service.convertToString(t.Top),t.service.convertToString(t.Right),t.service.convertToString(t.Top-wt),t.service.convertToString(t.Right),t.service.convertToString(t.Y),t.service.convertToString(t.X),t.service.convertToString(t.Y));break;case _.Left:t.service.pageStream.writeLine1("{0} {1} m {2} {3} l",t.service.convertToString(t.X+St),t.service.convertToString(t.Top),t.service.convertToString(t.Right),t.service.convertToString(t.Top)),t.service.pageStream.writeLine1("{0} {1} l {2} {3} l {4} {5} l {6} {7} l h "+tt,t.service.convertToString(t.Right),t.service.convertToString(t.Y),t.service.convertToString(t.X+St),t.service.convertToString(t.Y),t.service.convertToString(t.X),t.service.convertToString(t.Top-t.Height/2),t.service.convertToString(t.X+St),t.service.convertToString(t.Top));break;case _.Right:t.service.pageStream.writeLine1("{0} {1} m {2} {3} l",t.service.convertToString(t.X),t.service.convertToString(t.Top),t.service.convertToString(t.Right-St),t.service.convertToString(t.Top)),t.service.pageStream.writeLine1("{0} {1} l {2} {3} l {4} {5} l {6} {7} l h "+tt,t.service.convertToString(t.Right),t.service.convertToString(t.Top-t.Height/2),t.service.convertToString(t.Right-St),t.service.convertToString(t.Y),t.service.convertToString(t.X),t.service.convertToString(t.Y),t.service.convertToString(t.X),t.service.convertToString(t.Top));break}}if(m.shapeType.stimulsoft.is(O)){var St=t.Width/5,wt=t.Height/5,At=t.Width/2,Tt=t.Height/2;switch(m.shapeType.stimulsoft.as(O).direction){case _.Left:case _.Right:t.service.pageStream.writeLine1("{0} {1} m {2} {3} l {4} {5} l",t.service.convertToString(t.X),t.service.convertToString(t.Top-Tt),t.service.convertToString(t.X+St),t.service.convertToString(t.Top),t.service.convertToString(t.Right-St),t.service.convertToString(t.Top)),t.service.pageStream.writeLine1("{0} {1} l {2} {3} l {4} {5} l {6} {7} l h "+tt,t.service.convertToString(t.Right),t.service.convertToString(t.Top-Tt),t.service.convertToString(t.Right-St),t.service.convertToString(t.Y),t.service.convertToString(t.X+St),t.service.convertToString(t.Y),t.service.convertToString(t.X),t.service.convertToString(t.Top-Tt));break;case _.Down:case _.Up:t.service.pageStream.writeLine1("{0} {1} m {2} {3} l {4} {5} l",t.service.convertToString(t.X+At),t.service.convertToString(t.Top),t.service.convertToString(t.Right),t.service.convertToString(t.Top-wt),t.service.convertToString(t.Right),t.service.convertToString(t.Y+wt)),t.service.pageStream.writeLine1("{0} {1} l {2} {3} l {4} {5} l {6} {7} l h "+tt,t.service.convertToString(t.X+At),t.service.convertToString(t.Y),t.service.convertToString(t.X),t.service.convertToString(t.Y+wt),t.service.convertToString(t.X),t.service.convertToString(t.Top-wt),t.service.convertToString(t.X+At),t.service.convertToString(t.Top));break}}if(m.shapeType.stimulsoft.is(H)&&(t.service.pageStream.writeLine1("{0} {1} m {2} {3} l",t.service.convertToString(t.X),t.service.convertToString(t.Top-t.Height/2),t.service.convertToString(t.X+t.Width/2),t.service.convertToString(t.Top)),t.service.pageStream.writeLine1("{0} {1} l {2} {3} l {4} {5} l {6} {7} l h "+tt,t.service.convertToString(t.Right),t.service.convertToString(t.Top-t.Height/2),t.service.convertToString(t.X+t.Width/2),t.service.convertToString(t.Y),t.service.convertToString(t.X),t.service.convertToString(t.Top-t.Height/2),t.service.convertToString(t.Right),t.service.convertToString(t.Top-t.Height/2))),m.shapeType.stimulsoft.is(M)){var St=t.Width/7,wt=t.Height/7;t.service.pageStream.writeLine1("{0} {1} m {2} {3} l {4} {5} l {6} {7} l h",t.service.convertToString(t.X),t.service.convertToString(t.Top),t.service.convertToString(t.Right),t.service.convertToString(t.Top),t.service.convertToString(t.Right),t.service.convertToString(t.Y),t.service.convertToString(t.X),t.service.convertToString(t.Y)),t.service.pageStream.writeLine1("{0} {1} m {2} {3} l {4} {5} l {6} {7} l h "+tt,t.service.convertToString(t.X+St),t.service.convertToString(t.Top-wt),t.service.convertToString(t.X+St),t.service.convertToString(t.Y+wt),t.service.convertToString(t.Right-St),t.service.convertToString(t.Y+wt),t.service.convertToString(t.Right-St),t.service.convertToString(t.Top-wt))}if(m.shapeType.stimulsoft.is(W)){var wt=t.Height/3;t.service.pageStream.writeLine1(p.getRectString4(t.X,t.Y+wt,t.Width,wt)+tt)}if(m.shapeType.stimulsoft.is(U)){var St=t.Width/4,wt=t.Height/4;t.service.pageStream.writeLine1("{0} {1} m",t.service.convertToString(t.X),t.service.convertToString(t.Top-wt)),t.service.pageStream.writeLine1("{0} {1} l {2} {3} l {4} {5} l {6} {7} l",t.service.convertToString(t.X+St),t.service.convertToString(t.Top),t.service.convertToString(t.X+t.Width/2),t.service.convertToString(t.Top-wt),t.service.convertToString(t.Right-St),t.service.convertToString(t.Top),t.service.convertToString(t.Right),t.service.convertToString(t.Top-wt)),t.service.pageStream.writeLine1("{0} {1} l {2} {3} l {4} {5} l {6} {7} l",t.service.convertToString(t.Right-St),t.service.convertToString(t.Top-t.Height/2),t.service.convertToString(t.Right),t.service.convertToString(t.Y+wt),t.service.convertToString(t.Right-St),t.service.convertToString(t.Y),t.service.convertToString(t.X+t.Width/2),t.service.convertToString(t.Y+wt)),t.service.pageStream.writeLine1("{0} {1} l {2} {3} l {4} {5} l h "+tt,t.service.convertToString(t.X+St),t.service.convertToString(t.Y),t.service.convertToString(t.X),t.service.convertToString(t.Y+wt),t.service.convertToString(t.X+St),t.service.convertToString(t.Top-t.Height/2))}if(m.shapeType.stimulsoft.is(X)){var St=t.Width/7,wt=t.Height/7;t.service.pageStream.writeLine1("{0} {1} m {2} {3} l {4} {5} l {6} {7} l h "+tt,t.service.convertToString(t.X),t.service.convertToString(t.Y),t.service.convertToString(t.X+t.Width/5),t.service.convertToString(t.Top),t.service.convertToString(t.Right),t.service.convertToString(t.Top),t.service.convertToString(t.Right-t.Width/5),t.service.convertToString(t.Y))}if(m.shapeType.stimulsoft.is(z)){var St=t.Width/3,wt=t.Height/3;t.service.pageStream.writeLine1("{0} {1} m",t.service.convertToString(t.X+St),t.service.convertToString(t.Top)),t.service.pageStream.writeLine1("{0} {1} l {2} {3} l {4} {5} l {6} {7} l",t.service.convertToString(t.Right-St),t.service.convertToString(t.Top),t.service.convertToString(t.Right-St),t.service.convertToString(t.Top-wt),t.service.convertToString(t.Right),t.service.convertToString(t.Top-wt),t.service.convertToString(t.Right),t.service.convertToString(t.Y+wt)),t.service.pageStream.writeLine1("{0} {1} l {2} {3} l {4} {5} l {6} {7} l",t.service.convertToString(t.Right-St),t.service.convertToString(t.Y+wt),t.service.convertToString(t.Right-St),t.service.convertToString(t.Y),t.service.convertToString(t.X+St),t.service.convertToString(t.Y),t.service.convertToString(t.X+St),t.service.convertToString(t.Y+wt)),t.service.pageStream.writeLine1("{0} {1} l {2} {3} l {4} {5} l {6} {7} l h "+tt,t.service.convertToString(t.X),t.service.convertToString(t.Y+wt),t.service.convertToString(t.X),t.service.convertToString(t.Top-wt),t.service.convertToString(t.X+St),t.service.convertToString(t.Top-wt),t.service.convertToString(t.X+St),t.service.convertToString(t.Top))}if(m.shapeType.stimulsoft.is(V)){var Pt=t.Height/2.6,Lt=t.Width/5.5;t.service.pageStream.writeLine1("{0} {1} m {2} {3} l",t.service.convertToString(t.X),t.service.convertToString(t.Top-Pt),t.service.convertToString(t.X+t.Width/2),t.service.convertToString(t.Top)),t.service.pageStream.writeLine1("{0} {1} l {2} {3} l {4} {5} l {6} {7} l h "+tt,t.service.convertToString(t.Right),t.service.convertToString(t.Top-Pt),t.service.convertToString(t.Right-Lt),t.service.convertToString(t.Y),t.service.convertToString(t.X+Lt),t.service.convertToString(t.Y),t.service.convertToString(t.X),t.service.convertToString(t.Top-Pt))}if(m.shapeType.stimulsoft.is(G)){var bt=t.Width/4.75;t.service.pageStream.writeLine1("{0} {1} m {2} {3} l {4} {5} l {6} {7} l h "+tt,t.service.convertToString(t.X),t.service.convertToString(t.Y),t.service.convertToString(t.X+bt),t.service.convertToString(t.Top),t.service.convertToString(t.Right-bt),t.service.convertToString(t.Top),t.service.convertToString(t.Right),t.service.convertToString(t.Y))}if(m.shapeType.stimulsoft.is(Y)){var St=t.Width/7.2,wt=t.Height/4.6;t.service.pageStream.writeLine1("{0} {1} m {2} {3} l {4} {5} l",t.service.convertToString(t.X),t.service.convertToString(t.Top-wt),t.service.convertToString(t.X+St),t.service.convertToString(t.Top),t.service.convertToString(t.Right-St),t.service.convertToString(t.Top)),t.service.pageStream.writeLine1("{0} {1} l {2} {3} l {4} {5} l h "+tt,t.service.convertToString(t.Right),t.service.convertToString(t.Top-wt),t.service.convertToString(t.Right),t.service.convertToString(t.Y),t.service.convertToString(t.X),t.service.convertToString(t.Y))}if(m.shapeType.stimulsoft.is(j)){var St=t.Width/7.2,wt=t.Height/4.6;t.service.pageStream.writeLine1("{0} {1} m {2} {3} l {4} {5} l",t.service.convertToString(t.X),t.service.convertToString(t.Top),t.service.convertToString(t.Right-St),t.service.convertToString(t.Top),t.service.convertToString(t.Right),t.service.convertToString(t.Top-wt)),t.service.pageStream.writeLine1("{0} {1} l {2} {3} l {4} {5} l h "+tt,t.service.convertToString(t.Right),t.service.convertToString(t.Y),t.service.convertToString(t.X+St),t.service.convertToString(t.Y),t.service.convertToString(t.X),t.service.convertToString(t.Y+wt))}t.service.pageStream.writeLine("Q")}else var Ct=l},t.renderRoundedRectanglePrimitive=function(t){var e=t.Component.stimulsoft.as(m);if(null!=e){var r=new c(e.border.color,e.border.size,e.border.style),i=t.Component.stimulsoft.as(J);if(i.style==g.None)return;var n=e.border.style!=g.None&&e.border.style!=g.Solid;n&&(t.service.pageStream.writeLine("q"),t.service.pushColorToStack());var o=this.storeBorderSideData(r,t),a=Math.min(t.Width0)e=r==i[0].trim().toLowerCase()}return e},t}();e.StiPdfRenderPrimitives=$}(r=e.Export||(e.Export={}))}(e=t.Report||(t.Report={}))}(Stimulsoft||(Stimulsoft={})),function(t){var e;!function(e){var r;!function(e){var r=t.Base.Drawing.StiPenStyle,i=t.Base.Drawing.StiAdvancedBorder,n=t.System.StiArray,o=t.System.StiString,a=t.Report.Components.IStiTextBrush,s=t.Report.Components.IStiText,l=t.Report.Components.IStiTextHorAlignment,m=t.Report.Components.IStiVertAlignment,c=t.Report.Components.IStiTextOptions,p=t.Report.Components.IStiFont,g=t.Report.Components.StiText,h=t.Base.Drawing.StiTextHorAlignment,w=t.Base.Drawing.StiVertAlignment,u=t.System.Drawing.Color,d=t.Base.Drawing.StiBrush,S=t.Base.Drawing.StiGradientBrush,f=t.Base.Drawing.StiGlareBrush,v=t.Base.Drawing.StiHatchBrush,E=t.System.Text.StringBuilder,b=t.System.Char,y=t.System.Drawing.Drawing2D.Matrix,x=function(){function x(){}return x.renderText=function(x){var A=x.Component.as(a),T=x.Component.as(s),P=x.Component.as(c),L=x.Component.as(l),C=x.Component.as(m),F=x.Component.as(g),B=null!=P&&P.textOptions.wordWrap,k=null!=L&&L.horAlignment==h.Width,R=x.service.haveAnnots&&F.editable,I=null!=P&&null!=P.textOptions&&P.textOptions.rightToLeft,D=null,N=0,O=0,H=F.textQuality==t.Report.Components.StiTextQuality.Wysiwyg;if(k&&(B=!0),null!=T){var M=F.margins,W=this.hiToTwips*M.left,U=this.hiToTwips*M.right,X=this.hiToTwips*M.top,z=this.hiToTwips*M.bottom,V=x.X+W,G=x.Y+z,Y=x.Width-W-U,j=x.Height-X-z,_=0,q=0,K=0,Q=0;if(F.border.style!=r.None){var J=F.border.getSizeOffset();F.border.isLeftBorderSidePresent&&(_=J),F.border.isRightBorderSidePresent&&(q=J),F.border.isTopBorderSidePresent&&(K=J),F.border.isBottomBorderSidePresent&&(Q=J)}var Z=F.border.stimulsoft.as(i);null!=Z&&(_=Z.leftSide.getSizeOffset(),q=Z.rightSide.getSizeOffset(),K=Z.topSide.getSizeOffset(),Q=Z.bottomSide.getSizeOffset());var $=.94;V+=this.hiToTwips*$*_,G+=this.hiToTwips*$*Q,Y-=this.hiToTwips*$*(_+q),j-=this.hiToTwips*$*(K+Q),R||(x.service.pageStream.writeLine("q"),x.service.pushColorToStack(),x.service.pageStream.writeLine1("{0} {1} {2} {3} re W n",x.service.convertToString(x.X),x.service.convertToString(x.Y),x.service.convertToString(x.Width),x.service.convertToString(x.Height)));var tt=u.transparent;if(null!=A){if(tt=d.toColor(A.textBrush),x.service.setNonStrokeColor(tt),x.service.storeShadingData2(x.X,x.Y,x.Width,x.Height,A.textBrush),(A.textBrush.is(S)||A.textBrush.is(f))&&x.service.pageStream.writeLine1("/Pattern cs /P{0} scn",1+x.service.shadingCurrent),A.textBrush.is(v)){var et=A.textBrush.as(v);x.service.pageStream.writeLine1("/Cs1 cs /PH{0} scn",x.service.getHatchNumber(et)+1)}var rt;if(R)(rt=x.service.annotsArray[x.service.annotsCurrent]).FontColor=tt}var it=1,nt=x.Component.as(p);null!=nt&&(it=nt.font.sizeInPoints);var ot=1,at=it*this.fontCorrectValue*x.service.pdfFont.tmASC/1e3*ot,st=it*this.fontCorrectValue*x.service.pdfFont.tmDESC/1e3*-1*ot,lt=it*this.fontCorrectValue*x.service.pdfFont.tmExternal/1e3*ot,mt=it*this.fontCorrectValue*x.service.pdfFont.UnderscoreSize/1e3*ot,ct=it*this.fontCorrectValue*x.service.pdfFont.UnderscorePosition/1e3*ot,pt=it*this.fontCorrectValue*x.service.pdfFont.StrikeoutSize/1e3*ot,gt=it*this.fontCorrectValue*x.service.pdfFont.StrikeoutPosition/1e3*ot,ht=(at-st+lt)*F.lineSpacing,wt=at,ut=st,dt=!1;null!=P&&(dt=(O=P.textOptions.angle)>45&&O<135||O>225&&O<315),R&&(V-=x.X,G-=x.Y);var St=.85,ft=0;if(F.textQuality==t.Report.Components.StiTextQuality.Standard){var vt=.35-.04*(14-it),Et=(ft=137.61)*(it*this.fontCorrectValue)/1e3;dt?(G+=vt+Et,j-=2*(vt+Et)):(V+=vt+Et,Y-=2*(vt+Et))}if(F.textQuality==t.Report.Components.StiTextQuality.Typographic){var vt=.05+.009*(8-it);dt?(G+=vt,j-=2*vt):(V+=vt,Y-=2*vt)}var bt=T.text,rt;if(null==bt&&(bt=""),bt=x.service.stringReplace(bt,"\r",""),bt=x.service.stringReplace(bt,"",""),R&&(D=x.service.stringReplace(T.text,"\n","")),Y>0&&bt.length>0){var yt=V,xt=G,At=Y,Tt=j;if(null!=P&&0!=(O=P.textOptions.angle)){if(dt){var Pt=Y;Y=j,j=Pt}V=-Y/2,G=-j/2}var Lt=e.StiExportUtils.splitString(bt,!1);if(B)for(var Ct=0;Ct0&&Bt.append(o.repeat(String.fromCharCode(0),Nt))}for(var Ot=[],Ht=Bt.toString(),Mt=0;Mt=32&&(zt+=x.service.pdfFont.Widths[Ot[Vt]-32]),9==Ot[Vt]&&(zt+=this.getTabsSize(P,it,zt+ft)+ft),Wt[Vt]=Math.trunc(zt),this.isWordWrapSymbol(Ht,Vt)&&Vt>0&&Xt++,Ut[Vt]=Xt;if(zt*(it*this.fontCorrectValue)/1e3>Y){var Vt=Ft.length-1,Gt=Math.trunc(1e3*Y/(it*this.fontCorrectValue));while(Wt[Vt]>Gt&&Vt>0)Vt--;var Yt=Vt;if(Ut[Vt]>0)if(Ut[Vt]!=Ut[Vt+1]){Yt=Vt++;while(b.isWhitespace(Ht,Vt)&&"\t"!=Ht.charAt(Vt))Vt++}else{while(!this.isWordWrapSymbol(Ht,Vt))Vt--;Yt=Vt-1;while(b.isWhitespace(Ht,Yt)&&Yt>0)Yt--;while(b.isWhitespace(Ht,Vt)&&"\t"!=Ht.charAt(Vt))Vt++}else Vt++;Lt[Ct]=k?Ft.substr(0,Yt+1)+String.fromCharCode(7):Ft.substr(0,Yt+1),Lt.stimulsoft.insert(Ct+1,Ft.substr(Vt,Ft.length-Vt).stimulsoft.trimStart(" "))}}N=Lt.length;for(var jt=-1,Ct=0;Ct=32&&(zt+=x.service.pdfFont.Widths[me-32]),9==me){var ce=this.getTabsSize(P,it,zt);zt+=ce,ie[ne++]=ce}zt+seY)&&(Ft=Ft.substr(0,le)+String.fromCharCode(x.service.pdfFont.UnicodeMap["…".charCodeAt(0)]),zt=(oe+se)*(it*this.fontCorrectValue)/1e3),x.service.useUnicodeMode){for(var Bt=new E,Vt=0;Vt0&&7===Ft.charCodeAt(Ft.length-1)?Ft=Ft.substr(0,Ft.length-1):Se=h.Left),null!=P&&null!=P.textOptions&&P.textOptions.rightToLeft&&(Se==h.Left?Se=h.Right:Se==h.Right&&(Se=h.Left)),Se==h.Center&&(he+=(Y-zt)/2),Se==h.Right&&(he+=Y-zt),Se==h.Width){for(var fe=0,ve=0;ve0&&(Ct!=Lt.length-1||H&&zt>Y)){de=!0;var Ee=(Y-zt)/fe*1e3/(it*this.fontCorrectValue);if(Ee>0||H){ue=!0,(Ee+=x.service.pdfFont.Widths[0])<.5*x.service.pdfFont.Widths[0]&&(Ee=.5*x.service.pdfFont.Widths[0]);for(var be=x.service.useUnicodeMode?"<":"(",ye=0;ye-"+x.service.convertToString(Ee)+"<":be+=")-"+x.service.convertToString(Ee)+"(":be+=Ft[ye];Ft=be+=x.service.useUnicodeMode?">":")"}}}}if(ne>0){var xe=0,Ae="";0==de&&(Ae+=x.service.useUnicodeMode?"<":"(");for(var ye=0;ye-"+x.service.convertToString(Te)+"<":Ae+=")-"+x.service.convertToString(Te)+"("}else Ae+=Ft[ye];0==de&&(Ae+=x.service.useUnicodeMode?">":")"),Ft=Ae}x.service.useUnicodeMode&&(Ft=x.service.stringReplace(Ft," ",x.service.pdfFont.GlyphList[32].toString(16).stimulsoft.padLeft(4,"0")).stimulsoft.replaceAll("a","0000"));for(var Pe=null!=x.service.pdfFont.ChildFontsMap,Le=0,Ot=n.create(Number,Ft.length),Ce=new Array,Mt=0;Mt0?Re=Le:Ft.length>1&&(Re=x.service.pdfFont.ChildFontsMap[x.service.pdfFont.UnicodeMapBack[Ft.charCodeAt(1)]])),92!=Fe&&(Ot[Mt]=x.service.pdfFont.fonts[Re].UnicodeMap[ke]),Re==Le||Be||0==Mt||Ce.push(Mt),Le=Re}}if(Ce.push(Ft.length),te[Ct][0]=he,te[Ct][1]=we,te[Ct][2]=zt,x.service.pdfFont.NeedSyntItalic&&null!=nt&&nt.font.italic){var Ie=new y(1,0,this.italicAngleTanValue,1,he,we);null!=ee&&Ie.multiply(Ie),x.service.pageStream.writeLine1("{0} {1} {2} {3} {4} {5} Tm",x.service.convertToString(Ie.elements[0]),x.service.convertToString(Ie.elements[1]),x.service.convertToString(Ie.elements[2]),x.service.convertToString(Ie.elements[3]),x.service.convertToString(Ie.elements[4]),x.service.convertToString(Ie.elements[5]))}else x.service.pageStream.writeLine1("{0} {1} Td",x.service.convertToString(he-Zt),x.service.convertToString(we-$t)),Zt=he,$t=we;for(var De=0,Ne=0;Ne0){var Oe=Ft.charCodeAt(De)<64&&Ft.length>De+1?De+1:De,Re=x.service.pdfFont.ChildFontsMap[x.service.pdfFont.UnicodeMapBack[Ft.charCodeAt(Oe)]];x.service.pageStream.writeLine1("/F{0} {1} Tf",Re,x.service.convertToString(it*this.fontCorrectValue,this.precision_digits_font))}var He=Ce[Ne],Me=He-De;Me>0&&(ue||ne>0?(x.service.pageStream.writeString("["),Ne>0&&x.service.pageStream.writeString(x.service.useUnicodeMode?"<":"("),x.service.pageStream.write(Ot,De,Me),Ne":")"),x.service.pageStream.writeLine("] TJ")):(x.service.pageStream.writeString(x.service.useUnicodeMode?"<":"("),x.service.pageStream.write(Ot,De,Me),x.service.pageStream.writeLine1("{0} Tj",x.service.useUnicodeMode?">":")"))),De=He,He=12288&&r<=55215||b.isWhitespace(t,e)&&160!=r||"("==i||"{"==i)return!0;if(e>0){var n=t.charAt(e-1);if("!"==n||"%"==n||")"==n||"}"==n||"-"==n||"?"==n)return!0}return!1},x.getTabsSize=function(t,e,r){if(null!=t&&null!=t.textOptions){var i=r,n=750/e,o=n*t.textOptions.distanceBetweenTabs,a=n*t.textOptions.firstTabOffset+o;if(r0){var s=Math.trunc((r-a)/o);i=a+ ++s*o}return i-r}return 0},x.renderTextFont=function(t){var e=t.Component.as(p);if(null!=e){var r=t.service.pdfFont.getFontNumber(e.font),i=e.font.sizeInPoints*this.fontCorrectValue;if(t.service.pageStream.writeLine1("/F{0} {1} Tf",r,t.service.convertToString(i,this.precision_digits_font)),t.service.pdfFont.currentFont=r,t.service.haveAnnots&&t.Component.as(g).editable){var n=t.service.annotsArray[t.service.annotsCurrent];n.FontNumber=r,n.FontSize=i}}},x.hiToTwips=.72,x.precision_digits_font=3,x.fontCorrectValue=.955,x.boldFontStrokeWidthValue=.031,x.italicAngleTanValue=.325,x}();e.StiPdfRenderText=x}(r=e.Export||(e.Export={}))}(e=t.Report||(t.Report={}))}(Stimulsoft||(Stimulsoft={})),function(t){var e;!function(t){var e;!function(t){var e=function(){function t(){}return Object.defineProperty(t,"standardFontCharsNames",{get:function(){if(null==this._standardFontCharsNames){var t=["0020space","0021exclam","0022quotedbl","0023numbersign","0024dollar","0025percent","0026ampersand","0027quotesingle","0028parenleft","0029parenright","002Aasterisk","002Bplus","002Ccomma","002Dhyphen","002Eperiod","002Fslash","0030zero","0031one","0032two","0033three","0034four","0035five","0036six","0037seven","0038eight","0039nine","003Acolon","003Bsemicolon","003Cless","003Dequal","003Egreater","003Fquestion","0040at","0041A","0042B","0043C","0044D","0045E","0046F","0047G","0048H","0049I","004AJ","004BK","004CL","004DM","004EN","004FO","0050P","0051Q","0052R","0053S","0054T","0055U","0056V","0057W","0058X","0059Y","005AZ","005Bbracketleft","005Cbackslash","005Dbracketright","005Easciicircum","005Funderscore","0060grave","0061a","0062b","0063c","0064d","0065e","0066f","0067g","0068h","0069i","006Aj","006Bk","006Cl","006Dm","006En","006Fo","0070p","0071q","0072r","0073s","0074t","0075u","0076v","0077w","0078x","0079y","007Az","007Bbraceleft","007Cbar","007Dbraceright","007Easciitilde","007FcontrolDEL","00A0nbspace","00A1exclamdown","00A2cent","00A3sterling","00A4currency","00A5yen","00A6brokenbar","00A7section","00A8dieresis","00A9copyright","00AAordfeminine","00ABguillemotleft","00AClogicalnot","00ADsofthyphen","00AEregistered","00AFmacron","00B0degree","00B1plusminus","00B2twosuperior","00B3threesuperior","00B4acute","00B5mu","00B6paragraph","00B7periodcentered","00B8cedilla","00B9onesuperior","00BAordmasculine","00BBguillemotright","00BConequarter","00BDonehalf","00BEthreequarters","00BFquestiondown","00C0Agrave","00C1Aacute","00C2Acircumflex","00C3Atilde","00C4Adieresis","00C5Aring","00C6AE","00C7Ccedilla","00C8Egrave","00C9Eacute","00CAEcircumflex","00CBEdieresis","00CCIgrave","00CDIacute","00CEIcircumflex","00CFIdieresis","00D0Eth","00D1Ntilde","00D2Ograve","00D3Oacute","00D4Ocircumflex","00D5Otilde","00D6Odieresis","00D7multiply","00D8Oslash","00D9Ugrave","00DAUacute","00DBUcircumflex","00DCUdieresis","00DDYacute","00DEThorn","00DFgermandbls","00E0agrave","00E1aacute","00E2acircumflex","00E3atilde","00E4adieresis","00E5aring","00E6ae","00E7ccedilla","00E8egrave","00E9eacute","00EAecircumflex","00EBedieresis","00ECigrave","00EDiacute","00EEicircumflex","00EFidieresis","00F0eth","00F1ntilde","00F2ograve","00F3oacute","00F4ocircumflex","00F5otilde","00F6odieresis","00F7divide","00F8oslash","00F9ugrave","00FAuacute","00FBucircumflex","00FCudieresis","00FDyacute","00FEthorn","00FFydieresis","0100Amacron","0101amacron","0102Abreve","0103abreve","0104Aogonek","0105aogonek","0106Cacute","0107cacute","0108Ccircumflex","0109ccircumflex","010ACdotaccent","010Bcdotaccent","010CCcaron","010Dccaron","010EDcaron","010Fdcaron","0110Dcroat","0111dcroat","0112Emacron","0113emacron","0114Ebreve","0115ebreve","0116Edotaccent","0117edotaccent","0118Eogonek","0119eogonek","011AEcaron","011Becaron","011CGcircumflex","011Dgcircumflex","011EGbreve","011Fgbreve","0120Gdotaccent","0121gdotaccent","0122Gcommaaccent","0123gcommaaccent","0124Hcircumflex","0125hcircumflex","0126Hbar","0127hbar","0128Itilde","0129itilde","012AImacron","012Bimacron","012CIbreve","012Dibreve","012EIogonek","012Fiogonek","0130Idotaccent","0131dotlessi","0132IJ","0133ij","0134Jcircumflex","0135jcircumflex","0136Kcommaaccent","0137kcommaaccent","0138kgreenlandic","0139Lacute","013Alacute","013BLcommaaccent","013Clcommaaccent","013DLcaron","013Elcaron","013FLdot","0140ldot","0141Lslash","0142lslash","0143Nacute","0144nacute","0145Ncommaaccent","0146ncommaaccent","0147Ncaron","0148ncaron","0149napostrophe","014AEng","014Beng","014COmacron","014Domacron","014EObreve","014Fobreve","0150Ohungarumlaut","0151ohungarumlaut","0152OE","0153oe","0154Racute","0155racute","0156Rcommaaccent","0157rcommaaccent","0158Rcaron","0159rcaron","015ASacute","015Bsacute","015CScircumflex","015Dscircumflex","015EScedilla","015Fscedilla","0160Scaron","0161scaron","0162Tcommaaccent","0163tcommaaccent","0164Tcaron","0165tcaron","0166Tbar","0167tbar","0168Utilde","0169utilde","016AUmacron","016Bumacron","016CUbreve","016Dubreve","016EUring","016Furing","0170Uhungarumlaut","0171uhungarumlaut","0172Uogonek","0173uogonek","0174Wcircumflex","0175wcircumflex","0176Ycircumflex","0177ycircumflex","0178Ydieresis","0179Zacute","017Azacute","017BZdotaccent","017Czdotaccent","017DZcaron","017Ezcaron","017Flongs","0180bstroke","0181Bhook","0182Btopbar","0183btopbar","0184Tonesix","0185tonesix","0186Oopen","0187Chook","0188chook","0189Dafrican","018ADhook","018BDtopbar","018Cdtopbar","018Ddeltaturned","018EEreversed","018FSchwa","0190Eopen","0191Fhook","0192florin","0193Ghook","0194Gammaafrican","0195hv","0196Iotaafrican","0197Istroke","0198Khook","0199khook","019Albar","019Blambdastroke","019CMturned","019DNhookleft","019Enlegrightlong","019FOcenteredtilde","01A0Ohorn","01A1ohorn","01A2Oi","01A3oi","01A4Phook","01A5phook","01A6yr","01A7Tonetwo","01A8tonetwo","01A9Esh","01AAeshreversedloop","01ABtpalatalhook","01ACThook","01ADthook","01AETretroflexhook","01AFUhorn","01B0uhorn","01B1Upsilonafrican","01B2Vhook","01B3Yhook","01B4yhook","01B5Zstroke","01B6zstroke","01B7Ezh","01B8Ezhreversed","01B9ezhreversed","01BAezhtail","01BBtwostroke","01BCTonefive","01BDtonefive","01BEglottalinvertedstroke","01BFwynn","01C0clickdental","01C1clicklateral","01C2clickalveolar","01C3clickretroflex","01C4DZcaron","01C5Dzcaron","01C6dzcaron","01C7LJ","01C8Lj","01C9lj","01CANJ","01CBNj","01CCnj","01CDAcaron","01CEacaron","01CFIcaron","01D0icaron","01D1Ocaron","01D2ocaron","01D3Ucaron","01D4ucaron","01F0jcaron","01F1DZ","01F2Dz","01F3dz","01F4Gacute","01F5gacute","01FAAringacute","01FBaringacute","01FCAEacute","01FDaeacute","01FEOslashacute","01FFoslashacute","0254oopen","0255ccurl","0256dtail","0257dhook","0258ereversed","0259schwa","025Aschwahook","025Beopen","025Fjdotlessstroke","0260ghook","0261gscript","0264ramshorn","0265hturned","0266hhook","0267henghook","0268istroke","0269iotalatin","026Clbelt","026Elezh","026Fmturned","0271mhook","0272nhookleft","0275obarred","0278philatin","0279rturned","027Brhookturned","027Crlongleg","027Drhook","027Erfishhook","0282shook","0283esh","0286eshcurl","0287tturned","0289ubar","028Bvhook","028Cvturned","028Dwturned","028Eyturned","0290zretroflexhook","0291zcurl","0292ezh","0293ezhcurl","0294glottalstop","02A3dzaltone","02A4dezh","02A5dzcurl","02A6ts","02A7tesh","02A8tccurl","02D6plusmod","02D7minusmod","02D8breve","02D9dotaccent","02DAring","02DBogonek","02DCtilde","0391Alpha","0392Beta","0393Gamma","0394Deltagreek","0395Epsilon","0396Zeta","0397Eta","0398Theta","0399Iota","039AKappa","039BLambda","039CMu","039DNu","039EXi","039FOmicron","03A0Pi","03A1Rho","03A3Sigma","03A4Tau","03A5Upsilon","03A6Phi","03A7Chi","03A8Psi","03A9Omegagreek","03AAIotadieresis","03ABUpsilondieresis","03ACalphatonos","03ADepsilontonos","03AEetatonos","03AFiotatonos","03B0upsilondieresistonos","03B1alpha","03B2beta","03B3gamma","03B4delta","03B5epsilon","03B6zeta","03B7eta","03B8theta","03B9iota","03BAkappa","03BBlambda","03BCmu","03BDnu","03BExi","03BFomicron","03C0pi","03C1rho","03C2sigma1","03C3sigma","03C4tau","03C5upsilon","03C6phi","03C7chi","03C8psi","03C9omega","03CAiotadieresis","03CBupsilondieresis","03CComicrontonos","03CDupsilontonos","03CEomegatonos","03D0betasymbolgreek","03D1theta1","03D2Upsilon1","03D5phi1","03D6omega1","03DAStigmagreek","03DCDigammagreek","03DEKoppagreek","03E0Sampigreek","03E2Sheicoptic","03E3sheicoptic","03E4Feicoptic","03E5feicoptic","03E6Kheicoptic","03E7kheicoptic","03E8Horicoptic","03E9horicoptic","03EAGangiacoptic","03EBgangiacoptic","03ECShimacoptic","03EDshimacoptic","03EEDeicoptic","03EFdeicoptic","03F0kappasymbolgreek","03F1rhosymbolgreek","03F3yotgreek","0401afii10023","0402afii10051","0403afii10052","0404afii10053","0405afii10054","0406afii10055","0407afii10056","0408afii10057","0409afii10058","040Aafii10059","040Bafii10060","040Cafii10061","040Eafii10062","040Fafii10145","0410afii10017","0411afii10018","0412afii10019","0413afii10020","0414afii10021","0415afii10022","0416afii10024","0417afii10025","0418afii10026","0419afii10027","041Aafii10028","041Bafii10029","041Cafii10030","041Dafii10031","041Eafii10032","041Fafii10033","0420afii10034","0421afii10035","0422afii10036","0423afii10037","0424afii10038","0425afii10039","0426afii10040","0427afii10041","0428afii10042","0429afii10043","042Aafii10044","042Bafii10045","042Cafii10046","042Dafii10047","042Eafii10048","042Fafii10049","0430afii10065","0431afii10066","0432afii10067","0433afii10068","0434afii10069","0435afii10070","0436afii10072","0437afii10073","0438afii10074","0439afii10075","043Aafii10076","043Bafii10077","043Cafii10078","043Dafii10079","043Eafii10080","043Fafii10081","0440afii10082","0441afii10083","0442afii10084","0443afii10085","0444afii10086","0445afii10087","0446afii10088","0447afii10089","0448afii10090","0449afii10091","044Aafii10092","044Bafii10093","044Cafii10094","044Dafii10095","044Eafii10096","044Fafii10097","0451afii10071","0452afii10099","0453afii10100","0454afii10101","0455afii10102","0456afii10103","0457afii10104","0458afii10105","0459afii10106","045Aafii10107","045Bafii10108","045Cafii10109","045Eafii10110","045Fafii10193","0462afii10146","0463afii10194","0472afii10147","0473afii10195","0474afii10148","0475afii10196","0490afii10050","0491afii10098","04D9afii10846","060Cafii57388","061Bafii57403","061Fafii57407","0621afii57409","0622afii57410","0623afii57411","0624afii57412","0625afii57413","0626afii57414","0627afii57415","0628afii57416","0629afii57417","062Aafii57418","062Bafii57419","062Cafii57420","062Dafii57421","062Eafii57422","062Fafii57423","0630afii57424","0631afii57425","0632afii57426","0633afii57427","0634afii57428","0635afii57429","0636afii57430","0637afii57431","0638afii57432","0639afii57433","063Aafii57434","0640afii57440","0641afii57441","0642afii57442","0643afii57443","0644afii57444","0645afii57445","0646afii57446","0647afii57470","0648afii57448","0649afii57449","064Aafii57450","064Bafii57451","064Cafii57452","064Dafii57453","064Eafii57454","064Fafii57455","0650afii57456","0651afii57457","0652afii57458","0660afii57392","0661afii57393","0662afii57394","0663afii57395","0664afii57396","0665afii57397","0666afii57398","0667afii57399","0668afii57400","0669afii57401","066Aafii57381","066Bdecimalseparatorarabic","066Cthousandsseparatorarabic","066Dafii63167","0679afii57511","067Eafii57506","0686afii57507","0688afii57512","0691afii57513","0698afii57508","06A4afii57505","06AFafii57509","06BAafii57514","06C1hehaltonearabic","06D1yehthreedotsbelowarabic","06D2afii57519","06D5afii57534","06F0zeropersian","06F1onepersian","06F2twopersian","06F3threepersian","06F4fourpersian","06F5fivepersian","06F6sixpersian","06F7sevenpersian","06F8eightpersian","06F9ninepersian","1E00Aringbelow","1E01aringbelow","1E02Bdotaccent","1E03bdotaccent","1E04Bdotbelow","1E05bdotbelow","1E06Blinebelow","1E07blinebelow","1E08Ccedillaacute","1E09ccedillaacute","1E0ADdotaccent","1E0Bddotaccent","1E0CDdotbelow","1E0Dddotbelow","1E0EDlinebelow","1E0Fdlinebelow","1E10Dcedilla","1E11dcedilla","1E12Dcircumflexbelow","1E13dcircumflexbelow","1E14Emacrongrave","1E15emacrongrave","1E16Emacronacute","1E17emacronacute","1E18Ecircumflexbelow","1E19ecircumflexbelow","1E1AEtildebelow","1E1Betildebelow","1E1CEcedillabreve","1E1Decedillabreve","1E1EFdotaccent","1E1Ffdotaccent","1E20Gmacron","1E21gmacron","1E22Hdotaccent","1E23hdotaccent","1E24Hdotbelow","1E25hdotbelow","1E26Hdieresis","1E27hdieresis","1E28Hcedilla","1E29hcedilla","1E2AHbrevebelow","1E2Bhbrevebelow","1E2CItildebelow","1E2Ditildebelow","1E2EIdieresisacute","1E2Fidieresisacute","1E30Kacute","1E31kacute","1E32Kdotbelow","1E33kdotbelow","1E34Klinebelow","1E35klinebelow","1E36Ldotbelow","1E37ldotbelow","1E38Ldotbelowmacron","1E39ldotbelowmacron","1E3ALlinebelow","1E3Bllinebelow","1E3CLcircumflexbelow","1E3Dlcircumflexbelow","1E3EMacute","1E3Fmacute","1E40Mdotaccent","1E41mdotaccent","1E42Mdotbelow","1E43mdotbelow","1E44Ndotaccent","1E45ndotaccent","1E46Ndotbelow","1E47ndotbelow","1E48Nlinebelow","1E49nlinebelow","1E4ANcircumflexbelow","1E4Bncircumflexbelow","1E4COtildeacute","1E4Dotildeacute","1E4EOtildedieresis","1E4Fotildedieresis","1E50Omacrongrave","1E51omacrongrave","1E52Omacronacute","1E53omacronacute","1E54Pacute","1E55pacute","1E56Pdotaccent","1E57pdotaccent","1E58Rdotaccent","1E59rdotaccent","1E5ARdotbelow","1E5Brdotbelow","1E5CRdotbelowmacron","1E5Drdotbelowmacron","1E5ERlinebelow","1E5Frlinebelow","1E60Sdotaccent","1E61sdotaccent","1E62Sdotbelow","1E63sdotbelow","1E64Sacutedotaccent","1E65sacutedotaccent","1E66Scarondotaccent","1E67scarondotaccent","1E68Sdotbelowdotaccent","1E69sdotbelowdotaccent","1E6ATdotaccent","1E6Btdotaccent","1E6CTdotbelow","1E6Dtdotbelow","1E6ETlinebelow","1E6Ftlinebelow","1E70Tcircumflexbelow","1E71tcircumflexbelow","1E72Udieresisbelow","1E73udieresisbelow","1E74Utildebelow","1E75utildebelow","1E76Ucircumflexbelow","1E77ucircumflexbelow","1E78Utildeacute","1E79utildeacute","1E7AUmacrondieresis","1E7Bumacrondieresis","1E7CVtilde","1E7Dvtilde","1E7EVdotbelow","1E7Fvdotbelow","1E80Wgrave","1E81wgrave","1E82Wacute","1E83wacute","1E84Wdieresis","1E85wdieresis","1E86Wdotaccent","1E87wdotaccent","1E88Wdotbelow","1E89wdotbelow","1E8AXdotaccent","1E8Bxdotaccent","1E8CXdieresis","1E8Dxdieresis","1E8EYdotaccent","1E8Fydotaccent","1E90Zcircumflex","1E91zcircumflex","1E92Zdotbelow","1E93zdotbelow","1E94Zlinebelow","1E95zlinebelow","1E96hlinebelow","1E97tdieresis","1E98wring","1E99yring","1E9Aarighthalfring","1E9Bslongdotaccent","1EA0Adotbelow","1EA1adotbelow","1EA2Ahookabove","1EA3ahookabove","1EA4Acircumflexacute","1EA5acircumflexacute","1EA6Acircumflexgrave","1EA7acircumflexgrave","1EA8Acircumflexhookabove","1EA9acircumflexhookabove","1EAAAcircumflextilde","1EABacircumflextilde","1EACAcircumflexdotbelow","1EADacircumflexdotbelow","1EAEAbreveacute","1EAFabreveacute","1EB0Abrevegrave","1EB1abrevegrave","1EB2Abrevehookabove","1EB3abrevehookabove","1EB4Abrevetilde","1EB5abrevetilde","1EB6Abrevedotbelow","1EB7abrevedotbelow","1EB8Edotbelow","1EB9edotbelow","1EBAEhookabove","1EBBehookabove","1EBCEtilde","1EBDetilde","1EBEEcircumflexacute","1EBFecircumflexacute","1EC0Ecircumflexgrave","1EC1ecircumflexgrave","1EC2Ecircumflexhookabove","1EC3ecircumflexhookabove","1EC4Ecircumflextilde","1EC5ecircumflextilde","1EC6Ecircumflexdotbelow","1EC7ecircumflexdotbelow","1EC8Ihookabove","1EC9ihookabove","1ECAIdotbelow","1ECBidotbelow","1ECCOdotbelow","1ECDodotbelow","1ECEOhookabove","1ECFohookabove","1ED0Ocircumflexacute","1ED1ocircumflexacute","1ED2Ocircumflexgrave","1ED3ocircumflexgrave","1ED4Ocircumflexhookabove","1ED5ocircumflexhookabove","1ED6Ocircumflextilde","1ED7ocircumflextilde","1ED8Ocircumflexdotbelow","1ED9ocircumflexdotbelow","1EDAOhornacute","1EDBohornacute","1EDCOhorngrave","1EDDohorngrave","1EDEOhornhookabove","1EDFohornhookabove","1EE0Ohorntilde","1EE1ohorntilde","1EE2Ohorndotbelow","1EE3ohorndotbelow","1EE4Udotbelow","1EE5udotbelow","1EE6Uhookabove","1EE7uhookabove","1EE8Uhornacute","1EE9uhornacute","1EEAUhorngrave","1EEBuhorngrave","1EECUhornhookabove","1EEDuhornhookabove","1EEEUhorntilde","1EEFuhorntilde","1EF0Uhorndotbelow","1EF1uhorndotbelow","1EF2Ygrave","1EF3ygrave","1EF4Ydotbelow","1EF5ydotbelow","1EF6Yhookabove","1EF7yhookabove","1EF8Ytilde","1EF9ytilde","2002enspace","200Bzerowidthspace","200Cafii61664","200Dafii301","200Eafii299","200Fafii300","2010hyphentwo","2012figuredash","2013endash","2014emdash","2015afii00208","2016dblverticalbar","2017underscoredbl","2018quoteleft","2019quoteright","201Aquotesinglbase","201Bquotereversed","201Cquotedblleft","201Dquotedblright","201Equotedblbase","2020dagger","2021daggerdbl","2022bullet","2024onedotenleader","2025twodotenleader","2026ellipsis","202Cafii61573","202Dafii61574","202Eafii61575","2030perthousand","2032minute","2033second","2035primereversed","2039guilsinglleft","203Aguilsinglright","203Breferencemark","203Cexclamdbl","203Eoverline","2042asterism","2044fraction","2070zerosuperior","2074foursuperior","2075fivesuperior","2076sixsuperior","2077sevensuperior","2078eightsuperior","2079ninesuperior","207Aplussuperior","207Cequalsuperior","207Dparenleftsuperior","207Eparenrightsuperior","207Fnsuperior","2080zeroinferior","2081oneinferior","2082twoinferior","2083threeinferior","2084fourinferior","2085fiveinferior","2086sixinferior","2087seveninferior","2088eightinferior","2089nineinferior","208Dparenleftinferior","208Eparenrightinferior","20A1colonmonetary","20A2cruzeiro","20A3franc","20A4afii08941","20A7peseta","20A9won","20AAafii57636","20ABdong","20ACEuro","2103centigrade","2105afii61248","2109fahrenheit","2111Ifraktur","2113afii61289","2116afii61352","2118weierstrass","211CRfraktur","211Eprescription","2121telephone","2122trademark","2126Omega","212Bangstrom","212Eestimated","2135aleph","2153onethird","2154twothirds","215Boneeighth","215Cthreeeighths","215Dfiveeighths","215Eseveneighths","2160Oneroman","2161Tworoman","2162Threeroman","2163Fourroman","2164Fiveroman","2165Sixroman","2166Sevenroman","2167Eightroman","2168Nineroman","2169Tenroman","216AElevenroman","216BTwelveroman","2170oneroman","2171tworoman","2172threeroman","2173fourroman","2174fiveroman","2175sixroman","2176sevenroman","2177eightroman","2178nineroman","2179tenroman","217Aelevenroman","217Btwelveroman","2200universal","2202partialdiff","2203existential","2205emptyset","2206Delta","2207gradient","2208element","2209notelement","220Bsuchthat","220Cnotcontains","220Fproduct","2211summation","2212minus","2213minusplus","2215divisionslash","2217asteriskmath","2219bulletoperator","221Aradical","221Dproportional","221Einfinity","221Forthogonal","2220angle","2223divides","2225parallel","2226notparallel","2227logicaland","2228logicalor","2229intersection","222Aunion","222Bintegral","222Cdblintegral","222Econtourintegral","2234therefore","2235because","2236ratio","2237proportion","223Csimilar","223Dreversedtilde","2243asymptoticallyequal","2245congruent","2248approxequal","224Callequal","2250approaches","2251geometricallyequal","2252approxequalorimage","2253imageorapproximatelyequal","2260notequal","2261equivalence","2262notidentical","2264lessequal","2265greaterequal","2266lessoverequal","2267greateroverequal","226Amuchless","226Bmuchgreater","226Enotless","226Fnotgreater","2270notlessnorequal","2271notgreaternorequal","2272lessorequivalent","2273greaterorequivalent","2276lessorgreater","2277greaterorless","2279notgreaternorless","227Aprecedes","227Bsucceeds","2280notprecedes","2281notsucceeds","2282propersubset","2283propersuperset","2284notsubset","2285notsuperset","2286reflexsubset","2287reflexsuperset","228Asubsetnotequal","228Bsupersetnotequal","2295circleplus","2296minuscircle","2297circlemultiply","2299circleot","22A3tackleft","22A4tackdown","22A5perpendicular","22BFrighttriangle","22C5dotmath","22CEcurlyor","22CFcurlyand","22DAlessequalorgreater","22DBgreaterequalorless","22EEellipsisvertical","F6BEdotlessj","F6BFLL","F6C0ll","F6C3commaaccent","F6C4afii10063","F6C5afii10064","F6C6afii10192","F6C7afii10831","F6C8afii10832","F6C9Acute","F6CACaron","F6CBDieresis","F6CCDieresisAcute","F6CDDieresisGrave","F6CEGrave","F6CFHungarumlaut","F6D0Macron","F6D1cyrBreve","F6D2cyrFlex","F6D3dblGrave","F6D4cyrbreve","F6D5cyrflex","F6D6dblgrave","F6D7dieresisacute","F6D8dieresisgrave","F6D9copyrightserif","F6DAregisterserif","F6DBtrademarkserif","F6DConefitted","F6DDrupiah","F8FFapple","FB00ff","FB01fi","FB02fl","FB03ffi","FB04ffl","FE61asterisksmall","FE62plussmall","FE63hyphensmall","FE64lesssmall","FE65greatersmall","FE66equalsmall","FE69dollarsmall","FE6Apercentsmall","FE6Batsmall","F020space","F021exclam","F022universal","F023numbersign","F024existential","F025percent","F026ampersand","F027suchthat","F028parenleft","F029parenright","F02Aasteriskmath","F02Bplus","F02Ccomma","F02Dminus","F02Eperiod","F02Fslash","F030zero","F031one","F032two","F033three","F034four","F035five","F036six","F037seven","F038eight","F039nine","F03Acolon","F03Bsemicolon","F03Cless","F03Dequal","F03Egreater","F03Fquestion","F040congruent","F041Alpha","F042Beta","F043Chi","F044Delta","F045Epsilon","F046Phi","F047Gamma","F048Eta","F049Iota","F04Atheta1","F04BKappa","F04CLambda","F04DMu","F04ENu","F04FOmicron","F050Pi","F051Theta","F052Rho","F053Sigma","F054Tau","F055Upsilon","F056sigma1","F057Omega","F058Xi","F059Psi","F05AZeta","F05Bbracketleft","F05Ctherefore","F05Dbracketright","F05Eperpendicular","F05Funderscore","F060radicalex","F061alpha","F062beta","F063chi","F064delta","F065epsilon","F066phi","F067gamma","F068eta","F069iota","F06Aphi1","F06Bkappa","F06Clambda","F06Dmu","F06Enu","F06Fomicron","F070pi","F071theta","F072rho","F073sigma","F074tau","F075upsilon","F076omega1","F077omega","F078xi","F079psi","F07Azeta","F07Bbraceleft","F07Cbar","F07Dbraceright","F07Esimilar","F0A0Euro","F0A1Upsilon1","F0A2minute","F0A3lessequal","F0A4fraction","F0A5infinity","F0A6florin","F0A7club","F0A8diamond","F0A9heart","F0AAspade","F0ABarrowboth","F0ACarrowleft","F0ADarrowup","F0AEarrowright","F0AFarrowdown","F0B0degree","F0B1plusminus","F0B2second","F0B3greaterequal","F0B4multiply","F0B5proportional","F0B6partialdiff","F0B7bullet","F0B8divide","F0B9notequal","F0BAequivalence","F0BBapproxequal","F0BCellipsis","F0BDarrowvertex","F0BEarrowhorizex","F0BFcarriagereturn","F0C0aleph","F0C1Ifraktur","F0C2Rfraktur","F0C3weierstrass","F0C4circlemultiply","F0C5circleplus","F0C6emptyset","F0C7intersection","F0C8union","F0C9propersuperset","F0CAreflexsuperset","F0CBnotsubset","F0CCpropersubset","F0CDreflexsubset","F0CEelement","F0CFnotelement","F0D0angle","F0D1gradient","F0D2registerserif","F0D3copyrightserif","F0D4trademarkserif","F0D5product","F0D6radical","F0D7dotmath","F0D8logicalnot","F0D9logicaland","F0DAlogicalor","F0DBarrowdblboth","F0DCarrowdblleft","F0DDarrowdblup","F0DEarrowdblright","F0DFarrowdbldown","F0E0lozenge","F0E1angleleft","F0E2registersans","F0E3copyrightsans","F0E4trademarksans","F0E5summation","F0E6parenlefttp","F0E7parenleftex","F0E8parenleftbt","F0E9bracketlefttp","F0EAbracketleftex","F0EBbracketleftbt","F0ECbracelefttp","F0EDbraceleftmid","F0EEbraceleftbt","F0EFbraceex","F0F1angleright","F0F2integral","F0F3integraltp","F0F4integralex","F0F5integralbt","F0F6parenrighttp","F0F7parenrightex","F0F8parenrightbt","F0F9bracketrighttp","F0FAbracketrightex","F0FBbracketrightbt","F0FCbracerighttp","F0FDbracerightmid","F0FEbracerightbt"];this._standardFontCharsNames=[];for(var e=0;e0||this.passwordUser.length>0||t!=e.StiUserAccessPrivileges.All)&&(s=!0,this.computingCryptoValues2()||(s=!1,this.throwEncryptionError(0,"Encryption not work!")));return s},n.prototype.computingCryptoValues2=function(){if(this.keyLength==e.StiPdfEncryptionKeyLength.Bit128_r4)return this.computingCryptoValuesV4();if(this.keyLength==e.StiPdfEncryptionKeyLength.Bit256_r5||this.keyLength==e.StiPdfEncryptionKeyLength.Bit256_r6)return this.computingCryptoValuesV5();var t=this.passwordOwner;i.isNullOrEmpty(this.passwordOwner)&&(t=this.passwordUser);var r=this.padPassword(t),o=this.computeHashMD5(r);if(this.keyLength==e.StiPdfEncryptionKeyLength.Bit128)for(var a=0;a<50;a++)o=this.computeHashMD5(o);if(this.keyLength==e.StiPdfEncryptionKeyLength.Bit40){var s=[];s[0]=o[0],s[1]=o[1],s[2]=o[2],s[3]=o[3],s[4]=o[4],o=s}var l=this.padPassword(this.passwordUser);if(l=this.rc4(l,o),this.keyLength==e.StiPdfEncryptionKeyLength.Bit128)for(var m=1;m<=19;m++){for(var c=0;c<16;c++)o[c]^=m-1,o[c]^=m;l=this.rc4(l,o)}l.stimulsoft.copyTo(this.ownerValue,0);var p=this.passwordUser,g=this.padPassword(p),h=this.getBytesUInt32(this.securityFlags),w=[];if(w.stimulsoft.addRange(g),w.stimulsoft.addRange(l),w.stimulsoft.addRange(h),w.stimulsoft.addRange(this.IDValue),o=this.computeHashMD5(w),this.keyLength==e.StiPdfEncryptionKeyLength.Bit128)for(var a=0;a<50;a++)o=this.computeHashMD5(o);this.encryptionKey=[],this.encryptionKeyLength=this.keyLength==e.StiPdfEncryptionKeyLength.Bit128?16:5;for(var u=0;u127){var g=[];r.copy2(p,0,g,0,127),p=g}(o=this.getHashV5(p,s,null)).stimulsoft.copyTo(this.userValue,0),s.stimulsoft.copyTo(this.userValue,32),l.stimulsoft.copyTo(this.userValue,40),o=this.getHashV5(p,l,null),this.encodeKeyDataV5(o,a,!0).stimulsoft.copyTo(this.userExtendedValue,0);var h=this.passwordOwner;i.isNullOrEmpty(this.passwordOwner)&&(h=this.passwordUser);var w=t.System.Text.Encoding.UTF8.getBytes(h);if(w.length>127){var g=[];r.copy2(w,0,g,0,127),w=g}return(o=this.getHashV5(w,m,this.userValue)).stimulsoft.copyTo(this.ownerValue,0),m.stimulsoft.copyTo(this.ownerValue,32),c.stimulsoft.copyTo(this.ownerValue,40),o=this.getHashV5(w,c,this.userValue),this.encodeKeyDataV5(o,a,!0).stimulsoft.copyTo(this.ownerExtendedValue,0),n=e.createNextBytes(16),this.getBytesUInt32(this.securityFlags).stimulsoft.copyTo(n,0),n[4]=255,n[5]=255,n[6]=255,n[7]=255,n[8]=84,n[9]=97,n[10]=100,n[11]=98,this.permsValue=this.encodeKeyDataV5(a,n,!1),o=this.getHashV5(p,l,null),this.encryptionKey=this.decodeKeyDataV5(o,this.userExtendedValue,!0),97==(n=this.decodeKeyDataV5(this.encryptionKey,this.permsValue,!1))[9]&&100==n[10]&&98==n[11]||this.throwEncryptionError(102,"Verifying key calculation failed"),!0},n.prototype.encodeKeyDataV5=function(e,r,i){var n=null;if(i){var o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],a;n=(a=new t.ExternalLibrary.aesjs.ModeOfOperation.cbc(e,o)).encrypt(r)}else{var a;n=(a=new t.ExternalLibrary.aesjs.ModeOfOperation.ecb(e)).encrypt(r)}for(var s=[],l=0;l>>>"),t.writeLine("/StmF /StdCF"),t.writeLine("/StrF /StdCF"),t.writeLine("/R 3"),t.writeLine("/V 2"),t.writeLine("/Length 128");else if(this.keyLength==e.StiPdfEncryptionKeyLength.Bit128_r4)t.writeLine("/CF<>>>"),t.writeLine("/StmF /StdCF"),t.writeLine("/StrF /StdCF"),t.writeLine("/R 4"),t.writeLine("/V 4"),t.writeLine("/Length 128");else if(this.keyLength==e.StiPdfEncryptionKeyLength.Bit256_r5||this.keyLength==e.StiPdfEncryptionKeyLength.Bit256_r6){t.writeLine("/CF<>>>"),t.writeLine("/StmF /StdCF"),t.writeLine("/StrF /StdCF"),t.writeLine1("/R {0}",this.keyLength==e.StiPdfEncryptionKeyLength.Bit256_r5?5:6),t.writeLine("/V 5"),t.writeLine("/Length 256");var s="",l="";for(a=0;a<32;a++)s+=String.fromCharCode(this.ownerExtendedValue[a]),l+=String.fromCharCode(this.userExtendedValue[a]);var m="";for(a=0;a<16;a++)m+=String.fromCharCode(this.permsValue[a]);t.writeString(i.format("/OE ({0})",e.StiPdfExportService.convertToEscapeSequencePlusTabs(s)),!0),t.writeString(i.format("/UE ({0})",e.StiPdfExportService.convertToEscapeSequencePlusTabs(l)),!0),t.writeString(i.format("/Perms ({0})",e.StiPdfExportService.convertToEscapeSequencePlusTabs(m)),!0)}else t.writeLine("/R 2"),t.writeLine("/V 1"),t.writeLine("/Length 40");t.writeString(i.format("/O ({0})",e.StiPdfExportService.convertToEscapeSequencePlusTabs(r)),!0),t.writeString(i.format("/U ({0})",e.StiPdfExportService.convertToEscapeSequencePlusTabs(n)),!0),t.writeLine1("/P {0}",this.securityFlags)},n.prototype.getBytesUInt32=function(t){var e=[];return e.push(255&t),e.push(t>>8&255),e.push(t>>16&255),e.push(t>>24&255),e},n.prototype.getBytesUint16=function(t){var e=[];return e.push(255&t),e.push(t>>8&255),e},n.prototype.rc4=function(t,e){var r=[],i=0,n=0,o,a=[],s=e.length,l=t.length;for(i=0;i<256;i++)r[i]=i;for(i=0;i<256;i++)n=(n+r[i]+e[i%s])%256,o=r[i],r[i]=r[n],r[n]=o;i=0,n=0;for(var m=0;m0&&(i+=String.fromCharCode(65+e-1)),i+=String.fromCharCode(65+r)},T.prototype.getColorString=function(t){return"#"+E.format("{0:X8}",t.toArgb()).substr(2)},T.prototype.getCellStyleNumber=function(e,r,i,o){for(var a=new x,s=!0,l=!0,c=0;c0)for(var c=0;c1&&(e.DateTimeFormatString=n.substr(1))),"T"==n.charAt(0)&&(e.isTime=!0,n.length>1&&(e.DateTimeFormatString=n.substr(1))),1==n.length)e.isDefaultFormat=!0;else if(e.isCurrency||e.isNumeric||e.isPercent){var l=1;if(i.isDigit(n,l)){var m="";while(l0)for(var c=0;ct["StiOptions"].Export.OpenDocumentCalc.maximumSheetHeight?P=T+t["StiOptions"].Export.OpenDocumentCalc.maximumSheetHeight:this.matrix=null,this.minRowList.push(T),this.maxRowList.push(P),T=P,(null!=this.matrix||x.length>0)&&(x=E.format(" part{0}",A++)),this.sheetNameList.push(y+x),this.isStopped)return null}while(null!=this.matrix);g++}for(var L=new p,C=new p,F=new p,B=new p,k=0;k=0"),m.writeAttributeString("style:apply-style-name",E.format("N{0}P0",Q+1)),m.writeEndElement(),m.writeEndElement())),J.isPercent&&(m.writeStartElement("number:percentage-style"),m.writeAttributeString("style:name",E.format("N{0}",Q+1))," "!=J.DecimalComma&&(m.writeAttributeString("number:language",","==J.DecimalComma?"ru":"en"),m.writeAttributeString("number:country",","==J.DecimalComma?"RU":"US")),m.writeStartElement("number:number"),m.writeAttributeString("number:decimal-places",J.DecimalDigits.toString()),m.writeAttributeString("number:min-integer-digits","1"),3==J.GroupDigits&&m.writeAttributeString("number:grouping","true"),m.writeEndElement(),m.writeElementString("number:text","%"),m.writeEndElement()),J.isCurrency&&(m.writeStartElement("number:currency-style"),m.writeAttributeString("style:name",E.format("N{0}",Q+1))," "!=J.DecimalComma&&(m.writeAttributeString("number:language",","==J.DecimalComma?"ru":"en"),m.writeAttributeString("number:country",","==J.DecimalComma?"RU":"US")),J.CurrencyPositionBefore&&m.writeElementString("number:currency-symbol",J.CurrencySymbol),m.writeStartElement("number:number"),m.writeAttributeString("number:decimal-places",J.DecimalDigits.toString()),m.writeAttributeString("number:min-integer-digits","1"),m.writeAttributeString("number:grouping",3==J.GroupDigits?"true":"false"),m.writeEndElement(),J.CurrencyPositionBefore||m.writeElementString("number:currency-symbol",J.CurrencySymbol),m.writeEndElement()),J.isDate&&(m.writeStartElement("number:date-style"),m.writeAttributeString("style:name",E.format("N{0}",Q+1)),this.writeDateTimeFormatString(m,J.DateTimeFormatString,"d"),m.writeEndElement()),J.isTime&&(m.writeStartElement("number:time-style"),m.writeAttributeString("style:name",E.format("N{0}",Q+1)),E.isNullOrEmpty(J.DateTimeFormatString)||-1==J.DateTimeFormatString.indexOf("h")||(m.writeAttributeString("number:language","en"),m.writeAttributeString("number:country","US")),this.writeDateTimeFormatString(m,J.DateTimeFormatString,"t"),m.writeEndElement())}for(var Q=0;Q0?m.writeAttributeString("fo:background-color",this.getColorString(J.BackColor)):m.writeAttributeString("fo:background-color","transparent"),J.VertAlign==StiVertAlignment.Center&&m.writeAttributeString("style:vertical-align","middle"),J.VertAlign==StiVertAlignment.Top&&m.writeAttributeString("style:vertical-align","top"),m.writeAttributeString("style:text-align-source","fix"),m.writeAttributeString("style:repeat-content","false"),J.Wordwrap&&m.writeAttributeString("fo:wrap-option","wrap"),m.writeAttributeString("fo:padding","0in"),m.writeAttributeString("fo:border-left",J.BorderLeft),m.writeAttributeString("fo:border-right",J.BorderRight),m.writeAttributeString("fo:border-top",J.BorderTop),m.writeAttributeString("fo:border-bottom",J.BorderBottom),0!=J.Angle&&(m.writeAttributeString("style:rotation-angle",J.Angle.toString()),m.writeAttributeString("style:rotation-align","none")),m.writeEndElement(),m.writeStartElement("style:paragraph-properties"),J.HorAlign==StiTextHorAlignment.Left&&m.writeAttributeString("fo:text-align","start"),J.HorAlign==StiTextHorAlignment.Center&&m.writeAttributeString("fo:text-align","center"),J.HorAlign==StiTextHorAlignment.Right&&m.writeAttributeString("fo:text-align","end"),J.HorAlign==StiTextHorAlignment.Width&&m.writeAttributeString("fo:text-align","justify"),m.writeAttributeString("fo:margin-left","0cm"),m.writeEndElement(),m.writeStartElement("style:text-properties"),m.writeAttributeString("fo:color",this.getColorString(J.FontColor)),m.writeAttributeString("style:font-name",J.FontName);var Z=E.format("{0}pt",J.FontSize).stimulsoft.replaceAll(",",".");m.writeAttributeString("fo:font-size",Z),m.writeAttributeString("fo:font-size-asian",Z),m.writeAttributeString("fo:font-size-complex",Z),J.Italic&&(m.writeAttributeString("fo:font-style","italic"),m.writeAttributeString("fo:font-style-asian","italic"),m.writeAttributeString("fo:font-style-complex","italic")),J.Underline&&(m.writeAttributeString("style:text-underline-style","solid"),m.writeAttributeString("style:text-underline-width","auto"),m.writeAttributeString("style:text-underline-color","font-color")),J.Bold&&(m.writeAttributeString("fo:font-weight","bold"),m.writeAttributeString("fo:font-weight-asian","bold"),m.writeAttributeString("fo:font-weight-complex","bold")),m.writeEndElement(),m.writeEndElement()}m.writeFullEndElement(),m.writeStartElement("office:body"),m.writeStartElement("office:spreadsheet"),m.writeStartElement("table:calculation-settings"),m.writeAttributeString("table:use-regular-expressions","false"),m.writeEndElement(),this.currentPassNumber=t["StiOptions"].Export.OpenDocumentCalc.divideSegmentPages?3:2;for(var k=0;ky&&(y=A,this.invokeExporting2(x,s.coordY.countItems,this.currentPassNumber,this.maximumPassNumber));var T=s.coordY.getByIndex(x)-s.coordY.getByIndex(x-1),P=o.get(T);t.writeStartElement("table:table-row"),t.writeAttributeString("table:style-name",E.format("ro{0}",P+1));for(var S=1;S0||L.height>0)&&(t.writeAttributeString("table:number-columns-spanned",(L.width+1).toString()),t.writeAttributeString("table:number-rows-spanned",(L.height+1).toString()));var R=L.component.stimulsoft.as(m),I=L.text,D=L.component.stimulsoft.as(n);if(null==D||E.isNullOrEmpty(D.excelDataValue)||(I=D.excelDataValue),!L.component.isExportAsImage(e.StiExportFormat.Ods)&&(!E.isNullOrEmpty(I)||null!=R&&null!=R.excelDataValue)){var N=!1,O=0,H=w.now,M=null;if(-1!=k&&null!=R&&null!=R.excelDataValue&&"-"!=R.excelDataValue){var W,U=(W=R.excelDataValue).replace(/[^\d.,-]/g,"").stimulsoft.replaceAll(",",".");M=this.dataStyleList[k],N=!0;try{if(M.isDate||M.isTime){var X=w.tryParseExact(W,[null]);X.successfully?H=X.result:N=!1}else O=parseFloat(U),isNaN(O)&&(N=!1,O=0)}catch(t){N=!1}N||null!=I||(I=W)}if(N)if(M.isDate)t.writeAttributeString("office:value-type","date"),t.writeAttributeString("office:date-value",H.toString("yyyy-MM-dd"));else if(M.isTime)t.writeAttributeString("office:value-type","time"),t.writeAttributeString("office:time-value",H.toString("PTHH\\Hmm\\Mss\\S"));else{var W=O.toString().stimulsoft.replaceAll(",",".");M.isNumeric&&t.writeAttributeString("office:value-type","float"),M.isPercent&&t.writeAttributeString("office:value-type","percentage"),M.isCurrency&&t.writeAttributeString("office:value-type","currency"),t.writeAttributeString("office:value",W)}else t.writeAttributeString("office:value-type","string");for(var z=r.StiExportUtils.splitString(I,!0),V=0;V1&&(this.imageQuality=1),this.imageResolution<10&&(this.imageResolution=10),this.imageResolution=this.imageResolution/100,this.currentCulture=o.currentCulture;try{o.currentCulture=o.cultures["en-US"],this.imageCache=new e.StiImageCache(t["StiOptions"].Export.OpenDocumentCalc.allowImageComparer,!0,s.Jpeg,this.imageQuality,!1),this.cellStyleList=[],this.dataStyleList=[],this.sheetNameList=[],this.matrixList=[],this.firstPageIndexList=[],this.minRowList=[],this.maxRowList=[],this.cellStyleTableList=[],this.currentPassNumber=0,this.maximumPassNumber=t["StiOptions"].Export.OpenDocumentCalc.divideSegmentPages?4:3;var g=p.getSelectedPages(i.renderedPages);if(t["StiOptions"].Export.OpenDocumentCalc.divideSegmentPages&&(g=r.StiSegmentPagesDivider.divide(g,this),this.currentPassNumber=1),this.isStopped)return;var h=new a;if(h.begin(n,!0),h.addFile("content.xml",this.writeContent(i,g)),h.addFile("mimetype",this.writeMimetype()),h.addFile("meta.xml",this.writeMeta()),h.addFile("META-INF/manifest.xml",this.writeManifest()),h.addFile("settings.xml",this.writeSettings()),h.addFile("styles.xml",this.writeStyles(g)),this.imageCache.imagePackedStore.stimulsoft.countItems>0)for(var w=0;w0&&(i+=String.fromCharCode(65+e-1)),i+=String.fromCharCode(65+r)},b.prototype.getColorString=function(t){return"#"+d.format("{0:X8}",t.toArgb()).substr(2)},b.prototype.getCellStyleNumber=function(t,e,r,i){for(var n=new v,o=!0,a=!0,s=0;s45&&p<135||p>225&&p<315)&&(c.cellStyle.horAlignment==StiTextHorAlignment.Left&&(n.VertAlign=StiVertAlignment.Bottom),c.cellStyle.horAlignment==StiTextHorAlignment.Center&&(n.VertAlign=StiVertAlignment.Center),c.cellStyle.horAlignment==StiTextHorAlignment.Right&&(n.VertAlign=StiVertAlignment.Top),c.cellStyle.horAlignment==StiTextHorAlignment.Width&&(n.VertAlign=StiVertAlignment.Bottom))}}if(this.cellStyleList.length>0)for(var s=0;s45&&n<135&&(i.Angle=90),n>225&&n<315&&(i.Angle=270),0!=i.Angle&&(r.vertAlignment==StiVertAlignment.Top&&(i.HorAlign=StiTextHorAlignment.Left),r.vertAlignment==StiVertAlignment.Center&&(i.HorAlign=StiTextHorAlignment.Center),r.vertAlignment==StiVertAlignment.Bottom&&(i.HorAlign=StiTextHorAlignment.Right)),this.paragraphStyleList.length>0)for(var a=0;a0?w.writeAttributeString("fo:background-color",this.getColorString(z.BackColor)):w.writeAttributeString("fo:background-color","transparent"),w.writeAttributeString("fo:padding","0in"),w.writeAttributeString("fo:border-left",z.BorderLeft),w.writeAttributeString("fo:border-right",z.BorderRight),w.writeAttributeString("fo:border-top",z.BorderTop),w.writeAttributeString("fo:border-bottom",z.BorderBottom),w.writeEndElement(),w.writeEndElement()}for(var X=0;Xj&&(j=_,this.invokeExporting2(x,this.matrix.coordY.countItems,this.currentPassNumber,this.maximumPassNumber)),w.writeStartElement("table:table-row"),w.writeAttributeString("table:style-name",d.format("Table1.{0}",y[x-1]+1));for(var P=1;P0&&w.writeAttributeString("table:number-columns-spanned",d.format("{0}",L.width+1)),L.height>0&&w.writeAttributeString("table:number-rows-spanned",d.format("{0}",L.height+1)),w.writeAttributeString("office:value-type","string"),L.component.stimulsoft.is(s)&&!L.component.isExportAsImage(e.StiExportFormat.Odt)&&null!=L.text){var Q=L.text;0!=this.paragraphStyleList[K].stimulsoft.as(E).Angle&&(Q=Q.stimulsoft.replaceAll("\n"," "));for(var J=t.Report.Export.StiExportUtils.splitString(Q,!0),Z=0;Z1&&(this.imageQuality=1),this.imageResolution<10&&(this.imageResolution=10),this.imageResolution=this.imageResolution/100;try{this.imageCache=new e.StiImageCache(t["StiOptions"].Export.OpenDocumentWriter.allowImageComparer,!0,o.Jpeg,this.imageQuality,!1),this.cellStyleList=[],this.paragraphStyleList=[],this.currentPassNumber=0,this.maximumPassNumber=3+(t["StiOptions"].Export.OpenDocumentWriter.divideSegmentPages?1:0);var m=l.getSelectedPages(i.renderedPages);if(t["StiOptions"].Export.OpenDocumentWriter.divideSegmentPages&&(m=r.StiSegmentPagesDivider.divide(m,this),this.currentPassNumber++),this.isStopped)return;var c=new n;if(c.begin(a,!0),this._matrix=new r.StiMatrix(m,!0,this),this.currentPassNumber=2+(t["StiOptions"].Export.OpenDocumentWriter.divideSegmentPages?1:0),c.addFile("content.xml",this.writeContent()),c.addFile("mimetype",this.writeMimetype()),c.addFile("meta.xml",this.writeMeta()),c.addFile("META-INF/manifest.xml",this.writeManifest()),c.addFile("settings.xml",this.writeSettings()),c.addFile("styles.xml",this.writeStyles(m)),this.imageCache.imagePackedStore.stimulsoft.countItems>0)for(var p=0;p0)for(var r=0;r0)for(var r=0;r0)for(var i=0;i")}var c=0;while(c"!=l.charAt(p))d.append(l.charAt(p)),p++;if(d.append(">"),++p>l.length-1)break}p>l.length-1?d.append(String.fromCharCode(65535)):(d.append(l.charAt(p)),p++);var S=this.getEscapeNumber(this.escapeCodesList,d.toString());l.remove(c,p-c),l.insert(c,String.fromCharCode(this.firstEscapeCodeIndex-S))}c++}l.length!=o[a].length&&(o[a]=l.toString())}else for(var a=0;a1&&f--;var v=!1,E=t.component.stimulsoft.as(h);if(null!=E&&(v=E.textOptions.wordWrap),v){for(var b=o.stimulsoft.clone(),y=0;yf-1&&f>1){var A=g.create(Number,x.length),T=0,P=0;while(" "==x.charAt(P))A[P]=T,P++;for(var L=P;L0)if(A[a]!=A[a+1]){C=a++;while(" "==x.charAt(a))a++}else{while(" "!=x.charAt(a))a--;C=a++;while(" "==x.charAt(C))C--}else a++;b[y]=x.substring(0,C+1),b.stimulsoft.insert(y+1,x.substr(a,x.length-a))}}b.length>o.length&&(o=b)}if(n)for(var a=0;af&&(o[a]=o[a].substring(0,f));e.ref=o},b.prototype.checkGrow=function(t,e,r){while(t.length<=r)t.push([]),e.push(!1)},b.prototype.addCharsToLine=function(t,e,r,i){for(var n=0;n0)for(var r=0;r0)for(var r=0;r"),r.Bold&&!i.Bold&&n.append("<#/b>"),!r.Italic&&i.Italic&&n.append("<#i>"),r.Italic&&!i.Italic&&n.append("<#/i>"),!r.Underline&&i.Underline&&n.append("<#u>"),r.Underline&&!i.Underline&&n.append("<#/u>"),n},b.prototype.exportTxt=function(i,h,w){var f,v,b,y;if(e.StiLogService.write(this.stimulsoft.getType(),"Export report to Text format"),this.report=i,null==w)throw new Error("The 'settings' argument cannot be equal in null.");var x=w.pageRange,A=w.encoding,T=w.drawBorder,P=w.borderType,L=w.killSpaceLines,C=w.killSpaceGraphLines,F=w.putFeedPageCode,B=w.cutLongLines,k=w.zoomX,R=w.zoomY;this.useEscapeCodes=w.useEscapeCodes;var I=w.escapeCodesCollectionName;this.useFullTextBoxWidth=t["StiOptions"].Export.Text.useFullTextBoxWidth,this.useFullVerticalBorder=t["StiOptions"].Export.Text.useFullVerticalBorder,this.useFullHorizontalBorder=t["StiOptions"].Export.Text.useFullHorizontalBorder;var D=9.7,N=18;0==L&&(C=!1),0==T&&(C=!1),this.useFullVerticalBorder&&(this.useFullTextBoxWidth=!1);var O=new d,H=null!=A?new p(O,A):new p(O),M=x.getSelectedPages(i.renderedPages),W=0;this.styleList=[];var U=new E;this.getStyleNumber(this.styleList,U),this.escapeCodesList=[],this.currentPassNumber=0,this.maximumPassNumber=3;var X=new r.StiMatrix(M,!1,this);if(this.isStopped)return;this.needVerticalBorders=g.create(Boolean,X.coordX.countItems);for(var z=1;z0)for(var $=0;$0&&(Q[G-1][z-1]=et,this.useFullVerticalBorder&&this.needVerticalBorders[z-1+Z.width]&&Q[G-1][z-1]++)}}var rt=Z.text,it;if(null!=(it=Z.component.stimulsoft.as(m))&&null!=it.checkedValue){var nt=!1,ot=!1;it.checkedValue.stimulsoft.is(Boolean)&&(it.checkedValue?nt=!0:ot=!0),it.checkedValue.stimulsoft.is(String)&&("True"==it.checkedValue?nt=!0:ot=!0),nt&&(rt=t["StiOptions"].Export.Text.checkBoxTextForTrue),ot&&(rt=t["StiOptions"].Export.Text.checkBoxTextForFalse)}if(!Z.component.isExportAsImage(e.StiExportFormat.Text)&&!c.isNullOrEmpty(rt)){if(Z.component.stimulsoft.is(l)&&Z.component.stimulsoft.as(l).checkAllowHtmlTags()){var at=new s(""),st=a.parseHtmlToStates(rt,at),lt=new u;try{for(var mt=(f=void 0,__values(st)),ct=mt.next();!ct.done;ct=mt.next()){var pt=ct.value;lt.append(a.prepareStateText(pt.text))}}catch(t){f={error:t}}finally{try{ct&&!ct.done&&(v=mt.return)&&v.call(mt)}finally{if(f)throw f.error}}rt=lt.toString()}var gt,ht={ref:gt=r.StiExportUtils.splitString(rt.stimulsoft.replaceAll("\r",""),!1)};this.checkWordWrap(Z,ht,Q[G-1][z-1],B);var wt=(gt=ht.ref).length;J[G-1][z-1]=wt}}for(var ut=0;ut<=Z.height;ut++){for(var dt=0;dt<=Z.width;dt++)K[G-1+ut][z-1+dt]=!0;Q[G-1+ut][z-1]=Q[G-1][z-1]}}}var St=g.create(Number,X.coordY.countItems);W=1;for(var G=1;Gft&&(ft=J[G-1][z-1])}this.useFullHorizontalBorder&&this.needHorizontalBorders[G-1]&&ft++,St[G-1]=ft,W+=ft}W++;for(var vt=[],Et=[],bt=[],yt=0;yt1&&this.needHorizontalBorders[G-1-1]?1:0)]=!0);for(var Tt=T?1:0,z=1;z0)for(var $=0;$0&&(Nt=Math.trunc((Lt-gt.length)/2)),(Ot.vertAlignment&StiVertAlignment.Bottom)>0&&(Nt=Lt-gt.length));for(var yt=0;yt1&&Mt--;var Wt=Z.component.stimulsoft.as(n);null!=it&&(Wt=At),null!=Wt&&(Wt.horAlignment==S.Center&&(Ht=Math.trunc((Mt-gt[yt].length)/2)),Wt.horAlignment==S.Right&&(Ht=Mt-gt[yt].length));var Ut=Tt+Ht,Xt=xt+Nt+yt;Ut<0&&(Ut=0);var zt=Ut+gt[yt].length;this.checkGrow(vt,bt,Xt),vt[Xt].length1&&Mt--,this.lineFillChar(Et[xt+Yt],Bt,Tt,Mt)}if(T){for(var zt=Tt+Pt-1,$=-1;$<=Lt;$++)this.checkGrow(vt,bt,xt+$),vt[xt+$].length0&&32!=vt[yt][0]){Qt=!1;break}if(Qt)for(var yt=0;yt0&&vt[yt].stimulsoft.removeRange(0,1),Et[yt].length>0&&Et[yt].stimulsoft.removeRange(0,1)}if(!(t.Base.izjrG.dVOOk.TvUDM()||t.Base.izjrG.dVOOk.AWlWm()||(t.Base.izjrG.dVOOk.ekkVf()||t.Base.izjrG.dVOOk.yoidW()||t.Base.izjrG.dVOOk.ohwaJ())&&t.System.NodeJs.isStandaloneVersion)){var Jt=(X.coordX.getByIndex(X.coordX.countItems-1)-X.coordX.getByIndex(0))/(D/k),Zt=Math.max(1,Math.trunc(Jt/2-10));H.writeLine(c.fill(" ",Zt)+"---=== TRIAL ===---\r\n")}var $t=vt.length-1;while($t>0&&0==vt[$t].length)$t--;for(var te=0,yt=0;yt0){for(var $=0;$0){var ae=oe.length;if(t["StiOptions"].Export.Text.trimTrailingSpaces)while(ae>0&&32==oe[ae-1])ae--;for(var se="",le=0;le=65280&&(Gt-=65280),se+=String.fromCharCode(Gt)}t["StiOptions"].Export.Text.removeLastNewLineMarker&&yt==$t?H.write(se):H.writeLine(se)}}var me=new u;this.useEscapeCodes&&me.append(this.getEscapeNames(te,0)),F&&me.append("\f"),me.length>0&&H.write(me.toString()),H.flush(),this.useEscapeCodes,O.writeTo(h),O.close(),this.needVerticalBorders=null,this.needHorizontalBorders=null,this.styleList=null,this.escapeCodesList=null},b}(r.StiExportService);r.StiTxtExportService=v;var E=function(){function t(){}return t}()}(r=e.Export||(e.Export={}))}(e=t.Report||(t.Report={}))}(Stimulsoft||(Stimulsoft={}));; var Stimulsoft; (function (Stimulsoft) { var Reflection; (function (Reflection) { var StiTypesHelper = (function () { function StiTypesHelper() { } StiTypesHelper.run = function (type, namespace) { if (type === undefined) { StiTypesHelper.run(Stimulsoft, "Stimulsoft"); return; } namespace = namespace.stimulsoft.replaceAll("Stimulsoft.System", "System"); for (var name_1 in type) { if (typeof type[name_1] == "function") { type[name_1].ssTypeName = name_1; type[name_1].ssNamespace = namespace; } else if (typeof type[name_1] == "object") { StiTypesHelper.run(type[name_1], namespace + "." + name_1); } } }; return StiTypesHelper; }()); Reflection.StiTypesHelper = StiTypesHelper; })(Reflection = Stimulsoft.Reflection || (Stimulsoft.Reflection = {})); })(Stimulsoft || (Stimulsoft = {})); Stimulsoft.Reflection.StiTypesHelper.run(); if (typeof module === "object") { module.exports = Stimulsoft; } ;