text: // All material copyright ESRI, All Rights Reserved, unless otherwise specified.
  // See http://@sbaseurl@/jsapi/jsapi/esri/copyright.txt and http://www.arcgis.com/apps/webappbuilder/copyright.txt for details.
  
  //>>built
  require({cache:{"url:widgets/Bookmark/setting/Import.html":'\x3cdiv class\x3d"import jimu-widget-bookmark"\x3e\r\n  \x3cdiv class\x3d"import-tips"\x3e${nls.importFromWeb}\x3c/div\x3e\r\n\r\n  \x3cdiv data-dojo-attach-point\x3d"bookmarksInWebmap" class\x3d"bookmarks-in-webmap"\x3e\r\n    \x3cdiv class\x3d"select-all-cb"\x3e\r\n      \x3cdiv type\x3d"checkbox" checked\x3d"false" id\x3d"all" data-dojo-type\x3d"jimu/dijit/CheckBox" data-dojo-attach-point\x3d"all"\x3e\x3c/div\x3e\r\n      \x3clabel class\x3d"all-label" for\x3d"all"\x3e${nls.selectAll}\x3c/label\x3e\r\n    \x3c/div\x3e\r\n\r\n    \x3cdiv data-dojo-attach-point\x3d"bookMarkerContainer" class\x3d"bookmarker-container editing"\x3e\x3c/div\x3e\r\n  \x3c/div\x3e\r\n\r\n  \x3cdiv data-dojo-attach-point\x3d"noBookmark" class\x3d"no-bookmark"\x3e${nls.noBookmarkInWebMap}\x3c/div\x3e\r\n\x3c/div\x3e'}});
  define("dojo/_base/declare dojo/_base/lang dojo/_base/html dojo/_base/array dojo/on dijit/_WidgetsInTemplateMixin jimu/BaseWidgetSetting jimu/utils ../utils ../ItemNode dojo/text!./Import.html".split(" "),function(k,b,e,h,f,l,m,n,g,p,q){var r=window.Sortable;return k([m,l],{baseClass:"jimu-Bookmark-Import",templateString:q,bookmarks:[],_selectedBookMarksNumber:0,postCreate:function(){this.inherited(arguments);this.sortableBookMarkerNodes=r.create(this.bookMarkerContainer,{handle:".drag-masker",sort:!1,
  disabled:!this._init_editing,animation:100});this.bookmarks=g.readBookmarksInWebmap(this.map);this.displayBookmarks(this.bookmarks);this.bookmarks&&0===this.bookmarks.length?e.addClass(this.bookmarksInWebmap,"hide"):e.addClass(this.noBookmark,"hide");this.own(f(this.all,"change",b.hitch(this,function(){this._selectOrUnselectAll()})))},startup:function(){this.bookmarksInSetting&&this.bookmarksInSetting.forEach(b.hitch(this,function(a){if((a=g.findBookMarkByNameAndExtent(a,this.bookmarks))&&a.bookmark)a.bookmark.itemNode.onSelected()}))},
  getConfig:function(){var a=[];this.bookmarks.forEach(b.hitch(this,function(c){c.itemNode&&c.itemNode.domNode&&e.hasClass(c.itemNode.domNode,"selected")&&(delete c.itemNode,c=b.clone(c),a.push(c))}));return a},_isSelectedAll:function(){return this.bookmarks.length===this._selectedBookMarksNumber},_selectOrUnselectAll:function(){this._isSelectedAll()?(this.bookmarks.forEach(b.hitch(this,function(a){a.itemNode&&a.itemNode.domNode&&e.hasClass(a.itemNode.domNode,"selected")&&e.removeClass(a.itemNode.domNode,
  "selected")})),this._selectedBookMarksNumber=0):this.bookmarks.forEach(b.hitch(this,function(a){a.itemNode&&a.itemNode.domNode&&!1===e.hasClass(a.itemNode.domNode,"selected")&&(e.addClass(a.itemNode.domNode,"selected"),this._selectedBookMarksNumber++)}))},destroy:function(){h.forEach(this.bookmarks,function(a){a.itemNode&&a.itemNode.destroy()},this);this.bookmarks=[];this.sortableBookMarkerNodes&&(this.sortableBookMarkerNodes.destroy(),this.sortableBookMarkerNodes=null);this.inherited(arguments)},
  displayBookmarks:function(a){a.reverse();h.forEach(a,function(a,b){var c=this._createBookMarkNode(a,b);a.itemNode=c},this);a.forEach(b.hitch(this,function(a){a.itemNode&&a.itemNode.domNode&&e.place(a.itemNode.domNode,this.bookMarkerContainer,"first")}))},_createBookMarkNode:function(a,c){var d;d=a.thumbnail||"undefined"!==typeof a.thumbnail&&""!==a.thumbnail?n.processUrlInWidgetConfig(a.thumbnail,this.folderUrl):this.folderUrl+"images/thumbnail_default.png";d=new p({dataId:c,img:d,label:a.displayName||
  a.name,display:{selectedBtn:!0,editBtn:!1,deleteBtn:!1},nls:this.nls});this.own(f(d,"click",b.hitch(this,b.partial(this._onBookmarkClick,d))));this.own(f(d,"selected",b.hitch(this,b.partial(this._onBookmarkSelected,d))));this.own(f(d,"unselected",b.hitch(this,b.partial(this._onBookmarkUnSelected,d))));return d},_onBookmarkClick:function(a){a.onSelected()},_onBookmarkSelected:function(){this._selectedBookMarksNumber++;this._isDisableOK()},_onBookmarkUnSelected:function(){this._selectedBookMarksNumber--;
  this._isDisableOK()},_isDisableOK:function(){this.popup&&(0<this._selectedBookMarksNumber?this.popup.enableButton(0):this.popup.disableButton(0),g.setCheckboxWithoutEvent(this.all,this._isSelectedAll()))}})});