var DriverVersion="6.0.1527.0",xsiNs="http://www.w3.org/2001/XMLSchema-instance",pskNs="http://schemas.microsoft.com/windows/2003/08/printing/printschemakeywords",psfNs="http://schemas.microsoft.com/windows/2003/08/printing/printschemaframework",kxPrivNs="http://schemas.kyocera.com/printers/KxDriver/v_1_0_",xsdNs="http://www.w3.org/2001/XMLSchema",xsiPrefix="xsi",pskPrefix="psk",psfPrefix="psf",kxPrivPrefix="ns0000",xsdPrefix="xsd",featuresEnum={PageOrder:0,Poster:1,NUp:2,Binding:3,Staple:4,Punch:5,
Negative:6,Mirror:7,Watermark:8,CarbonCopy:9,PrintMediaSize:10,PageOrientationReverse:11,CustomPaperList:12,SelectedPrintSize:13,Scaling:14,Fold:15,Separation:16,PrintGraysWithBlackToner:17,BlackText:18,BlackGraphics:19,ColorCorrection:20,ICMRenderingIntent:21,ColorAdjustment:22,EcoPrint:23,UserLogin:24,NetManager:25,JobStorage:26,Cover:27,PageInsert:28,Trapping:29,OutputColor:30,TransparencyInterleaving:31,SaveAndPrint:32,OutputOptimization:33,PatternScaling:34,ScreenMode:35,Profile:36,PrintQuality:37,
Resolution:38,JobName:39,SendTelemetry:40,UPDPrintSettings:41,GPDPrintSettings:42,MAX:42};function completePrintCapabilities(a,b,c){null!=b&&null!=c&&(a=c.XmlNode,setSelectionNamespace(a),b=a.selectSingleNode("//psf:PrintCapabilities"),null!=a&&null!=b&&(completePC_DriverVersion(a,b),completePC_UPDPrintSettings(a,b),completePC_SendTelemetry(a,b)))}
function convertPrintTicketToDevMode(a,b,c){if(null!=a&&null!=b&&null!=c){a=a.XmlNode;setSelectionNamespace(a);var d=a.selectSingleNode("//psf:PrintTicket"),e=null;try{e=b.UserProperties}catch(f){e=null}null!=a&&null!=d&&(b=new DevModeWriter(c),b.initialize(),convertPTToDevMode_UPDPrintSettings(a,d,b),convertPTToDevMode_SendTelemetry(a,d,b,e),b.finalize())}}
function convertDevModeToPrintTicket(a,b,c){if(null!=a&&null!=b&&null!=c){c=c.XmlNode;setSelectionNamespace(c);var d=c.selectSingleNode("//psf:PrintTicket"),e=null;try{e=b.UserProperties}catch(f){e=null}null!=c&&null!=d&&(a=new DevModeReader(a),a.initialize(),convertDevModeToPT_UPDPrintSettings(c,d,a),convertDevModeToPT_SendTelemetry(c,d,a,e),a.finalize())}}
function setSelectionNamespace(a){a.setProperty("SelectionNamespaces","xmlns:"+psfPrefix+"='"+psfNs+"' xmlns:"+kxPrivPrefix+"='"+kxPrivNs+"' xmlns:"+xsiPrefix+"='"+xsiNs+"' xmlns:"+xsdPrefix+"='"+xsdNs+"' xmlns:"+pskPrefix+"='"+pskNs+"'")}function addXsiPrefix(a){return xsiPrefix+":"+a}function addPsfPrefix(a){return psfPrefix+":"+a}function addPrivatePrefix(a){return kxPrivPrefix+":"+a}function addXsdPrefix(a){return xsdPrefix+":"+a}function addPskPrefix(a){return pskPrefix+":"+a}
function checkFeatureNode(a,b){var c=getFeatureFromPT(a,b);null!=c&&a.removeChild(c)}function checkParameterInitNode(a,b){var c=getParameterInitFromPT(a,b);null!=c&&a.removeChild(c)}function checkPropertyNode(a,b){var c=getPropertyFromPT(a,b);null!=c&&a.removeChild(c)}function getBoolFromPropertyBag(a,b){try{return a.GetBool(b)}catch(c){return null}}
function createFeatureNodePC(a,b,c,d){d=a.createNode("element","psf:Feature",psfNs);d.setAttribute("name",c);b.appendChild(d);createPropertyNodePC(a,d,"psf:SelectionType","psk:PickOne","xsd:QName");return d}function createOptionNodePC(a,b,c,d){if(null==b)return null;a=a.createNode("element","psf:Option",psfNs);null!=c&&a.setAttribute("name",c);null!=d&&a.setAttribute("constrained",d);b.appendChild(a);return a}
function createPropertyNodePC(a,b,c,d,e){var f=a.createNode("element","psf:Property",psfNs);f.setAttribute("name",c);b.appendChild(f);b=a.createNode("element","psf:Value",psfNs);b.text=d;a=a.createNode("attribute","xsi:type",xsiNs);a.value=e;b.attributes.setNamedItem(a);f.appendChild(b);return f}
function createScoredPropertyWithValueNodePC(a,b,c,d,e){if(null==b)return null;var f=a.createNode("element","psf:ScoredProperty",psfNs);f.setAttribute("name",c);b.appendChild(f);b=a.createNode("element","psf:Value",psfNs);b.text=d;a=a.createNode("attribute","xsi:type",xsiNs);a.value=e;b.attributes.setNamedItem(a);f.appendChild(b);return f}
function createScoredPropertyWithParameterRefPC(a,b,c,d){var e=a.createNode("element","psf:ScoredProperty",psfNs);e.setAttribute("name",c);b.appendChild(e);a=a.createNode("element","psf:ParameterRef",psfNs);a.setAttribute("name",d);e.appendChild(a);return e}
function createParameterDefIntNodePC(a,b,c,d,e,f,k,l){var g=a.createNode("element","psf:ParameterDef",psfNs);g.setAttribute("name",c);b.appendChild(g);createPropertyNodePC(a,g,"psf:DataType","xsd:integer","xsd:QName");createPropertyNodePC(a,g,"psf:DefaultValue",d,"xsd:integer");createPropertyNodePC(a,g,"psf:UnitType",k,l);createPropertyNodePC(a,g,"psf:MinValue",e,"xsd:integer");createPropertyNodePC(a,g,"psf:MaxValue",f,"xsd:integer");createPropertyNodePC(a,g,"psf:Multiple","1","xsd:integer");createPropertyNodePC(a,
g,"psf:Mandatory","psk:Conditional","xsd:QName");return g}
function createParameterDefIntNodeWithCustomeMultiplePC(a,b,c,d,e,f,k,l,g){var h=a.createNode("element","psf:ParameterDef",psfNs);h.setAttribute("name",c);b.appendChild(h);createPropertyNodePC(a,h,"psf:DataType","xsd:integer","xsd:QName");createPropertyNodePC(a,h,"psf:DefaultValue",d,"xsd:integer");createPropertyNodePC(a,h,"psf:UnitType",l,g);createPropertyNodePC(a,h,"psf:MinValue",e,"xsd:integer");createPropertyNodePC(a,h,"psf:MaxValue",f,"xsd:integer");createPropertyNodePC(a,h,"psf:Multiple",k,
"xsd:integer");createPropertyNodePC(a,h,"psf:Mandatory","psk:Conditional","xsd:QName");return h}
function createParameterDefDecimalNodePC(a,b,c,d,e,f,k,l,g){var h=a.createNode("element","psf:ParameterDef",psfNs);h.setAttribute("name",c);b.appendChild(h);createPropertyNodePC(a,h,"psf:DataType","xsd:decimal","xsd:QName");createPropertyNodePC(a,h,"psf:DefaultValue",d,"xsd:decimal");createPropertyNodePC(a,h,"psf:UnitType",l,g);createPropertyNodePC(a,h,"psf:MinValue",e,"xsd:decimal");createPropertyNodePC(a,h,"psf:MaxValue",f,"xsd:decimal");createPropertyNodePC(a,h,"psf:Multiple",k,"xsd:decimal");
createPropertyNodePC(a,h,"psf:Mandatory","psk:Conditional","xsd:QName");return h}
function createParameterDefStringNodePC(a,b,c,d,e,f,k,l){var g=a.createNode("element","psf:ParameterDef",psfNs);g.setAttribute("name",c);b.appendChild(g);createPropertyNodePC(a,g,"psf:DataType","xsd:string","xsd:QName");createPropertyNodePC(a,g,"psf:DefaultValue",d,"xsd:string");createPropertyNodePC(a,g,"psf:MinLength",e,"xsd:integer");createPropertyNodePC(a,g,"psf:MaxLength",f,"xsd:integer");createPropertyNodePC(a,g,"psf:Mandatory","psk:Conditional","xsd:QName");createPropertyNodePC(a,g,"psf:UnitType",
k,l);return g}
function createParameterDefStringNodePCWithOptional(a,b,c,d,e,f,k,l){var g=a.createNode("element","psf:ParameterDef",psfNs);g.setAttribute("name",c);b.appendChild(g);createPropertyNodePC(a,g,"psf:DataType","xsd:string","xsd:QName");createPropertyNodePC(a,g,"psf:DefaultValue",d,"xsd:string");createPropertyNodePC(a,g,"psf:MinLength",e,"xsd:integer");createPropertyNodePC(a,g,"psf:MaxLength",f,"xsd:integer");createPropertyNodePC(a,g,"psf:Mandatory","psk:Optional","xsd:QName");createPropertyNodePC(a,g,
"psf:UnitType",k,l);return g}function getFeatureFromPC(a,b){return a.selectSingleNode("psf:Feature[@name='"+b+"']")}function getOptionNodePC(a,b,c){return a.selectSingleNode("psf:Feature[@name='"+b+"']/psf:Option[@name='"+c+"']")}function getOptionListFromPC(a,b){return a.selectNodes("psf:Feature[@name='"+b+"']/psf:Option")}function createFeatureNodePT(a,b,c){a=a.createNode("element","psf:Feature",psfNs);a.setAttribute("name",c);b.appendChild(a);return a}
function createOptionNodePT(a,b,c){if(null==b)return null;a=a.createNode("element","psf:Option",psfNs);null!=c&&a.setAttribute("name",c);b.appendChild(a);return a}function createPropertyNodePT(a,b,c,d,e){var f=a.createNode("element","psf:Property",psfNs);f.setAttribute("name",c);b.appendChild(f);b=a.createNode("element","psf:Value",psfNs);b.text=d;a=a.createNode("attribute","xsi:type",xsiNs);a.value=e;b.attributes.setNamedItem(a);f.appendChild(b);return f}
function createParamterInitStringNodePT(a,b,c,d){var e=a.createNode("element","psf:ParameterInit",psfNs);e.setAttribute("name",c);b.appendChild(e);b=a.createNode("element","psf:Value",psfNs);b.text=d;a=a.createNode("attribute","xsi:type",xsiNs);a.value="xsd:string";b.attributes.setNamedItem(a);e.appendChild(b);return e}
function createParamterInitDecimalNodePT(a,b,c,d){var e=a.createNode("element","psf:ParameterInit",psfNs);e.setAttribute("name",c);b.appendChild(e);b=a.createNode("element","psf:Value",psfNs);b.text=d;a=a.createNode("attribute","xsi:type",xsiNs);a.value="xsd:decimal";b.attributes.setNamedItem(a);e.appendChild(b);return e}
function createParamterInitIntNodePT(a,b,c,d){var e=a.createNode("element","psf:ParameterInit",psfNs);e.setAttribute("name",c);b.appendChild(e);b=a.createNode("element","psf:Value",psfNs);b.text=d;a=a.createNode("attribute","xsi:type",xsiNs);a.value="xsd:integer";b.attributes.setNamedItem(a);e.appendChild(b);return e}function getFeatureFromPT(a,b){return a.selectSingleNode("psf:Feature[@name='"+b+"']")}
function getParameterInitFromPT(a,b){return a.selectSingleNode("psf:ParameterInit[@name='"+b+"']")}function getPropertyFromPT(a,b){return a.selectSingleNode("psf:Property[@name='"+b+"']")}function getOptionFromPT(a,b){var c=a.selectSingleNode("psf:Feature[@name='"+b+"']/psf:Option");return null!=c&&(c=c.attributes.getNamedItem("name"),null!=c)?c.value.split(":")[1]:null}
function getOptionScoredPropertyFromPT(a,b){var c=a.selectSingleNode("psf:Option/psf:ScoredProperty[@name='"+b+"']/psf:Value");return null!=c?c.text:null}function getParameterInitStringValuePT(a,b){var c=a.selectSingleNode("psf:ParameterInit[@name='"+b+"']/psf:Value[@xsi:type='xsd:string']");return null!=c?c.text:null}function getParameterInitIntValuePT(a,b){var c=a.selectSingleNode("psf:ParameterInit[@name='"+b+"']/psf:Value[@xsi:type='xsd:integer']");return null!=c?c.text:null}
function getParameterInitDecimalValuePT(a,b){var c=a.selectSingleNode("psf:ParameterInit[@name='"+b+"']/psf:Value[@xsi:type='xsd:decimal']");return null!=c?c.text:null}
function createScoredPropertyWithValueNodePT(a,b,c,d,e){if(null==b)return null;var f=a.createNode("element","psf:ScoredProperty",psfNs);f.setAttribute("name",c);b.appendChild(f);b=a.createNode("element","psf:Value",psfNs);b.text=d;a=a.createNode("attribute","xsi:type",xsiNs);a.value=e;b.attributes.setNamedItem(a);f.appendChild(b);return f}
function createScoredPropertyWithParameterRefPT(a,b,c,d){var e=a.createNode("element","psf:ScoredProperty",psfNs);e.setAttribute("name",c);b.appendChild(e);a=a.createNode("element","psf:ParameterRef",psfNs);a.setAttribute("name",d);e.appendChild(a);return e}function getNamedOptionScoredPropertyFromPT(a,b,c){a=a.selectSingleNode("psf:Feature[@name='"+b+"']/psf:Option").selectSingleNode("psf:ScoredProperty[@name='"+c+"']/psf:Value");return null!=a?a.text:null}
function getPropertyStringValuePT(a,b){var c=a.selectSingleNode("psf:Property[@name='"+b+"']/psf:Value[@xsi:type='xsd:string']");return null!=c?c.text:null}var enumOffOn=["Off","On"];function completePC_DriverVersion(a,b){createPropertyNodePC(a,b,addPrivatePrefix("JobDriverVersion"),DriverVersion,"xsd:string")}
function completePC_UPDPrintSettings(a,b){var c=createFeatureNodePC(a,b,addPrivatePrefix("PageUPD"),"UPD"),c=createOptionNodePC(a,c,addPrivatePrefix("UPD"),addPskPrefix("None"));createScoredPropertyWithParameterRefPC(a,c,addPrivatePrefix("PrintSettings"),addPrivatePrefix("PageUPDPrintSettings"));createParameterDefStringNodePC(a,b,addPrivatePrefix("PageUPDPrintSettings"),"",0,10240,"characters","xsd:string")}
function convertPTToDevMode_UPDPrintSettings(a,b,c){a=getOptionFromPT(b,addPrivatePrefix("PageUPD"));b=getParameterInitStringValuePT(b,addPrivatePrefix("PageUPDPrintSettings"));if(null!=a&&null!=b){var d=base64StringToArray(b);null!=d&&c.privateFeatureWriter.write(featuresEnum.UPDPrintSettings,d.length+1,function(a){a.length==d.length+1&&(a[0]=d.length,binCopy(d,a,1,d.length))})}}
function convertDevModeToPT_UPDPrintSettings(a,b,c){checkFeatureNode(b,addPrivatePrefix("PageUPD"));checkParameterInitNode(b,addPrivatePrefix("PageUPDPrintSettings"));c=c.privateFeatureReader.read(featuresEnum.UPDPrintSettings,function(a){return 0<a.length?{printSettings:arraySectionToBase64String(a,1,a[0])}:null},function(){return{printSettings:""}});var d=createFeatureNodePT(a,b,addPrivatePrefix("PageUPD")),d=createOptionNodePT(a,d,addPrivatePrefix("UPD"));createScoredPropertyWithParameterRefPC(a,
d,addPrivatePrefix("PrintSettings"),addPrivatePrefix("PageUPDPrintSettings"));createParamterInitStringNodePT(a,b,addPrivatePrefix("PageUPDPrintSettings"),c.printSettings)}function completePC_SendTelemetry(a,b){var c=createFeatureNodePC(a,b,addPrivatePrefix("JobSendTelemetry"),"Send Telemetry");createOptionNodePC(a,c,addPskPrefix("Off"),addPskPrefix("None"));createOptionNodePC(a,c,addPskPrefix("On"),addPskPrefix("None"))}
function convertPTToDevMode_SendTelemetry(a,b,c,d){var e=null;null!=d&&(e=getBoolFromPropertyBag(d,"SendTelemetry"));null!=e&&c.privateFeatureWriter.write(featuresEnum.SendTelemetry,1,function(a){1==a.length&&(a[0]=0,1==e&&(a[0]=1))})}
function convertDevModeToPT_SendTelemetry(a,b,c,d){checkFeatureNode(b,addPrivatePrefix("JobSendTelemetry"));var e=null;null!=d?(e=getBoolFromPropertyBag(d,"SendTelemetry"),null!=e&&(1==e?e=enumOffOn[1]:0==e&&(e=enumOffOn[0]))):e=c.privateFeatureReader.read(featuresEnum.SendTelemetry,function(a){return 1==a.length?enumOffOn[a[0]<enumOffOn.length?a[0]:0]:null},function(){return null});null!=e&&(b=createFeatureNodePT(a,b,addPrivatePrefix("JobSendTelemetry")),createOptionNodePT(a,b,addPskPrefix(e)))}
function asciiStringToBin(a,b,c,d){for(var e=0;c<b.length&&e<a.length&&e<d;c++,e+=2)b[c]=e+1<a.length&&e+1<d?a.charCodeAt(e)|a.charCodeAt(e+1)<<8:a.charCodeAt(e)}function asciiBinToString(a,b,c){for(var d="",e=0,f=b;e<c;e+=2,f++)b=String.fromCharCode(a[f]&127),d+=b,e+1<c&&(b=String.fromCharCode(a[f]>>8&127),d+=b);return d}function binCopy(a,b,c,d){if(a.length<=b.length-c)for(var e=0;e<a.length&&e<d;e++)b[c+e]=a[e]}
function stringToBin(a,b,c,d){if(a.length<=b.length-c)for(var e=0;e<a.length&&e<d;e++)b[c+e]=a.charCodeAt(e)}function binToString(a,b,c){for(var d="",e=0;e<c&&0!=a[b];e++,b++)a[b]&55296?55296==(a[b]&55296)&&e+1<c&&56320==(a[b+1]&56320)&&(d+=String.fromCharCode(a[b],a[b+1])):d+=String.fromCharCode(a[b]);return d}function hexStringToArray(a){for(var b=a.length/4,c=[],d=0;d<b;d++)c[d]=parseInt(a.substr(4*d+2,2)+a.substr(4*d,2),16);return c}
function arrayToHexString(a){for(var b="",c,d=0;d<a.length;d++)c=(a[d]&65535).toString(16),b=1==c.length?b+("0"+c+"00"):2==c.length?b+(c+"00"):3==c.length?b+(c.substr(1,2)+"0"+c.substr(0,1)):4==c.length?b+(c.substr(2,2)+c.substr(0,2)):b+"0000";return b}
function base64StringToArray(a){if(0==(a.length&3)){for(var b=a.length>>2,c=[],d=0,e=0;e<b;e++){var f=getBase64Data(a.charAt(4*e)),k=getBase64Data(a.charAt(4*e+1)),l=getBase64Data(a.charAt(4*e+2)),g=getBase64Data(a.charAt(4*e+3));0==(e&1)?(null!=f&&null!=k&&null!=l&&(c[3*(e>>1)]=f<<2|k>>4|(k&15)<<12|(l&60)<<6),null!=l&&null!=g&&(d=(l&3)<<6|g)):(null!=f&&null!=k&&(c[3*(e>>1)+1]=d|f<<10|(k&48)<<4),null!=k&&null!=l&&null!=g&&(c[3*(e>>1)+2]=(k&15)<<4|(l&60)>>2|(l&3)<<14|g<<8));if(null==f||null==k||null==
l&&null!=g)return null}return c}return null}function getBase64Data(a){if("+"==a)return 62;if("/"==a)return 63;if("="!=a){a=a.charCodeAt(0);if(65<=a&&90>=a)return a-65;if(97<=a&&122>=a)return a-71;if(48<=a&&57>=a)return a+4}return null}
function arraySectionToBase64String(a,b,c){for(var d="",e=0;b<a.length&&e<c;b+=3,e+=3)b+2<a.length&&e+2<c?(d+=getBase64Char((a[b]&252)>>2&63),d+=getBase64Char(((a[b]&3)<<4|(a[b]&61440)>>12)&63),d+=getBase64Char(((a[b]&3840)>>6|(a[b+1]&192)>>6)&63),d+=getBase64Char(a[b+1]&63),d+=getBase64Char((a[b+1]&64512)>>10&63),d+=getBase64Char(((a[b+1]&768)>>4|(a[b+2]&240)>>4)&63),d+=getBase64Char(((a[b+2]&15)<<2|(a[b+2]&49152)>>14)&63),d+=getBase64Char((a[b+2]&16128)>>8&63)):(b+1<a.length&&e+1<c?(d+=getBase64Char((a[b]&
252)>>2&63),d+=getBase64Char(((a[b]&3)<<4|(a[b]&61440)>>12)&63),d+=getBase64Char(((a[b]&3840)>>6|(a[b+1]&192)>>6)&63),d+=getBase64Char(a[b+1]&63),d+=getBase64Char((a[b+1]&64512)>>10&63),d+=getBase64Char((a[b+1]&768)>>4&63),d+="="):(d+=getBase64Char((a[b]&252)>>2&63),d+=getBase64Char(((a[b]&3)<<4|(a[b]&61440)>>12)&63),d+=getBase64Char((a[b]&3840)>>6&63)),d+="=");return d}
function arrayToBase64String(a){for(var b="",c=0;c<a.length;c+=3)c+2<a.length?(b+=getBase64Char((a[c]&252)>>2&63),b+=getBase64Char(((a[c]&3)<<4|(a[c]&61440)>>12)&63),b+=getBase64Char(((a[c]&3840)>>6|(a[c+1]&192)>>6)&63),b+=getBase64Char(a[c+1]&63),b+=getBase64Char((a[c+1]&64512)>>10&63),b+=getBase64Char(((a[c+1]&768)>>4|(a[c+2]&240)>>4)&63),b+=getBase64Char(((a[c+2]&15)<<2|(a[c+2]&49152)>>14)&63),b+=getBase64Char((a[c+2]&16128)>>8&63)):(c+1<a.length?(b+=getBase64Char((a[c]&252)>>2&63),b+=getBase64Char(((a[c]&
3)<<4|(a[c]&61440)>>12)&63),b+=getBase64Char(((a[c]&3840)>>6|(a[c+1]&192)>>6)&63),b+=getBase64Char(a[c+1]&63),b+=getBase64Char((a[c+1]&64512)>>10&63),b+=getBase64Char((a[c+1]&768)>>4&63),b+="="):(b+=getBase64Char((a[c]&252)>>2&63),b+=getBase64Char(((a[c]&3)<<4|(a[c]&61440)>>12)&63),b+=getBase64Char((a[c]&3840)>>6&63)),b+="=");return b}
function getBase64Char(a){return 0<=a&&25>=a?String.fromCharCode(a+65):26<=a&&51>=a?String.fromCharCode(a+71):52<=a&&61>=a?String.fromCharCode(a-4):62==a?"+":63==a?"/":"="}function DevModeReader(a){this._devModeProperties=a;this._devModeDataForPublicPT;this._devModeDataForPrivatePT;this.publicFeatureReader;this.privateFeatureReader}
DevModeReader.prototype.initialize=function(){this.publicFeatureReader=new DevModeDataReaderV0001(null);this.privateFeatureReader=new DevModeDataReaderV0001(null);try{var a=this._devModeProperties.GetString("PublicSettings"),b=this._devModeProperties.GetString("PrivateSettings");if(null!=a&&null!=b&&(this._devModeDataForPublicPT=base64StringToArray(a),this._devModeDataForPrivatePT=base64StringToArray(b),null!=this._devModeDataForPublicPT&&null!=this._devModeDataForPrivatePT&&2<this._devModeDataForPublicPT.length&&
2<this._devModeDataForPrivatePT.length&&3072>=this._devModeDataForPublicPT.length&&7680>=this._devModeDataForPrivatePT.length&&19780==this._devModeDataForPublicPT[0]&&19780==this._devModeDataForPrivatePT[0])){if(1==this._devModeDataForPublicPT[1])this.publicFeatureReader=new DevModeDataReaderV0001(this._devModeDataForPublicPT);else return!1;if(1==this._devModeDataForPrivatePT[1])this.privateFeatureReader=new DevModeDataReaderV0001(this._devModeDataForPrivatePT);else return!1;return!0}}catch(c){}return!1};
DevModeReader.prototype.finalize=function(){return!0};
function DevModeDataReaderV0001(a){this._devModeData=a;this.featureList=[];if(null!=this._devModeData&&10<this._devModeData.length&&(a=this._devModeData[2],this._devModeData.length>a+2&&65535==this._devModeData[a])){var b=this._devModeData[a+2];if(b<=featuresEnum.MAX&&this._devModeData.length==a+3+2*b){for(var c=0;c<b;c++)this.featureList[c]={feature:this._devModeData[a+3+2*c],index:this._devModeData[a+3+2*c+1]};c=getHash(this._devModeData,11);if(null==c||8!=c.length||this._devModeData[3]!=c[0]||
this._devModeData[4]!=c[1]||this._devModeData[5]!=c[2]||this._devModeData[6]!=c[3]||this._devModeData[7]!=c[4]||this._devModeData[8]!=c[5]||this._devModeData[9]!=c[6]||this._devModeData[10]!=c[7])this.featureList=[];if(null!=this.featureList&&0<this.featureList.length)for(var d=-1,c=0;c<b;c++)if(this.featureList[c].feature<=d||this.featureList[c].feature>featuresEnum.MAX||this.featureList[c].index>=a){this.featureList=[];break}else d=this.featureList[c].feature}}}
DevModeDataReaderV0001.prototype._findFeature=function(a){try{var b=0,c=this.featureList.length-1;if(0<=c){do{var d=c+b>>1;if(this.featureList[d].feature<a)if(1<c-d)b=d;else{if(this.featureList[c].feature==a)return this.featureList[c].index;break}else if(this.featureList[d].feature>a)c=d;else if(this.featureList[d].feature==a)return this.featureList[d].index}while(b<c)}}catch(e){}return null};
DevModeDataReaderV0001.prototype.read=function(a,b,c){var d=this._findFeature(a),e=null;try{if(null!=d&&0<d&&this._devModeData.length>d+1&&a==this._devModeData[d]&&2<this._devModeData[d+1]&&this._devModeData.length>d+this._devModeData[d+1]-1){var f=Array(this._devModeData[d+1]-2);for(a=0;a<f.length;a++)f[a]=this._devModeData[d+2+a];null!=b&&(e=b(f))}}catch(k){}null==e&&null!=c&&(e=c());return e};
function DevModeWriter(a){this._devModeProperties=a;this._devModeDataForPublicPT=[];this._devModeDataForPrivatePT=[];this.publicFeatureWriter=new DevModeDataWriterV0001(this._devModeDataForPublicPT);this.privateFeatureWriter=new DevModeDataWriterV0001(this._devModeDataForPrivatePT)}DevModeWriter.prototype.initialize=function(){return!0};
DevModeWriter.prototype.finalize=function(){try{return this.publicFeatureWriter.finalize(),this.privateFeatureWriter.finalize(),3072>=this._devModeDataForPublicPT.length&&this._devModeProperties.SetString("PublicSettings",arrayToBase64String(this._devModeDataForPublicPT)),7680>=this._devModeDataForPrivatePT.length&&this._devModeProperties.SetString("PrivateSettings",arrayToBase64String(this._devModeDataForPrivatePT)),!0}catch(a){}return!1};
function DevModeDataWriterV0001(a){this._devModeData=a;this._nextIndex=11;this._featureSortedLinkedList=null;this._devModeData[0]=19780;this._devModeData[1]=1}
DevModeDataWriterV0001.prototype._insertFeatureToLinkedList=function(a,b){if(null==this._featureSortedLinkedList)this._featureSortedLinkedList={feature:a,index:b,next:null};else if(this._featureSortedLinkedList.feature>a)this._featureSortedLinkedList={feature:a,index:b,next:this._featureSortedLinkedList};else for(var c=this._featureSortedLinkedList;null!=c&&c.feature<a;){if(null==c.next||c.next.feature>a){c.next={feature:a,index:b,next:c.next};break}else if(c.next.feature==a){c.next.index=b;break}c=
c.next}};DevModeDataWriterV0001.prototype.write=function(a,b,c){try{if(0<=this._nextIndex){var d=Array(b);null!=c&&c(d);if(d.length==b){this._devModeData[this._nextIndex]=a;this._devModeData[this._nextIndex+1]=b+2;for(c=0;c<d.length;c++)this._devModeData[this._nextIndex+2+c]=d[c];this._insertFeatureToLinkedList(a,this._nextIndex);this._nextIndex+=b+2;return!0}}}catch(e){}return!1};
DevModeDataWriterV0001.prototype.finalize=function(){this._devModeData[2]=this._nextIndex;this._devModeData[this._nextIndex]=65535;for(var a=this._featureSortedLinkedList,b=0,c=this._nextIndex+3;null!=a;c+=2,b++)this._devModeData[c]=a.feature,this._devModeData[c+1]=a.index,a=a.next;this._devModeData[this._nextIndex+1]=2*b+3;this._devModeData[this._nextIndex+2]=b;a=getHash(this._devModeData,11);null!=a&&8==a.length&&(this._devModeData[3]=a[0],this._devModeData[4]=a[1],this._devModeData[5]=a[2],this._devModeData[6]=
a[3],this._devModeData[7]=a[4],this._devModeData[8]=a[5],this._devModeData[9]=a[6],this._devModeData[10]=a[7]);return!0};function getHash(a,b){for(var c=[0,0,0,0,0,0,0,0],d=b,e=0;d<a.length;d++,e++)c[e&7]^=a[d];return c};
