{"size": 10335, "ext": "js", "max_stars_repo_path": "js/esriapi/esri/dijit/analysis/ApplyRFxTemplate.js", "max_stars_repo_name": "JeetChan/Viewer", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "js/esriapi/esri/dijit/analysis/ApplyRFxTemplate.js", "max_issues_repo_name": "JeetChan/Viewer", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "js/esriapi/esri/dijit/analysis/ApplyRFxTemplate.js", "max_forks_repo_name": "JeetChan/Viewer", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 939.5454545455, "max_line_length": 6914, "alphanum_fraction": 0.7051765844}
// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See http://js.arcgis.com/3.24/esri/copyright.txt for details.
//>>built
require({cache:{"url:esri/dijit/analysis/templates/ApplyRFxTemplate.html":'\x3cdiv class\x3d"esriAnalysis"\x3e\r\n  \x3cdiv data-dojo-type\x3d"dijit/layout/ContentPane" style\x3d"margin-top:0.5em; margin-bottom: 0.5em;"\x3e\r\n    \x3cdiv class\x3d"analysisTitle"\x3e\r\n      \x3ctable class\x3d"esriFormTable"\x3e\r\n        \x3ctr\x3e\r\n          \x3ctd class\x3d"esriToolIconTd"\x3e\r\n            \x3cdiv\x3e\x3c/div\x3e\r\n          \x3c/td\x3e\r\n          \x3ctd class\x3d"esriAlignLeading esriAnalysisTitle" data-dojo-attach-point\x3d"_toolTitle"\x3e\r\n            \x3clabel data-dojo-attach-point\x3d"_titleLbl"\x3e${title}\x3c/label\x3e\r\n          \x3c/td\x3e\r\n          \x3ctd\x3e\r\n            \x3cdiv class\x3d"esriFloatTrailing" style\x3d"padding:0;"\x3e\r\n              \x3cdiv class\x3d"esriFloatLeading"\x3e\r\n                \x3ca href\x3d"#" class\x3d\'esriFloatLeading helpIcon\' esriHelpTopic\x3d"toolDescription"\x3e\x3c/a\x3e\r\n              \x3c/div\x3e\r\n              \x3cdiv class\x3d"esriFloatTrailing"\x3e\r\n                \x3ca href\x3d"#" data-dojo-attach-point\x3d"_closeBtn" title\x3d"${i18n.close}" class\x3d"esriAnalysisCloseIcon"\x3e\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/table\x3e\r\n    \x3c/div\x3e\r\n    \x3cdiv style\x3d"clear:both; border-bottom: #CCC thin solid; height:1px;width:100%;margin-bottom:20px;"\x3e\x3c/div\x3e\r\n    \x3cdiv data-dojo-type\x3d"dijit/form/Form" data-dojo-attach-point\x3d"_form" readOnly\x3d"true"\x3e\r\n      \x3ctable class\x3d"esriFormTable" style\x3d"table-layout:auto;"\x3e\r\n        \x3ctbody\x3e\r\n          \x3ctr data-dojo-attach-point\x3d"_titleRow"\x3e\r\n            \x3ctd  colspan\x3d"3" class\x3d"sectionHeader" data-dojo-attach-point\x3d"_interpolateToolDescription" \x3e\x3c/td\x3e\r\n          \x3c/tr\x3e\r\n          \x3ctr data-dojo-attach-point\x3d"_analysisLabelRow"\x3e\r\n            \x3ctd colspan\x3d"2" style\x3d"padding-bottom:0;"\x3e\r\n              \x3clabel class\x3d"esriFloatLeading  esriTrailingMargin025 esriAnalysisNumberLabel"\x3e${i18n.oneLabel}\x3c/label\x3e\r\n              \x3clabel class\x3d"esriAnalysisStepsLabel"\x3e${i18n.rfxTemplateInputsLabel}\x3c/label\x3e\r\n            \x3c/td\x3e\r\n            \x3ctd class\x3d"shortTextInput" style\x3d"padding-bottom:0;"\x3e\r\n              \x3ca href\x3d"#" class\x3d\'esriFloatTrailing helpIcon\' esrihelptopic\x3d"rfxTemplateInputs"\x3e\x3c/a\x3e\r\n            \x3c/td\x3e\r\n          \x3c/tr\x3e\r\n          \x3ctr data-dojo-attach-point\x3d"_rFxArgsEditorRow"\x3e\r\n            \x3ctd colspan\x3d"3" style\x3d"padding-top:0;"\x3e\r\n              \x3cdiv data-dojo-attach-point\x3d"_analysisSelect" data-dojo-type\x3d"dijit/form/Select"  style\x3d"display:none;"\x3e\x3c/div\x3e\r\n              \x3cdiv data-dojo-attach-point \x3d "_loadingMessage"\x3e\r\n                \x3clabel style\x3d"font-style: italic;"\x3e${i18n.loadingMessage}\x3c/label\x3e\r\n              \x3c/div\x3e\r\n              \x3cdiv data-dojo-attach-point\x3d"_rFxArgsEditorDiv"\x3e\x3c/div\x3e\r\n            \x3c/td\x3e\r\n          \x3c/tr\x3e\r\n          \x3ctr\x3e\r\n            \x3ctd colspan\x3d"2"\x3e\r\n              \x3clabel class\x3d"esriFloatLeading esriTrailingMargin025 esriAnalysisNumberLabel"\x3e${i18n.twoLabel}\x3c/label\x3e\r\n              \x3clabel class\x3d"esriAnalysisStepsLabel"\x3e${i18n.outputLayerLabel}\x3c/label\x3e\r\n            \x3c/td\x3e\r\n            \x3ctd class\x3d"shortTextInput"\x3e\r\n              \x3ca href\x3d"#" class\x3d\'esriFloatTrailing helpIcon\' esriHelpTopic\x3d"outputLayer"\x3e\x3c/a\x3e\r\n            \x3c/td\x3e\r\n          \x3c/tr\x3e\r\n          \x3ctr\x3e\r\n            \x3ctd colspan\x3d"3" style\x3d"padding: 0 20px; width: 100%;"\x3e\r\n              \x3cinput type\x3d"text" data-dojo-type\x3d"dijit/form/ValidationTextBox" data-dojo-props\x3d"trim:true,required:true" style\x3d"width: 100%; margin: 0;"\r\n                data-dojo-attach-point\x3d"_outputLayerInput"\x3e\x3c/input\x3e\r\n            \x3c/td\x3e\r\n          \x3c/tr\x3e\r\n          \x3ctr\x3e\r\n            \x3ctd colspan\x3d"3"\x3e\r\n              \x3cdiv data-dojo-attach-point\x3d"_chooseFolderRow" class\x3d"esriLeadingMargin1"\x3e\r\n                \x3clabel class\x3d"esriSaveLayerlabel"\x3e${i18n.saveResultIn}\x3c/label\x3e\r\n                \x3cinput class\x3d"longInput" data-dojo-attach-point\x3d"_webMapFolderSelect" data-dojo-type\x3d"dijit/form/FilteringSelect" trim\x3d"true"\r\n                  style\x3d"width:55%;"\x3e\x3c/input\x3e\r\n              \x3c/div\x3e\r\n            \x3c/td\x3e\r\n            \x3ctd colspan\x3d"3"\x3e\r\n            \x3cdiv data-dojo-attach-point\x3d"_chooseLayerTypeRow" class\x3d"esriLeadingMargin1"\x3e\r\n              \x3clabel class\x3d"esriSaveLayerlabel"\x3e${i18n.saveLayerType}\x3c/label\x3e\r\n              \x3cinput class\x3d"longInput esriLongLabel" data-dojo-attach-point\x3d"_webLayerTypeSelect" data-dojo-type\x3d"dijit/form/FilteringSelect" trim\x3d"true" style\x3d"width:55%;"\x3e\x3c/input\x3e\r\n            \x3c/div\x3e\r\n          \x3c/td\x3e\r\n          \x3c/tr\x3e\r\n        \x3c/tbody\x3e\r\n      \x3c/table\x3e\r\n    \x3c/div\x3e\r\n    \x3cdiv style\x3d"padding:5px;margin-top:5px;border-top:solid 1px #BBB;"\x3e\r\n      \x3cdiv class\x3d"esriExtentCreditsCtr"\x3e\r\n        \x3ca class\x3d"esriFloatTrailing esriSmallFont" href\x3d"#" data-dojo-attach-point\x3d"_showCreditsLink" data-dojo-attach-event\x3d"onclick:_handleShowCreditsClick"\x3e${i18n.showCredits}\x3c/a\x3e\r\n        \x3clabel data-dojo-attach-point\x3d"_chooseExtentDiv" class\x3d"esriSelectLabel esriExtentLabel"\x3e\r\n          \x3cinput type\x3d"radio" data-dojo-attach-point\x3d"_useExtentCheck" data-dojo-type\x3d"dijit/form/CheckBox" data-dojo-props\x3d"checked:true" name\x3d"extent" value\x3d"true" /\x3e\r\n          ${i18n.useMapExtent}\r\n        \x3c/label\x3e\r\n      \x3c/div\x3e\r\n      \x3cdiv\x3e\r\n        \x3ctable class\x3d"esriFormTable"\x3e\r\n          \x3ctr\x3e\r\n            \x3ctd\x3e\r\n              \x3cbutton data-dojo-type\x3d"dijit/form/Button" type\x3d"submit" data-dojo-attach-point\x3d"_saveBtn" class\x3d"esriAnalysisSubmitButton" data-dojo-attach-event\x3d"onClick:_handleSaveBtnClick"\x3e\r\n                ${i18n.runAnalysis}\r\n              \x3c/button\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 data-dojo-type\x3d"dijit/Dialog" title\x3d"${i18n.creditTitle}" data-dojo-attach-point\x3d"_usageDialog" style\x3d"width:40em;"\x3e\r\n    \x3cdiv data-dojo-type\x3d"esri/dijit/analysis/CreditEstimator" data-dojo-attach-point\x3d"_usageForm"\x3e\x3c/div\x3e\r\n  \x3c/div\x3e\r\n\x3c/div\x3e'}});
define("esri/dijit/analysis/ApplyRFxTemplate","dojo/_base/declare dojo/_base/lang dojo/has dojo/dom-style dojo/Deferred dojo/string dijit/_WidgetBase dijit/_TemplatedMixin dijit/_WidgetsInTemplateMixin dijit/_OnDijitClickMixin dijit/_FocusMixin ../../kernel ../../lang ../../request ../RasterFunctionEditor/utils ./RasterAnalysisMixin ../RasterFunctionEditor/RFxArgsEditor dojo/i18n!../../nls/jsapi dojo/text!./templates/ApplyRFxTemplate.html".split(" "),function(b,c,h,e,k,l,m,n,p,q,r,t,u,v,w,x,y,z,A){b=
b([m,n,p,q,r,x],{declaredClass:"esri.dijit.analysis.ApplyRFxTemplate",templateString:A,widgetsInTemplate:!0,showChooseExtent:!0,inputLayer:null,functionTemplate:null,rftName:"",_useRFT:!0,_convertRFTToolName:"ConvertRasterFunctionTemplate",toolName:"ApplyRFxTemplate",helpFileName:"ApplyRFxTemplate",toolNlsName:z.applyRFxTemplateTool,constructor:function(a){this.inherited(arguments);this.title=this.rftName=a.rasterFunction&&a.rasterFunction.name||a.rfxTemplateItem&&a.rfxTemplateItem.title},postCreate:function(){this.inherited(arguments);
u.isDefined(this.params.rfxTemplateItem)?this._fetchRFT(this.params.rfxTemplateItem):this.rerun&&this.rasterFunction&&this._createRFxArgsEditor(this.rasterFunction)},_getInputLayerAttr:function(){return this.inputLayer},_onClose:function(){this.inherited(arguments);this._rfxArgsEditor.destroy()},_getRasterFunction:function(){return this._rfxArgsEditor&&this._rfxArgsEditor.getRFT()},_getRasterArguments:function(){return null},_getRasterObject:function(a){return null},_getOutputRasterLayerName:function(){return l.substitute(this.i18n.outputLayerName,
{layername:this.rftName})},_fetchRFT:function(a){var g=c.hitch(this,function(a){return a}),b=c.hitch(this,function(a){console.log(a);this._displayError(this.i18n.errorFetchingRFT)}),e=c.hitch(this,this._createRFxArgsEditor),f=new k,d;d=(d=(d=a.name)&&d.slice(-8))&&".rft.xml"===d.toLowerCase();return a&&a.itemDataUrl?d?this.rasterUtilitiesServer?w.convertRFT({url:this.rasterUtilitiesServer+"/"+this._convertRFTToolName,rft:{itemId:a.id},format:"json"},g,e,b):(this._displayError(this.i18n.errorUtilitiesServiceNotAvailable),
f.reject(Error(this.i18n.errorUtilitiesServiceNotAvailable)),f.promise):v({url:a.itemDataUrl,callbackParamName:"callback",content:{f:"json"},handleAs:d?"text":"json",load:g,error:b}).then(e):(this._displayError(this.i18n.errorRetrievingRFTItem),f.reject(Error("this.i18n.errorRetrievingRFTItem")),f.promise)},_createRFxArgsEditor:function(a){e.set(this._loadingMessage,"display","none");e.set(this._rFxArgsEditorDiv,"display","block");this._rfxArgsEditor=new y({map:this.map,rfxTemplate:a,inputLayers:this.inputLayers,
featureLayers:this.featureLayers,portalUrl:this.portalUrl,portalSelf:this.portalSelf},this._rFxArgsEditorDiv);this._rfxArgsEditor.on("drawtool-activate",c.hitch(this,function(a){this.emit("drawtool-activate",a)}));this._rfxArgsEditor.on("drawtool-deactivate",c.hitch(this,function(a){this.emit("drawtool-deactivate",a)}));this._rfxArgsEditor.on("add-ready-to-use-layer",c.hitch(this,function(a){this.emit("add-ready-to-use-layer",a)}))},_displayError:function(a){this._loadingMessage.innerText=a;this.set("disableRunAnalysis",
!0)}});h("extend-esri")&&c.setObject("dijit.analysis.ApplyRFxTemplate",b,t);return b});