IdentityManager.js
156 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See https://js.arcgis.com/4.6/esri/copyright.txt for details.
//>>built
require({cache:{"esri/identity/IdentityManagerDialog":function(){define("dojo/_base/kernel ../core/declare dojo/Deferred dojo/_base/lang dojo/dom-attr dojo/keys dijit/registry dijit/Dialog ../kernel ../core/lang ../core/Error ../core/domUtils ./Credential ./IdentityManagerBase dojo/i18n!./nls/identity dojo/query dijit/form/Button dijit/form/Form dijit/form/ValidationTextBox".split(" "),function(m,n,k,f,e,l,d,h,c,a,b,w,q,u,y){return n([u],{declaredClass:"esri.identity.IdentityManager",constructor:function(a){f.mixin(this,
a)},_dialogContent:"\x3cdiv data-dojo-type\x3d'dijit.form.Form' data-dojo-props\x3d'\"class\":\"esriIdForm\"'\x3e\x3cdiv class\x3d'dijitDialogPaneContentArea'\x3e\x3cdiv style\x3d'padding-bottom: 5px; word-wrap: break-word;'\x3e{info}\x3c/div\x3e\x3cdiv style\x3d'margin: 0px; padding: 0px; height: 10px;'\x3e\x3c/div\x3e\x3cdiv class\x3d'esriErrorMsg' style\x3d'display: none; color: white; background-color: #D46464; text-align: center; padding-top: 3px; padding-bottom: 3px;'\x3e{invalidUser}\x3c/div\x3e\x3cdiv style\x3d'margin: 0px; padding: 0px; height: 10px;'\x3e\x3c/div\x3e\x3ctable style\x3d'width: 100%;'\x3e\x3ctr\x3e\x3ctd\x3e\x3clabel\x3e{lblUser}\x3c/label\x3e\x3cbr/\x3e\x3cinput data-dojo-type\x3d'dijit.form.ValidationTextBox' data-dojo-props\x3d'type:\"text\", \"class\":\"esriIdUser\", required:true, trim:true, style:\"width: 100%;\", autocapitalize:\"none\", autocorrect:\"off\", spellcheck:false' /\x3e\x3c/td\x3e\x3c/tr\x3e\x3ctr\x3e\x3ctd\x3e\x3clabel\x3e{lblPwd}\x3c/label\x3e\x3cbr/\x3e\x3cinput data-dojo-type\x3d'dijit.form.ValidationTextBox' data-dojo-props\x3d'type:\"password\", \"class\":\"esriIdPwd\", required:true, style:\"width: 100%;\"' /\x3e\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e\x3c/div\x3e\x3cdiv class\x3d'dijitDialogPaneActionBar'\x3e\x3cbutton data-dojo-type\x3d'dijit.form.Button' data-dojo-props\x3d'type:\"button\", \"class\":\"esriIdSubmit\"'\x3e{lblOk}\x3c/button\x3e\x3cbutton data-dojo-type\x3d'dijit.form.Button' data-dojo-props\x3d'type:\"button\", \"class\":\"esriIdCancel\"'\x3e{lblCancel}\x3c/button\x3e\x3c/div\x3e\x3c/div\x3e",
signIn:function(a,c,d){this._nls||(this._nls=y);this._loginDialog||(this._loginDialog=this.dialog=this._createLoginDialog(),this.emit("dialog-create"));var h=this._loginDialog,t=d&&d.error,u=d&&d.token,r=new k(function(){h.onCancel()});if(h.open)return a=new b("identity-manager:busy","BUSY"),r.reject(a),r.promise;w.hide(h.errMsg_);t&&t.details&&403==t.details.httpStatus&&u&&(e.set(h.errMsg_,"innerHTML",this._nls.forbidden),w.show(h.errMsg_));h.dfd_=r;h.serverInfo_=c;h.resUrl_=a;h.admin_=d&&d.isAdmin;
e.set(h.resLink_,{title:a,innerHTML:"("+(this.getResourceName(a)||this._nls.lblItem)+")"});e.set(h.serverLink_,{title:c.server,innerHTML:(-1!==c.server.toLowerCase().indexOf("arcgis.com")?"ArcGIS Online":c.server)+" "});h.txtPwd_.set("value","");h.show();return r.promise},_createLoginDialog:function(){var t=this._nls,u=a.substitute(t,this._dialogContent),u=a.substitute({resource:"\x3cspan class\x3d'resLink' style\x3d'word-wrap: break-word;'\x3e\x3c/span\x3e",server:"\x3cspan class\x3d'serverLink' style\x3d'word-wrap: break-word;'\x3e\x3c/span\x3e"},
u),f=new h({title:t.title,content:u,"class":" esri-widget esriSignInDialog esriIdentityDialog",style:"width: 18em;",esriIdMgr_:this,onShow:function(){this.domNode.classList.add("esriIdentityDialog--visible")},onHide:function(){this.domNode.classList.remove("esriIdentityDialog--visible")},keypressed_:function(a){a.charOrCode===l.ENTER&&this.execute_()},execute_:function(){var b=this.txtUser_.get("value"),d=this.txtPwd_.get("value"),f=this.dfd_,r=this;if(this.form_.validate()&&b&&d){this.btnSubmit_.set("label",
t.lblSigning);var u=c.id.findCredential(r.resUrl_,b),l=function(c){r.btnSubmit_.set("label",t.lblOk);r.btnSubmit_.set("disabled",!1);w.hide(r.errMsg_);r.hide();h._DialogLevelManager.hide(r);var e=r.serverInfo_;r.dfd_=r.serverInfo_=r.generateDfd_=r.resUrl_=null;var g,p,d=u,l;c&&(g=c.token,p=a.isDefined(c.expires)?Number(c.expires):null,l=!!c.ssl,d?(d.userId=b,d.token=g,d.expires=p,d.validity=c.validity,d.ssl=l,d.creationTime=(new Date).getTime()):d=new q({userId:b,server:e.server,token:g,expires:p,
ssl:l,isAdmin:r.admin_,validity:c.validity}));f.resolve(d)};u&&!u._enqueued?l():(r.btnSubmit_.set("disabled",!0),r.generateDfd_=c.id.generateToken(this.serverInfo_,{username:b,password:d},{isAdmin:this.admin_}).then(l).then(null,function(a){r.btnSubmit_.set("disabled",!1);r.generateDfd_=null;r.btnSubmit_.set("label",t.lblOk);e.set(r.errMsg_,"innerHTML",a&&a.details&&a.details.httpStatus?t.invalidUser:t.noAuthService);w.show(r.errMsg_)}))}},cancel_:function(){f.generateDfd_&&f.generateDfd_.cancel();
var a=f.dfd_,c=f.resUrl_,d=f.serverInfo_;f.btnSubmit_.set("disabled",!1);f.dfd_=f.serverInfo_=f.generateDfd_=f.resUrl_=null;w.hide(f.errMsg_);h._DialogLevelManager.hide(f);f.esriIdMgr_.emit("dialog-cancel",{resourceUrl:c,serverInfo:d});c=new b("identity-manager:user-aborted","ABORTED");a.reject(c)}}),u=f.domNode;f.form_=d.byNode(m.query(".esriIdForm",u)[0]);f.txtUser_=d.byNode(m.query(".esriIdUser",u)[0]);f.txtPwd_=d.byNode(m.query(".esriIdPwd",u)[0]);f.btnSubmit_=d.byNode(m.query(".esriIdSubmit",
u)[0]);f.btnCancel_=d.byNode(m.query(".esriIdCancel",u)[0]);f.resLink_=m.query(".resLink",u)[0];f.serverLink_=m.query(".serverLink",u)[0];f.errMsg_=m.query(".esriErrorMsg",u)[0];f.connect(f.txtUser_,"onKeyPress",f.keypressed_);f.connect(f.txtPwd_,"onKeyPress",f.keypressed_);f.connect(f.btnSubmit_,"onClick",f.execute_);f.connect(f.btnCancel_,"onClick",f.onCancel);f.connect(f,"onCancel",f.cancel_);return f}})})},"dijit/registry":function(){define(["dojo/_base/array","dojo/_base/window","./main"],function(m,
n,k){var f={},e={},l={length:0,add:function(d){if(e[d.id])throw Error("Tried to register widget with id\x3d\x3d"+d.id+" but that id is already registered");e[d.id]=d;this.length++},remove:function(d){e[d]&&(delete e[d],this.length--)},byId:function(d){return"string"==typeof d?e[d]:d},byNode:function(d){return e[d.getAttribute("widgetId")]},toArray:function(){var d=[],h;for(h in e)d.push(e[h]);return d},getUniqueId:function(d){var h;do h=d+"_"+(d in f?++f[d]:f[d]=0);while(e[h]);return"dijit"==k._scopeName?
h:k._scopeName+"_"+h},findWidgets:function(d,h){function c(b){for(b=b.firstChild;b;b=b.nextSibling)if(1==b.nodeType){var d=b.getAttribute("widgetId");d?(d=e[d])&&a.push(d):b!==h&&c(b)}}var a=[];c(d);return a},_destroyAll:function(){k._curFocus=null;k._prevFocus=null;k._activeStack=[];m.forEach(l.findWidgets(n.body()),function(d){d._destroyed||(d.destroyRecursive?d.destroyRecursive():d.destroy&&d.destroy())})},getEnclosingWidget:function(d){for(;d;){var h=1==d.nodeType&&d.getAttribute("widgetId");
if(h)return e[h];d=d.parentNode}return null},_hash:e};return k.registry=l})},"dijit/main":function(){define(["dojo/_base/kernel"],function(m){return m.dijit})},"dijit/Dialog":function(){define("require dojo/_base/array dojo/aspect dojo/_base/declare dojo/Deferred dojo/dom dojo/dom-class dojo/dom-geometry dojo/dom-style dojo/_base/fx dojo/i18n dojo/keys dojo/_base/lang dojo/on dojo/ready dojo/sniff dojo/touch dojo/window dojo/dnd/Moveable dojo/dnd/TimedMoveable ./focus ./_base/manager ./_Widget ./_TemplatedMixin ./_CssStateMixin ./form/_FormMixin ./_DialogMixin ./DialogUnderlay ./layout/ContentPane ./layout/utils dojo/text!./templates/Dialog.html ./a11yclick dojo/i18n!./nls/common".split(" "),
function(m,n,k,f,e,l,d,h,c,a,b,w,q,u,y,t,B,D,z,v,x,r,C,F,G,H,g,p,E,M,O){function I(){}var J=new e;J.resolve(!0);r=f("dijit._DialogBase"+(t("dojo-bidi")?"_NoBidi":""),[F,H,g,G],{templateString:O,baseClass:"dijitDialog",cssStateNodes:{closeButtonNode:"dijitDialogCloseIcon"},_setTitleAttr:{node:"titleNode",type:"innerHTML"},open:!1,duration:r.defaultDuration,refocus:!0,autofocus:!0,_firstFocusItem:null,_lastFocusItem:null,draggable:!0,_setDraggableAttr:function(g){this._set("draggable",g)},maxRatio:.9,
closable:!0,_setClosableAttr:function(g){this.closeButtonNode.style.display=g?"":"none";this._set("closable",g)},postMixInProperties:function(){var g=b.getLocalization("dijit","common");q.mixin(this,g);this.inherited(arguments)},postCreate:function(){c.set(this.domNode,{display:"none",position:"absolute"});this.ownerDocumentBody.appendChild(this.domNode);this.inherited(arguments);k.after(this,"onExecute",q.hitch(this,"hide"),!0);k.after(this,"onCancel",q.hitch(this,"hide"),!0);u(this.closeButtonNode,
B.press,function(g){g.stopPropagation()});this._modalconnects=[]},onLoad:function(){this.resize();this._position();this.autofocus&&N.isTop(this)&&(this._getFocusItems(),x.focus(this._firstFocusItem));this.inherited(arguments)},focus:function(){this._getFocusItems();x.focus(this._firstFocusItem)},_endDrag:function(){var g=h.position(this.domNode),a=D.getBox(this.ownerDocument);g.y=Math.min(Math.max(g.y,0),a.h-g.h);g.x=Math.min(Math.max(g.x,0),a.w-g.w);this._relativePosition=g;this._position()},_setup:function(){var g=
this.domNode;this.titleBar&&this.draggable?(this._moveable=new (6==t("ie")?v:z)(g,{handle:this.titleBar}),k.after(this._moveable,"onMoveStop",q.hitch(this,"_endDrag"),!0)):d.add(g,"dijitDialogFixed");this.underlayAttrs={dialogId:this.id,"class":n.map(this["class"].split(/\s/),function(g){return g+"_underlay"}).join(" "),_onKeyDown:q.hitch(this,"_onKey"),ownerDocument:this.ownerDocument}},_size:function(){this.resize()},_position:function(){if(!d.contains(this.ownerDocumentBody,"dojoMove")){var g=
this.domNode,a=D.getBox(this.ownerDocument),p=this._relativePosition,b=h.position(g);c.set(g,{left:Math.floor(a.l+(p?Math.min(p.x,a.w-b.w):(a.w-b.w)/2))+"px",top:Math.floor(a.t+(p?Math.min(p.y,a.h-b.h):(a.h-b.h)/2))+"px"})}},_onKey:function(g){if(g.keyCode==w.TAB){this._getFocusItems();var a=g.target;this._firstFocusItem==this._lastFocusItem?(g.stopPropagation(),g.preventDefault()):a==this._firstFocusItem&&g.shiftKey?(x.focus(this._lastFocusItem),g.stopPropagation(),g.preventDefault()):a!=this._lastFocusItem||
g.shiftKey||(x.focus(this._firstFocusItem),g.stopPropagation(),g.preventDefault())}else this.closable&&g.keyCode==w.ESCAPE&&(this.onCancel(),g.stopPropagation(),g.preventDefault())},show:function(){if(this.open)return J.promise;this._started||this.startup();this._alreadyInitialized||(this._setup(),this._alreadyInitialized=!0);this._fadeOutDeferred&&(this._fadeOutDeferred.cancel(),N.hide(this));var g=D.get(this.ownerDocument);this._modalconnects.push(u(g,"scroll",q.hitch(this,"resize",null)));this._modalconnects.push(u(this.domNode,
"keydown",q.hitch(this,"_onKey")));c.set(this.domNode,{opacity:0,display:""});this._set("open",!0);this._onShow();this.resize();this._position();var p;this._fadeInDeferred=new e(q.hitch(this,function(){p.stop();delete this._fadeInDeferred}));this._fadeInDeferred.then(void 0,I);g=this._fadeInDeferred.promise;p=a.fadeIn({node:this.domNode,duration:this.duration,beforeBegin:q.hitch(this,function(){N.show(this,this.underlayAttrs)}),onEnd:q.hitch(this,function(){this.autofocus&&N.isTop(this)&&(this._getFocusItems(),
x.focus(this._firstFocusItem));this._fadeInDeferred.resolve(!0);delete this._fadeInDeferred})}).play();return g},hide:function(){if(!this._alreadyInitialized||!this.open)return J.promise;this._fadeInDeferred&&this._fadeInDeferred.cancel();var g;this._fadeOutDeferred=new e(q.hitch(this,function(){g.stop();delete this._fadeOutDeferred}));this._fadeOutDeferred.then(void 0,I);this._fadeOutDeferred.then(q.hitch(this,"onHide"));var p=this._fadeOutDeferred.promise;g=a.fadeOut({node:this.domNode,duration:this.duration,
onEnd:q.hitch(this,function(){this.domNode.style.display="none";N.hide(this);this._fadeOutDeferred.resolve(!0);delete this._fadeOutDeferred})}).play();this._scrollConnected&&(this._scrollConnected=!1);for(var b;b=this._modalconnects.pop();)b.remove();this._relativePosition&&delete this._relativePosition;this._set("open",!1);return p},resize:function(g){if("none"!=this.domNode.style.display){this._checkIfSingleChild();if(!g){this._shrunk&&(this._singleChild&&"undefined"!=typeof this._singleChildOriginalStyle&&
(this._singleChild.domNode.style.cssText=this._singleChildOriginalStyle,delete this._singleChildOriginalStyle),n.forEach([this.domNode,this.containerNode,this.titleBar,this.actionBarNode],function(g){g&&c.set(g,{position:"static",width:"auto",height:"auto"})}),this.domNode.style.position="absolute");var a=D.getBox(this.ownerDocument);a.w*=this.maxRatio;a.h*=this.maxRatio;var p=h.position(this.domNode);p.w>=a.w||p.h>=a.h?(g={w:Math.min(p.w,a.w),h:Math.min(p.h,a.h)},this._shrunk=!0):this._shrunk=!1}if(g){h.setMarginBox(this.domNode,
g);a=[];this.titleBar&&a.push({domNode:this.titleBar,region:"top"});this.actionBarNode&&a.push({domNode:this.actionBarNode,region:"bottom"});p={domNode:this.containerNode,region:"center"};a.push(p);var b=M.marginBox2contentBox(this.domNode,g);M.layoutChildren(this.domNode,b,a);this._singleChild?(a=M.marginBox2contentBox(this.containerNode,p),this._singleChild.resize({w:a.w,h:a.h})):(this.containerNode.style.overflow="auto",this._layoutChildren())}else this._layoutChildren();t("touch")||g||this._position()}},
_layoutChildren:function(){n.forEach(this.getChildren(),function(g){g.resize&&g.resize()})},destroy:function(){this._fadeInDeferred&&this._fadeInDeferred.cancel();this._fadeOutDeferred&&this._fadeOutDeferred.cancel();this._moveable&&this._moveable.destroy();for(var g;g=this._modalconnects.pop();)g.remove();N.hide(this);this.inherited(arguments)}});t("dojo-bidi")&&(r=f("dijit._DialogBase",r,{_setTitleAttr:function(g){this._set("title",g);this.titleNode.innerHTML=g;this.applyTextDir(this.titleNode)},
_setTextDirAttr:function(g){this._created&&this.textDir!=g&&(this._set("textDir",g),this.set("title",this.title))}}));var L=f("dijit.Dialog",[E,r],{});L._DialogBase=r;var N=L._DialogLevelManager={_beginZIndex:950,show:function(g,a){A[A.length-1].focus=x.curNode;var b=A[A.length-1].dialog?A[A.length-1].zIndex+2:L._DialogLevelManager._beginZIndex;c.set(g.domNode,"zIndex",b);p.show(a,b-1);A.push({dialog:g,underlayAttrs:a,zIndex:b})},hide:function(g){if(A[A.length-1].dialog==g){A.pop();var a=A[A.length-
1];1==A.length?p.hide():p.show(a.underlayAttrs,a.zIndex-1);if(g.refocus&&(g=a.focus,!a.dialog||g&&l.isDescendant(g,a.dialog.domNode)||(a.dialog._getFocusItems(),g=a.dialog._firstFocusItem),g))try{g.focus()}catch(K){}}else a=n.indexOf(n.map(A,function(g){return g.dialog}),g),-1!=a&&A.splice(a,1)},isTop:function(g){return A[A.length-1].dialog==g}},A=L._dialogStack=[{dialog:null,focus:null,underlayAttrs:null}];x.watch("curNode",function(g,a,p){g=A[A.length-1].dialog;if(p&&g&&!g._fadeOutDeferred&&p.ownerDocument==
g.ownerDocument){do if(p==g.domNode||d.contains(p,"dijitPopup"))return;while(p=p.parentNode);g.focus()}});t("dijit-legacy-requires")&&y(0,function(){m(["dijit/TooltipDialog"])});return L})},"dojo/touch":function(){define("./_base/kernel ./aspect ./dom ./dom-class ./_base/lang ./on ./has ./mouse ./domReady ./_base/window".split(" "),function(m,n,k,f,e,l,d,h,c,a){function b(a,g,p){return p?function(g,a){return l(g,p,a)}:y?function(p,b){var c=l(p,g,function(g){b.call(this,g);G=(new Date).getTime()}),
d=l(p,a,function(g){(!G||(new Date).getTime()>G+1E3)&&b.call(this,g)});return{remove:function(){c.remove();d.remove()}}}:function(g,p){return l(g,a,p)}}function w(a){do if(void 0!==a.dojoClick)return a;while(a=a.parentNode)}function q(b,g,p){if(!h.isRight(b)){var c=w(b.target);if(B=!b.target.disabled&&c&&c.dojoClick)if(z=(D="useTarget"==B)?c:b.target,D&&b.preventDefault(),v=b.changedTouches?b.changedTouches[0].pageX-a.global.pageXOffset:b.clientX,x=b.changedTouches?b.changedTouches[0].pageY-a.global.pageYOffset:
b.clientY,r=("object"==typeof B?B.x:"number"==typeof B?B:0)||4,C=("object"==typeof B?B.y:"number"==typeof B?B:0)||4,!t){b=function(g){a.doc.addEventListener(g,function(a){var p=a.target;B&&!a._dojo_click&&(new Date).getTime()<=F+1E3&&("INPUT"!=p.tagName||!f.contains(p,"dijitOffScreen"))&&(a.stopPropagation(),a.stopImmediatePropagation&&a.stopImmediatePropagation(),"click"==g&&("INPUT"!=p.tagName||"radio"==p.type&&(f.contains(p,"dijitCheckBoxInput")||f.contains(p,"mblRadioButton"))||"checkbox"==p.type&&
(f.contains(p,"dijitCheckBoxInput")||f.contains(p,"mblCheckBox")))&&"TEXTAREA"!=p.tagName&&"AUDIO"!=p.tagName&&"VIDEO"!=p.tagName&&a.preventDefault())},!0)};var d=function(g){B=D?k.isDescendant(a.doc.elementFromPoint(g.changedTouches?g.changedTouches[0].pageX-a.global.pageXOffset:g.clientX,g.changedTouches?g.changedTouches[0].pageY-a.global.pageYOffset:g.clientY),z):B&&(g.changedTouches?g.changedTouches[0].target:g.target)==z&&Math.abs((g.changedTouches?g.changedTouches[0].pageX-a.global.pageXOffset:
g.clientX)-v)<=r&&Math.abs((g.changedTouches?g.changedTouches[0].pageY-a.global.pageYOffset:g.clientY)-x)<=C};t=!0;a.doc.addEventListener(g,function(g){h.isRight(g)||(d(g),D&&g.preventDefault())},!0);a.doc.addEventListener(p,function(g){if(!h.isRight(g)&&(d(g),B)){var a=function(a){var p=document.createEvent("MouseEvents");p._dojo_click=!0;p.initMouseEvent(a,!0,!0,g.view,g.detail,b.screenX,b.screenY,b.clientX,b.clientY,g.ctrlKey,g.altKey,g.shiftKey,g.metaKey,0,null);return p};F=(new Date).getTime();
var p=D?z:g.target;"LABEL"===p.tagName&&(p=k.byId(p.getAttribute("for"))||p);var b=g.changedTouches?g.changedTouches[0]:g,c=a("mousedown"),e=a("mouseup"),r=a("click");setTimeout(function(){l.emit(p,"mousedown",c);l.emit(p,"mouseup",e);l.emit(p,"click",r);F=(new Date).getTime()},0)}},!0);b("click");b("mousedown");b("mouseup")}}}d("ios");var u=function(){var a={},g;for(g in{down:1,move:1,up:1,cancel:1,over:1,out:1})a[g]="pointer"+g;return a}(),y=d("touch-events"),t,B,D=!1,z,v,x,r,C,F,G;d("touch")&&
c(function(){a.doc.addEventListener(u.down,function(a){q(a,u.move,u.up)},!0)});n={press:b("mousedown","touchstart",u.down),move:b("mousemove","dojotouchmove",u.move),release:b("mouseup","dojotouchend",u.up),cancel:b(h.leave,"touchcancel",u.cancel),over:b("mouseover","dojotouchover",u.over),out:b("mouseout","dojotouchout",u.out),enter:h._eventHandler(b("mouseover","dojotouchover",u.over)),leave:h._eventHandler(b("mouseout","dojotouchout",u.out))};return m.touch=n})},"dojo/window":function(){define("./_base/lang ./sniff ./_base/window ./dom ./dom-geometry ./dom-style ./dom-construct".split(" "),
function(m,n,k,f,e,l,d){n.add("rtl-adjust-position-for-verticalScrollBar",function(c,a){c=k.body(a);a=d.create("div",{style:{overflow:"scroll",overflowX:"visible",direction:"rtl",visibility:"hidden",position:"absolute",left:"0",top:"0",width:"64px",height:"64px"}},c,"last");var b=d.create("div",{style:{overflow:"hidden",direction:"ltr"}},a,"last"),h=0!=e.position(b).x;a.removeChild(b);c.removeChild(a);return h});n.add("position-fixed-support",function(c,a){c=k.body(a);a=d.create("span",{style:{visibility:"hidden",
position:"fixed",left:"1px",top:"1px"}},c,"last");var b=d.create("span",{style:{position:"fixed",left:"0",top:"0"}},a,"last"),h=e.position(b).x!=e.position(a).x;a.removeChild(b);c.removeChild(a);return h});var h={getBox:function(c){c=c||k.doc;var a="BackCompat"==c.compatMode?k.body(c):c.documentElement,b=e.docScroll(c);if(n("touch")){var d=h.get(c);c=d.innerWidth||a.clientWidth;a=d.innerHeight||a.clientHeight}else c=a.clientWidth,a=a.clientHeight;return{l:b.x,t:b.y,w:c,h:a}},get:function(c){if(n("ie")&&
h!==document.parentWindow){c.parentWindow.execScript("document._parentWindow \x3d window;","Javascript");var a=c._parentWindow;c._parentWindow=null;return a}return c.parentWindow||c.defaultView},scrollIntoView:function(c,a){try{c=f.byId(c);var b=c.ownerDocument||k.doc,d=k.body(b),h=b.documentElement||d.parentNode,u=n("ie")||0,y=n("webkit");if(c!=d&&c!=h){var t="BackCompat"==b.compatMode,B=Math.min(d.clientWidth||h.clientWidth,h.clientWidth||d.clientWidth),m=Math.min(d.clientHeight||h.clientHeight,
h.clientHeight||d.clientHeight),b=y||t?d:h,z=a||e.position(c),v=c.parentNode;a=function(g){return 6>=u||7==u&&t?!1:n("position-fixed-support")&&"fixed"==l.get(g,"position").toLowerCase()};var x=this,y=function(g,a,p){"BODY"==g.tagName||"HTML"==g.tagName?x.get(g.ownerDocument).scrollBy(a,p):(a&&(g.scrollLeft+=a),p&&(g.scrollTop+=p))};if(!a(c))for(;v;){v==d&&(v=b);var r=e.position(v),C=a(v),F="rtl"==l.getComputedStyle(v).direction.toLowerCase();if(v==b)r.w=B,r.h=m,b==h&&u&&F&&(r.x+=b.offsetWidth-r.w),
r.x=0,r.y=0;else{var G=e.getPadBorderExtents(v);r.w-=G.w;r.h-=G.h;r.x+=G.l;r.y+=G.t;var H=v.clientWidth,g=r.w-H;0<H&&0<g&&(F&&n("rtl-adjust-position-for-verticalScrollBar")&&(r.x+=g),r.w=H);H=v.clientHeight;g=r.h-H;0<H&&0<g&&(r.h=H)}C&&(0>r.y&&(r.h+=r.y,r.y=0),0>r.x&&(r.w+=r.x,r.x=0),r.y+r.h>m&&(r.h=m-r.y),r.x+r.w>B&&(r.w=B-r.x));var p=z.x-r.x,E=z.y-r.y,M=p+z.w-r.w,O=E+z.h-r.h,I,J;0<M*p&&(v.scrollLeft||v==b||v.scrollWidth>v.offsetHeight)&&(I=Math[0>p?"max":"min"](p,M),F&&8==u&&!t&&(I=-I),J=v.scrollLeft,
y(v,I,0),I=v.scrollLeft-J,z.x-=I);0<O*E&&(v.scrollTop||v==b||v.scrollHeight>v.offsetHeight)&&(I=Math.ceil(Math[0>E?"max":"min"](E,O)),J=v.scrollTop,y(v,0,I),I=v.scrollTop-J,z.y-=I);v=v!=b&&!C&&v.parentNode}}}catch(L){console.error("scrollIntoView: "+L),c.scrollIntoView(!1)}}};m.setObject("dojo.window",h);return h})},"dojo/dnd/Moveable":function(){define("../_base/array ../_base/declare ../_base/lang ../dom ../dom-class ../Evented ../has ../on ../topic ../touch ./common ./Mover ../_base/window".split(" "),
function(m,n,k,f,e,l,d,h,c,a,b,w,q){var u,y=function(){},y=function(a,b){"touchAction"in document.body.style?u="touchAction":"msTouchAction"in document.body.style&&(u="msTouchAction");y=function(a,b){a.style[u]=b};y(a,b)};return n("dojo.dnd.Moveable",[l],{handle:"",delay:0,skip:!1,constructor:function(b,c){this.node=f.byId(b);y(this.node,"none");c||(c={});this.handle=c.handle?f.byId(c.handle):null;this.handle||(this.handle=this.node);this.delay=0<c.delay?c.delay:0;this.skip=c.skip;this.mover=c.mover?
c.mover:w;this.events=[h(this.handle,a.press,k.hitch(this,"onMouseDown")),h(this.handle,"dragstart",k.hitch(this,"onSelectStart")),h(this.handle,"selectstart",k.hitch(this,"onSelectStart"))]},markupFactory:function(a,b,c){return new c(b,a)},destroy:function(){m.forEach(this.events,function(a){a.remove()});y(this.node,"");this.events=this.node=this.handle=null},onMouseDown:function(c){if(!this.skip||!b.isFormElement(c)){if(this.delay)this.events.push(h(this.handle,a.move,k.hitch(this,"onMouseMove")),
h(this.handle.ownerDocument,a.release,k.hitch(this,"onMouseUp"))),this._lastX=c.pageX,this._lastY=c.pageY;else this.onDragDetected(c);c.stopPropagation();c.preventDefault()}},onMouseMove:function(a){if(Math.abs(a.pageX-this._lastX)>this.delay||Math.abs(a.pageY-this._lastY)>this.delay)this.onMouseUp(a),this.onDragDetected(a);a.stopPropagation();a.preventDefault()},onMouseUp:function(a){for(var b=0;2>b;++b)this.events.pop().remove();a.stopPropagation();a.preventDefault()},onSelectStart:function(a){this.skip&&
b.isFormElement(a)||(a.stopPropagation(),a.preventDefault())},onDragDetected:function(a){new this.mover(this.node,a,this)},onMoveStart:function(a){c.publish("/dnd/move/start",a);e.add(q.body(),"dojoMove");e.add(this.node,"dojoMoveItem")},onMoveStop:function(a){c.publish("/dnd/move/stop",a);e.remove(q.body(),"dojoMove");e.remove(this.node,"dojoMoveItem")},onFirstMove:function(){},onMove:function(a,b){this.onMoving(a,b);var c=a.node.style;c.left=b.l+"px";c.top=b.t+"px";this.onMoved(a,b)},onMoving:function(){},
onMoved:function(){}})})},"dojo/dnd/common":function(){define(["../sniff","../_base/kernel","../_base/lang","../dom"],function(m,n,k,f){var e=k.getObject("dojo.dnd",!0);e.getCopyKeyState=function(e){return e.metaKey};e._uniqueId=0;e.getUniqueId=function(){var l;do l=n._scopeName+"Unique"+ ++e._uniqueId;while(f.byId(l));return l};e._empty={};e.isFormElement=function(e){e=e.target;3==e.nodeType&&(e=e.parentNode);return 0<=" a button textarea input select option ".indexOf(" "+e.tagName.toLowerCase()+
" ")};return e})},"dojo/dnd/Mover":function(){define("../_base/array ../_base/declare ../_base/lang ../sniff ../_base/window ../dom ../dom-geometry ../dom-style ../Evented ../on ../touch ./common ./autoscroll".split(" "),function(m,n,k,f,e,l,d,h,c,a,b,w,q){return n("dojo.dnd.Mover",[c],{constructor:function(c,d,e){function h(a){a.preventDefault();a.stopPropagation()}this.node=l.byId(c);this.marginBox={l:d.pageX,t:d.pageY};this.mouseButton=d.button;d=this.host=e;c=c.ownerDocument;this.events=[a(c,
b.move,k.hitch(this,"onFirstMove")),a(c,b.move,k.hitch(this,"onMouseMove")),a(c,b.release,k.hitch(this,"onMouseUp")),a(c,"dragstart",h),a(c.body,"selectstart",h)];q.autoScrollStart(c);if(d&&d.onMoveStart)d.onMoveStart(this)},onMouseMove:function(a){q.autoScroll(a);var b=this.marginBox;this.host.onMove(this,{l:b.l+a.pageX,t:b.t+a.pageY},a);a.preventDefault();a.stopPropagation()},onMouseUp:function(a){(f("webkit")&&2==this.mouseButton?0==a.button:this.mouseButton==a.button)&&this.destroy();a.preventDefault();
a.stopPropagation()},onFirstMove:function(a){var b=this.node.style,c,f=this.host;switch(b.position){case "relative":case "absolute":c=Math.round(parseFloat(b.left))||0;b=Math.round(parseFloat(b.top))||0;break;default:b.position="absolute";b=d.getMarginBox(this.node);c=e.doc.body;var u=h.getComputedStyle(c),w=d.getMarginBox(c,u),u=d.getContentBox(c,u);c=b.l-(u.l-w.l);b=b.t-(u.t-w.t)}this.marginBox.l=c-this.marginBox.l;this.marginBox.t=b-this.marginBox.t;if(f&&f.onFirstMove)f.onFirstMove(this,a);this.events.shift().remove()},
destroy:function(){m.forEach(this.events,function(a){a.remove()});var a=this.host;if(a&&a.onMoveStop)a.onMoveStop(this);this.events=this.node=this.host=null}})})},"dojo/dnd/autoscroll":function(){define("../_base/lang ../sniff ../_base/window ../dom-geometry ../dom-style ../window".split(" "),function(m,n,k,f,e,l){var d={};m.setObject("dojo.dnd.autoscroll",d);d.getViewport=l.getBox;d.V_TRIGGER_AUTOSCROLL=32;d.H_TRIGGER_AUTOSCROLL=32;d.V_AUTOSCROLL_VALUE=16;d.H_AUTOSCROLL_VALUE=16;var h,c=k.doc,a=
Infinity,b=Infinity;d.autoScrollStart=function(d){c=d;h=l.getBox(c);d=k.body(c).parentNode;a=Math.max(d.scrollHeight-h.h,0);b=Math.max(d.scrollWidth-h.w,0)};d.autoScroll=function(e){var f=h||l.getBox(c),u=k.body(c).parentNode,w=0,t=0;e.clientX<d.H_TRIGGER_AUTOSCROLL?w=-d.H_AUTOSCROLL_VALUE:e.clientX>f.w-d.H_TRIGGER_AUTOSCROLL&&(w=Math.min(d.H_AUTOSCROLL_VALUE,b-u.scrollLeft));e.clientY<d.V_TRIGGER_AUTOSCROLL?t=-d.V_AUTOSCROLL_VALUE:e.clientY>f.h-d.V_TRIGGER_AUTOSCROLL&&(t=Math.min(d.V_AUTOSCROLL_VALUE,
a-u.scrollTop));window.scrollBy(w,t)};d._validNodes={div:1,p:1,td:1};d._validOverflow={auto:1,scroll:1};d.autoScrollNodes=function(a){for(var b,c,h,w,l,m=0,z=0,v=a.target;v;){if(1==v.nodeType&&v.tagName.toLowerCase()in d._validNodes){h=e.getComputedStyle(v);l=h.overflowX.toLowerCase()in d._validOverflow;w=h.overflowY.toLowerCase()in d._validOverflow;if(l||w)b=f.getContentBox(v,h),c=f.position(v,!0);if(l){h=Math.min(d.H_TRIGGER_AUTOSCROLL,b.w/2);l=a.pageX-c.x;if(n("webkit")||n("opera"))l+=k.body().scrollLeft;
m=0;0<l&&l<b.w&&(l<h?m=-h:l>b.w-h&&(m=h),v.scrollLeft+=m)}if(w){w=Math.min(d.V_TRIGGER_AUTOSCROLL,b.h/2);h=a.pageY-c.y;if(n("webkit")||n("opera"))h+=k.body().scrollTop;z=0;0<h&&h<b.h&&(h<w?z=-w:h>b.h-w&&(z=w),v.scrollTop+=z)}if(m||z)return}try{v=v.parentNode}catch(x){v=null}}d.autoScroll(a)};return d})},"dojo/dnd/TimedMoveable":function(){define(["../_base/declare","./Moveable"],function(m,n){var k=n.prototype.onMove;return m("dojo.dnd.TimedMoveable",n,{timeout:40,constructor:function(f,e){e||(e=
{});e.timeout&&"number"==typeof e.timeout&&0<=e.timeout&&(this.timeout=e.timeout)},onMoveStop:function(f){f._timer&&(clearTimeout(f._timer),k.call(this,f,f._leftTop));n.prototype.onMoveStop.apply(this,arguments)},onMove:function(f,e){f._leftTop=e;if(!f._timer){var l=this;f._timer=setTimeout(function(){f._timer=null;k.call(l,f,f._leftTop)},this.timeout)}}})})},"dijit/focus":function(){define("dojo/aspect dojo/_base/declare dojo/dom dojo/dom-attr dojo/dom-class dojo/dom-construct dojo/Evented dojo/_base/lang dojo/on dojo/domReady dojo/sniff dojo/Stateful dojo/_base/window dojo/window ./a11y ./registry ./main".split(" "),
function(m,n,k,f,e,l,d,h,c,a,b,w,q,u,y,t,B){var D,z,v=new (n([w,d],{curNode:null,activeStack:[],constructor:function(){var a=h.hitch(this,function(a){k.isDescendant(this.curNode,a)&&this.set("curNode",null);k.isDescendant(this.prevNode,a)&&this.set("prevNode",null)});m.before(l,"empty",a);m.before(l,"destroy",a)},registerIframe:function(a){return this.registerWin(a.contentWindow,a)},registerWin:function(a,b){var d=this,h=a.document&&a.document.body;if(h){var e=c(a.document,"pointerdown",function(g){g&&
g.target&&null==g.target.parentNode||d._onTouchNode(b||g.target,"mouse")}),g=c(h,"focusin",function(g){if(g.target.tagName){var a=g.target.tagName.toLowerCase();"#document"!=a&&"body"!=a&&(y.isFocusable(g.target)?d._onFocusNode(b||g.target):d._onTouchNode(b||g.target))}}),p=c(h,"focusout",function(g){d._onBlurNode(b||g.target)});return{remove:function(){e.remove();g.remove();p.remove();h=e=g=p=null}}}},_onBlurNode:function(a){a=(new Date).getTime();a<D+100||(this._clearFocusTimer&&clearTimeout(this._clearFocusTimer),
this._clearFocusTimer=setTimeout(h.hitch(this,function(){this.set("prevNode",this.curNode);this.set("curNode",null)}),0),this._clearActiveWidgetsTimer&&clearTimeout(this._clearActiveWidgetsTimer),a<z+100||(this._clearActiveWidgetsTimer=setTimeout(h.hitch(this,function(){delete this._clearActiveWidgetsTimer;this._setStack([])}),0)))},_onTouchNode:function(a,b){z=(new Date).getTime();this._clearActiveWidgetsTimer&&(clearTimeout(this._clearActiveWidgetsTimer),delete this._clearActiveWidgetsTimer);e.contains(a,
"dijitPopup")&&(a=a.firstChild);var c=[];try{for(;a;){var d=f.get(a,"dijitPopupParent");if(d)a=t.byId(d).domNode;else if(a.tagName&&"body"==a.tagName.toLowerCase()){if(a===q.body())break;a=u.get(a.ownerDocument).frameElement}else{var h=a.getAttribute&&a.getAttribute("widgetId"),g=h&&t.byId(h);!g||"mouse"==b&&g.get("disabled")||c.unshift(h);a=a.parentNode}}}catch(p){}this._setStack(c,b)},_onFocusNode:function(a){a&&9!=a.nodeType&&(D=(new Date).getTime(),this._clearFocusTimer&&(clearTimeout(this._clearFocusTimer),
delete this._clearFocusTimer),this._onTouchNode(a),a!=this.curNode&&(this.set("prevNode",this.curNode),this.set("curNode",a)))},_setStack:function(a,b){var c=this.activeStack,d=c.length-1,h=a.length-1;if(a[h]!=c[d]){this.set("activeStack",a);var g;for(g=d;0<=g&&c[g]!=a[g];g--)if(d=t.byId(c[g]))d._hasBeenBlurred=!0,d.set("focused",!1),d._focusManager==this&&d._onBlur(b),this.emit("widget-blur",d,b);for(g++;g<=h;g++)if(d=t.byId(a[g]))d.set("focused",!0),d._focusManager==this&&d._onFocus(b),this.emit("widget-focus",
d,b)}},focus:function(a){if(a)try{a.focus()}catch(C){}}}));a(function(){var a=v.registerWin(u.get(document));b("ie")&&c(window,"unload",function(){a&&(a.remove(),a=null)})});B.focus=function(a){v.focus(a)};for(var x in v)/^_/.test(x)||(B.focus[x]="function"==typeof v[x]?h.hitch(v,x):v[x]);v.watch(function(a,b,c){B.focus[a]=c});return v})},"dojo/Stateful":function(){define(["./_base/declare","./_base/lang","./_base/array","./when"],function(m,n,k,f){return m("dojo.Stateful",null,{_attrPairNames:{},
_getAttrNames:function(e){var f=this._attrPairNames;return f[e]?f[e]:f[e]={s:"_"+e+"Setter",g:"_"+e+"Getter"}},postscript:function(e){e&&this.set(e)},_get:function(e,f){return"function"===typeof this[f.g]?this[f.g]():this[e]},get:function(e){return this._get(e,this._getAttrNames(e))},set:function(e,l){if("object"===typeof e){for(var d in e)e.hasOwnProperty(d)&&"_watchCallbacks"!=d&&this.set(d,e[d]);return this}d=this._getAttrNames(e);var h=this._get(e,d);d=this[d.s];var c;"function"===typeof d?c=
d.apply(this,Array.prototype.slice.call(arguments,1)):this[e]=l;if(this._watchCallbacks){var a=this;f(c,function(){a._watchCallbacks(e,h,l)})}return this},_changeAttrValue:function(e,f){var d=this.get(e);this[e]=f;this._watchCallbacks&&this._watchCallbacks(e,d,f);return this},watch:function(e,f){var d=this._watchCallbacks;if(!d)var h=this,d=this._watchCallbacks=function(a,b,c,e){var f=function(d){if(d){d=d.slice();for(var e=0,f=d.length;e<f;e++)d[e].call(h,a,b,c)}};f(d["_"+a]);e||f(d["*"])};f||"function"!==
typeof e?e="_"+e:(f=e,e="*");var c=d[e];"object"!==typeof c&&(c=d[e]=[]);c.push(f);e={};e.unwatch=e.remove=function(){var a=k.indexOf(c,f);-1<a&&c.splice(a,1)};return e}})})},"dijit/a11y":function(){define("dojo/_base/array dojo/dom dojo/dom-attr dojo/dom-style dojo/_base/lang dojo/sniff ./main".split(" "),function(m,n,k,f,e,l,d){var h={_isElementShown:function(c){var a=f.get(c);return"hidden"!=a.visibility&&"collapsed"!=a.visibility&&"none"!=a.display&&"hidden"!=k.get(c,"type")},hasDefaultTabStop:function(c){switch(c.nodeName.toLowerCase()){case "a":return k.has(c,
"href");case "area":case "button":case "input":case "object":case "select":case "textarea":return!0;case "iframe":var a;try{var b=c.contentDocument;if("designMode"in b&&"on"==b.designMode)return!0;a=b.body}catch(w){try{a=c.contentWindow.document.body}catch(q){return!1}}return a&&("true"==a.contentEditable||a.firstChild&&"true"==a.firstChild.contentEditable);default:return"true"==c.contentEditable}},effectiveTabIndex:function(c){if(!k.get(c,"disabled"))return k.has(c,"tabIndex")?+k.get(c,"tabIndex"):
h.hasDefaultTabStop(c)?0:void 0},isTabNavigable:function(c){return 0<=h.effectiveTabIndex(c)},isFocusable:function(c){return-1<=h.effectiveTabIndex(c)},_getTabNavigable:function(c){function a(a){return a&&"input"==a.tagName.toLowerCase()&&a.type&&"radio"==a.type.toLowerCase()&&a.name&&a.name.toLowerCase()}function b(b){return m[a(b)]||b}var d,e,f,n,t,B,m={},z=h._isElementShown,v=h.effectiveTabIndex,x=function(b){for(b=b.firstChild;b;b=b.nextSibling)if(!(1!=b.nodeType||9>=l("ie")&&"HTML"!==b.scopeName)&&
z(b)){var c=v(b);if(0<=c){if(0==c)d||(d=b),e=b;else if(0<c){if(!f||c<n)n=c,f=b;if(!t||c>=B)B=c,t=b}c=a(b);k.get(b,"checked")&&c&&(m[c]=b)}"SELECT"!=b.nodeName.toUpperCase()&&x(b)}};z(c)&&x(c);return{first:b(d),last:b(e),lowest:b(f),highest:b(t)}},getFirstInTabbingOrder:function(c,a){c=h._getTabNavigable(n.byId(c,a));return c.lowest?c.lowest:c.first},getLastInTabbingOrder:function(c,a){c=h._getTabNavigable(n.byId(c,a));return c.last?c.last:c.highest}};e.mixin(d,h);return h})},"dijit/_base/manager":function(){define(["dojo/_base/array",
"dojo/_base/config","dojo/_base/lang","../registry","../main"],function(m,n,k,f,e){var l={};m.forEach("byId getUniqueId findWidgets _destroyAll byNode getEnclosingWidget".split(" "),function(d){l[d]=f[d]});k.mixin(l,{defaultDuration:n.defaultDuration||200});k.mixin(e,l);return e})},"dijit/_Widget":function(){define("dojo/aspect dojo/_base/config dojo/_base/connect dojo/_base/declare dojo/has dojo/_base/kernel dojo/_base/lang dojo/query dojo/ready ./registry ./_WidgetBase ./_OnDijitClickMixin ./_FocusMixin dojo/uacss ./hccss".split(" "),
function(m,n,k,f,e,l,d,h,c,a,b,w,q){function u(){}function y(a){return function(b,c,h,e){return b&&"string"==typeof c&&b[c]==u?b.on(c.substring(2).toLowerCase(),d.hitch(h,e)):a.apply(k,arguments)}}m.around(k,"connect",y);l.connect&&m.around(l,"connect",y);m=f("dijit._Widget",[b,w,q],{onClick:u,onDblClick:u,onKeyDown:u,onKeyPress:u,onKeyUp:u,onMouseDown:u,onMouseMove:u,onMouseOut:u,onMouseOver:u,onMouseLeave:u,onMouseEnter:u,onMouseUp:u,constructor:function(a){this._toConnect={};for(var b in a)this[b]===
u&&(this._toConnect[b.replace(/^on/,"").toLowerCase()]=a[b],delete a[b])},postCreate:function(){this.inherited(arguments);for(var a in this._toConnect)this.on(a,this._toConnect[a]);delete this._toConnect},on:function(a,b){return this[this._onMap(a)]===u?k.connect(this.domNode,a.toLowerCase(),this,b):this.inherited(arguments)},_setFocusedAttr:function(a){this._focused=a;this._set("focused",a)},setAttribute:function(a,b){l.deprecated(this.declaredClass+"::setAttribute(attr, value) is deprecated. Use set() instead.",
"","2.0");this.set(a,b)},attr:function(a,b){return 2<=arguments.length||"object"===typeof a?this.set.apply(this,arguments):this.get(a)},getDescendants:function(){l.deprecated(this.declaredClass+"::getDescendants() is deprecated. Use getChildren() instead.","","2.0");return this.containerNode?h("[widgetId]",this.containerNode).map(a.byNode):[]},_onShow:function(){this.onShow()},onShow:function(){},onHide:function(){},onClose:function(){return!0}});e("dijit-legacy-requires")&&c(0,function(){require(["dijit/_base"])});
return m})},"dijit/_WidgetBase":function(){define("require dojo/_base/array dojo/aspect dojo/_base/config dojo/_base/connect dojo/_base/declare dojo/dom dojo/dom-attr dojo/dom-class dojo/dom-construct dojo/dom-geometry dojo/dom-style dojo/has dojo/_base/kernel dojo/_base/lang dojo/on dojo/ready dojo/Stateful dojo/topic dojo/_base/window ./Destroyable dojo/has!dojo-bidi?./_BidiMixin ./registry".split(" "),function(m,n,k,f,e,l,d,h,c,a,b,w,q,u,y,t,B,D,z,v,x,r,C){function F(a){return function(g){h[g?
"set":"remove"](this.domNode,a,g);this._set(a,g)}}q.add("dijit-legacy-requires",!u.isAsync);q.add("dojo-bidi",!1);q("dijit-legacy-requires")&&B(0,function(){m(["dijit/_base/manager"])});var G={};f=l("dijit._WidgetBase",[D,x],{id:"",_setIdAttr:"domNode",lang:"",_setLangAttr:F("lang"),dir:"",_setDirAttr:F("dir"),"class":"",_setClassAttr:{node:"domNode",type:"class"},_setTypeAttr:null,style:"",title:"",tooltip:"",baseClass:"",srcNodeRef:null,domNode:null,containerNode:null,ownerDocument:null,_setOwnerDocumentAttr:function(a){this._set("ownerDocument",
a)},attributeMap:{},_blankGif:f.blankGif||m.toUrl("dojo/resources/blank.gif"),textDir:"",_introspect:function(){var a=this.constructor;if(!a._setterAttrs){var g=a.prototype,b=a._setterAttrs=[],a=a._onMap={},c;for(c in g.attributeMap)b.push(c);for(c in g)/^on/.test(c)&&(a[c.substring(2).toLowerCase()]=c),/^_set[A-Z](.*)Attr$/.test(c)&&(c=c.charAt(4).toLowerCase()+c.substr(5,c.length-9),g.attributeMap&&c in g.attributeMap||b.push(c))}},postscript:function(a,g){this.create(a,g)},create:function(a,g){this._introspect();
this.srcNodeRef=d.byId(g);this._connects=[];this._supportingWidgets=[];this.srcNodeRef&&this.srcNodeRef.id&&"string"==typeof this.srcNodeRef.id&&(this.id=this.srcNodeRef.id);a&&(this.params=a,y.mixin(this,a));this.postMixInProperties();this.id||(this.id=C.getUniqueId(this.declaredClass.replace(/\./g,"_")),this.params&&delete this.params.id);this.ownerDocument=this.ownerDocument||(this.srcNodeRef?this.srcNodeRef.ownerDocument:document);this.ownerDocumentBody=v.body(this.ownerDocument);C.add(this);
this.buildRendering();var b;this.domNode&&(this._applyAttributes(),(a=this.srcNodeRef)&&a.parentNode&&this.domNode!==a&&(a.parentNode.replaceChild(this.domNode,a),b=!0),this.domNode.setAttribute("widgetId",this.id));this.postCreate();b&&delete this.srcNodeRef;this._created=!0},_applyAttributes:function(){var a={},g;for(g in this.params||{})a[g]=this._get(g);n.forEach(this.constructor._setterAttrs,function(g){if(!(g in a)){var b=this._get(g);b&&this.set(g,b)}},this);for(g in a)this.set(g,a[g])},postMixInProperties:function(){},
buildRendering:function(){this.domNode||(this.domNode=this.srcNodeRef||this.ownerDocument.createElement("div"));if(this.baseClass){var a=this.baseClass.split(" ");this.isLeftToRight()||(a=a.concat(n.map(a,function(a){return a+"Rtl"})));c.add(this.domNode,a)}},postCreate:function(){},startup:function(){this._started||(this._started=!0,n.forEach(this.getChildren(),function(a){a._started||a._destroyed||!y.isFunction(a.startup)||(a.startup(),a._started=!0)}))},destroyRecursive:function(a){this._beingDestroyed=
!0;this.destroyDescendants(a);this.destroy(a)},destroy:function(a){function g(g){g.destroyRecursive?g.destroyRecursive(a):g.destroy&&g.destroy(a)}this._beingDestroyed=!0;this.uninitialize();n.forEach(this._connects,y.hitch(this,"disconnect"));n.forEach(this._supportingWidgets,g);this.domNode&&n.forEach(C.findWidgets(this.domNode,this.containerNode),g);this.destroyRendering(a);C.remove(this.id);this._destroyed=!0},destroyRendering:function(b){this.bgIframe&&(this.bgIframe.destroy(b),delete this.bgIframe);
this.domNode&&(b?h.remove(this.domNode,"widgetId"):a.destroy(this.domNode),delete this.domNode);this.srcNodeRef&&(b||a.destroy(this.srcNodeRef),delete this.srcNodeRef)},destroyDescendants:function(a){n.forEach(this.getChildren(),function(g){g.destroyRecursive&&g.destroyRecursive(a)})},uninitialize:function(){return!1},_setStyleAttr:function(a){var g=this.domNode;y.isObject(a)?w.set(g,a):g.style.cssText=g.style.cssText?g.style.cssText+("; "+a):a;this._set("style",a)},_attrToDom:function(a,g,b){b=3<=
arguments.length?b:this.attributeMap[a];n.forEach(y.isArray(b)?b:[b],function(b){var p=this[b.node||b||"domNode"];switch(b.type||"attribute"){case "attribute":y.isFunction(g)&&(g=y.hitch(this,g));b=b.attribute?b.attribute:/^on[A-Z][a-zA-Z]*$/.test(a)?a.toLowerCase():a;p.tagName?h.set(p,b,g):p.set(b,g);break;case "innerText":p.innerHTML="";p.appendChild(this.ownerDocument.createTextNode(g));break;case "innerHTML":p.innerHTML=g;break;case "class":c.replace(p,g,this[a]);break;case "toggleClass":c.toggle(p,
b.className||a,g)}},this)},get:function(a){var g=this._getAttrNames(a);return this[g.g]?this[g.g]():this._get(a)},set:function(a,g){if("object"===typeof a){for(var b in a)this.set(b,a[b]);return this}b=this._getAttrNames(a);var c=this[b.s];if(y.isFunction(c))var d=c.apply(this,Array.prototype.slice.call(arguments,1));else{var c=this.focusNode&&!y.isFunction(this.focusNode)?"focusNode":"domNode",h=this[c]&&this[c].tagName,e;if((e=h)&&!(e=G[h])){e=this[c];var f={},w;for(w in e)f[w.toLowerCase()]=!0;
e=G[h]=f}w=e;b=a in this.attributeMap?this.attributeMap[a]:b.s in this?this[b.s]:w&&b.l in w&&"function"!=typeof g||/^aria-|^data-|^role$/.test(a)?c:null;null!=b&&this._attrToDom(a,g,b);this._set(a,g)}return d||this},_attrPairNames:{},_getAttrNames:function(a){var g=this._attrPairNames;if(g[a])return g[a];var b=a.replace(/^[a-z]|-[a-zA-Z]/g,function(a){return a.charAt(a.length-1).toUpperCase()});return g[a]={n:a+"Node",s:"_set"+b+"Attr",g:"_get"+b+"Attr",l:b.toLowerCase()}},_set:function(a,g){var b=
this[a];this[a]=g;!this._created||b===g||b!==b&&g!==g||(this._watchCallbacks&&this._watchCallbacks(a,b,g),this.emit("attrmodified-"+a,{detail:{prevValue:b,newValue:g}}))},_get:function(a){return this[a]},emit:function(a,g,b){g=g||{};void 0===g.bubbles&&(g.bubbles=!0);void 0===g.cancelable&&(g.cancelable=!0);g.detail||(g.detail={});g.detail.widget=this;var c,p=this["on"+a];p&&(c=p.apply(this,b?b:[g]));this._started&&!this._beingDestroyed&&t.emit(this.domNode,a.toLowerCase(),g);return c},on:function(a,
g){var b=this._onMap(a);return b?k.after(this,b,g,!0):this.own(t(this.domNode,a,g))[0]},_onMap:function(a){var g=this.constructor,b=g._onMap;if(!b){var b=g._onMap={},c;for(c in g.prototype)/^on/.test(c)&&(b[c.replace(/^on/,"").toLowerCase()]=c)}return b["string"==typeof a&&a.toLowerCase()]},toString:function(){return"[Widget "+this.declaredClass+", "+(this.id||"NO ID")+"]"},getChildren:function(){return this.containerNode?C.findWidgets(this.containerNode):[]},getParent:function(){return C.getEnclosingWidget(this.domNode.parentNode)},
connect:function(a,g,b){return this.own(e.connect(a,g,this,b))[0]},disconnect:function(a){a.remove()},subscribe:function(a,g){return this.own(z.subscribe(a,y.hitch(this,g)))[0]},unsubscribe:function(a){a.remove()},isLeftToRight:function(){return this.dir?"ltr"==this.dir.toLowerCase():b.isBodyLtr(this.ownerDocument)},isFocusable:function(){return this.focus&&"none"!=w.get(this.domNode,"display")},placeAt:function(b,g){var c=!b.tagName&&C.byId(b);!c||!c.addChild||g&&"number"!==typeof g?(b=c&&"domNode"in
c?c.containerNode&&!/after|before|replace/.test(g||"")?c.containerNode:c.domNode:d.byId(b,this.ownerDocument),a.place(this.domNode,b,g),!this._started&&(this.getParent()||{})._started&&this.startup()):c.addChild(this,g);return this},defer:function(a,g){var b=setTimeout(y.hitch(this,function(){b&&(b=null,this._destroyed||y.hitch(this,a)())}),g||0);return{remove:function(){b&&(clearTimeout(b),b=null);return null}}}});q("dojo-bidi")&&f.extend(r);return f})},"dijit/Destroyable":function(){define(["dojo/_base/array",
"dojo/aspect","dojo/_base/declare"],function(m,n,k){return k("dijit.Destroyable",null,{destroy:function(f){this._destroyed=!0},own:function(){var f=["destroyRecursive","destroy","remove"];m.forEach(arguments,function(e){function l(){h.remove();m.forEach(c,function(a){a.remove()})}var d,h=n.before(this,"destroy",function(a){e[d](a)}),c=[];e.then?(d="cancel",e.then(l,l)):m.forEach(f,function(a){"function"===typeof e[a]&&(d||(d=a),c.push(n.after(e,a,l,!0)))})},this);return arguments}})})},"dijit/_OnDijitClickMixin":function(){define("dojo/on dojo/_base/array dojo/keys dojo/_base/declare dojo/has ./a11yclick".split(" "),
function(m,n,k,f,e,l){m=f("dijit._OnDijitClickMixin",null,{connect:function(d,h,c){return this.inherited(arguments,[d,"ondijitclick"==h?l:h,c])}});m.a11yclick=l;return m})},"dijit/a11yclick":function(){define(["dojo/keys","dojo/mouse","dojo/on","dojo/touch"],function(m,n,k,f){function e(d){if((d.keyCode===m.ENTER||d.keyCode===m.SPACE)&&!/input|button|textarea/i.test(d.target.nodeName))for(d=d.target;d;d=d.parentNode)if(d.dojoClick)return!0}var l;k(document,"keydown",function(d){e(d)?(l=d.target,d.preventDefault()):
l=null});k(document,"keyup",function(d){e(d)&&d.target==l&&(l=null,k.emit(d.target,"click",{cancelable:!0,bubbles:!0,ctrlKey:d.ctrlKey,shiftKey:d.shiftKey,metaKey:d.metaKey,altKey:d.altKey,_origType:d.type}))});var d=function(d,c){d.dojoClick=!0;return k(d,"click",c)};d.click=d;d.press=function(d,c){var a=k(d,f.press,function(a){("mousedown"!=a.type||n.isLeft(a))&&c(a)}),b=k(d,"keydown",function(a){a.keyCode!==m.ENTER&&a.keyCode!==m.SPACE||c(a)});return{remove:function(){a.remove();b.remove()}}};
d.release=function(d,c){var a=k(d,f.release,function(a){("mouseup"!=a.type||n.isLeft(a))&&c(a)}),b=k(d,"keyup",function(a){a.keyCode!==m.ENTER&&a.keyCode!==m.SPACE||c(a)});return{remove:function(){a.remove();b.remove()}}};d.move=f.move;return d})},"dijit/_FocusMixin":function(){define(["./focus","./_WidgetBase","dojo/_base/declare","dojo/_base/lang"],function(m,n,k,f){f.extend(n,{focused:!1,onFocus:function(){},onBlur:function(){},_onFocus:function(){this.onFocus()},_onBlur:function(){this.onBlur()}});
return k("dijit._FocusMixin",null,{_focusManager:m})})},"dojo/uacss":function(){define(["./dom-geometry","./_base/lang","./domReady","./sniff","./_base/window"],function(m,n,k,f,e){var l=e.doc.documentElement;e=f("ie");var d=f("opera"),h=Math.floor,c=m.boxModel.replace(/-/,""),d={dj_quirks:0,dj_opera:d,dj_khtml:0,dj_webkit:f("webkit"),dj_safari:f("safari"),dj_chrome:f("chrome"),dj_edge:1,dj_gecko:1,dj_ios:f("ios"),dj_android:0};e&&(d.dj_ie=!0,d["dj_ie"+h(e)]=!0,d.dj_iequirks=0);d["dj_ff"+h(1)]=!0;
d["dj_"+c]=!0;var a="",b;for(b in d)d[b]&&(a+=b+" ");l.className=n.trim(l.className+" "+a);k(function(){if(!m.isBodyLtr()){var b="dj_rtl dijitRtl "+a.replace(/ /g,"-rtl ");l.className=n.trim(l.className+" "+b+"dj_rtl dijitRtl "+a.replace(/ /g,"-rtl "))}});return f})},"dijit/hccss":function(){define(["dojo/dom-class","dojo/hccss","dojo/domReady","dojo/_base/window"],function(m,n,k,f){k(function(){n("highcontrast")&&m.add(f.body(),"dijit_a11y")});return n})},"dojo/hccss":function(){define("require ./_base/config ./dom-class ./dom-style ./has ./domReady ./_base/window".split(" "),
function(m,n,k,f,e,l,d){e.add("highcontrast",function(){var h=d.doc.createElement("div");try{h.style.cssText='border: 1px solid; border-color:red green; position: absolute; height: 5px; top: -999px;background-image: url("'+(n.blankGif||m.toUrl("./resources/blank.gif"))+'");';d.body().appendChild(h);var c=f.getComputedStyle(h),a=c.backgroundImage;return c.borderTopColor==c.borderRightColor||a&&("none"==a||"url(invalid-url:)"==a)}catch(b){return console.warn("hccss: exception detecting high-contrast mode, document is likely hidden: "+
b.toString()),!1}finally{8>=e("ie")?h.outerHTML="":d.body().removeChild(h)}});l(function(){e("highcontrast")&&k.add(d.body(),"dj_a11y")});return e})},"dijit/_TemplatedMixin":function(){define("dojo/cache dojo/_base/declare dojo/dom-construct dojo/_base/lang dojo/on dojo/sniff dojo/string ./_AttachMixin".split(" "),function(m,n,k,f,e,l,d,h){var c=n("dijit._TemplatedMixin",h,{templateString:null,templatePath:null,_skipNodeCache:!1,searchContainerNode:!0,_stringRepl:function(a){var b=this.declaredClass,
c=this;return d.substitute(a,this,function(a,d){"!"==d.charAt(0)&&(a=f.getObject(d.substr(1),!1,c));if("undefined"==typeof a)throw Error(b+" template:"+d);return null==a?"":"!"==d.charAt(0)?a:this._escapeValue(""+a)},this)},_escapeValue:function(a){return a.replace(/["'<>&]/g,function(a){return{"\x26":"\x26amp;","\x3c":"\x26lt;","\x3e":"\x26gt;",'"':"\x26quot;","'":"\x26#x27;"}[a]})},buildRendering:function(){if(!this._rendered){this.templateString||(this.templateString=m(this.templatePath,{sanitize:!0}));
var a=c.getCachedTemplate(this.templateString,this._skipNodeCache,this.ownerDocument),b;if(f.isString(a)){if(b=k.toDom(this._stringRepl(a),this.ownerDocument),1!=b.nodeType)throw Error("Invalid template: "+a);}else b=a.cloneNode(!0);this.domNode=b}this.inherited(arguments);this._rendered||this._fillContent(this.srcNodeRef);this._rendered=!0},_fillContent:function(a){var b=this.containerNode;if(a&&b)for(;a.hasChildNodes();)b.appendChild(a.firstChild)}});c._templateCache={};c.getCachedTemplate=function(a,
b,e){var h=c._templateCache,f=a,l=h[f];if(l){try{if(!l.ownerDocument||l.ownerDocument==(e||document))return l}catch(t){}k.destroy(l)}a=d.trim(a);if(b||a.match(/\$\{([^\}]+)\}/g))return h[f]=a;b=k.toDom(a,e);if(1!=b.nodeType)throw Error("Invalid template: "+a);return h[f]=b};l("ie")&&e(window,"unload",function(){var a=c._templateCache,b;for(b in a){var d=a[b];"object"==typeof d&&k.destroy(d);delete a[b]}});return c})},"dojo/cache":function(){define(["./_base/kernel","./text"],function(m){return m.cache})},
"dijit/_AttachMixin":function(){define("require dojo/_base/array dojo/_base/connect dojo/_base/declare dojo/_base/lang dojo/mouse dojo/on dojo/touch ./_WidgetBase".split(" "),function(m,n,k,f,e,l,d,h,c){var a=e.delegate(h,{mouseenter:l.enter,mouseleave:l.leave,keypress:k._keypress}),b;k=f("dijit._AttachMixin",null,{constructor:function(){this._attachPoints=[];this._attachEvents=[]},buildRendering:function(){this.inherited(arguments);this._attachTemplateNodes(this.domNode);this._beforeFillContent()},
_beforeFillContent:function(){},_attachTemplateNodes:function(a){for(var b=a;;)if(1==b.nodeType&&(this._processTemplateNode(b,function(a,b){return a.getAttribute(b)},this._attach)||this.searchContainerNode)&&b.firstChild)b=b.firstChild;else{if(b==a)break;for(;!b.nextSibling;)if(b=b.parentNode,b==a)return;b=b.nextSibling}},_processTemplateNode:function(a,b,c){var d=!0,h=this.attachScope||this,f=b(a,"dojoAttachPoint")||b(a,"data-dojo-attach-point");if(f)for(var l=f.split(/\s*,\s*/);f=l.shift();)e.isArray(h[f])?
h[f].push(a):h[f]=a,d="containerNode"!=f,this._attachPoints.push(f);if(b=b(a,"dojoAttachEvent")||b(a,"data-dojo-attach-event"))for(f=b.split(/\s*,\s*/),l=e.trim;b=f.shift();)if(b){var u=null;-1!=b.indexOf(":")?(u=b.split(":"),b=l(u[0]),u=l(u[1])):b=l(b);u||(u=b);this._attachEvents.push(c(a,b,e.hitch(h,u)))}return d},_attach:function(c,e,f){e=e.replace(/^on/,"").toLowerCase();e="dijitclick"==e?b||(b=m("./a11yclick")):a[e]||e;return d(c,e,f)},_detachTemplateNodes:function(){var a=this.attachScope||
this;n.forEach(this._attachPoints,function(b){delete a[b]});this._attachPoints=[];n.forEach(this._attachEvents,function(a){a.remove()});this._attachEvents=[]},destroyRendering:function(){this._detachTemplateNodes();this.inherited(arguments)}});e.extend(c,{dojoAttachEvent:"",dojoAttachPoint:""});return k})},"dijit/_CssStateMixin":function(){define("dojo/_base/array dojo/_base/declare dojo/dom dojo/dom-class dojo/has dojo/_base/lang dojo/on dojo/domReady dojo/touch dojo/_base/window ./a11yclick ./registry".split(" "),
function(m,n,k,f,e,l,d,h,c,a,b,w){n=n("dijit._CssStateMixin",[],{hovering:!1,active:!1,_applyAttributes:function(){this.inherited(arguments);m.forEach("disabled readOnly checked selected focused state hovering active _opened".split(" "),function(a){this.watch(a,l.hitch(this,"_setStateClass"))},this);for(var a in this.cssStateNodes||{})this._trackMouseState(this[a],this.cssStateNodes[a]);this._trackMouseState(this.domNode,this.baseClass);this._setStateClass()},_cssMouseEvent:function(a){if(!this.disabled)switch(a.type){case "mouseover":case "MSPointerOver":case "pointerover":this._set("hovering",
!0);this._set("active",this._mouseDown);break;case "mouseout":case "MSPointerOut":case "pointerout":this._set("hovering",!1);this._set("active",!1);break;case "mousedown":case "touchstart":case "MSPointerDown":case "pointerdown":case "keydown":this._set("active",!0);break;case "mouseup":case "dojotouchend":case "MSPointerUp":case "pointerup":case "keyup":this._set("active",!1)}},_setStateClass:function(){function a(a){b=b.concat(m.map(b,function(b){return b+a}),"dijit"+a)}var b=this.baseClass.split(" ");
this.isLeftToRight()||a("Rtl");var c="mixed"==this.checked?"Mixed":this.checked?"Checked":"";this.checked&&a(c);this.state&&a(this.state);this.selected&&a("Selected");this._opened&&a("Opened");this.disabled?a("Disabled"):this.readOnly?a("ReadOnly"):this.active?a("Active"):this.hovering&&a("Hover");this.focused&&a("Focused");var c=this.stateNode||this.domNode,d={};m.forEach(c.className.split(" "),function(a){d[a]=!0});"_stateClasses"in this&&m.forEach(this._stateClasses,function(a){delete d[a]});m.forEach(b,
function(a){d[a]=!0});var e=[],f;for(f in d)e.push(f);c.className=e.join(" ");this._stateClasses=b},_subnodeCssMouseEvent:function(a,b,c){function d(c){f.toggle(a,b+"Active",c)}if(!this.disabled&&!this.readOnly)switch(c.type){case "mouseover":case "MSPointerOver":case "pointerover":f.toggle(a,b+"Hover",!0);break;case "mouseout":case "MSPointerOut":case "pointerout":f.toggle(a,b+"Hover",!1);d(!1);break;case "mousedown":case "touchstart":case "MSPointerDown":case "pointerdown":case "keydown":d(!0);
break;case "mouseup":case "MSPointerUp":case "pointerup":case "dojotouchend":case "keyup":d(!1);break;case "focus":case "focusin":f.toggle(a,b+"Focused",!0);break;case "blur":case "focusout":f.toggle(a,b+"Focused",!1)}},_trackMouseState:function(a,b){a._cssState=b}});h(function(){function e(a,b,c){if(!c||!k.isDescendant(c,b))for(;b&&b!=c;b=b.parentNode)if(b._cssState){var d=w.getEnclosingWidget(b);d&&(b==d.domNode?d._cssMouseEvent(a):d._subnodeCssMouseEvent(b,b._cssState,a))}}var f=a.body(),h;d(f,
c.over,function(a){e(a,a.target,a.relatedTarget)});d(f,c.out,function(a){e(a,a.target,a.relatedTarget)});d(f,b.press,function(a){h=a.target;e(a,h)});d(f,b.release,function(a){e(a,h);h=null});d(f,"focusin, focusout",function(a){var b=a.target;if(b._cssState&&!b.getAttribute("widgetId")){var c=w.getEnclosingWidget(b);c&&c._subnodeCssMouseEvent(b,b._cssState,a)}})});return n})},"dijit/form/_FormMixin":function(){define("dojo/_base/array dojo/_base/declare dojo/_base/kernel dojo/_base/lang dojo/on dojo/window".split(" "),
function(m,n,k,f,e,l){return n("dijit.form._FormMixin",null,{state:"",_getDescendantFormWidgets:function(d){var e=[];m.forEach(d||this.getChildren(),function(c){"value"in c?e.push(c):e=e.concat(this._getDescendantFormWidgets(c.getChildren()))},this);return e},reset:function(){m.forEach(this._getDescendantFormWidgets(),function(d){d.reset&&d.reset()})},validate:function(){var d=!1;return m.every(m.map(this._getDescendantFormWidgets(),function(e){e._hasBeenBlurred=!0;var c=e.disabled||!e.validate||
e.validate();c||d||(l.scrollIntoView(e.containerNode||e.domNode),e.focus(),d=!0);return c}),function(d){return d})},setValues:function(d){k.deprecated(this.declaredClass+"::setValues() is deprecated. Use set('value', val) instead.","","2.0");return this.set("value",d)},_setValueAttr:function(d){var e={};m.forEach(this._getDescendantFormWidgets(),function(a){a.name&&(e[a.name]||(e[a.name]=[])).push(a)});for(var c in e)if(e.hasOwnProperty(c)){var a=e[c],b=f.getObject(c,!1,d);void 0!==b&&(b=[].concat(b),
"boolean"==typeof a[0].checked?m.forEach(a,function(a){a.set("value",-1!=m.indexOf(b,a._get("value")))}):a[0].multiple?a[0].set("value",b):m.forEach(a,function(a,c){a.set("value",b[c])}))}},getValues:function(){k.deprecated(this.declaredClass+"::getValues() is deprecated. Use get('value') instead.","","2.0");return this.get("value")},_getValueAttr:function(){var d={};m.forEach(this._getDescendantFormWidgets(),function(e){var c=e.name;if(c&&!e.disabled){var a=e.get("value");"boolean"==typeof e.checked?
/Radio/.test(e.declaredClass)?!1!==a?f.setObject(c,a,d):(a=f.getObject(c,!1,d),void 0===a&&f.setObject(c,null,d)):(e=f.getObject(c,!1,d),e||(e=[],f.setObject(c,e,d)),!1!==a&&e.push(a)):(e=f.getObject(c,!1,d),"undefined"!=typeof e?f.isArray(e)?e.push(a):f.setObject(c,[e,a],d):f.setObject(c,a,d))}});return d},isValid:function(){return""==this.state},onValidStateChange:function(){},_getState:function(){var d=m.map(this._descendants,function(d){return d.get("state")||""});return 0<=m.indexOf(d,"Error")?
"Error":0<=m.indexOf(d,"Incomplete")?"Incomplete":""},disconnectChildren:function(){},connectChildren:function(d){this._descendants=this._getDescendantFormWidgets();m.forEach(this._descendants,function(d){d._started||d.startup()});d||this._onChildChange()},_onChildChange:function(d){d&&"state"!=d&&"disabled"!=d||this._set("state",this._getState());d&&"value"!=d&&"disabled"!=d&&"checked"!=d||(this._onChangeDelayTimer&&this._onChangeDelayTimer.remove(),this._onChangeDelayTimer=this.defer(function(){delete this._onChangeDelayTimer;
this._set("value",this.get("value"))},10))},startup:function(){this.inherited(arguments);this._descendants=this._getDescendantFormWidgets();this.value=this.get("value");this.state=this._getState();var d=this;this.own(e(this.containerNode,"attrmodified-state, attrmodified-disabled, attrmodified-value, attrmodified-checked",function(e){e.target!=d.domNode&&d._onChildChange(e.type.replace("attrmodified-",""))}));this.watch("state",function(d,c,a){this.onValidStateChange(""==a)})},destroy:function(){this.inherited(arguments)}})})},
"dijit/_DialogMixin":function(){define(["dojo/_base/declare","./a11y"],function(m,n){return m("dijit._DialogMixin",null,{actionBarTemplate:"",execute:function(){},onCancel:function(){},onExecute:function(){},_onSubmit:function(){this.onExecute();this.execute(this.get("value"))},_getFocusItems:function(){var k=n._getTabNavigable(this.domNode);this._firstFocusItem=k.lowest||k.first||this.closeButtonNode||this.domNode;this._lastFocusItem=k.last||k.highest||this._firstFocusItem}})})},"dijit/DialogUnderlay":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect dojo/dom-attr dojo/dom-style dojo/on dojo/window ./_Widget ./_TemplatedMixin ./BackgroundIframe ./Viewport ./main".split(" "),
function(m,n,k,f,e,l,d,h,c,a,b,w){var q=m("dijit.DialogUnderlay",[h,c],{templateString:"\x3cdiv class\x3d'dijitDialogUnderlayWrapper'\x3e\x3cdiv class\x3d'dijitDialogUnderlay' tabIndex\x3d'-1' data-dojo-attach-point\x3d'node'\x3e\x3c/div\x3e\x3c/div\x3e",dialogId:"","class":"",_modalConnects:[],_setDialogIdAttr:function(a){f.set(this.node,"id",a+"_underlay");this._set("dialogId",a)},_setClassAttr:function(a){this.node.className="dijitDialogUnderlay "+a;this._set("class",a)},postCreate:function(){this.ownerDocumentBody.appendChild(this.domNode);
this.own(l(this.domNode,"keydown",n.hitch(this,"_onKeyDown")));this.inherited(arguments)},layout:function(){var a=this.node.style,b=this.domNode.style;b.display="none";var c=d.getBox(this.ownerDocument);b.top=c.t+"px";b.left=c.l+"px";a.width=c.w+"px";a.height=c.h+"px";b.display="block"},show:function(){this.domNode.style.display="block";this.open=!0;this.layout();this.bgIframe=new a(this.domNode);var c=d.get(this.ownerDocument);this._modalConnects=[b.on("resize",n.hitch(this,"layout")),l(c,"scroll",
n.hitch(this,"layout"))]},hide:function(){this.bgIframe.destroy();delete this.bgIframe;for(this.domNode.style.display="none";this._modalConnects.length;)this._modalConnects.pop().remove();this.open=!1},destroy:function(){for(;this._modalConnects.length;)this._modalConnects.pop().remove();this.inherited(arguments)},_onKeyDown:function(){}});q.show=function(a,b){var c=q._singleton;!c||c._destroyed?c=w._underlay=q._singleton=new q(a):a&&c.set(a);e.set(c.domNode,"zIndex",b);c.open||c.show()};q.hide=function(){var a=
q._singleton;a&&!a._destroyed&&a.hide()};return q})},"dijit/BackgroundIframe":function(){define("require ./main dojo/_base/config dojo/dom-construct dojo/dom-style dojo/_base/lang dojo/on dojo/sniff".split(" "),function(m,n,k,f,e,l,d,h){h.add("config-bgIframe",(h("ie")||0)&&!/IEMobile\/10\.0/.test(navigator.userAgent));var c=new function(){var a=[];this.pop=function(){var b;a.length?(b=a.pop(),b.style.display=""):(9>h("ie")?(b=k.dojoBlankHtmlUrl||m.toUrl("dojo/resources/blank.html")||'javascript:""',
b=document.createElement("\x3ciframe src\x3d'"+b+"' role\x3d'presentation' style\x3d'position: absolute; left: 0px; top: 0px;z-index: -1; filter:Alpha(Opacity\x3d\"0\");'\x3e")):(b=f.create("iframe"),b.src='javascript:""',b.className="dijitBackgroundIframe",b.setAttribute("role","presentation"),e.set(b,"opacity",.1)),b.tabIndex=-1);return b};this.push=function(b){b.style.display="none";a.push(b)}};n.BackgroundIframe=function(a){if(!a.id)throw Error("no id");if(h("config-bgIframe")){var b=this.iframe=
c.pop();a.appendChild(b);7>h("ie")?(this.resize(a),this._conn=d(a,"resize",l.hitch(this,"resize",a))):e.set(b,{width:"100%",height:"100%"})}};l.extend(n.BackgroundIframe,{resize:function(a){this.iframe&&e.set(this.iframe,{width:a.offsetWidth+"px",height:a.offsetHeight+"px"})},destroy:function(){this._conn&&(this._conn.remove(),this._conn=null);this.iframe&&(this.iframe.parentNode.removeChild(this.iframe),c.push(this.iframe),delete this.iframe)}});return n.BackgroundIframe})},"dijit/Viewport":function(){define(["dojo/Evented",
"dojo/on","dojo/domReady","dojo/sniff","dojo/window"],function(m,n,k,f,e){var l=new m,d;k(function(){var h=e.getBox();l._rlh=n(window,"resize",function(){var a=e.getBox();if(h.h!=a.h||h.w!=a.w)h=a,l.emit("resize")});if(8==f("ie")){var c=screen.deviceXDPI;setInterval(function(){screen.deviceXDPI!=c&&(c=screen.deviceXDPI,l.emit("resize"))},500)}f("ios")&&(n(document,"focusin",function(a){d=a.target}),n(document,"focusout",function(a){d=null}))});l.getEffectiveBox=function(h){h=e.getBox(h);var c=d&&
d.tagName&&d.tagName.toLowerCase();f("ios")&&d&&!d.readOnly&&("textarea"==c||"input"==c&&/^(color|email|number|password|search|tel|text|url)$/.test(d.type))&&(h.h*=0==orientation||180==orientation?.66:.4,c=d.getBoundingClientRect(),h.h=Math.max(h.h,c.top+c.height));return h};return l})},"dijit/layout/ContentPane":function(){define("dojo/_base/kernel dojo/_base/lang ../_Widget ../_Container ./_ContentPaneResizeMixin dojo/string dojo/html dojo/_base/array dojo/_base/declare dojo/_base/Deferred dojo/dom dojo/dom-attr dojo/dom-construct dojo/_base/xhr dojo/i18n dojo/when dojo/i18n!../nls/loading".split(" "),
function(m,n,k,f,e,l,d,h,c,a,b,w,q,u,y,t){return c("dijit.layout.ContentPane",[k,f,e],{href:"",content:"",extractContent:!1,parseOnLoad:!0,parserScope:m._scopeName,preventCache:!1,preload:!1,refreshOnShow:!1,loadingMessage:"\x3cspan class\x3d'dijitContentPaneLoading'\x3e\x3cspan class\x3d'dijitInline dijitIconLoading'\x3e\x3c/span\x3e${loadingState}\x3c/span\x3e",errorMessage:"\x3cspan class\x3d'dijitContentPaneError'\x3e\x3cspan class\x3d'dijitInline dijitIconError'\x3e\x3c/span\x3e${errorState}\x3c/span\x3e",
isLoaded:!1,baseClass:"dijitContentPane",ioArgs:{},onLoadDeferred:null,_setTitleAttr:null,stopParser:!0,template:!1,markupFactory:function(a,b,c){var d=new c(a,b);return!d.href&&d._contentSetter&&d._contentSetter.parseDeferred&&!d._contentSetter.parseDeferred.isFulfilled()?d._contentSetter.parseDeferred.then(function(){return d}):d},create:function(a,c){if(!(a&&a.template||!c||"href"in a||"content"in a)){c=b.byId(c);for(var d=c.ownerDocument.createDocumentFragment();c.firstChild;)d.appendChild(c.firstChild);
a=n.delegate(a,{content:d})}this.inherited(arguments,[a,c])},postMixInProperties:function(){this.inherited(arguments);var a=y.getLocalization("dijit","loading",this.lang);this.loadingMessage=l.substitute(this.loadingMessage,a);this.errorMessage=l.substitute(this.errorMessage,a)},buildRendering:function(){this.inherited(arguments);this.containerNode||(this.containerNode=this.domNode);this.domNode.removeAttribute("title")},startup:function(){this.inherited(arguments);this._contentSetter&&h.forEach(this._contentSetter.parseResults,
function(a){a._started||a._destroyed||!n.isFunction(a.startup)||(a.startup(),a._started=!0)},this)},_startChildren:function(){h.forEach(this.getChildren(),function(a){a._started||a._destroyed||!n.isFunction(a.startup)||(a.startup(),a._started=!0)});this._contentSetter&&h.forEach(this._contentSetter.parseResults,function(a){a._started||a._destroyed||!n.isFunction(a.startup)||(a.startup(),a._started=!0)},this)},setHref:function(a){m.deprecated("dijit.layout.ContentPane.setHref() is deprecated. Use set('href', ...) instead.",
"","2.0");return this.set("href",a)},_setHrefAttr:function(b){this.cancel();this.onLoadDeferred=new a(n.hitch(this,"cancel"));this.onLoadDeferred.then(n.hitch(this,"onLoad"));this._set("href",b);this.preload||this._created&&this._isShown()?this._load():this._hrefChanged=!0;return this.onLoadDeferred},setContent:function(a){m.deprecated("dijit.layout.ContentPane.setContent() is deprecated. Use set('content', ...) instead.","","2.0");this.set("content",a)},_setContentAttr:function(b){this._set("href",
"");this.cancel();this.onLoadDeferred=new a(n.hitch(this,"cancel"));this._created&&this.onLoadDeferred.then(n.hitch(this,"onLoad"));this._setContent(b||"");this._isDownloaded=!1;return this.onLoadDeferred},_getContentAttr:function(){return this.containerNode.innerHTML},cancel:function(){this._xhrDfd&&-1==this._xhrDfd.fired&&this._xhrDfd.cancel();delete this._xhrDfd;this.onLoadDeferred=null},destroy:function(){this.cancel();this.inherited(arguments)},destroyRecursive:function(a){this._beingDestroyed||
this.inherited(arguments)},_onShow:function(){this.inherited(arguments);if(this.href&&!this._xhrDfd&&(!this.isLoaded||this._hrefChanged||this.refreshOnShow))return this.refresh()},refresh:function(){this.cancel();this.onLoadDeferred=new a(n.hitch(this,"cancel"));this.onLoadDeferred.then(n.hitch(this,"onLoad"));this._load();return this.onLoadDeferred},_load:function(){this._setContent(this.onDownloadStart(),!0);var a=this,b={preventCache:this.preventCache||this.refreshOnShow,url:this.href,handleAs:"text"};
n.isObject(this.ioArgs)&&n.mixin(b,this.ioArgs);var c=this._xhrDfd=(this.ioMethod||u.get)(b),d;c.then(function(b){d=b;try{return a._isDownloaded=!0,a._setContent(b,!1)}catch(r){a._onError("Content",r)}},function(b){c.canceled||a._onError("Download",b);delete a._xhrDfd;return b}).then(function(){a.onDownloadEnd();delete a._xhrDfd;return d});delete this._hrefChanged},_onLoadHandler:function(a){this._set("isLoaded",!0);try{this.onLoadDeferred.resolve(a)}catch(D){console.error("Error "+this.widgetId+
" running custom onLoad code: "+D.message)}},_onUnloadHandler:function(){this._set("isLoaded",!1);try{this.onUnload()}catch(B){console.error("Error "+this.widgetId+" running custom onUnload code: "+B.message)}},destroyDescendants:function(a){this.isLoaded&&this._onUnloadHandler();var b=this._contentSetter;h.forEach(this.getChildren(),function(b){b.destroyRecursive?b.destroyRecursive(a):b.destroy&&b.destroy(a);b._destroyed=!0});b&&(h.forEach(b.parseResults,function(b){b._destroyed||(b.destroyRecursive?
b.destroyRecursive(a):b.destroy&&b.destroy(a),b._destroyed=!0)}),delete b.parseResults);a||q.empty(this.containerNode);delete this._singleChild},_setContent:function(a,b){a=this.preprocessContent(a);this.destroyDescendants();var c=this._contentSetter;c&&c instanceof d._ContentSetter||(c=this._contentSetter=new d._ContentSetter({node:this.containerNode,_onError:n.hitch(this,this._onError),onContentError:n.hitch(this,function(a){a=this.onContentError(a);try{this.containerNode.innerHTML=a}catch(C){console.error("Fatal "+
this.id+" could not change content due to "+C.message,C)}})}));var e=n.mixin({cleanContent:this.cleanContent,extractContent:this.extractContent,parseContent:!a.domNode&&this.parseOnLoad,parserScope:this.parserScope,startup:!1,dir:this.dir,lang:this.lang,textDir:this.textDir},this._contentSetterParams||{}),e=c.set(n.isObject(a)&&a.domNode?a.domNode:a,e),f=this;return t(e&&e.then?e:c.parseDeferred,function(){delete f._contentSetterParams;b||(f._started&&(f._startChildren(),f._scheduleLayout()),f._onLoadHandler(a))})},
preprocessContent:function(a){return a},_onError:function(a,b,c){this.onLoadDeferred.reject(b);a=this["on"+a+"Error"].call(this,b);c?console.error(c,b):a&&this._setContent(a,!0)},onLoad:function(){},onUnload:function(){},onDownloadStart:function(){return this.loadingMessage},onContentError:function(){},onDownloadError:function(){return this.errorMessage},onDownloadEnd:function(){}})})},"dijit/_Container":function(){define(["dojo/_base/array","dojo/_base/declare","dojo/dom-construct","dojo/_base/kernel"],
function(m,n,k,f){return n("dijit._Container",null,{buildRendering:function(){this.inherited(arguments);this.containerNode||(this.containerNode=this.domNode)},addChild:function(e,f){var d=this.containerNode;if(0<f){for(d=d.firstChild;0<f;)1==d.nodeType&&f--,d=d.nextSibling;d?f="before":(d=this.containerNode,f="last")}k.place(e.domNode,d,f);this._started&&!e._started&&e.startup()},removeChild:function(e){"number"==typeof e&&(e=this.getChildren()[e]);e&&(e=e.domNode)&&e.parentNode&&e.parentNode.removeChild(e)},
hasChildren:function(){return 0<this.getChildren().length},_getSiblingOfChild:function(e,f){var d=this.getChildren();e=m.indexOf(d,e);return d[e+f]},getIndexOfChild:function(e){return m.indexOf(this.getChildren(),e)}})})},"dijit/layout/_ContentPaneResizeMixin":function(){define("dojo/_base/array dojo/_base/declare dojo/dom-class dojo/dom-geometry dojo/dom-style dojo/_base/lang dojo/query ../registry ../Viewport ./utils".split(" "),function(m,n,k,f,e,l,d,h,c,a){return n("dijit.layout._ContentPaneResizeMixin",
null,{doLayout:!0,isLayoutContainer:!0,startup:function(){if(!this._started){var a=this.getParent();this._childOfLayoutWidget=a&&a.isLayoutContainer;this._needLayout=!this._childOfLayoutWidget;this.inherited(arguments);this._isShown()&&this._onShow();this._childOfLayoutWidget||this.own(c.on("resize",l.hitch(this,"resize")))}},_checkIfSingleChild:function(){if(this.doLayout){var a=[],c=!1;d("\x3e *",this.containerNode).some(function(b){var d=h.byNode(b);d&&d.resize?a.push(d):!/script|link|style/i.test(b.nodeName)&&
b.offsetHeight&&(c=!0)});this._singleChild=1!=a.length||c?null:a[0];k.toggle(this.containerNode,this.baseClass+"SingleChild",!!this._singleChild)}},resize:function(a,c){this._resizeCalled=!0;this._scheduleLayout(a,c)},_scheduleLayout:function(a,c){this._isShown()?this._layout(a,c):(this._needLayout=!0,this._changeSize=a,this._resultSize=c)},_layout:function(b,c){delete this._needLayout;this._wasShown||!1===this.open||this._onShow();b&&f.setMarginBox(this.domNode,b);var d=this.containerNode;d===this.domNode?
(c=c||{},l.mixin(c,b||{}),"h"in c&&"w"in c||(c=l.mixin(f.getMarginBox(d),c)),this._contentBox=a.marginBox2contentBox(d,c)):this._contentBox=f.getContentBox(d);this._layoutChildren()},_layoutChildren:function(){this._checkIfSingleChild();if(this._singleChild&&this._singleChild.resize){var a=this._contentBox||f.getContentBox(this.containerNode);this._singleChild.resize({w:a.w,h:a.h})}else for(var a=this.getChildren(),c,d=0;c=a[d++];)c.resize&&c.resize()},_isShown:function(){if(this._childOfLayoutWidget)return this._resizeCalled&&
"open"in this?this.open:this._resizeCalled;if("open"in this)return this.open;var a=this.domNode,c=this.domNode.parentNode;return"none"!=a.style.display&&"hidden"!=a.style.visibility&&!k.contains(a,"dijitHidden")&&c&&c.style&&"none"!=c.style.display},_onShow:function(){this._wasShown=!0;this._needLayout&&this._layout(this._changeSize,this._resultSize);this.inherited(arguments)}})})},"dijit/layout/utils":function(){define(["dojo/_base/array","dojo/dom-class","dojo/dom-geometry","dojo/dom-style","dojo/_base/lang"],
function(m,n,k,f,e){function l(c){return c.substring(0,1).toUpperCase()+c.substring(1)}function d(c,a){var b=c.resize?c.resize(a):k.setMarginBox(c.domNode,a);b?e.mixin(c,b):(e.mixin(c,k.getMarginBox(c.domNode)),e.mixin(c,a))}var h={marginBox2contentBox:function(c,a){var b=f.getComputedStyle(c),d=k.getMarginExtents(c,b),e=k.getPadBorderExtents(c,b);return{l:f.toPixelValue(c,b.paddingLeft),t:f.toPixelValue(c,b.paddingTop),w:a.w-(d.w+e.w),h:a.h-(d.h+e.h)}},layoutChildren:function(c,a,b,f,h){a=e.mixin({},
a);n.add(c,"dijitLayoutContainer");b=m.filter(b,function(a){return"center"!=a.region&&"client"!=a.layoutAlign}).concat(m.filter(b,function(a){return"center"==a.region||"client"==a.layoutAlign}));m.forEach(b,function(b){var c=b.domNode,e=b.region||b.layoutAlign;if(!e)throw Error("No region setting for "+b.id);var k=c.style;k.left=a.l+"px";k.top=a.t+"px";k.position="absolute";n.add(c,"dijitAlign"+l(e));c={};f&&f==b.id&&(c["top"==b.region||"bottom"==b.region?"h":"w"]=h);"leading"==e&&(e=b.isLeftToRight()?
"left":"right");"trailing"==e&&(e=b.isLeftToRight()?"right":"left");"top"==e||"bottom"==e?(c.w=a.w,d(b,c),a.h-=b.h,"top"==e?a.t+=b.h:k.top=a.t+a.h+"px"):"left"==e||"right"==e?(c.h=a.h,d(b,c),a.w-=b.w,"left"==e?a.l+=b.w:k.left=a.l+a.w+"px"):"client"!=e&&"center"!=e||d(b,a)})}};e.setObject("dijit.layout.utils",h);return h})},"dojo/html":function(){define("./_base/kernel ./_base/lang ./_base/array ./_base/declare ./dom ./dom-construct ./parser".split(" "),function(m,n,k,f,e,l,d){var h=0,c={_secureForInnerHtml:function(a){return a.replace(/(?:\s*<!DOCTYPE\s[^>]+>|<title[^>]*>[\s\S]*?<\/title>)/ig,
"")},_emptyNode:l.empty,_setNodeContent:function(a,b){l.empty(a);if(b)if("number"==typeof b&&(b=b.toString()),"string"==typeof b&&(b=l.toDom(b,a.ownerDocument)),!b.nodeType&&n.isArrayLike(b))for(var c=b.length,d=0;d<b.length;d=c==b.length?d+1:0)l.place(b[d],a,"last");else l.place(b,a,"last");return a},_ContentSetter:f("dojo.html._ContentSetter",null,{node:"",content:"",id:"",cleanContent:!1,extractContent:!1,parseContent:!1,parserScope:m._scopeName,startup:!0,constructor:function(a,b){n.mixin(this,
a||{});b=this.node=e.byId(this.node||b);this.id||(this.id=["Setter",b?b.id||b.tagName:"",h++].join("_"))},set:function(a,b){void 0!==a&&(this.content=a);"number"==typeof a&&(a=a.toString());b&&this._mixin(b);this.onBegin();this.setContent();return(a=this.onEnd())&&a.then?a:this.node},setContent:function(){var a=this.node;if(!a)throw Error(this.declaredClass+": setContent given no node");try{a=c._setNodeContent(a,this.content)}catch(w){var b=this.onContentError(w);try{a.innerHTML=b}catch(q){console.error("Fatal "+
this.declaredClass+".setContent could not change content due to "+q.message,q)}}this.node=a},empty:function(){this.parseDeferred&&(this.parseDeferred.isResolved()||this.parseDeferred.cancel(),delete this.parseDeferred);this.parseResults&&this.parseResults.length&&(k.forEach(this.parseResults,function(a){a.destroy&&a.destroy()}),delete this.parseResults);l.empty(this.node)},onBegin:function(){var a=this.content;if(n.isString(a)&&(this.cleanContent&&(a=c._secureForInnerHtml(a)),this.extractContent)){var b=
a.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);b&&(a=b[1])}this.empty();this.content=a;return this.node},onEnd:function(){this.parseContent&&this._parse();return this.node},tearDown:function(){delete this.parseResults;delete this.parseDeferred;delete this.node;delete this.content},onContentError:function(a){return"Error occurred setting content: "+a},onExecError:function(a){return"Error occurred executing scripts: "+a},_mixin:function(a){var b={},c;for(c in a)c in b||(this[c]=a[c])},_parse:function(){var a=
this.node;try{var b={};k.forEach(["dir","lang","textDir"],function(a){this[a]&&(b[a]=this[a])},this);var c=this;this.parseDeferred=d.parse({rootNode:a,noStart:!this.startup,inherited:b,scope:this.parserScope}).then(function(a){return c.parseResults=a},function(a){c._onError("Content",a,"Error parsing in _ContentSetter#"+this.id)})}catch(q){this._onError("Content",q,"Error parsing in _ContentSetter#"+this.id)}},_onError:function(a,b,d){a=this["on"+a+"Error"].call(this,b);d?console.error(d,b):a&&c._setNodeContent(this.node,
a,!0)}}),set:function(a,b,d){void 0==b&&(console.warn("dojo.html.set: no cont argument provided, using empty string"),b="");"number"==typeof b&&(b=b.toString());return d?(new c._ContentSetter(n.mixin(d,{content:b,node:a}))).set():c._setNodeContent(a,b,!0)}};n.setObject("dojo.html",c);return c})},"dojo/parser":function(){define("require ./_base/kernel ./_base/lang ./_base/array ./_base/config ./dom ./_base/window ./_base/url ./aspect ./promise/all ./date/stamp ./Deferred ./has ./query ./on ./ready".split(" "),
function(m,n,k,f,e,l,d,h,c,a,b,w,q,u,y,t){function B(a){return eval("("+a+")")}function D(a){var b=a._nameCaseMap,c=a.prototype;if(!b||b._extendCnt<v){var b=a._nameCaseMap={},d;for(d in c)"_"!==d.charAt(0)&&(b[d.toLowerCase()]=d);b._extendCnt=v}return b}function z(a,b){b||(b=m);var c=b._dojoParserCtorMap||(b._dojoParserCtorMap={}),d=a.join();if(!c[d]){for(var e=[],f=0,g=a.length;f<g;f++){var p=a[f];e[e.length]=c[p]=c[p]||k.getObject(p)||~p.indexOf("/")&&b(p)}a=e.shift();c[d]=e.length?a.createSubclass?
a.createSubclass(e):a.extend.apply(a,e):a}return c[d]}new Date("X");var v=0;c.after(k,"extend",function(){v++},!0);q={_clearCache:function(){v++;_ctorMap={}},_functionFromScript:function(a,b){var c="",d="",e=a.getAttribute(b+"args")||a.getAttribute("args");b=a.getAttribute("with");e=(e||"").split(/\s*,\s*/);b&&b.length&&f.forEach(b.split(/\s*,\s*/),function(a){c+="with("+a+"){";d+="}"});return new Function(e,c+a.innerHTML+d)},instantiate:function(a,b,c){b=b||{};c=c||{};var d=(c.scope||n._scopeName)+
"Type",e="data-"+(c.scope||n._scopeName)+"-",h=e+"type",g=e+"mixins",p=[];f.forEach(a,function(a){var c=d in b?b[d]:a.getAttribute(h)||a.getAttribute(d);if(c){var e=a.getAttribute(g),c=e?[c].concat(e.split(/\s*,\s*/)):[c];p.push({node:a,types:c})}});return this._instantiate(p,b,c)},_instantiate:function(b,c,d,e){function h(a){c._started||d.noStart||f.forEach(a,function(a){"function"!==typeof a.startup||a._started||a.startup()});return a}b=f.map(b,function(a){var b=a.ctor||z(a.types,d.contextRequire);
if(!b)throw Error("Unable to resolve constructor for: '"+a.types.join()+"'");return this.construct(b,a.node,c,d,a.scripts,a.inherited)},this);return e?a(b).then(h):h(b)},construct:function(a,d,e,f,l,m){function g(a){C&&k.setObject(C,a);for(q=0;q<K.length;q++)c[K[q].advice||"after"](a,K[q].method,k.hitch(a,K[q].func),!0);for(q=0;q<P.length;q++)P[q].call(a);for(q=0;q<F.length;q++)a.watch(F[q].prop,F[q].func);for(q=0;q<G.length;q++)y(a,G[q].event,G[q].func);return a}var p=a&&a.prototype;f=f||{};var E=
{};f.defaults&&k.mixin(E,f.defaults);m&&k.mixin(E,m);var r;r=d.attributes;var w=f.scope||n._scopeName;m="data-"+w+"-";var t={};"dojo"!==w&&(t[m+"props"]="data-dojo-props",t[m+"type"]="data-dojo-type",t[m+"mixins"]="data-dojo-mixins",t[w+"type"]="dojotype",t[m+"id"]="data-dojo-id");for(var q=0,v,w=[],C,A;v=r[q++];){var x=v.name,z=x.toLowerCase();v=v.value;switch(t[z]||z){case "data-dojo-type":case "dojotype":case "data-dojo-mixins":break;case "data-dojo-props":A=v;break;case "data-dojo-id":case "jsid":C=
v;break;case "data-dojo-attach-point":case "dojoattachpoint":E.dojoAttachPoint=v;break;case "data-dojo-attach-event":case "dojoattachevent":E.dojoAttachEvent=v;break;case "class":E["class"]=d.className;break;case "style":E.style=d.style&&d.style.cssText;break;default:if(x in p||(x=D(a)[z]||x),x in p)switch(typeof p[x]){case "string":E[x]=v;break;case "number":E[x]=v.length?Number(v):NaN;break;case "boolean":E[x]="false"!=v.toLowerCase();break;case "function":""===v||-1!=v.search(/[^\w\.]+/i)?E[x]=
new Function(v):E[x]=k.getObject(v,!1)||new Function(v);w.push(x);break;default:z=p[x],E[x]=z&&"length"in z?v?v.split(/\s*,\s*/):[]:z instanceof Date?""==v?new Date(""):"now"==v?new Date:b.fromISOString(v):z instanceof h?n.baseUrl+v:B(v)}else E[x]=v}}for(r=0;r<w.length;r++)t=w[r].toLowerCase(),d.removeAttribute(t),d[t]=null;if(A)try{A=B.call(f.propsThis,"{"+A+"}"),k.mixin(E,A)}catch(Q){throw Error(Q.toString()+" in data-dojo-props\x3d'"+A+"'");}k.mixin(E,e);l||(l=a&&(a._noScript||p._noScript)?[]:
u("\x3e script[type^\x3d'dojo/']",d));var K=[],P=[],F=[],G=[];if(l)for(q=0;q<l.length;q++)t=l[q],d.removeChild(t),e=t.getAttribute(m+"event")||t.getAttribute("event"),f=t.getAttribute(m+"prop"),A=t.getAttribute(m+"method"),w=t.getAttribute(m+"advice"),r=t.getAttribute("type"),t=this._functionFromScript(t,m),e?"dojo/connect"==r?K.push({method:e,func:t}):"dojo/on"==r?G.push({event:e,func:t}):E[e]=t:"dojo/aspect"==r?K.push({method:A,advice:w,func:t}):"dojo/watch"==r?F.push({prop:f,func:t}):P.push(t);
a=(l=a.markupFactory||p.markupFactory)?l(E,d,a):new a(E,d);return a.then?a.then(g):g(a)},scan:function(a,b){function c(a){if(!a.inherited){a.inherited={};var b=a.node,g=c(a.parent),b={dir:b.getAttribute("dir")||g.dir,lang:b.getAttribute("lang")||g.lang,textDir:b.getAttribute(k)||g.textDir},d;for(d in b)b[d]&&(a.inherited[d]=b[d])}return a.inherited}var d=[],e=[],h={},g=(b.scope||n._scopeName)+"Type",p="data-"+(b.scope||n._scopeName)+"-",l=p+"type",k=p+"textdir",p=p+"mixins",r=a.firstChild,u=b.inherited;
if(!u){var t=function(a,b){return a.getAttribute&&a.getAttribute(b)||a.parentNode&&t(a.parentNode,b)},u={dir:t(a,"dir"),lang:t(a,"lang"),textDir:t(a,k)},q;for(q in u)u[q]||delete u[q]}q={inherited:u};for(var v,A;;)if(r)if(1!=r.nodeType)r=r.nextSibling;else if(v&&"script"==r.nodeName.toLowerCase())(u=r.getAttribute("type"))&&/^dojo\/\w/i.test(u)&&v.push(r),r=r.nextSibling;else if(A)r=r.nextSibling;else if(u=r.getAttribute(l)||r.getAttribute(g),a=r.firstChild,u||a&&(3!=a.nodeType||a.nextSibling)){A=
null;if(u){var y=r.getAttribute(p);v=y?[u].concat(y.split(/\s*,\s*/)):[u];try{A=z(v,b.contextRequire)}catch(K){}A||f.forEach(v,function(a){~a.indexOf("/")&&!h[a]&&(h[a]=!0,e[e.length]=a)});y=A&&!A.prototype._noScript?[]:null;q={types:v,ctor:A,parent:q,node:r,scripts:y};q.inherited=c(q);d.push(q)}else q={node:r,scripts:v,parent:q};v=y;A=r.stopParser||A&&A.prototype.stopParser&&!b.template;r=a}else r=r.nextSibling;else{if(!q||!q.node)break;r=q.node.nextSibling;A=!1;q=q.parent;v=q.scripts}var x=new w;
e.length?(b.contextRequire||m)(e,function(){x.resolve(f.filter(d,function(a){if(!a.ctor)try{a.ctor=z(a.types,b.contextRequire)}catch(R){}for(var g=a.parent;g&&!g.types;)g=g.parent;var c=a.ctor&&a.ctor.prototype;a.instantiateChildren=!(c&&c.stopParser&&!b.template);a.instantiate=!g||g.instantiate&&g.instantiateChildren;return a.instantiate}))}):x.resolve(d);return x.promise},_require:function(a,b){a=B("{"+a.innerHTML+"}");var c=[],d=[],e=new w;b=b&&b.contextRequire||m;for(var f in a)c.push(f),d.push(a[f]);
b(d,function(){for(var a=0;a<c.length;a++)k.setObject(c[a],arguments[a]);e.resolve(arguments)});return e.promise},_scanAmd:function(a,b){var c=new w,d=c.promise;c.resolve(!0);var e=this;u("script[type\x3d'dojo/require']",a).forEach(function(a){d=d.then(function(){return e._require(a,b)});a.parentNode.removeChild(a)});return d},parse:function(a,b){!a||"string"==typeof a||"nodeType"in a||(b=a,a=b.rootNode);var c=a?l.byId(a):d.body();b=b||{};var e=b.template?{template:!0}:{},f=[],h=this;a=this._scanAmd(c,
b).then(function(){return h.scan(c,b)}).then(function(a){return h._instantiate(a,e,b,!0)}).then(function(a){return f=f.concat(a)}).otherwise(function(a){console.error("dojo/parser::parse() error",a);throw a;});k.mixin(f,a);return f}};n.parser=q;e.parseOnLoad&&t(100,q,"parse");return q})},"dojo/date/stamp":function(){define(["../_base/lang","../_base/array"],function(m,n){var k={};m.setObject("dojo.date.stamp",k);k.fromISOString=function(f,e){k._isoRegExp||(k._isoRegExp=/^(?:(\d{4})(?:-(\d{2})(?:-(\d{2}))?)?)?(?:T(\d{2}):(\d{2})(?::(\d{2})(.\d+)?)?((?:[+-](\d{2}):(\d{2}))|Z)?)?$/);
var l=k._isoRegExp.exec(f);f=null;if(l){l.shift();l[1]&&l[1]--;l[6]&&(l[6]*=1E3);e&&(e=new Date(e),n.forEach(n.map("FullYear Month Date Hours Minutes Seconds Milliseconds".split(" "),function(c){return e["get"+c]()}),function(c,a){l[a]=l[a]||c}));f=new Date(l[0]||1970,l[1]||0,l[2]||1,l[3]||0,l[4]||0,l[5]||0,l[6]||0);100>l[0]&&f.setFullYear(l[0]||1970);var d=0,h=l[7]&&l[7].charAt(0);"Z"!=h&&(d=60*(l[8]||0)+(Number(l[9])||0),"-"!=h&&(d*=-1));h&&(d-=f.getTimezoneOffset());d&&f.setTime(f.getTime()+6E4*
d)}return f};k.toISOString=function(f,e){var l=function(a){return 10>a?"0"+a:a};e=e||{};var d=[],h=e.zulu?"getUTC":"get",c="";"time"!=e.selector&&(c=f[h+"FullYear"](),c=["0000".substr((c+"").length)+c,l(f[h+"Month"]()+1),l(f[h+"Date"]())].join("-"));d.push(c);"date"!=e.selector&&(c=[l(f[h+"Hours"]()),l(f[h+"Minutes"]()),l(f[h+"Seconds"]())].join(":"),h=f[h+"Milliseconds"](),e.milliseconds&&(c+="."+(100>h?"0":"")+l(h)),e.zulu?c+="Z":"time"!=e.selector&&(f=f.getTimezoneOffset(),e=Math.abs(f),c+=(0<
f?"-":"+")+l(Math.floor(e/60))+":"+l(e%60)),d.push(c));return d.join("T")};return k})},"esri/core/domUtils":function(){define(["dojo/on","dojo/dom-style","dojo/has"],function(m,n,k){var f={show:function(e){if(e=f.getNode(e))e.style.display="block"},getNode:function(e){return e&&e.domNode||e},hide:function(e){if(e=f.getNode(e))e.style.display="none"},toggle:function(e){if(e=f.getNode(e))e.style.display="none"===e.style.display?"block":"none"},documentBox:8>=k("ie")?{w:document.documentElement.clientWidth,
h:document.documentElement.clientHeight}:{w:window.innerWidth,h:window.innerHeight},setScrollable:function(e){if(e=this.getNode(e)){var f=0,d=0,h=0,c=0,a=0,b=0;return[m(e,"touchstart",function(l){f=l.touches[0].screenX;d=l.touches[0].screenY;h=e.scrollWidth;c=e.scrollHeight;a=e.clientWidth;b=e.clientHeight}),m(e,"touchmove",function(l){l.preventDefault();var k=e.firstChild;k instanceof Text&&(k=e.childNodes[1]);var m=k._currentX||0,w=k._currentY||0,m=m+(l.touches[0].screenX-f);0<m?m=0:0>m&&Math.abs(m)+
a>h&&(m=-1*(h-a));k._currentX=m;w+=l.touches[0].screenY-d;0<w?w=0:0>w&&Math.abs(w)+b>c&&(w=-1*(c-b));k._currentY=w;n.set(k,{"-webkit-transition-property":"-webkit-transform","-webkit-transform":"translate("+m+"px, "+w+"px)"});f=l.touches[0].screenX;d=l.touches[0].screenY})]}}};return f})},"esri/identity/Credential":function(){define(["./IdentityManagerBase"],function(m){return m.Credential})},"esri/identity/IdentityManagerBase":function(){define("../core/declare dojo/_base/config dojo/_base/lang dojo/_base/array dojo/Deferred dojo/_base/url dojo/sniff dojo/cookie dojo/io-query dojo/regexp ../kernel ../config ../core/lang ./ServerInfo ../core/urlUtils ../core/deferredUtils ../core/Accessor ../request ../core/Error ../core/Evented ./OAuthCredential ./OAuthInfo".split(" "),
function(m,n,k,f,e,l,d,h,c,a,b,w,q,u,y,t,B,D,z,v,x,r){var C={},F=function(a){var b=(new l(a.owningSystemUrl)).host;a=(new l(a.server)).host;var g=/.+\.arcgis\.com$/i;return g.test(b)&&g.test(a)},G=function(a,b){return!!(F(a)&&b&&f.some(b,function(b){return b.test(a.server)}))},H;m=m(v,{declaredClass:"esri.identity.IdentityManagerBase",constructor:function(){this._portalConfig=k.getObject("esriGeowConfig");this.serverInfos=[];this.oAuthInfos=[];this.credentials=[];this._soReqs=[];this._xoReqs=[];this._portals=
[];this._getOAuthHash()},defaultOAuthInfo:null,defaultTokenValidity:60,tokenValidity:null,signInPage:null,useSignInPage:!0,normalizeWebTierAuth:!1,_busy:null,_oAuthHash:null,_gwTokenUrl:"/sharing/generateToken",_agsRest:"/rest/services",_agsPortal:/\/sharing(\/|$)/i,_agsAdmin:/https?:\/\/[^\/]+\/[^\/]+\/admin\/?(\/.*)?$/i,_adminSvcs:/\/admin\/services(\/|$)/i,_agolSuffix:".arcgis.com",_gwDomains:[{regex:/https?:\/\/www\.arcgis\.com/i,tokenServiceUrl:"https://www.arcgis.com/sharing/generateToken"},
{regex:/https?:\/\/dev\.arcgis\.com/i,tokenServiceUrl:"https://dev.arcgis.com/sharing/generateToken"},{regex:/https?:\/\/.*dev[^.]*\.arcgis\.com/i,tokenServiceUrl:"https://devext.arcgis.com/sharing/generateToken"},{regex:/https?:\/\/.*qa[^.]*\.arcgis\.com/i,tokenServiceUrl:"https://qaext.arcgis.com/sharing/generateToken"},{regex:/https?:\/\/.*.arcgis\.com/i,tokenServiceUrl:"https://www.arcgis.com/sharing/generateToken"}],_legacyFed:[],_regexSDirUrl:/http.+\/rest\/services\/?/ig,_regexServerType:/(\/(MapServer|GeocodeServer|GPServer|GeometryServer|ImageServer|NAServer|FeatureServer|GeoDataServer|GlobeServer|MobileServer|GeoenrichmentServer|VectorTileServer|SceneServer)).*/ig,
_gwUser:/http.+\/users\/([^\/]+)\/?.*/i,_gwItem:/http.+\/items\/([^\/]+)\/?.*/i,_gwGroup:/http.+\/groups\/([^\/]+)\/?.*/i,_errorCodes:[499,498,403,401],_rePortalTokenSvc:/\/sharing(\/rest)?\/generatetoken/i,_publicUrls:[/\/arcgis\/tokens/i,/\/sharing(\/rest)?\/generatetoken/i,/\/rest\/info/i],_createDefaultOAuthInfo:!0,_hasTestedIfAppIsOnPortal:!1,registerServers:function(a){var b=this.serverInfos;b?(a=f.filter(a,function(a){return!this.findServerInfo(a.server)},this),this.serverInfos=b.concat(a)):
this.serverInfos=a;f.forEach(a,function(a){a.owningSystemUrl&&this._portals.push(a.owningSystemUrl);if(a.hasPortal){this._portals.push(a.server);var b=w.request.corsEnabledServers,g=this._getOrigin(a.tokenServiceUrl);y.canUseXhr(a.server)||b.push(a.server.replace(/^https?:\/\//i,""));y.canUseXhr(g)||b.push(g.replace(/^https?:\/\//i,""))}},this)},registerOAuthInfos:function(a){var b=this.oAuthInfos;b?(a=f.filter(a,function(a){return!this.findOAuthInfo(a.portalUrl)},this),this.oAuthInfos=b.concat(a)):
this.oAuthInfos=a},registerToken:function(a){a=k.mixin({},a);var b=this._sanitizeUrl(a.server),g=this.findServerInfo(b),c=this._isServerRsrc(b),d=!0,e;g||(g=new u,g.server=this._getServerInstanceRoot(b),c?g.hasServer=!0:(g.tokenServiceUrl=this._getTokenSvcUrl(b),g.hasPortal=!0),this.registerServers([g]));(e=this._findCredential(b))?(delete a.server,k.mixin(e,a),d=!1):(e=new H({userId:a.userId,server:g.server,token:a.token,expires:a.expires,ssl:a.ssl,scope:c?"server":"portal"}),e.resources=[b],this.credentials.push(e));
e.emitTokenChange(!1);d||e.refreshServerTokens()},toJSON:function(){return q.fixJson({serverInfos:f.map(this.serverInfos,function(a){return a.toJSON()}),oAuthInfos:f.map(this.oAuthInfos,function(a){return a.toJSON()}),credentials:f.map(this.credentials,function(a){return a.toJSON()})})},initialize:function(a){if(a){k.isString(a)&&(a=JSON.parse(a));var b=a.serverInfos,g=a.oAuthInfos;a=a.credentials;if(b){var c=[];f.forEach(b,function(a){a.server&&a.tokenServiceUrl&&c.push(a.declaredClass?a:new u(a))});
c.length&&this.registerServers(c)}if(g){var d=[];f.forEach(g,function(a){a.appId&&d.push(a.declaredClass?a:new r(a))});d.length&&this.registerOAuthInfos(d)}a&&f.forEach(a,function(a){a.server&&a.token&&a.expires&&a.expires>(new Date).getTime()&&(a=a.declaredClass?a:new H(a),a.emitTokenChange(),this.credentials.push(a))},this)}},findServerInfo:function(a){var b;a=this._sanitizeUrl(a);f.some(this.serverInfos,function(g){this._hasSameServerInstance(g.server,a)&&(b=g);return!!b},this);return b},findOAuthInfo:function(a){var b;
a=this._sanitizeUrl(a);f.some(this.oAuthInfos,function(g){this._hasSameServerInstance(g.portalUrl,a)&&(b=g);return!!b},this);return b},findCredential:function(a,b){var g,c;a=this._sanitizeUrl(a);c=this._isServerRsrc(a)?"server":"portal";b?f.some(this.credentials,function(d){this._hasSameServerInstance(d.server,a)&&b===d.userId&&d.scope===c&&(g=d);return!!g},this):f.some(this.credentials,function(b){this._hasSameServerInstance(b.server,a)&&-1!==this._getIdenticalSvcIdx(a,b)&&b.scope===c&&(g=b);return!!g},
this);return g},getCredential:function(a,b){var g,c,d=!0;q.isDefined(b)&&(k.isObject(b)?(g=!!b.token,c=b.error,d=!1!==b.prompt):g=b);a=this._sanitizeUrl(a);var e=t.makeDeferredCancellingPending(),f=this._isAdminResource(a),p=g&&this._doPortalSignIn(a)?this._getEsriAuthCookie():null;if((g=g?this.findCredential(a):null)&&c&&498===c.code)g.destroy(),p&&p.token===b.token&&h("esri_auth",null,{expires:-1,path:"/",domain:document.domain});else if(p||g)return a=new z("identity-manager:not-authorized","You are currently signed in as: '"+
(p&&p.email||g&&g.userId)+"'. You do not have access to this resource: "+a,{error:c}),e.reject(a),e.promise;if(c=this._findCredential(a,b))return e.resolve(c),e.promise;c=this.findServerInfo(a);if(c)!c.hasServer&&this._isServerRsrc(a)&&(c._restInfoPms=this._getTokenSvcUrl(a),c.hasServer=!0);else{p=this._getTokenSvcUrl(a);if(!p)return a=new z("identity-manager:unknown-resource","Unknown resource - could not find token service endpoint."),e.reject(a),e.promise;c=new u;c.server=this._getServerInstanceRoot(a);
k.isString(p)?(c.tokenServiceUrl=p,c.hasPortal=!0):(c._restInfoPms=p,c.hasServer=!0);this.registerServers([c])}d&&c.hasPortal&&void 0===c._selfReq&&!this._findOAuthInfo(a)&&(c._selfReq={owningTenant:b&&b.owningTenant,selfDfd:this._getPortalSelf(c.tokenServiceUrl.replace(this._rePortalTokenSvc,"/sharing/rest/portals/self"),a)});return this._enqueue(a,c,b,e,f)},getResourceName:function(a){return this._isRESTService(a)?a.replace(this._regexSDirUrl,"").replace(this._regexServerType,"")||"":this._gwUser.test(a)&&
a.replace(this._gwUser,"$1")||this._gwItem.test(a)&&a.replace(this._gwItem,"$1")||this._gwGroup.test(a)&&a.replace(this._gwGroup,"$1")||""},generateToken:function(a,c,d){var g,e,f,p,h,m,n=this._rePortalTokenSvc.test(a.tokenServiceUrl),r=new l(window.location.href.toLowerCase()),u=this._getEsriAuthCookie(),w,t=!c;p=a.shortLivedTokenValidity;var E;c&&(E=b.id.tokenValidity||p||b.id.defaultTokenValidity,E>p&&0<p&&(E=p));d&&(g=d.isAdmin,e=d.serverUrl,f=d.token,m=d.ssl,a.customParameters=d.customParameters);
g?p=a.adminTokenServiceUrl:(p=a.tokenServiceUrl,h=new l(p.toLowerCase()),u&&(w=(w=u.auth_tier)&&w.toLowerCase()),("web"===w||a.webTierAuth)&&d&&d.serverUrl&&!m&&"http"===r.scheme&&(y.hasSameOrigin(r.uri,p,!0)||"https"===h.scheme&&r.host===h.host&&"7080"===r.port&&"7443"===h.port)&&(p=p.replace(/^https:/i,"http:").replace(/:7443/i,":7080")),t&&n&&(p=p.replace(/\/rest/i,"")));d=k.mixin({query:k.mixin({request:"getToken",username:c&&c.username,password:c&&c.password,serverUrl:e,token:f,expiration:E,
referer:g||n?window.location.host:null,client:g?"referer":null,f:"json"},a.customParameters),method:t?"auto":"post",authMode:"anonymous",useProxy:this._useProxy(a,d),responseType:"json",callbackParamName:t?"callback":void 0},d&&d.ioArgs);n||(d.withCredentials=!1);return D(p,d).then(function(b){b=b.data;if(!b||!b.token)return new z("identity-manager:authentication-failed","Unable to generate token");var g=a.server;C[g]||(C[g]={});c&&(C[g][c.username]=c.password);b.validity=E;return b})},isBusy:function(){return!!this._busy},
checkSignInStatus:function(a){return this.getCredential(a,{prompt:!1}).then(function(a){return a.token?D(a.server+("portal"===a.scope?"/sharing/rest":"/rest/services"),{query:{f:"json",token:a.token},callbackParamName:"callback",authMode:"anonymous"}).then(function(){return a}).otherwise(function(b){if(498===b.code)throw a.destroy(),b=Error("User is not signed in."),b.code="IdentityManagerBase.6",b.log=!!n.isDebug,b;return a}):a})},setRedirectionHandler:function(a){this._redirectFunc=a},setProtocolErrorHandler:function(a){this._protocolFunc=
a},signIn:function(){},oAuthSignIn:function(){},destroyCredentials:function(){if(this.credentials){var a=this.credentials.slice();f.forEach(a,function(a){a.destroy()})}this.emit("credentials-destroy")},_getOAuthHash:function(){var a=window.location.hash;if(a){"#"===a.charAt(0)&&(a=a.substring(1));var a=c.queryToObject(a),b=!1;a.access_token&&a.expires_in&&a.state&&a.hasOwnProperty("username")?(a.state=JSON.parse(a.state),this._oAuthHash=a,b=!0):a.error&&a.error_description&&(console.log("IdentityManager OAuth Error: ",
a.error," - ",a.error_description),"access_denied"===a.error&&(b=!0));b&&(!d("ie")||8<d("ie"))&&(window.location.hash="")}},_findCredential:function(a,b){var c=-1,g,d,e,p=b&&b.token;b=b&&b.resource;var h=this._isServerRsrc(a)?"server":"portal",l=f.filter(this.credentials,function(b){return this._hasSameServerInstance(b.server,a)&&b.scope===h},this);a=b||a;if(l.length)if(1===l.length)if(b=l[0],d=(g=(e=this.findServerInfo(b.server))&&e.owningSystemUrl)&&this.findCredential(g,b.userId),c=this._getIdenticalSvcIdx(a,
b),p)-1!==c&&(b.resources.splice(c,1),this._removeResource(a,d));else return-1===c&&b.resources.push(a),this._addResource(a,d),b;else{var k,m;f.some(l,function(b){m=this._getIdenticalSvcIdx(a,b);return-1!==m?(k=b,d=(g=(e=this.findServerInfo(k.server))&&e.owningSystemUrl)&&this.findCredential(g,k.userId),c=m,!0):!1},this);if(p)k&&(k.resources.splice(c,1),this._removeResource(a,d));else if(k)return this._addResource(a,d),k}},_findOAuthInfo:function(a){var b=this.findOAuthInfo(a);b||f.some(this.oAuthInfos,
function(c){this._isIdProvider(c.portalUrl,a)&&(b=c);return!!b},this);return b},_addResource:function(a,b){b&&-1===this._getIdenticalSvcIdx(a,b)&&b.resources.push(a)},_removeResource:function(a,b){var c=-1;b&&(c=this._getIdenticalSvcIdx(a,b),-1<c&&b.resources.splice(c,1))},_useProxy:function(a,b){return b&&b.isAdmin&&!y.hasSameOrigin(a.adminTokenServiceUrl,window.location.href)||!this._isPortalDomain(a.tokenServiceUrl)&&10.1==a.currentVersion&&!y.hasSameOrigin(a.tokenServiceUrl,window.location.href)},
_getOrigin:function(a){a=new l(a);return a.scheme+"://"+a.host+(q.isDefined(a.port)?":"+a.port:"")},_getServerInstanceRoot:function(a){var b=a.toLowerCase(),c=b.indexOf(this._agsRest);-1===c&&this._isAdminResource(a)&&(c=b.indexOf("/admin"));-1===c&&(c=b.indexOf("/sharing"));-1===c&&"/"===b.substr(-1)&&(c=b.length-1);return-1<c?a.substring(0,c):a},_hasSameServerInstance:function(a,b){"/"===a.substr(-1)&&(a=a.slice(0,-1));a=a.toLowerCase();b=this._getServerInstanceRoot(b).toLowerCase();a=a.substr(a.indexOf(":"));
b=b.substr(b.indexOf(":"));return a===b},_sanitizeUrl:function(a){a=y.normalize(k.trim(a));var b=(w.request.proxyUrl||"").toLowerCase(),c=b?a.toLowerCase().indexOf(b+"?"):-1;-1!==c&&(a=a.substring(c+b.length+1));return y.urlToObject(a).path},_isRESTService:function(a){return-1<a.indexOf(this._agsRest)},_isAdminResource:function(a){return this._agsAdmin.test(a)||this._adminSvcs.test(a)},_isServerRsrc:function(a){return this._isRESTService(a)||this._isAdminResource(a)},_isIdenticalService:function(a,
b){var c;this._isRESTService(a)&&this._isRESTService(b)?(a=this._getSuffix(a).toLowerCase(),b=this._getSuffix(b).toLowerCase(),c=a===b,c||(c=/(.*)\/(MapServer|FeatureServer).*/ig,c=a.replace(c,"$1")===b.replace(c,"$1"))):this._isAdminResource(a)&&this._isAdminResource(b)?c=!0:this._isServerRsrc(a)||this._isServerRsrc(b)||!this._isPortalDomain(a)||(c=!0);return c},_isPortalDomain:function(a){a=a.toLowerCase();var b=(new l(a)).authority,c=this._portalConfig,d=-1!==b.indexOf(this._agolSuffix);!d&&c&&
(d=this._hasSameServerInstance(this._getServerInstanceRoot(c.restBaseUrl),a));d||(!this._arcgisUrl&&(c=k.getObject("esri.arcgis.utils.arcgisUrl"))&&(this._arcgisUrl=(new l(c)).authority),this._arcgisUrl&&(d=this._arcgisUrl.toLowerCase()===b));d||(d=f.some(this._portals,function(b){return this._hasSameServerInstance(b,a)},this));return d=d||this._agsPortal.test(a)},_isIdProvider:function(a,b){var c=-1,d=-1;f.forEach(this._gwDomains,function(g,e){-1===c&&g.regex.test(a)&&(c=e);-1===d&&g.regex.test(b)&&
(d=e)});var g=!1;if(-1<c&&-1<d)if(0===c||4===c){if(0===d||4===d)g=!0}else if(1===c){if(1===d||2===d)g=!0}else 2===c?2===d&&(g=!0):3===c&&3===d&&(g=!0);if(!g){var e=this.findServerInfo(b),h=e&&e.owningSystemUrl;h&&F(e)&&this._isPortalDomain(h)&&this._isIdProvider(a,h)&&(g=!0)}return g},_isPublic:function(a){a=this._sanitizeUrl(a);return f.some(this._publicUrls,function(b){return b.test(a)})},_getIdenticalSvcIdx:function(a,b){var c=-1;f.some(b.resources,function(b,d){return this._isIdenticalService(a,
b)?(c=d,!0):!1},this);return c},_getSuffix:function(a){return a.replace(this._regexSDirUrl,"").replace(this._regexServerType,"$1")},_getTokenSvcUrl:function(a){var b,c;if((b=this._isRESTService(a))||this._isAdminResource(a))return c=a.toLowerCase().indexOf(b?this._agsRest:"/admin/"),b=a.substring(0,c)+"/admin/generateToken",a=a.substring(0,c)+"/rest/info",c=D(a,{query:{f:"json"},responseType:"json",callbackParamName:"callback"}).then(function(a){return a.data}),{adminUrl:b,promise:c};if(this._isPortalDomain(a)){var d=
"";f.some(this._gwDomains,function(b){b.regex.test(a)&&(d=b.tokenServiceUrl);return!!d});d||f.some(this._portals,function(b){this._hasSameServerInstance(b,a)&&(d=b+this._gwTokenUrl);return!!d},this);d||(c=a.toLowerCase().indexOf("/sharing"),-1!==c&&(d=a.substring(0,c)+this._gwTokenUrl));d||(d=this._getOrigin(a)+this._gwTokenUrl);d&&(b=(new l(a)).port,/^http:\/\//i.test(a)&&"7080"===b&&(d=d.replace(/:7080/i,":7443")),d=d.replace(/http:/i,"https:"));return d}if(-1!==a.toLowerCase().indexOf("premium.arcgisonline.com"))return"https://premium.arcgisonline.com/server/tokens"},
_getPortalSelf:function(a,b){"https:"===window.location.protocol?a=a.replace(/^http:/i,"https:").replace(/:7080/i,":7443"):/^http:/i.test(b)&&(a=a.replace(/^https:/i,"http:").replace(/:7443/i,":7080"));return D(a,{query:{f:"json"},responseType:"json",callbackParamName:"callback",crossOrigin:!1,authMode:"anonymous"}).then(function(a){return a.data})},_hasPortalSession:function(){return!!this._getEsriAuthCookie()},_getEsriAuthCookie:function(){var a=null;if(h.isSupported()){var b=this._getAllCookies("esri_auth"),
c;for(c=0;c<b.length;c++){var d=JSON.parse(b[c]);if(d.portalApp){a=d;break}}}a&&(b=null,a.expires&&("number"===typeof a.expires?b=a.expires:"string"===typeof a.expires&&(b=Date.parse(a.expires)),isNaN(b)&&(b=null),a.expires=b),b&&b<Date.now()&&(a=null));return a},_getAllCookies:function(b){var c=[],d=document.cookie.match(new RegExp("(?:^|; )"+a.escapeString(b)+"\x3d([^;]*)","g"));if(d)for(b=0;b<d.length;b++){var e=d[b],g=e.indexOf("\x3d");-1<g&&(e=e.substring(g+1),c.push(decodeURIComponent(e)))}return c},
_doPortalSignIn:function(a){if(h.isSupported()){var b=this._getEsriAuthCookie(),c=this._portalConfig,d=window.location.href,e=this.findServerInfo(a);if(this.useSignInPage&&(c||this._isPortalDomain(d)||b)&&(e?e.hasPortal||e.owningSystemUrl&&this._isPortalDomain(e.owningSystemUrl):this._isPortalDomain(a))&&(this._isIdProvider(d,a)||c&&(this._hasSameServerInstance(this._getServerInstanceRoot(c.restBaseUrl),a)||this._isIdProvider(c.restBaseUrl,a))||y.hasSameOrigin(d,a,!0)))return!0}return!1},_checkProtocol:function(a,
b,c,d){var e=!0;d=d?b.adminTokenServiceUrl:b.tokenServiceUrl;0!==k.trim(d).toLowerCase().indexOf("https:")||0===window.location.href.toLowerCase().indexOf("https:")||w.request.useCors&&(y.canUseXhr(d)||y.canUseXhr(y.getProxyUrl(!0).path))||(e=this._protocolFunc?!!this._protocolFunc({resourceUrl:a,serverInfo:b}):!1,e||(a=new z("identity-manager:aborted","Aborted the Sign-In process to avoid sending password over insecure connection."),c(a)));return e},_enqueue:function(a,b,c,d,e,f){d||(d=t.makeDeferredCancellingPending());
d.resUrl_=a;d.sinfo_=b;d.options_=c;d.admin_=e;d.refresh_=f;this._busy?this._hasSameServerInstance(this._getServerInstanceRoot(a),this._busy.resUrl_)?(this._oAuthDfd&&this._oAuthDfd.oAuthWin_&&this._oAuthDfd.oAuthWin_.focus(),this._soReqs.push(d)):this._xoReqs.push(d):this._doSignIn(d);return d.promise},_doSignIn:function(a){this._busy=a;var b=this,c=function(c){var d=a.options_&&a.options_.resource,e=a.resUrl_,g=a.refresh_,h=!1;-1===f.indexOf(b.credentials,c)&&(g&&-1!==f.indexOf(b.credentials,g)?
(g.userId=c.userId,g.token=c.token,g.expires=c.expires,g.validity=c.validity,g.ssl=c.ssl,g.creationTime=c.creationTime,h=!0,c=g):b.credentials.push(c));c.resources||(c.resources=[]);c.resources.push(d||e);c.scope=b._isServerRsrc(e)?"server":"portal";c.emitTokenChange();var d=b._soReqs,l={};b._soReqs=[];f.forEach(d,function(a){if(!this._isIdenticalService(e,a.resUrl_)){var b=this._getSuffix(a.resUrl_);l[b]||(l[b]=!0,c.resources.push(a.resUrl_))}},b);a.resolve(c);f.forEach(d,function(a){this._hasSameServerInstance(this._getServerInstanceRoot(e),
a.resUrl_)?a.resolve(c):this._soReqs.push(a)},b);b._busy=a.resUrl_=a.sinfo_=a.refresh_=null;h||b.emit("credential-create",{credential:c});b._soReqs.length?b._doSignIn(b._soReqs.shift()):b._xoReqs.length&&b._doSignIn(b._xoReqs.shift())},d=function(c){a.reject(c);b._busy=a.resUrl_=a.sinfo_=a.refresh_=null;b._soReqs.length?b._doSignIn(b._soReqs.shift()):b._xoReqs.length&&b._doSignIn(b._xoReqs.shift())},e=function(e,g,f,h){var l=a.sinfo_,k=!a.options_||!1!==a.options_.prompt,m=l.hasPortal&&b._findOAuthInfo(a.resUrl_);
b._doPortalSignIn(a.resUrl_)?(e=b._getEsriAuthCookie(),m=b._portalConfig,e?(l.webTierAuth||"web"!==(e.auth_tier&&e.auth_tier.toLowerCase())||(l.webTierAuth=!0),c(new H({userId:e.email,server:l.server,token:e.token,expires:e.expires}))):k?(k="",e=window.location.href,k=b.signInPage?b.signInPage:m?m.baseUrl+m.signin:b._isIdProvider(e,a.resUrl_)?b._getOrigin(e)+"/home/signin.html":l.tokenServiceUrl.replace(b._rePortalTokenSvc,"")+"/home/signin.html",k=k.replace(/http:/i,"https:"),m&&!1===m.useSSL&&(k=
k.replace(/https:/i,"http:")),0===e.toLowerCase().replace("https","http").indexOf(k.toLowerCase().replace("https","http"))?(l=new z("identity-manager:unexpected-error","Cannot redirect to Sign-In page from within Sign-In page. URL of the resource that triggered this workflow: "+a.resUrl_),d(l)):b._redirectFunc?b._redirectFunc({signInPage:k,returnUrlParamName:"returnUrl",returnUrl:e,resourceUrl:a.resUrl_,serverInfo:l}):window.location=k+"?returnUrl\x3d"+window.escape(e)):(l=new z("identity-manager:not-authenticated",
"User is not signed in."),d(l))):e?c(new H({userId:e,server:l.server,token:f,expires:q.isDefined(h)?Number(h):null,ssl:!!g})):m?(e=m._oAuthCred,e||(g=new x(m,window.localStorage),f=new x(m,window.sessionStorage),g.isValid()&&f.isValid()?g.expires>f.expires?(e=g,f.destroy()):(e=f,g.destroy()):e=g.isValid()?g:f,m._oAuthCred=e),e.isValid()?c(new H({userId:e.userId,server:l.server,token:e.token,expires:e.expires,ssl:e.ssl,_oAuthCred:e})):b._oAuthHash&&b._oAuthHash.state.portalUrl===m.portalUrl?(k=b._oAuthHash,
l=new H({userId:k.username,server:l.server,token:k.access_token,expires:(new Date).getTime()+1E3*Number(k.expires_in),ssl:"true"===k.ssl,oAuthState:k.state,_oAuthCred:e}),e.storage=k.persist?window.localStorage:window.sessionStorage,e.token=l.token,e.expires=l.expires,e.userId=l.userId,e.ssl=l.ssl,e.save(),b._oAuthHash=null,c(l)):k?a._pendingDfd=b.oAuthSignIn(a.resUrl_,l,m,a.options_).then(c,d):(l=new z("identity-manager:not-authenticated","User is not signed in."),d(l))):k?b._checkProtocol(a.resUrl_,
l,d,a.admin_)&&(k=a.options_,a.admin_&&(k=k||{},k.isAdmin=!0),a._pendingDfd=b.signIn(a.resUrl_,l,k).then(c,d)):(l=new z("identity-manager:not-authenticated","User is not signed in."),d(l))},g=function(){var e=a.sinfo_,g=e.owningSystemUrl,h=a.options_,l,k,m,n;h&&(l=h.token,k=h.error,m=h.prompt);n=b._findCredential(g,{token:l,resource:a.resUrl_});!n&&F(e)&&f.some(b.credentials,function(a){this._isIdProvider(g,a.server)&&(n=a);return!!n},b);n?(h=b.findCredential(a.resUrl_,n.userId))?c(h):G(e,b._legacyFed)?
(h=n.toJSON(),h.server=e.server,h.resources=null,c(new H(h))):(a._pendingDfd=b.generateToken(b.findServerInfo(n.server),null,{serverUrl:a.resUrl_,token:n.token,ssl:n.ssl})).then(function(b){c(new H({userId:n.userId,server:e.server,token:b.token,expires:q.isDefined(b.expires)?Number(b.expires):null,ssl:!!b.ssl,isAdmin:a.admin_,validity:b.validity}))},d):(b._busy=null,l&&(a.options_.token=null),(a._pendingDfd=b.getCredential(g.replace(/\/?$/,"/sharing"),{resource:a.resUrl_,owningTenant:e.owningTenant,
token:l,error:k,prompt:m})).then(function(c){b._enqueue(a.resUrl_,a.sinfo_,a.options_,a,a.admin_)},function(a){d(a)}))},h=a.sinfo_.owningSystemUrl,l=this._isServerRsrc(a.resUrl_),m=a.sinfo_._restInfoPms;m?m.promise.then(function(c){var d=a.sinfo_;d.adminTokenServiceUrl=d._restInfoPms.adminUrl;d._restInfoPms=null;d.tokenServiceUrl=k.getObject("authInfo.tokenServicesUrl",!1,c)||k.getObject("authInfo.tokenServiceUrl",!1,c)||k.getObject("tokenServiceUrl",!1,c);d.shortLivedTokenValidity=k.getObject("authInfo.shortLivedTokenValidity",
!1,c);d.currentVersion=c.currentVersion;d.owningTenant=c.owningTenant;(c=d.owningSystemUrl=c.owningSystemUrl)&&b._portals.push(c);l&&c?g():e()},function(){a.sinfo_._restInfoPms=null;var b=new z("identity-manager:server-identification-failed","Unknown resource - could not find token service endpoint.");d(b)}):l&&h?g():a.sinfo_._selfReq?a.sinfo_._selfReq.selfDfd.then(function(c){var d={},e,g,f,h;c&&(e=c.user&&c.user.username,d.username=e,d.allSSL=c.allSSL,g=c.supportsOAuth,f=c.currentVersion,"multitenant"===
c.portalMode&&(h=c.customBaseUrl));a.sinfo_.webTierAuth=!!e;return e&&b.normalizeWebTierAuth?b.generateToken(a.sinfo_,null,{ssl:d.allSSL}).always(function(a){d.portalToken=a&&a.token;d.tokenExpiration=a&&a.expires;return d}):!e&&g&&4.4<=parseFloat(f)&&!b._doPortalSignIn(a.resUrl_)?b._generateOAuthInfo({portalUrl:a.sinfo_.server,customBaseUrl:h,owningTenant:a.sinfo_._selfReq.owningTenant}).always(function(){return d}):d}).always(function(b){a.sinfo_._selfReq=null;b?e(b.username,b.allSSL,b.portalToken,
b.tokenExpiration):e()}):e()},_generateOAuthInfo:function(a){var b=this,c,d=a.portalUrl,g=a.customBaseUrl,f=a.owningTenant;if(a=!this.defaultOAuthInfo&&this._createDefaultOAuthInfo&&!this._hasTestedIfAppIsOnPortal){c=window.location.href;var h=c.indexOf("?");-1<h&&(c=c.slice(0,h));h=c.search(/\/(apps|home)\//);c=-1<h?c.slice(0,h):null}a&&c?(this._hasTestedIfAppIsOnPortal=!0,a=D(c+"/sharing/rest",{query:{f:"json"},responseType:"json"}).then(function(){b.defaultOAuthInfo=new r({appId:"arcgisonline",
popup:!0,popupCallbackUrl:c+"/home/oauth-callback.html"})})):(a=new e,a.resolve(),a=a.promise);return a.then(function(){if(b.defaultOAuthInfo)return d=d.replace(/^http:/i,"https:"),D(d+"/sharing/rest/oauth2/validateRedirectUri",{query:{accountId:f,client_id:b.defaultOAuthInfo.appId,redirect_uri:y.makeAbsolute(b.defaultOAuthInfo.popupCallbackUrl),f:"json"},responseType:"json",callbackParamName:"callback"}).then(function(a){if(a.data.valid){var c=b.defaultOAuthInfo.clone();c.portalUrl=a.data.urlKey&&
g?"https://"+a.data.urlKey+"."+g:d;b.oAuthInfos.push(c)}})})}});H=B.createSubclass([v],{declaredClass:"esri.identity.Credential",constructor:function(a){a&&a._oAuthCred&&(this._oAuthCred=a._oAuthCred)},initialize:function(){this.resources=this.resources||[];q.isDefined(this.creationTime)||(this.creationTime=(new Date).getTime())},_oAuthCred:null,properties:{creationTime:{},expires:{},isAdmin:{},oAuthState:{},resources:{},scope:{},server:{},ssl:{},token:{},tokenRefreshBuffer:2,userId:{},validity:{}},
refreshToken:function(){var a=this,c=this.resources&&this.resources[0],d=b.id.findServerInfo(this.server),e=d&&d.owningSystemUrl,h=!!e&&"server"===this.scope,l=h&&G(d,b.id._legacyFed),k=h&&b.id.findServerInfo(e),m,n=(m=d.webTierAuth)&&b.id.normalizeWebTierAuth,r=C[this.server],r=r&&r[this.userId],u={username:this.userId,password:r},w;if(!m||n)if(h&&!k&&f.some(b.id.serverInfos,function(a){b.id._isIdProvider(e,a.server)&&(k=a);return!!k}),m=k&&b.id.findCredential(k.server,this.userId),!h||m)if(l)m.refreshToken();
else{if(h)w={serverUrl:c,token:m&&m.token,ssl:m&&m.ssl};else if(n)u=null,w={ssl:this.ssl};else if(r)this.isAdmin&&(w={isAdmin:!0});else{var t;c&&(c=b.id._sanitizeUrl(c),this._enqueued=1,t=b.id._enqueue(c,d,null,null,this.isAdmin,this),t.then(function(){a._enqueued=0;a.refreshServerTokens()}).then(null,function(){a._enqueued=0}));return t}return b.id.generateToken(h?k:d,h?null:u,w).then(function(b){a.token=b.token;a.expires=q.isDefined(b.expires)?Number(b.expires):null;a.creationTime=(new Date).getTime();
a.validity=b.validity;a.emitTokenChange();a.refreshServerTokens()}).then(null,function(){})}},refreshServerTokens:function(){"portal"===this.scope&&f.forEach(b.id.credentials,function(a){var c=b.id.findServerInfo(a.server),d=c&&c.owningSystemUrl;a!==this&&a.userId===this.userId&&d&&"server"===a.scope&&(b.id._hasSameServerInstance(this.server,d)||b.id._isIdProvider(d,this.server))&&(G(c,b.id._legacyFed)?(a.token=this.token,a.expires=this.expires,a.creationTime=this.creationTime,a.validity=this.validity,
a.emitTokenChange()):a.refreshToken())},this)},emitTokenChange:function(a){clearTimeout(this._refreshTimer);var c=this.server&&b.id.findServerInfo(this.server),d=(c=c&&c.owningSystemUrl)&&b.id.findServerInfo(c);!1!==a&&(!c||"portal"===this.scope||d&&d.webTierAuth&&!b.id.normalizeWebTierAuth)&&(q.isDefined(this.expires)||q.isDefined(this.validity))&&this._startRefreshTimer();this.emit("token-change")},destroy:function(){this.userId=this.server=this.token=this.expires=this.validity=this.resources=this.creationTime=
null;this._oAuthCred&&(this._oAuthCred.destroy(),this._oAuthCred=null);var a=f.indexOf(b.id.credentials,this);-1<a&&b.id.credentials.splice(a,1);this.emitTokenChange();this.emit("destroy")},toJSON:function(){var a=q.fixJson({userId:this.userId,server:this.server,token:this.token,expires:this.expires,validity:this.validity,ssl:this.ssl,isAdmin:this.isAdmin,creationTime:this.creationTime,scope:this.scope}),b=this.resources;b&&0<b.length&&(a.resources=b.slice());return a},_startRefreshTimer:function(){clearTimeout(this._refreshTimer);
var a=6E4*this.tokenRefreshBuffer,b=(this.validity?this.creationTime+6E4*this.validity:this.expires)-(new Date).getTime();0>b&&(b=0);this._refreshTimer=setTimeout(k.hitch(this,this.refreshToken),b>a?b-a:b)}});m.Credential=H;return m})},"dojo/cookie":function(){define(["./_base/kernel","./regexp"],function(m,n){m.cookie=function(k,f,e){var l=document.cookie,d;if(1==arguments.length)d=(d=l.match(new RegExp("(?:^|; )"+n.escapeString(k)+"\x3d([^;]*)")))?decodeURIComponent(d[1]):void 0;else{e=e||{};l=
e.expires;if("number"==typeof l){var h=new Date;h.setTime(h.getTime()+864E5*l);l=e.expires=h}l&&l.toUTCString&&(e.expires=l.toUTCString());f=encodeURIComponent(f);var l=k+"\x3d"+f,c;for(c in e)l+="; "+c,h=e[c],!0!==h&&(l+="\x3d"+h);document.cookie=l}return d};m.cookie.isSupported=function(){"cookieEnabled"in navigator||(this("__djCookieTest__","CookiesAllowed"),navigator.cookieEnabled="CookiesAllowed"==this("__djCookieTest__"),navigator.cookieEnabled&&this("__djCookieTest__","",{expires:-1}));return navigator.cookieEnabled};
return m.cookie})},"esri/identity/ServerInfo":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/accessorSupport/decorators ../core/JSONSupport".split(" "),function(m,n,k,f,e,l){return function(d){function h(c){c=d.call(this)||this;c.adminTokenServiceUrl=null;c.currentVersion=null;c.hasPortal=null;c.hasServer=null;c.owningSystemUrl=null;c.owningTenant=null;c.server=null;c.shortLivedTokenValidity=null;c.tokenServiceUrl=null;c.webTierAuth=
null;return c}k(h,d);f([e.property({json:{write:!0}})],h.prototype,"adminTokenServiceUrl",void 0);f([e.property({json:{write:!0}})],h.prototype,"currentVersion",void 0);f([e.property({json:{write:!0}})],h.prototype,"hasPortal",void 0);f([e.property({json:{write:!0}})],h.prototype,"hasServer",void 0);f([e.property({json:{write:!0}})],h.prototype,"owningSystemUrl",void 0);f([e.property({json:{write:!0}})],h.prototype,"owningTenant",void 0);f([e.property({json:{write:!0}})],h.prototype,"server",void 0);
f([e.property({json:{write:!0}})],h.prototype,"shortLivedTokenValidity",void 0);f([e.property({json:{write:!0}})],h.prototype,"tokenServiceUrl",void 0);f([e.property({json:{write:!0}})],h.prototype,"webTierAuth",void 0);return h=f([e.subclass("esri.identity.ServerInfo")],h)}(e.declared(l))})},"esri/identity/OAuthCredential":function(){define(["../core/declare"],function(m){return m(null,{declaredClass:"esri.identity.OAuthCredential",oAuthInfo:null,storage:null,expires:null,ssl:null,token:null,userId:null,
constructor:function(m,k){this.oAuthInfo=m;this.storage=k;this._init()},isValid:function(){var m=!1;if(this.oAuthInfo&&this.token&&this.userId){var k=(new Date).getTime();this.expires>k&&(this.expires-k)/1E3>60*this.oAuthInfo.minTimeUntilExpiration&&(m=!0)}return m},save:function(){if(this.storage){var m=this._load(),k=this.oAuthInfo;if(k&&k.authNamespace&&k.portalUrl){var f=m[k.authNamespace];f||(f=m[k.authNamespace]={});f[k.portalUrl]={expires:this.expires,ssl:this.ssl,token:this.token,userId:this.userId};
try{this.storage.setItem("esriJSAPIOAuth",JSON.stringify(m))}catch(e){console.log(e)}}}},destroy:function(){var m=this._load(),k=this.oAuthInfo;if(k&&k.authNamespace&&k.portalUrl&&this.storage){var f=m[k.authNamespace];if(f){delete f[k.portalUrl];try{this.storage.setItem("esriJSAPIOAuth",JSON.stringify(m))}catch(e){console.log(e)}}}k&&(this.oAuthInfo=k._oAuthCred=null)},_init:function(){var m=this._load(),k=this.oAuthInfo;k&&k.authNamespace&&k.portalUrl&&(m=m[k.authNamespace])&&(m=m[k.portalUrl])&&
(this.expires=m.expires,this.ssl=m.ssl,this.token=m.token,this.userId=m.userId)},_load:function(){var m={};if(this.storage){var k=this.storage.getItem("esriJSAPIOAuth");if(k)try{m=JSON.parse(k)}catch(f){console.log(f)}}return m}})})},"esri/identity/OAuthInfo":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/accessorSupport/decorators ../core/JSONSupport".split(" "),function(m,n,k,f,e,l){return function(d){function h(a){a=d.call(this)||
this;a._oAuthCred=null;a.appId=null;a.authNamespace="/";a.expiration=20160;a.forceLogin=!1;a.locale=null;a.minTimeUntilExpiration=30;a.popup=!1;a.popupCallbackUrl="oauth-callback.html";a.popupWindowFeatures="height\x3d490,width\x3d800,resizable,scrollbars,status";a.portalUrl="https://www.arcgis.com";return a}k(h,d);c=h;h.prototype.clone=function(){return c.fromJSON(this.toJSON())};f([e.property({json:{write:!0}})],h.prototype,"appId",void 0);f([e.property({json:{write:!0}})],h.prototype,"authNamespace",
void 0);f([e.property({json:{write:!0}})],h.prototype,"expiration",void 0);f([e.property({json:{write:!0}})],h.prototype,"forceLogin",void 0);f([e.property({json:{write:!0}})],h.prototype,"locale",void 0);f([e.property({json:{write:!0}})],h.prototype,"minTimeUntilExpiration",void 0);f([e.property({json:{write:!0}})],h.prototype,"popup",void 0);f([e.property({json:{write:!0}})],h.prototype,"popupCallbackUrl",void 0);f([e.property({json:{write:!0}})],h.prototype,"popupWindowFeatures",void 0);f([e.property({json:{write:!0}})],
h.prototype,"portalUrl",void 0);return h=c=f([e.subclass("esri.identity.OAuthInfo")],h);var c}(e.declared(l))})},"dijit/form/Button":function(){define("require dojo/_base/declare dojo/dom-class dojo/has dojo/_base/kernel dojo/_base/lang dojo/ready ./_FormWidget ./_ButtonMixin dojo/text!./templates/Button.html ../a11yclick".split(" "),function(m,n,k,f,e,l,d,h,c,a){f("dijit-legacy-requires")&&d(0,function(){m(["dijit/form/DropDownButton","dijit/form/ComboButton","dijit/form/ToggleButton"])});d=n("dijit.form.Button"+
(f("dojo-bidi")?"_NoBidi":""),[h,c],{showLabel:!0,iconClass:"dijitNoIcon",_setIconClassAttr:{node:"iconNode",type:"class"},baseClass:"dijitButton",templateString:a,_setValueAttr:"valueNode",_setNameAttr:function(a){this.valueNode&&this.valueNode.setAttribute("name",a)},postCreate:function(){this.inherited(arguments);this._setLabelFromContainer()},_setLabelFromContainer:function(){this.containerNode&&!this.label&&(this.label=l.trim(this.containerNode.innerHTML),this.onLabelSet())},_setShowLabelAttr:function(a){this.containerNode&&
k.toggle(this.containerNode,"dijitDisplayNone",!a);this._set("showLabel",a)},setLabel:function(a){e.deprecated("dijit.form.Button.setLabel() is deprecated. Use set('label', ...) instead.","","2.0");this.set("label",a)},onLabelSet:function(){this.inherited(arguments);this.showLabel||"title"in this.params||(this.titleNode.title=l.trim(this.containerNode.innerText||this.containerNode.textContent||""))}});f("dojo-bidi")&&(d=n("dijit.form.Button",d,{onLabelSet:function(){this.inherited(arguments);this.titleNode.title&&
this.applyTextDir(this.titleNode,this.titleNode.title)},_setTextDirAttr:function(a){this._created&&this.textDir!=a&&(this._set("textDir",a),this._setLabelAttr(this.label))}}));return d})},"dijit/form/_FormWidget":function(){define("dojo/_base/declare dojo/sniff dojo/_base/kernel dojo/ready ../_Widget ../_CssStateMixin ../_TemplatedMixin ./_FormWidgetMixin".split(" "),function(m,n,k,f,e,l,d,h){n("dijit-legacy-requires")&&f(0,function(){require(["dijit/form/_FormValueWidget"])});return m("dijit.form._FormWidget",
[e,d,l,h],{setDisabled:function(c){k.deprecated("setDisabled("+c+") is deprecated. Use set('disabled',"+c+") instead.","","2.0");this.set("disabled",c)},setValue:function(c){k.deprecated("dijit.form._FormWidget:setValue("+c+") is deprecated. Use set('value',"+c+") instead.","","2.0");this.set("value",c)},getValue:function(){k.deprecated(this.declaredClass+"::getValue() is deprecated. Use get('value') instead.","","2.0");return this.get("value")},postMixInProperties:function(){this.nameAttrSetting=
this.name?'name\x3d"'+this.name.replace(/"/g,"\x26quot;")+'"':"";this.inherited(arguments)}})})},"dijit/form/_FormWidgetMixin":function(){define("dojo/_base/array dojo/_base/declare dojo/dom-attr dojo/dom-style dojo/_base/lang dojo/mouse dojo/on dojo/sniff dojo/window ../a11y".split(" "),function(m,n,k,f,e,l,d,h,c,a){return n("dijit.form._FormWidgetMixin",null,{name:"",alt:"",value:"",type:"text","aria-label":"focusNode",tabIndex:"0",_setTabIndexAttr:"focusNode",disabled:!1,intermediateChanges:!1,
scrollOnFocus:!0,_setIdAttr:"focusNode",_setDisabledAttr:function(b){this._set("disabled",b);/^(button|input|select|textarea|optgroup|option|fieldset)$/i.test(this.focusNode.tagName)?k.set(this.focusNode,"disabled",b):this.focusNode.setAttribute("aria-disabled",b?"true":"false");this.valueNode&&k.set(this.valueNode,"disabled",b);b?(this._set("hovering",!1),this._set("active",!1),b="tabIndex"in this.attributeMap?this.attributeMap.tabIndex:"_setTabIndexAttr"in this?this._setTabIndexAttr:"focusNode",
m.forEach(e.isArray(b)?b:[b],function(b){b=this[b];h("webkit")||a.hasDefaultTabStop(b)?b.setAttribute("tabIndex","-1"):b.removeAttribute("tabIndex")},this)):""!=this.tabIndex&&this.set("tabIndex",this.tabIndex)},_onFocus:function(a){if("mouse"==a&&this.isFocusable())var b=this.own(d(this.focusNode,"focus",function(){f.remove();b.remove()}))[0],f=this.own(d(this.ownerDocumentBody,"pointerup",e.hitch(this,function(a){f.remove();b.remove();this.focused&&("touchend"==a.type?this.defer("focus"):this.focus())})))[0];
this.scrollOnFocus&&this.defer(function(){c.scrollIntoView(this.domNode)});this.inherited(arguments)},isFocusable:function(){return!this.disabled&&this.focusNode&&"none"!=f.get(this.domNode,"display")},focus:function(){if(!this.disabled&&this.focusNode.focus)try{this.focusNode.focus()}catch(b){}},compare:function(a,c){return"number"==typeof a&&"number"==typeof c?isNaN(a)&&isNaN(c)?0:a-c:a>c?1:a<c?-1:0},onChange:function(){},_onChangeActive:!1,_handleOnChange:function(a,c){void 0!=this._lastValueReported||
null!==c&&this._onChangeActive||(this._resetValue=this._lastValueReported=a);this._pendingOnChange=this._pendingOnChange||typeof a!=typeof this._lastValueReported||0!=this.compare(a,this._lastValueReported);(this.intermediateChanges||c||void 0===c)&&this._pendingOnChange&&(this._lastValueReported=a,this._pendingOnChange=!1,this._onChangeActive&&(this._onChangeHandle&&this._onChangeHandle.remove(),this._onChangeHandle=this.defer(function(){this._onChangeHandle=null;this.onChange(a)})))},create:function(){this.inherited(arguments);
this._onChangeActive=!0},destroy:function(){this._onChangeHandle&&(this._onChangeHandle.remove(),this.onChange(this._lastValueReported));this.inherited(arguments)}})})},"dijit/form/_ButtonMixin":function(){define(["dojo/_base/declare","dojo/dom","dojo/has","../registry"],function(m,n,k,f){var e=m("dijit.form._ButtonMixin"+(k("dojo-bidi")?"_NoBidi":""),null,{label:"",type:"button",__onClick:function(e){e.stopPropagation();e.preventDefault();this.disabled||this.valueNode.click(e);return!1},_onClick:function(e){if(this.disabled)return e.stopPropagation(),
e.preventDefault(),!1;!1===this.onClick(e)&&e.preventDefault();var d=e.defaultPrevented;if(!d&&"submit"==this.type&&!(this.valueNode||this.focusNode).form)for(var h=this.domNode;h.parentNode;h=h.parentNode){var c=f.byNode(h);if(c&&"function"==typeof c._onSubmit){c._onSubmit(e);e.preventDefault();d=!0;break}}return!d},postCreate:function(){this.inherited(arguments);n.setSelectable(this.focusNode,!1)},onClick:function(){return!0},_setLabelAttr:function(e){this._set("label",e);(this.containerNode||this.focusNode).innerHTML=
e;this.onLabelSet()},onLabelSet:function(){}});k("dojo-bidi")&&(e=m("dijit.form._ButtonMixin",e,{onLabelSet:function(){this.inherited(arguments);this.applyTextDir(this.containerNode||this.focusNode)}}));return e})},"dijit/form/Form":function(){define("dojo/_base/declare dojo/dom-attr dojo/_base/kernel dojo/sniff ../_Widget ../_TemplatedMixin ./_FormMixin ../layout/_ContentPaneResizeMixin".split(" "),function(m,n,k,f,e,l,d,h){return m("dijit.form.Form",[e,l,d,h],{name:"",action:"",method:"",encType:"",
"accept-charset":"",accept:"",target:"",templateString:"\x3cform data-dojo-attach-point\x3d'containerNode' data-dojo-attach-event\x3d'onreset:_onReset,onsubmit:_onSubmit' ${!nameAttrSetting}\x3e\x3c/form\x3e",postMixInProperties:function(){this.nameAttrSetting=this.name?"name\x3d'"+this.name+"'":"";this.inherited(arguments)},execute:function(){},onExecute:function(){},_setEncTypeAttr:function(c){n.set(this.domNode,"encType",c);f("ie")&&(this.domNode.encoding=c);this._set("encType",c)},reset:function(c){var a=
{returnValue:!0,preventDefault:function(){this.returnValue=!1},stopPropagation:function(){},currentTarget:c?c.target:this.domNode,target:c?c.target:this.domNode};!1!==this.onReset(a)&&a.returnValue&&this.inherited(arguments,[])},onReset:function(){return!0},_onReset:function(c){this.reset(c);c.stopPropagation();c.preventDefault();return!1},_onSubmit:function(c){var a=this.constructor.prototype;if(this.execute!=a.execute||this.onExecute!=a.onExecute)k.deprecated("dijit.form.Form:execute()/onExecute() are deprecated. Use onSubmit() instead.",
"","2.0"),this.onExecute(),this.execute(this.getValues());!1===this.onSubmit(c)&&(c.stopPropagation(),c.preventDefault())},onSubmit:function(){return this.isValid()},submit:function(){!1!==this.onSubmit()&&this.containerNode.submit()}})})},"dijit/form/ValidationTextBox":function(){define("dojo/_base/declare dojo/_base/kernel dojo/_base/lang dojo/i18n ./TextBox ../Tooltip dojo/text!./templates/ValidationTextBox.html dojo/i18n!./nls/validate".split(" "),function(m,n,k,f,e,l,d){var h=m("dijit.form.ValidationTextBox",
e,{templateString:d,required:!1,promptMessage:"",invalidMessage:"$_unset_$",missingMessage:"$_unset_$",message:"",constraints:{},pattern:".*",regExp:"",regExpGen:function(){},state:"",tooltipPosition:[],_deprecateRegExp:function(c,a){a!=h.prototype[c]&&(n.deprecated("ValidationTextBox id\x3d"+this.id+", set('"+c+"', ...) is deprecated. Use set('pattern', ...) instead.","","2.0"),this.set("pattern",a))},_setRegExpGenAttr:function(c){this._deprecateRegExp("regExpGen",c);this._set("regExpGen",this._computeRegexp)},
_setRegExpAttr:function(c){this._deprecateRegExp("regExp",c)},_setValueAttr:function(){this.inherited(arguments);this._refreshState()},validator:function(c,a){return(new RegExp("^(?:"+this._computeRegexp(a)+")"+(this.required?"":"?")+"$")).test(c)&&(!this.required||!this._isEmpty(c))&&(this._isEmpty(c)||void 0!==this.parse(c,a))},_isValidSubset:function(){return 0==this.textbox.value.search(this._partialre)},isValid:function(){return this.validator(this.textbox.value,this.get("constraints"))},_isEmpty:function(c){return(this.trim?
/^\s*$/:/^$/).test(c)},getErrorMessage:function(){var c="$_unset_$"==this.invalidMessage?this.messages.invalidMessage:this.invalidMessage?this.invalidMessage:this.promptMessage,a="$_unset_$"==this.missingMessage?this.messages.missingMessage:this.missingMessage?this.missingMessage:c;return this.required&&this._isEmpty(this.textbox.value)?a:c},getPromptMessage:function(){return this.promptMessage},_maskValidSubsetError:!0,validate:function(c){var a="",b=this.disabled||this.isValid(c);b&&(this._maskValidSubsetError=
!0);var d=this._isEmpty(this.textbox.value),e=!b&&c&&this._isValidSubset();this._set("state",b?"":((!this._hasBeenBlurred||c)&&d||e)&&(this._maskValidSubsetError||e&&!this._hasBeenBlurred&&c)?"Incomplete":"Error");this.focusNode.setAttribute("aria-invalid","Error"==this.state?"true":"false");"Error"==this.state?(this._maskValidSubsetError=c&&e,a=this.getErrorMessage(c)):"Incomplete"==this.state?(a=this.getPromptMessage(c),this._maskValidSubsetError=!this._hasBeenBlurred||c):d&&(a=this.getPromptMessage(c));
this.set("message",a);return b},displayMessage:function(c){c&&this.focused?l.show(c,this.domNode,this.tooltipPosition,!this.isLeftToRight()):l.hide(this.domNode)},_refreshState:function(){this._created&&this.validate(this.focused);this.inherited(arguments)},constructor:function(c){this.constraints=k.clone(this.constraints);this.baseClass+=" dijitValidationTextBox"},startup:function(){this.inherited(arguments);this._refreshState()},_setConstraintsAttr:function(c){!c.locale&&this.lang&&(c.locale=this.lang);
this._set("constraints",c);this._refreshState()},_setPatternAttr:function(c){this._set("pattern",c);this._refreshState()},_computeRegexp:function(c){var a=this.pattern;"function"==typeof a&&(a=a.call(this,c));if(a!=this._lastRegExp){var b="";this._lastRegExp=a;".*"!=a&&a.replace(/\\.|\[\]|\[.*?[^\\]{1}\]|\{.*?\}|\(\?[=:!]|./g,function(a){switch(a.charAt(0)){case "{":case "+":case "?":case "*":case "^":case "$":case "|":case "(":b+=a;break;case ")":b+="|$)";break;default:b+="(?:"+a+"|$)"}});try{"".search(b)}catch(w){b=
this.pattern,console.warn("RegExp error in "+this.declaredClass+": "+this.pattern)}this._partialre="^(?:"+b+")$"}return a},postMixInProperties:function(){this.inherited(arguments);this.messages=f.getLocalization("dijit.form","validate",this.lang);this._setConstraintsAttr(this.constraints)},_setDisabledAttr:function(c){this.inherited(arguments);this._refreshState()},_setRequiredAttr:function(c){this._set("required",c);this.focusNode.setAttribute("aria-required",c);this._refreshState()},_setMessageAttr:function(c){this._set("message",
c);this.displayMessage(c)},reset:function(){this._maskValidSubsetError=!0;this.inherited(arguments)},_onBlur:function(){this.displayMessage("");this.inherited(arguments)},destroy:function(){l.hide(this.domNode);this.inherited(arguments)}});return h})},"dijit/form/TextBox":function(){define("dojo/_base/declare dojo/dom-construct dojo/dom-style dojo/_base/kernel dojo/_base/lang dojo/on dojo/sniff ./_FormValueWidget ./_TextBoxMixin dojo/text!./templates/TextBox.html ../main".split(" "),function(m,n,
k,f,e,l,d,h,c,a,b){h=m("dijit.form.TextBox"+(d("dojo-bidi")?"_NoBidi":""),[h,c],{templateString:a,_singleNodeTemplate:'\x3cinput class\x3d"dijit dijitReset dijitLeft dijitInputField" data-dojo-attach-point\x3d"textbox,focusNode" autocomplete\x3d"off" type\x3d"${type}" ${!nameAttrSetting} /\x3e',_buttonInputDisabled:d("ie")?"disabled":"",baseClass:"dijitTextBox",postMixInProperties:function(){var a=this.type.toLowerCase();if(this.templateString&&"input"==this.templateString.toLowerCase()||("hidden"==
a||"file"==a)&&this.templateString==this.constructor.prototype.templateString)this.templateString=this._singleNodeTemplate;this.inherited(arguments)},postCreate:function(){this.inherited(arguments);9>d("ie")&&this.defer(function(){try{var a=k.getComputedStyle(this.domNode);if(a){var b=a.fontFamily;if(b){var c=this.domNode.getElementsByTagName("INPUT");if(c)for(a=0;a<c.length;a++)c[a].style.fontFamily=b}}}catch(y){}})},_setPlaceHolderAttr:function(a){this._set("placeHolder",a);this._phspan||(this._attachPoints.push("_phspan"),
this._phspan=n.create("span",{className:"dijitPlaceHolder dijitInputField"},this.textbox,"after"),this.own(l(this._phspan,"mousedown",function(a){a.preventDefault()}),l(this._phspan,"touchend, pointerup, MSPointerUp",e.hitch(this,function(){this.focus()}))));this._phspan.innerHTML="";this._phspan.appendChild(this._phspan.ownerDocument.createTextNode(a));this._updatePlaceHolder()},_onInput:function(a){this.inherited(arguments);this._updatePlaceHolder()},_updatePlaceHolder:function(){this._phspan&&
(this._phspan.style.display=this.placeHolder&&!this.textbox.value?"":"none")},_setValueAttr:function(a,b,c){this.inherited(arguments);this._updatePlaceHolder()},getDisplayedValue:function(){f.deprecated(this.declaredClass+"::getDisplayedValue() is deprecated. Use get('displayedValue') instead.","","2.0");return this.get("displayedValue")},setDisplayedValue:function(a){f.deprecated(this.declaredClass+"::setDisplayedValue() is deprecated. Use set('displayedValue', ...) instead.","","2.0");this.set("displayedValue",
a)},_onBlur:function(a){this.disabled||(this.inherited(arguments),this._updatePlaceHolder(),this.selectOnClick&&(this.textbox.selectionStart=this.textbox.selectionEnd=void 0))},_onFocus:function(a){this.disabled||this.readOnly||(this.inherited(arguments),this._updatePlaceHolder())}});9>d("ie")&&(h.prototype._isTextSelected=function(){var a=this.ownerDocument.selection.createRange();return a.parentElement()==this.textbox&&0<a.text.length},b._setSelectionRange=c._setSelectionRange=function(a,b,c){a.createTextRange&&
(a=a.createTextRange(),a.collapse(!0),a.moveStart("character",-99999),a.moveStart("character",b),a.moveEnd("character",c-b),a.select())});d("dojo-bidi")&&(h=m("dijit.form.TextBox",h,{_setPlaceHolderAttr:function(a){this.inherited(arguments);this.applyTextDir(this._phspan)}}));return h})},"dijit/form/_FormValueWidget":function(){define(["dojo/_base/declare","dojo/sniff","./_FormWidget","./_FormValueMixin"],function(m,n,k,f){return m("dijit.form._FormValueWidget",[k,f],{_layoutHackIE7:function(){if(7==
n("ie"))for(var e=this.domNode,f=e.parentNode,d=e.firstChild||e,h=d.style.filter,c=this;f&&0==f.clientHeight;)(function(){var a=c.connect(f,"onscroll",function(){c.disconnect(a);d.style.filter=(new Date).getMilliseconds();c.defer(function(){d.style.filter=h})})})(),f=f.parentNode}})})},"dijit/form/_FormValueMixin":function(){define("dojo/_base/declare dojo/dom-attr dojo/keys dojo/_base/lang dojo/on ./_FormWidgetMixin".split(" "),function(m,n,k,f,e,l){return m("dijit.form._FormValueMixin",l,{readOnly:!1,
_setReadOnlyAttr:function(d){n.set(this.focusNode,"readOnly",d);this._set("readOnly",d)},postCreate:function(){this.inherited(arguments);void 0===this._resetValue&&(this._lastValueReported=this._resetValue=this.value)},_setValueAttr:function(d,e){this._handleOnChange(d,e)},_handleOnChange:function(d,e){this._set("value",d);this.inherited(arguments)},undo:function(){this._setValueAttr(this._lastValueReported,!1)},reset:function(){this._hasBeenBlurred=!1;this._setValueAttr(this._resetValue,!0)}})})},
"dijit/form/_TextBoxMixin":function(){define("dojo/_base/array dojo/_base/declare dojo/dom dojo/sniff dojo/keys dojo/_base/lang dojo/on ../main".split(" "),function(m,n,k,f,e,l,d,h){var c=n("dijit.form._TextBoxMixin"+(f("dojo-bidi")?"_NoBidi":""),null,{trim:!1,uppercase:!1,lowercase:!1,propercase:!1,maxLength:"",selectOnClick:!1,placeHolder:"",_getValueAttr:function(){return this.parse(this.get("displayedValue"),this.constraints)},_setValueAttr:function(a,b,c){var d;void 0!==a&&(d=this.filter(a),
"string"!=typeof c&&(c=null===d||"number"==typeof d&&isNaN(d)?"":this.filter(this.format(d,this.constraints)),0!=this.compare(d,this.filter(this.parse(c,this.constraints)))&&(c=null)));null==c||"number"==typeof c&&isNaN(c)||this.textbox.value==c||(this.textbox.value=c,this._set("displayedValue",this.get("displayedValue")));this.inherited(arguments,[d,b])},displayedValue:"",_getDisplayedValueAttr:function(){return this.filter(this.textbox.value)},_setDisplayedValueAttr:function(a){null==a?a="":"string"!=
typeof a&&(a=String(a));this.textbox.value=a;this._setValueAttr(this.get("value"),void 0);this._set("displayedValue",this.get("displayedValue"))},format:function(a){return null==a?"":a.toString?a.toString():a},parse:function(a){return a},_refreshState:function(){},onInput:function(){},_onInput:function(a){this._lastInputEventValue=this.textbox.value;this._processInput(this._lastInputProducingEvent||a);delete this._lastInputProducingEvent;this.intermediateChanges&&this._handleOnChange(this.get("value"),
!1)},_processInput:function(){this._refreshState();this._set("displayedValue",this.get("displayedValue"))},postCreate:function(){this.textbox.setAttribute("value",this.textbox.value);this.inherited(arguments);this.own(d(this.textbox,"keydown, keypress, paste, cut, compositionend",l.hitch(this,function(a){var b;if("keydown"==a.type&&229!=a.keyCode){b=a.keyCode;switch(b){case e.SHIFT:case e.ALT:case e.CTRL:case e.META:case e.CAPS_LOCK:case e.NUM_LOCK:case e.SCROLL_LOCK:return}if(!a.ctrlKey&&!a.metaKey&&
!a.altKey){switch(b){case e.NUMPAD_0:case e.NUMPAD_1:case e.NUMPAD_2:case e.NUMPAD_3:case e.NUMPAD_4:case e.NUMPAD_5:case e.NUMPAD_6:case e.NUMPAD_7:case e.NUMPAD_8:case e.NUMPAD_9:case e.NUMPAD_MULTIPLY:case e.NUMPAD_PLUS:case e.NUMPAD_ENTER:case e.NUMPAD_MINUS:case e.NUMPAD_PERIOD:case e.NUMPAD_DIVIDE:return}if(65<=b&&90>=b||48<=b&&57>=b||b==e.SPACE)return;b=!1;for(var c in e)if(e[c]===a.keyCode){b=!0;break}if(!b)return}}(b=32<=a.charCode?String.fromCharCode(a.charCode):a.charCode)||(b=65<=a.keyCode&&
90>=a.keyCode||48<=a.keyCode&&57>=a.keyCode||a.keyCode==e.SPACE?String.fromCharCode(a.keyCode):a.keyCode);b||(b=229);if("keypress"==a.type){if("string"!=typeof b)return;if("a"<=b&&"z">=b||"A"<=b&&"Z">=b||"0"<=b&&"9">=b||" "===b)if(a.ctrlKey||a.metaKey||a.altKey)return}var h={faux:!0},k;for(k in a)/^(layer[XY]|returnValue|keyLocation)$/.test(k)||(c=a[k],"function"!=typeof c&&"undefined"!=typeof c&&(h[k]=c));l.mixin(h,{charOrCode:b,_wasConsumed:!1,preventDefault:function(){h._wasConsumed=!0;a.preventDefault()},
stopPropagation:function(){a.stopPropagation()}});this._lastInputProducingEvent=h;!1===this.onInput(h)&&(h.preventDefault(),h.stopPropagation());if(!h._wasConsumed&&9>=f("ie"))switch(a.keyCode){case e.TAB:case e.ESCAPE:case e.DOWN_ARROW:case e.UP_ARROW:case e.LEFT_ARROW:case e.RIGHT_ARROW:break;default:a.keyCode==e.ENTER&&"textarea"!=this.textbox.tagName.toLowerCase()||this.defer(function(){this.textbox.value!==this._lastInputEventValue&&d.emit(this.textbox,"input",{bubbles:!0})})}})),d(this.textbox,
"input",l.hitch(this,"_onInput")),d(this.domNode,"keypress",function(a){a.stopPropagation()}))},_blankValue:"",filter:function(a){if(null===a)return this._blankValue;if("string"!=typeof a)return a;this.trim&&(a=l.trim(a));this.uppercase&&(a=a.toUpperCase());this.lowercase&&(a=a.toLowerCase());this.propercase&&(a=a.replace(/[^\s]+/g,function(a){return a.substring(0,1).toUpperCase()+a.substring(1)}));return a},_setBlurValue:function(){this._setValueAttr(this.get("value"),!0)},_onBlur:function(a){this.disabled||
(this._setBlurValue(),this.inherited(arguments))},_isTextSelected:function(){return this.textbox.selectionStart!=this.textbox.selectionEnd},_onFocus:function(a){this.disabled||this.readOnly||(this.selectOnClick&&"mouse"==a&&(this._selectOnClickHandle=d.once(this.domNode,"mouseup, touchend",l.hitch(this,function(a){this._isTextSelected()||c.selectInputText(this.textbox)})),this.own(this._selectOnClickHandle),this.defer(function(){this._selectOnClickHandle&&(this._selectOnClickHandle.remove(),this._selectOnClickHandle=
null)},500)),this.inherited(arguments),this._refreshState())},reset:function(){this.textbox.value="";this.inherited(arguments)}});f("dojo-bidi")&&(c=n("dijit.form._TextBoxMixin",c,{_setValueAttr:function(){this.inherited(arguments);this.applyTextDir(this.focusNode)},_setDisplayedValueAttr:function(){this.inherited(arguments);this.applyTextDir(this.focusNode)},_onInput:function(){this.applyTextDir(this.focusNode);this.inherited(arguments)}}));c._setSelectionRange=h._setSelectionRange=function(a,b,
c){a.setSelectionRange&&a.setSelectionRange(b,c)};c.selectInputText=h.selectInputText=function(a,b,d){a=k.byId(a);isNaN(b)&&(b=0);isNaN(d)&&(d=a.value?a.value.length:0);try{a.focus(),c._setSelectionRange(a,b,d)}catch(q){}};return c})},"dijit/Tooltip":function(){define("dojo/_base/array dojo/_base/declare dojo/_base/fx dojo/dom dojo/dom-class dojo/dom-geometry dojo/dom-style dojo/_base/lang dojo/mouse dojo/on dojo/sniff ./_base/manager ./place ./_Widget ./_TemplatedMixin ./BackgroundIframe dojo/text!./templates/Tooltip.html ./main".split(" "),
function(m,n,k,f,e,l,d,h,c,a,b,w,q,u,y,t,B,D){function z(){}var v=n("dijit._MasterTooltip",[u,y],{duration:w.defaultDuration,templateString:B,postCreate:function(){this.ownerDocumentBody.appendChild(this.domNode);this.bgIframe=new t(this.domNode);this.fadeIn=k.fadeIn({node:this.domNode,duration:this.duration,onEnd:h.hitch(this,"_onShow")});this.fadeOut=k.fadeOut({node:this.domNode,duration:this.duration,onEnd:h.hitch(this,"_onHide")})},show:function(a,b,c,e,f,g,k){if(!this.aroundNode||this.aroundNode!==
b||this.containerNode.innerHTML!=a)if("playing"==this.fadeOut.status())this._onDeck=arguments;else{this.containerNode.innerHTML=a;f&&this.set("textDir",f);this.containerNode.align=e?"right":"left";var l=q.around(this.domNode,b,c&&c.length?c:x.defaultPosition,!e,h.hitch(this,"orient")),m=l.aroundNodePos;"M"==l.corner.charAt(0)&&"M"==l.aroundCorner.charAt(0)?(this.connectorNode.style.top=m.y+(m.h-this.connectorNode.offsetHeight>>1)-l.y+"px",this.connectorNode.style.left=""):"M"==l.corner.charAt(1)&&
"M"==l.aroundCorner.charAt(1)?this.connectorNode.style.left=m.x+(m.w-this.connectorNode.offsetWidth>>1)-l.x+"px":(this.connectorNode.style.left="",this.connectorNode.style.top="");d.set(this.domNode,"opacity",0);this.fadeIn.play();this.isShowingNow=!0;this.aroundNode=b;this.onMouseEnter=g||z;this.onMouseLeave=k||z}},orient:function(a,c,d,e,f){this.connectorNode.style.top="";var g=e.h;e=e.w;a.className="dijitTooltip "+{"MR-ML":"dijitTooltipRight","ML-MR":"dijitTooltipLeft","TM-BM":"dijitTooltipAbove",
"BM-TM":"dijitTooltipBelow","BL-TL":"dijitTooltipBelow dijitTooltipABLeft","TL-BL":"dijitTooltipAbove dijitTooltipABLeft","BR-TR":"dijitTooltipBelow dijitTooltipABRight","TR-BR":"dijitTooltipAbove dijitTooltipABRight","BR-BL":"dijitTooltipRight","BL-BR":"dijitTooltipLeft"}[c+"-"+d];this.domNode.style.width="auto";var h=l.position(this.domNode);b("ie")&&(h.w+=2);l.setMarginBox(this.domNode,{w:Math.min(Math.max(e,1),h.w)});"B"==d.charAt(0)&&"B"==c.charAt(0)?(a=l.position(a),c=this.connectorNode.offsetHeight,
a.h>g?(this.connectorNode.style.top=g-(f.h+c>>1)+"px",this.connectorNode.style.bottom=""):(this.connectorNode.style.bottom=Math.min(Math.max(f.h/2-c/2,0),a.h-c)+"px",this.connectorNode.style.top="")):(this.connectorNode.style.top="",this.connectorNode.style.bottom="");return Math.max(0,h.w-e)},_onShow:function(){b("ie")&&(this.domNode.style.filter="")},hide:function(a){this._onDeck&&this._onDeck[1]==a?this._onDeck=null:this.aroundNode===a&&(this.fadeIn.stop(),this.isShowingNow=!1,this.aroundNode=
null,this.fadeOut.play());this.onMouseEnter=this.onMouseLeave=z},_onHide:function(){this.domNode.style.cssText="";this.containerNode.innerHTML="";this._onDeck&&(this.show.apply(this,this._onDeck),this._onDeck=null)}});b("dojo-bidi")&&v.extend({_setAutoTextDir:function(a){this.applyTextDir(a);m.forEach(a.children,function(a){this._setAutoTextDir(a)},this)},_setTextDirAttr:function(a){this._set("textDir",a);"auto"==a?this._setAutoTextDir(this.containerNode):this.containerNode.dir=this.textDir}});D.showTooltip=
function(a,b,c,d,e,f,h){c&&(c=m.map(c,function(a){return{after:"after-centered",before:"before-centered"}[a]||a}));x._masterTT||(D._masterTT=x._masterTT=new v);return x._masterTT.show(a,b,c,d,e,f,h)};D.hideTooltip=function(a){return x._masterTT&&x._masterTT.hide(a)};var x=n("dijit.Tooltip",u,{label:"",showDelay:400,hideDelay:400,connectId:[],position:[],selector:"",_setConnectIdAttr:function(b){m.forEach(this._connections||[],function(a){m.forEach(a,function(a){a.remove()})},this);this._connectIds=
m.filter(h.isArrayLike(b)?b:b?[b]:[],function(a){return f.byId(a,this.ownerDocument)},this);this._connections=m.map(this._connectIds,function(b){b=f.byId(b,this.ownerDocument);var d=this.selector,e=d?function(b){return a.selector(d,b)}:function(a){return a},k=this;return[a(b,e(c.enter),function(){k._onHover(this)}),a(b,e("focusin"),function(){k._onHover(this)}),a(b,e(c.leave),h.hitch(k,"_onUnHover")),a(b,e("focusout"),h.hitch(k,"set","state","DORMANT"))]},this);this._set("connectId",b)},addTarget:function(a){a=
a.id||a;-1==m.indexOf(this._connectIds,a)&&this.set("connectId",this._connectIds.concat(a))},removeTarget:function(a){a=m.indexOf(this._connectIds,a.id||a);0<=a&&(this._connectIds.splice(a,1),this.set("connectId",this._connectIds))},buildRendering:function(){this.inherited(arguments);e.add(this.domNode,"dijitTooltipData")},startup:function(){this.inherited(arguments);var a=this.connectId;m.forEach(h.isArrayLike(a)?a:[a],this.addTarget,this)},getContent:function(a){return this.label||this.domNode.innerHTML},
state:"DORMANT",_setStateAttr:function(a){if(!(this.state==a||"SHOW TIMER"==a&&"SHOWING"==this.state||"HIDE TIMER"==a&&"DORMANT"==this.state)){this._hideTimer&&(this._hideTimer.remove(),delete this._hideTimer);this._showTimer&&(this._showTimer.remove(),delete this._showTimer);switch(a){case "DORMANT":this._connectNode&&(x.hide(this._connectNode),delete this._connectNode,this.onHide());break;case "SHOW TIMER":"SHOWING"!=this.state&&(this._showTimer=this.defer(function(){this.set("state","SHOWING")},
this.showDelay));break;case "SHOWING":var b=this.getContent(this._connectNode);if(!b){this.set("state","DORMANT");return}x.show(b,this._connectNode,this.position,!this.isLeftToRight(),this.textDir,h.hitch(this,"set","state","SHOWING"),h.hitch(this,"set","state","HIDE TIMER"));this.onShow(this._connectNode,this.position);break;case "HIDE TIMER":this._hideTimer=this.defer(function(){this.set("state","DORMANT")},this.hideDelay)}this._set("state",a)}},_onHover:function(a){this._connectNode&&a!=this._connectNode&&
this.set("state","DORMANT");this._connectNode=a;this.set("state","SHOW TIMER")},_onUnHover:function(a){this.set("state","HIDE TIMER")},open:function(a){this.set("state","DORMANT");this._connectNode=a;this.set("state","SHOWING")},close:function(){this.set("state","DORMANT")},onShow:function(){},onHide:function(){},destroy:function(){this.set("state","DORMANT");m.forEach(this._connections||[],function(a){m.forEach(a,function(a){a.remove()})},this);this.inherited(arguments)}});x._MasterTooltip=v;x.show=
D.showTooltip;x.hide=D.hideTooltip;x.defaultPosition=["after-centered","before-centered"];return x})},"dijit/place":function(){define("dojo/_base/array dojo/dom-geometry dojo/dom-style dojo/_base/kernel dojo/_base/window ./Viewport ./main".split(" "),function(m,n,k,f,e,l,d){function h(a,b,c,d){var f=l.getEffectiveBox(a.ownerDocument);a.parentNode&&"body"==String(a.parentNode.tagName).toLowerCase()||e.body(a.ownerDocument).appendChild(a);var h=null;m.some(b,function(b){var e=b.corner,k=b.pos,l=0,m=
{w:{L:f.l+f.w-k.x,R:k.x-f.l,M:f.w}[e.charAt(1)],h:{T:f.t+f.h-k.y,B:k.y-f.t,M:f.h}[e.charAt(0)]},t=a.style;t.left=t.right="auto";c&&(l=c(a,b.aroundCorner,e,m,d),l="undefined"==typeof l?0:l);var u=a.style,q=u.display,w=u.visibility;"none"==u.display&&(u.visibility="hidden",u.display="");t=n.position(a);u.display=q;u.visibility=w;q={L:k.x,R:k.x-t.w,M:Math.max(f.l,Math.min(f.l+f.w,k.x+(t.w>>1))-t.w)}[e.charAt(1)];w={T:k.y,B:k.y-t.h,M:Math.max(f.t,Math.min(f.t+f.h,k.y+(t.h>>1))-t.h)}[e.charAt(0)];k=Math.max(f.l,
q);u=Math.max(f.t,w);q=Math.min(f.l+f.w,q+t.w)-k;w=Math.min(f.t+f.h,w+t.h)-u;l+=t.w-q+(t.h-w);if(null==h||l<h.overflow)h={corner:e,aroundCorner:b.aroundCorner,x:k,y:u,w:q,h:w,overflow:l,spaceAvailable:m};return!l});h.overflow&&c&&c(a,h.aroundCorner,h.corner,h.spaceAvailable,d);b=h.y;var t=h.x,q=e.body(a.ownerDocument);/relative|absolute/.test(k.get(q,"position"))&&(b-=k.get(q,"marginTop"),t-=k.get(q,"marginLeft"));q=a.style;q.top=b+"px";q.left=t+"px";q.right="auto";return h}var c={TL:"BR",TR:"BL",
BL:"TR",BR:"TL"};return d.place={at:function(a,b,d,e,f){d=m.map(d,function(a){var d={corner:a,aroundCorner:c[a],pos:{x:b.x,y:b.y}};e&&(d.pos.x+="L"==a.charAt(1)?e.x:-e.x,d.pos.y+="T"==a.charAt(0)?e.y:-e.y);return d});return h(a,d,f)},around:function(a,b,c,d,e){function l(a,b){H.push({aroundCorner:a,corner:b,pos:{x:{L:r,R:r+F,M:r+(F>>1)}[a.charAt(1)],y:{T:C,B:C+G,M:C+(G>>1)}[a.charAt(0)]}})}var t;if("string"==typeof b||"offsetWidth"in b||"ownerSVGElement"in b){if(t=n.position(b,!0),/^(above|below)/.test(c[0])){var u=
n.getBorderExtents(b),q=b.firstChild?n.getBorderExtents(b.firstChild):{t:0,l:0,b:0,r:0},w=n.getBorderExtents(a),v=a.firstChild?n.getBorderExtents(a.firstChild):{t:0,l:0,b:0,r:0};t.y+=Math.min(u.t+q.t,w.t+v.t);t.h-=Math.min(u.t+q.t,w.t+v.t)+Math.min(u.b+q.b,w.b+v.b)}}else t=b;if(b.parentNode)for(u="absolute"==k.getComputedStyle(b).position,b=b.parentNode;b&&1==b.nodeType&&"BODY"!=b.nodeName;){q=n.position(b,!0);w=k.getComputedStyle(b);/relative|absolute/.test(w.position)&&(u=!1);if(!u&&/hidden|auto|scroll/.test(w.overflow)){var v=
Math.min(t.y+t.h,q.y+q.h),x=Math.min(t.x+t.w,q.x+q.w);t.x=Math.max(t.x,q.x);t.y=Math.max(t.y,q.y);t.h=v-t.y;t.w=x-t.x}"absolute"==w.position&&(u=!0);b=b.parentNode}var r=t.x,C=t.y,F="w"in t?t.w:t.w=t.width,G="h"in t?t.h:(f.deprecated("place.around: dijit/place.__Rectangle: { x:"+r+", y:"+C+", height:"+t.height+", width:"+F+" } has been deprecated. Please use { x:"+r+", y:"+C+", h:"+t.height+", w:"+F+" }","","2.0"),t.h=t.height),H=[];m.forEach(c,function(a){var b=d;switch(a){case "above-centered":l("TM",
"BM");break;case "below-centered":l("BM","TM");break;case "after-centered":b=!b;case "before-centered":l(b?"ML":"MR",b?"MR":"ML");break;case "after":b=!b;case "before":l(b?"TL":"TR",b?"TR":"TL");l(b?"BL":"BR",b?"BR":"BL");break;case "below-alt":b=!b;case "below":l(b?"BL":"BR",b?"TL":"TR");l(b?"BR":"BL",b?"TR":"TL");break;case "above-alt":b=!b;case "above":l(b?"TL":"TR",b?"BL":"BR");l(b?"TR":"TL",b?"BR":"BL");break;default:l(a.aroundCorner,a.corner)}});a=h(a,H,e,{w:F,h:G});a.aroundNodePos=t;return a}}})},
"esri/identity/OAuthSignInHandler":function(){define("./Credential ../core/domUtils ../core/lang ../core/Error ../core/urlUtils dijit/Dialog dijit/registry dojo/Deferred dojo/_base/kernel dojo/dom-attr dojo/i18n!./nls/identity dojo/io-query dojo/sniff dijit/form/Button dojo/query".split(" "),function(m,n,k,f,e,l,d,h,c,a,b,w,q){return{_oAuthDfd:null,_oAuthIntervalId:0,_oAuthDialogContent:"\x3cdiv class\x3d'dijitDialogPaneContentArea'\x3e\x3cdiv style\x3d'padding-bottom: 5px; word-wrap: break-word;'\x3e{oAuthInfo}\x3c/div\x3e\x3cdiv style\x3d'margin: 0px; padding: 0px; height: 10px;'\x3e\x3c/div\x3e\x3cdiv class\x3d'esriErrorMsg' style\x3d'display: none; color: white; background-color: #D46464; text-align: center; padding-top: 3px; padding-bottom: 3px;'\x3e{invalidUser}\x3c/div\x3e\x3cdiv style\x3d'margin: 0px; padding: 0px; height: 10px;'\x3e\x3c/div\x3e\x3cdiv class\x3d'dijitDialogPaneActionBar'\x3e\x3cbutton data-dojo-type\x3d'dijit.form.Button' data-dojo-props\x3d'type:\"button\", \"class\":\"esriIdSubmit\"'\x3e{lblOk}\x3c/button\x3e\x3cbutton data-dojo-type\x3d'dijit.form.Button' data-dojo-props\x3d'type:\"button\", \"class\":\"esriIdCancel\"'\x3e{lblCancel}\x3c/button\x3e\x3c/div\x3e",
setOAuthRedirectionHandler:function(a){this._oAuthRedirectFunc=a},oAuthSignIn:function(c,d,e,f){var k=this._oAuthDfd=new h;k.resUrl_=c;k.sinfo_=d;k.oinfo_=e;var l=!f||!1!==f.oAuthPopupConfirmation;if(!e.popup||!l)return this._doOAuthSignIn(c,d,e),k.promise;this._nls||(this._nls=b);this.oAuthDialog||(this.oAuthDialog=this._createOAuthDialog());c=this.oAuthDialog;d=f&&f.error;f=f&&f.token;n.hide(c.errMsg_);d&&d.details&&403==d.details.httpStatus&&f&&(a.set(c.errMsg_,"innerHTML",this._nls.forbidden),
n.show(c.errMsg_));c.show();return k.promise},setOAuthResponseHash:function(a){var b=this._oAuthDfd;this._oAuthDfd=null;if(b&&a)if(clearInterval(this._oAuthIntervalId),"#"===a.charAt(0)&&(a=a.substring(1)),a=w.queryToObject(a),a.error){var c="access_denied"===a.error;a=new f(c?"identity-manager:user-aborted":"identity-manager:authentication-failed",c?"ABORTED":"OAuth: "+a.error+" - "+a.error_description);b.reject(a)}else{var c=b.oinfo_._oAuthCred,d=new m({userId:a.username,server:b.sinfo_.server,
token:a.access_token,expires:(new Date).getTime()+1E3*Number(a.expires_in),ssl:"true"===a.ssl,_oAuthCred:c});c.storage=a.persist?window.localStorage:window.sessionStorage;c.token=d.token;c.expires=d.expires;c.userId=d.userId;c.ssl=d.ssl;c.save();b.resolve(d)}},_createOAuthDialog:function(){var a=this._nls,b=k.substitute(a,this._oAuthDialogContent),e=new l({title:a.title,content:b,"class":"esri-widget esriOAuthSignInDialog esriIdentityDialog",style:"min-width: 18em;",esriIdMgr_:this,execute_:function(){var a=
e.esriIdMgr_._oAuthDfd;e.hide_();e.esriIdMgr_._doOAuthSignIn(a.resUrl_,a.sinfo_,a.oinfo_)},cancel_:function(){var a=e.esriIdMgr_._oAuthDfd;e.esriIdMgr_._oAuthDfd=null;e.hide_();var b=new f("identity-manager:user-aborted","ABORTED");a.reject(b)},hide_:function(){n.hide(e.errMsg_);e.hide();l._DialogLevelManager.hide(e)}}),a=e.domNode;e.btnSubmit_=d.byNode(c.query(".esriIdSubmit",a)[0]);e.btnCancel_=d.byNode(c.query(".esriIdCancel",a)[0]);e.errMsg_=c.query(".esriErrorMsg",a)[0];e.connect(e.btnSubmit_,
"onClick",e.execute_);e.connect(e.btnCancel_,"onClick",e.onCancel);e.connect(e,"onCancel",e.cancel_);return e},_doOAuthSignIn:function(a,b,c){var d=this,h={client_id:c.appId,response_type:"token",state:JSON.stringify({portalUrl:c.portalUrl}),expiration:c.expiration,locale:c.locale,redirect_uri:c.popup?e.makeAbsolute(c.popupCallbackUrl):window.location.href.replace(/#.*$/,"")};c.forceLogin&&(h.force_login=!0);var k=c.portalUrl.replace(/^http:/i,"https:")+"/sharing/oauth2/authorize",l=k+"?"+w.objectToQuery(h);
if(c.popup){var m;7===q("ie")?(m=window.open(c.popupCallbackUrl,"esriJSAPIOAuth",c.popupWindowFeatures),m.location=l):m=window.open(l,"esriJSAPIOAuth",c.popupWindowFeatures);m?(m.focus(),this._oAuthDfd.oAuthWin_=m,this._oAuthIntervalId=setInterval(function(){if(m.closed){clearInterval(d._oAuthIntervalId);var a=d._oAuthDfd;if(a){var b=new f("identity-manager:user-aborted","ABORTED");a.reject(b)}}},500)):(a=new f("identity-manager:popup-blocked","ABORTED"),this._oAuthDfd.reject(a))}else this._oAuthRedirectFunc?
this._oAuthRedirectFunc({authorizeParams:h,authorizeUrl:k,resourceUrl:a,serverInfo:b,oAuthInfo:c}):window.location=l}}})},"url:dijit/templates/Dialog.html":'\x3cdiv class\x3d"dijitDialog" role\x3d"dialog" aria-labelledby\x3d"${id}_title"\x3e\r\n\t\x3cdiv data-dojo-attach-point\x3d"titleBar" class\x3d"dijitDialogTitleBar"\x3e\r\n\t\t\x3cspan data-dojo-attach-point\x3d"titleNode" class\x3d"dijitDialogTitle" id\x3d"${id}_title"\r\n\t\t\t\trole\x3d"heading" level\x3d"1"\x3e\x3c/span\x3e\r\n\t\t\x3cspan data-dojo-attach-point\x3d"closeButtonNode" class\x3d"dijitDialogCloseIcon" data-dojo-attach-event\x3d"ondijitclick: onCancel" title\x3d"${buttonCancel}" role\x3d"button" tabindex\x3d"-1"\x3e\r\n\t\t\t\x3cspan data-dojo-attach-point\x3d"closeText" class\x3d"closeText" title\x3d"${buttonCancel}"\x3ex\x3c/span\x3e\r\n\t\t\x3c/span\x3e\r\n\t\x3c/div\x3e\r\n\t\x3cdiv data-dojo-attach-point\x3d"containerNode" class\x3d"dijitDialogPaneContent"\x3e\x3c/div\x3e\r\n\t${!actionBarTemplate}\r\n\x3c/div\x3e\r\n\r\n',
"url:dijit/form/templates/Button.html":'\x3cspan class\x3d"dijit dijitReset dijitInline" role\x3d"presentation"\r\n\t\x3e\x3cspan class\x3d"dijitReset dijitInline dijitButtonNode"\r\n\t\tdata-dojo-attach-event\x3d"ondijitclick:__onClick" role\x3d"presentation"\r\n\t\t\x3e\x3cspan class\x3d"dijitReset dijitStretch dijitButtonContents"\r\n\t\t\tdata-dojo-attach-point\x3d"titleNode,focusNode"\r\n\t\t\trole\x3d"button" aria-labelledby\x3d"${id}_label"\r\n\t\t\t\x3e\x3cspan class\x3d"dijitReset dijitInline dijitIcon" data-dojo-attach-point\x3d"iconNode"\x3e\x3c/span\r\n\t\t\t\x3e\x3cspan class\x3d"dijitReset dijitToggleButtonIconChar"\x3e\x26#x25CF;\x3c/span\r\n\t\t\t\x3e\x3cspan class\x3d"dijitReset dijitInline dijitButtonText"\r\n\t\t\t\tid\x3d"${id}_label"\r\n\t\t\t\tdata-dojo-attach-point\x3d"containerNode"\r\n\t\t\t\x3e\x3c/span\r\n\t\t\x3e\x3c/span\r\n\t\x3e\x3c/span\r\n\t\x3e\x3cinput ${!nameAttrSetting} type\x3d"${type}" value\x3d"${value}" class\x3d"dijitOffScreen"\r\n\t\tdata-dojo-attach-event\x3d"onclick:_onClick"\r\n\t\ttabIndex\x3d"-1" aria-hidden\x3d"true" data-dojo-attach-point\x3d"valueNode"\r\n/\x3e\x3c/span\x3e\r\n',
"url:dijit/form/templates/TextBox.html":'\x3cdiv class\x3d"dijit dijitReset dijitInline dijitLeft" id\x3d"widget_${id}" role\x3d"presentation"\r\n\t\x3e\x3cdiv class\x3d"dijitReset dijitInputField dijitInputContainer"\r\n\t\t\x3e\x3cinput class\x3d"dijitReset dijitInputInner" data-dojo-attach-point\x3d\'textbox,focusNode\' autocomplete\x3d"off"\r\n\t\t\t${!nameAttrSetting} type\x3d\'${type}\'\r\n\t/\x3e\x3c/div\r\n\x3e\x3c/div\x3e\r\n',"url:dijit/templates/Tooltip.html":'\x3cdiv class\x3d"dijitTooltip dijitTooltipLeft" id\x3d"dojoTooltip" data-dojo-attach-event\x3d"mouseenter:onMouseEnter,mouseleave:onMouseLeave"\r\n\t\x3e\x3cdiv class\x3d"dijitTooltipConnector" data-dojo-attach-point\x3d"connectorNode"\x3e\x3c/div\r\n\t\x3e\x3cdiv class\x3d"dijitTooltipContainer dijitTooltipContents" data-dojo-attach-point\x3d"containerNode" role\x3d\'alert\'\x3e\x3c/div\r\n\x3e\x3c/div\x3e\r\n',
"url:dijit/form/templates/ValidationTextBox.html":'\x3cdiv class\x3d"dijit dijitReset dijitInline dijitLeft"\r\n\tid\x3d"widget_${id}" role\x3d"presentation"\r\n\t\x3e\x3cdiv class\x3d\'dijitReset dijitValidationContainer\'\r\n\t\t\x3e\x3cinput class\x3d"dijitReset dijitInputField dijitValidationIcon dijitValidationInner" value\x3d"\x26#935; " type\x3d"text" tabIndex\x3d"-1" readonly\x3d"readonly" role\x3d"presentation"\r\n\t/\x3e\x3c/div\r\n\t\x3e\x3cdiv class\x3d"dijitReset dijitInputField dijitInputContainer"\r\n\t\t\x3e\x3cinput class\x3d"dijitReset dijitInputInner" data-dojo-attach-point\x3d\'textbox,focusNode\' autocomplete\x3d"off"\r\n\t\t\t${!nameAttrSetting} type\x3d\'${type}\'\r\n\t/\x3e\x3c/div\r\n\x3e\x3c/div\x3e\r\n',
"*now":function(m){m(['dojo/i18n!*preload*esri/identity/nls/IdentityManager*["ar","ca","cs","da","de","el","en-gb","en-us","es-es","fi-fi","fr-fr","he-il","hu","it-it","ja-jp","ko-kr","nl-nl","nb","pl","pt-br","pt-pt","ru","sk","sl","sv","th","tr","zh-tw","zh-cn","ROOT"]'])},"*noref":1}});define(["./IdentityManagerDialog","../kernel","./OAuthSignInHandler","../core/declare"],function(m,n,k,f){m=new m;n.id=f.safeMixin(m,k);return n.id});