// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See http://@sbaseurl@/jsapi/jsapi/esri/copyright.txt and http://www.arcgis.com/apps/webappbuilder/copyright.txt for details.

//>>built
require({cache:{"widgets/Print/Print":function(){define("dojo/_base/declare dijit/_WidgetBase dijit/_TemplatedMixin dijit/_WidgetsInTemplateMixin esri/tasks/PrintTask esri/tasks/PrintParameters esri/tasks/PrintTemplate esri/request esri/lang esri/arcgis/utils esri/SpatialReference dojo/_base/config dojo/_base/lang dojo/_base/array dojo/_base/html dojo/dom-style dojo/dom-construct dojo/dom-class dojo/promise/all dojo/Deferred jimu/portalUrlUtils dojo/text!./templates/Print.html dojo/text!./templates/PrintResult.html dojo/aspect dojo/query jimu/LayerInfos/LayerInfos jimu/dijit/LoadingIndicator jimu/dijit/Message jimu/utils jimu/SpatialReference/srUtils dojo/on dijit/popup dijit/form/ValidationTextBox dijit/form/Form dijit/form/Select dijit/form/NumberTextBox dijit/form/Button dijit/form/CheckBox dijit/ProgressBar dijit/form/DropDownButton dijit/TooltipDialog dijit/form/RadioButton dijit/form/SimpleTextarea esri/IdentityManager dojo/store/Memory".split(" "),
function(u,B,C,I,J,v,q,n,h,f,x,m,d,y,k,K,N,L,U,Q,W,V,Y,M,g,w,H,E,D,G,e,z,A){V=u([B,C,I],{widgetsInTemplate:!0,templateString:V,map:null,count:1,results:[],authorText:null,copyrightText:null,copyrightEditable:!0,defaultTitle:null,defaultFormat:null,defaultLayout:null,baseClass:"gis_PrintDijit",pdfIcon:require.toUrl("./widgets/Print/images/pdf.png"),imageIcon:require.toUrl("./widgets/Print/images/image.png"),printTaskURL:null,printTask:null,async:!1,_showSettings:!1,_currentTemplateInfo:null,postCreate:function(){this.inherited(arguments);
this.printTask=new J(this.printTaskURL,{async:this.async});this.printparams=new v;this.printparams.map=this.map;this.shelter=new H({hidden:!0});this.shelter.placeAt(this.domNode);this.shelter.startup();this.shelter.show();this.titleNode.set("value",this.defaultTitle);this.authorNode.set("value",this.defaultAuthor);this.copyrightNode.set("value",this.defaultCopyright);this.copyrightNode.set("readOnly",!this.copyrightEditable);G.loadResource().then(d.hitch(this,function(){if(G.isValidWkid(this.map.spatialReference.wkid)){this.wkidInput.set("value",
this.map.spatialReference.wkid);var l=G.getSRLabel(this.map.spatialReference.wkid);this.wkidLabel.innerHTML=D.sanitizeHTML(l);this.wkidLabel.title=l}else this.wkidInput.set("value",""),this.wkidLabel.innerHTML="",this.wkidLabel.title="";this.wkidInput.set("invalidMessage",this.nls.invalidWkid);this.wkidInput.validator=function(r){return!r||""===r.trim()||G.isValidWkid(+r)}}));var a=W.setHttpProtocol(this.printTaskURL),b=W.getNewPrintUrl(this.appConfig.portalUrl);this._isNewPrintUrl=a===b||/sharing\/tools\/newPrint$/.test(a);
a=g("input",this.printWidgetMapScale.domNode)[0];b=g("input",this.printWidgetMapExtent.domNode)[0];D.combineRadioCheckBoxWithLabel(a,this.printWidgetMapScaleLabel);D.combineRadioCheckBoxWithLabel(b,this.printWidgetMapExtentLabel);"MAP_ONLY"===this.defaultLayout?k.setStyle(this.titleTr,"display","none"):k.setStyle(this.titleTr,"display","");this._hasLabelLayer()?(k.setStyle(this.labelsFormDijit.domNode,"display",""),k.setStyle(this.labelsTitleNode,"display","")):(k.setStyle(this.labelsFormDijit.domNode,
"display","none"),k.setStyle(this.labelsTitleNode,"display","none"));w.getInstance(this.map,this.map.itemInfo).then(d.hitch(this,function(l){this.layerInfosObj=l;return U([this._getPrintTaskInfo(),this._getLayerTemplatesInfo()]).then(d.hitch(this,function(r){var t=r[0];(r=r[1])&&!r.error?(r=r&&r.results)&&0<r.length&&(y.some(r,d.hitch(this,function(F){return F&&"Output_JSON"===F.paramName?this.templateInfos=F.value:!1})),this.templateInfos&&0<this.templateInfos.length&&(this.templateNames=y.map(this.templateInfos,
function(F){return F.layoutTemplate}))):console.warn("Get Layout Templates Info Error",r&&r.error);!h.isDefined(t)||t&&t.error?this._handleError(t.error):this._handlePrintInfo(t)}))})).always(d.hitch(this,function(){this.shelter.hide()}));this.printTask._getPrintDefinition&&M.after(this.printTask,"_getPrintDefinition",d.hitch(this,"printDefInspector"),!1);this.printTask._createOperationalLayers&&(M.after(this.printTask,"_createOperationalLayers",d.hitch(this,"_fixInvalidSymbol")),M.after(this.printTask,
"_createOperationalLayers",d.hitch(this,"_excludeInvalidLegend")))},_onOutputSRChange:function(a){G.isValidWkid(+a)?(a=G.getSRLabel(+a),this.wkidLabel.innerHTML=D.sanitizeHTML(a),this.wkidLabel.title=a):(this.wkidLabel.innerHTML="",this.wkidLabel.title="")},_hasLabelLayer:function(){return y.some(this.map.graphicsLayerIds,function(a){return(a=this.map.getLayer(a))&&"esri.layers.LabelLayer"===a.declaredClass},this)},_getPrintTaskInfo:function(){var a=new Q;this._isNewPrintUrl?a.resolve({isGPPrint:!1}):
n({url:this.printTaskURL,content:{f:"json"},callbackParamName:"callback",handleAs:"json",timeout:6E4}).then(d.hitch(this,function(b){a.resolve({isGPPrint:!0,data:b})}),d.hitch(this,function(b){a.resolve({error:b})}));return a},_getLayerTemplatesInfo:function(){var a=new Q,b=this.printTaskURL.split("/"),l=b.indexOf("GPServer");if(-1<l){var r=null;r=/Utilities\/PrintingTools\/GPServer/.test(this.printTaskURL)?b.slice(0,l+1).join("/")+"/"+encodeURIComponent("Get Layout Templates Info Task")+"/execute":
b.slice(0,l+1).join("/")+"/"+encodeURIComponent("Get Layout Templates Info")+"/execute";n({url:r,content:{f:"json"},callbackParamName:"callback",handleAs:"json",timeout:6E4}).then(d.hitch(this,function(t){a.resolve(t)}),d.hitch(this,function(t){a.resolve({error:t})}))}else a.resolve(null);return a},_fixInvalidSymbol:function(a){y.forEach(a,function(b){"map_graphics"===b.id&&(b=d.getObject("featureCollection.layers",!1,b))&&0<b.length&&y.forEach(b,function(l){l&&l.featureSet&&"esriGeometryPoint"===
l.featureSet.geometryType&&y.forEach(l.featureSet.features,function(r){r&&r.symbol&&!r.symbol.style&&(r.symbol.style="esriSMSSquare")})})},this);return a},_excludeInvalidLegend:function(a){function b(T){return y.filter(T.subLayerIds,d.hitch(this,function(X){return(X=this.layerInfosObj.getLayerInfoById(T.id+"_"+X))&&X.getShowLegendOfWebmap()}))}if(this.printTask.allLayerslegend){var l=f.getLegendLayers({map:this.map,itemInfo:this.map.itemInfo});l=y.map(l,function(T){return{id:T.layer.id}});for(var r=
this.printTask.allLayerslegend,t=[],F=0;F<r.length;F++){var P=r[F],O=this.map.getLayer(P.id),R=this.layerInfosObj.getLayerInfoById(P.id),S=O&&O.declaredClass&&"esri.layers.GraphicsLayer"!==O.declaredClass;O=!O.renderer||O.renderer&&!O.renderer.hasVisualVariables();R=R&&R.getShowLegendOfWebmap();S&&O&&R&&(P.subLayerIds&&(P.subLayerIds=d.hitch(this,b,P)()),t.push(P))}y.forEach(l,d.hitch(this,function(T){var X=y.some(t,d.hitch(this,function(aa){return aa.id===T.id})),Z=this.layerInfosObj.getLayerInfoById(T.id);
Z=Z&&Z.getShowLegendOfWebmap()&&Z.isShowInMap();!X&&Z&&t.push(T)}));this.printTask.allLayerslegend=t}return a},printDefInspector:function(a){"force"===this.preserve.preserveScale&&(a.mapOptions.scale=this.preserve.forcedScale);return a},_handleError:function(a){console.log("print widget load error: ",a);new E({message:a.message||a})},onLayoutChange:function(a){var b=this.templateNames&&this.templateNames.indexOf(a);if(-1<b){k.empty(this.customTextElementsTable);a=this._currentTemplateInfo=this.templateInfos[b];
if((b=d.getObject("layoutOptions.customTextElements",!1,a))&&0<b.length){var l=[];y.forEach(b,d.hitch(this,function(r){for(var t in r)if(0>l.indexOf(t)){var F=this.customTextElementsTable.insertRow(-1);F.insertCell(-1).appendChild(k.toDom(t+": "));F.insertCell(-1).appendChild((new A({name:t,trim:!0,required:!1,value:r[t],style:"width:100%"})).domNode);l.push(t)}}))}d.getObject("layoutOptions.hasAuthorText",!1,a)?k.setStyle(this.authorTr,"display",""):k.setStyle(this.authorTr,"display","none");d.getObject("layoutOptions.hasCopyrightText",
!1,a)?k.setStyle(this.copyrightTr,"display",""):k.setStyle(this.copyrightTr,"display","none");d.getObject("layoutOptions.hasTitleText",!1,a)?k.setStyle(this.titleTr,"display",""):k.setStyle(this.titleTr,"display","none");d.getObject("layoutOptions.hasLegend",!1,a)?k.setStyle(this.legendTr,"display",""):k.setStyle(this.legendTr,"display","none")}else"MAP_ONLY"===a?(k.setStyle(this.authorTr,"display","none"),k.setStyle(this.copyrightTr,"display","none"),k.setStyle(this.titleTr,"display","none"),k.setStyle(this.legendTr,
"display","none"),this._currentTemplateInfo={layoutOptions:{hasTitleText:!1,hasCopyrightText:!1,hasAuthorText:!1,hasLegend:!1}}):(k.setStyle(this.authorTr,"display",""),k.setStyle(this.copyrightTr,"display",""),k.setStyle(this.titleTr,"display",""),k.setStyle(this.legendTr,"display",""),this._currentTemplateInfo={layoutOptions:{hasTitleText:!0,hasCopyrightText:!0,hasAuthorText:!0,hasLegend:!0}})},_getMapAttribution:function(){var a=this.map.attribution;return a&&a.domNode?k.getProp(a.domNode,"textContent"):
""},closeSettings:function(){z.close(this.settingsDialog);this._showSettings=!1},showSettings:function(a){a.preventDefault();a.stopPropagation();this._showSettings?(z.close(this.settingsDialog),this._showSettings=!1):(z.open({popup:this.settingsDialog,around:this.advancedButtonDijit}),this._showSettings=!0)},_handlePrintInfo:function(a){if(a.isGPPrint){a=a.data;K.set(this.layoutDijit.domNode.parentNode.parentNode,"display","");K.set(this.formatDijit.domNode.parentNode.parentNode,"display","");K.set(this.advancedButtonDijit,
"display","");this.own(e(document.body,"click",d.hitch(this,function(r){if(this._showSettings){r=r.target||r.srcElement;var t=this.settingsDialog.domNode;r===t||k.isDescendant(r,t)||(z.close(this.settingsDialog),this._showSettings=!1)}})));var b=y.filter(a.parameters,function(r){return"Layout_Template"===r.name});if(0===b.length)console.log('print service parameters name for templates must be "Layout_Template"');else{var l=y.map(b[0].choiceList,function(r){return{label:r,value:r}});l.sort(function(r,
t){return r.label>t.label?1:t.label>r.label?-1:0});0<l.length?(this.layoutDijit.addOption(l),this.defaultLayout?this.layoutDijit.set("value",this.defaultLayout):this.layoutDijit.set("value",b[0].defaultValue)):this.defaultLayout&&(this.layoutDijit.addOption([{label:this.defaultLayout,value:this.defaultLayout}]),this.layoutDijit.set("value",this.defaultLayout));a=y.filter(a.parameters,function(r){return"Format"===r.name});0===a.length?console.log('print service parameters name for format must be "Format"'):
(b=y.map(a[0].choiceList,function(r){return{label:r,value:r}}),b.sort(function(r,t){return r.label>t.label?1:t.label>r.label?-1:0}),0<b.length?(this.formatDijit.addOption(b),this.defaultFormat?this.formatDijit.set("value",this.defaultFormat):this.formatDijit.set("value",a[0].defaultValue)):this.defaultFormat&&(this.formatDijit.addOption([{label:this.defaultFormat,value:this.defaultFormat}]),this.formatDijit.set("value",this.defaultFormat)))}}else K.set(this.layoutDijit.domNode.parentNode.parentNode,
"display","none"),K.set(this.formatDijit.domNode.parentNode.parentNode,"display","none"),K.set(this.advancedButtonDijit,"display","none")},print:function(){if(this.printSettingsFormDijit.isValid()){var a=this.printSettingsFormDijit.get("value");d.mixin(a,this.layoutMetadataDijit.get("value"));d.mixin(a,this.forceAttributesFormDijit.get("value"));d.mixin(a,this.labelsFormDijit.get("value"));this.preserve=this.preserveFormDijit.get("value");d.mixin(a,this.preserve);this.layoutForm=this.layoutFormDijit.get("value");
var b=this.mapQualityFormDijit.get("value"),l=this.mapOnlyFormDijit.get("value");d.mixin(l,b);var r=this.customTextElementsDijit.get("value");b=[];var t=!1,F=m.locale||"en";for(O in r){var P={};"Date"===O&&(t=!0);P[O]=r[O];b.push(P)}t||b.push({Date:(new Date).toLocaleString(F)});t=this._currentTemplateInfo;var O=d.getObject("layoutOptions.hasAuthorText",!1,t);r=d.getObject("layoutOptions.hasCopyrightText",!1,t);t=d.getObject("layoutOptions.hasTitleText",!1,t);F=new q;F.format=a.format;F.layout=a.layout;
F.preserveScale="true"===a.preserveScale||"force"===a.preserveScale;"force"===a.preserveScale&&(F.outScale=0<this.preserve.forcedScale?this.preserve.forcedScale:this.map.getScale());F.forceFeatureAttributes=a.forceFeatureAttributes&&a.forceFeatureAttributes[0];F.label=a.title;F.exportOptions=l;F.showLabels=a.showLabels&&a.showLabels[0];F.layoutOptions={authorText:O?a.author:"",copyrightText:r?a.copyright||this._getMapAttribution():"",legendLayers:this._getLegendLayers(),titleText:t?a.title:"",customTextElements:b,
scalebarUnit:this.layoutForm.scalebarUnit};this.printparams.template=F;this.printparams.extraParameters={printFlag:!0};this.printparams.outSpatialReference=void 0;l=+this.wkidInput.get("value");G.isValidWkid(l)&&l!==this.map.spatialReference.wkid&&(this.printparams.outSpatialReference=new x(l));l=this.printTask.execute(this.printparams);(new c({count:this.count.toString(),icon:"PDF"===a.format?this.pdfIcon:this.imageIcon,docName:a.title,title:a.title+", "+a.format+", "+a.layout,fileHandle:l,nls:this.nls})).placeAt(this.printResultsNode,
"last").startup();K.set(this.clearActionBarNode,"display","block");this.count++}else this.printSettingsFormDijit.validate()},_getLegendLayers:function(){var a=d.getObject("layoutOptions.hasLegend",!1,this._currentTemplateInfo),b=0<this.layoutForm.legend.length&&this.layoutForm.legend[0];if(this.printTask&&!this.printTask._createOperationalLayers){var l=[];a&&b&&(a=f.getLegendLayers({map:this.map,itemInfo:this.map.itemInfo}),l=y.map(a,function(r){return{layerId:r.layer.id}}));return l}return a&&b?
null:[]},clearResults:function(){N.empty(this.printResultsNode);K.set(this.clearActionBarNode,"display","none");this.count=1},updateAuthor:function(a){(a=a||"")&&this.authorTB&&this.authorTB.set("value",a)},getCurrentMapScale:function(){this.forceScaleNTB.set("value",this.map.getScale())}});var c=u([B,C,I],{widgetsInTemplate:!0,templateString:Y,url:null,postCreate:function(){this.inherited(arguments);this.progressBar.set("label",this.nls.creatingPrint);this.fileHandle.then(d.hitch(this,"_onPrintComplete"),
d.hitch(this,"_onPrintError"))},_onPrintComplete:function(a){a.url?(this.url=a.url,k.setStyle(this.progressBar.domNode,"display","none"),k.setStyle(this.successNode,"display","inline-block"),L.add(this.resultNode,"printResultHover")):this._onPrintError(this.nls.printError)},_onPrintError:function(a){console.log(a);k.setStyle(this.progressBar.domNode,"display","none");k.setStyle(this.errNode,"display","block");L.add(this.resultNode,"printResultError");k.setAttr(this.domNode,"title",a.details||a.message||
"")},_openPrint:function(){null!==this.url&&window.open(this.url)}});return V})},"esri/tasks/PrintTask":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/_base/json dojo/_base/Deferred dojo/has ../kernel ../lang ../layerUtils ../deferredUtils ../Color ../request ../urlUtils ../geometry/Polygon ../renderers/SimpleRenderer ../symbols/FillSymbol ./Geoprocessor ./PrintTemplate ./Task dojo/dom-attr dojo/dom-construct dojox/gfx/_base dojox/gfx/canvas dojox/json/query dojo/has!extend-esri?./PrintParameters dojo/has!extend-esri?./LegendLayer".split(" "),
function(u,B,C,I,J,v,q,n,h,f,x,m,d,y,k,K,N,L,U,Q,W,V,Y,M){u=u(U,{declaredClass:"esri.tasks.PrintTask",constructor:function(g,w){this.url=g;this.printGp=new N(this.url);this._handler=B.hitch(this,this._handler);w&&w.async&&(this.async=!0);this._colorEvaluator=M("$..color")},async:!1,_vtlExtent:null,_cimVersion:null,_is11xService:!1,_loadGpServerMetadata:!0,execute:function(g,w,H){if(!this._loadGpServerMetadata)return this._execute(g,w,H);var E=new J(f._dfdCanceller),D=this._url.path,G=D.lastIndexOf("/GPServer/");
0<G&&(D=D.slice(0,G+9));E._pendingDfd=m({url:D,callbackParamName:"callback",content:B.mixin({},this._url.query,{f:"json"})}).then(B.hitch(this,function(e){this._loadGpServerMetadata=!1;this.async="esriExecutionTypeAsynchronous"===e.executionType;this._cimVersion=e.cimVersion;this._is11xService=!!this._cimVersion;E._pendingDfd=this._execute(g);return E._pendingDfd})).then(B.hitch(this,function(e){this._successHandler([e],null,w,E)})).otherwise(function(e){H&&H(e);E.errback(e)});return E},_handler:function(g,
w,H,E,D){try{if(this.async)"esriJobSucceeded"===g.jobStatus?this.printGp.getResultData(g.jobId,"Output_File",B.hitch(this,function(e){G=e.value;this._successHandler([G],"onComplete",H,D)})):this._errorHandler(Error(g.jobStatus),E,D);else{var G=g[0].value;this._successHandler([G],"onComplete",H,D)}}catch(e){this._errorHandler(e,E,D)}},_execute:function(g,w,H){var E=this._handler,D=this._errorHandler,G=g.template||new L;G.hasOwnProperty("showLabels")||(G.showLabels=!0);var e=G.exportOptions,z;e&&(z=
{outputSize:[e.width,e.height],dpi:e.dpi});e=G.layoutOptions;var A=[];if(e){this.legendAll=!1;e.legendLayers?C.forEach(e.legendLayers,function(S){var T={};T.id=S.layerId;S.subLayerIds&&(T.subLayerIds=S.subLayerIds);A.push(T)}):this.legendAll=!0;if("Miles"===e.scalebarUnit||"Kilometers"===e.scalebarUnit){var c="esriKilometers";var a="esriMiles"}else if("Meters"===e.scalebarUnit||"Feet"===e.scalebarUnit)c="esriMeters",a="esriFeet";var b={esriMiles:"mi",esriKilometers:"km",esriFeet:"ft",esriMeters:"m"};
b={titleText:e.titleText,authorText:e.authorText,copyrightText:e.copyrightText,customTextElements:e.customTextElements,scaleBarOptions:{metricUnit:c,metricLabel:b[c],nonMetricUnit:a,nonMetricLabel:b[a]},legendOptions:{operationalLayers:A}}}c=this._getPrintDefinition(g.map,G);g.outSpatialReference&&(c.mapOptions.spatialReference=g.outSpatialReference.toJson());g.template&&n.isDefined(g.template.showAttribution)&&(c.mapOptions.showAttribution=g.template.showAttribution);B.mixin(c,{exportOptions:z,layoutOptions:b});
this.allLayerslegend&&B.mixin(c.layoutOptions,{legendOptions:{operationalLayers:this.allLayerslegend}});if(c.operationalLayers){z=c.operationalLayers;var l=function(S){return n.fixJson(B.mixin(S,{type:"esriSLS",cap:void 0,join:void 0,meterLimit:void 0}))},r=/[\u4E00-\u9FFF\u0E00-\u0E7F\u0900-\u097F\u3040-\u309F\u30A0-\u30FF\u31F0-\u31FF]/,t=/[\u0600-\u06FF]/,F=function(S){var T=S.text,X=(S=S.font)&&S.family&&S.family.toLowerCase();T&&S&&("arial"===X||"arial unicode ms"===X)&&(S.family=r.test(T)?"Arial Unicode MS":
"Arial","normal"!==S.style&&t.test(T)&&(S.family="Arial Unicode MS"))};for(b=0;b<z.length;b++)if(z[b].featureCollection&&z[b].featureCollection.layers)for(a=0;a<z[b].featureCollection.layers.length;a++){var P=z[b].featureCollection.layers[a];if(P.layerDefinition&&P.layerDefinition.drawingInfo&&P.layerDefinition.drawingInfo.renderer&&P.layerDefinition.drawingInfo.renderer.symbol){var O=P.layerDefinition.drawingInfo.renderer;"esriCLS"===O.symbol.type?O.symbol=l(O.symbol):"esriTS"===O.symbol.type?F(O.symbol):
O.symbol.outline&&"esriCLS"===O.symbol.outline.type&&(O.symbol.outline=l(O.symbol.outline))}if(P.featureSet&&P.featureSet.features)for(e=0;e<P.featureSet.features.length;e++)O=P.featureSet.features[e],O.symbol&&("esriCLS"===O.symbol.type?O.symbol=l(O.symbol):"esriTS"===O.symbol.type?F(O.symbol):O.symbol.outline&&"esriCLS"===O.symbol.outline.type&&(O.symbol.outline=l(O.symbol.outline)))}}G={Web_Map_as_JSON:I.toJson(n.fixJson(c)),Format:G.format,Layout_Template:G.layout};g.extraParameters&&(G=B.mixin(G,
g.extraParameters));var R=new J(f._dfdCanceller);g=function(S,T){E(S,T,w,H,R)};c=function(S){D(S,H,R)};R._pendingDfd=this.async?this.printGp.submitJob(G,g,null,c):this.printGp.execute(G,g,c);return R},onComplete:function(){},_createMultipointLayer:function(){return{layerDefinition:{name:"multipointLayer",geometryType:"esriGeometryMultipoint",drawingInfo:{renderer:null}},featureSet:{geometryType:"esriGeometryMultipoint",features:[]}}},_createPolygonLayer:function(){return{layerDefinition:{name:"polygonLayer",
geometryType:"esriGeometryPolygon",drawingInfo:{renderer:null}},featureSet:{geometryType:"esriGeometryPolygon",features:[]}}},_createPointLayer:function(){return{layerDefinition:{name:"pointLayer",geometryType:"esriGeometryPoint",drawingInfo:{renderer:null}},featureSet:{geometryType:"esriGeometryPoint",features:[]}}},_createPolylineLayer:function(){return{layerDefinition:{name:"polylineLayer",geometryType:"esriGeometryPolyline",drawingInfo:{renderer:null}},featureSet:{geometryType:"esriGeometryPolyline",
features:[]}}},_convertSvgSymbol:function(g){if(!(8>=v("ie")||!g.path&&"image/svg+xml"!==g.contentType)){var w=Y.createSurface(W.create("div"),1024,1024);var H="image/svg+xml"===g.contentType?w.createObject(Y.Image,{src:"data:image/svg+xml;base64,"+g.imageData,width:V.pt2px(g.width),height:V.pt2px(g.height),x:0,y:0}):w.createObject(Y.Path,g.path).setFill(g.color).setStroke(g.outline);"pendingRender"in w&&w._render(!0);var E=w.rawNode.getContext("2d"),D=Math.ceil(H.getBoundingBox().width),G=Math.ceil(H.getBoundingBox().height);
H=E.getImageData(H.getBoundingBox().x,H.getBoundingBox().y,D,G);E.canvas.width=D;E.canvas.height=G;E.putImageData(H,0,0);E=E.canvas.toDataURL("image/png");g={type:"esriPMS",imageData:E.substr(22,E.length),angle:g.angle,contentType:"image/png",height:g.size?g.size:V.px2pt(G),width:g.size?D/G*g.size:V.px2pt(D),xoffset:g.xoffset,yoffset:g.yoffset};w.destroy();return g}},_convertSvgRenderer:function(g){"simple"===g.type&&g.symbol&&(g.symbol.path||"image/svg+xml"===g.symbol.contentType)?g.symbol=this._convertSvgSymbol(g.symbol):
"uniqueValue"===g.type?(g.defaultSymbol&&(g.defaultSymbol.path||"image/svg+xml"===g.defaultSymbol.contentType)&&(g.defaultSymbol=this._convertSvgSymbol(g.defaultSymbol)),g.uniqueValueInfos&&C.forEach(g.uniqueValueInfos,function(w){if(w.symbol.path||"image/svg+xml"===w.symbol.contentType)w.symbol=this._convertSvgSymbol(w.symbol)},this)):"classBreaks"===g.type&&(g.defaultSymbol&&(g.defaultSymbol.path||"image/svg+xml"===g.defaultSymbol.contentType)&&(g.defaultSymbol=this._convertSvgSymbol(g.defaultSymbol)),
g.classBreakInfos&&C.forEach(g.classBreakInfos,function(w){if(w.symbol.path||"image/svg+xml"===w.symbol.contentType)w.symbol=this._convertSvgSymbol(w.symbol)},this))},_createFeatureCollection:function(g,w,H,E){var D=this._createPolygonLayer(),G=this._createPolylineLayer(),e=this._createPointLayer(),z=this._createMultipointLayer(),A=this._createPointLayer();A.layerDefinition.name="textLayer";delete A.layerDefinition.drawingInfo;if("esri.layers.FeatureLayer"===g.declaredClass||"esri.layers.StreamLayer"===
g.declaredClass)D.layerDefinition.name=G.layerDefinition.name=e.layerDefinition.name=z.layerDefinition.name=B.getObject("arcgisProps.title",!1,g)||g.name||g.id;var c=g.renderer&&"esri.renderer.SimpleRenderer"===g.renderer.declaredClass;if(!g.renderer||g.renderer.valueExpression||B.isFunction(g.renderer.attributeField))delete D.layerDefinition.drawingInfo,delete G.layerDefinition.drawingInfo,delete e.layerDefinition.drawingInfo,delete z.layerDefinition.drawingInfo;else{var a=g.renderer.toJson({useLegacyRotationProperties:!0});
if("temporal"===a.type){a={latestObservationRenderer:a.latestObservationRenderer,trackLinesRenderer:a.trackRenderer,observationAger:a.observationAger,renderer:a.observationRenderer};var b={};g._trackIdField&&(b.trackIdField=g._trackIdField);g._startTimeField&&(b.startTimeField=g._startTimeField);g._endTimeField&&(b.endTimeField=g._endTimeField);D.layerDefinition.drawingInfo=a;D.layerDefinition.timeInfo=b;G.layerDefinition.drawingInfo=a;G.layerDefinition.timeInfo=b;e.layerDefinition.drawingInfo=a;
e.layerDefinition.timeInfo=b;z.layerDefinition.drawingInfo=a;z.layerDefinition.timeInfo=b}else D.layerDefinition.drawingInfo.renderer=a,G.layerDefinition.drawingInfo.renderer=a,e.layerDefinition.drawingInfo.renderer=a,z.layerDefinition.drawingInfo.renderer=a}a=g.fields;a||!g.renderer||g.renderer.valueExpression||B.isFunction(g.renderer.attributeField)||("esri.renderer.ClassBreaksRenderer"===g.renderer.declaredClass?(a=[{name:g.renderer.attributeField,type:"esriFieldTypeDouble"}],g.renderer.normalizationField&&
a.push({name:g.renderer.normalizationField,type:"esriFieldTypeDouble"})):"esri.renderer.UniqueValueRenderer"===g.renderer.declaredClass&&(a=[{name:g.renderer.attributeField,type:"esriFieldTypeString"}],g.renderer.attributeField2&&a.push({name:g.renderer.attributeField2,type:"esriFieldTypeString"}),g.renderer.attributeField3&&a.push({name:g.renderer.attributeField3,type:"esriFieldTypeString"})));a&&(D.layerDefinition.fields=a,G.layerDefinition.fields=a,e.layerDefinition.fields=a,z.layerDefinition.fields=
a);a=g.graphics;g.isFeatureReductionActive&&g.isFeatureReductionActive()&&(a=g.getSingleGraphics());b=a.length;var l;for(l=0;l<b;l++){var r=a[l];if(!1!==r.visible&&r.geometry){var t=r.toJson();t.symbol&&t.symbol.outline&&t.symbol.outline.color&&t.symbol.outline.color[3]&&!this._is11xService&&(t.symbol.outline.color[3]=255);if(g.renderer&&!t.symbol&&(B.isFunction(g.renderer.attributeField)||g.renderer.valueExpression||this._isFeatureCollectionRequired(g.renderer,g)||"esri.renderer.DotDensityRenderer"===
g.renderer.declaredClass||H)){H=H||g.renderer;var F=null;try{F=H.getSymbol(r)}catch(P){}if(!F)continue;t.symbol=F.toJson();this._isFeatureCollectionRequired(H,g)&&this._applyVisualVariables(t.symbol,{renderer:H,graphic:r,symbol:F,mapResolution:w&&w.getResolutionInMeters(),mapScale:w&&w.getScale()})}t.symbol&&(t.symbol.path||"image/svg+xml"===t.symbol.contentType?t.symbol=this._convertSvgSymbol(t.symbol):t.symbol.text&&delete t.attributes);switch(r.geometry.type){case "polygon":D.featureSet.features.push(t);
break;case "polyline":G.featureSet.features.push(t);break;case "point":t.symbol&&t.symbol.text?A.featureSet.features.push(t):e.featureSet.features.push(t);break;case "multipoint":z.featureSet.features.push(t);break;case "extent":t.geometry=y.fromExtent(r.geometry).toJson(),D.featureSet.features.push(t)}}}w=[];0<D.featureSet.features.length&&w.push(D);0<G.featureSet.features.length&&w.push(G);0<z.featureSet.features.length&&w.push(z);0<e.featureSet.features.length&&w.push(e);0<A.featureSet.features.length&&
w.push(A);if(!w.length)return null;C.forEach(w,function(P){var O=C.every(P.featureSet.features,function(R){return R.symbol});if(c||O)E&&E.forceFeatureAttributes||C.forEach(P.featureSet.features,function(R){delete R.attributes}),E.forceFeatureAttributes||delete P.layerDefinition.fields;O&&delete P.layerDefinition.drawingInfo});C.forEach(w,function(P){P.layerDefinition.drawingInfo&&P.layerDefinition.drawingInfo.renderer&&this._convertSvgRenderer(P.layerDefinition.drawingInfo.renderer)},this);return{id:g.id,
opacity:g.opacity,minScale:g.minScale||0,maxScale:g.maxScale||0,featureCollection:{layers:w}}},_getPrintDefinition:function(g,w){var H={operationalLayers:this._createOperationalLayers(g,w)},E=this._vtlExtent||g.extent,D=g.spatialReference;this._vtlExtent=null;g.spatialReference._isWrappable()&&(E=E._normalize(!0),D=E.spatialReference);E={mapOptions:{showAttribution:g.showAttribution,extent:E.toJson(),spatialReference:D.toJson()}};w.preserveScale&&B.mixin(E.mapOptions,{scale:w.outScale||g.getScale()});
g.timeExtent&&B.mixin(E.mapOptions,{time:[g.timeExtent.startTime.getTime(),g.timeExtent.endTime.getTime()]});g={};B.mixin(g,E,H);return g},_createOperationalLayers:function(g,w){var H,E=[],D=0;w.preserveScale&&(D=w.outScale||g.getScale());this.allLayerslegend=this.legendAll?[]:null;this._vtlExtent=null;var G=C.map(g.layerIds,g.getLayer,g);g._mapImageLyr&&G.push(g._mapImageLyr);for(H=0;H<G.length;H++){var e=G[H];if(e.loaded&&e.visible&&(!D||e.isVisibleAtScale(D))){var z=e.declaredClass;var A={id:e.id,
title:B.getObject("arcgisProps.title",!1,e)||e.id,opacity:e.opacity,minScale:e.minScale||0,maxScale:e.maxScale||0};A=B.mixin(A,this._getUrlAndToken(e));e.getNode()&&Q.get(e.getNode(),"data-reference")&&(A._isRefLayer=!0);switch(z){case "esri.layers.ArcGISDynamicMapServiceLayer":var c=[];z=!!e._params.layers;if(e._params.dynamicLayers)z=w.outScale?e._getDynLayerObjs(w.outScale):I.fromJson(e._params.dynamicLayers),C.forEach(z,function(t){c.push({id:t.id,name:t.name,layerDefinition:t});delete t.id;delete t.name;
delete t.maxScale;delete t.minScale}),0===c.length&&(A.visibleLayers=[-1]);else if(e.supportsDynamicLayers){if(z||e.layerDefinitions||e.layerTimeOptions){var a=e.createDynamicLayerInfosFromLayerInfos(),b=null;z&&(b=e.visibleLayers);b=h._getVisibleLayers(a,b);var l=h._getLayersForScale(w.outScale||g.getScale(),a);C.forEach(a,function(t){if(!t.subLayerIds){var F=t.id;-1<C.indexOf(b,F)&&-1<C.indexOf(l,F)&&(t={source:t.source.toJson()},e.layerDefinitions&&e.layerDefinitions[F]&&(t.definitionExpression=
e.layerDefinitions[F]),e.layerTimeOptions&&e.layerTimeOptions[F]&&(t.layerTimeOptions=e.layerTimeOptions[F].toJson()),c.push({id:F,layerDefinition:t}))}});0===c.length&&(A.visibleLayers=[-1])}}else C.forEach(e.layerInfos,function(t){var F={id:t.id,layerDefinition:{}};e.layerDefinitions&&e.layerDefinitions[t.id]&&(F.layerDefinition.definitionExpression=e.layerDefinitions[t.id]);e.layerTimeOptions&&e.layerTimeOptions[t.id]&&(F.layerDefinition.layerTimeOptions=e.layerTimeOptions[t.id].toJson());(F.layerDefinition.definitionExpression||
F.layerDefinition.layerTimeOptions)&&c.push(F)}),z&&(A.visibleLayers=e.visibleLayers.length?e.visibleLayers:[-1]);c.length&&(A.layers=c);E.push(A);this.allLayerslegend&&this.allLayerslegend.push({id:e.id,subLayerIds:e.visibleLayers});break;case "esri.layers.ArcGISImageServiceLayer":A=B.mixin(A,{url:e.url,bandIds:e.bandIds,compressionQuality:e.compressionQuality,format:e.format,interpolation:e.interpolation});e.mosaicRule&&B.mixin(A,{mosaicRule:e.mosaicRule.toJson()});if(e.renderingRule||e.renderer)this._is11xService?
(e.renderingRule&&(A.renderingRule=e.renderingRule.toJson()),e.renderer&&(A.layerDefinition=A.layerDefinition||{},A.layerDefinition.drawingInfo=A.layerDefinition.drawingInfo||{},A.layerDefinition.drawingInfo.renderer=e.renderer.toJson())):(z=e.getExportImageRenderingRule())&&B.mixin(A,{renderingRule:z.toJson()});E.push(A);this.allLayerslegend&&this.allLayerslegend.push({id:e.id});break;case "esri.layers.RasterXLayer":this._is11xService&&(A=B.mixin(A,{url:e.url,bandIds:e.bandIds,interpolation:e.interpolation}),
e.renderer&&(A.layerDefinition=A.layerDefinition||{},A.layerDefinition.drawingInfo=A.layerDefinition.drawingInfo||{},A.layerDefinition.drawingInfo.renderer=e.renderer.toJson()),E.push(A),this.allLayerslegend&&this.allLayerslegend.push({id:e.id}));break;case "esri.layers.WMSLayer":A=B.mixin(A,{url:e.url,title:e.title,type:"wms",version:e.version,transparentBackground:e.imageTransparency,visibleLayers:e.visibleLayers});E.push(A);this.allLayerslegend&&this.allLayerslegend.push({id:e.id,subLayerIds:e.visibleLayers});
break;case "esri.virtualearth.VETiledLayer":z=e.mapStyle;"roadOnDemand"===z?z="Road":"aerialWithLabelsOnDemand"===z&&(z="Hybrid");A=B.mixin(A,{visibility:e.visible,type:"BingMaps"+z,culture:e.culture,key:e.bingMapsKey});E.push(A);break;case "esri.layers.OpenStreetMapLayer":A=B.mixin(A,{credits:e.copyright,type:"OpenStreetMap",url:d.getAbsoluteUrl(e.tileServers[0])});E.push(A);break;case "esri.layers.WMTSLayer":A=B.mixin(A,{url:e.url,type:"wmts",layer:e._identifier,style:e._style,format:e.format,tileMatrixSet:e._tileMatrixSetId});
E.push(A);break;case "esri.layers.MapImageLayer":z=e.getImages();C.forEach(z,function(t,F){t.visible&&t.href&&(A={id:e.id+"_image"+F,type:"image",title:e.id,minScale:e.minScale||0,maxScale:e.maxScale||0,opacity:e.opacity*t.opacity,extent:t.extent.toJson()},"data:image/png;base64,"===t.href.substr(0,22)?A.imageData=t.href.substr(22):A.url=t.href,E.push(A))});break;case "esri.layers.VectorTileLayer":delete A.url;delete A.token;if(this._is11xService&&e.currentStyleInfo.serviceUrl&&e.currentStyleInfo.styleUrl&&
(z=q.id&&q.id.findCredential(e.currentStyleInfo.styleUrl),a=q.id&&q.id.findCredential(e.currentStyleInfo.serviceUrl),!z&&!a||"2.1.0"!==this._cimVersion)){A.type="VectorTileLayer";A.styleUrl=e.currentStyleInfo.styleUrl;z&&(A.token=z.token);a&&a.token!==A.token&&(A.additionalTokens=[{url:e.currentStyleInfo.serviceUrl,token:a.token}]);E.push(A);break}A.type="image";z=this._vtlExtent||g.extent.offset(0,0);var r=w.exportOptions&&w.exportOptions.dpi||96;a={format:"png",pixelRatio:r/96};"MAP_ONLY"!==w.layout||
!w.preserveScale||w.outScale&&w.outScale!==g.getScale()||96!==r||!w.exportOptions||w.exportOptions.width%2===g.width%2&&w.exportOptions.height%2===g.height%2||(a.area={x:0,y:0,width:g.width,height:g.height},w.exportOptions.width%2!==g.width%2&&--a.area.width,w.exportOptions.height%2!==g.height%2&&--a.area.height,this._vtlExtent||(r=g.toMap({x:a.area.width,y:a.area.height}),z.update(z.xmin,r.y,r.x,z.ymax,z.spatialReference),this._vtlExtent=z));A.extent=z._normalize(!0).toJson();z=e.takeScreenshot(a);
z.isResolved()?z.then(function(t){"data:image/png;base64,"===t.dataURL.substr(0,22)&&(A.imageData=t.dataURL.substr(22))}):console.error("PrintTask: VectorTileLayer.takeScreenshot() returned an unresolved Promise");A.imageData&&E.push(A);break;case "esri.layers.WebTiledLayer":z=e.url.replace(/\$\{/g,"{");A=B.mixin(A,{type:"WebTiledLayer",urlTemplate:z,credits:e.copyright});e.subDomains&&0<e.subDomains.length&&(A.subDomains=e.subDomains);e._wmtsInfo&&(A.wmtsInfo=e._wmtsInfo);delete A.url;E.push(A);
break;default:if(e.getTileUrl||e.getImageUrl)A=B.mixin(A,{url:e.url}),E.push(A)}}}G=C.map(g.graphicsLayerIds,g.getLayer,g);for(H=0;H<G.length;H++)e=G[H],e.isFeatureReductionActive&&e.isFeatureReductionActive()&&(e.getSingleGraphics().length?G.splice(++H,0,e.getFeatureReductionLayer()):G[H]=e.getFeatureReductionLayer());for(H=0;H<G.length;H++)if(e=G[H],e.loaded&&e.visible&&(!D||e.isVisibleAtScale(D)))switch(z=e.declaredClass,z){case "esri.layers.CSVLayer":if(this._is11xService){A={id:e.id,url:e.url,
title:e.title,opacity:e.opacity,minScale:e.minScale||0,maxScale:e.maxScale||0,type:"CSV",locationInfo:{latitudeFieldName:e.latitudeFieldName,longitudeFieldName:e.longitudeFieldName},layerDefinition:{drawingInfo:{renderer:e.renderer&&e.renderer.toJson({useLegacyRotationProperties:!0})}}};E.push(A);break}case "esri.layers.FeatureLayer":case "esri.layers.LabelLayer":case "esri.layers.StreamLayer":if("esri.layers.LabelLayer"===z&&!w.showLabels||e.renderer&&"esri.renderer.HeatmapRenderer"===e.renderer.declaredClass)continue;
z=null;e.url&&e.renderer&&("esri.renderer.ScaleDependentRenderer"===e.renderer.declaredClass?"scale"===e.renderer.rangeType?z=e.renderer.getRendererInfoByScale(g.getScale())&&e.renderer.getRendererInfoByScale(g.getScale()).renderer:"zoom"===e.renderer.rangeType&&(z=e.renderer.getRendererInfoByZoom(g.getZoom())&&e.renderer.getRendererInfoByZoom(g.getZoom()).renderer):z=e.renderer);a=z&&"esri.layers.CSVLayer"!==e.declaredClass&&!this._isFeatureCollectionRequired(z,e)&&!z.valueExpression;r=e.isFeatureReductionActive&&
e.isFeatureReductionActive();if(z&&!r&&"esri.renderer.DotDensityRenderer"!==z.declaredClass&&"esri.layers.StreamLayer"!==e.declaredClass&&(this._is11xService||a)&&("esri.renderer.SimpleRenderer"===z.declaredClass||"esri.renderer.TemporalRenderer"===z.declaredClass||null==z.attributeField||B.isString(z.attributeField)&&e._getField(z.attributeField,!0)))if(A={id:e.id,title:B.getObject("arcgisProps.title",!1,e)||e.id,opacity:e.opacity,minScale:e.minScale||0,maxScale:e.maxScale||0,layerDefinition:{drawingInfo:{renderer:z.toJson({useLegacyRotationProperties:!0})}}},
A=B.mixin(A,this._getUrlAndToken(e)),"esri.renderer.TemporalRenderer"===z.declaredClass&&(a=A.layerDefinition.drawingInfo,a.latestObservationRenderer=a.renderer.latestObservationRenderer,a.trackLinesRenderer=a.renderer.trackRenderer,a.observationAger=a.renderer.observationAger,a.renderer=a.renderer.observationRenderer,e._trackIdField&&(A.layerDefinition.timeInfo={trackIdField:e._trackIdField})),this._convertSvgRenderer(A.layerDefinition.drawingInfo.renderer),this._is11xService||1>e.opacity||"esri.renderer.TemporalRenderer"===
z.declaredClass||this._updateLayerOpacity(A))if(e._params.source&&(z=e._params.source.toJson(),B.mixin(A.layerDefinition,{source:z})),e.getDefinitionExpression()&&B.mixin(A.layerDefinition,{definitionExpression:e.getDefinitionExpression()}),2!==e.mode)0<e.getSelectedFeatures().length&&(z=C.map(e.getSelectedFeatures(),function(t){return t.attributes[e.objectIdField]}),0<z.length&&e.getSelectionSymbol()&&B.mixin(A,{selectionObjectIds:z,selectionSymbol:e.getSelectionSymbol().toJson()}));else{z=C.map(e.getSelectedFeatures(),
function(t){return t.attributes[e.objectIdField]});if(0===z.length||!e._params.drawMode)break;B.mixin(A.layerDefinition,{objectIds:z});z=null;e.getSelectionSymbol()&&(z=new k(e.getSelectionSymbol()));B.mixin(A.layerDefinition.drawingInfo,{renderer:z&&z.toJson()})}else A=this._createFeatureCollection(e,g,null,w);else A=z&&(z.valueExpression||this._isFeatureCollectionRequired(z,e)||"esri.renderer.DotDensityRenderer"===z.declaredClass)?this._createFeatureCollection(e,g,z,w):this._createFeatureCollection(e,
g,null,w);if(!A)continue;E.push(A);this.allLayerslegend&&this.allLayerslegend.push({id:e.id});break;case "esri.layers._GraphicsLayer":case "esri.layers.GraphicsLayer":case "esri.layers.WFSLayer":A=this._createFeatureCollection(e,g,null,w);if(!A)continue;E.push(A);this.allLayerslegend&&this.allLayerslegend.push({id:e.id});break;case "esri.layers.ArcGISImageServiceVectorLayer":A={id:e.id,title:B.getObject("arcgisProps.title",!1,e)||e.id,opacity:e.opacity,minScale:e.minScale||0,maxScale:e.maxScale||
0,visibility:e.visible,symbolTileSize:e.symbolTileSize,layerDefinition:{drawingInfo:{renderer:e.renderer.toJson({useLegacyRotationProperties:!0})}}},A=B.mixin(A,this._getUrlAndToken(e)),e.mosaicRule&&B.mixin(A,{mosaicRule:e.mosaicRule.toJson()}),E.push(A),this.allLayerslegend&&this.allLayerslegend.push({id:e.id})}D&&C.forEach(E,function(t){t.minScale=0;t.maxScale=0});g.graphics&&0<g.graphics.graphics.length&&(A=this._createFeatureCollection(g.graphics,g,null,w))&&E.push(A);g._labels&&w.showLabels&&
(A=this._createFeatureCollection(g._labels,g,null,w))&&E.push(A);C.forEach(E,function(t,F,P){t._isRefLayer&&(delete t._isRefLayer,P.splice(F,1),P.push(t))});return E},_getUrlAndToken:function(g){return{token:g._getToken(),url:g._url?g._url.path:null}},_updateLayerOpacity:function(g){var w=this._colorEvaluator(g);w=C.filter(w,function(G){return B.isArray(G)&&4===G.length});var H=!0;if(w.length){var E=w[0][3],D;for(D=1;D<w.length;D++)if(E!==w[D][3]){H=!1;break}if(H)for(g.opacity=E/255,D=0;D<w.length;D++)w[D][3]=
255}return H},_isFeatureCollectionRequired:function(g,w){if(w&&w.isFeatureReductionActive&&w.isFeatureReductionActive())return!0;var H=!1;if(w=this._getVariable(g,"rotationInfo",!1))H=(H=w.field)&&B.isFunction(H)||w.valueExpression;return g.hasVisualVariables("sizeInfo")||g.hasVisualVariables("colorInfo")||g.hasVisualVariables("opacityInfo")||H},_getVariable:function(g,w,H){if(g)var E=(g=g.getVisualVariablesForType(w,H))&&g[0];return E},_applyVisualVariables:function(g,w){var H=w.renderer,E=w.graphic,
D=w.symbol,G=w.mapResolution,e=w.mapScale,z=D.type;if("textsymbol"!==z&&"shieldlabelsymbol"!==z){var A=this._getVariable(H,"sizeInfo",!1),c=this._getVariable(H,"colorInfo",!1),a=this._getVariable(H,"opacityInfo",!1);w=this._getVariable(H,"rotationInfo",!1);D instanceof K&&(A=this._getVariable(H,"sizeInfo","outline")||A);G=A?H.getSize(E,{sizeInfo:A,shape:"simplemarkersymbol"===z?D.style:null,resolution:G,scale:e}):E.size;null!=G&&("simplemarkersymbol"===z?g.size=V.px2pt(G):"picturemarkersymbol"===
z?(e=D.width/D.height*G,g.width=V.px2pt(e),g.height=V.px2pt(G),0!==D.xoffset&&(g.xoffset=V.px2pt(D.xoffset/D.width*e)),0!==D.yoffset&&(g.yoffset=V.px2pt(D.yoffset/D.height*G))):"simplelinesymbol"===z?g.width=V.px2pt(G):g.outline&&(g.outline.width=V.px2pt(G)));c&&(!(D=H.getColor(E,{colorInfo:c}))||"simplemarkersymbol"!==z&&"simplelinesymbol"!==z&&"simplefillsymbol"!==z||(g.color=x.toJsonColor(D)));a&&(D=H.getOpacity(E,{opacityInfo:a}),null!=D&&g.color&&(g.color[3]=Math.round(255*D)));w&&(H=H.getRotationAngle(E,
{rotationInfo:w}))&&(g.angle=-H)}}});v("extend-esri")&&B.setObject("tasks.PrintTask",u,q);return u})},"esri/tasks/Geoprocessor":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/_base/Deferred dojo/_base/json dojo/has dojo/io-query ../kernel ../request ../deferredUtils ../geometry/normalizeUtils ./Task ./FeatureSet ./JobInfo ./GPMessage ./LinearUnit ./DataFile ./RasterData ./Date ./ParameterValue ./GPResultImageLayer ../layers/ArcGISDynamicMapServiceLayer ../layers/MapImage".split(" "),
function(u,B,C,I,J,v,q,n,h,f,x,m,d,y,k,K,N,L,U,Q,W,V,Y){u=u(m,{declaredClass:"esri.tasks.Geoprocessor",_eventMap:{"execute-complete":["results","messages"],"get-result-data-complete":["result"],"get-result-image-complete":["mapImage"],"get-result-image-layer-complete":["layer"],"job-cancel":["jobInfo"],"job-complete":["jobInfo"],"status-update":["jobInfo"]},constructor:function(M){this._jobUpdateHandler=B.hitch(this,this._jobUpdateHandler);this._getJobStatus=B.hitch(this,this._getJobStatus);this._getResultDataHandler=
B.hitch(this,this._getResultDataHandler);this._getResultImageHandler=B.hitch(this,this._getResultImageHandler);this._executeHandler=B.hitch(this,this._executeHandler);this._updateTimers=[];this.registerConnectEvents()},updateDelay:1E3,processSpatialReference:null,outputSpatialReference:null,outSpatialReference:null,setUpdateDelay:function(M){this.updateDelay=M},setProcessSpatialReference:function(M){this.processSpatialReference=M},setOutputSpatialReference:function(M){this._setOutSR(M)},setOutSpatialReference:function(M){this._setOutSR(M)},
__msigns:[{n:"execute",c:3,a:[{i:0,p:["*"]}],e:2,f:1},{n:"submitJob",c:4,a:[{i:0,p:["*"]}],e:3}],_setOutSR:function(M){this.outSpatialReference=this.outputSpatialReference=M},_getOutSR:function(){return this.outSpatialReference||this.outputSpatialReference},_gpEncode:function(M,g,w){for(var H in M){var E=M[H];B.isArray(E)?M[H]=J.toJson(C.map(E,function(D){return this._gpEncode({item:D},!0).item},this)):E instanceof Date&&(M[H]=E.getTime())}return this._encode(M,g,w)},_decode:function(M){var g=M.dataType,
w=new Q(M);if(-1!==C.indexOf(["GPBoolean","GPDouble","GPLong","GPString"],g))return w;if("GPLinearUnit"===g)w.value=new K(w.value);else if("GPFeatureRecordSetLayer"===g||"GPRecordSet"===g)w.value=new d(w.value);else if("GPDataFile"===g)w.value=new N(w.value);else if("GPDate"===g)M=w.value,B.isString(M)?w.value=new U({date:M}):w.value=new Date(M);else if("GPRasterData"===g||"GPRasterDataLayer"===g)M=M.value.mapImage,w.value=M?new Y(M):new L(w.value);else if(-1!==g.indexOf("GPMultiValue:")){var H=g.split(":")[1];
M=w.value;w.value=C.map(M,function(E){return this._decode({paramName:"_name",dataType:H,value:E}).value},this)}else console.log(this.declaredClass+" : GP Data type not handled. : "+w.dataType),w=null;return w},submitJob:function(M,g,w,H,E){var D=this._getOutSR(),G=E.assembly;M=this._gpEncode(B.mixin({},this._url.query,{f:"json","env:outSR":D?D.wkid||J.toJson(D.toJson()):null,"env:processSR":this.processSpatialReference?this.processSpatialReference.wkid||J.toJson(this.processSpatialReference.toJson()):
null},M),null,G&&G[0]);var e=this._jobUpdateHandler,z=this._errorHandler;return h({url:this._url.path+"/submitJob",content:M,callbackParamName:"callback",load:function(A,c){e(A,c,!1,g,w,E.dfd)},error:function(A){z(A,H,E.dfd)}})},_jobUpdateHandler:function(M,g,w,H,E,D){var G=M.jobId;g=new y(M);this._successHandler([g],"onStatusUpdate",E,w&&D);if(!w)switch(clearTimeout(this._updateTimers[G]),this._updateTimers[G]=null,D&&D.progress(g),M.jobStatus){case y.STATUS_SUBMITTED:case y.STATUS_EXECUTING:case y.STATUS_WAITING:case y.STATUS_NEW:var e=
this._getJobStatus;this._updateTimers[G]=setTimeout(function(){e(G,w,H,E,D)},this.updateDelay);break;default:this._successHandler([g],"onJobComplete",H,D)}},_getJobStatus:function(M,g,w,H,E){var D=this._jobUpdateHandler;h({url:this._url.path+"/jobs/"+M,content:B.mixin({},this._url.query,{f:"json"}),callbackParamName:"callback",load:function(G,e){D(G,e,g,w,H,E)},error:this._errorHandler})},_getResultDataHandler:function(M,g,w,H,E){try{var D=this._decode(M);this._successHandler([D],"onGetResultDataComplete",
w,E)}catch(G){this._errorHandler(G,H,E)}},getResultData:function(M,g,w,H){var E=this._getResultDataHandler,D=this._errorHandler,G=new I(f._dfdCanceller);G._pendingDfd=h({url:this._url.path+"/jobs/"+M+"/results/"+g,content:B.mixin({},this._url.query,{f:"json",returnType:"data"}),callbackParamName:"callback",load:function(e,z){E(e,z,w,H,G)},error:function(e){D(e,H,G)}});return G},checkJobStatus:function(M,g,w){var H=this._jobUpdateHandler,E=this._errorHandler,D=new I(f._dfdCanceller);D._pendingDfd=
h({url:this._url.path+"/jobs/"+M,content:B.mixin({},this._url.query,{f:"json"}),callbackParamName:"callback",load:function(G,e){H(G,e,!0,null,g,D)},error:function(G){E(G,w,D)}});return D},cancelJob:function(M,g,w){var H=this._errorHandler,E=new I(f._dfdCanceller);E._pendingDfd=h({url:this._url.path+"/jobs/"+M+"/cancel",content:B.mixin({},this._url.query,{f:"json"}),callbackParamName:"callback",load:B.hitch(this,function(D,G){this._successHandler([D],"onJobCancel",g,E)}),error:function(D){H(D,w,E)}});
return E},execute:function(M,g,w,H){var E=this._getOutSR(),D=H.assembly;M=this._gpEncode(B.mixin({},this._url.query,{f:"json","env:outSR":E?E.wkid||J.toJson(E.toJson()):null,"env:processSR":this.processSpatialReference?this.processSpatialReference.wkid||J.toJson(this.processSpatialReference.toJson()):null},M),null,D&&D[0]);var G=this._executeHandler,e=this._errorHandler;return h({url:this._url.path+"/execute",content:M,callbackParamName:"callback",load:function(z,A){G(z,A,g,w,H.dfd)},error:function(z){e(z,
w,H.dfd)}})},_executeHandler:function(M,g,w,H,E){try{var D=M.results,G,e=M.messages;var z=0;for(G=D.length;z<G;z++)D[z]=this._decode(D[z]);z=0;for(G=e.length;z<G;z++)e[z]=new k(e[z]);this._successHandler([D,e],"onExecuteComplete",w,E)}catch(A){this._errorHandler(A,H,E)}},_getResultImageHandler:function(M,g,w,H,E){try{var D=this._decode(M);this._successHandler([D],"onGetResultImageComplete",w,E)}catch(G){this._errorHandler(G,H,E)}},getResultImage:function(M,g,w,H,E){var D=this._getResultImageHandler,
G=this._errorHandler;w=this._gpEncode(B.mixin({},this._url.query,{f:"json"},w.toJson()));var e=new I(f._dfdCanceller);e._pendingDfd=h({url:this._url.path+"/jobs/"+M+"/results/"+g,content:w,callbackParamName:"callback",load:function(z,A){D(z,A,H,E,e)},error:function(z){G(z,E,e)}});return e},cancelJobStatusUpdates:function(M){clearTimeout(this._updateTimers[M]);this._updateTimers[M]=null},getResultImageLayer:function(M,g,w,H){if(null==g){var E=this._url.path.indexOf("/GPServer/");M=this._url.path.substring(0,
E)+"/MapServer/jobs/"+M}else M=this._url.path+"/jobs/"+M+"/results/"+g;this._url.query&&(M+="?"+q.objectToQuery(this._url.query));g=null==g?new V(M,{imageParameters:w}):new W(M,{imageParameters:w},!0);this.onGetResultImageLayerComplete(g);H&&H(g);return g},onStatusUpdate:function(){},onJobComplete:function(){},onExecuteComplete:function(){},onGetResultDataComplete:function(){},onGetResultImageComplete:function(){},onGetResultImageLayerComplete:function(){},onJobCancel:function(){}});x._createWrappers(u);
v("extend-esri")&&B.setObject("tasks.Geoprocessor",u,n);return u})},"esri/tasks/JobInfo":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/has","../kernel","./GPMessage"],function(u,B,C,I,J){u=u(null,{declaredClass:"esri.tasks.JobInfo",constructor:function(v){this.messages=[];B.mixin(this,v);v=this.messages;var q,n=v.length;for(q=0;q<n;q++)v[q]=new J(v[q])},jobId:"",jobStatus:""});B.mixin(u,{STATUS_CANCELLED:"esriJobCancelled",STATUS_CANCELLING:"esriJobCancelling",STATUS_DELETED:"esriJobDeleted",
STATUS_DELETING:"esriJobDeleting",STATUS_EXECUTING:"esriJobExecuting",STATUS_FAILED:"esriJobFailed",STATUS_NEW:"esriJobNew",STATUS_SUBMITTED:"esriJobSubmitted",STATUS_SUCCEEDED:"esriJobSucceeded",STATUS_TIMED_OUT:"esriJobTimedOut",STATUS_WAITING:"esriJobWaiting"});C("extend-esri")&&B.setObject("tasks.JobInfo",u,I);return u})},"esri/tasks/GPMessage":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/has","../kernel"],function(u,B,C,I){u=u(null,{declaredClass:"esri.tasks.GPMessage",constructor:function(J){B.mixin(this,
J)}});B.mixin(u,{TYPE_INFORMATIVE:"esriJobMessageTypeInformative",TYPE_PROCESS_DEFINITION:"esriJobMessageTypeProcessDefinition",TYPE_PROCESS_START:"esriJobMessageTypeProcessStart",TYPE_PROCESS_STOP:"esriJobMessageTypeProcessStop",TYPE_WARNING:"esriJobMessageTypeWarning",TYPE_ERROR:"esriJobMessageTypeError",TYPE_EMPTY:"esriJobMessageTypeEmpty",TYPE_ABORT:"esriJobMessageTypeAbort"});C("extend-esri")&&B.setObject("tasks.GPMessage",u,I);return u})},"esri/tasks/LinearUnit":function(){define(["dojo/_base/declare",
"dojo/_base/lang","dojo/has","../kernel"],function(u,B,C,I){u=u(null,{declaredClass:"esri.tasks.LinearUnit",constructor:function(J){J&&B.mixin(this,J)},distance:0,units:null,toJson:function(){var J={};this.distance&&(J.distance=this.distance);this.units&&(J.units=this.units);return J}});C("extend-esri")&&B.setObject("tasks.LinearUnit",u,I);return u})},"esri/tasks/DataFile":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/has","../kernel"],function(u,B,C,I){u=u(null,{declaredClass:"esri.tasks.DataFile",
constructor:function(J){J&&B.mixin(this,J)},url:null,itemID:null,toJson:function(){var J={};this.url&&(J.url=this.url);this.itemID&&(J.itemID=this.itemID);return J}});C("extend-esri")&&B.setObject("tasks.DataFile",u,I);return u})},"esri/tasks/RasterData":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/has","../kernel"],function(u,B,C,I){u=u(null,{declaredClass:"esri.tasks.RasterData",constructor:function(J){J&&B.mixin(this,J)},url:null,format:null,itemID:null,toJson:function(){var J=
{};this.url&&(J.url=this.url);this.format&&(J.format=this.format);this.itemID&&(J.itemID=this.itemID);return J}});C("extend-esri")&&B.setObject("tasks.RasterData",u,I);return u})},"esri/tasks/Date":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/date/locale","dojo/has","../kernel"],function(u,B,C,I,J){u=u(null,{declaredClass:"esri.tasks.Date",constructor:function(v){v&&(v.format&&(this.format=v.format),this.date=C.parse(v.date,{selector:"date",datePattern:this.format}))},date:new Date,
format:"EEE MMM dd HH:mm:ss zzz yyyy",toJson:function(){return{date:C.format(this.date,{selector:"date",datePattern:this.format}),format:this.format}}});I("extend-esri")&&B.setObject("tasks.Date",u,J);return u})},"esri/tasks/ParameterValue":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/has","../kernel"],function(u,B,C,I){u=u(null,{declaredClass:"esri.tasks.ParameterValue",constructor:function(J){B.mixin(this,J)}});C("extend-esri")&&B.setObject("tasks.ParameterValue",u,I);return u})},
"esri/tasks/GPResultImageLayer":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/json dojo/has dojo/io-query ../kernel ../layers/ArcGISDynamicMapServiceLayer".split(" "),function(u,B,C,I,J,v,q){u=u(q,{declaredClass:"esri.tasks._GPResultImageLayer",constructor:function(n,h){h&&h.imageParameters&&h.imageParameters.extent&&(this.initialExtent=this.fullExtent=h.imageParameters.extent,this.spatialReference=this.initialExtent.spatialReference);this.getImageUrl=B.hitch(this,this.getImageUrl);
this.loaded=!0;this.onLoad(this)},getImageUrl:function(n,h,f,x){var m=n.spatialReference.wkid;x(this._url.path+"?"+J.objectToQuery(B.mixin(this._params,{f:"image",bbox:C.toJson(n.toJson()),bboxSR:m,imageSR:m,size:h+","+f})))}});I("extend-esri")&&B.setObject("tasks._GPResultImageLayer",u,v);return u})},"esri/tasks/PrintTemplate":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/has","../kernel"],function(u,B,C,I){u=u(null,{declaredClass:"esri.tasks.PrintTemplate",label:null,exportOptions:{width:800,
height:1100,dpi:96},layoutOptions:null,format:"PNG32",layout:"MAP_ONLY",outScale:0,preserveScale:!0,forceFeatureAttributes:!1,showAttribution:null,showLabels:!0});C("extend-esri")&&B.setObject("tasks.PrintTemplate",u,I);return u})},"dojox/gfx/canvas":function(){define("./_base dojo/_base/lang dojo/_base/array dojo/_base/declare dojo/_base/window dojo/dom-geometry dojo/dom ./shape ./path ./arc ./matrix ./decompose ./bezierutils".split(" "),function(u,B,C,I,J,v,q,n,h,f,x,m,d){function y(c,a,b,l,r,t,
F,P,O,R){var S=a.length,T=0;if(R){var X=R.l/r;T=R.i}else X=a[0]/r;for(;t<F;){if(t+X>F){var Z={l:(t+X-F)*r,i:T};X=F-t}T%2||(c.beginPath(),c.arc(b,l,r,t,t+X,P),O&&c.stroke());t+=X;++T;X=a[T%S]/r}return Z}function k(c,a,b,l){var r=0,t=0,F=0;if(l){var P=l.l;F=l.i}else P=a[0];for(;1>t;)t=d.tAtLength(c,P),1==t&&(r=d.computeLength(c),r={l:P-r,i:F}),c=d.splitBezierAtT(c,t),F%2||b.push(c[0]),c=c[1],++F,P=a[F%a.length];return r}function K(c,a,b,l){var r=[a.last.x,a.last.y].concat(b),t=!(c instanceof Array);
b=4===b.length?"quadraticCurveTo":"bezierCurveTo";var F=[];a=k(r,a.canvasDash,F,l);for(l=0;l<F.length;++l)r=F[l],t?(c.moveTo(r[0],r[1]),c[b].apply(c,r.slice(2))):(c.push("moveTo",[r[0],r[1]]),c.push(b,r.slice(2)));return a}function N(c,a,b,l,r,t,F){var P=0,O=0,R=0,S=d.distance(b,l,r,t),T=0;a=a.canvasDash;var X=b,Z=l,aa=!(c instanceof Array);F?(R=F.l,T=F.i):R+=a[0];for(;.01<Math.abs(1-O);){R>S&&(P={l:R-S,i:T},R=S);O=R/S;F=b+(r-b)*O;var ba=l+(t-l)*O;T++%2||(aa?(c.moveTo(X,Z),c.lineTo(F,ba)):(c.push("moveTo",
[X,Z]),c.push("lineTo",[F,ba])));X=F;Z=ba;R+=a[T%a.length]}return P}var L=u.canvas={},U=null,Q=x.multiplyPoint,W=Math.PI,V=2*W,Y=W/2;m=B.extend;if(J.global.CanvasRenderingContext2D){J=J.doc.createElement("canvas").getContext("2d");var M="function"==typeof J.setLineDash,g="function"==typeof J.fillText}var w={solid:"none",shortdash:[4,1],shortdot:[1,1],shortdashdot:[4,1,1,1],shortdashdotdot:[4,1,1,1,1,1],dot:[1,3],dash:[4,3],longdash:[8,3],dashdot:[4,3,1,3],longdashdot:[8,3,1,3],longdashdotdot:[8,3,
1,3,1,3]};L.Shape=I("dojox.gfx.canvas.Shape",n.Shape,{_render:function(c){c.save();this._renderTransform(c);this._renderClip(c);this._renderShape(c);this._renderFill(c,!0);this._renderStroke(c,!0);c.restore()},_renderClip:function(c){this.canvasClip&&(this.canvasClip.render(c),c.clip())},_renderTransform:function(c){if("canvasTransform"in this){var a=this.canvasTransform;c.translate(a.dx,a.dy);c.rotate(a.angle2);c.scale(a.sx,a.sy);c.rotate(a.angle1)}},_renderShape:function(c){},_renderFill:function(c,
a){if("canvasFill"in this){var b=this.fillStyle;if("canvasFillImage"in this){var l=b.width,r=b.height,t=this.canvasFillImage.width,F=this.canvasFillImage.height,P=Math.min(l==t?1:l/t,r==F?1:r/F),O=(l-P*t)/2,R=(r-P*F)/2;U.width=l;U.height=r;var S=U.getContext("2d");S.clearRect(0,0,l,r);S.drawImage(this.canvasFillImage,0,0,t,F,O,R,P*t,P*F);this.canvasFill=c.createPattern(U,"repeat");delete this.canvasFillImage}c.fillStyle=this.canvasFill;a&&("pattern"!==b.type||0===b.x&&0===b.y||c.translate(b.x,b.y),
c.fill())}else c.fillStyle="rgba(0,0,0,0.0)"},_renderStroke:function(c,a){var b=this.strokeStyle;b?(c.strokeStyle=b.color.toString(),c.lineWidth=b.width,c.lineCap=b.cap,"number"==typeof b.join?(c.lineJoin="miter",c.miterLimit=b.join):c.lineJoin=b.join,this.canvasDash?M?(c.setLineDash(this.canvasDash),a&&c.stroke()):this._renderDashedStroke(c,a):a&&c.stroke()):a||(c.strokeStyle="rgba(0,0,0,0.0)")},_renderDashedStroke:function(c,a){},getEventSource:function(){return null},on:function(){},connect:function(){},
disconnect:function(){},canvasClip:null,setClip:function(c){this.inherited(arguments);var a=c?"width"in c?"rect":"cx"in c?"ellipse":"points"in c?"polyline":"d"in c?"path":null:null;if(c&&!a)return this;this.canvasClip=c?H(a,c):null;this.parent&&this.parent._makeDirty();return this}});var H=function(c,a){switch(c){case "ellipse":return{canvasEllipse:e({shape:a}),render:function(b){return L.Ellipse.prototype._renderShape.call(this,b)}};case "rect":return{shape:B.delegate(a,{r:0}),render:function(b){return L.Rect.prototype._renderShape.call(this,
b)}};case "path":return{canvasPath:E(a),render:function(b){this.canvasPath._renderShape(b)}};case "polyline":return{canvasPolyline:a.points,render:function(b){return L.Polyline.prototype._renderShape.call(this,b)}}}return null},E=function(c){var a=new dojox.gfx.canvas.Path;a.canvasPath=[];a._setPath(c.d);return a},D=function(c,a,b){var l=c.prototype[a];c.prototype[a]=b?function(){this.parent&&this.parent._makeDirty();l.apply(this,arguments);b.call(this);return this}:function(){this.parent&&this.parent._makeDirty();
return l.apply(this,arguments)}};D(L.Shape,"setTransform",function(){this.matrix?this.canvasTransform=u.decompose(this.matrix):delete this.canvasTransform});D(L.Shape,"setFill",function(){var c=this.fillStyle;if(c){if("object"==typeof c&&"type"in c){var a=this.surface.rawNode.getContext("2d");switch(c.type){case "linear":case "radial":var b="linear"==c.type?a.createLinearGradient(c.x1,c.y1,c.x2,c.y2):a.createRadialGradient(c.cx,c.cy,0,c.cx,c.cy,c.r);C.forEach(c.colors,function(l){b.addColorStop(l.offset,
u.normalizeColor(l.color).toString())});break;case "pattern":U||(U=document.createElement("canvas")),a=new Image,this.surface.downloadImage(a,c.src),this.canvasFillImage=a}}else b=c.toString();this.canvasFill=b}else delete this.canvasFill});D(L.Shape,"setStroke",function(){var c=this.strokeStyle;if(c){var a=this.strokeStyle.style.toLowerCase();a in w&&(a=w[a]);if(a instanceof Array){this.canvasDash=a=a.slice();var b;for(b=0;b<a.length;++b)a[b]*=c.width;if("butt"!=c.cap){for(b=0;b<a.length;b+=2)a[b]-=
c.width,1>a[b]&&(a[b]=1);for(b=1;b<a.length;b+=2)a[b]+=c.width}}else delete this.canvasDash}else delete this.canvasDash;this._needsDash=!M&&!!this.canvasDash});D(L.Shape,"setShape");L.Group=I("dojox.gfx.canvas.Group",L.Shape,{constructor:function(){n.Container._init.call(this)},_render:function(c){c.save();this._renderTransform(c);this._renderClip(c);for(var a=0;a<this.children.length;++a)this.children[a]._render(c);c.restore()},destroy:function(){n.Container.clear.call(this,!0);L.Shape.prototype.destroy.apply(this,
arguments)}});L.Rect=I("dojox.gfx.canvas.Rect",[L.Shape,n.Rect],{_renderShape:function(c){var a=this.shape,b=Math.min(a.r,a.height/2,a.width/2),l=a.x,r=l+a.width,t=a.y;a=t+a.height;var F=l+b,P=r-b,O=t+b,R=a-b;c.beginPath();c.moveTo(F,t);b?(c.arc(P,O,b,-Y,0,!1),c.arc(P,R,b,0,Y,!1),c.arc(F,R,b,Y,W,!1),c.arc(F,O,b,W,W+Y,!1)):(c.lineTo(P,t),c.lineTo(r,R),c.lineTo(F,a),c.lineTo(l,O));c.closePath()},_renderDashedStroke:function(c,a){var b=this.shape,l=Math.min(b.r,b.height/2,b.width/2),r=b.x,t=r+b.width,
F=b.y,P=F+b.height,O=r+l,R=t-l,S=F+l,T=P-l;l?(c.beginPath(),b=N(c,this,O,F,R,F),a&&c.stroke(),b=y(c,this.canvasDash,R,S,l,-Y,0,!1,a,b),c.beginPath(),b=N(c,this,t,S,t,T,b),a&&c.stroke(),b=y(c,this.canvasDash,R,T,l,0,Y,!1,a,b),c.beginPath(),b=N(c,this,R,P,O,P,b),a&&c.stroke(),b=y(c,this.canvasDash,O,T,l,Y,W,!1,a,b),c.beginPath(),b=N(c,this,r,T,r,S,b),a&&c.stroke(),y(c,this.canvasDash,O,S,l,W,W+Y,!1,a,b)):(c.beginPath(),b=N(c,this,O,F,R,F),b=N(c,this,R,F,t,T,b),b=N(c,this,t,T,O,P,b),N(c,this,O,P,r,S,
b),a&&c.stroke())}});var G=[];(function(){var c=f.curvePI4;G.push(c.s,c.c1,c.c2,c.e);for(var a=45;360>a;a+=45){var b=x.rotateg(a);G.push(Q(b,c.c1),Q(b,c.c2),Q(b,c.e))}})();var e=function(c){var a=[],b=c.shape,l=x.normalize([x.translate(b.cx,b.cy),x.scale(b.rx,b.ry)]);var r=Q(l,G[0]);a.push([r.x,r.y]);for(b=1;b<G.length;b+=3){var t=Q(l,G[b]);var F=Q(l,G[b+1]);r=Q(l,G[b+2]);a.push([t.x,t.y,F.x,F.y,r.x,r.y])}if(c._needsDash){r=[];t=a[0];for(b=1;b<a.length;++b)F=[],k(t.concat(a[b]),c.canvasDash,F),t=
[a[b][4],a[b][5]],r.push(F);c._dashedPoints=r}return a};L.Ellipse=I("dojox.gfx.canvas.Ellipse",[L.Shape,n.Ellipse],{setShape:function(){this.inherited(arguments);this.canvasEllipse=e(this);return this},setStroke:function(){this.inherited(arguments);M||(this.canvasEllipse=e(this));return this},_renderShape:function(c){var a=this.canvasEllipse,b;c.beginPath();c.moveTo.apply(c,a[0]);for(b=1;b<a.length;++b)c.bezierCurveTo.apply(c,a[b]);c.closePath()},_renderDashedStroke:function(c,a){var b=this._dashedPoints;
c.beginPath();for(var l=0;l<b.length;++l)for(var r=b[l],t=0;t<r.length;++t){var F=r[t];c.moveTo(F[0],F[1]);c.bezierCurveTo(F[2],F[3],F[4],F[5],F[6],F[7])}a&&c.stroke()}});L.Circle=I("dojox.gfx.canvas.Circle",[L.Shape,n.Circle],{_renderShape:function(c){var a=this.shape;c.beginPath();c.arc(a.cx,a.cy,a.r,0,V,1)},_renderDashedStroke:function(c,a){var b=this.shape,l=0,r=this.canvasDash.length;for(i=0;l<V;){var t=this.canvasDash[i%r]/b.r;i%2||(c.beginPath(),c.arc(b.cx,b.cy,b.r,l,l+t,0),a&&c.stroke());
l+=t;++i}}});L.Line=I("dojox.gfx.canvas.Line",[L.Shape,n.Line],{_renderShape:function(c){var a=this.shape;c.beginPath();c.moveTo(a.x1,a.y1);c.lineTo(a.x2,a.y2)},_renderDashedStroke:function(c,a){var b=this.shape;c.beginPath();N(c,this,b.x1,b.y1,b.x2,b.y2);a&&c.stroke()}});L.Polyline=I("dojox.gfx.canvas.Polyline",[L.Shape,n.Polyline],{setShape:function(){this.inherited(arguments);var c=this.shape.points,a=c[0],b;this.bbox=null;this._normalizePoints();if(c.length)if("number"==typeof a)a=c;else for(a=
[],b=0;b<c.length;++b){var l=c[b];a.push(l.x,l.y)}else a=[];this.canvasPolyline=a;return this},_renderShape:function(c){var a=this.canvasPolyline;if(a.length){c.beginPath();c.moveTo(a[0],a[1]);for(var b=2;b<a.length;b+=2)c.lineTo(a[b],a[b+1])}},_renderDashedStroke:function(c,a){var b=this.canvasPolyline,l=0;c.beginPath();for(var r=0;r<b.length;r+=2)l=N(c,this,b[r],b[r+1],b[r+2],b[r+3],l);a&&c.stroke()}});L.Image=I("dojox.gfx.canvas.Image",[L.Shape,n.Image],{setShape:function(){this.inherited(arguments);
var c=new Image;this.surface.downloadImage(c,this.shape.src);this.canvasImage=c;return this},_renderShape:function(c){var a=this.shape;c.drawImage(this.canvasImage,a.x,a.y,a.width,a.height)}});L.Text=I("dojox.gfx.canvas.Text",[L.Shape,n.Text],{_setFont:function(){this.fontStyle?this.canvasFont=u.makeFontString(this.fontStyle):delete this.canvasFont},getTextWidth:function(){var c=this.shape,a=0;if(c.text){var b=this.surface.rawNode.getContext("2d");b.save();this._renderTransform(b);this._renderFill(b,
!1);this._renderStroke(b,!1);this.canvasFont&&(b.font=this.canvasFont);a=b.measureText(c.text).width;b.restore()}return a},_render:function(c){c.save();this._renderTransform(c);this._renderFill(c,!1);this._renderStroke(c,!1);this._renderShape(c);c.restore()},_renderShape:function(c){var a=this.shape;a.text&&(c.textAlign="middle"===a.align?"center":a.align,this.canvasFont&&(c.font=this.canvasFont),this.canvasFill&&c.fillText(a.text,a.x,a.y),this.strokeStyle&&(c.beginPath(),c.strokeText(a.text,a.x,
a.y),c.closePath()))}});D(L.Text,"setFont");g||L.Text.extend({getTextWidth:function(){return 0},getBoundingBox:function(){return null},_renderShape:function(){}});var z={M:"_moveToA",m:"_moveToR",L:"_lineToA",l:"_lineToR",H:"_hLineToA",h:"_hLineToR",V:"_vLineToA",v:"_vLineToR",C:"_curveToA",c:"_curveToR",S:"_smoothCurveToA",s:"_smoothCurveToR",Q:"_qCurveToA",q:"_qCurveToR",T:"_qSmoothCurveToA",t:"_qSmoothCurveToR",A:"_arcTo",a:"_arcTo",Z:"_closePath",z:"_closePath"};L.Path=I("dojox.gfx.canvas.Path",
[L.Shape,h.Path],{constructor:function(){this.lastControl={}},setShape:function(){this.canvasPath=[];this._dashedPath=[];return this.inherited(arguments)},setStroke:function(){this.inherited(arguments);M||(this.segmented=!1,this._confirmSegmented());return this},_setPath:function(){this._dashResidue=null;this.inherited(arguments)},_updateWithSegment:function(c){var a=B.clone(this.last);this[z[c.action]](this.canvasPath,c.action,c.args,this._needsDash?this._dashedPath:null);this.last=a;this.inherited(arguments)},
_renderShape:function(c){var a=this.canvasPath;c.beginPath();for(var b=0;b<a.length;b+=2)c[a[b]].apply(c,a[b+1])},_renderDashedStroke:M?function(){}:function(c,a){var b=this._dashedPath;c.beginPath();for(var l=0;l<b.length;l+=2)c[b[l]].apply(c,b[l+1]);a&&c.stroke()},_moveToA:function(c,a,b,l){c.push("moveTo",[b[0],b[1]]);l&&l.push("moveTo",[b[0],b[1]]);for(a=2;a<b.length;a+=2)c.push("lineTo",[b[a],b[a+1]]),l&&(this._dashResidue=N(l,this,b[a-2],b[a-1],b[a],b[a+1],this._dashResidue));this.last.x=b[b.length-
2];this.last.y=b[b.length-1];this.lastControl={}},_moveToR:function(c,a,b,l){a="x"in this.last?[this.last.x+=b[0],this.last.y+=b[1]]:[this.last.x=b[0],this.last.y=b[1]];c.push("moveTo",a);l&&l.push("moveTo",a);for(a=2;a<b.length;a+=2)c.push("lineTo",[this.last.x+=b[a],this.last.y+=b[a+1]]),l&&(this._dashResidue=N(l,this,l[l.length-1][0],l[l.length-1][1],this.last.x,this.last.y,this._dashResidue));this.lastControl={}},_lineToA:function(c,a,b,l){for(a=0;a<b.length;a+=2)l&&(this._dashResidue=N(l,this,
this.last.x,this.last.y,b[a],b[a+1],this._dashResidue)),c.push("lineTo",[b[a],b[a+1]]);this.last.x=b[b.length-2];this.last.y=b[b.length-1];this.lastControl={}},_lineToR:function(c,a,b,l){for(a=0;a<b.length;a+=2)c.push("lineTo",[this.last.x+=b[a],this.last.y+=b[a+1]]),l&&(this._dashResidue=N(l,this,l[l.length-1][0],l[l.length-1][1],this.last.x,this.last.y,this._dashResidue));this.lastControl={}},_hLineToA:function(c,a,b,l){for(a=0;a<b.length;++a)c.push("lineTo",[b[a],this.last.y]),l&&(this._dashResidue=
N(l,this,l[l.length-1][0],l[l.length-1][1],b[a],this.last.y,this._dashResidue));this.last.x=b[b.length-1];this.lastControl={}},_hLineToR:function(c,a,b,l){for(a=0;a<b.length;++a)c.push("lineTo",[this.last.x+=b[a],this.last.y]),l&&(this._dashResidue=N(l,this,l[l.length-1][0],l[l.length-1][1],this.last.x,this.last.y,this._dashResidue));this.lastControl={}},_vLineToA:function(c,a,b,l){for(a=0;a<b.length;++a)c.push("lineTo",[this.last.x,b[a]]),l&&(this._dashResidue=N(l,this,l[l.length-1][0],l[l.length-
1][1],this.last.x,b[a],this._dashResidue));this.last.y=b[b.length-1];this.lastControl={}},_vLineToR:function(c,a,b,l){for(a=0;a<b.length;++a)c.push("lineTo",[this.last.x,this.last.y+=b[a]]),l&&(this._dashResidue=N(l,this,l[l.length-1][0],l[l.length-1][1],this.last.x,this.last.y,this._dashResidue));this.lastControl={}},_curveToA:function(c,a,b,l){for(a=0;a<b.length;a+=6)c.push("bezierCurveTo",b.slice(a,a+6)),l&&(this._dashResidue=K(l,this,c[c.length-1],this._dashResidue));this.last.x=b[b.length-2];
this.last.y=b[b.length-1];this.lastControl.x=b[b.length-4];this.lastControl.y=b[b.length-3];this.lastControl.type="C"},_curveToR:function(c,a,b,l){for(a=0;a<b.length;a+=6)c.push("bezierCurveTo",[this.last.x+b[a],this.last.y+b[a+1],this.lastControl.x=this.last.x+b[a+2],this.lastControl.y=this.last.y+b[a+3],this.last.x+b[a+4],this.last.y+b[a+5]]),l&&(this._dashResidue=K(l,this,c[c.length-1],this._dashResidue)),this.last.x+=b[a+4],this.last.y+=b[a+5];this.lastControl.type="C"},_smoothCurveToA:function(c,
a,b,l){for(a=0;a<b.length;a+=4){var r="C"==this.lastControl.type;c.push("bezierCurveTo",[r?2*this.last.x-this.lastControl.x:this.last.x,r?2*this.last.y-this.lastControl.y:this.last.y,b[a],b[a+1],b[a+2],b[a+3]]);l&&(this._dashResidue=K(l,this,c[c.length-1],this._dashResidue));this.lastControl.x=b[a];this.lastControl.y=b[a+1];this.lastControl.type="C"}this.last.x=b[b.length-2];this.last.y=b[b.length-1]},_smoothCurveToR:function(c,a,b,l){for(a=0;a<b.length;a+=4){var r="C"==this.lastControl.type;c.push("bezierCurveTo",
[r?2*this.last.x-this.lastControl.x:this.last.x,r?2*this.last.y-this.lastControl.y:this.last.y,this.last.x+b[a],this.last.y+b[a+1],this.last.x+b[a+2],this.last.y+b[a+3]]);l&&(this._dashResidue=K(l,this,c[c.length-1],this._dashResidue));this.lastControl.x=this.last.x+b[a];this.lastControl.y=this.last.y+b[a+1];this.lastControl.type="C";this.last.x+=b[a+2];this.last.y+=b[a+3]}},_qCurveToA:function(c,a,b,l){for(a=0;a<b.length;a+=4)c.push("quadraticCurveTo",b.slice(a,a+4));l&&(this._dashResidue=K(l,this,
c[c.length-1],this._dashResidue));this.last.x=b[b.length-2];this.last.y=b[b.length-1];this.lastControl.x=b[b.length-4];this.lastControl.y=b[b.length-3];this.lastControl.type="Q"},_qCurveToR:function(c,a,b,l){for(a=0;a<b.length;a+=4)c.push("quadraticCurveTo",[this.lastControl.x=this.last.x+b[a],this.lastControl.y=this.last.y+b[a+1],this.last.x+b[a+2],this.last.y+b[a+3]]),l&&(this._dashResidue=K(l,this,c[c.length-1],this._dashResidue)),this.last.x+=b[a+2],this.last.y+=b[a+3];this.lastControl.type="Q"},
_qSmoothCurveToA:function(c,a,b,l){for(a=0;a<b.length;a+=2){var r="Q"==this.lastControl.type;c.push("quadraticCurveTo",[this.lastControl.x=r?2*this.last.x-this.lastControl.x:this.last.x,this.lastControl.y=r?2*this.last.y-this.lastControl.y:this.last.y,b[a],b[a+1]]);l&&(this._dashResidue=K(l,this,c[c.length-1],this._dashResidue));this.lastControl.type="Q"}this.last.x=b[b.length-2];this.last.y=b[b.length-1]},_qSmoothCurveToR:function(c,a,b,l){for(a=0;a<b.length;a+=2){var r="Q"==this.lastControl.type;
c.push("quadraticCurveTo",[this.lastControl.x=r?2*this.last.x-this.lastControl.x:this.last.x,this.lastControl.y=r?2*this.last.y-this.lastControl.y:this.last.y,this.last.x+b[a],this.last.y+b[a+1]]);l&&(this._dashResidue=K(l,this,c[c.length-1],this._dashResidue));this.lastControl.type="Q";this.last.x+=b[a];this.last.y+=b[a+1]}},_arcTo:function(c,a,b,l){a="a"==a;for(var r=0;r<b.length;r+=7){var t=b[r+5],F=b[r+6];a&&(t+=this.last.x,F+=this.last.y);var P=f.arcAsBezier(this.last,b[r],b[r+1],b[r+2],b[r+
3]?1:0,b[r+4]?1:0,t,F);C.forEach(P,function(O){c.push("bezierCurveTo",O)});l&&(this._dashResidue=K(l,this,p,this._dashResidue));this.last.x=t;this.last.y=F}this.lastControl={}},_closePath:function(c,a,b,l){c.push("closePath",[]);l&&(this._dashResidue=N(l,this,this.last.x,this.last.y,l[1][0],l[1][1],this._dashResidue));this.lastControl={}}});C.forEach("moveTo lineTo hLineTo vLineTo curveTo smoothCurveTo qCurveTo qSmoothCurveTo arcTo closePath".split(" "),function(c){D(L.Path,c)});L.TextPath=I("dojox.gfx.canvas.TextPath",
[L.Shape,h.TextPath],{_renderShape:function(c){},_setText:function(){},_setFont:function(){}});L.Surface=I("dojox.gfx.canvas.Surface",n.Surface,{constructor:function(){n.Container._init.call(this);this.pendingImageCount=0;this.makeDirty()},destroy:function(){n.Container.clear.call(this,!0);this.inherited(arguments)},setDimensions:function(c,a){this.width=u.normalizedLength(c);this.height=u.normalizedLength(a);if(!this.rawNode)return this;c=!1;this.rawNode.width!=this.width&&(this.rawNode.width=this.width,
c=!0);this.rawNode.height!=this.height&&(this.rawNode.height=this.height,c=!0);c&&this.makeDirty();return this},getDimensions:function(){return this.rawNode?{width:this.rawNode.width,height:this.rawNode.height}:null},_render:function(c){!this.rawNode||!c&&this.pendingImageCount||(c=this.rawNode.getContext("2d"),c.clearRect(0,0,this.rawNode.width,this.rawNode.height),this.render(c),"pendingRender"in this&&(clearTimeout(this.pendingRender),delete this.pendingRender))},render:function(c){c.save();for(var a=
0;a<this.children.length;++a)this.children[a]._render(c);c.restore()},makeDirty:function(){this.pendingImagesCount||"pendingRender"in this||this._batch||(this.pendingRender=setTimeout(B.hitch(this,this._render),0))},downloadImage:function(c,a){var b=B.hitch(this,this.onImageLoad);!this.pendingImageCount++&&"pendingRender"in this&&(clearTimeout(this.pendingRender),delete this.pendingRender);c.onload=b;c.onerror=b;c.onabort=b;c.src=a},onImageLoad:function(){--this.pendingImageCount||(this.onImagesLoaded(),
this._render())},onImagesLoaded:function(){},getEventSource:function(){return null},connect:function(){},disconnect:function(){},on:function(){}});L.createSurface=function(c,a,b){if(!a&&!b){var l=v.position(c);a=a||l.w;b=b||l.h}"number"==typeof a&&(a+="px");"number"==typeof b&&(b+="px");l=new L.Surface;c=q.byId(c);var r=c.ownerDocument.createElement("canvas");r.width=u.normalizedLength(a);r.height=u.normalizedLength(b);c.appendChild(r);l.rawNode=r;l._parent=c;return l.surface=l};var A=n.Container;
I={openBatch:function(){++this._batch;return this},closeBatch:function(){this._batch=0<this._batch?--this._batch:0;this._makeDirty();return this},_makeDirty:function(){this._batch||this.surface.makeDirty()},add:function(c){this._makeDirty();return A.add.apply(this,arguments)},remove:function(c,a){this._makeDirty();return A.remove.apply(this,arguments)},clear:function(){this._makeDirty();return A.clear.apply(this,arguments)},getBoundingBox:A.getBoundingBox,_moveChildToFront:function(c){this._makeDirty();
return A._moveChildToFront.apply(this,arguments)},_moveChildToBack:function(c){this._makeDirty();return A._moveChildToBack.apply(this,arguments)}};h={createObject:function(c,a){c=new c;c.surface=this.surface;c.setShape(a);this.add(c);return c}};m(L.Group,I);m(L.Group,n.Creator);m(L.Group,h);m(L.Surface,I);m(L.Surface,n.Creator);m(L.Surface,h);L.fixTarget=function(c,a){return!0};return L})},"dojox/gfx/shape":function(){define("./_base dojo/_base/lang dojo/_base/declare dojo/_base/kernel dojo/_base/sniff dojo/on dojo/_base/array dojo/dom-construct dojo/_base/Color ./matrix".split(" "),
function(u,B,C,I,J,v,q,n,h,f){function x(d,y){for(var k=d.length-1;y<k;)d[y]=d[++y];d.length=k}var m=u.shape={};m.Shape=C("dojox.gfx.shape.Shape",null,{constructor:function(){this.parentMatrix=this.parent=this.bbox=this.strokeStyle=this.fillStyle=this.matrix=this.shape=this.rawNode=null;if(J("gfxRegistry")){var d=m.register(this);this.getUID=function(){return d}}},destroy:function(){J("gfxRegistry")&&m.dispose(this);this.rawNode&&"__gfxObject__"in this.rawNode&&(this.rawNode.__gfxObject__=null);this.rawNode=
null},getNode:function(){return this.rawNode},getShape:function(){return this.shape},getTransform:function(){return this.matrix},getFill:function(){return this.fillStyle},getStroke:function(){return this.strokeStyle},getParent:function(){return this.parent},getBoundingBox:function(){return this.bbox},getTransformedBoundingBox:function(){var d=this.getBoundingBox();if(!d)return null;var y=this._getRealMatrix();return[f.multiplyPoint(y,d.x,d.y),f.multiplyPoint(y,d.x+d.width,d.y),f.multiplyPoint(y,d.x+
d.width,d.y+d.height),f.multiplyPoint(y,d.x,d.y+d.height)]},getEventSource:function(){return this.rawNode},setClip:function(d){this.clip=d},getClip:function(){return this.clip},setShape:function(d){this.shape=u.makeParameters(this.shape,d);this.bbox=null;return this},setFill:function(d){if(!d)return this.fillStyle=null,this;var y=null;if("object"==typeof d&&"type"in d)switch(d.type){case "linear":y=u.makeParameters(u.defaultLinearGradient,d);break;case "radial":y=u.makeParameters(u.defaultRadialGradient,
d);break;case "pattern":y=u.makeParameters(u.defaultPattern,d)}else y=u.normalizeColor(d);this.fillStyle=y;return this},setStroke:function(d){if(!d)return this.strokeStyle=null,this;if("string"==typeof d||B.isArray(d)||d instanceof h)d={color:d};d=this.strokeStyle=u.makeParameters(u.defaultStroke,d);d.color=u.normalizeColor(d.color);return this},setTransform:function(d){this.matrix=f.clone(d?f.normalize(d):f.identity);return this._applyTransform()},_applyTransform:function(){return this},moveToFront:function(){var d=
this.getParent();d&&(d._moveChildToFront(this),this._moveToFront());return this},moveToBack:function(){var d=this.getParent();d&&(d._moveChildToBack(this),this._moveToBack());return this},_moveToFront:function(){},_moveToBack:function(){},applyRightTransform:function(d){return d?this.setTransform([this.matrix,d]):this},applyLeftTransform:function(d){return d?this.setTransform([d,this.matrix]):this},applyTransform:function(d){return d?this.setTransform([this.matrix,d]):this},removeShape:function(d){this.parent&&
this.parent.remove(this,d);return this},_setParent:function(d,y){this.parent=d;return this._updateParentMatrix(y)},_updateParentMatrix:function(d){this.parentMatrix=d?f.clone(d):null;return this._applyTransform()},_getRealMatrix:function(){for(var d=this.matrix,y=this.parent;y;)y.matrix&&(d=f.multiply(y.matrix,d)),y=y.parent;return d}});m._eventsProcessing={on:function(d,y){return v(this.getEventSource(),d,m.fixCallback(this,u.fixTarget,y))},connect:function(d,y,k){"on"==d.substring(0,2)&&(d=d.substring(2));
return this.on(d,k?B.hitch(y,k):y)},disconnect:function(d){return d.remove()}};m.fixCallback=function(d,y,k,K){K||(K=k,k=null);if(B.isString(K)){k=k||I.global;if(!k[K])throw['dojox.gfx.shape.fixCallback: scope["',K,'"] is null (scope\x3d"',k,'")'].join("");return function(N){return y(N,d)?k[K].apply(k,arguments||[]):void 0}}return k?function(N){return y(N,d)?K.apply(k,arguments||[]):void 0}:function(N){return y(N,d)?K.apply(k,arguments):void 0}};B.extend(m.Shape,m._eventsProcessing);m.Container={_init:function(){this.children=
[];this._batch=0},openBatch:function(){return this},closeBatch:function(){return this},add:function(d){var y=d.getParent();y&&y.remove(d,!0);this.children.push(d);return d._setParent(this,this._getRealMatrix())},remove:function(d,y){for(var k=0;k<this.children.length;++k)if(this.children[k]==d){y||(d.parent=null,d.parentMatrix=null);x(this.children,k);break}return this},clear:function(d){for(var y,k=0;k<this.children.length;++k)y=this.children[k],y.parent=null,y.parentMatrix=null,d&&y.destroy();this.children=
[];return this},getBoundingBox:function(){if(this.children){var d=null;q.forEach(this.children,function(y){var k=y.getBoundingBox();k&&((y=y.getTransform())&&(k=f.multiplyRectangle(y,k)),d?(d.x=Math.min(d.x,k.x),d.y=Math.min(d.y,k.y),d.endX=Math.max(d.endX,k.x+k.width),d.endY=Math.max(d.endY,k.y+k.height)):d={x:k.x,y:k.y,endX:k.x+k.width,endY:k.y+k.height})});d&&(d.width=d.endX-d.x,d.height=d.endY-d.y);return d}return null},_moveChildToFront:function(d){for(var y=0;y<this.children.length;++y)if(this.children[y]==
d){x(this.children,y);this.children.push(d);break}return this},_moveChildToBack:function(d){for(var y=0;y<this.children.length;++y)if(this.children[y]==d){x(this.children,y);this.children.unshift(d);break}return this}};m.Surface=C("dojox.gfx.shape.Surface",null,{constructor:function(){this._parent=this.rawNode=null;this._nodes=[];this._events=[]},destroy:function(){q.forEach(this._nodes,n.destroy);this._nodes=[];q.forEach(this._events,function(d){d&&d.remove()});this._events=[];this.rawNode=null;
if(J("ie"))for(;this._parent.lastChild;)n.destroy(this._parent.lastChild);else this._parent.innerHTML="";this._parent=null},getEventSource:function(){return this.rawNode},_getRealMatrix:function(){return null},isLoaded:!0,onLoad:function(d){},whenLoaded:function(d,y){var k=B.hitch(d,y);if(this.isLoaded)k(this);else v.once(this,"load",function(K){k(K)})}});B.extend(m.Surface,m._eventsProcessing);m.Rect=C("dojox.gfx.shape.Rect",m.Shape,{constructor:function(d){this.shape=u.getDefault("Rect");this.rawNode=
d},getBoundingBox:function(){return this.shape}});m.Ellipse=C("dojox.gfx.shape.Ellipse",m.Shape,{constructor:function(d){this.shape=u.getDefault("Ellipse");this.rawNode=d},getBoundingBox:function(){if(!this.bbox){var d=this.shape;this.bbox={x:d.cx-d.rx,y:d.cy-d.ry,width:2*d.rx,height:2*d.ry}}return this.bbox}});m.Circle=C("dojox.gfx.shape.Circle",m.Shape,{constructor:function(d){this.shape=u.getDefault("Circle");this.rawNode=d},getBoundingBox:function(){if(!this.bbox){var d=this.shape;this.bbox={x:d.cx-
d.r,y:d.cy-d.r,width:2*d.r,height:2*d.r}}return this.bbox}});m.Line=C("dojox.gfx.shape.Line",m.Shape,{constructor:function(d){this.shape=u.getDefault("Line");this.rawNode=d},getBoundingBox:function(){if(!this.bbox){var d=this.shape;this.bbox={x:Math.min(d.x1,d.x2),y:Math.min(d.y1,d.y2),width:Math.abs(d.x2-d.x1),height:Math.abs(d.y2-d.y1)}}return this.bbox}});m.Polyline=C("dojox.gfx.shape.Polyline",m.Shape,{constructor:function(d){this.shape=u.getDefault("Polyline");this.rawNode=d},setShape:function(d,
y){d&&d instanceof Array?(this.inherited(arguments,[{points:d}]),y&&this.shape.points.length&&this.shape.points.push(this.shape.points[0])):this.inherited(arguments,[d]);return this},_normalizePoints:function(){var d=this.shape.points,y=d&&d.length;if(y&&"number"==typeof d[0]){for(var k=[],K=0;K<y;K+=2)k.push({x:d[K],y:d[K+1]});this.shape.points=k}},getBoundingBox:function(){if(!this.bbox&&this.shape.points.length){for(var d=this.shape.points,y=d.length,k=d[0],K=k.x,N=k.y,L=k.x,U=k.y,Q=1;Q<y;++Q)k=
d[Q],K>k.x&&(K=k.x),L<k.x&&(L=k.x),N>k.y&&(N=k.y),U<k.y&&(U=k.y);this.bbox={x:K,y:N,width:L-K,height:U-N}}return this.bbox}});m.Image=C("dojox.gfx.shape.Image",m.Shape,{constructor:function(d){this.shape=u.getDefault("Image");this.rawNode=d},getBoundingBox:function(){return this.shape},setStroke:function(){return this},setFill:function(){return this}});m.Text=C(m.Shape,{constructor:function(d){this.fontStyle=null;this.shape=u.getDefault("Text");this.rawNode=d},getFont:function(){return this.fontStyle},
setFont:function(d){this.fontStyle="string"==typeof d?u.splitFontString(d):u.makeParameters(u.defaultFont,d);this._setFont();return this},getBoundingBox:function(){var d=null;this.getShape().text&&(d=u._base._computeTextBoundingBox(this));return d}});m.Creator={createShape:function(d){switch(d.type){case u.defaultPath.type:return this.createPath(d);case u.defaultRect.type:return this.createRect(d);case u.defaultCircle.type:return this.createCircle(d);case u.defaultEllipse.type:return this.createEllipse(d);
case u.defaultLine.type:return this.createLine(d);case u.defaultPolyline.type:return this.createPolyline(d);case u.defaultImage.type:return this.createImage(d);case u.defaultText.type:return this.createText(d);case u.defaultTextPath.type:return this.createTextPath(d)}return null},createGroup:function(){return this.createObject(u.Group)},createRect:function(d){return this.createObject(u.Rect,d)},createEllipse:function(d){return this.createObject(u.Ellipse,d)},createCircle:function(d){return this.createObject(u.Circle,
d)},createLine:function(d){return this.createObject(u.Line,d)},createPolyline:function(d){return this.createObject(u.Polyline,d)},createImage:function(d){return this.createObject(u.Image,d)},createText:function(d){return this.createObject(u.Text,d)},createPath:function(d){return this.createObject(u.Path,d)},createTextPath:function(d){return this.createObject(u.TextPath,{}).setText(d)},createObject:function(d,y){return null}};return m})},"dojox/gfx/path":function(){define(["./_base","dojo/_base/lang",
"dojo/_base/declare","./matrix","./shape"],function(u,B,C,I,J){J=C("dojox.gfx.path.Path",J.Shape,{constructor:function(v){this.shape=B.clone(u.defaultPath);this.segments=[];this.tbbox=null;this.absolute=!0;this.last={};this.rawNode=v;this.segmented=!1},setAbsoluteMode:function(v){this._confirmSegmented();this.absolute="string"==typeof v?"absolute"==v:v;return this},getAbsoluteMode:function(){this._confirmSegmented();return this.absolute},getBoundingBox:function(){this._confirmSegmented();return this.bbox&&
"l"in this.bbox?{x:this.bbox.l,y:this.bbox.t,width:this.bbox.r-this.bbox.l,height:this.bbox.b-this.bbox.t}:null},_getRealBBox:function(){this._confirmSegmented();if(this.tbbox)return this.tbbox;var v=this.bbox,q=this._getRealMatrix();this.bbox=null;for(var n=0,h=this.segments.length;n<h;++n)this._updateWithSegment(this.segments[n],q);q=this.bbox;this.bbox=v;return this.tbbox=q?[{x:q.l,y:q.t},{x:q.r,y:q.t},{x:q.r,y:q.b},{x:q.l,y:q.b}]:null},getLastPosition:function(){this._confirmSegmented();return"x"in
this.last?this.last:null},_applyTransform:function(){this.tbbox=null;return this.inherited(arguments)},_updateBBox:function(v,q,n){n&&(q=I.multiplyPoint(n,v,q),v=q.x,q=q.y);this.bbox&&"l"in this.bbox?(this.bbox.l>v&&(this.bbox.l=v),this.bbox.r<v&&(this.bbox.r=v),this.bbox.t>q&&(this.bbox.t=q),this.bbox.b<q&&(this.bbox.b=q)):this.bbox={l:v,b:q,r:v,t:q}},_updateWithSegment:function(v,q){var n=v.args,h=n.length,f;switch(v.action){case "M":case "L":case "C":case "S":case "Q":case "T":for(f=0;f<h;f+=2)this._updateBBox(n[f],
n[f+1],q);this.last.x=n[h-2];this.last.y=n[h-1];this.absolute=!0;break;case "H":for(f=0;f<h;++f)this._updateBBox(n[f],this.last.y,q);this.last.x=n[h-1];this.absolute=!0;break;case "V":for(f=0;f<h;++f)this._updateBBox(this.last.x,n[f],q);this.last.y=n[h-1];this.absolute=!0;break;case "m":f=0;"x"in this.last||(this._updateBBox(this.last.x=n[0],this.last.y=n[1],q),f=2);for(;f<h;f+=2)this._updateBBox(this.last.x+=n[f],this.last.y+=n[f+1],q);this.absolute=!1;break;case "l":case "t":for(f=0;f<h;f+=2)this._updateBBox(this.last.x+=
n[f],this.last.y+=n[f+1],q);this.absolute=!1;break;case "h":for(f=0;f<h;++f)this._updateBBox(this.last.x+=n[f],this.last.y,q);this.absolute=!1;break;case "v":for(f=0;f<h;++f)this._updateBBox(this.last.x,this.last.y+=n[f],q);this.absolute=!1;break;case "c":for(f=0;f<h;f+=6)this._updateBBox(this.last.x+n[f],this.last.y+n[f+1],q),this._updateBBox(this.last.x+n[f+2],this.last.y+n[f+3],q),this._updateBBox(this.last.x+=n[f+4],this.last.y+=n[f+5],q);this.absolute=!1;break;case "s":case "q":for(f=0;f<h;f+=
4)this._updateBBox(this.last.x+n[f],this.last.y+n[f+1],q),this._updateBBox(this.last.x+=n[f+2],this.last.y+=n[f+3],q);this.absolute=!1;break;case "A":for(f=0;f<h;f+=7)this._updateBBox(n[f+5],n[f+6],q);this.last.x=n[h-2];this.last.y=n[h-1];this.absolute=!0;break;case "a":for(f=0;f<h;f+=7)this._updateBBox(this.last.x+=n[f+5],this.last.y+=n[f+6],q);this.absolute=!1}v=[v.action];for(f=0;f<h;++f)v.push(u.formatNumber(n[f],!0));if("string"==typeof this.shape.path)this.shape.path+=v.join("");else for(f=
0,h=v.length;f<h;++f)this.shape.path.push(v[f])},_validSegments:{m:2,l:2,h:1,v:1,c:6,s:4,q:4,t:2,a:7,z:0},_pushSegment:function(v,q){this.tbbox=null;var n=this._validSegments[v.toLowerCase()];"number"==typeof n&&(n?q.length>=n&&(v={action:v,args:q.slice(0,q.length-q.length%n)},this.segments.push(v),this._updateWithSegment(v)):(v={action:v,args:[]},this.segments.push(v),this._updateWithSegment(v)))},_collectArgs:function(v,q){for(var n=0;n<q.length;++n){var h=q[n];"boolean"==typeof h?v.push(h?1:0):
"number"==typeof h?v.push(h):h instanceof Array?this._collectArgs(v,h):"x"in h&&"y"in h&&v.push(h.x,h.y)}},moveTo:function(){this._confirmSegmented();var v=[];this._collectArgs(v,arguments);this._pushSegment(this.absolute?"M":"m",v);return this},lineTo:function(){this._confirmSegmented();var v=[];this._collectArgs(v,arguments);this._pushSegment(this.absolute?"L":"l",v);return this},hLineTo:function(){this._confirmSegmented();var v=[];this._collectArgs(v,arguments);this._pushSegment(this.absolute?
"H":"h",v);return this},vLineTo:function(){this._confirmSegmented();var v=[];this._collectArgs(v,arguments);this._pushSegment(this.absolute?"V":"v",v);return this},curveTo:function(){this._confirmSegmented();var v=[];this._collectArgs(v,arguments);this._pushSegment(this.absolute?"C":"c",v);return this},smoothCurveTo:function(){this._confirmSegmented();var v=[];this._collectArgs(v,arguments);this._pushSegment(this.absolute?"S":"s",v);return this},qCurveTo:function(){this._confirmSegmented();var v=
[];this._collectArgs(v,arguments);this._pushSegment(this.absolute?"Q":"q",v);return this},qSmoothCurveTo:function(){this._confirmSegmented();var v=[];this._collectArgs(v,arguments);this._pushSegment(this.absolute?"T":"t",v);return this},arcTo:function(){this._confirmSegmented();var v=[];this._collectArgs(v,arguments);this._pushSegment(this.absolute?"A":"a",v);return this},closePath:function(){this._confirmSegmented();this._pushSegment("Z",[]);return this},_confirmSegmented:function(){if(!this.segmented){var v=
this.shape.path;this.shape.path=[];this._setPath(v);this.shape.path=this.shape.path.join("");this.segmented=!0}},_setPath:function(v){v=B.isArray(v)?v:v.match(u.pathSvgRegExp);this.segments=[];this.absolute=!0;this.bbox={};this.last={};if(v){for(var q="",n=[],h=v.length,f=0;f<h;++f){var x=v[f],m=parseFloat(x);isNaN(m)?(q&&this._pushSegment(q,n),n=[],q=x):n.push(m)}this._pushSegment(q,n)}},setShape:function(v){this.inherited(arguments,["string"==typeof v?{path:v}:v]);this.segmented=!1;this.segments=
[];u.lazyPathSegmentation||this._confirmSegmented();return this},_2PI:2*Math.PI});C=C("dojox.gfx.path.TextPath",J,{constructor:function(v){"text"in this||(this.text=B.clone(u.defaultTextPath));"fontStyle"in this||(this.fontStyle=B.clone(u.defaultFont))},getText:function(){return this.text},setText:function(v){this.text=u.makeParameters(this.text,"string"==typeof v?{text:v}:v);this._setText();return this},getFont:function(){return this.fontStyle},setFont:function(v){this.fontStyle="string"==typeof v?
u.splitFontString(v):u.makeParameters(u.defaultFont,v);this._setFont();return this}});return u.path={Path:J,TextPath:C}})},"dojox/gfx/arc":function(){define(["./_base","dojo/_base/lang","./matrix"],function(u,B,C){function I(f){var x=Math.cos(f);f=Math.sin(f);var m={x:x+4/3*(1-x),y:f-4/3*x*(1-x)/f};return{s:{x:x,y:-f},c1:{x:m.x,y:-m.y},c2:m,e:{x:x,y:f}}}var J=2*Math.PI,v=Math.PI/4,q=Math.PI/8,n=v+q,h=I(q);return u.arc={unitArcAsBezier:I,curvePI4:h,arcAsBezier:function(f,x,m,d,y,k,K,N){y=!!y;k=!!k;
var L=C._degToRad(d);d=x*x;var U=m*m,Q=C.multiplyPoint(C.rotate(-L),{x:(f.x-K)/2,y:(f.y-N)/2}),W=Q.x*Q.x,V=Q.y*Q.y;d=Math.sqrt((d*U-d*V-U*W)/(d*V+U*W));isNaN(d)&&(d=0);d={x:d*x*Q.y/m,y:-d*m*Q.x/x};y==k&&(d={x:-d.x,y:-d.y});d=C.multiplyPoint([C.translate((f.x+K)/2,(f.y+N)/2),C.rotate(L)],d);x=C.normalize([C.translate(d.x,d.y),C.rotate(L),C.scale(x,m)]);d=C.invert(x);f=C.multiplyPoint(d,f);N=C.multiplyPoint(d,K,N);K=Math.atan2(f.y,f.x);d=K-Math.atan2(N.y,N.x);k&&(d=-d);0>d?d+=J:d>J&&(d-=J);m=q;N=h;
m=k?m:-m;f=[];for(y=d;0<y;y-=v)y<n&&(m=y/2,N=I(m),m=k?m:-m,y=0),Q=C.normalize([x,C.rotate(K+m)]),k?(d=C.multiplyPoint(Q,N.c1),L=C.multiplyPoint(Q,N.c2),Q=C.multiplyPoint(Q,N.e)):(d=C.multiplyPoint(Q,N.c2),L=C.multiplyPoint(Q,N.c1),Q=C.multiplyPoint(Q,N.s)),f.push([d.x,d.y,L.x,L.y,Q.x,Q.y]),K+=2*m;return f}}})},"dojox/gfx/decompose":function(){define(["./_base","dojo/_base/lang","./matrix"],function(u,B,C){function I(h,f){return Math.abs(h-f)<=1E-6*(Math.abs(h)+Math.abs(f))}function J(h,f,x,m){if(!isFinite(h))return x;
if(!isFinite(x))return h;f=Math.abs(f);m=Math.abs(m);return(f*h+m*x)/(f+m)}function v(h){h=C.normalize(h);var f=-h.xx-h.yy,x=h.xx*h.yy-h.xy*h.yx,m=Math.sqrt(f*f-4*x);f=-(f+(0>f?-m:m))/2;x/=f;m=h.xy/(f-h.xx);var d=1,y=h.xy/(x-h.xx),k=1;I(f,x)&&(m=1,y=d=0,k=1);isFinite(m)||(m=1,d=(f-h.xx)/h.xy,isFinite(d)||(m=(f-h.yy)/h.yx,d=1,isFinite(m)||(m=1,d=h.yx/(f-h.yy))));isFinite(y)||(y=1,k=(x-h.xx)/h.xy,isFinite(k)||(y=(x-h.yy)/h.yx,k=1,isFinite(y)||(y=1,k=h.yx/(x-h.yy))));h=Math.sqrt(m*m+d*d);var K=Math.sqrt(y*
y+k*k);isFinite(m/=h)||(m=0);isFinite(d/=h)||(d=0);isFinite(y/=K)||(y=0);isFinite(k/=K)||(k=0);return{value1:f,value2:x,vector1:{x:m,y:d},vector2:{x:y,y:k}}}function q(h,f){var x=0>h.xx*h.yy||0<h.xy*h.yx?-1:1,m=f.angle1=(Math.atan2(h.yx,h.yy)+Math.atan2(-x*h.xy,x*h.xx))/2;x=Math.cos(m);m=Math.sin(m);f.sx=J(h.xx/x,x,-h.xy/m,m);f.sy=J(h.yy/x,x,h.yx/m,m);return f}function n(h,f){var x=0>h.xx*h.yy||0<h.xy*h.yx?-1:1,m=f.angle2=(Math.atan2(x*h.yx,x*h.xx)+Math.atan2(-h.xy,h.yy))/2;x=Math.cos(m);m=Math.sin(m);
f.sx=J(h.xx/x,x,h.yx/m,m);f.sy=J(h.yy/x,x,-h.xy/m,m);return f}return u.decompose=function(h){var f=C.normalize(h);h={dx:f.dx,dy:f.dy,sx:1,sy:1,angle1:0,angle2:0};if(I(f.xy,0)&&I(f.yx,0))return B.mixin(h,{sx:f.xx,sy:f.yy});if(I(f.xx*f.yx,-f.xy*f.yy))return q(f,h);if(I(f.xx*f.xy,-f.yx*f.yy))return n(f,h);var x=new C.Matrix2D(f);var m=B.mixin(x,{dx:0,dy:0,xy:x.yx,yx:x.xy});x=v([f,m]);m=v([m,f]);x=new C.Matrix2D({xx:x.vector1.x,xy:x.vector2.x,yx:x.vector1.y,yy:x.vector2.y});m=new C.Matrix2D({xx:m.vector1.x,
xy:m.vector1.y,yx:m.vector2.x,yy:m.vector2.y});f=new C.Matrix2D([C.invert(x),f,C.invert(m)]);q(m,h);f.xx*=h.sx;f.yy*=h.sy;n(x,h);f.xx*=h.sx;f.yy*=h.sy;return B.mixin(h,{sx:f.xx,sy:f.yy})}})},"dojox/gfx/bezierutils":function(){define(["./_base"],function(u){u=u.bezierutils={};u.tAtLength=function(q,n){var h=0,f=6==q.length,x=0,m=0,d=f?I:v,y=function(k,K){for(var N=0,L=0;L<k.length-2;L+=2)N+=C(k[L],k[L+1],k[L+2],k[L+3]);L=f?C(q[0],q[1],q[4],q[5]):C(q[0],q[1],q[6],q[7]);N-L>K||x+N>n+K?(++m,k=d(k,.5),
y(k[0],K),Math.abs(x-n)<=K||y(k[1],K)):(x+=N,h+=1/(1<<m))};n&&y(q,.5);return h};var B=u.computeLength=function(q){for(var n=6==q.length,h=0,f=0;f<q.length-2;f+=2)h+=C(q[f],q[f+1],q[f+2],q[f+3]);f=n?C(q[0],q[1],q[4],q[5]):C(q[0],q[1],q[6],q[7]);return.1<h-f?(q=n?I(q,.5):J(q,.5),h=B(q[0],n),h+=B(q[1],n)):h},C=u.distance=function(q,n,h,f){return Math.sqrt((h-q)*(h-q)+(f-n)*(f-n))},I=function(q,n){var h=1-n,f=h*h,x=n*n,m=q[0],d=q[1],y=q[2],k=q[3],K=q[4];q=q[5];var N=f*m+2*h*n*y+x*K;f=f*d+2*h*n*k+x*q;
return[[m,d,h*m+n*y,h*d+n*k,N,f],[N,f,h*y+n*K,h*k+n*q,K,q]]},J=function(q,n){var h=1-n,f=h*h,x=f*h,m=n*n,d=m*n,y=q[0],k=q[1],K=q[2],N=q[3],L=q[4],U=q[5],Q=q[6];q=q[7];var W=x*y+3*f*n*K+3*h*m*L+d*Q;x=x*k+3*f*n*N+3*h*m*U+d*q;return[[y,k,h*y+n*K,h*k+n*N,f*y+2*h*n*K+m*L,f*k+2*h*n*N+m*U,W,x],[W,x,f*K+2*h*n*L+m*Q,f*N+2*h*n*U+m*q,h*L+n*Q,h*U+n*q,Q,q]]},v=u.splitBezierAtT=function(q,n){return 6==q.length?I(q,n):J(q,n)};return u})},"dojox/json/query":function(){define(["dojo/_base/kernel","dojo/_base/lang",
"dojox","dojo/_base/array"],function(u,B,C){B.getObject("json",!0,C);C.json._slice=function(I,J,v,q){var n=I.length,h=[];v=v||n;J=0>J?Math.max(0,J+n):Math.min(n,J);for(v=0>v?Math.max(0,v+n):Math.min(n,v);J<v;J+=q)h.push(I[J]);return h};C.json._find=function(I,J){function v(h){J&&(!0!==J||h instanceof Array?h[J]&&q.push(h[J]):q.push(h));for(var f in h){var x=h[f];J?x&&"object"==typeof x&&v(x):q.push(x)}}var q=[];if(J instanceof Array){if(1==J.length)return I[J[0]];for(var n=0;n<J.length;n++)q.push(I[J[n]])}else v(I);
return q};C.json._distinctFilter=function(I,J){for(var v=[],q={},n=0,h=I.length;n<h;++n){var f=I[n];J(f,n,I)&&("object"==typeof f&&f?f.__included||(f.__included=!0,v.push(f)):q[f+typeof f]||(q[f+typeof f]=!0,v.push(f)))}n=0;for(h=v.length;n<h;++n)v[n]&&delete v[n].__included;return v};return C.json.query=function(I,J){function v(m,d,y,k,K,N,L,U){return n[U].match(/[\*\?]/)||"~"==L?"/^"+n[U].substring(1,n[U].length-1).replace(/\\([btnfr\\"'])|([^\w\*\?])/g,"\\$1$2").replace(/([\*\?])/g,"[\\w\\W]$1")+
("~"==L?"$/i":"$/")+".test("+d+")":m}var q=0,n=[];I=I.replace(/"(\\.|[^"\\])*"|'(\\.|[^'\\])*'|[\[\]]/g,function(m){q+="["==m?1:"]"==m?-1:0;return"]"==m&&0<q?"`]":'"'==m.charAt(0)||"'"==m.charAt(0)?"`"+(n.push(m)-1):m});var h="";I.replace(/(\]|\)|push|pop|shift|splice|sort|reverse)\s*\(/,function(){throw Error("Unsafe function call");});I=I.replace(/([^<>=]=)([^=])/g,"$1\x3d$2").replace(/@|(\.\s*)?[a-zA-Z\$_]+(\s*:)?/g,function(m){return"."==m.charAt(0)?m:"@"==m?"$obj":(m.match(/:|^(\$|Math|true|false|null)$/)?
"":"$obj.")+m}).replace(/\.?\.?\[(`\]|[^\]])*\]|\?.*|\.\.([\w\$_]+)|\.\*/g,function(m,d,y){return(d=m.match(/^\.?\.?(\[\s*\^?\?|\^?\?|\[\s*==)(.*?)\]?$/))?(y="",m.match(/^\./)&&(h="dojox.json._find("+h,y=",true)"),h=(d[1].match(/=/)?"dojo.map":d[1].match(/\^/)?"dojox.json._distinctFilter":"dojo.filter")+"("+h,y+",function($obj){return "+d[2]+"})"):(d=m.match(/^\[\s*([\/\\].*)\]/))?".concat().sort(function(a,b){"+d[1].replace(/\s*,?\s*([\/\\])\s*([^,\\\/]+)/g,function(k,K,N){return"var av\x3d "+N.replace(/\$obj/,
"a")+",bv\x3d "+N.replace(/\$obj/,"b")+";if(av\x3ebv||bv\x3d\x3dnull){return "+("/"==K?1:-1)+";}\nif(bv\x3eav||av\x3d\x3dnull){return "+("/"==K?-1:1)+";}\n"})+"return 0;})":(d=m.match(/^\[(-?[0-9]*):(-?[0-9]*):?(-?[0-9]*)\]/))?(h="dojox.json._slice("+h,","+(d[1]||0)+","+(d[2]||0)+","+(d[3]||1)+")"):m.match(/^\.\.|\.\*|\[\s*\*\s*\]|,/)?(h="dojox.json._find("+h,("."==m.charAt(1)?",'"+y+"'":m.match(/,/)?","+m:"")+")"):m}).replace(/(\$obj\s*((\.\s*[\w_$]+\s*)|(\[\s*`([0-9]+)\s*`\]))*)(==|~)\s*`([0-9]+)/g,
v).replace(/`([0-9]+)\s*(==|~)\s*(\$obj\s*((\.\s*[\w_$]+)|(\[\s*`([0-9]+)\s*`\]))*)/g,function(m,d,y,k,K,N,L,U){return v(m,k,K,N,L,U,y,d)});I=h+("$"==I.charAt(0)?"":"$")+I.replace(/`([0-9]+|\])/g,function(m,d){return"]"==d?"]":n[d]});for(var f=eval("1\x26\x26function($,$1,$2,$3,$4,$5,$6,$7,$8,$9){var $obj\x3d$;return "+I+"}"),x=0;x<arguments.length-1;x++)arguments[x]=arguments[x+1];return J?f.apply(this,arguments):f}})},"esri/tasks/PrintParameters":function(){define(["dojo/_base/declare","dojo/_base/lang",
"dojo/has","../kernel"],function(u,B,C,I){u=u(null,{declaredClass:"esri.tasks.PrintParameters",map:null,template:null,outSpatialReference:null,extraParameters:null});C("extend-esri")&&B.setObject("tasks.PrintParameters",u,I);return u})},"jimu/SpatialReference/srUtils":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/Deferred dojo/promise/all dojo/request esri/SpatialReference ./unitUtils".split(" "),function(u,B,C,I,J,v,q,n){var h=null,f=null,x=!1,m=u(null,function(){});
u=require.toUrl("jimu");var d=v(u+"/SpatialReference/cs.json",{handleAs:"json"}),y=v(u+"/SpatialReference/transform.json",{handleAs:"json"});m.loadResource=function(){var k=new I;if(h&&f)return k.resolve(),k;J([d,y]).then(function(K){h=K[0];f=K[1];x=!0;k.resolve()},function(K){console.error(K);x=!1;k.reject(K)});return k};m.getAllCSUnits=function(){if(x){var k=[];C.forEach(h.wkids,B.hitch(this,function(K){K=this.getCSUnit(K);-1===C.indexOf(k,K)&&k.push(K)}));return k}};m.convertUnit=function(k,K,
N){if(x)return n.convertUnit(k,K,N)};m.getUnitRate=function(k,K){if(x)return n.getUnitRate(k,K)};m.isProjectUnit=function(k){if(x)return n.isProjectUnit(k)};m.isGeographicUnit=function(k){if(x)return n.isGeographicUnit(k)};m.getGeographicUnits=function(){if(x)return n.getGeographicUnits()};m.getProjectUnits=function(){if(x)return n.getProjectUnits()};m.getCSUnit=function(k){if(x)return k=C.indexOf(h.wkids,k),h.units[k]};m.isSameSR=function(k,K){if(x)return k=this.indexOfWkid(k),K=this.indexOfWkid(K),
h.labels[k]===h.labels[K]};m.isValidWkid=function(k){if(x)return-1<this.indexOfWkid(k)};m.getSRLabel=function(k){if(x&&this.isValidWkid(k))return k=this.indexOfWkid(k),h.labels[k]};m.indexOfWkid=function(k){if(x)return C.indexOf(h.wkids,k)};m.isWebMercator=function(k){return q.prototype._isWebMercator?q.prototype._isWebMercator.apply({wkid:parseInt(k,10)},[]):(new q(parseInt(k,10))).isWebMercator()};m.standardizeWkid=function(k){return this.isWebMercator(k)?3857:parseInt(k,10)};m.isValidTfWkid=function(k){if(x)return-1<
this.indexOfTfWkid(k)};m.getTransformationLabel=function(k){if(x)return this.isValidTfWkid(k)?(k=this.indexOfTfWkid(k),f.labels[k]):""};m.indexOfTfWkid=function(k){if(x)return C.indexOf(f.tfWkids,k)};m.isGeographicCS=function(k){if(x)return this.isValidWkid(k)?(k=this.indexOfWkid(k),!h.projSR[k]):!1};m.isProjectedCS=function(k){if(x)return this.isValidWkid(k)?(k=this.indexOfWkid(k),h.projSR[k]):!1};m.getGeoCSByProj=function(k){if(x&&this.isProjectedCS(k))return k=this.indexOfWkid(k),h.spheroids[k]};
m.getSpheroidStr=function(k){if(x)return this.isGeographicCS(k)?h.labels[this.indexOfWkid(k)]:this.isProjectedCS(k)?(k=m.getGeoCSByProj(k),h.labels[this.indexOfWkid(k)]):null};m.isSameSpheroid=function(k,K){if(x)return k=this.getSpheroidStr(k),K=this.getSpheroidStr(K),k&&K&&k===K?!0:!1};return m})},"dijit/ProgressBar":function(){define("require dojo/_base/declare dojo/dom-class dojo/_base/lang dojo/number ./_Widget ./_TemplatedMixin dojo/text!./templates/ProgressBar.html".split(" "),function(u,B,
C,I,J,v,q,n){return B("dijit.ProgressBar",[v,q],{progress:"0",value:"",maximum:100,places:0,indeterminate:!1,label:"",name:"",templateString:n,_indeterminateHighContrastImagePath:u.toUrl("./themes/a11y/indeterminate_progress.gif"),postMixInProperties:function(){this.inherited(arguments);this.params&&"value"in this.params||(this.value=this.indeterminate?Infinity:this.progress)},buildRendering:function(){this.inherited(arguments);this.indeterminateHighContrastImage.setAttribute("src",this._indeterminateHighContrastImagePath.toString());
this.update()},_setDirAttr:function(h){var f="rtl"==h.toLowerCase();C.toggle(this.domNode,"dijitProgressBarRtl",f);C.toggle(this.domNode,"dijitProgressBarIndeterminateRtl",this.indeterminate&&f);this.inherited(arguments)},update:function(h){I.mixin(this,h||{});h=this.internalProgress;var f=this.domNode,x=1;this.indeterminate?f.removeAttribute("aria-valuenow"):(-1!=String(this.progress).indexOf("%")?(x=Math.min(parseFloat(this.progress)/100,1),this.progress=x*this.maximum):(this.progress=Math.min(this.progress,
this.maximum),x=this.maximum?this.progress/this.maximum:0),f.setAttribute("aria-valuenow",this.progress));f.setAttribute("aria-labelledby",this.labelNode.id);f.setAttribute("aria-valuemin",0);f.setAttribute("aria-valuemax",this.maximum);this.labelNode.innerHTML=this.report(x);C.toggle(this.domNode,"dijitProgressBarIndeterminate",this.indeterminate);C.toggle(this.domNode,"dijitProgressBarIndeterminateRtl",this.indeterminate&&!this.isLeftToRight());h.style.width=100*x+"%";this.onChange()},_setValueAttr:function(h){this._set("value",
h);Infinity==h?this.update({indeterminate:!0}):this.update({indeterminate:!1,progress:h})},_setLabelAttr:function(h){this._set("label",h);this.update()},_setIndeterminateAttr:function(h){this._set("indeterminate",h);this.update()},report:function(h){return this.label?this.label:this.indeterminate?"\x26#160;":J.format(h,{type:"percent",places:this.places,locale:this.lang})},onChange:function(){}})})},"widgets/Print/_build-generate_module":function(){define(["dojo/text!./Widget.html","dojo/text!./css/style.css",
"dojo/i18n!./nls/strings"],function(){})},"url:widgets/Print/templates/Print.html":'\x3cdiv class\x3d"gis_PrintDijit"\x3e\r\n    \x3cdiv class\x3d"formContainer"\x3e\r\n        \x3cdiv data-dojo-type\x3d"dijit/form/Form" data-dojo-attach-point\x3d"printSettingsFormDijit"\x3e\r\n            \x3ctable cellspacing\x3d"5" style\x3d"width:100%;"\x3e\r\n                \x3ctr data-dojo-attach-point\x3d"titleTr"\x3e\r\n                    \x3ctd style\x3d"width:65px;"\x3e\r\n                        ${nls.title}:\r\n                    \x3c/td\x3e\r\n                    \x3ctd\x3e\r\n                        \x3cinput type\x3d"text" data-dojo-attach-point\x3d"titleNode" data-dojo-type\x3d"dijit/form/ValidationTextBox" data-dojo-props\x3d"name:\'title\',trim:true,required:true,style:\'width:100%;\'" /\x3e\r\n                    \x3c/td\x3e\r\n                \x3c/tr\x3e\r\n                \x3ctr style\x3d"display: none"\x3e\r\n                    \x3ctd\x3e\r\n                        ${nls.layout}:\r\n                    \x3c/td\x3e\r\n                    \x3ctd\x3e\r\n                        \x3cinput type\x3d"select" data-dojo-type\x3d"dijit/form/Select" data-dojo-props\x3d"name:\'layout\',style:\'width:100%;\'"\r\n                        data-dojo-attach-point\x3d"layoutDijit" data-dojo-attach-event\x3d"Change:onLayoutChange"/\x3e\r\n                    \x3c/td\x3e\r\n                \x3c/tr\x3e\r\n                \x3ctr style\x3d"display: none"\x3e\r\n                    \x3ctd\x3e\r\n                        ${nls.format}:\r\n                    \x3c/td\x3e\r\n                    \x3ctd\x3e\r\n                        \x3cinput type\x3d"select" data-dojo-type\x3d"dijit/form/Select" data-dojo-props\x3d"name:\'format\',style:\'width:100%;\'"\r\n                        data-dojo-attach-point\x3d"formatDijit" /\x3e\r\n                    \x3c/td\x3e\r\n                \x3c/tr\x3e\r\n            \x3c/table\x3e\r\n        \x3c/div\x3e\r\n    \x3c/div\x3e\r\n    \x3cdiv class\x3d"buttonActionBar jimu-align-trailing"\x3e\r\n        \x3cdiv class\x3d"jimu-btn" data-dojo-attach-point\x3d"advancedButtonDijit" style\x3d"display: none"\r\n            data-dojo-attach-event\x3d"onclick:showSettings"\x3e\x3cdiv class\x3d"btn-icon settingsIcon"\x3e\x3c/div\x3e${nls.settings}\x3c/div\x3e\r\n        \x3cdiv data-dojo-type\x3d"dijit/TooltipDialog" data-dojo-attach-point\x3d"settingsDialog"\r\n            style\x3d"display: none" class\x3d"gis_PrintDijit"\x3e\r\n            \x3cdiv style\x3d"width:250px;"\x3e\r\n                \x3cdiv style\x3d"font-weight:bold;"\x3e\r\n                    ${nls.mapScaleExtent}:\r\n                \x3c/div\x3e\r\n                \x3cdiv data-dojo-type\x3d"dijit/form/Form" data-dojo-attach-point\x3d"preserveFormDijit"\x3e\r\n                    \x3ctable cellspacing\x3d"5"\x3e\r\n                        \x3ctr\x3e\r\n                            \x3ctd style\x3d"vertical-align:middle;"\x3e\r\n                                ${nls.preserve}:\r\n                            \x3c/td\x3e\r\n                            \x3ctd\x3e\r\n                                \x3cinput type\x3d"radio" data-dojo-attach-point\x3d"printWidgetMapScale" data-dojo-type\x3d"dijit/form/RadioButton" data-dojo-props\x3d"name:\'preserveScale\',checked:true,value:\'true\'"\r\n                                /\x3e\x3clabel data-dojo-attach-point\x3d"printWidgetMapScaleLabel"\x3e${nls.mapScale}\x3c/label\x3e\r\n                                \x3cbr /\x3e\r\n                                \x3cinput type\x3d"radio" data-dojo-attach-point\x3d"printWidgetMapExtent" data-dojo-type\x3d"dijit/form/RadioButton" data-dojo-props\x3d"name:\'preserveScale\',value:\'false\'"\r\n                                /\x3e\x3clabel data-dojo-attach-point\x3d"printWidgetMapExtentLabel"\x3e${nls.mapExtent}\x3c/label\x3e\r\n                            \x3c/td\x3e\r\n                            \x3ctr\x3e\r\n                                \x3ctd style\x3d"vertical-align: top; padding-top: 7px;"\x3e\r\n                                    ${nls.forceScale}:\r\n                                \x3c/td\x3e\r\n                                \x3ctd\x3e\r\n                                    \x3cdiv style\x3d"display: flex;"\x3e\r\n                                        \x3cinput type\x3d"radio" style\x3d"margin-top: 7px;" data-dojo-type\x3d"dijit/form/RadioButton" data-dojo-props\x3d"name:\'preserveScale\',value:\'force\',checked:false"/\x3e\r\n                                        \x3cdiv style\x3d"display: flex; flex-direction: column;"\x3e\r\n                                            \x3cinput type\x3d"text" data-dojo-type\x3d"dijit/form/NumberTextBox" data-dojo-props\x3d"name:\'forcedScale\',required:false,style:\'width:100px;\'" data-dojo-attach-point\x3d"forceScaleNTB"/\x3e\r\n                                            \x3ca href\x3d"#" data-dojo-attach-event\x3d"click:getCurrentMapScale"\x3e${nls.getCurrentScale}\x3c/a\x3e\r\n                                        \x3c/div\x3e\r\n                                    \x3c/div\x3e\r\n                                \x3c/td\x3e\r\n                            \x3c/tr\x3e\r\n                        \x3c/tr\x3e\r\n                    \x3c/table\x3e\r\n                \x3c/div\x3e\r\n                \x3cdiv style\x3d"font-weight:bold; margin-bottom: 5px"\x3e\r\n                    \x3cspan\x3e${nls.outputSR}\x3c/span\x3e\r\n                    \x3ca href\x3d"https://developers.arcgis.com/javascript/jshelp/ref_coordsystems.html" target\x3d"blank"\x3eWKID\x3c/a\x3e\r\n                    \x3cspan\x3e:\x3c/span\x3e\r\n                \x3c/div\x3e\r\n                \x3cdiv style\x3d"margin-bottom: 5px"\x3e\r\n                    \x3cdiv\x3e\r\n                        \x3cinput type\x3d"text" data-dojo-type\x3d"dijit/form/ValidationTextBox" data-dojo-attach-event\x3d"onChange:_onOutputSRChange"\r\n                            data-dojo-attach-point\x3d"wkidInput" data-dojo-props\x3d\'style:{width:"100%"}\'\r\n                            data-dojo-props\x3d"required: false"/\x3e\r\n                    \x3c/div\x3e\r\n                    \x3cdiv class\x3d"wkid-label jimu-ellipsis" data-dojo-attach-point\x3d"wkidLabel"\x3e\r\n                    \x3c/div\x3e\r\n                \x3c/div\x3e\r\n                \x3cdiv style\x3d"font-weight:bold;" data-dojo-attach-point\x3d"labelsTitleNode"\x3e\r\n                    ${nls.labels}:\r\n                \x3c/div\x3e\r\n                \x3cdiv data-dojo-type\x3d"dijit/form/Form" data-dojo-attach-point\x3d"labelsFormDijit"\x3e\r\n                    \x3ctable cellspacing\x3d"5"\x3e\r\n                        \x3ctr\x3e\r\n                            \x3ctd style\x3d"vertical-align:middle;"\x3e\r\n                                ${nls.showLabels}:\r\n                            \x3c/td\x3e\r\n                            \x3ctd\x3e\r\n                                \x3cinput type\x3d"checkbox" data-dojo-type\x3d"dijit/form/CheckBox" data-dojo-props\x3d"name:\'showLabels\',value:true,checked:true" /\x3e\r\n                            \x3c/td\x3e\r\n                        \x3c/tr\x3e\r\n                    \x3c/table\x3e\r\n                \x3c/div\x3e\r\n                \x3cdiv style\x3d"font-weight:bold;"\x3e\r\n                    ${nls.mapMetadata}:\r\n                \x3c/div\x3e\r\n                \x3cdiv data-dojo-type\x3d"dijit/form/Form" data-dojo-attach-point\x3d"layoutMetadataDijit"\x3e\r\n                    \x3ctable cellspacing\x3d"5" style\x3d"width:100%;"\x3e\r\n                        \x3ctr data-dojo-attach-point\x3d"authorTr"\x3e\r\n                            \x3ctd\x3e\r\n                                ${nls.author}:\r\n                            \x3c/td\x3e\r\n                            \x3ctd\x3e\r\n                                \x3cinput type\x3d"text" data-dojo-attach-point\x3d"authorNode" data-dojo-type\x3d"dijit/form/ValidationTextBox" data-dojo-props\x3d"name:\'author\',trim:true,required:false,style:\'width:100%;\'" data-dojo-attach-point\x3d"authorTB"\r\n                                /\x3e\r\n                            \x3c/td\x3e\r\n                        \x3c/tr\x3e\r\n                        \x3ctr data-dojo-attach-point\x3d"copyrightTr"\x3e\r\n                            \x3ctd\x3e\r\n                                ${nls.copyright}:\r\n                            \x3c/td\x3e\r\n                            \x3ctd\x3e\r\n                                \x3ctextarea data-dojo-attach-point\x3d"copyrightNode" name\x3d"copyright"\r\n                                    data-dojo-type\x3d"dijit/form/SimpleTextarea"\r\n                                    style\x3d"width:100%;height:60px;resize:none;"\x3e\x3c/textarea\x3e\r\n                            \x3c/td\x3e\r\n                        \x3c/tr\x3e\r\n                    \x3c/table\x3e\r\n                \x3c/div\x3e\r\n                \x3cdiv data-dojo-type\x3d"dijit/form/Form" data-dojo-attach-point\x3d"customTextElementsDijit"\x3e\r\n                    \x3ctable cellspacing\x3d"5" style\x3d"width:100%;" data-dojo-attach-point\x3d"customTextElementsTable"\x3e\r\n\r\n                    \x3c/table\x3e\r\n                \x3c/div\x3e\r\n                \x3cdiv data-dojo-type\x3d"dijit/form/Form" data-dojo-attach-point\x3d"layoutFormDijit"\x3e\r\n                    \x3ctable cellspacing\x3d"5"\x3e\r\n                        \x3ctr data-dojo-attach-point\x3d"legendTr"\x3e\r\n                            \x3ctd\x3e\r\n                                ${nls.lncludeLegend}:\r\n                            \x3c/td\x3e\r\n                            \x3ctd\x3e\r\n                                \x3cinput type\x3d"checkbox" data-dojo-type\x3d"dijit/form/CheckBox" data-dojo-props\x3d"name:\'legend\',value:true,checked:true"\r\n                                /\x3e\r\n                            \x3c/td\x3e\r\n                        \x3c/tr\x3e\r\n                        \x3ctr data-dojo-attach-point\x3d"scalebarTr"\x3e\r\n                            \x3ctd\x3e\r\n                                ${nls.scaleBarUnit}:\r\n                            \x3c/td\x3e\r\n                            \x3ctd\x3e\r\n                                \x3cselect data-dojo-type\x3d"dijit/form/Select" data-dojo-props\x3d"name:\'scalebarUnit\',style:\'width:100%;\'"\r\n                        data-dojo-attach-point\x3d"scalebarUnitDijit"\x3e\r\n                                    \x3coption value\x3d"Miles" selected\x3d"selected"\x3e${nls.unitsMiles}\x3c/option\x3e\r\n                                    \x3coption value\x3d"Kilometers"\x3e${nls.unitsKilometers}\x3c/option\x3e\r\n                                    \x3coption value\x3d"Meters"\x3e${nls.unitsMeters}\x3c/option\x3e\r\n                                    \x3coption value\x3d"Feet"\x3e${nls.unitsFeet}\x3c/option\x3e\r\n                                \x3c/select\x3e\r\n                            \x3c/td\x3e\r\n                        \x3c/tr\x3e\r\n                    \x3c/table\x3e\r\n                \x3c/div\x3e\r\n                \x3cdiv style\x3d"font-weight:bold;"\x3e\r\n                    ${nls.mapOnlyOptions}:\r\n                \x3c/div\x3e\r\n                \x3cdiv data-dojo-type\x3d"dijit/form/Form" data-dojo-attach-point\x3d"mapOnlyFormDijit"\x3e\r\n                    \x3ctable cellspacing\x3d"5"\x3e\r\n                        \x3ctr\x3e\r\n                            \x3ctd\x3e\r\n                                ${nls.width}:\r\n                            \x3c/td\x3e\r\n                            \x3ctd\x3e\r\n                                \x3cinput type\x3d"text" data-dojo-type\x3d"dijit/form/NumberTextBox" data-dojo-props\x3d"name:\'width\',required:true,value:670,style:\'width:100px;\'"\r\n                                /\x3e\r\n                            \x3c/td\x3e\r\n                        \x3c/tr\x3e\r\n                        \x3ctr\x3e\r\n                            \x3ctd\x3e\r\n                                ${nls.height}:\r\n                            \x3c/td\x3e\r\n                            \x3ctd\x3e\r\n                                \x3cinput type\x3d"text" data-dojo-type\x3d"dijit/form/NumberTextBox" data-dojo-props\x3d"name:\'height\',required:true,value:500,style:\'width:100px;\'"\r\n                                /\x3e\r\n                            \x3c/td\x3e\r\n                        \x3c/tr\x3e\r\n                    \x3c/table\x3e\r\n                \x3c/div\x3e\r\n                \x3cdiv style\x3d"font-weight:bold;"\x3e\r\n                    ${nls.printQualityOptions}:\r\n                \x3c/div\x3e\r\n                \x3cdiv data-dojo-type\x3d"dijit/form/Form" data-dojo-attach-point\x3d"mapQualityFormDijit"\x3e\r\n                    \x3ctable cellspacing\x3d"5"\x3e\r\n                        \x3ctr\x3e\r\n                            \x3ctd\x3e\r\n                                ${nls.dpi}:\r\n                            \x3c/td\x3e\r\n                            \x3ctd\x3e\r\n                                \x3cinput type\x3d"text" data-dojo-type\x3d"dijit/form/NumberTextBox" data-dojo-props\x3d"name:\'dpi\',required:true,value:96,style:\'width:100px;\'"\r\n                                /\x3e\r\n                            \x3c/td\x3e\r\n                        \x3c/tr\x3e\r\n                    \x3c/table\x3e\r\n                \x3c/div\x3e\r\n                \x3cdiv style\x3d"font-weight:bold;"\x3e\r\n                    ${nls.forceFeatureAttributes}:\r\n                \x3c/div\x3e\r\n                \x3cdiv data-dojo-type\x3d"dijit/form/Form" data-dojo-attach-point\x3d"forceAttributesFormDijit"\x3e\r\n                    \x3ctable cellspacing\x3d"5"\x3e\r\n                        \x3ctr\x3e\r\n                            \x3ctd style\x3d"vertical-align:middle;"\x3e\r\n                                ${nls.includeFeatureAttributes}:\r\n                            \x3c/td\x3e\r\n                            \x3ctd\x3e\r\n                                \x3cinput type\x3d"checkbox" data-dojo-type\x3d"dijit/form/CheckBox" data-dojo-props\x3d"name:\'forceFeatureAttributes\',value:true,checked:false" /\x3e\r\n                            \x3c/td\x3e\r\n                        \x3c/tr\x3e\r\n                    \x3c/table\x3e\r\n                \x3c/div\x3e\r\n            \x3c/div\x3e\r\n        \x3c/div\x3e\r\n        \x3cdiv class\x3d"jimu-btn" data-dojo-attach-point\x3d"printButtonDijit"\r\n            data-dojo-attach-event\x3d"onclick:print"\x3e\x3cdiv class\x3d"btn-icon printIcon"\x3e\x3c/div\x3e${nls.print}\x3c/div\x3e\r\n    \x3c/div\x3e\r\n    \x3c!-- \x3chr calss\x3d"spacer"\x3e --\x3e\r\n    \x3cdiv data-dojo-attach-point\x3d"printResultsNode" class\x3d"resultsContainer"\x3e\r\n    \x3c/div\x3e\r\n    \x3cdiv data-dojo-attach-point\x3d"clearActionBarNode" class\x3d"buttonActionBar"\r\n    style\x3d"display:none;padding:0;"\x3e\r\n        \x3cdiv class\x3d"jimu-btn" data-dojo-attach-event\x3d"onclick:clearResults"\x3e\r\n            \x3cdiv class\x3d"btn-icon clearIcon"\x3e\x3c/div\x3e${nls.clearList}\r\n        \x3c/div\x3e\r\n    \x3c/div\x3e\r\n\x3c/div\x3e\r\n',
"url:widgets/Print/templates/PrintResult.html":'\x3cdiv class\x3d"printResult" data-dojo-attach-point\x3d"resultNode" data-dojo-attach-event\x3d"onclick:_openPrint"\x3e\r\n  \x3ctable class\x3d"printResultTable"\x3e\r\n    \x3ctr\x3e\r\n      \x3ctd width\x3d"25px"\x3e\r\n        \x3cspan class\x3d"bold"\x3e${count}.\x3c/span\x3e\r\n      \x3c/td\x3e\r\n      \x3ctd width\x3d"30px"\x3e\r\n        \x3cimg src\x3d"${icon}"\x3e\r\n      \x3c/td\x3e\r\n      \x3ctd data-dojo-attach-point\x3d"nameNode"\x3e\r\n        \x3cdiv data-dojo-attach-point\x3d"progressBar" data-dojo-type\x3d"dijit/ProgressBar" data-dojo-props\x3d\'value:Infinity\'\x3e\x3c/div\x3e\r\n        \x3cspan data-dojo-attach-point\x3d"successNode" class\x3d"bold" style\x3d"display:none;"\x3e${docName}\x3c/span\x3e\r\n        \x3cdiv data-dojo-attach-point\x3d"errNode" style\x3d"display:none;"\x3e\r\n          \x3cspan class\x3d"bold"\x3e${nls.printError}\x3c/span\x3e\r\n          \x3cdiv class\x3d"jimu-icon jimu-icon-error jimu-float-trailing"\x3e\x3c/div\x3e\r\n        \x3c/div\x3e\r\n      \x3c/td\x3e\r\n    \x3c/tr\x3e\r\n  \x3c/table\x3e\r\n\x3c/div\x3e\r\n',
"url:dijit/templates/ProgressBar.html":'\x3cdiv class\x3d"dijitProgressBar dijitProgressBarEmpty" role\x3d"progressbar"\r\n\t\x3e\x3cdiv  data-dojo-attach-point\x3d"internalProgress" class\x3d"dijitProgressBarFull"\r\n\t\t\x3e\x3cdiv class\x3d"dijitProgressBarTile" role\x3d"presentation"\x3e\x3c/div\r\n\t\t\x3e\x3cspan style\x3d"visibility:hidden"\x3e\x26#160;\x3c/span\r\n\t\x3e\x3c/div\r\n\t\x3e\x3cdiv data-dojo-attach-point\x3d"labelNode" class\x3d"dijitProgressBarLabel" id\x3d"${id}_label"\x3e\x3c/div\r\n\t\x3e\x3cspan data-dojo-attach-point\x3d"indeterminateHighContrastImage"\r\n\t\t   class\x3d"dijitInline dijitProgressBarIndeterminateHighContrastImage"\x3e\x3c/span\r\n\x3e\x3c/div\x3e\r\n',
"url:widgets/Print/Widget.html":'\x3cdiv\x3e\r\n  \x3cdiv data-dojo-attach-point\x3d"printNode"\x3e\x3c/div\x3e\r\n\x3c/div\x3e',"url:widgets/Print/css/style.css":".jimu-widget-print{width: 100%; height: 100%; position: relative;}.jimu-widget-print .dijitSelect{height: 20px; width: 100%;}.gis_PrintDijit {width: 100%;}.gis_PrintDijit .printResult {height: 28px; margin-bottom: -1px; width: 100%;}.gis_PrintDijit .printResult .printResultTable {width: 100%;}.gis_PrintDijit .printResult .bold {font-weight: bold;}.gis_PrintDijit .printResultError {font-weight: bold; color: red; cursor: help;}.gis_PrintDijit .printResultHover table:hover {background-color: #D4E7F8; cursor: pointer;}.gis_PrintDijit .buttonActionBar {padding: 3px 0px 2px 0px; width: 100%;}.gis_PrintDijit .formContainer {margin-bottom: -1px; width: 100%;}.gis_PrintDijit .resultsContainer {width: 100%; margin-top: 10px;}.gis_PrintDijit .btn-icon {width: 16px; height: 16px; display: inline-block; vertical-align: text-top; margin-right: 10px;}.jimu-rtl .gis_PrintDijit .btn-icon {margin-right: auto; margin-left: 10px;}.gis_PrintDijit .printIcon {background-image: url(../images/print.png);}.gis_PrintDijit .clearIcon {background-image: url(../images/clear.png);}.gis_PrintDijit .settingsIcon {background-image: url(../images/settings.png); width: 16px; height: 16px;}.gis_PrintDijit .dijitArrowButtonContainer{width: 17px;}.gis_PrintDijit .wkid-label{font-size: 12px; font-style: italic; color: #a0acbf; width: 100%;}",
"*now":function(u){u(['dojo/i18n!*preload*widgets/Print/nls/Widget*["ar","bs","ca","cs","da","de","en","el","es","et","fi","fr","he","hr","hu","id","it","ja","ko","lt","lv","nb","nl","pl","pt-br","pt-pt","ro","ru","sk","sl","sr","sv","th","tr","zh-cn","uk","vi","zh-hk","zh-tw","ROOT"]'])},"*noref":1}});
define("dojo/_base/declare jimu/BaseWidget jimu/portalUtils dojo/_base/lang dojo/Deferred jimu/dijit/Message jimu/dijit/LoadingIndicator ./Print esri/request jimu/portalUrlUtils".split(" "),function(u,B,C,I,J,v,q,n,h,f){return u([B],{baseClass:"jimu-widget-print",name:"Print",className:"esri.widgets.Print",_portalPrintTaskURL:null,postCreate:function(){this.inherited(arguments);this.shelter=new q({hidden:!0});this.shelter.placeAt(this.domNode);this.shelter.startup()},startup:function(){this.inherited(arguments);
this.shelter.show();this._initPrinter()},destroy:function(){this.print&&this.print.closeSettings();this.inherited(arguments)},onClose:function(){this.print&&this.print.closeSettings()},_initPrinter:function(){this._getPrintTaskURL(this.appConfig.portalUrl).then(I.hitch(this,function(x){this.shelter.show();this.isAsync(x).then(I.hitch(this,function(m){this.print=new n({map:this.map,appConfig:this.appConfig,printTaskURL:x,defaultAuthor:this.config.defaultAuthor,defaultCopyright:this.config.defaultCopyright,
copyrightEditable:!1!==this.config.copyrightEditable,defaultTitle:this.config.defaultTitle,defaultFormat:this.config.defaultFormat,defaultLayout:this.config.defaultLayout,nls:this.nls,async:m});this.print.placeAt(this.printNode);this.print.startup()}),I.hitch(this,function(m){new v({message:m.message})})).always(I.hitch(this,function(){this.shelter.hide()}))}),I.hitch(this,function(x){new v({message:x});console.error(x);this.shelter.hide()}))},_getPrintTaskURL:function(x){var m=new J;if(this.config&&
this.config.serviceURL)return m.resolve(this.config.serviceURL),m;C.getPortalSelfInfo(x).then(I.hitch(this,function(d){(d=d&&d.helperServices&&d.helperServices.printTask&&d.helperServices.printTask.url)?m.resolve(d):m.reject("error")}),I.hitch(this,function(d){new v({message:this.nls.portalConnectionError});m.reject("error");console.error(d)}));return m},isAsync:function(x){var m=new J,d=f.setHttpProtocol(x),y=f.getNewPrintUrl(this.appConfig.portalUrl);d===y||/sharing\/tools\/newPrint$/.test(d)?m.resolve(!1):
h({url:x,content:{f:"json"},callbackParamName:"callback",handleAs:"json",timeout:6E4,load:I.hitch(this,function(k){"esriExecutionTypeAsynchronous"===k.executionType?m.resolve(!0):m.resolve(!1)}),error:I.hitch(this,function(k){m.reject(k)})});return m},onSignIn:function(x){x=x||{};x.userId&&this.print&&this.print.updateAuthor(x.userId)}})});