text: //>>built
  require({cache:{"url:esriviewer/ui/social/template/SocialMediaWidgetTemplate.html":"<div>\r\n    <div class=\"defaultTabContainer\">\r\n\r\n        <!--\r\n          <span class=\"socialMediaTabWrapper\" data-bind=\"click:youtubeClick, css: {selectedTab: youtubeSelected}\">\r\n              <div class=\"socialIcons youtube socialMediaTabIcon\"></div>\r\n              <span>YouTube</span>\r\n          </span>\r\n                -->\r\n\r\n        <!--\r\n        <span class=\"socialMediaTabWrapper\" data-bind=\"click:flickrClick, css: {selectedTab: flickrSelected}\">\r\n            <div class=\"socialIcons flickr socialMediaTabIcon\"></div>\r\n                     <span>Flickr</span>\r\n        </span>\r\n        -->\r\n        <span data-bind=\"click:flickrClick, css: {selectedTab: flickrSelected}\">Flickr</span>\r\n        <!--\r\n        <span class=\"socialMediaTabWrapper\"  data-bind=\"click:twitterClick, css: {selectedTab: twitterSelected}\">\r\n            <div class=\"socialIcons twitter socialMediaTabIcon\"></div>\r\n                               <span>Twitter</span>\r\n            </span>\r\n            -->\r\n    </div>\r\n    <!--\r\n    <div class=\"socialMediaWidgetTabContent\" data-dojo-attach-point=\"youtubeContainer\"\r\n         data-bind=\"visible: youtubeSelected\">\r\n    </div>\r\n    -->\r\n    <div class=\"socialMediaWidgetTabContent\" data-dojo-attach-point=\"flickrContainer\"\r\n         data-bind=\"visible: flickrSelected\">\r\n    </div>\r\n    <!--\r\n    <div class=\"socialMediaWidgetTabContent\" data-dojo-attach-point=\"twitterContainer\"\r\n         data-bind=\"visible: twitterSelected\">\r\n    </div>\r\n    -->\r\n</div>"}});define("esriviewer/ui/social/SocialMediaWidget",["dojo/_base/declare","dojo/text!./template/SocialMediaWidgetTemplate.html","dojo/_base/lang","dojo/dom-style","dojo/topic","../base/UITemplatedWidget","../../base/DataLoaderSupport","./base/flickr/FlickrWidget","./model/SocialMediaViewModel","esri/layers/GraphicsLayer"],function(_1,_2,_3,_4,_5,_6,_7,_8,_9,_a){return _1([_6,_7],{templateString:_2,postCreate:function(){this.viewModel=new _9();ko.applyBindings(this.viewModel,this.domNode);this.inherited(arguments);this.initGraphicsLayer();},loadViewerConfigurationData:function(){this.inherited(arguments);var _b=null;_5.publish(VIEWER_GLOBALS.EVENTS.CONFIGURATION.GET_ENTRY,"socialMediaWidget",function(_c){_b=_c;});if(_b&&_3.isObject(_b)&&_b.configurationUrl){this.loadJson(_b.configurationUrl,_3.hitch(this,function(_d){_3.mixin(this,_d||{});this.createSocialMediaWidgets();}));}},stopMapCursorListener:function(){if(this.mapCursorListener){this.mapCursorListener.remove();this.mapCursorListener=null;}},listenForMapCursor:function(){if(this.mapCursorListener==null){var _e;_5.publish(VIEWER_GLOBALS.EVENTS.MAP.GET,function(_f){_e=_f;});if(_e){this.mapCursorListener=_e.on("extent-change",_3.hitch(this,this._updateCoordinates));}}},_updateCoordinates:function(evt){var _10=evt.extent;var _11=_10.getCenter();var _12;_5.publish(VIEWER_GLOBALS.EVENTS.GEOMETRY_SERVICE.TASKS.PROJECT_TO_LAT_LON,_11,function(_13){if(_13!=null&&_13.length>0){_12=_13[0];}});if(this.flickrWidget){this.flickrWidget.setCoordinate(_12);}},createSocialMediaWidgets:function(){this.createFlickrWidget();var _14;_5.publish(VIEWER_GLOBALS.EVENTS.MAP.GET,function(map){_14=map;});if(_14&&_14.extent){this._updateCoordinates({extent:_14.extent});}},createFlickrWidget:function(){this.flickrWidget=new _8(_3.mixin({defaultSearchKeyword:this.defaultSearchKeyword},this.flickr));this.flickrWidget.on("addGraphic",_3.hitch(this,this.addGraphic));this.flickrWidget.on("removeGraphic",_3.hitch(this,this.removeGraphic));this.flickrWidget.placeAt(this.flickrContainer);},initGraphicsLayer:function(){this.socialMediaGraphicsLayer=new _a();this.socialMediaGraphicsLayer.on("mouse-over",function(evt){_4.set(evt.target,"cursor","pointer");});_5.publish(VIEWER_GLOBALS.EVENTS.MAP.LAYERS.ADD_EXTERNAL_MANAGED_LAYER,this.socialMediaGraphicsLayer);},addGraphic:function(_15){this.socialMediaGraphicsLayer.add(_15);},clearGraphics:function(){this.socialMediaGraphicsLayer.clear();},removeGraphic:function(_16){this.socialMediaGraphicsLayer.remove(_16);}});});