12345678910 |
- /**
- * IBM Confidential OCO Source Materials IBM Business Platform: Glass Foundation
- * (C) Copyright IBM Corp. 2016, 2017
- *
- * The source code for this program is not published or otherwise divested of
- * its trade secrets, irrespective of what has been deposited with the U.S.
- * Copyright Office
- */
- function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ownKeys(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function _objectSpread(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ownKeys(Object(n),!0).forEach(function(e){_defineProperty(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function _defineProperty(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}define("baglass/api/ActionInterface",[],function(){"use strict";return function(){this.execute=function(){},this.isVisible=function(){}}}),define("baglass/core-client/js/core-client/ui/core/Class",["underscore"],function(c){"use strict";var e=function(){};return e.extend=function(e,t){1===arguments.length&&(t=e,e=null);var i=this.prototype,o=i,n=Object.create(o),r=function(){"function"==typeof this.init&&this.init.apply(this,arguments)};if(e){for(var s=0,a=e.length;s<a;++s)n=c.extend(n,e[s].prototype);o=n,n=Object.create(n),"function"!=typeof t.init&&(t.init=function(){r.inherited("init",this,arguments)})}return c.extend(n,t),r.prototype=n,r.extend=this.extend,r.inherited=function(t,n,r){if("init"===t)"function"==typeof i[t]&&i[t].apply(n,r),c.each(e,function(e){"function"==typeof e.prototype[t]&&e.prototype[t].apply(n,r)});else if("function"==typeof o[t])return o[t].apply(n,r)},r},e}),define("baglass/core-client/js/core-client/ui/core/Events",["./Class"],function(e){"use strict";var t=e.extend({init:function(){this._events={}},on:function(e,t,n){"function"!=typeof t&&console.log("ERROR in Events.on: Invalid event handler"),this._events[e]||(this._events[e]=[]),this._events[e].push({handler:t,context:n});var r=this;return{remove:function(){r.off(e,t,n)}}},off:function(e,t,n){var r=function(e,t){var n=t._events;if(!e)return n;var r=e.split(":");if((n={})[r[0]]=t._events[r[0]],1<r.length&&"*"!==r[1])n[e]=t._events[e];else if(1<r.length&&"*"===r[1])for(var i in t._events)0===i.indexOf(r[0]+":")&&(n[i]=t._events[i]);return n}(e,this);for(var i in r){var o=0,s=r[i];if(s)for(;o<s.length;)s[o].handler!==t&&t||s[o].context!==n&&n?o++:s.splice(o,1)}},trigger:function(e,t){var n=e.split(":"),r=[].concat(this._events.all||[]).concat(this._events[n[0]]||[]);1<n.length&&(r=r.concat(this._events[e]||[]));for(var i=0;i<r.length;i++)"function"==typeof r[i].handler&&r[i].handler.call(r[i].context,t,e)}});return t.prototype.emit=t.prototype.trigger,t}),define("baglass/core-client/js/core-client/utils/BidiUtil",[],function(){"use strict";var l="auto",t={ar:"arab",ar_AE:"arab",ar_BH:"arab",ar_DJ:"arab",ar_DZ:"latn",ar_EG:"arab",ar_EH:"latn",ar_ER:"arab",ar_IL:"arab",ar_IQ:"arab",ar_JO:"arab",ar_KM:"arab",ar_KW:"arab",ar_LB:"arab",ar_LY:"latn",ar_MA:"latn",ar_MR:"arab",ar_OM:"arab",ar_PS:"arab",ar_QA:"arab",ar_SA:"arab",ar_SD:"arab",ar_SO:"arab",ar_SS:"arab",ar_SY:"arab",ar_TD:"arab",ar_TN:"latn",ar_YE:"arab"},e=function(){this._isIE=this._detectIE(navigator.userAgent),this.userPreferredTextDir=this._getUserPreferredTextDir()||l,this.LRE="",this.RLE="",this.PDF="",this.LRM=""};return e.prototype._detectIE=function(e){return/\b(MSIE|Trident|Edge)\b/.test(e)},e.prototype._getUserPreferredTextDir=function(){return this.userPreferredTextDir||(this.userPreferredTextDir=document.documentElement.getAttribute("data-pref-text-dir")),this.userPreferredTextDir},e.prototype._getNodeValue=function(e){return e.value||"INPUT"===e.tagName?e.value:e.textContent},e.prototype._setNodeValue=function(e,t){e.value||"INPUT"===e.tagName?e.value=t:e.textContent=t},e.prototype._isArabicChar=function(e){return 1536<=e&&e<=1641||1786<=e&&e<=2047||64336<=e&&e<=65023||65136<=e&&e<=65276},e.prototype._isHebrewChar=function(e){return 1488<=e&&e<=1535},e.prototype._isBidiChar=function(e){return this._isArabicChar(e)||this._isHebrewChar(e)},e.prototype._isLatinChar=function(e){return 64<e&&e<91||96<e&&e<123},e.prototype._handleInputEvent=function(e){this._resolveDirAttr(e.target)},e.prototype._addBidiEventListeners=function(e){if(!e._hasBidiEventListeners){e._hasBidiEventListeners=!0;for(var t=["keyup","cut","paste"],n=0;n<t.length;++n)e.addEventListener(t[n],this._handleInputEvent.bind(this),!1)}},e.prototype._resolveDirAttr=function(e){if(!this._isIE||this.userPreferredTextDir!==l&&this.userPreferredTextDir)e.dir=this.userPreferredTextDir||l;else{var t=this._getNodeValue(e);e.dir=this.resolveBaseTextDir(t)}},e.prototype._parseSTT=function(e,t){var n,r=t?">":":/@=[]'<>",i=[],o=0;for(n=0;n<e.length;n++)0<=r.indexOf(e.charAt(n))&&(i[o]=n,o++);return i},e.prototype.initElementForBidi=function(e){e&&(this._resolveDirAttr(e),this._isIE&&this._addBidiEventListeners(e))},e.prototype.enforceTextDirection=function(e){if(e){var t=this.resolveBaseTextDir(e),n=e;return"ltr"===t?n=this.LRE+n+this.PDF:"rtl"===t&&(n=this.RLE+n+this.PDF),n}return e},e.prototype.resolveBaseTextDir=function(e,t){var n=this.userPreferredTextDir;if(n||(n=l),n===l&&(!t||this._isIE)){for(var r=0;e&&r<e.length;r++){var i=e.charCodeAt(r);if(this._isBidiChar(i)){n="rtl";break}if(this._isLatinChar(i)){n="ltr";break}}this._isIE&&n===l&&(n="")}return n},e.prototype.enforceTextDirectionForSTT=function(e){if(e){var t,n=0<((e=this.removeMarkers(e)).match(/ > /g)||[]).length,r=this._parseSTT(e,n),i="",o=this.LRM,s=n?1:0;i=0===r.length?this.enforceTextDirection(e):this.enforceTextDirection(e.substring(0,r[0]-s));for(var a=0;a<r.length;a++)if(t=r[a]){var c=a<r.length-1?r[a+1]-s:e.length,l=e.substring(t+1+s,c);i=i+o+e.substring(t-s,t+s+1)+this.enforceTextDirection(l)}return i}return e},e.prototype.enforceTextDirectionForLocation=function(e){return this.enforceTextDirectionForSTT(e)},e.prototype.removeMarkers=function(e){return e.replace(/[\u202A\u202B\u202C\u200E]/g,"")},e.prototype._isArabicLocale=function(e){return e.match(/^ar[-_].*$/i)},e.prototype._useLatinNums=function(e){return!this._isArabicLocale(e)||t[e]&&"latn"===t[e]},e.prototype.enforceNumericShaping=function(e,o){if(!this.bidiSupport||!this.userPreferredContentLocale.startsWith("ar")||"number"!=typeof e&&"string"!=typeof e)return e;var s=this.userPreferredTextDir;this.userPreferredTextDir===l&&(s=this.resolveBaseTextDir(e));var a="undefined"==typeof navigator?"":navigator.language||navigator.userLanguage||"";a=a.replace("-","_");var t=e;"number"==typeof e&&(t=e.toString());var c=this;return t.replace(/([0-9])|([\u0660-\u0669])|([\u0590-\u05FF\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5-\u06E6\u06EE-\u06EF\u06FA-\u06FF\u0750-\u077F\u08A0-\u08E3\u200F\u202B\u202E\u2067\uFB50-\uFD3D\uFD40-\uFDCF\uFDF0-\uFDFC\uFDFE-\uFDFF\uFE70-\uFEFE]+)|([^0-9\u0590-\u05FF\u0660-\u0669\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5-\u06E6\u06EE-\u06EF\u06FA-\u06FF\u0750-\u077F\u08A0-\u08E3\u200F\u202B\u202E\u2067\uFB50-\uFD3D\uFD40-\uFDCF\uFDF0-\uFDFC\uFDFE-\uFDFF\uFE70-\uFEFE\u0600-\u0607\u0609-\u060A\u060C\u060E-\u061A\u064B-\u066C\u0670\u06D6-\u06E4\u06E7-\u06ED\u06F0-\u06F9\u08E4-\u08FF\uFD3E-\uFD3F\uFDD0-\uFDEF\uFDFD\uFEFF\u0000-\u0040\u005B-\u0060\u007B-\u007F\u0080-\u00A9\u00AB-\u00B4\u00B6-\u00B9\u00BB-\u00BF\u00D7\u00F7\u02B9-\u02BA\u02C2-\u02CF\u02D2-\u02DF\u02E5-\u02ED\u02EF-\u02FF\u2070\u2074-\u207E\u2080-\u208E\u2100-\u2101\u2103-\u2106\u2108-\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A-\u213B\u2140-\u2144\u214A-\u214D\u2150-\u215F\u2189\uA720-\uA721\uA788\uFF01-\uFF20\uFF3B-\uFF40\uFF5B-\uFF65\uFFE0-\uFFE6\uFFE8-\uFFEE]+)/g,function(e,t,n,r,i){return n?o&&"ltr"===s||!o&&c._useLatinNums(a)?n.charCodeAt(0)-1632:n:t?o&&"rtl"===s||!o&&!c._useLatinNums(a)?String.fromCharCode(parseInt(t)+1632):t:(r?s="rtl":i&&(s="ltr"),e)})},e.prototype.setUserPreferredTextDir=function(e,t){this.userPreferredTextDir="",this.bidiSupport=!1,"true"===t&&(this.userPreferredTextDir=e.toLowerCase(),this.bidiSupport=!0)},e.prototype.setUserPreferredContentLocale=function(e){this.userPreferredContentLocale=e},new e}),define("baglass/core-client/js/core-client/utils/dom-utils",[],function(){"use strict";return{getAncestorOfClass:function(e,t){for(var n=document;e&&e!==n;){if(0<=e.className.split(" ").indexOf(t))return e;e=e.parentNode}return null},isTouchEvent:function(e){return 0===e.type.indexOf("touch")},isPointerTouch:function(e){return e.gesture&&"touch"===e.gesture.pointerType},isMultiTouchEvent:function(e){var t=e.originalEvent||e;return!!(t&&t.touches&&1<t.touches.length)},isGesture:function(e){return!!(e.gesture&&e.gesture.touches&&0<e.gesture.touches.length)},getEventPos:function(e){var t,n=function(e){return e&&(e.pageX||0===e.pageX)&&(e.pageY||0===e.pageY)};if(this.isGesture(e)){var r=e.gesture.touches[0];n(r)&&(t={pageX:r.pageX,pageY:r.pageY})}if(!t&&this.isTouchEvent(e)){var i=e.originalEvent||e;i&&0<i.touches.length&&n(i.touches[0])&&(t={pageX:i.touches[0].pageX,pageY:i.touches[0].pageY})}return!t&&n(e)&&(t={pageX:e.pageX,pageY:e.pageY}),!t&&n(e.originalEvent)&&(t={pageX:e.originalEvent.pageX,pageY:e.originalEvent.pageY}),t||(t={pageX:0,pageY:0}),t},getEventTarget:function(e){if(this.isTouchEvent(e)){var t=e.originalEvent||e;if(t&&0<t.touches.length)return t.touches[0].target}return e.target},withinElementBoundaries:function(e,t){var n=this.getEventPos(e),r=t.getBoundingClientRect(),i=n.pageX>=r.left&&n.pageX<=r.right,o=n.pageY>=r.top&&n.pageY<=r.bottom;return i&&o}}}),define("baglass/core-client/js/core-client/utils/dnd/DnDManager",["jquery","underscore","../../ui/core/Class","../dom-utils"],function(d,c,e,s){"use strict";return new(e.extend({dropTargets:null,currentDropTarget:null,init:function(){this.dropTargets=[],this.currentDropTarget={},this.addDropTarget(d("body")[0],".dialogBlocker",{accepts:function(){return!0}})},on:function(e,t,n,r,i){return e.on(t,n,r,i),{remove:function(){e.off(t,n,i)}}},addDropTarget:function(e,t,n){return"string"!=typeof t&&(n=t,t=null),this.removeDropTarget(e),this.dropTargets.push({el:e,selector:t,callbacks:n}),{remove:function(){this.removeDropTarget(e)}.bind(this)}},removeDropTarget:function(t){var e=c.find(this.dropTargets,function(e){return e.el===t});e&&this.dropTargets.splice(c.indexOf(this.dropTargets,e),1)},_isScrollDropSupported:function(){return!(!this.currentDropTarget.target||!this.currentDropTarget.target.callbacks.isScrollDropSupported)},_validateDropTarget:function(e,t,n){var r=e;return t&&((n.x+1>=d(window).innerWidth()||n.y+1>=d(window).height()||n.x<=1||n.y<=1)&&(r=r?this._getClosestTargetWithScrollSupport(r.node):this.lastActiveScrollableTarget),!r&&this.currentDropTarget&&(r=this._getClosestTargetWithScrollSupport(this.currentDropTarget.node))),r||{}},_getClosestTargetWithScrollSupport:function(e){var t=d(e).parents();t.splice(0,0,e);for(var n=null,r=0;r<t.length;r++)if(n=this._getDropTargetWithScrollSupport(t[r])){this.lastActiveScrollableTarget=n;break}return n},_getDropTargetWithScrollSupport:function(n){var e=null,t=c.find(this.dropTargets,function(t){var e=d(t.el);return t.selector&&(e=e.find(t.selector)),c.find(e,function(e){return e===n&&t.callbacks.isScrollDropSupported&&(!t.callbacks.accepts||t.callbacks.accepts(this.dragObject))}.bind(this))}.bind(this));return t&&(e={target:t,node:n}),e},getDropTargetFromPos:function(r,e){var t=e&&!e.disableScrollableDropZoneSupport,i=null,o=0,s=0,a=[];return c.each(this.dropTargets,function(n){var e=d(n.el);n.selector&&(e=e.find(n.selector)),c.each(e,function(e){var t=this.getTargetMatchInformation(r,e,n,i,o,s);t.isMatch&&(!n.callbacks.accepts||n.callbacks.accepts(this.dragObject)?(i={target:n,node:e},o=t.area,s=t.priority):n.callbacks.receiveEventsWhenNotAccepting&&a.push({target:n,node:e}))}.bind(this))}.bind(this)),(i=this._validateDropTarget(i,t,r))&&(i.nonActiveDropZones=a),i||{}},_isInRange:function(e,t,n){return t<=e&&e<t+n},_getPriority:function(e){var t=e.callbacks.priority;return"function"==typeof t&&(t=t()),t||0},getTargetMatchInformation:function(e,t,n,r,i,o){var s={},a=d(t),c=t.getBoundingClientRect();if(a.is(":visible")){var l=this._isInRange(e.x,c.left,c.width),u=this._isInRange(e.y,c.top,c.height);l&&u&&((s={area:c.width*c.height,priority:this._getPriority(n)}).isMatch=!r||s.priority>o||i>s.area&&s.priority>=o)}return s},getDropTargetFromNode:function(e){for(var t=null,n=0;n<this.dropTargets.length;n++)if(e===this.dropTargets[n].el){t=this.dropTargets[n];break}return t},dragObject:null,startDrag:function(e){if(!this.dragObject){d("body").addClass("preventSelection"),this.isDragStartCalled=!1,this.targetMap={};var t=s.isTouchEvent(e.event);this.dragObject={type:e.type,data:e.data,avatar:e.avatar,isTouch:t||void 0!==e.event.gesture};var n=s.getEventPos(e.event);this.dragObject.startPosition={x:n.pageX,y:n.pageY},this.setAvatar(e.avatar,e),this.callerCallbacks=e.callerCallbacks?e.callerCallbacks:{};var r=d(window);if(t&&(r=d(s.getEventTarget(e.event))),this.attachedMoveHandler=this.on(r,"mousemove touchmove",this.moveHandler.bind(this,e)),this.attachedUpHandler=this.on(r,"mouseup touchend touchcancel",this.upHandler.bind(this)),"mousedown"===e.event.type&&(this.attachedScrollHandler=this.on(d(e.event.target),"scroll",this.scrollHandler.bind(this))),e.currentDropZoneNode){var i=this.getDropTargetFromNode(e.currentDropZoneNode);i&&(this.currentDropTarget={target:i,node:e.currentDropZoneNode})}}},scrollHandler:function(){this.resetDragging()},_setAvatarPosition:function(e){if(this.avatar&&this.dragObject.position){this.avatar.parentNode||d("body").append(this.avatar);var t=e&&e.avatarXOffset?e.avatarXOffset:1,n=e&&e.avatarYOffset?e.avatarYOffset:1;d(this.avatar).css({left:this.dragObject.position.x+t+"px",top:this.dragObject.position.y+n+"px"})}},setAvatar:function(e,t){this.avatar=e,this._setAvatarPosition(t)},moveHandler:function(e,t){t.preventDefault();var n=s.getEventPos(t),r=n.pageX,i=n.pageY;if(this.dragObject.position={x:r,y:i},e.restrictToXAxis&&(this.dragObject.position.y=this.dragObject.startPosition.y),e.restrictToYAxis&&(this.dragObject.position.x=this.dragObject.startPosition.x),this.isDragStartCalled||!this._isThresholdNotMet(e)){this._setAvatarPosition(e);var o=this.getDropTargetFromPos(this.dragObject.position,e);this._callStartDrag(t),this._callMove(o,t),this._processCallbacks(o)}},_processCallbacks:function(e){var t=this.currentDropTarget.nonActiveDropZones;e.target!==this.currentDropTarget.target||e.node!==this.currentDropTarget.node?(this._dropTargetCallback(this.currentDropTarget,"onDragLeave"),this.currentDropTarget=e,this._dropTargetCallback(this.currentDropTarget,"onDragEnter")):this._dropTargetCallback(this.currentDropTarget,"onDragMove"),this._processCallbacksForNonActiveDropzones(e.nonActiveDropZones,t)},_processCallbacksForNonActiveDropzones:function(t,n){c.each(t,function(e){this._isDropZoneInArray(e,n)?this._dropTargetCallback(e,"onDragMove"):this._dropTargetCallback(e,"onDragEnter")}.bind(this)),n&&c.each(n,function(e){this._isDropZoneInArray(e,t)||this._dropTargetCallback(e,"onDragLeave")}.bind(this)),this.currentDropTarget.nonActiveDropZones=t},_dropTargetCallback:function(e,t){return!(!e.target||!e.target.callbacks[t])&&(e.target.callbacks[t](this.dragObject,e.node),!0)},_isDropZoneInArray:function(e,t){var n=!1;if(t)for(var r=0;r<t.length;r++)if(e.target===t[r].target){n=!0;break}return n},_isThresholdNotMet:function(e){var t=e.moveXThreshold||e.moveYThreshold,n=!e.moveXThreshold||e.moveXThreshold>Math.abs(this.dragObject.position.x-this.dragObject.startPosition.x),r=!e.moveYThreshold||e.moveYThreshold>Math.abs(this.dragObject.position.y-this.dragObject.startPosition.y);return t&&n&&r},_callMove:function(e,t){this.callerCallbacks.onMove&&this.callerCallbacks.onMove(t,{dragObject:this.dragObject,dropTargetNode:e.node})},_callStartDrag:function(e){this.callerCallbacks.onDragStart&&!this.isDragStartCalled&&(this.callerCallbacks.onDragStart(e,{dragObject:this.dragObject}),c.each(this.dropTargets,function(e){e.callbacks.onDragStart&&e.callbacks.onDragStart(this.dragObject)}.bind(this))),d("body").addClass("dragging"),this.isDragStartCalled=!0},upHandler:function(e){if(this.isDragStartCalled){var t=!1;d("body").removeClass("dragging");var n=this.currentDropTarget;this._dropTargetCallback(n,"onDrop")&&(t=!0),this.callerCallbacks.onDragDone&&this.callerCallbacks.onDragDone(e,{dragObject:this.dragObject,dropTargetNode:t?n.node:null,isDropped:t}),n.nonActiveDropZones&&c.each(n.nonActiveDropZones,function(e){this._dropTargetCallback(e,"onDrop")}.bind(this)),c.each(this.dropTargets,function(e){e.callbacks.onDragEnd&&e.callbacks.onDragEnd(this.dragObject)}.bind(this))}this.resetDragging()},resetDragging:function(){document.releaseCapture&&document.releaseCapture(),this.attachedMoveHandler&&this.attachedMoveHandler.remove(),this.attachedUpHandler&&this.attachedUpHandler.remove(),this.attachedScrollHandler&&this.attachedScrollHandler.remove(),d("body").removeClass("preventSelection"),this.currentDropTarget={},this.dragObject=null,this.isDragStartCalled=!1,this.targetMap=null,this.lastActiveScrollableTarget=null,d(this.avatar).remove()}}))}),define("baglass/core-client/js/core-client/utils/EventHelper",["jquery","./BidiUtil","./dnd/DnDManager","underscore","hammerjs","jquery.hammer"],function(u,d,i,e,t){var n=[];for(var r in t.gestures)t.gestures.hasOwnProperty(r)&&n.push(t.gestures[r].name);var o={prevent_mouseevents:!0,stop_browser_behavior:!1};u.each(n,function(e,t){u.event.special[t]={setup:function(){var e=u(this);e.data("hammer")||e.hammer(o)}}}),u.fn.onClick=function(t){return this.on("click",function(e){t(e)}).on("tap",function(e){t(e),e.gesture.preventDefault()}),this};var s=function(r,i,o){var s=r._$inlineEdit;r._updateWidth=function(){if(s){var e=s.val()||"";e!==s._hidden.text()&&(s._hidden.text(e),s.width(s._hidden.width()+2))}},r._inlineEditChangedFn=function(){var e=s.val().trim();0===e.length&&o.noEmptyText&&(e=r._previousInlineText),s.removeClass("inlineText").off("keypress").off("keydown").off("blur");var t=!1;r._previousInlineText!==e&&(t=!0),r._previousInlineText=null,s._hidden.remove(),s._hidden=null,s.off(),s.hide(),s.parent().remove(),s=null,r._$inlineEdit=null,r.text(e),r.removeClass("inEditMode"),r.show().focus(),t&&i(e);var n=o&&o.onEditEnd;n&&n()}.bind(r);var e,t,n,a=r.text();if(r._previousInlineText=a,s)s.val(a);else{r.addClass("inEditMode");var c=u("<div>",{class:"inlineEditContainer"});c.css(function(e,t){var n=e.css(["padding-top","padding-right","padding-bottom","padding-left","margin-top","margin-right","margin-bottom","margin-left","border-bottom-color","border-bottom-style","border-bottom-width","border-top-color","border-top-style","border-top-width","border-right-color","border-right-style","border-right-width","border-left-color","border-left-style","border-left-width","position","top","right","left","bottom","height","width","min-height","min-width","max-height","max-width"]);if("0px"===n.height&&delete n.height,"0px"===n.width&&delete n.width,t&&t.maxSizeNode){var r=u(t.maxSizeNode);t.maxSizeNode.style.width?(n["max-width"]="100%",delete n.width):n["max-width"]=r.width()+"px"}return n}(r,o)),r.after(c),(s=u("<input>",{class:"inlineText"})).css("max-width","100%"),s.css((t={width:"0px","min-width":(e=r).css("fontSize")},"center"===(n=e.css("text-align"))?t.margin="0px auto":"right"===n&&(t.margin="0px 0px 0px auto"),t));var l=r.css(["fontSize","fontFamily","fontWeight","letterSpacing","color"]);s.css(l),c.append(s),(r._$inlineEdit=s).val(a),s._hidden=u('<div style="white-space:pre; top:-999px; left:-999px; position:absolute;"></div>'),s._hidden.css(l),r.hide(),r.after(s._hidden),s.on("keyup keydown input propertychange change",function(){r._updateWidth()}),o&&o.style&&s.css(o.style),r._updateWidth(),s.on("blur",r._inlineEditChangedFn).on("keypress",function(e){13===e.keyCode&&r._inlineEditChangedFn()}).on("keyup",function(e){46!==e.keyCode&&8!==e.keyCode||e.stopPropagation()}).on("keydown",function(e){37!==e.keyCode&&39!==e.keyCode||e.stopPropagation()}).on("mousedown mouseup dblclick",function(e){e.stopPropagation()}),d.initElementForBidi(s[0]),s.show()}return s.focus(),s[0].setSelectionRange(0,9999),!1};u.fn.inlineEditor=function(t,n){if("remove"===t)this._$inlineEdit&&this._inlineEditChangedFn(),this.off("dblclick",this._inlineEditFn),this.off("hold",this._inlineEditFn),delete this._inlineEditFn,delete this._previousInlineText,delete this._inlineEditChangedFn,delete this._updateWidth;else if("blur"===t)this._$inlineEdit&&this._inlineEditChangedFn();else{if("isEditing"===t)return!!this._$inlineEdit;if("edit"===t)this._inlineEditFn&&this._inlineEditFn();else{var r=n&&n.onEditStart;this._inlineEditFn=function(e){i.resetDragging(),r&&r(),s(this,t,n),e&&e.stopPropagation()}.bind(this),this.hammer({stop_browser_behavior:!1,prevent_mouseevents:!0}),this.on("dblclick",this._inlineEditFn),this.on("hold",this._inlineEditFn),this.on("keypress",function(e){var t=e.keyCode||e.charCode;13!==t&&32!==t||this._inlineEditFn(e)}.bind(this))}}}}),define("baglass/core-client/js/core-client/ui/core/View",["jquery","underscore","doT","./Events","../../utils/EventHelper"],function(i,s,t,e){"use strict";var n=null,a=/^(\S+)\s*(.*)$/,r=["el","id","className","tagName","events"];return n=e.extend({templateString:null,id:null,init:function(e){n.inherited("init",this,arguments),this.viewId=s.uniqueId("view"),this.dotTemplate=t.template(this.templateString||""),s.extend(this,s.pick(e||{},r)),this._initDomElement(),this._attachEvents()},tagName:"div",_initDomElement:function(){if(this.el)this.setElement(s.result(this,"el"));else{var e={};this.id&&(e.id=s.result(this,"id")),this.className&&(e.class=s.result(this,"className")),this.setElement(document.createElement(this.tagName)),this.$el.attr(e)}},$:function(e){return this.$el.find(e)},hide:function(){this.$el.hide()},show:function(){this.$el.show()},getTarget:function(e,t){var n=i(e);if(!n.hasClass(t)){var r=n.parents("."+t);0<r.length&&(e=r[0])}return e},render:function(){return this},remove:function(){return this.$el&&this.$el.remove(),this.off&&this.off(),this},setElement:function(e){return this._detachEvents(),this.$el=e instanceof i?e:i(e),this.el=this.$el[0],this._attachEvents(),this},_attachEvents:function(){var e=this.events;for(var t in this._detachEvents(),e){var n=e[t];if(s.isFunction(n)||(n=this[e[t]]),n){var r=t.match(a),i=r[1],o=r[2];this.$el.on(i+".privateViewEvents"+this.viewId,o,n.bind(this))}}return this},_detachEvents:function(){return this.$el&&this.$el.off(".privateViewEvents"+this.viewId),this}})}),define("baglass/core-client/js/core-client/ui/View",["./core/View"],function(e){var t=e.extend({init:function(e){e&&e.glassContext&&e.glassContext.getCoreSvc&&(this.logger=e.glassContext.getCoreSvc(".Logger")),t.inherited("init",this,arguments)},hide:function(){this.$el.addClass("hidden"),this.$el.attr("aria-hidden","true")},show:function(){this.$el.removeClass("hidden"),this.$el.removeAttr("aria-hidden")}});return t}),define("baglass/core-client/js/core-client/utils/ClassFactory",["require"],function(e){var t=function(){};return t.prototype.FAIL_CREATE_INSTANCE="Failed to create the instance",t.prototype.FAIL_LOAD_MODULE="Failed to load the module",t.prototype.instantiate=function(e){var n=arguments;return this.loadModule(e).then(function(e){try{var t=new(e.bind.apply(e,n));return t.moduleID=n[0],t}catch(e){throw{msg:this.FAIL_CREATE_INSTANCE,causedBy:e}}}.bind(this))},t.prototype.loadModule=function(r){return new Promise(function(t,n){if("function"!=typeof r)return e([r],function(e){e?t(e):n({msg:this.FAIL_LOAD_MODULE,causedBy:"Module is not set",moduleId:r})}.bind(this),function(e){n({msg:this.FAIL_LOAD_MODULE,causedBy:e,moduleId:r})}.bind(this));t(r)}.bind(this))},new t}),define("baglass/utils/Utils",["jquery","underscore","../core-client/js/core-client/utils/ClassFactory","jquery-bbq"],function(c,l,e){c.browser={};var u={_ClassFactory:e,buildRedirectURL:function(e,t,n){var r=e,i={};return null!=t&&(i.m_redirect=t),n&&l.extend(i,n),r&&c.each(i,function(e,t){r=r+(-1<r.indexOf("?")?"&":"?")+encodeURIComponent(e)+"="+encodeURIComponent(t)}),r},getCookieValue:function(e){for(var t,n=document.cookie.split(";"),r=0;r<n.length;r++){var i=n[r].split("=");if(decodeURIComponent(i[0].trim())===e&&1<i.length){t=decodeURIComponent(i[1]);break}}return t},_needsProtection:function(e){return c.isFunction(e)&&(l.isUndefined(e.needsProtection)||!1===e.needsProtection)},_markAsProtected:function(e){e.needsProtection=!1},_isPromise:function(e){return!l.isUndefined(e)&&e.then&&c.isFunction(e.then)},waitForAllOrSomePromises:function(n){var r=c.Deferred();if(l.isUndefined(n)||null===n||0===n.length)return r.resolve(),r;for(var i=n.length,o=0,s=[],e=0;e<n.length;e+=1){var t=n[e];u._isPromise(t)?function(t){t.then(function(e){l.isUndefined(e)&&(e={}),t.responseModule=e,i-=1,e.isSuccess=!0,s.push(e),i<=0&&r.resolve.apply(r,s)},function(e){l.isUndefined(e)&&(e={}),i-=1,o+=1,e.isSuccess=!1,s.push(e),console.info(e),i<=0&&(o===n.length?r.reject.apply(r,s):r.resolve.apply(r,s))})}(t):console.warn("waitForAllOrSomePromises found an invalid promise: "+t)}return r},errorProtect:function(i,e,o){if(!l.isUndefined(e))for(var t=0;t<e.length;t+=1){var n=e[t];(function(e){var r=i[e];u._needsProtection(r)&&(i[e]=function(){var t=null;try{return t=r.apply(i,arguments)}catch(e){if(console.error(e),l.isUndefined(o)||o(e),l.isUndefined(t)||null===t){var n=c.Deferred();return n.reject(e),n.promise()}u._isPromise(t)&&t.reject(e)}},u._markAsProtected(i[e]))}).bind(i)(n)}},isFactoryMode:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(){return"undefined"!=typeof isFactoryMode&&!0===isFactoryMode}),isUiPreview:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(){return"undefined"!=typeof isUiPreview&&!0===isUiPreview}),getSharedResourceActionController:function(r,i,o){var s=this;return r.findCollection(u.SHARE_CONTAINER).then(function(e){if(e){var n=[];return e.sort(function(e,t){return(t.weight||0)-(e.weight||0)}),e.forEach(function(e){if(e.types&&-1!==e.types.indexOf(i)){var t=s._ClassFactory.instantiate(e.actionController).catch(function(e){throw r.getCoreSvc(".Logger").error(u.COLLECTION_MODULE_NOT_FOUND+i),e});n.push(t)}}),Promise.all(n).then(function(e){var t={glassContext:r,context:o};return l.find(e,function(e){return e&&(!e.isEnabled||"function"==typeof e.isEnabled&&e.isEnabled(t))})})}})},addCoachmark:function(r){return Promise.try(function(){if("showAll"===r.glassContext.getCoreSvc(".UserProfile").preferences.showHints){var n={title:r.title,contents:r.contents,glassContext:r.glassContext,placement:r.placement};if(0===r.$el.find(".coachMark").length)return r.glassContext.getCoreSvc(".CoachMarkService").getPersistence().isRead(r.id).then(function(e){r.$el.attr("id",r.id);var t=new(r.glassContext.getCoreSvc(".CoachMarkService").getRenderer())(n);t.render(r.$el,!e),r.showPopover&&!e&&t.$popover.trigger("primaryaction")})}})},getAppContent:function(e,t,n){try{var r=u._checkCoerceFeatureFlag(n);return u._getAppContent(e,t,r)}catch(e){return n?n.getCoreSvc(".Logger").error(e):console.error(e),{}}},_checkCoerceFeatureFlag:function(e){var t=e&&e.getCoreSvc(".FeatureChecker");return t&&t.checkValue("ba-glass","stringOnlyQS","disabled")},_getAppContent:function(e,t,n){var r,i=e&&this.deparam(e,n)||{},o=t&&c.deparam(t,n)||{},s=c.extend(!0,o,i);if(n)for(var a in s)0===a.indexOf("p_")&&(r=r||u._getAppContent(e,t,!1),s[a]=r[a]);return s},deparam:function(e,t){var n,r,i,o={},s={true:!0,false:!1,null:null},a=(e=e.replace(/\+/g," "))?e.split("&"):[];return l.map(a,function(e){n=e.split("="),i=decodeURIComponent(n[0]),r=2<n.length?n.slice(1).join("="):n[1],r=decodeURIComponent(r),t&&(r=r&&!isNaN(r)?+r:"undefined"===r?void 0:void 0!==s[r]?s[r]:r),void 0!==o[i]?o[i]=Array.isArray(o[i])?o[i].concat(r):[].concat(o[i],r):o[i]=r}),o},getQueryDataParameterMap:function(e){var t=l.unescape(c("#queryString_data").text());return u.getAppContent(t,c.param.fragment(),e)},getFilteredLoginParameters:function(e,t,n){var r=e.getAllowedUrlLoginParameters(),i=["CAMNamespace"],o={},s=[];return l.isString(r)&&l.each(r.split(","),function(e){i.push(e.trim())}),t&&l.each(t,function(e,t){l.isString(e)&&-1!==i.indexOf(t)&&null==o[t]&&(o[t]=e)}),n&&l.each(n,function(e,t){l.isString(n[t].value)&&null==o[n[t].name]&&(o[n[t].name]=n[t].value)}),l.each(o,function(e,t){s.push({name:t,value:e})}),s},getObjectProperty:function(e,t){if(e){return e.reduce(function(e,t){return e&&e[t]?e[t]:null},t)}return null},getCircularReplacer:function(){var n=new WeakSet;return function(e,t){if("object"===_typeof(t)&&null!==t){if(n.has(t))return;n.add(t)}return t}},encryptString:function(e,t){t=Number(String(Number(t)))===t?Number(t):13;var n=e.split("").map(function(e){return e.charCodeAt(0)}).map(function(e){return e^t});return String.fromCharCode.apply(void 0,n)},SSO_PARAMS:{m:"portal/main.xts",h_CAM_action:"logon"},SHARE_CONTAINER:"com.ibm.bi.glass.common.sharedResources",COLLECTION_MODULE_NOT_FOUND:"Unable to load collection item for shareable type: "};return u}),define("baglass/app/ContentView",["../core-client/js/core-client/ui/View","jquery","../utils/Utils"],function(e,t,n){var r=e.extend({init:function(e){t.extend(this,e),r.inherited("init",this,[e]),this.$el.addClass("pageView"),n.errorProtect(this,["render","getTitle","getContent"])},isDirty:function(){return!1},render:function(){return Promise.resolve(this)},getTitle:function(){if(this.module){var e=this.module.split("/");return e[e.length-1]}return this.glassContext.currentAppView.perspective},getContent:function(){return{}},setFocus:function(){var e=this.$el.find(":tabbable:first");0<e.length&&e.focus()}});return r}),define("baglass/api/Context",[],function(){"use strict";var e=function(e){e.getCoreSvc?this.logger=e.getCoreSvc(".Logger"):console.info("There is no logged part of this context. Logs generated in the console log.");try{this._openPerspective=e.appController.openAppView.bind(e.appController)}catch(e){this.logger?this.logger.error(e):console.error(e)}};return e.prototype.openPerspective=function(n,r){return new Promise(function(e,t){this._openPerspective(n,r).then(e,t)}.bind(this))},e}),define("baglass/api/ExtensionViewAdaptor",["../app/ContentView","jquery","underscore","../core-client/js/core-client/utils/ClassFactory","./Context"],function(e,n,r,i,t){var o=e.extend({init:function(e){this.content=e,this.glassContext=e.glassContext,this.displayInfo={},this.shallowContext=new t(this.glassContext),o.inherited("init",this,arguments)},createView:function(){var r=this;return new Promise(function(t,n){i.instantiate(r.type,{}).done(function(e){Object.assign(e,r.content),delete r.content,r.view=e,r.bindToView(e),t(e)}).fail(function(e){return n({msg:"Internal error: unable to create content View "+r.type,causedBy:e})})})},bindToView:function(e){e.login=this.login.bind(this),e.signin=this.signin.bind(this)},callViewOpen:function(e){var t=this;return this.view&&r.isFunction(this.view.open)?e.open(this.shallowContext,this.options).then(function(e){return t.$el.empty().append(n(e)),t.displayInfo=t._proxyMethod("getDisplayInfo")||{},t.show(),t}):Promise.reject({msg:"Internal error: content view open method not implemented for "+this.type})},doRender:function(){var t=this;return this.createView().then(function(e){return t.callViewOpen(e)})},render:function(){return this.doRender()},login:function(e){var t=n.Deferred();return this.signin(e).then(function(){t.resolve()}).catch(function(e){t.reject(t,e.jqXHR)}),t.promise()},signin:function(){},show:function(){this._proxyMethod("onShow")},deactivate:function(){this._proxyMethod("onHide")},getTitle:function(){return this.displayInfo.title||""},getIcon:function(){return this.displayInfo.icon||""},getContent:function(){return this._proxyMethod("getContent")||{}},remove:function(){this._proxyMethod("close")},_proxyMethod:function(e,t){if(this.view&&r.isFunction(this.view[e]))return this.view[e](t);this.glassContext.getCoreSvc(".Logger").warn("method not implemented",e)}});return o}),define("baglass/api/IFrameOpener",["../core-client/js/core-client/ui/core/Class","jquery","underscore"],function(e,o,s){"use strict";var t=e.extend({init:function(e){t.inherited("init",this,arguments),o.extend(this,e)},onSelectItem:function(e){this.onPress(e)},onPress:function(n){return new Promise(function(e,t){try{n.glassContext.openAppView("generic_iframe",this._buildPayload(n)).then(e,t)}catch(e){n.glassContext.getCoreSvc(".Logger").error(e),t(e)}}.bind(this))},_buildPayload:function(e){var t=this._getOptions(e);return{content:{id:t.id,url:t.url,title:t.title}}},_getOptions:function(e){var t={};if(this._isValidContext(e)){var n=e.target.plugin.itemSpec;if(!0===this._isItMenuItem(e)){var r=e.target.specItemIndex,i=n.items[r];(t=s.pick(i.options,"url","title")).id=this._getID(i)}else!0===this._isItButton(e)&&((t=s.pick(n.options,"url","title")).id=this._getID(n));return s.isUndefined(t.url)&&o.extend(t,this.getOptionsFromid(e,t.id)),t}},_isValidContext:function(e){return e&&e.target&&e.target.plugin&&e.target.plugin.itemSpec},_getID:function(e){return e.id?btoa(e.id+e.options.url):btoa(e.options.url)},getOptionsFromid:function(e,t){try{return e.glassContext.findElement(t).options}catch(e){return{}}},_isItMenuItem:function(e){return void 0!==e.target.specItemIndex&&0<e.target.plugin.itemSpec.items.length&&void 0!==e.target.plugin.itemSpec.items[e.target.specItemIndex].options},_isItButton:function(e){return void 0!==e.target.plugin.itemSpec.options}});return t}),define("baglass/api/View",[],function(){"use strict";return function(){this.open=function(){},this.close=function(){},this.onShow=function(){},this.onHide=function(){},this.getDisplayInfo=function(){}}}),define("baglass/api/all",["./ActionInterface","./ExtensionViewAdaptor","./IFrameOpener","./View"],function(){}),define("baglass/nls/BAGlassResources",{root:!0,cs:!0,da:!0,de:!0,es:!0,fi:!0,fr:!0,hr:!0,hu:!0,it:!0,ja:!0,kk:!0,ko:!0,no:!0,nb:!0,nl:!0,pl:!0,pt:!0,"pt-br":!0,ro:!0,ru:!0,sl:!0,sv:!0,th:!0,tr:!0,zh:!0,"zh-cn":!0,"zh-tw":!0}),define("baglass/nls/root/BAGlassResources",{signInButtonText:"Sign in",userPlaceholder:"Username",passPlaceholder:"Password",nsPlaceholder:"Namespace",anonymousLoginFail:"Failed to open session as Anonymous",retrieveInstallInfoErrorTitle:"Installation Information Error",retrieveInstallInfoErrorMsg:"A failure occurred while retrieving the installation environment. Some features may not be available. The root cause is the following: %{reason}",selectNamespace:"Select Namespace",connectAnonymously:"Connect anonymously",CAInitTitle:"CA Initialization Information",CALoginAuthError:"CA Login Authentication Error",unableSetSSOURL:"unable to set up SSO URL",unableGetInstallInfo:"Unable to get CA install information",loginInfoTitle:"CA Login Information",loginInProgress:"Logging in",loginSuccess:"Login Successful",unableLogin:"Cannot login",invalidLogin:"The provided credentials are invalid. Please type your credentials for authentication.",unableGetAccountInfo:"Cannot get user's account information!",accountInfoTitle:"Account Information Error",credentialSubmitError:"Error submitting login credentials",invalidLoginResponse:"Invalid login response",CAMPromptInfoMissing:"Error retrieving CAM PromptInfo Response",CAMMessagesMissing:"Error retrieving CAM Messages Response",changePassword:"Change Password",newPasswordsDoNotMatch:"The new passwords you entered do not match. Please retype the new password in both text boxes.",loginLegalText:"Licensed Materials - Property of IBM Corp. © Copyright IBM Corporation and other(s) 2005, %{fullYear}. IBM, the IBM logo, ibm.com and Cognos are trademarks or registered trademarks of International Business Machines Corp., registered in many jurisdictions worldwide.",legalText:'Licensed Materials - Property of IBM Corp. © Copyright IBM Corporation and other(s) 2005, %{fullYear}. IBM, the IBM logo, ibm.com and Cognos are trademarks or registered trademarks of International Business Machines Corp., registered in many jurisdictions worldwide. A current list of IBM trademarks is available on the Web at www.ibm.com/legal/copytrade.shtml. This Program is licensed under the terms of the license agreement accompanying the Program. This license agreement may be either located in a Program directory folder or library identified as "License" or "Non_IBM_License", if applicable, or provided as a printed license agreement. Please read the agreement carefully before using the Program. By using the Program you agree to these terms.',CAMNamespaceDisplayName:"Sign in with your %{promptValue} ID",customLoginPerspectiveNotFound:"The custom sign-in view could not be found",defaultToIBMLoginPage:"The custom sign-in view is not available. The default sign-in view is displayed instead.",errorRetrievePerspectiveURL:"Error retrieving perspective: %{url}",CAMUserNameForDisplay:"User ID: %{promptValue}",genericPrompt:"%{promptName} %{promptValue}",errLoadingView:"Unable to load requested view.",errLoadingViewShowHome:"Unable to load requested view. Displaying home view instead.",productName:"IBM Cognos Analytics %{version}",version:"Version",myPreferences:"My preferences",skin:"Style",showHiddenObjects:"Show hidden entries",format:"Report format",accessibilityFeatures:"Turn on accessibility features",displayMode:"Default view",productLocale:"Product language",contentLocale:"Content language",biDirectionalFeaturesEnabled:"Bidirectional language support",baseTextDirection:"Base direction for text",portal:"Portal",regionalOptions:"Options for your region",timeZoneID:"Time zone",email:"Email",homePage:"Home page",defaultHome:"Default",resetHome:"Reset to default",homeSet:"Your home was set successfully",homeSetError:"An error occurred setting the default home page, try closing and reopening this view.",resetHomeSuccess:"You have successfully reset your home to default.",shareSetError:"This action cannot be performed before closing and reopening this view.",general:"General",personal:"Personal",nameSpace:"Namespace",userName:"User name",password:"Password",confirmPassword:"Confirm password",passwordChange:"Change your password",changePasswordTitle:"Change my password",showPassword:"Show password",oldPassword:"Old password",newPassword:"New password",confirmNewPassword:"Confirm new password",passwordMatch:"Password match",passwordNotMatch:"Oops, password does not match",wrongPassword:"Unable to authenticate",updatePWUnknownError:"Unable to update password",passWordChangeSuccess:"You have successfully changed your password",advanced:"Advanced",credentials:"Credentials",credentialCreate:"Create",credentialCreateSuccess:"You have successfully created your credentials",credentialChange:"Renew",credentialRenewed:"Your credentials were renewed with your current user ID and password.",myCredentials:"My credentials",myCapabilities:"My capabilities",viewDetails:"View details",manage:"Manage",dataSourceCredentials:"Data server credentials",groupsAndRoles:"Groups and roles",welcome:"Welcome",welcomeMsg:"Welcome to %{brandName}",samples:"Sample content to explore",sampleName1:"Call Activity and Win Plans",sampleName2:"Product Line Dashboard",welcomeGetStarted:"Get started with a tour of the new interface and see what is new and exciting",submit:"Submit",companionApps:"Companion applications",analysisStudio:"Analysis Studio",dashboardConsole:"Workspace",drillThrough:"Drill-Through definitions",eventStudio:"Event Studio",queryStudio:"Query Studio",metricsManager:"Metrics Manager",powerplayStudio:"PowerPlay Studio",controller:"Controller",contributor:"Contributor",metricStudio:"Studio",metricsFileImportTask:"New Import from Files",metricsMaintenanceTask:"New Maintenance",metricsExportTask:"New Export",metricsPackage:"New Package",ok:"OK",html:"HTML",pdf:"PDF",spreadsheetML:"Excel",xlsxData:"Excel Data",csv:"CSV",cancel:"Cancel",rtl:"Right-to-left",ltr:"Left-to-right",contextual:"Contextual",showAll:"Show all",showUnread:"Show unread",hideAll:"Hide all",showHints:"Show hints",defaultCompleteMessage:"Operation completed.",defaultProgressMessage:"Operation in progress...",defaultFailMessage:"Operation failed.",defaultIndefiniteMessage:"Operation in progress...",defaultPauseMessage:"Operation paused.",progressHideBtn:"Hide",coachMarkLabel:"Learn more about - %{title}",coachMarkTurnOffHints:"Turn off hints",coachMarkClose:"Close",secondaryWelcomeMsg:"Get started by opening a report, dashboard, or story!",invalidHomePageTitle:"The home page cannot be retrieved. Click OK to reset the home page to the Welcome page.",unsavedViewsMsg:"You have work that has not been saved:",unsavedViewMsg1:"Close the view?",unsavedViewMsg2:"You have unsaved changes that will be lost if you don’t save them first.",unsavedViewMsg3:"Close without saving",errorLabel:"Error",unknownError:"An unknown error occurred trying to view the requested resource.",notFound:"The requested resource cannot be retrieved. It might have been deleted or renamed.",noCapability:"You do not have the capability to view the requested resource.",noPermission:"You do not have sufficient privileges to view the requested resource.",knowledgeCenterErrorTitle:"The link to Knowledge Center didn't work",knowledgeCenterErrorMessage:"Try again. If the problem persists, contact your administrator.",communityErrorTitle:"The link to the community didn't work",communityErrorMessage:"Try again. If the problem persists, contact your administrator.",close:"Close",info:"Info",warning:"Warning",error:"Error",success:"Success",defaultSlideoutLabel:"Slideout",legacyAppsSlideoutLabel:"Available Legacy Applications",myPreferencesSlideoutLabel:"My Preferences",pinSlideout:"Pin Slideout",unpinSlideout:"Unpin Slideout",paginationControl:"Open Collapsed Slideout(s)",openPerspectiveFailed:"Failed to open %{name}",untitled:"Untitled",invalidPerspectiveErrorTitle:"Invalid perspective name",invalidPerspectiveErrorMessage:"Perspective name cannot contain '/' or '.'",perspective404ErrorTitle:"Perspective not available",perspective404ErrorMessage:"The perspective name at the end of the URL is not available. Please try again, using a valid perspective name.",perspective404HomeErrorMessage:"The home perspective name at the end of the URL is not available. Please check if a valid extension exists and try again.",log_level_Error:"Error",log_level_Warn:"Warning",log_level_Info:"Information",log_level_Debug:"Debug",logging_level:"Logging level:",logging_active:"Logging is on:",logging_config_description:"Logging is used for troubleshooting. Consult your administrator for guidance on settings.",logging_congfig_title:"Logging",manageLogging:"Logging",loggingConfigurationSlideoutA11yLabel:"Logging Configuration",validationControl:"Show validation information",previewDialogTitle:"Preview",error404NotFound:"The asset that you want to open is not available. You might not have the required permissions to access it, or it might be deleted or disabled.",website:"Website",unavailable:"Unavailable",offlineErrorTitle:"Trying to reconnect",offlineErrorMessage:"There seems to be a network problem. Please wait while we try to reconnect or check your network connection and try again",refreshButton:"Refresh",shareDialogTitle:"Share",shareDialogCodeLabel:"Share URL",shareDialogText:"Copy this link to share this content with other users.",embedDialogTitle:"Embed",embedDialogCodeLabel:"Embed code",embedDialogText:"Copy this code to embed.",embedURLWidthLabel:"Width:",embedURLHeightLabel:"Height:",embedURLWidth:"Width",embedURLHeight:"Height",copyText:"Copy",bypassBlockButtonTitle:"Skip to content",cannotOpenLocation:"Invalid URL detected",invalidUrl:"A request to navigate the browser to a new location has been denied. Reload Application?"}),define("baglass/core-client/js/core-client/utils/Lexicon",["../ui/core/Class","jquery","polyglot"],function(e,t,n){var r=e.extend({init:function(e){t.extend(!0,this,e),this._polyglot=new n({phrases:this.data})},translate:function(e,t){var n=this._polyglot.t(e,t);return this.verbose&&n===e&&(n=r.NOT_TRANSLATED+"("+e+")"),n}});return r.NOT_TRANSLATED="__NOT_TRANSLATED__",r}),function(e,t){"function"==typeof define&&define.amd?define("baglass/nls/StringResources",["i18n!./BAGlassResources","../core-client/js/core-client/utils/Lexicon"],t):"object"===("undefined"==typeof exports?"undefined":_typeof(exports))?module.exports=t(require("i18n!./BAGlassResources"),require("../core-client/js/core-client/utils/Lexicon")):e.Requester=t(e.BAGlassResources,e.Lexicon)}(void 0,function(e,r){var i=new r({data:e,allowMissing:!0,verbose:!1});return{get:function(e,t){var n=i.translate(e,t);return n!==e?n:"".concat(r.NOT_TRANSLATED,"(").concat(e,")")}}}),define("baglass/core-client/js/core-client/errors/BaseError",["../ui/core/Class","underscore"],function(e,n){return e.extend({init:function(e,t,n){var r=Error.apply(this,arguments);this.name="BaseError",this.message=e||"Error",this._isValidCause(t)?(this.causedBy=t,this._setAdditionalInfo(n)):this._setAdditionalInfo(t),r.stack&&(this.stack=r.stack)},toString:function(){var t=this.name+": "+this.message;return n.each(n.keys(this).sort(),function(e){"name"!==e&&"causedBy"!==e&&"message"!==e&&"stack"!==e&&(t+="\n"+e+": "+this[e])}.bind(this)),this.causedBy&&(t+="\nCaused by: "+this.causedBy),t},_isValidCause:function(e){return e instanceof Error||n.isString(e)||n.isObject(e)&&e.message},_setAdditionalInfo:function(e){n.isObject(e)&&n.extend(this,e)}})}),define("baglass/api/Url",["jquery","underscore","../utils/Utils","jquery-bbq"],function(c,l,a){var i=function(){};return c.extend(i.prototype,{URL_EMBED_API:[{key:"closeWindowOnLastView",values:[!0],getValue:function(e,t,n){return!0===n||t},preserveInUrl:!0},{key:"ui_appbar",values:[!1],getValue:function(e,t,n){return!0!==n&&t},preserveInUrl:!0},{key:"ui_navbar",values:[!1],getValue:function(e,t,n){return!0!==n&&t},preserveInUrl:!0},{key:"shareMode",values:["embedded"],getValue:function(e,t,n){return!0===n?"embedded":void 0}},{key:"productLocale",preserveInUrl:!0}],URL_API:[{key:"perspective"},{key:"pathRef"},{key:"factoryMode",values:[!0],getValue:function(e,t){return void 0===t?a.isFactoryMode():t}},{key:"id"},{key:"nextgen3p"},{key:"prefetchsvc"},{key:"appcue"}],ENDPOINT_PATHS:{objRef:"v1/objects",pathRef:"v1/path",searchPathRef:"v1/search_path"},_getUrlPath:function(){return location.origin+location.pathname.split(/[?#]/)[0]},_completeURIEncoding:function(e){return e.replace(/[!'()*~]/g,function(e){var t="";switch(e){case"!":t="%21";break;case"'":t="%27";break;case"(":t="%28";break;case")":t="%29";break;case"*":t="%2A";break;case"~":t="%7E";break;default:t=e}return t})},getUrl:function(e,t){l.isUndefined(t)&&console.warn("The Glass Context is not being passed to the getUrl method. In the current usage of getUrl, the Glass Context should be passed as an argument --\x3e getUrl(context, glassContext)");var n=this.getMap(e),r=t&&t.getCoreSvc(".URLEncoder");if(r)for(var i in n)n[i]=r.encodeQSValue(n[i]);var o=this._getUrlPath(),s=c.param.querystring(o,n),a=s.replace(/^([^\?]+)(\?.+)$/,"$2");return 0===a.indexOf("?")&&(s=o+this._completeURIEncoding(a)),s},getPublicMap:function(i){var o={},s=(i=i||{}).urlMap||{};return c.each(this.URL_API,function(e,t){var n=s[t.key];if(l.isFunction(n))throw new Error("Value cannot be a function: "+t.key);if(t.required&&!n)throw new Error("Missing required attribute: "+t.key);var r=l.isFunction(t.getValue)?t.getValue(t.key,n,i.isEmbed):void 0;n=l.isUndefined(r)?n:r,!l.isUndefined(n)&&(t.preserveInUrl||!t.values||0<=t.values.indexOf(n))&&(o[t.key]=n)}.bind(this)),o},getMap:function(e){e=e||{};var t=this.getPublicMap(e),n=l.pluck(i.prototype.URL_API,"key"),r=l.omit(e.urlMap,n);return c.each(r,function(e,t){if(l.isFunction(t))throw new Error("Value cannot be a function: "+e)}),c.extend(t,r)},isAppBarVisible:function(e){return!e||!1!==e.ui_appbar},getPathRefInfo:function(e,t,n,r){return this._getObjInfo(e,this.ENDPOINT_PATHS.pathRef+"?path="+encodeURIComponent(t)+"&",n,r)},getObjRefInfo:function(e,t,n){return this._getObjInfo(e,this.ENDPOINT_PATHS.objRef+"/"+encodeURIComponent(t)+"?",n)},_getObjInfo:function(t,e,n,r){var i=this;n||(n=["type"]);var o=e+"fields="+n.concat(["id","path"]).join(",");return this._getAjaxSvc(t).ajax({url:o,type:"GET",dataType:"json"}).then(function(e){return i._getFormattedObjInfo(e,n)}).catch(function(e){if(r)return i._getObjInfoBySearchPath(t,r,n);throw e})},_getObjInfoBySearchPath:function(e,t,n){var r=this,i=this.ENDPOINT_PATHS.searchPathRef+"?searchPath="+encodeURIComponent(t)+"&fields="+n.concat(["id","path"]).join(",");return this._getAjaxSvc(e).ajax({url:i,type:"GET",dataType:"json"}).then(function(e){return r._getFormattedObjInfo(e,n)}).catch(function(e){throw e})},_getFormattedObjInfo:function(e,t){var n=a.getObjectProperty(["data","data",0],e),r=null,i=a.getObjectProperty(["_meta","links","path","url"],n);if(i){var o=i.indexOf("=");r=decodeURIComponent(i.substring(o+1))}var s={pathRef:r,objRef:n.id?n.id:null};return l.extend(s,l.pick(n,t)),s},_getAjaxSvc:function(e){return e&&e.getCoreSvc?e.getCoreSvc(".Ajax"):(console.warn('API Change: ba-glass-client/api/Url now expects "glassContext" instead of "services.ajax" in public API calls. Please update your code!'),window.__glassAppController.glassContext.getCoreSvc(".Ajax"))},_isValueAcceptableAPIValue:function(e,t){return("true"===t||"false"===t)&&(t=JSON.parse(t)),e.values.includes(t)},getObjInfoFromContent:function(e,t,n){return Promise.try(function(){if(t&&t.pathRef)return this.getPathRefInfo(e,t.pathRef,n);if(t&&t.objRef)return this.getObjRefInfo(e,t.objRef,n);throw new Error("Missing pathRef and objRef")}.bind(this))},getContextFromUrlMap:function(e){if(e)return{perspective:e.perspective,content:e}},getUrlMap:function(t,n,r){return Promise.resolve().then(function(){if(t&&l.isFunction(t.execute)){var e=r&&r.glassContext&&r.glassContext.currentAppView;return e&&e.context&&e.context.isDefaultAction&&(r.isDefaultAction=e.context.isDefaultAction),Promise.resolve(t.execute(r)).then(function(t){return r&&r.urlMap&&r.urlMap.pathRef?t:this.getPathRef(n,t.objRef).then(function(e){return r&&"defaultAction"!==r.mode&&delete t.objRef,t.pathRef=e,t}.bind(this))}.bind(this))}}.bind(this))},getPathRef:function(e,t,n){return t?this.getPathRefInfo(e,t,null,n).then(function(e){return e.pathRef}):Promise.resolve()},updateContextWithCurrentUIFilters:function(t,n){var r=this;return t&&this.URL_EMBED_API.forEach(function(e){e.preserveInUrl&&!0===e.preserveInUrl&&t.hasOwnProperty(e.key)&&r._isValueAcceptableAPIValue(e,t[e.key])&&(n.content[e.key]=t[e.key])}),n}}),i.prototype.URL_UI_API=i.prototype.URL_EMBED_API,i.prototype.URL_API=l.union(i.prototype.URL_API,i.prototype.URL_UI_API),i.MODES={DYNAMIC:"dynamic",CURRENT:"current",DEFAULT_ACTION:"defaultAction"},i}),define("baglass/core-client/js/core-client/ui/KeyCodes",[],function(){return{NUM0:48,NUM1:49,NUM2:50,NUM3:51,NUM4:52,NUM5:53,NUM6:54,NUM7:55,NUM8:56,NUM9:57,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,NUMPAD0:96,NUMPAD1:97,NUMPAD2:98,NUMPAD3:99,NUMPAD4:100,NUMPAD5:101,NUMPAD6:102,NUMPAD7:103,NUMPAD8:104,NUMPAD9:105,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSEBREAK:19,CAPSLOCK:20,ESCAPE:27,SPACE:32,PAGEUP:33,PAGEDOWN:34,END:35,HOME:36,LEFT_ARROW:37,UP_ARROW:38,RIGHT_ARROW:39,DOWN_ARROW:40,INSERT:45,DELETE:46,SECOND:50,LEFT_WINDOW_KEY:91,RIGHT_WINDOW_KEY:92,SELECT_KEY:93,MULTIPLY:106,ADD:107,SUBTRACT:109,DECIMAL_POINT:110,DIVIDE:111,NUM_LOCK:144,SCROLL_LOCK:145,SEMI_COLON:186,EQUAL:187,COMMA:188,DASH:189,PERIOD:190,FORWARDSLASH:191,GRAVE_ACCENT:192,OPEN_BRACKET:219,BACKSLASH:220,CLOSE_BRACKET:221,SINGLE_QUOTE:222}}),define("text!baglass/core-client/js/core-client/ui/template/LoadingWaitAnimation1.html",[],function(){return'<div class="wait_loading_animation" role="presentation">\n\t<div id="wait_loader_div1" role="presentation"></div>\n\t<div id="wait_loader_div2" role="presentation"></div>\n\t<div id="wait_loader_div3" role="presentation"></div>\n\t<div id="wait_loader_div4" role="presentation"></div>\n\t<div id="wait_loader_div5" role="presentation"></div>\n\t<div id="wait_loader_div6" role="presentation"></div>\n\t<div id="wait_loader_div7" role="presentation"></div>\n\t<div id="wait_loader_div8" role="presentation"></div>\n</div>\n'}),define("text!baglass/core-client/js/core-client/ui/template/LoadingWaitAnimation2.html",[],function(){return'<div class="wait_loading_bar" role="presentation">\n</div>'}),define("text!baglass/core-client/js/core-client/ui/template/MediumSpinner.html",[],function(){return'<div class="mediumSpinner" role="presentation">\n</div>\n'}),define("text!baglass/core-client/js/core-client/utils/templates/webfont.html",[],function(){return'<span role="img" class="webfont {{!it.icon}}" {{? it.tooltip}}title="{{!it.tooltip}}"{{?}} {{? it.label}}aria-label="{{!it.label}}"{{?}} {{? it.color}}style="color:{{!it.color}}"{{?}}></span>'}),define("text!baglass/core-client/js/core-client/utils/templates/image.html",[],function(){return'<img src="{{!it.icon}}" {{? it.tooltip}}title="{{!it.tooltip}}"{{?}} {{? it.label}}alt="{{!it.label}}"{{?}}></img>'}),define("text!baglass/core-client/js/core-client/utils/templates/svg.html",[],function(){return'<svg class="svgIcon" role="img" {{? it.label}}aria-label="{{!it.label}}"{{?}} focusable=false>\n\t{{? it.tooltip}}\n\t\t<title>\n\t\t\t{{!it.tooltip}}\n\t\t</title>\n\t{{?}}\n\t<use style="pointer-events: none; {{? it.fill}}fill:{{!it.fill}} {{?}}" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#{{!it.icon}}">\n\t</use>\n</svg>\n'}),define("baglass/core-client/js/core-client/utils/BrowserUtils",[],function(){return{isBrowser:{ie:function(){return this.isIE()},ieEdge:function(){return this.isIEEdge()},ie11:function(){return this.isIE11()},ff:function(){return this.isFirefox()},chrome:function(){return this.isChrome()},safari:function(){return this.isSafari()},iPad:function(){return this.isIPad()}},isIE:function(){return/\b(MSIE|Trident|Edge)\b/.test(this._getUserAgent())},isIE11:function(){return/Trident\/7\./.test(this._getUserAgent())},isIEEdge:function(){return/Edge/.test(this._getUserAgent())},isFirefox:function(){return/.*Firefox.*/i.test(this._getUserAgent())},isChrome:function(){return/chrome/i.test(this._getUserAgent())&&!this.isIE()},isSafari:function(){return/^((?!chrome|android|crios|fxios).)*safari/i.test(this._getUserAgent())&&!this.isChrome()&&!this.isIE()&&!this.isIPad()},isIPad:function(){return/iPad/i.test(this._getUserAgent())},_getUserAgent:function(){return navigator.userAgent}}}),define("baglass/core-client/js/core-client/utils/LegacyUtils",["jquery","underscore","./BrowserUtils"],function(t,o,s){return{legacyLaunch:function(e,t,n){this._openLegacyWindow(this._getLaunchParms(e,t,n))},getLegacyLaunchUrl:function(e,t,n,r){return this._getUrl(this._getLaunchParms(e,t,n,r))},_getLaunchParms:function(e,t,n,r){var i=this.legacyApps[t]||t;return o.isUndefined(i)||o.isUndefined(i.launchParams)?{b_action:"xts.run",m:"portal/launch.xts","ui.gateway":e.gateway+"/v1/disp","ui.tool":t,"ui.object":n,"ui.action":r||"new","launch.launchinWindow":"true",backURL:"disp?b_action=xts.run&m=portal/close.xts"}:i.launchParams},canUseLegacyTool:function(e,t){var n=this.legacyApps[t]||t;if(!o.isUndefined(n)&&e.hasCapability(n.capability)){var r=n.browsers;if(o.isUndefined(r))return!0;for(var i=0;i<r.length;i++){if(s.isBrowser[r[i]].call(s))return!0}}return!1},legacyApps:{DashboardConsole:{icon:"common-workspace",capability:"canUseDashboardViewer",browsers:["ie","ff","chrome","safari"]},QueryStudio:{icon:"common-query",capability:"canUseQueryStudio",browsers:["ie","ff"]},AnalysisStudio:{icon:"common-analysis_studio",capability:"canUseAnalysisStudio",browsers:["ie","ff"]},DrillThrough:{icon:"common-drill_through_definition",capability:"canUseDrillThroughAssistant",launchParams:{b_action:"xts.run",m:"portal/cc_drillthrough.xts"}},EventStudio:{icon:"common-agent",capability:"canUseEventStudio",browsers:["ie","ff","chrome"]},Subscriptions:{capability:"DO_NOT_SHOW_IN_COMPANION_APPS",launchParams:{b_action:"xts.run",m:"portal/subscriptions/subscriptions.xts"}},MetricsManager:{icon:"common-metrics",capability:"canUseMetricStudio",apps:{MetricStudio:{icon:"common-metrics",capability:"canUseMetricStudio",handler:function(e){this._launchLegacyWindow(e)},browsers:["ie","ff"]},metricsFileImportTask:{icon:"common-metricsImport",capability:"canUseMetricsManagerAdministration"},metricsMaintenanceTask:{icon:"common-metricsMaintenance",capability:"canUseMetricsManagerAdministration"},metricsExportTask:{icon:"common-metricsExport",capability:"canUseMetricsManagerAdministration"},metricsPackage:{icon:"common-metricsNewPackage",capability:"canUseMetricsManagerAdministration",handler:function(){this._openLegacyWindow({b_action:"mms.run",pid:"new_mpwizard_start"})}}},handler:function(e){var t={b_action:"xts.run",m:"portal/newMetricsTasks/processNewTasks.xts","so.select":"newmetricstaskspackage","so.return.m":"portal/new_general.xts",m_new_class:e.type};this._openLegacyWindow(t)}},PowerplayStudio:{icon:"common-powerPlayCube",capability:"canUsePowerPlay",browsers:["ie","ff","chrome","safari"]},Controller:{icon:"common-controller",capability:"canUseControllerStudio",browsers:["ie"]},Contributor:{icon:"common-planning",capability:"canUsePlanningContributor"}},_openLegacyWindow:function(e){this._openWindow(this._getUrl(e))},_openWindow:function(e){window.open(e)},_launchLegacyWindow:function(e){this.legacyLaunch(e.glassContext,e.type)},_getUrl:function(e){return"v1/disp?"+t.param(e,!0)}}}),define("baglass/core-client/js/core-client/nls/CommonsResources",{root:!0,cs:!0,da:!0,de:!0,es:!0,fi:!0,fr:!0,hr:!0,hu:!0,it:!0,ja:!0,kk:!0,ko:!0,no:!0,nb:!0,nl:!0,pl:!0,pt:!0,"pt-br":!0,ro:!0,ru:!0,sl:!0,sv:!0,th:!0,tr:!0,zh:!0,"zh-cn":!0,"zh-tw":!0}),define("baglass/core-client/js/core-client/nls/root/CommonsResources",{save:"Save",saveAs:"Save as",saveAsLabel:"Save as:",teamFolders:"Team Folders",open:"Open",openDialogTitle:"Open file",openDialogFooter:"Open and cancel button",saveDialogTitle:"Save as",saveDialogFooter:"Save and cancel button",shareDialogTitle:"Share",shareDialogCodeLabel:"Share URL",shareDialogText:"Copy this link to share this content with other users.",embedDialogTitle:"Embed",embedDialogCodeLabel:"Embed code",embedDialogText:"Copy this code to embed.",embedURLWidthLabel:"Width:",embedURLHeightLabel:"Height:",embedURLWidth:"Width",embedURLHeight:"Height",filesToOpen:"Files to open:",remove:"Remove",loading:"Loading",ok:"OK",cancel:"Cancel",close:"Close",datasetLoading:"Your data set %{name} is loading...",datasetFinishedLoading:"Your data set %{name} loaded successfully.",datasetLoadingFailed:"Your data set %{name} did not load.",datasetLoadingCancelled:"The loading of your data set %{name} was cancelled.",datasetRefreshing:"Your data set %{name} is refreshing...",datasetFinishedRefreshing:"Your data set %{name} refreshed successfully.",datasetRefreshFailed:"Your data set %{name} did not refresh.",datasetRefreshCancelled:"The refreshing of your data set %{name} was cancelled.",userID:"User ID",password:"Password",signOnMessage:"Please provide your credentials to use this data",rememberCre:"Remember my credentials",signOnDialogFooter:"Submit and cancel button",signOnTitle:"Credentials required: %{dataSource}",errMessage:"The credentials are missing or invalid.\n Please type your credentials for authentication.",submit:"Submit",datepicker_input_describedby:"Type a date in the format YYYY dash MM dash DD.",schedule_datepicker_label:"Date",schedule_datepicker_description:"Date Picker",time_picker_label:"Time",bs_timepicker_container:"Time picker widget",bs_timepicker_input_description:"Time picker",bs_timepicker_input_describedby:"Type a time in the format HH colon MM AM or PM.",bs_timepicker_hour_text:"Hour",bs_timepicker_minute_text:"Minute",bs_timepicker_meridian_text:"Meridian",bs_timepicker_increment_hour:"Increment hour",bs_timepicker_decrement_hour:"Decrement hour",bs_timepicker_increment_minute:"Increment minute",bs_timepicker_decrememt_minute:"Decrement minute",bs_timepicker_toggle_meridian:"Toggle meridian",unknown:"Unknown",EllapsedTimeDays:"%{days}d %{hours}h %{minutes}m %{seconds}s",EllapsedTimeHours:"%{hours}h %{minutes}m %{seconds}s",EllapsedTimeMinutes:"%{minutes}m %{seconds}s",EllapsedTimeSeconds:"%{seconds}s",confirmRefreshUpload:"Confirm replacement of existing data",msgConfirmRefreshUpload:"The file '%{fileName}' already exists. Do you want to replace its data with the data contained in the selected file?",promptDialogTitle:"Prompt",promptControlTitle:"Specify the prompt values for %{paramLabel}",copyText:"Copy",copySuccess:"Copied to Clipboard successfully",copyFail:"Copy to Clipboard failed",clear:"Clear",invert:"Invert",numSelected:"%{number} of %{total} selected",search_box_default_text:"Find",title:"Title",back:"Back",edit:"Edit",invalidInput:"Invalid input",owner:"Owner",createdWithColon:"Created:",modifiedWithColon:"Modified:",typeWithColon:"Type:",dataRefWithColon:"Data refreshed:",defaultSlideoutLabel:"Slideout",invalidNumber:"The value entered is not a number. Type a number.",exceedMaxLength:"The text is too long. Shorten to %{maxLength} characters.",invalidEmailMessage:"Email address is not valid.",numberOutOfRange:"The value entered must be a number between %{min} and %{max}",numberTooSmall:"The value entered must be a number greater than %{min}",numberTooBig:"The value entered must be a number less than %{max}",defaultCompleteMessage:"Operation completed.",defaultProgressMessage:"Operation in progress...",defaultFailMessage:"Operation failed.",defaultIndefiniteMessage:"Operation in progress...",defaultPauseMessage:"Operation paused.",progressHideBtn:"Hide",paginationControl:"Open Collapsed Slideout(s)",confirmCancelMessage:"Do you want to discard your changes?",confirmCancel:"Confirm cancel",pinSlideout:"pin",unpinSlideout:"Unpin",details:"Details",edit_palette:"Edit",duplicate_palette:"Duplicate",reverse_palette:"Reverse",delete_palette:"Delete ",palette_copy:"%{paletteName} copy",showMoreColors:"More",showLessColors:"Less",addCustomColor:"Select custom color",createPalette:"Create a custom palette",moreActionsForPalette:"More actions for %{paletteName}",showMoreColorPalette:"More"}),define("baglass/core-client/js/core-client/nls/StringResources",["i18n!./CommonsResources","../utils/Lexicon"],function(e,r){var i=new r({data:e,allowMissing:!0,verbose:!1});return{get:function(e,t){var n=i.translate(e,t);return n!==e?n:r.NOT_TRANSLATED+"("+e+")"}}}),define("baglass/core-client/js/core-client/utils/Utils",["jquery","underscore","doT","text!../ui/template/LoadingWaitAnimation1.html","text!../ui/template/LoadingWaitAnimation2.html","text!../ui/template/MediumSpinner.html","text!./templates/webfont.html","text!./templates/image.html","text!./templates/svg.html","./LegacyUtils","../nls/StringResources","./BrowserUtils"],function(u,d,p,i,o,r,f,h,g,s,a,n){var c={WFG:"wfg",WFT:"wft",WFBI:"wfbi"},l={PNG:".png",JPEG:".jpeg",JPG:".jpg",GIF:".gif",SVG:".svg"};return{ALERT_ID:"com-ibm-ca-alert",setAttr:function(e,t,n){n&&e.attr(t,n)},addClass:function(e,t){t&&e.addClass(t)},_embed:function(l){u("use",l).each(function(e,t){var n=t.getAttribute("xlink:href")||t.getAttribute("href"),r=u(n)[0];if(r){var i=u("title",t)[0],o=!l.getAttribute("viewBox")&&r.getAttribute("viewBox"),s=document.createElementNS("http://www.w3.org/2000/svg","svg");u.each(t.attributes,function(e,t){s.setAttribute(t.name,t.value)}),o&&s.setAttribute("viewBox",o);for(var a=r.cloneNode(!0);a.firstChild;)"title"===a.firstChild.tagName?a.removeChild(a.firstChild):s.appendChild(a.firstChild);var c=t.parentNode;c.appendChild(s),i&&c.appendChild(i),c.removeChild(t)}})},embedSVGIcon:function(e){if(!n.isIE())return e;var t=u("svg",e);return t.length||(t=u(e).filter("svg")),t.length&&t.each(function(e,t){this._embed(t)}.bind(this)),e},setIcon:function(e,t,n,r,i,o){if(t){d.isBoolean(i)||(i=!1);var s=r||n,a=!1,c=(this._isWebFont(t)?p.template(f):this._isImageIcon(t)?p.template(h):(a=!0,p.template(g)))({icon:t,tooltip:n,label:s,color:o,fill:o}),l=u(c);a&&this.embedSVGIcon(l),i?e.append(l):e.prepend(l)}},getLoadingAnimation:function(e){var t,n,r={loadingBarLabel:a.get("loading")};return 1===e?n=p.template(i):(n=p.template(o),this.activateAriaAlert(r.loadingBarLabel)),(t=u(n(r))).attr("aria-label",a.get("loading")),t[0]},getSpinner:function(){var e={loadingBarLabel:a.get("loading")},t=p.template(r),n=u(t(e));return n.attr("aria-label",a.get("loading")),n[0]},activateAriaAlert:function(e){if(e&&e.length){var t=u("#"+this.ALERT_ID);t.length&&t.remove(),(t=u("<div>",{id:this.ALERT_ID,style:"position:absolute; top:-9000px;",role:"alert","aria-live":"assertive"})).text(e),u("body").append(t),setTimeout(function(){t.remove()}.bind(this),100)}},closeDialog:function(){u(".dialogBlocker").find("#cancel").trigger("primaryaction")},_isWebFont:function(e){if(e)for(var t in c){var n=new RegExp("^"+c[t],"g");if(-1!==e.search(n))return!0}return!1},_isImageIcon:function(e){if(e)for(var t in l){var n=new RegExp(l[t],"g");if(-1!==e.search(n))return!0}return!1},legacyLaunch:function(e,t,n,r){return s.legacyLaunch(e,t,n,r)},EVENT_DIALOG:"eventDialog",setEventProperty:function(e,t,n){this._getSourceEvent(e)[t]=n},getEventProperty:function(e,t){var n=this._getSourceEvent(e);return n[t]&&!0===n[t]},_getSourceEvent:function(e){return e.gesture?e.gesture.srcEvent:e.originalEvent?e.originalEvent:e},isIpad:function(){return null!==navigator.userAgent.match(/iPad/i)&&(u("body").addClass("mobile"),!0)},isControlKey:function(e){return/Macintosh/.test(this._getBrowserUserAgent())?e.metaKey:e.ctrlKey},_getBrowserUserAgent:function(){return navigator.userAgent},isInIframe:function(e){try{return(e=e||window).self!==e.top}catch(e){return!0}},formatDuration:function(e){if(!e||isNaN(e))return a.get("unknown");var t=Math.floor(e/1e3),n=Math.floor(t/60),r=Math.floor(n/60),i=Math.floor(r/24);return t%=60,n%=60,r%=24,0<i?a.get("EllapsedTimeDays",{days:i,hours:r,minutes:n,seconds:t}):0<r?a.get("EllapsedTimeHours",{hours:r,minutes:n,seconds:t}):0<n?a.get("EllapsedTimeMinutes",{minutes:n,seconds:t}):a.get("EllapsedTimeSeconds",{seconds:t})},rgbToHex:function(e){return(e=e.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i))&&4===e.length?"#"+("0"+parseInt(e[1],10).toString(16)).slice(-2)+("0"+parseInt(e[2],10).toString(16)).slice(-2)+("0"+parseInt(e[3],10).toString(16)).slice(-2):""},createTemporaryContainer:function(){var e=u(document.body).find(".reactTemporaryContainer");return 0===e.length&&(e=u('<div class="reactTemporaryContainer">'),u(document.body).append(e)),e.get(0)},removeTemporaryContainer:function(){u(document.body).find(".reactTemporaryContainer").remove()},reactRender:function(r,i){return new Promise(function(t,n){require(["react-dom"],function(e){try{e.render(r,i,t)}catch(e){n(e)}},n)})},is24HrFormat:function(){throw new Error("This function has been removed; Use core-client/utils/DateTimeUtils.is24HrFormat")},getCurrentWindow:function(){return window},createPerformanceMark:function(){throw new Error("This function has been removed; Use core-client/utils/PerfUtils.createPerformanceMark")},clearPerformanceMark:function(){throw new Error("This function has been removed; Use core-client/utils/PerfUtils.clearPerformanceMark")},traverse:function(e,t){for(var n=[e];n.length;){var r=n.shift();if(r&&t(r))return r;(d.isObject(r)||d.isArray(r))&&(n=n.concat(d.values(r)))}}}}),define("baglass/core-client/js/core-client/ui/ToastMessage",["./core/Class","underscore","jquery","toastr","../utils/Utils","../nls/StringResources","jquery-ui"],function(e,p,f,h,g,v){var t=e.extend({TIMEOUT:3e3,MAX_TOAST:5,currentOptions:{},defaultOptions:{closeButton:!0,newestOnTop:!1,tapToDismiss:!1,positionClass:"toast-top-center",showDuration:"500",hideDuration:"500",showEasing:"swing",hideEasing:"linear",showMethod:"slideDown",hideMethod:"slideUp",type:"success",iconClasses:{error:"toast-error",info:"toast-info",success:"toast-success",warning:"toast-warning"},secondaryLabel:v.get("details")},init:function(e){this.toastrOptions={},f.extend(!0,this.toastrOptions,this.defaultOptions,e),this.toastrOptions.timeOut=this.toastrOptions.timeOut||0,this.toastrOptions.extendedTimeOut=0,t.inherited("init",this,arguments)},render:function(e){var t=f.now(),n="toast-message"+t,r="toast-icon"+t;p.isUndefined(h.options.type)&&(h.options.type="success");var i=v.get(h.options.type);if(h.options.btnLabel){var o=f("<div></div>",{"aria-label":h.options.btnLabel,title:h.options.btnLabel,class:"toast-close-label",type:"button",role:"button",tabIndex:"0"});o.text(h.options.btnLabel),h.options.closeHtml=o[0]}else{var s=v.get("close"),a=f("<div></div>",{role:"button","aria-label":s,title:s,class:"toast-close-div",tabIndex:"0"});g.setIcon(a,"common-close_icon",s),h.options.closeHtml=a[0]}h.options.type=h.options.type.toLowerCase();var c,l="common-success";switch(e=p.escape(e),this._isMessageLarge(e)&&p.each(h.options.iconClasses,function(e,t){h.options.iconClasses[t]=e.concat(" large")}),h.options.type){case"info":h.options.timeOut=0===h.options.timeOut?this.TIMEOUT:h.options.timeOut,c=h.info(e),l="common-info-moreinfo";break;case"warning":h.options.timeOut=h.options.timeOut||0,c=h.warning(e),l="common-warning";break;case"error":h.options.timeOut=h.options.timeOut||0,c=h.error(e),l="common-error";break;default:h.options.timeOut=0===h.options.timeOut?this.TIMEOUT:h.options.timeOut,c=h.success(e)}if(c){c.parent().removeAttr("role aria-live"),g.activateAriaAlert(e),c.attr("aria-labelledby",r+" "+n),c.find(".toast-message").attr("id",n);var u=f("<div></div>",{class:"toast-icon",id:r,"aria-label":i});c.append(u),g.setIcon(u,l,i),p.isFunction(h.options.callback)&&c.find(".toast-close-button").on("primaryaction",h.options.callback),f(c).unbind("mouseenter mouseleave");var d=c.find(".toast-close-button");this._addSecondaryButton(d),d.on("primaryaction",function(e){d.off("primaryaction"),d.trigger("click"),this.setNextTabFocus(c),e&&e.stopPropagation()}.bind(this)),c.on("click",function(e){e&&e.stopPropagation()}.bind(this)),this._limitToast()}return c},show:function(e){return h.options=this.toastrOptions,this.render(e)},setNextTabFocus:function(e){var t=e.next(".toast").find(".toast-close-button").first();0===t.length&&(t=e.prev(".toast").find(".toast-close-button").first()),0===t.length?f(":tabbable:first").focus():t.focus()},_limitToast:function(){var e=f(document).find("#toast-container").children();if(e.length>this.MAX_TOAST)for(var t=e.length-this.MAX_TOAST,n=0;n<t;n++)f(e[n]).hasClass("toast-progress")||h.clear(f(e[n]))},_addSecondaryButton:function(e){var t=this;if(this.toastrOptions.secondaryCallback){var n=f('<button class="secondaryButton">'+this.toastrOptions.secondaryLabel+"</button>");n.click(function(){t.toastrOptions.secondaryCallback(),e.trigger("primaryaction")}),e.after(n)}},_isMessageLarge:function(e){var t,n=f('<span class = "test-message">'+e+"</span>");n.css("width",200),n.css("height","auto"),n.css("font-size",15),n.css("font-family","HelvNeue Roman for IBM"),n.css("word-wrap","break-word");var r=f("<div></div>");return r.css("width",200),r.css("position","absolute"),r.css("left",-500),r.append(n),f("body").append(r),t=30<n.height(),r.remove(),t}});return t.remove=function(){f("#toast-container").children(":not(.toast-progress)").remove()},t}),define("baglass/app/utils/CloseViewUtils",["jquery","baglass/nls/StringResources"],function(a,c){return function(){function e(){_classCallCheck(this,e)}return _createClass(e,null,[{key:"waitForCloseConfirmation",value:function(o,s){return new Promise(function(t,n){var e=(s=s||{}).unsaveMessage||c.get("unsavedViewMsg2"),r=s.title||c.get("unsavedViewMsg1"),i=[{defaultId:"ok",text:c.get("unsavedViewMsg3")},"cancel"];o.showMessage(e,r,"info",i,void 0,function(e){"ok"===e.btn&&t(),n()}).then(function(){a(".dialogButton.secondary").focus()})})}}]),e}()}),define("baglass/core-client/js/core-client/ui/AccessibleView",["jquery","underscore","./View"],function(t,n,e){var r=e.extend({init:function(e){r.inherited("init",this,arguments),n.extend(this,e),void 0===this.launchPoint||null===this.launchPoint?this._launchPoint=document.activeElement:(this._launchPoint=this.launchPoint,delete this.launchPoint),this.$entryHeader=t('<div tabindex="0" class="entryHeaderAV"></div>'),this.$exitHeader=t('<div tabindex="0" class="exitHeaderAV"></div>'),this.$el.append(this.$entryHeader),this.$el.append(this.$exitHeader),this.$entryHeader.on("focus",this._enterView.bind(this)),this.$exitHeader.on("focus",this._setFocusToLaunchPoint.bind(this))},getLaunchPoint:function(){return this._launchPoint},setInnerContent:function(e){e instanceof t&&e.insertAfter(this.$exitHeader)},_enterView:function(){this.$el.find(":tabbable").eq(2).focus()},setLaunchPoint:function(e){this._launchPoint=e},enableLooping:function(e){e instanceof t&&!0===this.enableTabLooping&&!1===e.next().hasClass("tabLoopFooter")&&(this.$loopFooter=t('<div class="tabLoopFooter" tabindex="0" style="height:0px;width:0px"></div>'),this.$loopFooter.insertAfter(e),this.$loopFooter.on("focus",this._tabToFirstElementInView.bind(e)),this.$loopHeader=t('<div class="tabLoopHeader" tabindex="0" style="height:0px;width:0px"></div>'),this.$loopHeader.insertBefore(e),this.$loopHeader.on("focus",this._tabToLastElementInView.bind(e)))},_setFocusToLaunchPoint:function(){void 0!==this.getLaunchPoint()&&null!==this.getLaunchPoint()&&t(this.getLaunchPoint()).focus()},_tabToFirstElementInView:function(){var e=this.find(":tabbable").first();null!=e&&e.focus()},_tabToLastElementInView:function(){var e=this.find(":tabbable").last();null!=e&&e.focus()},removeContainerOnlyFromTabOrder:function(){this.$entryHeader.removeAttr("tabIndex"),this.$exitHeader.removeAttr("tabIndex"),this.$loopFooter&&this.$loopFooter.removeAttr("tabIndex"),this.$loopHeader&&this.$loopHeader.removeAttr("tabIndex")},enterContainerOnlyInTabOrder:function(){this.$entryHeader.attr("tabindex","0"),this.$exitHeader.attr("tabindex","0"),this.$loopFooter&&this.$loopFooter.attr("tabIndex","0"),this.$loopHeader&&this.$loopHeader.attr("tabIndex","0")},remove:function(){r.inherited("remove",this,arguments)}});return r}),define("baglass/core-client/js/core-client/utils/PerfUtils",["underscore"],function(n){return{createPerformanceMark:function(e){if(!n.isUndefined(e)){var t=this._getPerformance();!n.isUndefined(t)&&n.isFunction(t.mark)&&t.mark(e.component+"-"+e.name+"-"+e.state)}},clearPerformanceMark:function(e){if(!n.isUndefined(e)){var t=this._getPerformance();!n.isUndefined(t)&&n.isFunction(t.clearMarks)&&t.clearMarks(e.component+"-"+e.name+"-"+e.state)}},_getPerformance:function(){return performance}}}),define("baglass/core-client/js/core-client/ui/Slideout",["./AccessibleView","jquery","underscore","../utils/ClassFactory","../utils/Utils","../utils/PerfUtils","../nls/StringResources","jquery-ui","touch-punch"],function(e,a,u,t,o,s,c){var d=null;function l(e,t){for(var n=!1;null!==e;)n=n||a.contains(e.$el.get(0),t),e=e.child;return n}function n(){var i=null;null===this.parent&&(this.hideHandler=function(e){var t,n,r;i="mousedown"===e.type||"touchstart"===e.type?e:(r=i,l(t=this,(n=e).target)||!a.contains(document.body,n.target)||n.isDefaultPrevented()||0!==t.$el.closest(".tabhidden").length||o.getEventProperty(n,o.EVENT_DIALOG)||null!==r&&l(t,r.target)||this.hide({hideOnly:this.hideOnly}),null)}.bind(this))}function p(){null===this.hideHandler||this.hasOpenChild()||a(document).off(this.closeEventPattern,this.hideHandler),this.$el.children(".ui-resizable-handle").hide(),this.trigger("hide")}function r(e,t){var n=this;this.addChildLocked||(this.addChildLocked=!0,this.removeChild().then(function(){return n.child=e,t.overlay?(n.$el.css("z-index","2999"),a(n.$el.parents()[0]).append(n.child.$el)):n.$el.children(".pane-child").append(n.child.$el),n.child.render(),n.child.setContent(t.content),n.child.show()}).then(function(){n.addChildLocked=!1}))}return d=e.extend({_ClassFactory:t,ANIMATION_TIMEOUT:500,DISPLAY_LIMIT:3,PAGINATION_WIDTH:36,open:!1,events:{"primaryaction .pane-pagination-control":"pageBack","primaryaction .pin-icon":"_togglePin"},closeEventPattern:"mousedown.slideout touchstart.slideout clicktap.slideout",init:function(e){this.child=null,this.open=!1,this.parent=null,d.inherited("init",this,arguments),a.extend(this,e),this.hideHandler=null,this._showing=null,this.hideOnParentClick=!1!==this.hideOnParentClick,this._root=null===this.parent?this:this.parent._root,this._index=null===this.parent?0:this.parent._index+1,this.__initPinningSettings(),this.__initDisplaySettings(),function(){u.isString(this.id)||(this.id=this.content&&u.isString(this.content.module)?this.content.module:u.uniqueId("undefinedModule"))}.call(this),n.call(this,e),this._childToAdd=[],this._paginationLaunchPoint=null,void 0!==this.label&&null!==this.label||(this.label=u.uniqueId(c.get("defaultSlideoutLabel")))},__initPinningSettings:function(){u.isUndefined(this.pinning)&&(this.pinning={isPinned:!1,float:!0,display:!1}),u.isBoolean(this.pinning.isPinned)||(this.pinning.isPinned=!1),u.isBoolean(this.pinning.float)||(this.pinning.float=!0),u.isBoolean(this.pinning.display)||(!0===this.pinning.isPinned?this.pinning.display=!0:this.pinning.display=!1)},__initDisplaySettings:function(){this._displayIndex=null!==this.parent&&!0===this.overlay?this.parent._displayIndex:this._index,null===this.parent&&(this._root.displayLimit=u.isNumber(this.displayLimit)&&0<this.displayLimit?this.displayLimit:d.prototype.DISPLAY_LIMIT,this._root.collapseRootIndex=u.isNumber(this.collapseRootIndex)&&0<=this.collapseRootIndex?this.collapseRootIndex:0),this._displayInfo={firstDisplayedAfterCollapsed:null}},getRootId:function(){return this.getRootParent().id},isLast:function(){return null===this.child},setContent:function(e){return this.contentView&&(this.contentView.remove(),this.contentView=null),this.content=e,this.isRendered&&u.isObject(this.content)&&this.content.module?this._createContent():Promise.resolve()},setPinned:function(e){this.pinning.isPinned=void 0!==e&&e,this._updatePinCss(),this.trigger("change:pinState",{pinned:this.isPinned()})},getDisplayLimit:function(){return this._root.displayLimit},_handleEscape:function(){1<=this.$el.children(".pane-child").children().length?this.removeChild():this.hide({hideOnly:this.hideOnly,force:!0,isEscape:!0})},render:function(){s.createPerformanceMark({component:"glass",name:"renderSlideout",state:"start"}),this.isRendered=!0,this.$el.attr("role","group"),this.$el.attr("aria-label",this.label),this.parent||(this.$el.addClass("root"),this._windowResizeHandler=this._collapseChildren.bind(this),a(window).on("resize",this._windowResizeHandler),this.$el.on("escapeaction",a.proxy(this._handleEscape,this))),this.fireResizeStart=!0,this.$el.on("resize",this._handleResize.bind(this)),this.$el.addClass("flyoutPane pane-"+this.position);var e=a('<div class="pane-pagination-control" role="button"></div><div class="pane-content"></div><div class="pane-child"></div>');this.setInnerContent(e);var t=this.$el.find(".pane-pagination-control");o.setIcon(t,"common-chevron_left");var n=c.get("paginationControl");if(t.attr("aria-label",n),this.width&&this.setWidth(this.width),this.resizable&&this._setResizable(e),this.isPinDisplayed()){this.$el.find(".pane-content").append('<div class="pin-icon-container"><div class="pin-icon" tabindex="0"><svg class="svgIcon"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#common-pin"></use></svg></div></div>');var r,i=this.$el.find(".pin-icon");r=this.isPinned()?(this.$el.find(".pane-content").addClass("pane-pinned"),c.get("unpinSlideout")):(i.addClass("transform-pin"),c.get("pinSlideout")),i.attr("aria-label",r)}return u.isObject(this.content)&&this.content.module?this._createContent():Promise.resolve()},_onResizeStop:function(e){return function(){this.onResizeStop&&this.onResizeStop(e),this.fireResizeStart=!0}.bind(this)},_handleResize:function(e){e.target===e.currentTarget&&(this.fireResizeStart&&(this.onResizeStart&&this.onResizeStart(e),this.fireResizeStart=!1),this.onResize&&this.onResize(e),clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(this._onResizeStop(e),200))},addChild:function(e){var t=u.isObject(e)?e:{};t.overlay=!0===t.overlay,t.overlay&&(u.isUndefined(t.width)||t.width<this.width)&&(t.width=this.width);var n=this._createSlideout({glassContext:this.glassContext,position:this.position,overlay:t.overlay,hideOnParentClick:t.hideOnParentClick,width:t.width,onHide:t.onHide,pinning:t.pinning,launchPoint:t.launchPoint,label:t.label,parent:this,enableTabLooping:t.enableTabLooping,resizable:t.resizable});return this.open?r.call(this,n,t):this._childToAdd.push(function(e,t){r.call(this,e,t)}.bind(this,n,t)),n},removeChild:function(e){return null!==this.child?this.child.hide(e):Promise.resolve()},isPinned:function(){return this.pinning.isPinned},isFloat:function(){return this.pinning.float},isPinDisplayed:function(){return this.pinning.display},_initializePinning:function(){this.pinning={isPinned:!1,float:!0,display:!1}},show:function(){return this.open||this.isBeingShown()?this._showing:this._showing=Promise.delay(30).then(function(){return this.trigger("show"),this._show()}.bind(this)).then(this._setFocusOnLast.bind(this))},_setFocusOnLast:function(){if(this.isLast())try{this.contentView&&this._setFocusInContentView()}catch(e){return e}},_show:function(){this.$el.children(".ui-resizable-handle").show(),this.$el.children(".pane-content").removeClass("tabhidden"),this.$el.addClass("active"),this.$el.removeClass("inactive"),this.enterContainerOnlyInTabOrder(),this.open=!0,null!==this.child&&this.child.show();var e=u.last(this._childToAdd);return this._childToAdd=[],u.isFunction(e)&&e(),this.$el.hasClass("root")&&(this._button=a(".toolpane button.currentlySelected"),this._button.addClass("slideoutOpen")),null!==this.hideHandler&&a(document).on(this.closeEventPattern,null,{allowPropagationDefaultAction:!0},this.hideHandler),this._addShadowToFinalSlideoutChild(),null!==this.parent&&!0===this.hideOnParentClick&&this.parent.$el.children(".pane-content").on("clicktap.removeChild",function(){this.removeChild()}.bind(this.parent)),this.whenAnimationDone("show").then(this._showHelper.bind(this))},_showHelper:function(){null===this.child&&this._collapseChildren(),!this.isPinned()||this.isFloat()||this.$el.hasClass("no-float")||this._updatePinCss(),this.trigger("done:show")},isOpen:function(){return this.open},isBeingShown:function(){return null!==this._showing&&this._showing.isPending()},hasOpenChild:function(){for(var e=this.child,t=!1;null!==e&&!t;)t=e.open,e=e.child;return t},hide:function(e){var t,n,r=function(e){var t=this,n=u.isObject(e)&&!0===e.force,r=u.isObject(e)&&!0===e.hideOnly,i=u.isObject(e)&&u.isNumber(e.depth)&&r?e.depth:-1,o=a.extend({},{force:n,hideOnly:r,depth:i}),s=u.isObject(e)&&!0===e.isEscape;return this._canHide({isEscape:s,depth:i}).then(this._doHide.bind(this,o)).then(function(){this._button&&this===this.getRootParent()&&(this._button.removeClass("slideoutOpen"),this._button.removeClass("currentlySelected"),this._button=null)}.bind(this)).finally(function(){t._hidingPromises.shift(),t._hidingOptions.shift()})}.bind(this);return this._hidingPromises&&0!==this._hidingPromises.length?(t=this._hidingOptions,n=e||{},t.every(function(t){return["force","hideOnly","depth","isEscape"].some(function(e){return t[e]!==n[e]})})&&(this._hidingOptions.push(e||{}),this._hidingPromises.push(u.last(this._hidingPromises).finally(function(){return r(e)})))):(this._hidingPromises=[],this._hidingOptions=[],this._hidingPromises.push(r(e)),this._hidingOptions.push(e||{})),u.last(this._hidingPromises)},_canHide:function(o){return new Promise(function(n,r){var e=this.isOpen()&&this.contentView&&u.isFunction(this.contentView.canHide),t=function(e){var t=0===e.depth;if(e.depth--,!t&&!this.isLast())return this.child._canHide(e).then(n,r);n()};if(e){var i=!0;try{i=this.contentView.canHide(o)}catch(e){console.error("Error while executing canHide method",e)}Promise.resolve(i).then(function(e){!0===e||u.isUndefined(e)?t.call(this,o).then(n,r):r()}.bind(this)).catch(function(){r()})}else t.call(this,o)}.bind(this))},_doHide:function(i){return new Promise(function(e){if(this.open){var t=a.contains(this.$el[0],document.activeElement),n=[],r=this._hideOnly(n,i);u.isEmpty(n)?e():Promise.all(n).then(function(){p.call(this),i.hideOnly||r.remove(),t&&this._setFocusToLaunchPoint(),e()}.bind(this))}else{0===i.depth?(p.call(this),e()):(i.depth=i.depth-1,this._hideChild(i).then(function(){p.call(this),i.hideOnly||!i.force&&this.isPinned()||this.remove(),e()}.bind(this)))}}.bind(this))},_hideChild:function(e){if(null===this.child)return Promise.resolve("no child to hide");var t=[];return this._hideOnly(t,e),Promise.all(t)},_hideOnly:function(e,t){for(var n,r=this,i=0,o=t.force;u.isObject(r)&&(i<=t.depth||t.depth<0);)!o&&r.isPinned()||(u.isUndefined(n)&&(n=r,o=!0),e.push(r._hide(t))),r=r.child,i++;return u.isEmpty(e)||this._collapseChildren(),n},_hide:function(){var e=new Promise(function(e){this.open?(this.open=!1,0===this.$el.closest("html").length?(console.log("The slideout DOM element is already removed"),e("Slideout already removed")):(this.parent&&this.parent.$el.children(".pane-content").off("clicktap.removeChild"),this.whenAnimationDone("_hide").then(function(){this.onHide&&this.onHide(),e()}.bind(this)))):e("Slideout already hidden")}.bind(this));return e.then(function(){!1===this.open&&(this.$el.children(".pane-content").addClass("tabhidden"),this.removeContainerOnlyFromTabOrder()),this._addShadowToFinalSlideoutChild()}.bind(this)),this.isPinned()&&this.$el.removeClass("no-float"),this.$el.removeClass("collapsed"),this.$el.removeClass("collapseRoot"),this.$el.addClass("notransition"),this.$el[0].offsetHeight,this.$el.removeClass("active"),this.$el.addClass("inactive"),this.$el.removeClass("notransition"),e},remove:function(){this.child&&this.child.remove(),null!==this.parent&&this.parent.child===this&&(this.parent.child=null),this._windowResizeHandler&&(a(window).off("resize",this._windowResizeHandler),this.$el.off("resize",this._handleResize)),this.hideHandler&&(a(document).off(this.closeEventPattern,this.hideHandler),this.hideHandler=null),this.contentView&&this.contentView.remove(),this.$el.off("escapeaction"),this.open&&this.trigger("hide"),this.trigger("remove"),d.inherited("remove",this,arguments)},setWidth:function(e){a.isPlainObject(e)?this.$el.css(e):this.$el.css("width",e)},_createContent:function(){var e=this.content||{};return e.slideout=this,e=this.glassContext.addToOptions(e),this._ClassFactory.instantiate(this.content.module,e).then(function(e){this.contentView=e,this.$el.children(".pane-content").append(this.contentView.$el);var t=this.contentView.render();return Promise.resolve(t).then(function(){(function(){s.createPerformanceMark({component:"glass",name:"renderSlideout",state:"end"}),this.isOpen()&&!this.isBeingShown()&&this._setFocusInContentView()}).call(this),this.enableLooping(this.contentView.$el)}.bind(this)).catch(function(e){return this.logger.error("Error While rendering the content view for the slideout",e),Promise.reject(e)}.bind(this))}.bind(this))},_setFocusInContentView:function(){u.isFunction(this.contentView.setFocus)&&this.contentView.setFocus()},getRootParent:function(){return this._root},getLaunchPoint:function(){return null!==this._paginationLaunchPoint?this._paginationLaunchPoint:d.inherited("getLaunchPoint",this)},getWidth:function(){return this.$el.outerWidth()},getChildrenWithSelf:function(){for(var e=[this],t=this;t.child;)e.push(t.child),t=t.child;return e},_collapseChildren:function(){var e=this._findFirstToCollapse();if(null!==(this.getRootParent()._displayInfo=e).firstToCollapse){var t=e.firstToCollapse;if(e=this._findSlideoutsToCollapse(e),u.each(e.visible,function(e){e.$el.children(".pane-content").removeClass("tabhidden"),e.enterContainerOnlyInTabOrder()}),u.isEmpty(e.collapsed))t.$el.children(".pane-pagination-control:not(.collapsed .pane-pagination-control)").removeClass("visible"),t.$el.children(".pane-pagination-control:not(.collapsed .pane-pagination-control)").removeAttr("tabindex"),u.each(e.visible,function(e){e._paginationLaunchPoint=null});else{t.$el.addClass("collapseRoot"),t.$el.hasClass("collapsed")||(t.$el.addClass("animationPhase"),t.whenAnimationDone("collapseChildren").then(function(){this.$el.children(".collapsed .pane-pagination-control").addClass("visible"),this.$el.children(".collapsed .pane-pagination-control").attr("tabindex","0")}.bind(t))),u.each(e.collapsed,function(e){e.$el.removeClass("active").addClass("collapsed"),e.$el.children(".pane-content").addClass("tabhidden"),e.$el[0]!==t.$el[0]&&e.removeContainerOnlyFromTabOrder()});for(var n=1;n<e.visible.length;n++)e.visible[n]._paginationLaunchPoint=null;e.firstDisplayedAfterCollapsed._paginationLaunchPoint=t.$el.children(".collapsed .pane-pagination-control")[0]}}},_getAvailableWidth:function(){return this.getRootParent().$el.parent().innerWidth()},_findFirstToCollapse:function(){for(var e=null,t=this.getRootParent(),n=0,r=[],i=!1;!i;)t.open&&(null===e?t._displayIndex>=this._root.collapseRootIndex?e=t:(u.isEmpty(r)||u.last(r)._displayIndex!==t._displayIndex)&&(n+=t.getWidth(),r.push(t)):t._displayIndex===e._displayIndex?e=t:i=!0),i=null===(t=t.child)||i;return{firstToCollapse:e,visible:r,width:n,firstDisplayedAfterCollapsed:null,collapsed:[]}},_findSlideoutsToCollapse:function(e){var t,n=null,r=this.getRootParent()._getAvailableWidth(),i=this.getDisplayLimit(),o=[],s=!1;if(null!==e.firstToCollapse){for(t=e.firstToCollapse;null!==t;)t=(n=t).child;t=n;for(var a=!1,c=!0,l=e.visible.length;!a;)!0===t.open&&(s?e.collapsed.unshift(t):c||e.width+t.getWidth()+d.prototype.PAGINATION_WIDTH<r&&l<i?(c=!1,t.$el.removeClass("collapsed").removeClass("collapseRoot").addClass("active"),(u.isEmpty(o)||t._displayIndex!==u.first(o)._displayIndex)&&(e.width+=t.getWidth(),o.unshift(t),l++)):t._displayIndex===u.first(o)._displayIndex?t.$el.removeClass("collapsed").removeClass("collapseRoot").addClass("active"):(e.firstDisplayedAfterCollapsed=u.first(o),e.collapsed.unshift(t),s=!0)),a=t===e.firstToCollapse,a=null===(t=t.parent)||a}return e.visible=e.visible.concat(o),e},_togglePin:function(){this.setPinned(!this.isPinned())},_updatePinCss:function(){var e,t=this.$el.find(".pin-icon");e=this.isPinned()?(this.$el.find(".pane-content").addClass("pane-pinned"),this.isFloat()||(this.$el.addClass("notransition"),this.$el.addClass("no-float"),this.$el[0].offsetHeight,this.$el.removeClass("notransition")),t.removeClass("transform-pin"),c.get("unpinSlideout")):(this.$el.find(".pane-content").removeClass("pane-pinned"),this.$el.addClass("notransition"),this.$el.removeClass("no-float"),this.$el[0].offsetHeight,this.$el.removeClass("notransition"),t.addClass("transform-pin"),c.get("pinSlideout")),t.attr("aria-label",e)},pageBack:function(e){if(!e.isDefaultPrevented()&&null!==this._root._displayInfo.firstDisplayedAfterCollapsed){var t=this._root._displayInfo.firstDisplayedAfterCollapsed,n=null!==t.child?t.child:t;n.hide(),e.preventDefault(),n._setFocusToLaunchPoint()}},whenAnimationDone:function(e){return new Promise(function(e){this.$el.off("transitionend webkitTransitionEnd oTransitionEnd"),this.$el.on("transitionend webkitTransitionEnd oTransitionEnd",function(){e()})}.bind(this)).timeout(this.ANIMATION_TIMEOUT).catch(Promise.TimeoutError,function(){return console.log("failed to detect the end of the slideout animation, force the resolve; operation: "+e),Promise.resolve()})},_addShadowToFinalSlideoutChild:function(){for(var e=this.getRootParent(),t=e;null!==e.child;)e.$el.removeClass("shadow"),(e=e.child).open&&(t=e);t.$el.addClass("shadow")},_createSlideout:function(e){return new d(e)},_setResizable:function(e){var t="right"===this.position,n=e.filter(".pane-content"),r=a("<div>").addClass("resize-handle ui-resizable-handle ui-resizable-"+(t?"w":"e")),i={handles:[r],minWidth:this.resizable.min||300,maxWidth:this.resizable.max||1e3,direction:t?"left":"right"};t?r.insertBefore(n):r.insertAfter(n),o.setIcon(r,"common-handle"),this.$el.resizable(i)}})}),define("baglass/common/ui/SlideoutRegistry",["../../core-client/js/core-client/ui/core/Events","jquery","underscore","../../core-client/js/core-client/ui/Slideout"],function(e,n,r,i){var o="SlidoutRegistry:openSlideout - One slideout is already open",s=function(e,t){"left"===t.position?e.prepend(t.$el):e.append(t.$el)},a=function(e){return e.toString=function(){return e.msg},e},c=function(e){if("right"!==e&&"left"!==e)throw a({msg:"SlidoutRegistry:openSlideout - Invalid Slideout position",position:e})},t=e.extend({init:function(e){t.inherited("init",this,arguments),n.extend(this,e),this._open={},this._registered={}},openSlideout:function(e){var t;if(!n.prototype.isPrototypeOf(this.$container))throw a({msg:"SlidoutRegistry:openSlideout - Undefined or invalid container",container:this.$container});if(i.prototype.isPrototypeOf(e))t=function(e){var t=e.position;if(c(t),!r.isUndefined(this._open[t]))throw a({msg:o,open:this._open[t]});return r.isUndefined(this._registered[e.getRootId()])?(e.render(),s(this.$container,e)):e.getRootParent()!==this._registered[e.getRootId()]&&(e=this._registered[e.getRootId()]),e.show(),e}.call(this,e);else{if(!r.isObject(e))throw a({msg:"SlidoutRegistry:openSlideout - Invalid Slideout parameter",parameter:e});t=function(e){var t,n=e.position;if(this._registered[e.id])t=this._registered[e.id];else{if(c(n),!r.isUndefined(this._open[n]))throw a({msg:o});(t=new i(e)).render(),s(this.$container,t)}return t.show(),t}.call(this,e)}return this._open[t.position]=t.getRootParent(),function(e){var t=function(e){e.hasOpenChild()||(delete this._open[e.position],(this._registered[e.getRootId()]=e).off("hide",t))}.bind(this,e),n=function(e){this._open[e.position]===e&&delete this._open[e.position],delete this._registered[e.getRootId()],e.off("remove",n),e.off("hide",t)}.bind(this,e);e.on("hide",t),e.on("remove",n)}.call(this,this._open[t.position]),t},getOpenSlideout:function(e){if("left"!==e&&"right"!==e)throw a({msg:"SlidoutRegistry:getOpenSlideout - Invalid Slideout position",position:e});return this._open[e]},getOpenSlideouts:function(){var e=[];return r.isUndefined(this._open.left)||e.push(this._open.left),r.isUndefined(this._open.right)||e.push(this._open.right),e},getRegisteredSlideout:function(e){var t;return r.isString(e)&&(t=this._registered[e]),t},getContainer:function(){return this.$container},changeContainer:function(t){if(!n.prototype.isPrototypeOf(t))throw a({msg:"SlidoutRegistry:changeContainer - Undefined or invalid container",container:this.$container});if(this._open.left||this._open.right)throw a({msg:"SlidoutRegistry:changeContainer - Slideout is open",open:this._open});r.each(this._registered,function(e){s(t,e)},this),this.$container=t},_removeSlideout:function(e){e&&e.remove()},cleanupSlideouts:function(){r.each(this._open,function(e){e&&e.remove()}),r.each(this._registered,function(e){e&&e.remove()})}});return t}),define("baglass/ajax/AjaxErrorFactory",["../core-client/js/core-client/errors/BaseError"],function(i){return{create:function(e,t,n){var r=i.extend({init:function(e,t){r.inherited("init",this,arguments),this.name="AjaxError",this.jqXHR=t.requestInfo.jqXHR,this.textStatus=t.requestInfo.textStatus,this.errorThrown=t.requestInfo.errorThrown}});return new r(e.statusText,{requestInfo:{jqXHR:e,textStatus:t,errorThrown:n},code:e.status})}}}),define("baglass/services/AjaxService",["jquery","../ajax/AjaxErrorFactory"],function(e,t){var n=function(){function t(e){var s=this;_classCallCheck(this,t),this._logWarning=function(e){s._logger&&s._logger.warn&&s._logger.warn("AjaxService",e)},this._handleUrlTooLong=function(e,t,n,r){var i="Request too long. ".concat(JSON.stringify(e),". Prepared URL length: ").concat(t.preparedReqLen," exceeds max configured length ").concat(t.maxQuerySize,".");s._logWarning(i);var o=r(n);return i="URL reducer invoked and returned reduced params: ".concat(JSON.stringify(o),"."),s._logWarning(i),o.skipUrlReducer=!0,s.ajax(o)},this._issueRequest=function(t,n){var r=t.params;return r.urlReducer&&!r.skipUrlReducer?s._checkUrlLength(t).then(function(e){return e.urlTooLong?s._handleUrlTooLong(t,e,n,r.urlReducer):s.executeProcessedAjax(t.params)}):s._sendRequest(t)},this._sendRequest=function(n){return new Promise(function(r,i){s._cntr++;var e="xhr"+s._cntr,t=s.ajaxFn(n.params);(s._inflightRequests[e]=t).then(function(e,t,n){r({data:e,textStatus:t,jqXHR:n})}).fail(function(e,t,n){"abort"!==n?i(s._AjaxErrorFactory.create(e,t,n)):r({textStatus:t,jqXHR:e})}).done(function(){s._inflightRequests[e]&&delete s._inflightRequests[e]})})},this._logger=e&&e.logger||console,this._configService=e&&e.configService,this._errorMessageRenderer=e&&e.errorDialog||void 0,this._requestHandlers=[],this._responseHandlers=[],this._errorHandler=null,this._cntr=0,this._inflightRequests={}}return _createClass(t,[{key:"addRequestHandler",value:function(e){if(!e||"function"!=typeof e.prepareRequest)throw new Error('Handler must implement function "prepareRequest"');this._requestHandlers.push(e)}},{key:"addResponseHandler",value:function(e){if(!e||"function"!=typeof e.handleResponse)throw new Error('Handler must implement function "handleResponse"');this._responseHandlers.push(e)}},{key:"setErrorHandler",value:function(e){if(!e||"function"!=typeof e.handleError)throw new Error('Handler must implement function "handleError"');this._errorHandler=e}},{key:"_buildRequestObject",value:function(e){return{params:e||{}}}},{key:"ajax",value:function(e){var t=this._buildRequestObject(e),n=e&&e.urlReducer?_objectSpread({},e):null;return this._prepareRequest(t).then(this._issueRequest.bind(this,t,n)).then(this._handleResponse.bind(this,t),this._handleError.bind(this,t))}},{key:"executeProcessedAjax",value:function(e){var t=this._buildRequestObject(e);return this._executeProcessedAjax(t)}},{key:"_executeProcessedAjax",value:function(e){return this._sendRequest(e).then(this._handleResponse.bind(this,e),this._handleError.bind(this,e))}},{key:"prepareRequest",value:function(e){var t=this._buildRequestObject(e);return this._prepareRequest(t,!0)}},{key:"_getUrlAndParmsLength",value:function(e){var t=e.url,n=e.data,r=e.method,i=t.length;if("GET"!==r)return i;var o="";if("string"==typeof n)o=n.split("&").reduce(function(e,t){var n=t.split("=");return"".concat(e,"&").concat(n[0],"=").concat(encodeURIComponent(n[1]))},"");else if(Array.isArray(n))o=n.reduce(function(e,t){return"".concat(e,"&").concat(encodeURIComponent(t.name),"=").concat(encodeURIComponent(t.value))},"");else if("object"===_typeof(n))for(var s in n)o="".concat(o,"&").concat(encodeURIComponent(s),"=").concat(encodeURIComponent(n[s]));return i+o.length}},{key:"_checkUrlLength",value:function(n){var r=this;return this._configService.getDatasetQuerySize().then(function(e){var t=r._getUrlAndParmsLength(n.params);return{urlTooLong:e<t,maxQuerySize:e,preparedReqLen:t}})}},{key:"_prepareRequest",value:function(t){var n=Promise.resolve();return this._requestHandlers.forEach(function(e){n=n.then(e.prepareRequest.bind(e,t))}),n}},{key:"cancelAllRequests",value:function(){var t=this;Object.keys(this._inflightRequests).forEach(function(e){try{t._inflightRequests[e].abort()}catch(e){t._logger&&t._logger.error&&t._logger.error("AjaxService.cancelAllRequests",e)}})}},{key:"showError",value:function(e,t){return this._errorMessageRenderer&&"function"==typeof this._errorMessageRenderer.showError?this._errorMessageRenderer.showError(e,t):Promise.reject(new Error("Unable to display error dialog: "+t))}},{key:"_handleResponse",value:function(t,n){var r=Promise.resolve();return this._responseHandlers.forEach(function(e){r=r.then(e.handleResponse.bind(e,t,n))}),r.then(function(){return n})}},{key:"_handleError",value:function(e,t){return this._errorHandler?this._errorHandler.handleError(e,t):Promise.reject(t)}}]),t}();return n.prototype.ajaxFn=e.ajax,n.prototype._AjaxErrorFactory=t,n}),define("baglass/services/ClipboardService",["underscore"],function(t){return function(){function n(e,t){_classCallCheck(this,n),e&&this.initialize(t)}return _createClass(n,[{key:"initialize",value:function(e){this.glassContext=e,this._clipboardData="",this._storedType="string"}},{key:"set",value:function(n){var r=this;return new Promise(function(e,t){try{r._set(n),e()}catch(e){t(e)}})}},{key:"get",value:function(){var t=this;return new Promise(function(e){e(t._get())})}},{key:"clear",value:function(){var t=this;return new Promise(function(e){t._clipboardData="",t._storedType="string",e()})}},{key:"_set",value:function(e){if(t.isFunction(e))throw new Error("Exception: Cannot encode functions for clipboard storage");this._storedType=_typeof(e),t.isString(e)||(e=JSON.stringify(e)),this._clipboardData=e}},{key:"_get",value:function(){var e=this._clipboardData;return"object"===this._storedType?e=JSON.parse(this._clipboardData):"number"===this._storedType&&(e=Number(this._clipboardData)),e}}]),n}()}),define("text!baglass/app/templates/CoachMarkBubble.html",[],function(){return'<div role="button" tabIndex="0" position="relative"\n\taria-label="{{=it.label}}">\n\t<div title="{{=it.label}}">\n\t\t<svg class="wa-hint-bubble wa-hint-bubble-outside-animated">\n\t\t\t<use style="pointer-events: none;" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#common-coachmark-outer"></use>\n\t\t</svg>\n\t\t<svg class="wa-hint-bubble wa-hint-bubble-inside-animated">\n\t\t\t<title>{{=it.label}}</title>\n\t\t\t<use style="pointer-events: none;" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#common-coachmark-inner"></use>\n\t\t</svg>\n\t</div>\n</div>\n'}),define("text!baglass/app/templates/CoachMarkPopover.html",[],function(){return'<div class="popover coachMarkPopover" role="dialog" aria-labelledby="coachTitle" aria-describedby="coachText">\n\t<div class="arrow"></div>\n\t<div class="coachMarkContent">\n\t\t<div class="popover-title coachMarkTitle"></div>\n\t\t<div type="button" role="button" class="coachMarkClose" tabIndex="0" title="{{=it.closeText}}">\n\t\t\t<svg fill="#3D4852" stroke="#3D4852">\n\t\t\t\t<use style="pointer-events: none;" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#common-titan-dialog-close"></use>\n\t\t\t</svg>\n\t\t</div>\n\t\t<div class="popover-content coachMarkText"></div>\n\t\t<div class="actionableLink">\n\t\t\t<a href="javascript:void(0);">{{=it.turnOffText}}</a>\n\t\t</div>\n\t</div>\n</div>'}),define("baglass/app/CoachMark",["../core-client/js/core-client/ui/AccessibleView","jquery","text!./templates/CoachMarkBubble.html","text!./templates/CoachMarkPopover.html","../nls/StringResources","doT","underscore","bootstrap","jquery-ui"],function(e,p,r,f,h,g,i){var v=e.extend({init:function(e){this.persistence=e.glassContext.getCoreSvc(".CoachMarkService").getPersistence();var t=h.get("coachMarkLabel",{title:i.escape(e.title)}),n=g.template(r)({label:t});this._$coachMark=p(n),e.launchPoint=this._$coachMark,e.enableTabLooping=!0,v.inherited("init",this,arguments)},render:function(e,t){p(".coachMarkPopover").remove();var n=this._$coachMark,r=e.attr("id");n.addClass("coachMark"),t||n.hide(),n.data("containerId",r),e.append(n),e.addClass("coachMarkContainer");var i=e.closest(".toolpane");(i.hasClass("toolpaneLeft")||i.hasClass("toolpaneRight"))&&n.addClass("vertical"),this.placement||(this.placement="right",i.hasClass("toolpaneRight")?this.placement="left":i.hasClass("toolpaneTop")?this.placement="bottom":i.hasClass("toolpaneBottom")&&(this.placement="top"));var o=h.get("coachMarkTurnOffHints"),s=h.get("coachMarkClose"),a=g.template(f)({turnOffText:o,closeText:s}),c={placement:this.placement,trigger:"manual",container:"body",title:this.title||{},content:this.contents||{},template:a,sanitize:!1};this.$popover=n.popover(c);var l=function(e){if(e.which===p.ui.keyCode.ESCAPE||1===p(".coachMarkPopover:visible").length){this.$popover.popover("hide"),removeEventListener("blur",u),removeEventListener("touchstart",l,!0),removeEventListener("click",l,!0),removeEventListener("resize",l,!0),p("body").off("keydown");var t=p(e.target).closest(".coachMark");0!==t.length&&r===t.data("containerId")&&e.stopPropagation()}else 0!==p(".coachMarkPopover").length&&1!==p(".coachMarkPopover:hidden").length||this.$popover.popover("show")}.bind(this),u=function(){document.activeElement&&p(document.activeElement).is("iframe")&&this.$popover.popover("hide")}.bind(this),d=function(e){e.which===p.ui.keyCode.ESCAPE&&(this.getLaunchPoint().focus(),l(e))}.bind(this);this.$popover.on("shown.bs.popover",function(){var e=p(".coachMarkPopover");p(".coachMarkTitle",e).attr("id","coachTitle"),p(".coachMarkText",e).attr("id","coachText"),p(".coachMarkClose",e).focus(),this.enableLooping(p(".coachMarkContent",e)),p(".coachMarkClose",e).on("primaryaction",function(e){this.$popover.popover("hide");var t=this.$popover.data("containerId");t?(this.persistence.marksAsRead(t),p(".coachMark").filter(function(){return p(this).data("containerId")===t}).hide()):p(e.target).closest(".coachMarkPopover").hide()}.bind(this)),p(".actionableLink a",e).on("primaryaction",function(){var e=this.glassContext.getCoreSvc(".UserProfile");e.preferences[v.PREFERENCES_KEY]=v.HIDE_ALL,p(".coachMark").hide(),this.$popover.popover("hide");var t={};t[v.PREFERENCES_KEY]=v.HIDE_ALL,e.savePreferences(t)}.bind(this)),addEventListener("click",l,!0),addEventListener("resize",l,!0),addEventListener("touchstart",l,!0),addEventListener("blur",u),p("body").on("keydown",d)}.bind(this)),this.$popover.on("hidden.bs.popover",function(){removeEventListener("blur",u),removeEventListener("touchstart",l,!0),removeEventListener("click",l,!0),removeEventListener("resize",l,!0),p("body").off("keydown")}.bind(this)),this.$popover.on("primaryaction",function(e){e.stopPropagation(),this.$popover.popover("show")}.bind(this))}});return v.PREFERENCES_KEY="showHints",v.HIDE_ALL="hideAll",v}),define("baglass/app/CoachMarkPersistence",["../core-client/js/core-client/ui/core/Class","jquery"],function(e,n){var r=e.extend({init:function(e){this.glassContext=e.glassContext},isRead:function(t){var n=this;return"hideAll"===this.glassContext.getCoreSvc(".UserProfile").preferences.showHints?Promise.resolve(!0):void 0===this._readCoachMarks?this._getHints().then(function(e){return n._readCoachMarks=e,!0===n._readCoachMarks[t]}).catch(function(e){n._readCoachMarks={};var t=e.jqXHR;if(t&&404===t.status)return!1;throw n.glassContext.getCoreSvc(".Logger").error("Internal error: Unable to read coach mark"+e.jqXHR.responseText),e}):Promise.resolve(!0===this._readCoachMarks[t])},marksAsRead:function(e){var t=this;if(this._readCoachMarks){this._readCoachMarks[e]=!0;var n=JSON.stringify(this._readCoachMarks);return this.glassContext.getCoreSvc(".Ajax").ajax({url:r.SERVICE_URL,type:"PUT",headers:{"Content-Type":"application/json"},data:n}).catch(function(e){throw t.glassContext.getCoreSvc(".Logger").error("Internal error: Update coach mark status failed: "+e.jqXHR.responseText),e})}},reset:function(){var t=this;return this._readCoachMarks=void 0,this.glassContext.getCoreSvc(".Ajax").ajax({url:r.SERVICE_URL,type:"DELETE"}).then(function(){n(".coachMark").show()}).catch(function(e){throw t.glassContext.getCoreSvc(".Logger").error("Internal error: unable to delete coach marks status: "+e.jqXHR.responseText),e})},_getHints:function(){var t=this;return this._hintsRequest||(this._hintsRequest=this.glassContext.getCoreSvc(".Ajax").ajax({url:r.SERVICE_URL,type:"GET",headers:{Accept:"application/json"}}).then(function(e){return t._hintsRequest=null,e.data})),this._hintsRequest}});return r.SERVICE_URL="v1/users/~/items/uihints",r}),define("baglass/app/services/CoachMarkService",["../../core-client/js/core-client/ui/core/Events","../CoachMark","../CoachMarkPersistence"],function(e,t,n){var r=e.extend({init:function(e){r.inherited("init",this,arguments),this.renderer=t,this.glassContext=e,this.persistence=new n({glassContext:e})},setRenderer:function(e){this.renderer=e},setPersistence:function(e){this.persistence=e},getRenderer:function(){return this.renderer},getPersistence:function(){return this.persistence},isCoachMarkEnabled:function(){return"function"==typeof this.persistence.isEnabled?this.persistence.isEnabled().then(function(e){return!0===e}).fail(function(){return!1}):Promise.resolve()},disableCoachMarks:function(){return this.trigger("disable:all",{}),"function"==typeof this.persistence.disable?this.persistence.disable().then(function(){return!0}).catch(function(){return!1}):Promise.resolve()},enableAndRestart:function(){return this.trigger("enable:restart",{}),"function"==typeof this.persistence.restart?this.persistence.restart().then(function(){return!0}).catch(function(){return!1}):Promise.resolve()},enableAndContinue:function(){return this.trigger("enable:continue",{}),"function"==typeof this.persistence.restart?this.persistence.restart().then(function(){return!0}).catch(function(){return!1}):Promise.resolve()}});return r}),define("baglass/app/RestUrls",[],function(){return{JSON_CONTENT_TYPE:"application/json; charset=utf-8",JSON_DATA_TYPE:"json",INSTALL_ENV:"v1/configuration/keys/Glass/installMode",SSO_URL:"v1/ui/sso"}}),define("baglass/app/services/ConfigService",["jquery","underscore","../RestUrls","../../nls/StringResources"],function(t,u,e,n){var r=function(){function l(e){_classCallCheck(this,l),t.extend(this,e),this.CONTENTLOCALES=l.CONTENTLOCALES,this.PRODUCTLOCALES=l.PRODUCTLOCALES,this.TIMEZONES=l.TIMEZONES,this.LEGACYLAUNCHABLE=l.LEGACYLAUNCHABLE}return _createClass(l,[{key:"initialize",value:function(e){if(!u.isObject(e))throw new Error("Invalid configuration context");if(u.extend(this,u.pick(e,l.CONTENTLOCALES,l.PRODUCTLOCALES,l.TIMEZONES,l.LEGACYLAUNCHABLE,l.DEFAULTHOME,l.DEFAULTLOGIN,l.PRODUCTVERSION,l.SSOINFO,l.PORTAL_PAGES,l.DATA_SERVICE_QUERY_SIZE,l.INSTRUMENTATION_CONFIG,l.DIGITAL_CONTEXT_ENABLED,l.CLIENT_VALID_DOMAIN_LIST,l.XSS_CHECKING,l.CONF_MAPBOX_TOKEN,l.CONF_MAPBOX_ACCOUNTNAME,l.CONF_MAPBOX_SECRETTOKEN,l.MAINTENANCE_MESSAGE,l.MAINTENANCE_LINK,l.DISABLE_WHATSNEWSERVICE,l.DISABLE_ALERTBANNER,l.DISABLE_GLOBALTOAST)),this[l.SSOINFO]&&this._processSSOInfo(this[l.SSOINFO]),this[l.CONTENTLOCALES])try{this[l.CONTENTLOCALES]=JSON.parse(this[l.CONTENTLOCALES])}catch(e){this.glassContext.getCoreSvc(".Logger").error("Error parsing supportContentLocales JSON",e),this[l.CONTENTLOCALES]=void 0}if(e.featureRules)try{var t=JSON.parse(e.featureRules);this.glassContext.getCoreSvc(".FeatureChecker").addRules(t)}catch(e){this.glassContext.getCoreSvc(".Logger").error(e)}}},{key:"setConfigValue",value:function(e,t){var n=this,r={};return r[e]=u.isObject(t)?JSON.stringify(t):t,this.glassContext.getCoreSvc(".Ajax").ajax({url:l.BASE_URL+l.GLOBAL,type:"PUT",contentType:"application/json",data:JSON.stringify(r)}).then(function(){n[e]=t}).catch(function(e){var t=new Error(l.ERR_SET_CONFIG_VALUES);throw t.msg=t.message,t.causedBy=e,t})}},{key:"getProductVersion",value:function(){return this.getConfigValue(l.PRODUCTVERSION)}},{key:"getVersion",value:function(){return this.getConfigValueSync(l.PRODUCTVERSION)}},{key:"getContentLocales",value:function(){return this._getConfigList(l.CONTENTLOCALES,!0)}},{key:"getProductLocales",value:function(){return this._getConfigList(l.PRODUCTLOCALES,!0)}},{key:"getTimeZones",value:function(){return this._getConfigList(l.TIMEZONES,!0)}},{key:"getLegacyLaunchable",value:function(){return this._getConfigList(l.LEGACYLAUNCHABLE)}},{key:"getDefaultHome",value:function(){return this._getConfigList(l.DEFAULTHOME)}},{key:"getDefaultLogin",value:function(){return this.getConfigValue(l.DEFAULTLOGIN)}},{key:"getDatasetQuerySize",value:function(){return this.getConfigValue(l.DATA_SERVICE_QUERY_SIZE)}},{key:"getXSSChecking",value:function(){return this[l.XSS_CHECKING]}},{key:"getConfigValue",value:function(e,t){return this._getHelper(e,t,!1)}},{key:"getConfigValueSync",value:function(e){return this._getHelperSync(e)}},{key:"getAllowedUrlLoginParameters",value:function(){return this._getSSOInfo().urlLoginParameters}},{key:"getSSOLoginURL",value:function(){return this[l.SSO_LOGIN]?this[l.SSO_LOGIN]:this._getSSOInfo().login}},{key:"getSSOLogoutURL",value:function(){return this[l.SSO_LOGOUT]?this[l.SSO_LOGOUT]:this._getSSOInfo().logout}},{key:"getInstrumentationConfig",value:function(){return this.getConfigValueSync(l.INSTRUMENTATION_CONFIG)}},{key:"isDigitalContextEnabled",value:function(){return this.getConfigValueSync(l.DIGITAL_CONTEXT_ENABLED)}},{key:"_getConfigList",value:function(e,t){return this._getHelper(e,t,!0)}},{key:"_getSSOInfo",value:function(){return this.getConfigValueSync(l.SSOINFO)||{}}},{key:"_getHelper",value:function(i,o,s){var a=this;if(u.isUndefined(this[i])){var e=l.BASE_URL+i,c=this.glassContext.getCoreSvc(".UserProfile");return o&&(e+=c.preferences.productLocale),this.glassContext.getCoreSvc(".Ajax").ajax({url:e,type:"GET"}).then(function(e){var t=e.data;try{var n=i;o&&(n+=c.preferences.productLocale),t=s?JSON.parse(t[n]):t[n],u.isUndefined(t)||(a[i]=t)}catch(e){var r='"'+e.message+'" encountered while parsing '+i;a.glassContext.getCoreSvc(".Logger").error(r)}return a[i]}).catchReturn()}return Promise.resolve(this[i])}},{key:"_getHelperSync",value:function(e){return this[e]}},{key:"_getFormats",value:function(){return{HTML:n.get("html"),PDF:n.get("pdf"),CSV:n.get("csv"),spreadsheetML:n.get("spreadsheetML"),xlsxData:n.get("xlsxData")}}},{key:"_getBaseTextDirections",value:function(){return{RTL:n.get("rtl"),LTR:n.get("ltr"),AUTO:n.get("contextual")}}},{key:"_getShowHints",value:function(){return{showAll:n.get("showAll"),hideAll:n.get("hideAll")}}},{key:"clearConfigs",value:function(){this._contentLocales=void 0,this._productLocales=void 0,this._timeZoneIDs=void 0,this._defaultHome=void 0}},{key:"setSSOURL",value:function(){var n=this;return this[l.SSOINFO]?Promise.try(function(){return n._processSSOInfo(n[l.SSOINFO])}):this.glassContext.getCoreSvc(".Ajax").ajax({url:e.SSO_URL,type:"GET",contentType:e.JSON_CONTENT_TYPE,dataType:e.JSON_DATA_TYPE}).then(function(e){var t=e.data;return n[l.SSOINFO]=t,n._processSSOInfo(t)}).catch(function(e){throw n.glassContext.getCoreSvc(".Logger").error("Internal error: set SSO URL failed: "+e.jqXHR.responseText),e})}},{key:"_processSSOInfo",value:function(e){e&&(e.login||e.logout)&&t.ajaxSetup({headers:{"X-CA-SSO":this.glassContext.ajaxCodes.SSO}})}}]),l}();return r.BASE_URL="v1/configuration/keys/",r.CONTENTLOCALES="supportedContentLocales_",r.PRODUCTLOCALES="supportedProductLocales_",r.TIMEZONES="timeZones_",r.LEGACYLAUNCHABLE="Configuration.LegacyLaunchable",r.SSOINFO="ssoInfo",r.DEFAULTHOME="Glass.welcomePage",r.DEFAULTLOGIN="Glass.loginPage",r.PRODUCTVERSION="InstallService.productVersion",r.DIGITAL_CONTEXT_ENABLED="Glass.digitalContextEnabled",r.PORTAL_PAGES="ContentApps/enableMyPortalPages",r.GLOBAL="global",r.ERR_SET_CONFIG_VALUES="setConfigValue failed",r.DATA_SERVICE_QUERY_SIZE="DatasetService/urlQuerySize",r.INSTRUMENTATION_CONFIG="instrumentationConfig",r.CLIENT_VALID_DOMAIN_LIST="ClientValidDomainList",r.XSS_CHECKING="CAF.caf_tpXSSCheckingUsed",r.CONF_MAPBOX_TOKEN="Mapbox.token",r.CONF_MAPBOX_SECRETTOKEN="Mapbox.secretToken",r.CONF_MAPBOX_ACCOUNTNAME="Mapbox.accountName",r.MAINTENANCE_MESSAGE="Glass.maintenanceMessage",r.MAINTENANCE_LINK="Glass.maintenanceLink",r.DISABLE_WHATSNEWSERVICE="Glass.disableWhatsNewAlerts",r.DISABLE_ALERTBANNER="Glass.disableAlertBanner",r.DISABLE_GLOBALTOAST="Glass.disableGlobalToast",r.SSO_LOGIN="Glass.sso_login",r.SSO_LOGOUT="Glass.sso_logout",r}),define("baglass/services/ContextService",[],function(){var e=function(e){this.glassContext=e.glassContext};return e.prototype.get=function(e){return this.glassContext.getCoreSvc(".UserProfile")[e]},e}),define("baglass/services/EventsService",["../core-client/js/core-client/ui/core/Events"],function(e){"use strict";return e.extend({})}),define("baglass/services/FeatureChecker",[],function(){"use strict";var e=function(e){return"object"===_typeof(e)&&!Array.isArray(e)},t=function(e){this._rules=e||{}};return t.prototype.setRules=function(e){this._rules=e},t.prototype.addRules=function(n){e(n)&&Object.keys(n).forEach(function(t){e(n[t])&&(this._rules[t]?Object.keys(n[t]).forEach(function(e){this._rules[t][e]=n[t][e]}.bind(this)):this._rules[t]=n[t])}.bind(this))},t.prototype.checkValue=function(e,t,n){var r=!1;return e&&t&&this._rules[e]&&void 0!==this._rules[e][t]&&(r=this._rules[e][t]===n),r},t.prototype.getFeatureFlag=function(e,t){var n=null;return e&&t&&this._rules[e]&&(n=this._rules[e][t]),n},t.prototype.getFeatureFlags=function(e){return e?this._rules[e]:null},t.prototype.toJSON=function(){return JSON.stringify(this._rules)},t}),define("baglass/app/FeatureRules",[],function(){return{"ba-glass":{stringOnlyQS:"enabled"}}}),define("baglass/app/services/FetchService",["jquery","../../core-client/js/core-client/ui/core/Class","../../ajax/AjaxErrorFactory"],function(r,e,n){return e.extend({init:function(e){r.extend(this,e)},sendBaseRequest:function(e,t){return t=r.extend(!0,{},t,{url:e}),this.glassContext.getCoreSvc(".Ajax").ajax(t).then(function(e){return{data:e.data,code:e.jqXHR.status}}).catch(function(e){var t=e.jqXHR;throw n.create(t,t.statusText,e)})},send:function(e,t){return this.sendBaseRequest(e,t)},post:function(e,t){var n=r.extend(!0,{},t,{type:"POST"});return this.send(e,n)},put:function(e,t){var n=r.extend(!0,{},t,{type:"PUT"});return this.send(e,n)},delete:function(e,t){var n=r.extend(!0,{},t,{type:"DELETE"});return this.send(e,n)},get:function(e,t){var n=r.extend(!0,{},t,{type:"GET"});return this.send(e,n)}})}),define("baglass/app/services/AjaxService",["jquery","../../core-client/js/core-client/ui/core/Class"],function(i,e){var t=e.extend({init:function(e){i.extend(this,e),i.each(["get","put","post","delete"],function(e,r){t.prototype[r]=function(e,t){var n=i.extend({},t);return n.type=r,n.url=e,this.ajax(n)}})},ajax:function(e){var t=i.Deferred();return this.glassContext.getCoreSvc(".Ajax").ajax(e).then(function(e){t.resolve(e.data,e.textStatus,e.jqXHR)}).catch(function(e){t.reject(t,e.jqXHR,e.textStatus,e.errorThrown)}),t.promise()}});return t}),define("baglass/services/LogService",[],function(){var e=function(){this.logLevelEnum={debug:50,info:40,warn:30,error:20},this._level=this.logLevelEnum.error,this._active=!0,this.localStorageKeys={isActive:"com.ibm.ba.config.logging.isActive",level:"com.ibm.ba.config.logging.level"};var e=this._getLocalStorage(this.localStorageKeys.isActive);null!==e&&("function"==typeof e.toLowerCase&&"true"===e.toLowerCase()?this._active=!0:this._active=!1);var t=this._getLocalStorage(this.localStorageKeys.level);null!==t&&(this._level=t)};return e.prototype.turnOnLogging=function(){this._active=!0},e.prototype.turnOffLogging=function(){this._active=!1},e.prototype.isActive=function(){return this._active},e.prototype.getLevel=function(){return parseInt(this._level)},e.prototype.setLevelError=function(){this._level=this.logLevelEnum.error},e.prototype.setLevelWarn=function(){this._level=this.logLevelEnum.warn},e.prototype.setLevelInfo=function(){this._level=this.logLevelEnum.info},e.prototype.setLevelDebug=function(){this._level=this.logLevelEnum.debug},e.prototype.error=function(){this._active&&this._level>=this.logLevelEnum.error&&console.error.apply(console,this._addStack(arguments))},e.prototype.warn=function(){this._active&&this._level>=this.logLevelEnum.warn&&console.warn.apply(console,arguments)},e.prototype.info=function(){this._active&&this._level>=this.logLevelEnum.info&&console.info.apply(console,arguments)},e.prototype.debug=function(){this._active&&this._level>=this.logLevelEnum.debug&&console.debug.apply(console,arguments)},e.prototype.log=function(){this._active&&console.log.apply(console,arguments)},e.prototype.saveConfig=function(e,t){void 0!==e&&(this._level=e),void 0!==t&&(this._active=t),this._setLocalStorage(this.localStorageKeys.isActive,this._active?"true":"false"),this._setLocalStorage(this.localStorageKeys.level,this._level)},e.prototype._setLocalStorage=function(e,t){try{window.localStorage.setItem(e,t)}catch(e){console.error(e)}},e.prototype._getLocalStorage=function(e){var t=null;try{t=window.localStorage.getItem(e)||null}catch(e){console.error(e)}return t},e.prototype._addStack=function(){var e=Array.prototype.slice.call(arguments),t=(new Error).stack||"";if(""===t)try{y.name}catch(e){t=e.stack}var n=(t=t.split("\n").map(function(e){return e.trim()})).splice("Error"===t[0]?2:1);return e.push({stack:n}),e},e}),define("baglass/utils/RequestIdleCallback",[],function(){var e={requestIdleCallback:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};return setTimeout(function(){e()},Math.floor(Math.random()*(t.timeout||50)))}};return window.requestIdleCallback||(window.requestIdleCallback=e.requestIdleCallback),e}),define("baglass/services/PrefetchService",["underscore","../utils/RequestIdleCallback"],function(r){return function(){function t(e){_classCallCheck(this,t),this._FETCHED={},this.glassContext=e}return _createClass(t,[{key:"prefetchResources",value:function(e){var t=this,n=Promise.resolve();return r.isArray(e)?e.forEach(function(e){r.isString(e)?t._FETCHED[e]||(n=n.then(t._requireResource.bind(t,e))):t.glassContext.getCoreSvc(".Logger").warn("Resource ".concat(JSON.stringify(e)," is not a string..."))}):this.glassContext.getCoreSvc(".Logger").warn("Parameter ".concat(JSON.stringify(e)," is not an array...")),n}},{key:"_requireResource",value:function(n){var r=this;return this._FETCHED[n]=!0,new Promise(function(t){window.requestIdleCallback(function(){require([n],t,function(e){r.glassContext.getCoreSvc(".Logger").warn("Failed to prefetch resource at path: ".concat(n),e),t()})},{timeout:50})})}}]),t}()}),define("baglass/services/ServiceRegistry",[],function(){return function(){function t(e){_classCallCheck(this,t),this.services=e.services||{},this.deprecated={},this._waitList={},this._declared={}}return _createClass(t,[{key:"getSvc",value:function(n,r){var i=this;return new Promise(function(e,t){try{i._get(n,e,t,r)}catch(e){t(e)}})}},{key:"getSvcSync",value:function(e){if(this.services[e])return this.services[e];throw new Error('Service "'+e+'" has not been registered')}},{key:"get",value:function(e,t,n,r){this._get(e,t,n,r)}},{key:"exists",value:function(e){return!(!e||!this.services[e])}},{key:"deregister",value:function(e){this._declared[e]&&delete this._declared[e],this.exists(e)&&("function"==typeof this.services[e].destroy&&this.services[e].destroy(),delete this.services[e],this._cleanupWaitList(e))}},{key:"declare",value:function(e,t,n){if(!e)throw new Error("Illegal service declaration: name missing");if(!t)throw new Error("Illegal service declaration: modulePath missing");if(!this.exists(e)){if(this._declared[e]&&this._declared[e].modulePath!==t)throw new Error("Illegal service declaration. Attempted to re-declare a service with a different module path");this._declared[e]={modulePath:t,initializeWith:n},this._waitList[e]&&this._loadDeclaredService(e)}}},{key:"declared",value:function(e){return!!this._declared[e]}},{key:"_get",value:function(t,n,e,r){var i=this,o=function(e){i.deprecated[t]&&(console.warn("The service '"+t+"' has been deprecated."),i.deprecated[t]._replacedBy&&console.info("The service '"+t+"' has been replaced by '"+e.replacedBy+"'.")),n&&n(e)};this.services[t]?o(this.services[t]):"."===t[0]||r?this._declared[t]?this._loadDeclaredService(t).then(o):this._waitForRegister(t,o,e,r||3e4):this._loadServiceByModuleName(t,o,e)}},{key:"_loadServiceByModuleName",value:function(r,t,i){var n=this;require([r],function(e){n.services[r]||n.register(r,new e),t(n.services[r])},function(e){var t="Service module: '"+r+"' not found.";if(i){var n=new Error(t);n.causedBy=e,i(n)}else console.error(t)})}},{key:"_loadDeclaredService",value:function(i){var o=this,e=this._declared[i].modulePath,s=this._declared[i].initializeWith;return delete this._declared[i],new Promise(function(n,r){require([e],function(e){try{if(o.services[i])n(o.services[i]);else{var t=new e;Promise.resolve().then(function(){if("function"==typeof t.initialize)return t.initialize(s)}).then(function(){o.register(i,t),n(t)})}}catch(e){r(e)}},r)})}},{key:"_waitForRegister",value:function(e,t,n,r){var i=this._waitList[e]||[],o=setTimeout(this._signalRegisterFailure.bind(this,e,t,n),r);i.push({cb:t,errcb:n,timer:o}),this._waitList[e]=i}},{key:"_signalRegisterFailure",value:function(e,t,n){for(var r=this._waitList[e]||[],i=r.length-1;0<=i;i--)r[i].cb===t&&r.splice(i,1);this._waitList[e]=r;var o=new Error("Service: '"+e+"' not found.");n?n(o):console.error(o)}},{key:"register",value:function(e,t,n){var r=this;if(e&&t){var i=t;i._registry=this,n&&n.deprecated&&(this.deprecated[e]={}),n&&n.replacedBy&&(this.deprecated[e]._replacedBy=n.replacedBy),this._declared[e]&&delete this._declared[e],"function"==typeof i.__initialize?Promise.resolve(i.__initialize()).then(function(){r.services[e]=t,r._notifyWaitingConsumers(e,t)}):(this.services[e]=t,this._notifyWaitingConsumers(e,t))}}},{key:"_notifyWaitingConsumers",value:function(e,t){for(var n=this._waitList[e]||[],r=0;r<n.length;r++){var i=n[r].cb;n[r].timer&&clearTimeout(n[r].timer),i(t)}this._waitList[e]=[]}},{key:"_cleanupWaitList",value:function(e){for(var t=this._waitList[e]||[],n=t.length-1;0<=n;n--)t[n].timer&&clearTimeout(t[n].timer);this._waitList[e]=[]}},{key:"destroy",value:function(){Object.keys(this.services).forEach(this.deregister.bind(this))}}]),t}()}),define("baglass/app/services/UserProfileService",["../../core-client/js/core-client/ui/core/Class","underscore"],function(e,t){return e.extend({init:function(e){this.preferences={},t.extend(this,e)},updateContext:function(e){return t.extend(this,e),Promise.resolve()},getHomePagePref:function(){return null!=_typeof(this.preferences)&&this.preferences.hasOwnProperty("homePage")?this.preferences.homePage:null}})}),define("baglass/services/WindowProxyService",["baglass/nls/StringResources"],function(r){function s(t,e,n){if(t.config&&t.config.dialog){t.context.appController.showMessage(r.get("invalidUrl"),r.get("cannotOpenLocation"),"error",["ok","cancel"],"small",function(e){"ok"===e.btn&&t.context.close().then(function(){t.window.location.assign(t.window.location.origin,n)})},!0,"LocationDialog")}throw new Error("Invalid redirect detected: "+e)}function a(t,e,n){var r,i,o=["url: ".concat(e),"isRemote: ".concat(n)];(r=t.context.getCoreSvc(".Logger")).debug.apply(r,["validating url:"].concat(o));var s=t.window.location;if(e)try{var a=e.toString().toLowerCase().trim(),c=null!==/[^ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%\-._~:/?#[\]@!$&'()*+,;= ]/.exec(a),l=null!==/javascript:|data:/.exec(a),u=a.startsWith("//"),d=document.createElement("a");d.href=a;var p,f=d.protocol&&d.protocol.startsWith("http")&&!c&&!l&&!u;if(f&&!0!==n&&(f=d.protocol===s.protocol&&d.hostname===s.hostname&&d.port===s.port),f)return(p=t.context.getCoreSvc(".Logger")).debug.apply(p,["Url validation success:"].concat(o)),!0}catch(e){var h;(h=t.context.getCoreSvc(".Logger")).error.apply(h,["Url validation error:"].concat(o,[e]))}return(i=t.context.getCoreSvc(".Logger")).error.apply(i,["Url validation failed:"].concat(o)),!1}return function(){function r(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:window,n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{dialog:!1};_classCallCheck(this,r),this.context=e,this.config=n,(this.window=t).Proxy?(this.proxyWindow=this.proxy(t),this.context.window=this.proxyWindow):this.context.getCoreSvc(".Logger").debug("Unable to initialize WindowProxyService. Unsupported browser.")}return _createClass(r,[{key:"proxy",value:function(i){var o=this;this.context.getCoreSvc(".Logger").debug("Creating a new Window Proxy service for",i);var e=Object.fromEntries(Object.entries(i.location));e.assign=function(e,t){if(this.context.getCoreSvc(".Logger").info("Navigating to:","url: ".concat(e),"isRemote: ".concat(t)),a(this,e,t))return this.window.location.assign(e);s(this,e,t)}.bind(this),e.reload=function(){return this.context.getCoreSvc(".Logger").debug("reloading page..."),this.window.location.reload()}.bind(this),e.replace=function(e,t){if(this.context.getCoreSvc(".Logger").info("Navigating to:","url: ".concat(e),"isRemote: ".concat(t)),a(this,e,t))return this.window.location.replace(e);s(this,e,t)}.bind(this),e.toString=i.location.toString.bind(i.location);var n=new Proxy(e,{set:function(t,n,r){if(o.context.getCoreSvc(".Logger").info("Setting window.location object '".concat(n,"' to ").concat(r,"...")),["href","protocol","host","hostname","port","pathname","search","hash","origin"].includes(n)){var e=new window.URL(t.href);try{if(e[n]=r,!a(o,e.href))throw new Error;i.location[n]=r}catch(e){o.context.getCoreSvc(".Logger").error("Error setting window.location object '".concat(n,"' to ").concat(r,".")),s(o,t.href)}}else i.location[n]=r;return!0}});return new Proxy(i,{set:function(e,t,n){return o.context.getCoreSvc(".Logger").info("Setting window object '".concat(t,"' to ").concat(n,"...")),"location"===t?a(o,n)?i.location=n:s(o,n):e[t]=n,!0},get:function(e,t){return"location"===t?n:i[t]instanceof Function?i[t].bind(i):i[t]}})}}]),r}()}),define("baglass/common/ui/SlideoutController",["../../core-client/js/core-client/ui/core/Events","jquery","underscore","./SlideoutRegistry","../../core-client/js/core-client/ui/Slideout"],function(e,o,t,n,s){var a=0,c=0,r=e.extend({init:function(e){r.inherited("init",this,arguments),o.extend(this,e),c=0},openSlideout:function(e,t){var n=this._checkForSlideoutInstanceReuse(e,t);if(n)return n;var r=function(e,t){var n,r=e;n=s.prototype.isPrototypeOf(t)?t:new s(t);var i=this.registry.application.getRegisteredSlideout(n.getRootId());return i?r="application":(i=this.registry.appView.getRegisteredSlideout(n.getRootId()))&&(r="appView"),i&&i!==n.getRootParent()&&(n=i),{slideout:n,scope:r}}.call(this,e,t),i=function(e){var t=this.registry.application.getOpenSlideout(e);return t||(t=this.registry.appView.getOpenSlideout(e)),t}.call(this,r.slideout.position);return"application"===e?(a++,o("body").addClass("openedSlideout")):"appView"===e&&(c++,o("body").addClass("openedAppViewSlideout")),i?i.hide({hideOnly:i.hideOnly,force:!0}).done(function(){this.registry[r.scope].openSlideout(r.slideout),this._checkNavBarButtons(r)}.bind(this)):(this.registry[r.scope].openSlideout(r.slideout),this._checkNavBarButtons(r)),t.reuseSlideout||(r.slideout.off("hide",null,"slideoutHideHandler"),r.slideout.on("hide",function(e){"application"===e?a=Math.max(0,a-1):"appView"===e&&(c=Math.max(0,c-1)),0===a&&o("body").removeClass("openedSlideout"),0===c&&o("body").removeClass("openedAppViewSlideout")}.bind(this,e),"slideoutHideHandler")),r.slideout},_checkForSlideoutInstanceReuse:function(e,t){var n=t.id,r=this.registry.appView.getOpenSlideout(t.position);if(r&&"appView"===e&&n===r.id&&t.reuseSlideout){r.trigger("hide"),r.off(),r.setContent(t.content),this.registry[e].openSlideout(r);var i=t.resizable&&t.resizable.min;return i||(i=parseInt(t.width,10)),i&&i>r.getWidth()&&r.setWidth(i),this._checkNavBarButtons({scope:e,slideout:r}),r}return null},_checkNavBarButtons:function(e){if(e.slideout.content){var t=null;if(-1!==e.slideout.content.module.indexOf("bi/content_apps/MyContent")?t="com.ibm.bi.contentApps.myContentFoldersSlideout":-1!==e.slideout.content.module.indexOf("bi/content_apps/TeamFolders")&&(t="com.ibm.bi.contentApps.teamFoldersSlideout"),t&&e.slideout.glassContext){var n=e.slideout.glassContext.findPlugin(t);n.setPressed(),e.slideout.on("hide",n.setUnpressed.bind(n))}}},updateRegistryContainer:function(e){this.registry.application.changeContainer(e),this.registry.appView.getContainer()||this.registry.appView.changeContainer(e)},cleanupSlideoutRegistry:function(){this.registry.application.cleanupSlideouts(),this.registry.appView.cleanupSlideouts()},closeAllOpenedSlideouts:function(){var e=!(0<arguments.length&&void 0!==arguments[0])||arguments[0],t=[],n=this.registry.application.getOpenSlideouts();return e||(n=n.concat(this.registry.appView.getOpenSlideouts())),n.forEach(function(e){t.push(e.hide({force:!0,hideOnly:e.hideOnly}))}),Promise.all(t).then(function(){return!0})}});return r}),define("baglass/app/AppEvents",[],function(){var e=function(e){return e?"appView"+e:"appview"};return Object.freeze({APPVIEW:e(),APPVIEW_LOADED:e(":loaded")})}),define("baglass/app/plugins/GlassPlugin",["../../core-client/js/core-client/ui/core/Class","../../core-client/js/core-client/utils/Utils","../../core-client/js/core-client/utils/ClassFactory","jquery","underscore","../../utils/Utils","../AppEvents"],function(e,r,n,a,c,t,o){return e.extend({init:function(e){a.extend(!0,this,e),this.itemSpec=this.itemSpec||{},this.$el=a("<div>"),t.errorProtect(this,["render","show","hide","changeLabel"])},getRootElement:function(){return this.$el},render:function(){return this.$el.text(c.unescape(this.itemSpec.label)),this._addClass(this.$el,this.itemSpec.class),this._setIcon(this.$el),this.registerOneTimeCallback(o.APPVIEW_LOADED),Promise.resolve(this.$el.get()[0])},remove:function(){this.$el.remove()},attachActionControllerCallbacks:function(){console.debug("attachActionControllerCallbacks not implemented")},enable:function(){this._getContainer().removeClass("disabled"),this._getContainer().children().attr("tabindex","0")},disable:function(){this._getContainer().addClass("disabled"),this._getContainer().children().attr("tabindex","-1")},show:function(){this._getContainer().show()},hide:function(){this._getContainer().hide()},getController:function(){var t=this;return this._loadingController||(this.itemSpec.actionController?c.isString(this.itemSpec.actionController)?this._loadingController=n.instantiate(this.itemSpec.actionController.trim()).then(function(e){if(t._controller=e,c.isFunction(t._controller.initialize))return t._controller.initialize({glassContext:t.glassContext,target:{plugin:t,itemId:t.itemSpec.id}})}).then(function(){return t._controller}):this._loadingController=Promise.reject(new Error("actionController is not a string")):this._loadingController=Promise.resolve(this._controller)),this._loadingController},showCoachMark:function(){var s=this;return new Promise(function(e){var t=s.glassContext.getCoreSvc(".CoachMarkService"),o=t.getRenderer(),n=t.getPersistence(),r=s.itemSpec.id+"PluginContainer";e(n.isRead(r).then(function(r){var i={};return a.extend(i,s.itemSpec.coachMark),s.getController().then(function(e){var t=!1;if(c.isFunction(e.getCoachMarkSpec)){var n={glassContext:s.glassContext,target:{coachMark:i,itemId:s.itemSpec.id}};i=e.getCoachMarkSpec(n)||i}return c.isEmpty(i)||(s.glassContext.addToOptions(i),s.coachMark=new o(i),t=!s._getContainer().hasClass("disabled")&&!r,s.coachMark.render(s._getContainer(),t)),t})}))})},_getContainer:function(){return this.$container},changeLabel:function(e){console.info("GlassPlugin.changeLabel no implemented - passed label is: "+e)},changeIcon:function(e,t,n){e?(this.$el.find("svg.svgIcon, img, span.webfont").first().remove(),r.setIcon(this.$el,e,t,n)):console.warn("Invalid plugin icon. Icon unchanged.")},registerOneTimeCallback:function(e){var r=this,i=this.glassContext.getCoreSvc(".Events").on(e,function(t,n){var e=c.isFunction(r.onEventListener)?r.onEventListener:function(){};try{e.call(r,t,n)}catch(e){r.glassContext.getCoreSvc(".Logger").error("GlassPlugin event callbak failure",t,n,e)}finally{i.remove()}},this)},onEventListener:function(t,n){var r=this,i=this.glassContext.getCoreSvc(".Logger");return this.getController().then(function(e){if(e)switch(n){case o.APPVIEW_LOADED:r.appView&&r.appView===t.appView?r._onAppViewLoaded(e,i,t,n):i.info(o.APPVIEW_LOADED+" is ignored due to mismatched appView",r.appView,t.appView);break;default:i.warn("unhandled event in plugin",r,t,n)}}).catch(function(e){i.error("error on event callback",r,e)})},_onAppViewLoaded:function(e,t){c.isFunction(e.onRender)&&e.onRender({glassContext:this.glassContext,target:{plugin:this,itemId:this.itemSpec.id}}),this.showCoachMark().catch(function(e){t.error("failed to show coachmark",e)})},_setAttr:function(e,t,n){n&&e.attr(t,n)},_addClass:function(e,t){t&&e.addClass(t)},_setIcon:function(e){var t=this.itemSpec.icon;r.setIcon(e,t)}})}),define("baglass/core-client/js/core-client/utils/Deferred",[],function(){"use strict";return function(){var e,t,n=new Promise(function(){e=arguments[0],t=arguments[1]});return{resolve:e,reject:t,promise:n}}}),define("baglass/app/plugins/MenuActionInterface",["../../core-client/js/core-client/ui/core/Class"],function(e){return e.extend({onSelectItem:function(){},onRenderItem:function(){},isItemVisible:function(){return!0},isItemSelected:function(){return!1},onRender:function(){},onOpen:function(){},getCoachMarkSpec:function(){},getLabel:function(){}})}),define("baglass/app/plugins/MenuActionControllerDispatcher",["underscore","jquery","./MenuActionInterface","../../api/Context"],function(s,r,e,a){return e.extend({init:function(e){this._oControllerMap={},this._oItemMap={},s.extend(this._oControllerMap,e)},getControllerMap:function(){return this._oControllerMap},onSelectItem:function(e){var t=e.target.itemId,n=this._findController(t);if(n&&s.isFunction(n.onSelectItem))n.onSelectItem.call(n,e);else if(n&&s.isFunction(n.execute)){var r=new a(e.glassContext),i=this._getOptions(e);n.execute.call(n,r,i)}},onRender:function(t){s.each(this._oControllerMap,function(e){e&&s.isFunction(e.onRender)&&e.onRender.call(e,r.extend(!0,{},t))},this)},onOpen:function(n){var e=s.values(this._oControllerMap).map(function(t){if(t&&s.isFunction(t.onOpen))return new Promise(function(e){e(t.onOpen(r.extend(!0,{},n)))}).catch(function(e){n.glassContext.getCoreSvc(".Logger").warn(e)})});return Promise.all(e)},onRemoveItem:function(e){var t=e.target.itemId,n=this._findController(t);if(n&&s.isFunction(n.onRemoveItem))return n.onRemoveItem.call(n,r.extend(!0,{},e))},onRenderItem:function(e){var t=e.target.itemId,n=this._findController(t);n&&s.isFunction(n.onRenderItem)&&n.onRenderItem.call(n,r.extend(!0,{},e))},_getOptions:function(e){return{options:e.options?this._combineOptions(e):e.target.plugin.itemSpec.items[e.target.specItemIndex].options}},_combineOptions:function(e){var t,n=this._checkValidityPluginOptions(e)?e.target.plugin.itemSpec.items[e.target.specItemIndex].options:{};if(t=Object.assign({},e.options),n)for(var r in n)r in t||(t[r]=n[r]);return t},_checkValidityPluginOptions:function(e){var t=e&&e.target&&e.target.plugin&&e.target.plugin.itemSpec&&e.target.plugin.itemSpec.items&&Array.isArray(e.target.plugin.itemSpec.items),n=t&&void 0!==e.target.specItemIndex&&null!==e.target.specItemIndex&&0<=e.target.specItemIndex&&e.target.specItemIndex<e.target.plugin.itemSpec.items.length;return t&&n&&e.target.plugin.itemSpec.items[e.target.specItemIndex].options&&"object"===_typeof(e.target.plugin.itemSpec.items[e.target.specItemIndex].options)},_invokeControllerIsItemVisible:function(e){var t=e.target.itemId,n=this._findController(t),r=!s.isUndefined(n);if(r&&s.isFunction(n.isItemVisible))r=n.isItemVisible.call(n,e);else if(r&&s.isFunction(n.isVisible)){var i=new a(e.glassContext),o=this._getOptions(e);r=n.isVisible.call(n,i,o)}return r=!!s.isBoolean(r)&&r},isItemDisabled:function(e){var t=e.target.itemId,n=this._findController(t);return!(!n||!s.isFunction(n.isItemDisabled))&&n.isItemDisabled.call(n,e)},isItemVisible:function(e){var t=e.glassContext.getCurrentContentView();return t&&s.isFunction(t.isMenuItemVisible)?!0===t.isMenuItemVisible(e)&&this._invokeControllerIsItemVisible(e):this._invokeControllerIsItemVisible(e)},isItemSelected:function(e){var t=e.target.itemId,n=!1,r=this._findController(t);return r&&s.isFunction(r.isItemSelected)&&(n=r.isItemSelected.call(r,e),n=!!s.isBoolean(n)&&n),n},getLabel:function(e){var t=e.target.itemId,n=this._findController(t);if(n&&s.isFunction(n.getLabel))return n.getLabel.call(n,r.extend(!0,{},e))},buildItemMap:function(e){s.reduce(e,function(e,t){return t.id&&(e[t.id]=t),e},this._oItemMap)},getItemMap:function(){return this._oItemMap},setGlassMenu:function(e){this._glassMenu=e},_findController:function(e){var t,n=this._oItemMap[e];return n&&(t=this._oControllerMap[n.featureId]),t}})}),define("baglass/core-client/js/core-client/ui/Menu",["./AccessibleView","../utils/Utils","../nls/StringResources","../utils/BidiUtil","underscore","jquery","jquery-ui"],function(e,d,p,f,h,g){var n=e.extend({tagName:"nav",events:{"primaryaction .commonMenuItem":"_onSelectItem","primaryaction .moduleMenuItem":"_onSelectModuleItem",escapeaction:"_handleEscape"},init:function(e){h.extend(this,e.spec),this.enableTabLooping=!0,n.inherited("init",this,e.spec),this.$el.attr("role","navigation"),this.closeMenu=this._closeMenu.bind(this)},render:function(){try{this.$el.empty(),this.$el.attr("class",""),this.$el.addClass("commonMenu").addClass("commonMenuActive"),this._itemMap={};var l=g("<ul></ul>",{role:"menu",tabIndex:"0"}).addClass("commonMenuItems"),u=h.filter(this.items,function(e){return""!==e.icon&&void 0!==e.icon});return h.each(this.items,function(e){var t=g("<li></li>",{role:"group",tabIndex:"0"}).addClass("commonMenuItem");!0===e.selected&&t.addClass("selected"),e.disabled&&t.addClass("disabled"),t.addClass(e.id);var n=this._buildDomItemId();if(this._itemMap[n]=e,t.attr("id",n),e.module)t.append(this._loadModule(t,e.module)),t.removeClass("commonMenuItem"),t.addClass("moduleMenuItem");else if("divider"===e.type)t.addClass(e.type),t.attr("tabIndex","-1");else{var r=g("<a></a>").addClass("commonMenuLink"),i=g("<span></span>"),o=h.isString(e.label)?e.label:"";r.attr("role","menuitem"),t.attr("aria-label",o),i.text(o),i.attr("title",f.enforceTextDirection(o)),i.attr("dir",f.resolveBaseTextDir(o)),u.length&&!1!==e.indent&&i.addClass("hasIcon"),e.badge&&g("<span>").addClass("badge").text(e.badge).appendTo(i),r.append(i),d.setIcon(r,e.icon,e.iconTooltip,null,null,e.iconColor),t.append(r)}if(e.rightIcon){var s=g("<div>").addClass("rightIcon").attr("title",e.rightIcon.title);d.setIcon(s,e.rightIcon.icon),t.append(s)}if(e.removable){var a=e.removeIconLabel||p.get("remove"),c=g("<div></div>",{role:"button","aria-labelledby":n,title:a,tabIndex:"0"}).addClass("removeItemIcon");c.focus(function(e){g(e.target).parent().addClass("hasFocus")}),c.blur(function(e){g(e.target).parent().removeClass("hasFocus")}),d.setIcon(c,"common-close_16"),c.on("primaryaction.bi.commons.ui.menu",this._handleRemoveItem.bind(this,t)),t.append(c)}l.append(t),e&&h.isFunction(e.onRender)&&e.onRender(t)},this),l.is(":empty")||(this.$el.append(l),this.enableLooping(l)),n._registerOpenMenu(this),setTimeout(function(){this.setFocus(),this._attachCloseCallbacks()}.bind(this),200),Promise.resolve(this.el)}catch(e){return Promise.reject(e)}},setFocus:function(){this.$el.find(".commonMenuItems").focus()},_handleRemoveItem:function(t,e){var n=this._itemMap[t.attr("id")];if(e.stopPropagation(),n&&h.isFunction(n.onRemove)){var r=n.onRemove();Promise.resolve(r).then(function(e){e&&(this._setNextTabFocus(t),t.remove())}.bind(this)),delete this._itemMap[t.attr("id")]}},_setNextTabFocus:function(e){var t=e.next(".commonMenuItem");0===t.length&&(t=e.prev(".commonMenuItem")),t.focus()},_handleEscape:function(e){return this._closeMenu(e,!1),this.getLaunchPoint().focus(),!1},_onSelectItem:function(e){var t=this._itemMap[e.currentTarget.id];e.stopPropagation(),e.gesture&&e.gesture.preventDefault(),this._closeMenu(e,!1),t&&h.isFunction(t.onSelect)&&t.onSelect()},_onSelectModuleItem:function(e){var t=this._itemMap[e.currentTarget.id];e.stopPropagation(),this._closeMenu(e,!0),t&&h.isFunction(t.onSelect)&&t.onSelect()},_buildDomItemId:function(){return this.viewId+"_"+h.uniqueId("item")},_attachCloseCallbacks:function(){g(document).on("primaryaction.bi.commons.ui.menu",this.closeMenu),g(document).on("contextmenu.bi.commons.ui.menu",this.closeMenu),g(window).on("resize.bi.commons.ui.menu",this.closeMenu)},_closeMenu:function(e,t){return t?Promise.resolve():h.isFunction(this.whenReadyToClose)?this.whenReadyToClose(e).then(this.remove.bind(this),this.remove.bind(this)):(this.remove(),Promise.resolve())},_loadModule:function(t,e){require([e],function(e){return new e({$el:t}).render()}.bind(this))},remove:function(){n._unregisterOpenMenu(this),g(document).off(".bi.commons.ui.menu",this.closeMenu),g(window).off(".bi.commons.ui.menu",this.closeMenu),n.inherited("remove",this,arguments)}});return n._openMenus=[],n._registerOpenMenu=function(e){h.contains(n._openMenus,e)||(n._openMenus.push(e),g("body").hasClass("openedMenu")||g("body").addClass("openedMenu"))},n._unregisterOpenMenu=function(t){n._openMenus=h.reject(n._openMenus,function(e){return e===t}),0===n._openMenus.length&&g("body").removeClass("openedMenu")},n.hideOpenMenus=function(){h.each(n._openMenus,function(e){e.closeMenu()})},n}),define("baglass/app/plugins/GlassContextMenu",["./GlassPlugin","jquery","underscore","../../core-client/js/core-client/utils/ClassFactory","../../core-client/js/core-client/utils/Deferred","./MenuActionControllerDispatcher","../../core-client/js/core-client/ui/Menu","../../utils/Utils"],function(e,a,c,t,o,n,l,u){var d=e.extend({_ClassFactory:t,init:function(e){a.extend(!0,this,e)},getRootElement:function(){return this.glassContext.getCoreSvc(".Logger").warn("GlassContextMenu::getRootElement() is being deprecated!"),this.$el},getMenu:function(){return this.glassContext.getCoreSvc(".Logger").warn("GlassContextMenu::getMenu() is being deprecated!"),this._menu},render:function(){var n=new o,r=[],i=[],s={};return c.each(this.itemSpec.actionControllers,function(e,t){r.push(this._createController(e,t)),i.push(t)}.bind(this)),u.waitForAllOrSomePromises(r).done(function(){try{l.hideOpenMenus(),c.each(r,function(e,t){e.isFulfilled()&&(s[i[t]]=e.responseModule)}),this._oControllerDispatcher=this._createControllerDispatcher(s);var o=[];this._oControllerDispatcher.buildItemMap(this.itemSpec.items),this._menu=this._createUIMenu(o),c.each(this.itemSpec.items,function(e,t){var n={glassContext:this.glassContext,target:{plugin:this,itemId:e.id,activeObject:this.activeObject,specItemIndex:t},options:this.options};if(this._oControllerDispatcher.isItemVisible(n)){var r={};a.extend(!0,r,e),r.name=e.id,r.onSelect=this._oControllerDispatcher.onSelectItem.bind(this._oControllerDispatcher,n),r.disabled=this._oControllerDispatcher.isItemDisabled(n);var i=this._oControllerDispatcher.getLabel(n);c.isUndefined(i)||(r.label=i),this._oControllerDispatcher.isItemSelected(n)&&(r.selected=!0),o.push(r)}},this),this._menu.render().then(function(e){this.$el=a(e);var t={glassContext:this.glassContext,target:{plugin:this,itemId:this.itemSpec.id,activeObject:this.activeObject}};this._oControllerDispatcher.onRender(t),n.resolve(e)}.bind(this),function(e){n.reject({msg:d.errors.FAILURE_RENDERING_MENU,causedBy:e})})}catch(e){n.reject({msg:d.errors.FAILURE_RENDERING_MENU,causedBy:e})}}.bind(this)).fail(function(e){n.reject({msg:d.errors.FAILURE_RENDERING_MENU,causedBy:e})}),n.promise},_createControllerDispatcher:function(e){return new n(e)},_createUIMenu:function(e){return new l({spec:{items:e}})},_createController:function(e,t){var n,r={glassContext:this.glassContext,target:{plugin:this,itemId:this.itemSpec.id},controllerConfig:this.itemSpec.controllerConfig&&this.itemSpec.controllerConfig[t]};return this._ClassFactory.instantiate(e).then(function(e){if(n=e,c.isFunction(n.initialize))return n.initialize(r)}).then(function(){if(c.isFunction(n.onOpen))return n.onOpen(r)}).then(function(){return n})}});return d.errors={FAILURE_RENDERING_MENU:"Failure when rendering the contextual menu",FAILURE_CREATING_CONTROLLER:"Failure creating one of the menu controllers"},d}),define("baglass/utils/WorkArounds",["../core-client/js/core-client/utils/Utils"],function(t){return{apply:function(){this._locationOrigin()},_locationOrigin:function(){var e=t.getCurrentWindow();e.location.origin||(e.location.origin=e.location.protocol+"//"+e.location.hostname+(e.location.port?":"+e.location.port:""))}}}),function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("prop-types"),require("react"),require("underscore"),require("jquery"),require("mobx-state-tree"),require("baglass/core-client/js/core-client/utils/ClassFactory"),require("ca-ui-toolkit-core"),require("mobx-react"),require("mobx"),require("baglass/nls/StringResources"),require("baglass/utils/Utils"),require("baglass/core-client/js/core-client/errors/BaseError"),require("react-dom"),require("baglass/api/Url"),require("baglass/core-client/js/core-client/ui/KeyCodes"),require("baglass/core-client/js/core-client/ui/ToastMessage"),require("baglass/app/utils/CloseViewUtils"),require("baglass/common/ui/SlideoutRegistry"),require("baglass/api/Context"),require("baglass/services/AjaxService"),require("baglass/services/ClipboardService"),require("baglass/app/services/CoachMarkService"),require("baglass/app/services/ConfigService"),require("baglass/services/ContextService"),require("baglass/services/EventsService"),require("baglass/services/FeatureChecker"),require("baglass/app/FeatureRules"),require("baglass/app/services/FetchService"),require("baglass/app/services/AjaxService"),require("baglass/services/LogService"),require("baglass/services/PrefetchService"),require("baglass/services/ServiceRegistry"),require("baglass/app/services/UserProfileService"),require("baglass/services/WindowProxyService"),require("baglass/core-client/js/core-client/utils/PerfUtils"),require("baglass/core-client/js/core-client/ui/Slideout"),require("baglass/common/ui/SlideoutController"),require("baglass/app/plugins/GlassContextMenu"),require("baglass/core-client/js/core-client/ui/Menu"),require("baglass/utils/WorkArounds"));else if("function"==typeof define&&define.amd)define("baglass/glass.webpack.bundle",["prop-types","react","underscore","jquery","mobx-state-tree","baglass/core-client/js/core-client/utils/ClassFactory","ca-ui-toolkit-core","mobx-react","mobx","baglass/nls/StringResources","baglass/utils/Utils","baglass/core-client/js/core-client/errors/BaseError","react-dom","baglass/api/Url","baglass/core-client/js/core-client/ui/KeyCodes","baglass/core-client/js/core-client/ui/ToastMessage","baglass/app/utils/CloseViewUtils","baglass/common/ui/SlideoutRegistry","baglass/api/Context","baglass/services/AjaxService","baglass/services/ClipboardService","baglass/app/services/CoachMarkService","baglass/app/services/ConfigService","baglass/services/ContextService","baglass/services/EventsService","baglass/services/FeatureChecker","baglass/app/FeatureRules","baglass/app/services/FetchService","baglass/app/services/AjaxService","baglass/services/LogService","baglass/services/PrefetchService","baglass/services/ServiceRegistry","baglass/app/services/UserProfileService","baglass/services/WindowProxyService","baglass/core-client/js/core-client/utils/PerfUtils","baglass/core-client/js/core-client/ui/Slideout","baglass/common/ui/SlideoutController","baglass/app/plugins/GlassContextMenu","baglass/core-client/js/core-client/ui/Menu","baglass/utils/WorkArounds"],t);else{var n="object"==typeof exports?t(require("prop-types"),require("react"),require("underscore"),require("jquery"),require("mobx-state-tree"),require("baglass/core-client/js/core-client/utils/ClassFactory"),require("ca-ui-toolkit-core"),require("mobx-react"),require("mobx"),require("baglass/nls/StringResources"),require("baglass/utils/Utils"),require("baglass/core-client/js/core-client/errors/BaseError"),require("react-dom"),require("baglass/api/Url"),require("baglass/core-client/js/core-client/ui/KeyCodes"),require("baglass/core-client/js/core-client/ui/ToastMessage"),require("baglass/app/utils/CloseViewUtils"),require("baglass/common/ui/SlideoutRegistry"),require("baglass/api/Context"),require("baglass/services/AjaxService"),require("baglass/services/ClipboardService"),require("baglass/app/services/CoachMarkService"),require("baglass/app/services/ConfigService"),require("baglass/services/ContextService"),require("baglass/services/EventsService"),require("baglass/services/FeatureChecker"),require("baglass/app/FeatureRules"),require("baglass/app/services/FetchService"),require("baglass/app/services/AjaxService"),require("baglass/services/LogService"),require("baglass/services/PrefetchService"),require("baglass/services/ServiceRegistry"),require("baglass/app/services/UserProfileService"),require("baglass/services/WindowProxyService"),require("baglass/core-client/js/core-client/utils/PerfUtils"),require("baglass/core-client/js/core-client/ui/Slideout"),require("baglass/common/ui/SlideoutController"),require("baglass/app/plugins/GlassContextMenu"),require("baglass/core-client/js/core-client/ui/Menu"),require("baglass/utils/WorkArounds")):t(e["prop-types"],e.react,e.underscore,e.jquery,e["mobx-state-tree"],e["baglass/core-client/js/core-client/utils/ClassFactory"],e["ca-ui-toolkit-core"],e["mobx-react"],e.mobx,e["baglass/nls/StringResources"],e["baglass/utils/Utils"],e["baglass/core-client/js/core-client/errors/BaseError"],e["react-dom"],e["baglass/api/Url"],e["baglass/core-client/js/core-client/ui/KeyCodes"],e["baglass/core-client/js/core-client/ui/ToastMessage"],e["baglass/app/utils/CloseViewUtils"],e["baglass/common/ui/SlideoutRegistry"],e["baglass/api/Context"],e["baglass/services/AjaxService"],e["baglass/services/ClipboardService"],e["baglass/app/services/CoachMarkService"],e["baglass/app/services/ConfigService"],e["baglass/services/ContextService"],e["baglass/services/EventsService"],e["baglass/services/FeatureChecker"],e["baglass/app/FeatureRules"],e["baglass/app/services/FetchService"],e["baglass/app/services/AjaxService"],e["baglass/services/LogService"],e["baglass/services/PrefetchService"],e["baglass/services/ServiceRegistry"],e["baglass/app/services/UserProfileService"],e["baglass/services/WindowProxyService"],e["baglass/core-client/js/core-client/utils/PerfUtils"],e["baglass/core-client/js/core-client/ui/Slideout"],e["baglass/common/ui/SlideoutController"],e["baglass/app/plugins/GlassContextMenu"],e["baglass/core-client/js/core-client/ui/Menu"],e["baglass/utils/WorkArounds"]);for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}(window,function(n,r,i,o,s,a,c,l,u,d,p,f,h,g,v,y,m,b,_,w,C,S,P,O,E,x,M,T,A,D,j,I,L,k,R,N,U,F,V,B){return function(n){var r={};function i(e){if(r[e])return r[e].exports;var t=r[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,i),t.l=!0,t.exports}return i.m=n,i.c=r,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)i.d(n,r,function(e){return t[e]}.bind(null,r));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="/bi/js/glass/baglass/js/baglass/app/",i(i.s=52)}([function(e,t){e.exports=n},function(e,t){e.exports=r},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}n.r(t),n.d(t,"default",function(){return a});var i,o,s,a=(i=function n(){!function(e,t){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this)},o&&r(i.prototype,o),s&&r(i,s),Object.defineProperty(i,"prototype",{writable:!1}),i);a.POSITION="position",a.PLACEMENT="placement",a.CENTER="center",a.LEADING="leading",a.LOOPS="loops",a.PANE="pane",a.TOOL_ITEMS="toolItems",a.TRAILING="trailing",a.TOP="top",a.BOTTOM="bottom",a.LEFT="left",a.RIGHT="right",a.INVERSE_DIRECTION_MAP={left:"right",right:"left",top:"bottom",bottom:"top"}},function(e,t){e.exports=i},function(e,t){e.exports=o},function(e,t){e.exports=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(e){this.Glass=e,this.eventService=e.getCoreSvc(".Events"),this.logger=e.getCoreSvc(".Logger")}},function(e,t){e.exports=a},function(e,t){e.exports=c},function(e,t){e.exports=l},function(e,t){e.exports=u},function(e,t){e.exports=d},function(e,t){e.exports=p},function(e,t,n){"use strict";n.r(t),n.d(t,"default",function(){return a});var i=n(2),r=n(3),o=n.n(r);function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var a=function(){function n(){!function(e,t){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this)}var e,t;return e=n,t=[{key:"generatePositionMap",value:function(e){var r={};return e.forEach(function(e){var t=e[i.default.POSITION];if(t){r[t]||(r[t]=[]),e.attr={},e.id&&(e.attr.id=e.id),o.a.isString(e.role)&&(e.attr.role=e.role),e["aria-label"]&&(e.attr["aria-label"]=e["aria-label"]);var n=i.default.INVERSE_DIRECTION_MAP[t]||"right";e.toolItemGroups&&e.toolItemGroups.forEach(function(e){e.toolItems&&e.toolItems.forEach(function(e){e.ddMenuPlacement=e[i.default.PLACEMENT]||n})}),r[t].push(e)}}),r}},{key:"isContentPane",value:function(e){return o.a.isEmpty(e)}},{key:"convertToolBarsToLayoutObject",value:function(e){var t={};return e&&0<e.length?t=this.generatePositionMap(e):t[i.default.LOOPS]=[],(t[i.default.TOP]||t[i.default.BOTTOM])&&(t.class="paneColumn",t[i.default.LOOPS]=[i.default.TOP,i.default.BOTTOM],t[i.default.PANE]={}),(t[i.default.LEFT]||t[i.default.RIGHT])&&(t[i.default.PANE]?(t[i.default.LEFT]&&(t[i.default.PANE][i.default.LEFT]=t[i.default.LEFT],delete t[i.default.LEFT]),t[i.default.RIGHT]&&(t[i.default.PANE][i.default.RIGHT]=t[i.default.RIGHT],delete t[i.default.RIGHT]),t[i.default.PANE].class="paneRow",t[i.default.PANE][i.default.LOOPS]=[i.default.LEFT,i.default.RIGHT],t[i.default.PANE][i.default.PANE]={}):(t.class="paneRow",t[i.default.LOOPS]=[i.default.LEFT,i.default.RIGHT],t[i.default.PANE]={})),t}}],null&&s(e.prototype,null),s(e,t),Object.defineProperty(e,"prototype",{writable:!1}),n}()},function(e,t){e.exports=f},function(e,t,n){"use strict";n.r(t);var o=Object.freeze({APPVIEW:"appview",APPVIEW_LOADED:"appView:loaded"}),r=n(3),a=n.n(r),i=n(7),s=n.n(i);function c(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var u=function(){function n(e){!function(e,t){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this),Object.assign(this,e),this.registerOneTimeCallback(o.APPVIEW_LOADED)}var e;return l((e=n).prototype,[{key:"getRootElement",value:function(){this.glassContext.getCoreSvc(".Logger").debug("getRootElement not implemented")}},{key:"render",value:function(){this.glassContext.getCoreSvc(".Logger").debug("render not implemented")}},{key:"remove",value:function(){this.store.setVisible(!1)}},{key:"disable",value:function(){this.store.setDisabled(!0)}},{key:"enable",value:function(){this.store.setDisabled(!1)}},{key:"isVisible",value:function(){return this.store.visible}},{key:"show",value:function(){this.store.setVisible(!0),this.showContainer()}},{key:"hide",value:function(){this.store.setVisible(!1),this.hideContainer()}},{key:"changeLabel",value:function(e){this.store.setLabel(e)}},{key:"changeIcon",value:function(e){this.store.setIconId(e)}},{key:"showContainer",value:function(){var e=this.getContainer();e&&e.show&&e.show()}},{key:"hideContainer",value:function(){var e=this.getContainer();e&&e.hide&&e.hide()}},{key:"getActionController",value:function(){var t=this,n=this.glassContext.getCoreSvc(".Logger");if(!this.controllerDispatcher)if(this.itemSpec.actionController)"string"!=typeof this.itemSpec.actionController?this.controllerDispatcher=Promise.reject(new Error("actionController is not a string")):this.controllerDispatcher=s.a.instantiate(this.itemSpec.actionController.trim()).then(function(e){return t.actionController=e,a.a.isFunction(e.initialize)?t.actionController.initialize({glassContext:t.glassContext,target:{plugin:t,itemId:t.itemSpec.id}}):Promise.resolve()}).then(function(){return t.actionController}).catch(function(e){n.error("failed to retrieve the actionController or invoke its method",e)});else{if(!this.actionController)return Promise.resolve();this.controllerDispatcher=Promise.resolve(this.actionController)}return Promise.resolve(this.controllerDispatcher)}},{key:"getContainer",value:function(){return this.$container}},{key:"showCoachMark",value:function(){var s=this;return new Promise(function(e){var t=s.glassContext.getCoreSvc(".CoachMarkService"),o=t.getRenderer(),n=t.getPersistence(),r="".concat(s.itemSpec.id,"PluginContainer");e(n.isRead(r).then(function(r){var i=function(i){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?c(Object(o),!0).forEach(function(e){var t,n,r;t=i,r=o[n=e],n in t?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(o)):c(Object(o)).forEach(function(e){Object.defineProperty(i,e,Object.getOwnPropertyDescriptor(o,e))})}return i}({},s.itemSpec.coachMark);return s.getActionController().then(function(e){var t=!1;if(a.a.isFunction(e.getCoachMarkSpec)){var n={glassContext:s.glassContext,target:{coachMark:i,itemId:s.itemSpec.id}};i=e.getCoachMarkSpec(n)||i}return a.a.isEmpty(i)||(i.glassContext=s.glassContext,s.coachMark=new o(i),t=!s.getContainer().hasClass("disabled")&&!r,s.coachMark.render(s.getContainer(),t)),t})}))})}},{key:"registerOneTimeCallback",value:function(e){var r=this,i=this.glassContext.getCoreSvc(".Events").on(e,function(t,n){var e=a.a.isFunction(r.onEventListener)?r.onEventListener:function(){};try{e.call(r,t,n)}catch(e){r.glassContext.getCoreSvc(".Logger").error("GlassPlugin event callback failure",t,n,e)}finally{i.remove()}},this)}},{key:"onEventListener",value:function(t,n){var r=this,i=this.glassContext.getCoreSvc(".Logger");return this.getActionController().then(function(e){if(e)switch(n){case o.APPVIEW_LOADED:r.appView&&r.appView===t.appView?r.onAppViewLoaded(e,i,t,n):i.info("".concat(o.APPVIEW_LOADED," is ignored due to mismatched appView"),r.appView,t.appView);break;default:i.warn("unhandled event in plugin",r,t,n)}}).catch(function(e){i.error("error on event callback",r,e)})}},{key:"onAppViewLoaded",value:function(e,t){a.a.isFunction(e.onRender)&&e.onRender({glassContext:this.glassContext,target:{plugin:this,itemId:this.itemSpec.id}}),this.showCoachMark().catch(function(e){t.error("failed to show coachmark",e)})}}]),Object.defineProperty(e,"prototype",{writable:!1}),n}();t.default=u},function(e,t,n){"use strict";var r,s=n(1),b=n.n(s),i=n(4),a=n.n(i),o=n(3),c=n.n(o),l=n(0),u=n.n(l),_=n(8),d=n(9);function p(e){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function g(r){var i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=v(r);if(i){var n=v(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===p(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)}}function v(e){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var y=Object(d.observer)(r=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&h(e,t)}(o,s.Component);var t,i=g(o);function o(){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))).setButtonRef=function(e){t.props.store.setButtonRef(e)},t}return f((t=o).prototype,[{key:"componentDidMount",value:function(){var e=this.props.onMount;e&&e()}},{key:"render",value:function(){var e,t,n,r=this.props,i=r.id,o=r.title,s=r.className,a=r.variant,c=r.onClick,l=r.store,u=r.push,d=l.pushed,p=l.disabled,f=l.iconId,h=l.label,g=l.visible,v=(e=f)?-1!==e.search(/\.jpeg$|\.jpg$|\.png$|\.gif$|\.svg$/)?(n=e,b.a.createElement("img",{src:n,alt:"Button Icon"})):(t=e,b.a.createElement(_.SVGIcon,{className:"svgIcon",iconId:t,size:"normal",verticalAlign:"middle"})):null,y=!0===Boolean(u)?_.PushButton:_.Button,m=s;return h&&(s?m+=" labelled":m="labelled"),g&&b.a.createElement(y,{id:i,title:o||h,label:h,className:m,variant:v&&a,onClick:c,icon:v,checked:d,disabled:p,intent:"primary",ref:this.setButtonRef})}}]),Object.defineProperty(t,"prototype",{writable:!1}),o}())||r;y.propTypes={id:u.a.string,title:u.a.string,push:u.a.string,className:u.a.string,variant:u.a.string,onClick:u.a.func,onMount:u.a.func,store:u.a.object.isRequired};var m=y,w=n(5),C=n(31),S=n.n(C),P=w.types.model({pushed:w.types.optional(w.types.boolean,!1)}).volatile(function(){return{buttonNode:null}}).actions(function(t){return{setButtonRef:function(e){t.buttonNode=e},setPushed:function(e){t.pushed=e}}}),O=w.types.compose(P,S.a).named("ButtonStore"),E=n(15),x=n(51),M=n.n(x);function T(e){return(T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function A(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function D(e,t){return(D=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function j(r){var i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=I(r);if(i){var n=I(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===T(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)}}function I(e){return(I=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var L=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&D(e,t)}(r,E.default);var t,n=j(r);function r(e){var o;return function(e,t){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this),(o=n.call(this,e)).onClick=function(){var t=o.glassContext.getCoreSvc(".Logger");return o.getActionController().then(function(){o.triggerOnPress()}).catch(function(e){t.error("failed to retrieve the actionController or invoke its method",e)})},o.onMount=function(){o.$el=a()(o.getRootElement())},o.render=function(){var e=o.itemSpec,t=e.id,n=e.title,r=e.label,i=e.push;return Promise.resolve(b.a.createElement(m,{id:t,title:n,label:r,className:o.itemSpec.class,variant:"icon",onClick:o.onClick,store:o.store,onMount:o.onMount,push:i}))},o.store=O.create(),o.store.setIconId(o.itemSpec.icon),o.store.setLabel(o.itemSpec.label),o.getActionController().catch(function(e){o.glassContext.getCoreSvc(".Logger").error("failed to retrieve the actionController or invoke its method",e)}),o}return A((t=r).prototype,[{key:"setPressed",value:function(){this.store.setPushed(!0)}},{key:"getRootElement",value:function(){return this.store.buttonNode&&this.store.buttonNode._button&&this.store.buttonNode._button._node}},{key:"setUnpressed",value:function(){this.store.setPushed(!1)}},{key:"getBaseButton",value:function(){return this}},{key:"togglePressed",value:function(){var e=this.store.pushed;return this.store.setPushed(!e),!e}},{key:"setSelected",value:function(){this.setPressed()}},{key:"isPressed",value:function(){return this.store.pushed}},{key:"isEnabled",value:function(){return!this.store.disabled}},{key:"triggerOnPress",value:function(){var e={glassContext:this.glassContext,target:{plugin:this}},t=this.actionController;if(this.itemSpec.push&&(e.pushState=this.togglePressed()),c.a.isFunction(t.onPress))t.onPress(e);else if(c.a.isFunction(t.execute)){var n=new M.a(e.glassContext),r={options:this.itemSpec.options};t.execute(n,r)}}}]),Object.defineProperty(t,"prototype",{writable:!1}),r}();t.a=L},function(e,t){e.exports=h},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=o(n(1)),a=o(n(31)),c=o(n(15)),l=o(n(103)),u=function(n){function e(e){var t=n.call(this,e)||this;return t.render=function(){return Promise.resolve(s.default.createElement(l.default,{store:t.store,className:t.itemSpec.class}))},t.store=a.default.create(),t.store.setIconId(t.itemSpec.icon),t.store.setLabel(t.itemSpec.label),t}return i(e,n),e}(c.default);t.default=u},function(e,t){e.exports=g},function(e,t,n){"use strict";function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function a(r){var i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=c(r);if(i){var n=c(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)}}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var i=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&s(e,t)}(o,n(16).a);var t,i=a(o);function o(){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))).onClick=function(){try{t.isActionControllerLoaded(),t.triggerOnPress()}catch(e){t.glassContext.getCoreSvc(".Logger").error(e)}},t}return r((t=o).prototype,[{key:"isActionControllerLoaded",value:function(){if(!this.actionController)throw new Error("Controller has not been registered")}}]),Object.defineProperty(t,"prototype",{writable:!1}),o}();t.a=i},function(e,t,n){"use strict";var r,i=n(1),s=n.n(i),o=n(0),a=n.n(o),c=n(8),l=n(9),u=n(10);function d(e){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function h(r){var i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=g(r);if(i){var n=g(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===d(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)}}function g(e){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var v=Object(l.observer)(r=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&f(e,t)}(r,i.Component);var t,n=h(r);function r(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),n.apply(this,arguments)}return p((t=r).prototype,[{key:"render",value:function(){var e=this.props,t=e.store,n=e.onDismiss,r=e.perspective,i=e.onGoToAction,o=t.getAlertsForPerspective(r);return s.a.createElement(c.PersistentBanner,{alerts:Object(u.toJS)(o),onDismiss:n,onGoToAction:i})}}]),Object.defineProperty(t,"prototype",{writable:!1}),r}())||r;function y(e){return(y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function m(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function b(e,t){return(b=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _(r){var i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=w(r);if(i){var n=w(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===y(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)}}function w(e){return(w=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}v.propTypes={store:a.a.object.isRequired,onDismiss:a.a.func,perspective:a.a.string,onGoToAction:a.a.func};var C=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&b(e,t)}(o,n(15).default);var t,r=_(o);function o(){var i;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(i=r.call.apply(r,[this].concat(t))).onDismiss=function(e){return i.glassContext.getCoreSvc(".Message").removeAlert(e)},i.onGoToAction=function(e){var t=e.actionId,n=e.actionContext;if(t){var r={glassContext:i.glassContext,actionContext:n};i.glassContext.performAction(t,r)}},i}return m((t=o).prototype,[{key:"render",value:function(){return Promise.resolve(s.a.createElement(v,{store:this.glassContext.getCoreSvc(".Message").getStore(),onDismiss:this.onDismiss,perspective:this.glassContext.getCurrentPerspective(),onGoToAction:this.onGoToAction}))}}]),Object.defineProperty(t,"prototype",{writable:!1}),o}();t.a=C},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,s,a,c){return new(a||(a=Promise))(function(n,t){function r(e){try{o(c.next(e))}catch(e){t(e)}}function i(e){try{o(c.throw(e))}catch(e){t(e)}}function o(e){var t;e.done?n(e.value):(t=e.value,t instanceof a?t:new a(function(e){e(t)})).then(r,i)}o((c=c.apply(e,s||[])).next())})},c=this&&this.__generator||function(n,r){var i,o,s,e,a={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return e={next:t(0),throw:t(1),return:t(2)},"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(t){return function(e){return function(t){if(i)throw new TypeError("Generator is already executing.");for(;a;)try{if(i=1,o&&(s=2&t[0]?o.return:t[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,t[1])).done)return s;switch(o=0,s&&(t=[2&t[0],s.value]),t[0]){case 0:case 1:s=t;break;case 4:return a.label++,{value:t[1],done:!1};case 5:a.label++,o=t[1],t=[0];continue;case 7:t=a.ops.pop(),a.trys.pop();continue;default:if(!((s=0<(s=a.trys).length&&s[s.length-1])||6!==t[0]&&2!==t[0])){a=0;continue}if(3===t[0]&&(!s||t[1]>s[0]&&t[1]<s[3])){a.label=t[1];break}if(6===t[0]&&a.label<s[1]){a.label=s[1],s=t;break}if(s&&a.label<s[2]){a.label=s[2],a.ops.push(t);break}s[2]&&a.ops.pop(),a.trys.pop();continue}t=r.call(n,a)}catch(e){t=[6,e],o=0}finally{i=s=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}([t,e])}}},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var l=s(n(1)),u=s(n(102)),d=l.default.createElement(l.default.Fragment,null),a=function(n){function e(e){var t=n.call(this,e)||this;return t.state={element:d},t.updateElement(),t}return i(e,n),e.prototype.componentDidUpdate=function(e){var t=this.props.render;e.render!==t&&this.updateElement()},e.prototype.updateElement=function(){var t=this,n=this.props.failRenderCallback;this.renderPromise=this.doRender().then(function(e){t.setState({element:e})},function(e){return e=e||"unknown plugin render method exception",n&&n(e),Promise.resolve()})},e.prototype.doRender=function(){return o(this,void 0,void 0,function(){return c(this,function(e){return[2,this.props.render?this.callRender():d]})})},e.prototype.callRender=function(){return o(this,void 0,void 0,function(){var t,n,r,i,o,s,a;return c(this,function(e){switch(e.label){case 0:return t=this.props,n=t.render,r=t.renderScope,i=t.options,o=t.postRenderCallback,s=t.containerRef,[4,n.call(r,i)];case 1:return a=e.sent(),o&&o(),a?(l.default.isValidElement(a)||(a=l.default.createElement(u.default,{htmlElement:a,containerRef:s})),[2,a]):[2,d]}})})},e.prototype.render=function(){var e=this.state.element;return l.default.createElement(l.default.Fragment,null,e)},e}(l.default.Component);t.default=a},function(e,t,n){"use strict";var i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},o=this&&this.__awaiter||function(e,s,a,c){return new(a||(a=Promise))(function(n,t){function r(e){try{o(c.next(e))}catch(e){t(e)}}function i(e){try{o(c.throw(e))}catch(e){t(e)}}function o(e){var t;e.done?n(e.value):(t=e.value,t instanceof a?t:new a(function(e){e(t)})).then(r,i)}o((c=c.apply(e,s||[])).next())})},s=this&&this.__generator||function(n,r){var i,o,s,e,a={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return e={next:t(0),throw:t(1),return:t(2)},"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(t){return function(e){return function(t){if(i)throw new TypeError("Generator is already executing.");for(;a;)try{if(i=1,o&&(s=2&t[0]?o.return:t[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,t[1])).done)return s;switch(o=0,s&&(t=[2&t[0],s.value]),t[0]){case 0:case 1:s=t;break;case 4:return a.label++,{value:t[1],done:!1};case 5:a.label++,o=t[1],t=[0];continue;case 7:t=a.ops.pop(),a.trys.pop();continue;default:if(!((s=0<(s=a.trys).length&&s[s.length-1])||6!==t[0]&&2!==t[0])){a=0;continue}if(3===t[0]&&(!s||t[1]>s[0]&&t[1]<s[3])){a.label=t[1];break}if(6===t[0]&&a.label<s[1]){a.label=s[1],s=t;break}if(s&&a.label<s[2]){a.label=s[2],a.ops.push(t);break}s[2]&&a.ops.pop(),a.trys.pop();continue}t=r.call(n,a)}catch(e){t=[6,e],o=0}finally{i=s=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}([t,e])}}},r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=r(n(63)),c=r(n(35)),l=r(n(24)),u=function(){function r(e){this.glassContext=e,this.store=a.default.create(),this.notifier=new c.default}return r.prototype.createDialog=function(e){var t=(0,l.default)("dialog");(e=i(i({},e),{id:t})).callback&&"object"==typeof e.callback&&0<Object.keys(e.callback).length&&0<Object.values(e.callback).filter(function(e){return e&&"function"==typeof e}).length&&e&&e.buttons&&Array.isArray(e.buttons)&&((e.buttons.includes("ok")||0<e.buttons.filter(function(e){return"ok"===e.defaultId}).length)&&this.registerCallbackForButton(e,"ok",t),(e.buttons.includes("cancel")||0<e.buttons.filter(function(e){return"cancel"===e.defaultId}).length)&&this.registerCallbackForButton(e,"cancel",t)),this.store.addDialog(e)},r.prototype.registerCallbackForButton=function(e,t,n){this.notifier.register(n+"-dialog-callback-"+t,function(){e.callback.general&&r.invokeGeneralCallback(e,t),e.callback[t]&&e.callback[t]()})},r.invokeGeneralCallback=function(e,t){e.callbackScope&&null!==e.callbackScope[t]&&void 0!==e.callbackScope[t]?e.callback.general.call(e.callbackScope[t],{btn:t}):e.callback.general({btn:t})},r.prototype.removeDialog=function(i){return o(this,void 0,void 0,function(){var t,n,r;return s(this,function(e){switch(e.label){case 0:if(t=this.store.dialogsInPlain,!(n=t&&0<t.length?t[t.length-1]:null))return[3,6];e.label=1;case 1:return e.trys.push([1,4,5,6]),!n.hasCallback||"ok"!==i&&"cancel"!==i?[3,3]:[4,this.notifier.notify(n.key+"-dialog-callback-"+i)];case 2:e.sent(),e.label=3;case 3:return[3,6];case 4:return r=e.sent(),this.glassContext.getCoreSvc(".Logger").error("Failed to execute callback function when a dialog is closed",r),[3,6];case 5:return this.store.removeDialog(),n.hasCallback&&(this.notifier.remove(n.key+"-dialog-callback-ok"),this.notifier.remove(n.key+"-dialog-callback-cancel")),[7];case 6:return[2]}})})},r.prototype.getDialogs=function(){return this.store.dialogsInPlain},r.prototype.getStore=function(){return this.store},r}();t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return String(e)+t()+t()+"-"+t()+"-"+t()+"-"+t()+"-"+t()+t()+t()}},function(e,t,n){"use strict";var o=this&&this.__awaiter||function(e,s,a,c){return new(a||(a=Promise))(function(n,t){function r(e){try{o(c.next(e))}catch(e){t(e)}}function i(e){try{o(c.throw(e))}catch(e){t(e)}}function o(e){var t;e.done?n(e.value):(t=e.value,t instanceof a?t:new a(function(e){e(t)})).then(r,i)}o((c=c.apply(e,s||[])).next())})},s=this&&this.__generator||function(n,r){var i,o,s,e,a={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return e={next:t(0),throw:t(1),return:t(2)},"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(t){return function(e){return function(t){if(i)throw new TypeError("Generator is already executing.");for(;a;)try{if(i=1,o&&(s=2&t[0]?o.return:t[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,t[1])).done)return s;switch(o=0,s&&(t=[2&t[0],s.value]),t[0]){case 0:case 1:s=t;break;case 4:return a.label++,{value:t[1],done:!1};case 5:a.label++,o=t[1],t=[0];continue;case 7:t=a.ops.pop(),a.trys.pop();continue;default:if(!((s=0<(s=a.trys).length&&s[s.length-1])||6!==t[0]&&2!==t[0])){a=0;continue}if(3===t[0]&&(!s||t[1]>s[0]&&t[1]<s[3])){a.label=t[1];break}if(6===t[0]&&a.label<s[1]){a.label=s[1],s=t;break}if(s&&a.label<s[2]){a.label=s[2],a.ops.push(t);break}s[2]&&a.ops.pop(),a.trys.pop();continue}t=r.call(n,a)}catch(e){t=[6,e],o=0}finally{i=s=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}([t,e])}}},r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=r(n(19)),a=r(n(4)),c=r(n(3)),l=r(n(36)),u=function(){function e(e){this.PERSPECTIVE_MODEL_PATH="v1/perspectives/",this.copyObject=function(e){return(0,l.default)(e)},this.glassContext=e,this.url=new i.default,this.modelCache={}}return e.prototype.getModel=function(e,t){var n=this.getPerspectiveUrl(e,t);return this.getPerspectiveModel(n,e)},e.prototype.getModelFromCache=function(e){if(this.modelCache[e]&&JSON.stringify(this.modelCache[e])!==JSON.stringify({}))return this.copyObject(this.modelCache[e])},e.prototype.addModel=function(e,t,n){this.modelCache[this.getPerspectiveUrl(e,n)]=this.copyObject(t)},e.prototype.getPerspectiveUrl=function(e,t){var n=this.PERSPECTIVE_MODEL_PATH+e;if(t&&t.content){var r=c.default.map(this.url.URL_UI_API,function(e){return e.key}),i=c.default.pick(t.content,r);0<c.default.keys(i).length&&(n+="?"+a.default.param(i))}return n},e.prototype.getPerspectiveModel=function(r,i){return o(this,void 0,void 0,function(){var t,n;return s(this,function(e){switch(e.label){case 0:return void 0!==(t=this.getModelFromCache(r))?[2,t]:[4,this.glassContext.getCoreSvc(".Ajax").ajax({url:r,type:"GET",perspective:i})];case 1:return n=e.sent(),this.modelCache[r]=this.copyObject(n.data),[2,n.data]}})})},e}();t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e){this.glassContext=e,this.qsValueEncoders=[]}return e.prototype.encodeQSValue=function(e){for(var t=0;t<this.qsValueEncoders.length;t+=1)e=this.qsValueEncoders[t](e);return e},e.prototype.registerQSValueEncoder=function(e){this.qsValueEncoders.push(e)},e}();t.default=r},function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,s,a,c){return new(a||(a=Promise))(function(n,t){function r(e){try{o(c.next(e))}catch(e){t(e)}}function i(e){try{o(c.throw(e))}catch(e){t(e)}}function o(e){var t;e.done?n(e.value):(t=e.value,t instanceof a?t:new a(function(e){e(t)})).then(r,i)}o((c=c.apply(e,s||[])).next())})},o=this&&this.__generator||function(n,r){var i,o,s,e,a={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return e={next:t(0),throw:t(1),return:t(2)},"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(t){return function(e){return function(t){if(i)throw new TypeError("Generator is already executing.");for(;a;)try{if(i=1,o&&(s=2&t[0]?o.return:t[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,t[1])).done)return s;switch(o=0,s&&(t=[2&t[0],s.value]),t[0]){case 0:case 1:s=t;break;case 4:return a.label++,{value:t[1],done:!1};case 5:a.label++,o=t[1],t=[0];continue;case 7:t=a.ops.pop(),a.trys.pop();continue;default:if(!((s=0<(s=a.trys).length&&s[s.length-1])||6!==t[0]&&2!==t[0])){a=0;continue}if(3===t[0]&&(!s||t[1]>s[0]&&t[1]<s[3])){a.label=t[1];break}if(6===t[0]&&a.label<s[1]){a.label=s[1],s=t;break}if(s&&a.label<s[2]){a.label=s[2],a.ops.push(t);break}s[2]&&a.ops.pop(),a.trys.pop();continue}t=r.call(n,a)}catch(e){t=[6,e],o=0}finally{i=s=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}([t,e])}}};Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function r(e){this.BASE_URL="v1",this.TAXONOMY_URL=this.BASE_URL+'"/metadata/modules/taxonomy"',this.glassContext=e}return r.prototype.initialize=function(e){this.taxonomy=e},r.prototype.getTaxonomy=function(){return i(this,void 0,void 0,function(){var t;return o(this,function(e){switch(e.label){case 0:return this.taxonomy?[2,this.taxonomy]:[4,(t=this).loadTaxonomy()];case 1:return t.taxonomy=e.sent(),[2,this.taxonomy]}})})},r.prototype.loadTaxonomy=function(){return i(this,void 0,void 0,function(){var t,n;return o(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,this.glassContext.getCoreSvc(".Ajax").ajax({url:r.TAXONOMY_URL,type:"GET"})];case 1:return(t=e.sent()).data&&t.data.data&&t.data.data.taxonomy?[2,t.data.data.taxonomy]:(this.glassContext.getCoreSvc(".Logger").error("Unable to parse the returned result when updating the taxonomy data"),[3,3]);case 2:return n=e.sent(),this.glassContext.getCoreSvc(".Logger").error("Error retrieving the taxonomy data",n),[3,3];case 3:return[2,void 0]}})})},r}();t.default=r},function(e,t,n){"use strict";var o=this&&this.__assign||function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},r=this&&this.__awaiter||function(e,s,a,c){return new(a||(a=Promise))(function(n,t){function r(e){try{o(c.next(e))}catch(e){t(e)}}function i(e){try{o(c.throw(e))}catch(e){t(e)}}function o(e){var t;e.done?n(e.value):(t=e.value,t instanceof a?t:new a(function(e){e(t)})).then(r,i)}o((c=c.apply(e,s||[])).next())})},a=this&&this.__generator||function(n,r){var i,o,s,e,a={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return e={next:t(0),throw:t(1),return:t(2)},"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(t){return function(e){return function(t){if(i)throw new TypeError("Generator is already executing.");for(;a;)try{if(i=1,o&&(s=2&t[0]?o.return:t[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,t[1])).done)return s;switch(o=0,s&&(t=[2&t[0],s.value]),t[0]){case 0:case 1:s=t;break;case 4:return a.label++,{value:t[1],done:!1};case 5:a.label++,o=t[1],t=[0];continue;case 7:t=a.ops.pop(),a.trys.pop();continue;default:if(!((s=0<(s=a.trys).length&&s[s.length-1])||6!==t[0]&&2!==t[0])){a=0;continue}if(3===t[0]&&(!s||t[1]>s[0]&&t[1]<s[3])){a.label=t[1];break}if(6===t[0]&&a.label<s[1]){a.label=s[1],s=t;break}if(s&&a.label<s[2]){a.label=s[2],a.ops.push(t);break}s[2]&&a.ops.pop(),a.trys.pop();continue}t=r.call(n,a)}catch(e){t=[6,e],o=0}finally{i=s=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}([t,e])}}},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=i(n(29)),c=i(n(35)),l=i(n(24)),u=function(){function e(e){this.Glass=e,this.store=s.default.create({disabled:this.isDisabled()}),this.notifier=new c.default}return e.prototype.isDisabled=function(){var e=this.Glass.getCoreSvc(".Config");return!(!e||!e.getConfigValueSync("Glass.disableGlobalToast"))},e.prototype.getDisabled=function(){return this.store.disabled},e.prototype.addToast=function(e,t){var n={message:e,options:t};this.addToasts([n])},e.prototype.addToasts=function(e){var t=this;Array.isArray(e)||(e=[e]);for(var n=[],r=0;r<e.length;r+=1){var i=(0,l.default)("toast");e[r]=o(o({message:e[r].message},e[r].options),{id:i}),e[r].onHidden&&!this.getDisabled()&&this.notifier.register(i+"-toast-onhidden",e[r].onHidden),e[r].callback&&!this.getDisabled()&&this.notifier.register(i+"-toast-callback",e[r].callback),e[r].onShown&&!this.getDisabled()&&(this.notifier.register(i+"-toast-onshown",e[r].onShown),n.push(this.notifier.notify(i+"-toast-onshown")))}this.store.addToasts(e),Promise.all(n).then(function(){}).catch(function(e){t.Glass.getCoreSvc(".Logger").error("Failed to execute onShown function when a toast is added",e)})},e.prototype.removeToastById=function(o,s){return void 0===s&&(s=!1),r(this,void 0,void 0,function(){var t,n,r,i=this;return a(this,function(e){switch(e.label){case 0:if(null===(t=this.store.getToastInPlainById(o)))return[3,8];n=function(){i.store.removeToastById(o)},e.label=1;case 1:return e.trys.push([1,6,7,8]),s&&t.hasCallback?[4,this.notifier.notify(o+"-toast-callback")]:[3,3];case 2:e.sent(),e.label=3;case 3:return t.hasOnHidden?[4,this.notifier.notify(o+"-toast-onhidden")]:[3,5];case 4:e.sent(),e.label=5;case 5:return[3,8];case 6:return r=e.sent(),this.Glass.getCoreSvc(".Logger").error("Failed to execute onHidden/callback function when a toast is removed",r),[3,8];case 7:return n(),this.notifier.remove(o),[7];case 8:return[2]}})})},e.prototype.removeAllToasts=function(){this.store.removeAllToasts()},e.prototype.getToastById=function(e){return this.store.getToastInPlainById(e)},e.prototype.getToasts=function(){return this.store.toastsInPlain},e.prototype.getStore=function(){return this.store},e}();t.default=u},function(e,o,t){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(o,"__esModule",{value:!0}),o.containerID=o.globalKeyword=void 0;var s=t(10),r=t(5),i=n(t(11));o.globalKeyword="__global__",o.containerID="toolkit-toastContainer-glassGlobal";var a=r.types.model("ToastModel",{key:r.types.optional(r.types.string,""),stackable:r.types.optional(r.types.boolean,!0),statusType:r.types.union(r.types.literal("info"),r.types.literal("success"),r.types.literal("warning"),r.types.literal("error")),contentString:r.types.optional(r.types.string,""),closeText:r.types.optional(r.types.string,i.default.get("close")),btnLabel:r.types.optional(r.types.string,""),scope:r.types.optional(r.types.string,o.globalKeyword),hasOnHidden:r.types.optional(r.types.boolean,!1),hasOnShown:r.types.optional(r.types.boolean,!1),hasCallback:r.types.optional(r.types.boolean,!1),timedDismiss:r.types.optional(r.types.boolean,!1),milliseconds:r.types.optional(r.types.number,3e3)}),c=r.types.model("ToastStore",{disabled:r.types.optional(r.types.boolean,!1),toastQueue:r.types.optional(r.types.array(a),[]),containerID:r.types.optional(r.types.string,o.containerID)}).views(function(n){return{get toasts(){return n.disabled?[]:n.toastQueue},get toastsInPlain(){return n.disabled?[]:(0,s.toJS)(n.toastQueue)},getToastById:function(t){if(n.disabled)return null;var e=n.toasts.filter(function(e){return e.key===t});return 0<e.length?e[0]:null},getToastInPlainById:function(e){return n.disabled?null:(0,s.toJS)(n.getToastById(e))},getToastsForPerspective:function(t){return n.toasts.filter(function(e){return e.scope===o.globalKeyword||e.scope===t}).sort(function(e,t){return e.scope===t.scope?0:e.scope===o.globalKeyword?1:-1})},getToastsInPlainForPerspective:function(e){return(0,s.toJS)(n.getToastsForPerspective(e))}}}).actions(function(i){return{addToasts:function(e){Array.isArray(e)||(e=[e]);for(var t=0;t<e.length;t+=1)i.toastQueue=(0,s.observable)(i.toastQueue.concat((void 0,r={key:(n=e[t]).id,stackable:!0,statusType:n.type||"success",contentString:n.message,btnLabel:n.btnLabel,scope:n.scope?n.scope:o.globalKeyword,hasOnHidden:!!n.onHidden,hasOnShown:!!n.onShown,hasCallback:!!n.callback,timedDismiss:"success"===n.type||"info"===n.type||!n.type,milliseconds:n.timeBeforeDismiss},a.create(r))));var n,r;5<i.toastQueue.length&&(i.toastQueue=(0,s.observable)(i.toastQueue.slice(Math.max(i.toastQueue.length-5,0))))},removeToastById:function(t){var e=i.toasts.filter(function(e){return e.key!==t});i.toastQueue=(0,s.observable)(e)},removeAllToasts:function(){i.toastQueue=(0,s.observable)([])}}});o.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e=document.createElement("div");e.id="svgIcons",e.style.display="none",document.body.appendChild(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5),i=r.types.model({visible:r.types.optional(r.types.boolean,!0),disabled:r.types.optional(r.types.boolean,!1),iconId:r.types.optional(r.types.union(r.types.string,r.types.undefined),void 0),label:r.types.optional(r.types.union(r.types.string,r.types.undefined),void 0)}).actions(function(t){return{setVisible:function(e){t.visible=e},setDisabled:function(e){t.disabled=e},setLabel:function(e){t.label=e},setIconId:function(e){t.iconId=e}}});t.default=i},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,s,a,c){return new(a||(a=Promise))(function(n,t){function r(e){try{o(c.next(e))}catch(e){t(e)}}function i(e){try{o(c.throw(e))}catch(e){t(e)}}function o(e){var t;e.done?n(e.value):(t=e.value,t instanceof a?t:new a(function(e){e(t)})).then(r,i)}o((c=c.apply(e,s||[])).next())})},s=this&&this.__generator||function(n,r){var i,o,s,e,a={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return e={next:t(0),throw:t(1),return:t(2)},"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(t){return function(e){return function(t){if(i)throw new TypeError("Generator is already executing.");for(;a;)try{if(i=1,o&&(s=2&t[0]?o.return:t[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,t[1])).done)return s;switch(o=0,s&&(t=[2&t[0],s.value]),t[0]){case 0:case 1:s=t;break;case 4:return a.label++,{value:t[1],done:!1};case 5:a.label++,o=t[1],t=[0];continue;case 7:t=a.ops.pop(),a.trys.pop();continue;default:if(!((s=0<(s=a.trys).length&&s[s.length-1])||6!==t[0]&&2!==t[0])){a=0;continue}if(3===t[0]&&(!s||t[1]>s[0]&&t[1]<s[3])){a.label=t[1];break}if(6===t[0]&&a.label<s[1]){a.label=s[1],s=t;break}if(s&&a.label<s[2]){a.label=s[2],a.ops.push(t);break}s[2]&&a.ops.pop(),a.trys.pop();continue}t=r.call(n,a)}catch(e){t=[6,e],o=0}finally{i=s=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}([t,e])}}},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var l=a(n(53)),u=a(n(57)),d=a(n(58)),p=a(n(59)),f=a(n(61)),c=a(n(62)),h=a(n(79)),g=a(n(107)),v=a(n(108)),y=a(n(109)),m=a(n(38)),b=a(n(30)),_=n(34),w=n(41),C=a(n(12)),S=a(n(110)),P=function(n){function e(e,t){var c=n.call(this,e)||this;return c.glassMode="mode",c.glassBookmarkMode="bookmark",c.initialize=function(){c.accessibilityController=new l.default(c),c.actionsController=new u.default(c),c.appHomePage=new d.default(c),c.dialogsController=new p.default(c),c.eventsRouter=new f.default(c),c.perspectiveLifeCycle=new h.default(c),c.searchPerspectiveDOM=new g.default(c),c.slideoutController=new v.default(c),c.themeResources=new y.default(c)},c.canExecuteAction=function(t,n){return o(c,void 0,void 0,function(){return s(this,function(e){switch(e.label){case 0:return[4,this.actionsController.canExecuteAction(t,n)];case 1:return[2,e.sent()]}})})},c.performAction=function(e,t){return c.actionsController.performAction(e,t)},c.detectAccessibilityChange=function(e){return c.accessibilityController.detectAccessibilityChange(e)},c.isHighContrastOn=function(){return(0,_.isApplicationInHighContrast)()},c.getHomePageObject=function(e){return c.appHomePage.getHomePageObject(e)},c.resetHome=function(e){return c.appHomePage.resetAppHomePage(e)},c.setDefaultHomePerspective=function(e){c.appHomePage.defaultHomePerspective=e},c.setDefaultThemePath=function(e){c.themeResources.defaultThemePath=e},c.showContextMenu=function(e){c.currentAppView&&c.currentAppView.showContextMenu(e)},c.showEmbedDialog=function(e){return c.dialogsController.showEmbedDialog(e)},c.showErrorMessage=function(e,t,n,r){return c.dialogsController.showErrorMessage(e,t,n,r)},c.showMessage=function(e,t,n,r,i,o,s,a){return c.dialogsController.showMessage(e,t,n,r,i,o,s,a)},c.showResetHomeDialog=function(e){return c.dialogsController.showResetHomeDialog(e)},c.showShareDialog=function(e){return c.dialogsController.showShareDialog(e)},c.emit=function(e,t){return c.eventsRouter.emit(e,t)},c.off=function(e,t,n){return c.eventsRouter.off(e,t,n)},c.on=function(e,t,n){return c.eventsRouter.on(e,t,n)},c.trigger=function(e,t){return c.eventsRouter.trigger(e,t)},c.closeOpenWidgets=function(){return c.perspectiveLifeCycle.closeOpenWidgets()},c.updateCurrentCachedAppView=function(){return c.perspectiveLifeCycle.updateCurrentPerspectiveCache()},c.isLoginViewShown=function(){return c.perspectiveLifeCycle.isLoginViewShown},c.isOpeningAView=function(){return c.perspectiveLifeCycle.isOpeningAPerspective()},c.openAppView=function(e,t){return c.perspectiveLifeCycle.openPerspective(e,t)},c.openLoginView=function(e){return c.perspectiveLifeCycle.openLoginPerspective(e)},c.openPreviousAppView=function(){return c.perspectiveLifeCycle.openPreviousPerspective()},c.close=function(e,t){return c.perspectiveLifeCycle.closeAllPerspectives(e,t)},c.closeAppView=function(e,t,n){return c.perspectiveLifeCycle.closePerspective(e,t,n)},c.findCollection=function(e){return c.searchPerspectiveDOM.findCollection(e)},c.isCollectionContainerAvailable=function(e){return c.searchPerspectiveDOM.isCollectionContainerAvailable(e)},c.findElement=function(e){return c.searchPerspectiveDOM.findElement(e)},c.findPlugin=function(e){return c.searchPerspectiveDOM.findPlugin(e)},c.hideSlideOut=function(e){return c.slideoutController.hideSlideOut(e)},c.showSlideOut=function(e){return c.slideoutController.showSlideOut(e)},c.reloadTheme=function(){return c.themeResources.reloadTheme()},c.showToast=function(e,t){return t&&(t.timeOut=t.timeBeforeDismiss||t.timeOut),new m.default(t).show(e)},c.getUrl=function(e){return c.perspectiveLifeCycle.url.getUrl(e,c)},c.lockGlass=function(){c.getCoreSvc(".Logger").warn("The lockGlass API will no longer be supported after the R7 release. Please update your usage accordingly");var e=document.getElementsByClassName("appview");if(0<e.length){var t=e[0].getElementsByClassName("navbar");0<t.length&&t[0].classList.add("disabled");var n=e[0].getElementsByClassName("appbar");0<n.length&&n[0].classList.add("disabled")}},c.unlockGlass=function(){c.getCoreSvc(".Logger").warn("The unlockGlass API will no longer be supported after the R7 release. Please update your usage accordingly");var e=document.getElementsByClassName("appview");if(0<e.length){var t=e[0].getElementsByClassName("navbar");0<t.length&&t[0].classList.remove("disabled");var n=e[0].getElementsByClassName("appbar");0<n.length&&n[0].classList.remove("disabled")}},c.rootPane=t.$rootPane,(0,w.loadPerspectiveModels)(t.perspectives,c.getCoreSvc(".Perspective"),c.getCoreSvc(".Logger")),(0,b.default)(),S.default.apply(),c}return i(e,n),Object.defineProperty(e.prototype,"currentAppView",{get:function(){return this.currentPerspective},set:function(e){this.currentPerspective=e,this.appController.currentAppView=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mode",{get:function(){return this.glassMode},set:function(e){this.glassMode=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bookmarkMode",{get:function(){return this.glassBookmarkMode},set:function(e){this.glassBookmarkMode=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"cachedPerspectives",{get:function(){return this.perspectiveLifeCycle.cachedPerspectives},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"noCloseOnLastPerspective",{get:function(){return"true"===C.default.getObjectProperty(["context","content","closeWindowOnLastView"],this.currentAppView)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"previousAppView",{get:function(){return this.previousPerspective},set:function(e){this.previousPerspective=e,this.appController.previousAppView=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"perspectiveSwitcherRegistry",{get:function(){return this.perspectiveLifeCycle.perspectiveSwitcherRegistry},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"slideoutRegistry",{get:function(){return this.slideoutController.slideoutRegistry},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"windowPoppingState",{get:function(){return this.perspectiveLifeCycle.windowPoppingState},set:function(e){this.perspectiveLifeCycle.windowPoppingState=e},enumerable:!1,configurable:!0}),e.prototype.getCurrentContentView=function(){return this.currentPerspective?this.currentPerspective.getCurrentContentView():null},e.prototype.getCurrentPerspective=function(){return this.currentPerspective?this.currentPerspective.getCurrentPerspective():null},e}(c.default);t.default=P},function(e,t){e.exports=v},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isApplicationStyledForHighContrast=t.styleApplicationForHighContrast=t.isApplicationInHighContrast=void 0,t.isApplicationInHighContrast=function(){var e=!1,t=document.createElement("div");return t.classList.add("hcDetect"),document.body.appendChild(t),getComputedStyle(t).getPropertyValue("border-top-color")===getComputedStyle(t).getPropertyValue("border-left-color")&&""!==getComputedStyle(t).getPropertyValue("border-left-color")&&(e=!0),document.body.removeChild(t),e},t.styleApplicationForHighContrast=function(){document.body.classList.add("highcontrast")},t.isApplicationStyledForHighContrast=function(){return document.body.classList.contains("highcontrast")}},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,s,a,c){return new(a||(a=Promise))(function(n,t){function r(e){try{o(c.next(e))}catch(e){t(e)}}function i(e){try{o(c.throw(e))}catch(e){t(e)}}function o(e){var t;e.done?n(e.value):(t=e.value,t instanceof a?t:new a(function(e){e(t)})).then(r,i)}o((c=c.apply(e,s||[])).next())})},i=this&&this.__generator||function(n,r){var i,o,s,e,a={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return e={next:t(0),throw:t(1),return:t(2)},"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(t){return function(e){return function(t){if(i)throw new TypeError("Generator is already executing.");for(;a;)try{if(i=1,o&&(s=2&t[0]?o.return:t[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,t[1])).done)return s;switch(o=0,s&&(t=[2&t[0],s.value]),t[0]){case 0:case 1:s=t;break;case 4:return a.label++,{value:t[1],done:!1};case 5:a.label++,o=t[1],t=[0];continue;case 7:t=a.ops.pop(),a.trys.pop();continue;default:if(!((s=0<(s=a.trys).length&&s[s.length-1])||6!==t[0]&&2!==t[0])){a=0;continue}if(3===t[0]&&(!s||t[1]>s[0]&&t[1]<s[3])){a.label=t[1];break}if(6===t[0]&&a.label<s[1]){a.label=s[1],s=t;break}if(s&&a.label<s[2]){a.label=s[2],a.ops.push(t);break}s[2]&&a.ops.pop(),a.trys.pop();continue}t=r.call(n,a)}catch(e){t=[6,e],o=0}finally{i=s=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}([t,e])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(){this.cache={}}return e.prototype.register=function(e,t){var n=this;Array.isArray(e)||(e=[e]),e.forEach(function(e){n.cache[e]=t})},e.prototype.notify=function(n){return r(this,void 0,void 0,function(){var t;return i(this,function(e){switch(e.label){case 0:if(!Object.prototype.hasOwnProperty.call(this.cache,n))return[3,5];e.label=1;case 1:return e.trys.push([1,,2,4]),t=this.cache[n](n),[3,4];case 2:return[4,t=t||Promise.resolve()];case 3:return e.sent(),[7];case 4:return[2,this.remove(n)];case 5:throw new Error("Notifier::notify '"+n+"' not found")}})})},e.prototype.remove=function(e){delete this.cache[e]},e}();t.default=o},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=r(n(4));t.default=function(e){return i.default.extend(!0,{},e)}},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,s,a,c){return new(a||(a=Promise))(function(n,t){function r(e){try{o(c.next(e))}catch(e){t(e)}}function i(e){try{o(c.throw(e))}catch(e){t(e)}}function o(e){var t;e.done?n(e.value):(t=e.value,t instanceof a?t:new a(function(e){e(t)})).then(r,i)}o((c=c.apply(e,s||[])).next())})},a=this&&this.__generator||function(n,r){var i,o,s,e,a={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return e={next:t(0),throw:t(1),return:t(2)},"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(t){return function(e){return function(t){if(i)throw new TypeError("Generator is already executing.");for(;a;)try{if(i=1,o&&(s=2&t[0]?o.return:t[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,t[1])).done)return s;switch(o=0,s&&(t=[2&t[0],s.value]),t[0]){case 0:case 1:s=t;break;case 4:return a.label++,{value:t[1],done:!1};case 5:a.label++,o=t[1],t=[0];continue;case 7:t=a.ops.pop(),a.trys.pop();continue;default:if(!((s=0<(s=a.trys).length&&s[s.length-1])||6!==t[0]&&2!==t[0])){a=0;continue}if(3===t[0]&&(!s||t[1]>s[0]&&t[1]<s[3])){a.label=t[1];break}if(6===t[0]&&a.label<s[1]){a.label=s[1],s=t;break}if(s&&a.label<s[2]){a.label=s[2],a.ops.push(t);break}s[2]&&a.ops.pop(),a.trys.pop();continue}t=r.call(n,a)}catch(e){t=[6,e],o=0}finally{i=s=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}([t,e])}}},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var c=s(n(6)),l=s(n(38)),u=function(s){function e(e,t,n,r,i){var o=s.call(this,e)||this;return o.pendingOpenPerspectivePromise=null,o.perspectiveSwitcherRegistry=t,o.perspectiveViewsCache=n,o.glassStore=r,o.perspectivesRegistry=i,o}return i(e,s),e.prototype.attemptToOpenPreviousPerspective=function(e,t,n){if(e>=this.perspectiveSwitcherRegistry.size()&&(e=this.perspectiveSwitcherRegistry.size()-1),n)return null;var r,i=this.Glass.previousAppView;return this.perspectiveSwitcherRegistry.containsPerspective(i)||(i=this.Glass.previousAppView=void 0),(r=i&&i.perspective&&i!==t&&"login"!==i.perspective?i:this.perspectiveSwitcherRegistry.getPerspectiveByIndex(e))?this.Glass.openAppView(r.perspective,r.context):this.Glass.openAppView()},e.prototype.closeOpenWidgets=function(t){return o(this,void 0,void 0,function(){return a(this,function(e){switch(e.label){case 0:return[4,this.Glass.hideSlideOut(t)];case 1:return e.sent(),l.default.remove(),[2]}})})},e.prototype.setHomeFlag=function(e,t){!0===t&&this.perspectiveSwitcherRegistry.clearAllPerspectiveHomeFlags(),e.setHomeFlag(t)},e.prototype.prefetchResources=function(){var e=this.Glass.getRequireJs(),t=e&&e.s&&e.s.contexts&&e.s.contexts._&&e.s.contexts._.config&&e.s.contexts._.config.bundles;t&&this.Glass.getCoreSvc(".Prefetch").prefetchResources(Object.keys(t))},e}(c.default);t.default=u},function(e,t){e.exports=y},function(e,t){e.exports=m},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=n(5),o=r(n(13)),s=i.types.model({id:i.types.identifier,perspectiveName:i.types.string}).volatile(function(){return{context:{},spec:{}}}).actions(function(t){return{setContext:function(e){t.context=e},setSpec:function(e){t.spec=e}}}).views(function(e){return{get requirejs(){return e.spec.config?e.spec.config.requirejs:void 0},get configStyles(){return e.spec.config?e.spec.config.styles:void 0},get configScripts(){return e.spec.config?e.spec.config.scripts:void 0},get cssStyles(){return e.spec.cssStyles},get svgImages(){return e.spec.svgImages},get contextMenuSettings(){return e.spec.contextMenus},get actions(){return e.spec.actions},get services(){return e.spec.services},get toolBars(){return e.spec.toolBars},get layout(){return o.default.convertToolBarsToLayoutObject(this.toolBars)},get modelId(){return e.context.content&&e.context.content.id?e.context.content.id:e.context.id?e.context.id:e.spec.id?e.spec.id:""},get cacheKey(){return this.modelId?e.perspectiveName+"|"+this.modelId:e.perspectiveName},get contentModule(){return e.spec.content?e.spec.content.module:void 0}}});t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.arePerspectivesEqual=t.isPerspectiveValid=t.loadPerspectiveModels=void 0,t.loadPerspectiveModels=function(e,i,t){try{Array.isArray(e)&&e.forEach(function(e){var t=e.name,n=e.model,r=e.context;i.addModel(t,n,r)})}catch(e){t.error("Error while loading perspective models",e)}},t.isPerspectiveValid=function(e){return e&&!e.includes("/")&&!e.includes(".")&&!e.includes("%2F")&&!e.includes("%2f")},t.arePerspectivesEqual=function(e,t){return!(!e||!t||e!==t)}},function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,s,a,c){return new(a||(a=Promise))(function(n,t){function r(e){try{o(c.next(e))}catch(e){t(e)}}function i(e){try{o(c.throw(e))}catch(e){t(e)}}function o(e){var t;e.done?n(e.value):(t=e.value,t instanceof a?t:new a(function(e){e(t)})).then(r,i)}o((c=c.apply(e,s||[])).next())})},o=this&&this.__generator||function(n,r){var i,o,s,e,a={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return e={next:t(0),throw:t(1),return:t(2)},"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(t){return function(e){return function(t){if(i)throw new TypeError("Generator is already executing.");for(;a;)try{if(i=1,o&&(s=2&t[0]?o.return:t[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,t[1])).done)return s;switch(o=0,s&&(t=[2&t[0],s.value]),t[0]){case 0:case 1:s=t;break;case 4:return a.label++,{value:t[1],done:!1};case 5:a.label++,o=t[1],t=[0];continue;case 7:t=a.ops.pop(),a.trys.pop();continue;default:if(!((s=0<(s=a.trys).length&&s[s.length-1])||6!==t[0]&&2!==t[0])){a=0;continue}if(3===t[0]&&(!s||t[1]>s[0]&&t[1]<s[3])){a.label=t[1];break}if(6===t[0]&&a.label<s[1]){a.label=s[1],s=t;break}if(s&&a.label<s[2]){a.label=s[2],a.ops.push(t);break}s[2]&&a.ops.pop(),a.trys.pop();continue}t=r.call(n,a)}catch(e){t=[6,e],o=0}finally{i=s=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}([t,e])}}},r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.preRenderSetup=t.unloadIcons=t.loadStylesAndIcons=void 0;var s=n(83),a=r(n(85)),c=n(43),l=n(44),u=r(n(45)),d=r(n(87));function p(n,r){return i(this,void 0,void 0,function(){var t;return o(this,function(e){switch(e.label){case 0:return a.default.loadSVGIcons(n.svgImages,r),t=[],Array.isArray(n.cssStyles)&&(t=t.concat(n.cssStyles)),Array.isArray(n.configStyles)&&(t=t.concat(n.configStyles)),[4,(0,s.loadStyles)(t,r)];case 1:return e.sent(),[2]}})})}t.loadStylesAndIcons=p,t.unloadIcons=function(e,t){a.default.unloadSVGIcons(e.svgImages,t)},t.preRenderSetup=function(n,r){return i(this,void 0,void 0,function(){var t;return o(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,function(t,n){return i(this,void 0,void 0,function(){return o(this,function(e){switch(e.label){case 0:return(0,c.configureRequire)(t.requirejs,n.getRequireJs()),(0,l.loadContentViewModule)(t.contentModule),[4,Promise.all([(0,d.default)(t.configScripts),p(t,n.getRequireJs())])];case 1:return e.sent(),[2,(0,u.default)(n,t.services)]}})})}(n,r)];case 1:return[2,e.sent()];case 2:throw t=e.sent(),r.getCoreSvc(".Logger").error("Failed to setup perspective",t),t;case 3:return[2]}})})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getUrlArgs=t.configureRequire=void 0,t.configureRequire=function(e,t){e&&e.forEach(function(e){t.config(e)})},t.getUrlArgs=function(e){var t;try{t=e.s.contexts._.config.urlArgs}catch(e){}return t?"?"+t:""}},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.createContentView=t.loadContentViewModule=void 0;var i=r(n(7)),o=r(n(36));function s(e){return i.default.loadModule(e)}t.loadContentViewModule=s,t.createContentView=function(e,t,n){var r=(0,o.default)(e.content);return r.glassContext=t,s(r.module).then(function(e){return new e(r,n)})}},function(e,t,n){"use strict";var a=this&&this.__awaiter||function(e,s,a,c){return new(a||(a=Promise))(function(n,t){function r(e){try{o(c.next(e))}catch(e){t(e)}}function i(e){try{o(c.throw(e))}catch(e){t(e)}}function o(e){var t;e.done?n(e.value):(t=e.value,t instanceof a?t:new a(function(e){e(t)})).then(r,i)}o((c=c.apply(e,s||[])).next())})},c=this&&this.__generator||function(n,r){var i,o,s,e,a={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return e={next:t(0),throw:t(1),return:t(2)},"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(t){return function(e){return function(t){if(i)throw new TypeError("Generator is already executing.");for(;a;)try{if(i=1,o&&(s=2&t[0]?o.return:t[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,t[1])).done)return s;switch(o=0,s&&(t=[2&t[0],s.value]),t[0]){case 0:case 1:s=t;break;case 4:return a.label++,{value:t[1],done:!1};case 5:a.label++,o=t[1],t=[0];continue;case 7:t=a.ops.pop(),a.trys.pop();continue;default:if(!((s=0<(s=a.trys).length&&s[s.length-1])||6!==t[0]&&2!==t[0])){a=0;continue}if(3===t[0]&&(!s||t[1]>s[0]&&t[1]<s[3])){a.label=t[1];break}if(6===t[0]&&a.label<s[1]){a.label=s[1],s=t;break}if(s&&a.label<s[2]){a.label=s[2],a.ops.push(t);break}s[2]&&a.ops.pop(),a.trys.pop();continue}t=r.call(n,a)}catch(e){t=[6,e],o=0}finally{i=s=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}([t,e])}}},r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var l=r(n(86)),s=r(n(7)),u=r(n(3));function d(r,i,o){return a(this,void 0,void 0,function(){var t,n;return c(this,function(e){switch(e.label){case 0:return e.trys.push([0,3,,4]),[4,s.default.instantiate(o)];case 1:return t=e.sent(),[4,function(t,n,r){return a(this,void 0,void 0,function(){return c(this,function(e){switch(e.label){case 0:return t.services.register(n,r),u.default.isFunction(r.initialize)?[4,r.initialize(t)]:[3,2];case 1:return[2,e.sent()];case 2:return[2,void 0]}})})}(r,i,t)];case 2:return[2,e.sent()];case 3:throw n=e.sent(),r.getCoreSvc(".Logger").error("Failed to load the service module",n),n;case 4:return[2]}})})}function p(e,t,n){e.services.declare(t,n,e)}t.default=function(n,r){return a(this,void 0,void 0,function(){var t;return c(this,function(e){switch(e.label){case 0:return n&&r?(t=Object.keys(r).map(function(e){return function(i,o,s){return a(this,void 0,void 0,function(){return c(this,function(e){switch(e.label){case 0:return u.default.isString(s)?[2,(t=i,n=o,r=s,void(t.services.exists(n)||p(t,n,r)))]:u.default.isObject(s)&&s.module?[4,function(i,o,s){return a(this,void 0,void 0,function(){return c(this,function(e){switch(e.label){case 0:if(i.services.exists(o))return[3,5];switch(s.priority){case l.default.Immediate:return[3,1];case l.default.Defer:return[3,3];case l.default.Declare:return[3,4]}return[3,4];case 1:return[4,d(i,o,s.module)];case 2:return[2,e.sent()];case 3:return t=i,n=o,r=s.module,setTimeout(function(){d(t,n,r).catch(function(e){t.getCoreSvc(".Logger").error("Error loading service "+n+": "+JSON.stringify(e))})},2e3),[3,5];case 4:p(i,o,s.module),e.label=5;case 5:return[2,void 0]}var t,n,r})})}(i,o,s)]:[3,2];case 1:return[2,e.sent()];case 2:return i.getCoreSvc(".Logger").warn("Invalid definition for service "+o+": "+JSON.stringify(s)),[2,void 0]}var t,n,r})})}(n,e,r[e])}),[4,Promise.all(t)]):[2,void 0];case 1:return e.sent(),[2,void 0]}})})}},function(e,t){e.exports=b},function(e,t,n){"use strict";var r,i;Object.defineProperty(t,"__esModule",{value:!0}),(i=r||(r={})).PLUGINS_RENDER_IN_PROGRESS="PLUGINS_RENDER_IN_PROGRESS",i.PLUGINS_RENDER_SUCCESS="PLUGINS_RENDER_SUCCESS",i.CONTENT_VIEW_LOAD_IN_PROGRESS="CONTENT_VIEW_LOAD_IN_PROGRESS",i.CONTENT_VIEW_LOAD_SUCCESS="CONTENT_VIEW_LOAD_SUCCESS",i.CONTENT_VIEW_LOAD_FAILURE="CONTENT_VIEW_LOAD_FAILURE",i.CONTENT_VIEW_RENDER_SUCCESS="CONTENT_VIEW_RENDER_SUCCESS",i.CONTENT_VIEW_RENDER_FAILURE="CONTENT_VIEW_RENDER_FAILURE",t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5),i=r.types.model({x:r.types.number,y:r.types.number}),o=r.types.model({isVisible:r.types.optional(r.types.boolean,!1),position:r.types.optional(i,{x:0,y:0})}).volatile(function(){return{shownItems:[],selectedItem:{}}}).views(function(t){return{get menuItemsSplitByDivider(){var n=[],e=t.shownItems.reduce(function(e,t){return"divider"===t.type?(0<e.length&&n.push(e),n.push([]),e=[]):e.push(t),e},[]);return 0<e.length&&n.push(e),n}}}).actions(function(t){return{updateItems:function(e){t.shownItems=e},updatePosition:function(e){t.position=e},showMenu:function(){t.isVisible||(t.isVisible=!0)},closeMenu:function(){t.isVisible&&(t.isVisible=!1)},onSelect:function(e){t.selectedItem=e}}});t.default=o},function(e,r,t){"use strict";var i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};Object.defineProperty(r,"__esModule",{value:!0}),r.globalKeyword=void 0;var o=t(10),n=t(5);r.globalKeyword="__global__";var s=n.types.model("ActionModel",{id:n.types.optional(n.types.string,""),label:n.types.string,url:n.types.optional(n.types.string,""),actionId:n.types.maybe(n.types.string),actionContext:n.types.frozen(null)}),a=n.types.model("AlertModel",{id:n.types.string,title:n.types.optional(n.types.string,""),message:n.types.optional(n.types.string,""),scope:n.types.optional(n.types.string,r.globalKeyword),action:n.types.optional(s,{label:""})}),c=n.types.model("AlertStore",{disabled:n.types.optional(n.types.boolean,!1),alertList:n.types.optional(n.types.array(a),[])}).views(function(n){return{getAlerts:function(){return n.disabled?[]:n.alertList},getAlertAt:function(e){return n.getAlerts()[e]},getAlertsForPerspective:function(t){return n.getAlerts().filter(function(e){return e.scope===r.globalKeyword||e.scope===t}).sort(function(e,t){return e.scope===t.scope?0:e.scope===r.globalKeyword?1:-1})}}}).actions(function(n){return{addAlerts:function(e){Array.isArray(e)||(e=[e]),e=e.map(function(e){return(e=i({},e)).action&&(e.action=s.create(e.action)),a.create(e)}),n.alertList=(0,o.observable)(n.alertList.concat(e))},removeAlert:function(e){var t=n.alertList.slice();t.splice(e,1),n.alertList=(0,o.observable)(t)}}});r.default=c},function(e,t,n){"use strict";function o(e){return!("object"!=typeof e||null==e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t,n){if(!o(t))return t||n||{};if(!o(n))return t;for(var r in n){var i=n[r];i&&"[object Object]"===Object.prototype.toString.call(i)?(t[r]=t[r]||{},e(t[r],i)):void 0!==i&&(t[r]=i)}return t}},function(e,t){e.exports=_},function(e,t,n){e.exports=n(112)},function(e,r,t){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.idBypassBlockButtonMountpoint=void 0;var s=n(t(6)),a=n(t(1)),c=n(t(17)),l=n(t(33)),u=t(34),d=n(t(54)),p=n(t(55));r.idBypassBlockButtonMountpoint="glass-bypassBlockButton-mountpoint";var f=function(n){function e(e){var t=n.call(this,e)||this;return t.setFocusToMainContent=function(){void 0!==t.Glass.currentAppView&&null!==t.Glass.currentAppView&&"function"==typeof t.Glass.currentAppView.setFocus&&(document.activeElement.blur(),setTimeout(function(){t.Glass.currentAppView.setFocus()},100))},t.Glass.isHighContrastOn()&&(0,u.styleApplicationForHighContrast)(),t.mountBypassBlockButton(),t.keyPressedSet=new Set,t}return o(e,n),e.prototype.mountBypassBlockButton=function(){var e=document.createElement("div");e.setAttribute("id",r.idBypassBlockButtonMountpoint);var t=document.body;t&&t.childNodes instanceof NodeList&&0<t.childNodes.length?t.insertBefore(e,t.childNodes[0]):t.appendChild(e),c.default.render(a.default.createElement(d.default,{callback:this.setFocusToMainContent}),e)},e.prototype.setFocusToAppbar=function(){if(this.Glass.currentAppView){var e=document.querySelector(".appview.paneColumn:not(.hidden)");if(e){var t=e.querySelector(".appbar");this.focusOnForemostNode(t)}}},e.prototype.focusOnForemostNode=function(e){if(e){var t=e.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');0<t.length&&t[0].id&&this.Glass.findElement(t[0].id.replace(/\./g,"\\.")).focus()}},e.prototype.shortcutListener=function(e,t){"up"===e?(p.default.isModifierKey(t)||this.removeKeyFromSet(t.which),p.default.isMetaKey(t)&&this.clearKeyInSet()):"down"===e&&(p.default.isModifierKey(t)||this.addKeyIntoSet(t.which),this.processShortcutAction(t))},e.prototype.addKeyIntoSet=function(e){this.keyPressedSet.add(e)},e.prototype.removeKeyFromSet=function(e){this.keyPressedSet.delete(e)},e.prototype.clearKeyInSet=function(){this.keyPressedSet.clear()},e.prototype.processShortcutAction=function(n){var r=this,i={shortcutFocusToAppbar:{enabled:p.default.isShortcutTriggered("focusToAppbar",this.keyPressedSet,n),callback:function(){return r.setFocusToAppbar()}},shortcutFocusToMainContent:{enabled:p.default.isShortcutTriggered("focusToMainContent",this.keyPressedSet,n),callback:function(){return r.setFocusToMainContent()}}};Object.keys(i).forEach(function(e){var t=i[e];t.enabled&&"function"==typeof t.callback&&(p.default.metaKeyEnabled(n)&&r.clearKeyInSet(),t.callback())})},e.prototype.detectAccessibilityChange=function(e){var t=this;if(e){document.body.classList.add("accessibilityMode");var n=function(e){t.shortcutListener("down",e)},r=function(e){t.shortcutListener("up",e)};document.body.onmousedown=function(){document.body.onmousedown=null,t.detectAccessibilityChange(!1)}.bind(this),document.body.onkeydown=n.bind(this),document.body.onkeyup=r.bind(this)}else n=function(e){e.which===l.default.TAB&&(document.body.onkeydown=null,t.detectAccessibilityChange(!0)),t.shortcutListener("down",e)},r=function(e){t.shortcutListener("up",e)},document.body.classList.remove("accessibilityMode"),document.body.onkeydown=n.bind(this),document.body.onkeyup=r.bind(this)},e}(s.default);r.default=f},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=o(n(1)),a=n(8),c=o(n(11)),l=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.onclickCallback=function(e){var t=n.props.callback;e.stopPropagation(),e.nativeEvent.stopImmediatePropagation(),t()},n}return i(t,e),t.prototype.render=function(){return s.default.createElement(a.Button,{label:c.default.get("bypassBlockButtonTitle"),variant:"solid",intent:"primary",onClick:this.onclickCallback,style:{position:"absolute",top:"2px",left:"2px"},autofocus:!0})},t}(s.default.Component);t.default=l},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=r(n(33)),s=r(n(56)),i=function(){function i(){}return i.isShortcutTriggered=function(e,t,n){var r=i.shortcutMap[e];return null!=r&&i.verifyKeyset(r,t,n)},i.verifyKeyset=function(t,n,r){return Object.keys(t).every(function(e){if("others"===e){if(t.others.filter(function(e){return n.has(e)}).length!==t.others.length)return!1}else if("ctrlKey"===e&&r){if(!s.default.isDeviceMac()&&!r.ctrlKey||s.default.isDeviceMac()&&!r.metaKey)return!1}else if(r&&!r[e])return!1;return!0})},i.isModifierKey=function(e){return e&&e.key&&["control","shift","alt","meta"].includes(e.key.toLowerCase())},i.isMetaKey=function(e){return e&&e.key&&"meta"===e.key.toLowerCase()},i.metaKeyEnabled=function(e){return e&&e.metaKey},i.shortcutMap={focusToAppbar:{ctrlKey:!0,shiftKey:!0,others:[o.default.NUM1]},focusToMainContent:{ctrlKey:!0,shiftKey:!0,others:[o.default.NUM2]}},i}();t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){}return e.list={mac:["MacIntel","Macintosh"],windows:["Windows","Win32"]},e.isDeviceMac=function(){return navigator&&e.list.mac&&e.list.mac.includes(navigator.platform)},e.isDeviceWindows=function(){return navigator&&e.list.windows&&e.list.windows.includes(navigator.platform)},e}();t.default=r},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,s,a,c){return new(a||(a=Promise))(function(n,t){function r(e){try{o(c.next(e))}catch(e){t(e)}}function i(e){try{o(c.throw(e))}catch(e){t(e)}}function o(e){var t;e.done?n(e.value):(t=e.value,t instanceof a?t:new a(function(e){e(t)})).then(r,i)}o((c=c.apply(e,s||[])).next())})},s=this&&this.__generator||function(n,r){var i,o,s,e,a={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return e={next:t(0),throw:t(1),return:t(2)},"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(t){return function(e){return function(t){if(i)throw new TypeError("Generator is already executing.");for(;a;)try{if(i=1,o&&(s=2&t[0]?o.return:t[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,t[1])).done)return s;switch(o=0,s&&(t=[2&t[0],s.value]),t[0]){case 0:case 1:s=t;break;case 4:return a.label++,{value:t[1],done:!1};case 5:a.label++,o=t[1],t=[0];continue;case 7:t=a.ops.pop(),a.trys.pop();continue;default:if(!((s=0<(s=a.trys).length&&s[s.length-1])||6!==t[0]&&2!==t[0])){a=0;continue}if(3===t[0]&&(!s||t[1]>s[0]&&t[1]<s[3])){a.label=t[1];break}if(6===t[0]&&a.label<s[1]){a.label=s[1],s=t;break}if(s&&a.label<s[2]){a.label=s[2],a.ops.push(t);break}s[2]&&a.ops.pop(),a.trys.pop();continue}t=r.call(n,a)}catch(e){t=[6,e],o=0}finally{i=s=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}([t,e])}}},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.canExecuteAction=function(t,n){return o(this,void 0,void 0,function(){return s(this,function(e){switch(e.label){case 0:return this.Glass.currentAppView?null===t?[2,!1]:[4,this.Glass.currentAppView.canExecuteAction(t,n)]:[3,2];case 1:return[2,e.sent()];case 2:throw new Error("Internal error: No appview loaded.")}})})},t.prototype.performAction=function(e,t){if(this.Glass.currentAppView)return Promise.resolve(this.Glass.currentAppView.performAction(e,t));var n=new Error("Internal error: unable to find an appView");throw this.logger.error(n),n},t}(a(n(6)).default);t.default=c},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,s,a,c){return new(a||(a=Promise))(function(n,t){function r(e){try{o(c.next(e))}catch(e){t(e)}}function i(e){try{o(c.throw(e))}catch(e){t(e)}}function o(e){var t;e.done?n(e.value):(t=e.value,t instanceof a?t:new a(function(e){e(t)})).then(r,i)}o((c=c.apply(e,s||[])).next())})},a=this&&this.__generator||function(n,r){var i,o,s,e,a={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return e={next:t(0),throw:t(1),return:t(2)},"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(t){return function(e){return function(t){if(i)throw new TypeError("Generator is already executing.");for(;a;)try{if(i=1,o&&(s=2&t[0]?o.return:t[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,t[1])).done)return s;switch(o=0,s&&(t=[2&t[0],s.value]),t[0]){case 0:case 1:s=t;break;case 4:return a.label++,{value:t[1],done:!1};case 5:a.label++,o=t[1],t=[0];continue;case 7:t=a.ops.pop(),a.trys.pop();continue;default:if(!((s=0<(s=a.trys).length&&s[s.length-1])||6!==t[0]&&2!==t[0])){a=0;continue}if(3===t[0]&&(!s||t[1]>s[0]&&t[1]<s[3])){a.label=t[1];break}if(6===t[0]&&a.label<s[1]){a.label=s[1],s=t;break}if(s&&a.label<s[2]){a.label=s[2],a.ops.push(t);break}s[2]&&a.ops.pop(),a.trys.pop();continue}t=r.call(n,a)}catch(e){t=[6,e],o=0}finally{i=s=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}([t,e])}}},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var c,l=s(n(6)),u=s(n(12)),d=s(n(11)),p=s(n(4));(c||(c={})).DEFAULT_HOME_PERSPECTIVE="home";var f=function(n){function e(e){var t=n.call(this,e)||this;return t.initializeHomePageObjects(),t}return i(e,n),Object.defineProperty(e.prototype,"defaultHomePerspective",{set:function(e){this.homePerspectiveDefault=e},enumerable:!1,configurable:!0}),e.prototype.getHomePageObject=function(s){return o(this,void 0,void 0,function(){var t,n,r,i,o;return a(this,function(e){switch(e.label){case 0:if(t="number"==typeof s?s:0,n=this.homePageObjs,!(t<n.length))return[3,4];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,n[t]()];case 2:return!(r=e.sent())||r&&0===Object.keys(r).length?[2,this.getHomePageObject(t+1)]:(i={content:{isHomepage:!0}},[2,r=p.default.extend(!0,i,r)]);case 3:return o=e.sent(),this.logger.error("unable to get home page object",o),[3,4];case 4:throw new Error("Unsupported home page index:"+t)}})})},e.prototype.resetAppHomePage=function(t){return o(this,void 0,void 0,function(){return a(this,function(e){switch(e.label){case 0:return[4,this.Glass.getCoreSvc(".UserProfile").resetHome()];case 1:return e.sent(),this.Glass.perspectiveSwitcherRegistry.clearAllPerspectiveHomeFlags(),this.Glass.showToast(d.default.get("resetHomeSuccess"),{type:"success"}),t&&this.Glass.openAppView(),[2]}})})},e.prototype.initializeHomePageObjects=function(){this.homePageObjs=[this.getFactoryHomeObj.bind(this)],u.default.isFactoryMode()||this.homePageObjs.unshift(this.getUserHomePageObject.bind(this),this.getSystemHomeObject.bind(this))},e.prototype.getFactoryHomeObj=function(){return{perspective:this.homePerspectiveDefault||c.DEFAULT_HOME_PERSPECTIVE}},e.prototype.getSystemHomeObject=function(){var e=this.Glass.getCoreSvc(".UserProfile");if(e.userProfileSettings&&e.userProfileSettings.ui_homePage){var t=e.userProfileSettings.ui_homePage;return t&&t.content&&"run"===t.content.action&&delete t.content.action,t}return{}},e.prototype.getUserHomePageObject=function(){return o(this,void 0,void 0,function(){var t,n,r;return a(this,function(e){switch(e.label){case 0:t=this.Glass.getCoreSvc(".UserProfile"),e.label=1;case 1:return e.trys.push([1,4,,5]),t.preferences&&t.preferences.homePage?[3,3]:[4,t.updateContext()];case 2:e.sent(),e.label=3;case 3:if(n=void 0,t.preferences&&(n=t.preferences.homePage),!n)return[2,{}];try{return[2,JSON.parse(n)]}catch(e){throw this.logger.error("Not valid JSON format. Invalid home page specification.",e),new Error("Not valid JSON format. Invalid home page specification.")}return[3,5];case 4:return r=e.sent(),this.logger.error("Unable to get user home object",r),[2,{}];case 5:return[2]}})})},e}(l.default);t.default=f},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),d=this&&this.__awaiter||function(e,s,a,c){return new(a||(a=Promise))(function(n,t){function r(e){try{o(c.next(e))}catch(e){t(e)}}function i(e){try{o(c.throw(e))}catch(e){t(e)}}function o(e){var t;e.done?n(e.value):(t=e.value,t instanceof a?t:new a(function(e){e(t)})).then(r,i)}o((c=c.apply(e,s||[])).next())})},p=this&&this.__generator||function(n,r){var i,o,s,e,a={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return e={next:t(0),throw:t(1),return:t(2)},"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(t){return function(e){return function(t){if(i)throw new TypeError("Generator is already executing.");for(;a;)try{if(i=1,o&&(s=2&t[0]?o.return:t[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,t[1])).done)return s;switch(o=0,s&&(t=[2&t[0],s.value]),t[0]){case 0:case 1:s=t;break;case 4:return a.label++,{value:t[1],done:!1};case 5:a.label++,o=t[1],t=[0];continue;case 7:t=a.ops.pop(),a.trys.pop();continue;default:if(!((s=0<(s=a.trys).length&&s[s.length-1])||6!==t[0]&&2!==t[0])){a=0;continue}if(3===t[0]&&(!s||t[1]>s[0]&&t[1]<s[3])){a.label=t[1];break}if(6===t[0]&&a.label<s[1]){a.label=s[1],s=t;break}if(s&&a.label<s[2]){a.label=s[2],a.ops.push(t);break}s[2]&&a.ops.pop(),a.trys.pop();continue}t=r.call(n,a)}catch(e){t=[6,e],o=0}finally{i=s=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}([t,e])}}},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=o(n(6)),a=o(n(1)),c=o(n(17)),l=o(n(60)),u=o(n(11)),f=function(n){function e(e){var t=n.call(this,e)||this;return t.mountComponent(),t}return i(e,n),e.prototype.mountComponent=function(){var e=document.createElement("div");e.setAttribute("id","glass-dialog-mountpoint"),c.default.render(a.default.createElement(l.default,{store:this.Glass.getCoreSvc(".Dialog").getStore(),Glass:this.Glass}),document.body.appendChild(e))},e.prototype.showErrorMessage=function(t,n,r,i){return d(this,void 0,void 0,function(){return p(this,function(e){switch(e.label){case 0:return[4,this.showMessage(t,n,"error",["ok"],"300px",r,i)];case 1:return[2,e.sent()]}})})},e.prototype.showMessage=function(r,i,o,s,a,c,l,u){return d(this,void 0,void 0,function(){var n=this;return p(this,function(e){return[2,new Promise(function(e){try{var t={message:r,title:i,type:o,buttons:s,width:a,callback:{general:c},htmlContent:l,className:u,callbackScope:{ok:n}};n.Glass.getCoreSvc(".Dialog").createDialog(t),e()}catch(e){throw n.logger.error(e),e}})]})})},e.prototype.showResetHomeDialog=function(r){return d(this,void 0,void 0,function(){var n=this;return p(this,function(e){return[2,new Promise(function(e){try{var t={message:r,title:u.default.get("invalidHomePageTitle"),type:"warning",buttons:["ok","cancel"],htmlContent:!1,callback:{ok:function(){return n.Glass.resetHome(!0)}}};n.Glass.getCoreSvc(".Dialog").createDialog(t),e()}catch(e){throw n.logger.error(e),e}})]})})},e.prototype.showShareDialog=function(i){return d(this,void 0,void 0,function(){var t,n,r;return p(this,function(e){switch(e.label){case 0:return t={urlMap:i,isEmbed:!1},n=this.Glass.getUrl(t),r={title:u.default.get("shareDialogTitle"),type:"share",width:"500px",buttons:["copy","cancel"],htmlContent:!1,payload:{url:n}},[4,this.showNewModalDialog(r)];case 1:return[2,e.sent()]}})})},e.prototype.showEmbedDialog=function(i){return d(this,void 0,void 0,function(){var t,n,r;return p(this,function(e){switch(e.label){case 0:return t={urlMap:i,isEmbed:!0},n=this.Glass.getUrl(t),r={title:u.default.get("embedDialogTitle"),type:"embed",width:"500px",buttons:["copy","cancel"],htmlContent:!1,payload:{url:n}},[4,this.showNewModalDialog(r)];case 1:return[2,e.sent()]}})})},e.prototype.showNewModalDialog=function(n){return d(this,void 0,void 0,function(){var t=this;return p(this,function(e){return[2,new Promise(function(e){try{t.Glass.getCoreSvc(".Dialog").createDialog(n),e()}catch(e){throw t.logger.error("Modal Error: Failed to load modal",e),e}})]})})},e}(s.default);t.default=f},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;0<=a;a--)(i=e[a])&&(s=(o<3?i(s):3<o?i(t,n,s):i(t,n))||s);return 3<o&&s&&Object.defineProperty(t,n,s),s},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=s(n(1)),c=n(8),l=n(9),u=n(10),d=s(n(11)),p=function(n){function e(e){var t=n.call(this,e)||this;return t.state={embedWidth:500,embedHeight:400},t.isIOSdevice=/iPad/i.test(navigator.userAgent),t.buttonLabelMap={copy:"copyText",ok:"ok",cancel:"cancel",close:"close"},t}return i(e,n),e.prototype.bindOnClose=function(e){for(var t=this.props.Glass,n=0;n<e.length;n+=1)e[n].onClose=function(){return t.getCoreSvc(".Dialog").removeDialog()};return e},e.prototype.copyToClipboard=function(){this.targetTextarea.select(),document.execCommand("copy")},e.prototype.buttonsEmbedShareDialog=function(t){var n=this,r=this.props.Glass;return a.default.createElement(c.Dialog.Footer,null,t.buttons.map(function(e){return a.default.createElement(c.Dialog.Button,{id:"copy"===e?"copy_button":e,className:"button dialogButton "+("copy"===e?"primary":"secondary"),key:""+t.key+e,label:d.default.get(n.buttonLabelMap[e]),primary:"copy"===e,onClick:function(){"cancel"===e?r.getCoreSvc(".Dialog").removeDialog(e):"copy"===e&&n.copyToClipboard()},style:{margin:"0px 0px 0px 16px"}})}))},e.prototype.urlGenerator=function(e){if("embed"!==e.type)return e.payload&&e.payload.url?e.payload.url:"";var t=this.state,n=t.embedWidth,r=t.embedHeight;return'<iframe src="'+(e.payload&&e.payload.url?e.payload.url.replace(/&/g,"&"):"")+'" width="'+n+'" height="'+r+'"></iframe>'},e.prototype.urlDisplay=function(e){var t=this;return a.default.createElement("textarea",{className:"displayedURLOrCode","aria-label":d.default.get("share"===e.type?"shareDialogCodeLabel":"embedDialogCodeLabel"),tabIndex:0,readOnly:!this.isIOSdevice,style:{width:"100%",height:"96px"},ref:function(e){t.targetTextarea=e},value:this.urlGenerator(e)})},e.prototype.nodeEmbedDialog=function(e){var n=this,t=this.state,r=t.embedWidth,i=t.embedHeight;return a.default.createElement(a.default.Fragment,null,a.default.createElement(c.Dialog.Body,null,a.default.createElement("div",{className:"embedDialogText",style:{marginBottom:"24px"},"aria-label":d.default.get("embedDialogText")},d.default.get("embedDialogText")),a.default.createElement("div",{className:"embedDialogSizeAdjustor",style:{marginBottom:"16px"}},a.default.createElement("div",{style:{width:"50%",display:"inline-block"}},a.default.createElement("div",null,d.default.get("embedURLWidthLabel")),a.default.createElement(c.NumberInput,{id:"GlassMessageDialog_embedWidth",value:r,scale:1,max:1e5,onValueAccept:function(e,t){return Number(e)===Number(t)&&n.setState({embedWidth:e})}})),a.default.createElement("div",{style:{width:"50%",display:"inline-block"}},a.default.createElement("div",null,d.default.get("embedURLHeightLabel")),a.default.createElement(c.NumberInput,{id:"GlassMessageDialog_embedHeight",value:i,scale:1,max:1e5,onValueAccept:function(e,t){return Number(e)===Number(t)&&n.setState({embedHeight:e})}}))),this.urlDisplay(e)),this.buttonsEmbedShareDialog(e))},e.prototype.nodeShareDialog=function(e){return a.default.createElement(a.default.Fragment,null,a.default.createElement(c.Dialog.Body,null,a.default.createElement("div",{className:"shareDialogText",style:{marginBottom:"16px"},"aria-label":d.default.get("shareDialogText")},d.default.get("shareDialogText")),this.urlDisplay(e)),this.buttonsEmbedShareDialog(e))},e.prototype.nodeGeneralDialog=function(i){var o=this,s=this.props.Glass;return a.default.createElement(a.default.Fragment,null,i.isHTMLContent?a.default.createElement(c.Dialog.Body,{dangerouslySetInnerHTML:{__html:i.message}}):a.default.createElement(c.Dialog.Body,null,a.default.createElement("div",{className:"messageBox "+i.type},i.message)),a.default.createElement(c.Dialog.Footer,null,i.buttons.map(function(e){var t="object"==typeof e&&e.text?e.text:d.default.get(o.buttonLabelMap["string"==typeof e?e:"ok"]),n="object"==typeof e&&e.defaultId?e.defaultId:e,r="ok"===e||"object"==typeof e&&"ok"===e.defaultId;return a.default.createElement(c.Dialog.Button,{key:""+i.key+t,id:n,className:"button dialogButton "+(r?"primary":"secondary"),label:t,primary:r,onClick:function(){return s.getCoreSvc(".Dialog").removeDialog(n)},style:{margin:"0px 0px 0px 16px"}})})))},e.prototype.renderBodyFooter=function(e){var t;switch(e.type){case"info":case"error":case"warning":t=this.nodeGeneralDialog(e);break;case"share":t=this.nodeShareDialog(e);break;case"embed":t=this.nodeEmbedDialog(e);break;default:t=this.nodeGeneralDialog(e)}return t},e.prototype.render=function(){var t=this,e=this.props.store,n=this.bindOnClose((0,u.toJS)(e?e.dialogs:[]));return n&&n.map(function(e){return a.default.createElement(c.Dialog,{size:e.size,width:e.width,className:e.className,startingFocusIndex:-1,onClose:e.onClose,style:{zIndex:9999999}},a.default.createElement(c.Dialog.SubHeader,null,e.subTitle),a.default.createElement(c.Dialog.Header,null,e.title),t.renderBodyFooter(e))})},o([l.observer],e)}(a.default.Component);t.default=p},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,s,a,c){return new(a||(a=Promise))(function(n,t){function r(e){try{o(c.next(e))}catch(e){t(e)}}function i(e){try{o(c.throw(e))}catch(e){t(e)}}function o(e){var t;e.done?n(e.value):(t=e.value,t instanceof a?t:new a(function(e){e(t)})).then(r,i)}o((c=c.apply(e,s||[])).next())})},s=this&&this.__generator||function(n,r){var i,o,s,e,a={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return e={next:t(0),throw:t(1),return:t(2)},"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(t){return function(e){return function(t){if(i)throw new TypeError("Generator is already executing.");for(;a;)try{if(i=1,o&&(s=2&t[0]?o.return:t[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,t[1])).done)return s;switch(o=0,s&&(t=[2&t[0],s.value]),t[0]){case 0:case 1:s=t;break;case 4:return a.label++,{value:t[1],done:!1};case 5:a.label++,o=t[1],t=[0];continue;case 7:t=a.ops.pop(),a.trys.pop();continue;default:if(!((s=0<(s=a.trys).length&&s[s.length-1])||6!==t[0]&&2!==t[0])){a=0;continue}if(3===t[0]&&(!s||t[1]>s[0]&&t[1]<s[3])){a.label=t[1];break}if(6===t[0]&&a.label<s[1]){a.label=s[1],s=t;break}if(s&&a.label<s[2]){a.label=s[2],a.ops.push(t);break}s[2]&&a.ops.pop(),a.trys.pop();continue}t=r.call(n,a)}catch(e){t=[6,e],o=0}finally{i=s=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}([t,e])}}},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var c=function(n){function e(e){var t=n.call(this,e)||this;return t.attachApplicationEventListeners(),t.attachUnhandledRejectionListenerToWindow(),t.attachPopStateListenerToWindow(),t}return i(e,n),e.prototype.off=function(e,t,n){this.eventService.off(e,t,n)},e.prototype.on=function(e,t,n){this.eventService.on(e,t,n)},e.prototype.emit=function(e,t){this.eventService.trigger(e,t)},e.prototype.trigger=function(e,t){this.eventService.trigger(e,t)},e.prototype.attachApplicationEventListeners=function(){var t=this;this.on("appView:titleChange",function(e){t.trigger("change:title",e),e.value&&(document.title=e.value)})},e.prototype.attachPopStateListenerToWindow=function(){var e=this;this.Glass.trackHistory&&(window.onpopstate=function(n){return o(e,void 0,void 0,function(){var t;return s(this,function(e){switch(e.label){case 0:return(t=n.state)?(this.Glass.windowPoppingState=!0,[4,this.Glass.openAppView(t.perspective,t)]):[3,2];case 1:e.sent(),this.Glass.windowPoppingState=!1,e.label=2;case 2:return[2]}})})})},e.prototype.attachUnhandledRejectionListenerToWindow=function(){var t=this;window.addEventListener("unhandledrejection",function(e){e.preventDefault(),e&&e.detail&&e.detail.reason&&t.logger.error(e.detail.reason)})},e}(a(n(6)).default);t.default=c},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=r(n(23)),o=r(n(25)),s=r(n(26)),a=r(n(27)),c=r(n(28)),l=r(n(64)),u=r(n(65)),d=r(n(66)),p=r(n(67)),f=r(n(68)),h=r(n(69)),g=r(n(70)),v=r(n(71)),y=r(n(72)),m=r(n(12)),b=r(n(73)),_=r(n(74)),w=r(n(75)),C=r(n(76)),S=r(n(77)),P=r(n(78)),O=function(){function e(e){this.appController=e.appController,this.authInfo=e.authInfo,this.cacheAppViews=e.cacheAppViews,this.installInfo=e.installInfo,this.versionInfo=e.versionInfo,this.trackHistory=e.trackHistory,this.requirejs=e.requirejs,this.coreServices={},this.services=new C.default({}),this.registerAllCoreServices(),this.registerLegacyServices(),this.profile=this.profile||{},this.ajaxCodes={SSO:441,UNAUTHORIZED:441,AUTH_DENIED:401};var t=m.default.getQueryDataParameterMap(this);this.isAppEmbedded=t&&"embedded"===t.shareMode,this.isPrefetchSvcDisabled=t&&"disabled"===t.prefetchsvc}return e.prototype.getSvc=function(e,t){return this.services.getSvc(e,t)},e.prototype.getSvcSync=function(e){var t=null;try{t=this.services.getSvcSync(e)}catch(e){return t}return t},e.prototype.getCoreSvc=function(e){if(!this.coreServices[e])try{throw new Error('Service "'+e+'" is not a core service and may not be available synchronously...')}catch(e){this.getCoreSvc(".Logger").warn(e)}return this.services.getSvcSync(e)},e.prototype.registerCoreService=function(e,t){this.coreServices[e]=!0,this.services.register(e,t)},e.prototype.addToOptions=function(e){var t=e||{};return t.glassContext=this,t.Glass=this,t},e.prototype.isDevInstall=function(){var e=!1;return"string"==typeof this.installInfo&&(e="development"===this.installInfo.toLowerCase()),e},e.prototype.hasCapability=function(e){var t=this.getCoreSvc(".UserProfile").capabilities;return!!t&&t.includes(e)},e.prototype.isEmbedded=function(){return!!this.isAppEmbedded},e.prototype.isPrefetchDisabled=function(){return!!this.isPrefetchSvcDisabled},e.prototype.getRequireJs=function(){return this.requirejs},e.prototype.registerAllCoreServices=function(){var e=new p.default(this.addToOptions());this.registerCoreService(".Logger",new _.default),this.registerCoreService(".WindowProxy",new P.default(this,window,{dialog:!0})),this.registerCoreService(".Ajax",new l.default({configService:e})),this.registerCoreService(".Logger",new _.default),this.registerCoreService(".Context",new f.default(this.addToOptions())),this.registerCoreService(".CoachMarkService",new d.default(this)),this.registerCoreService(".FeatureChecker",new g.default(v.default)),this.registerCoreService(".Events",new h.default),this.registerCoreService(".Perspective",new o.default(this)),this.registerCoreService(".UserProfile",new S.default(this.addToOptions())),this.registerCoreService(".Config",e),this.registerCoreService(".Clipboard",new u.default(this)),this.registerCoreService(".Prefetch",new w.default(this)),this.registerCoreService(".Taxonomy",new a.default(this)),this.registerCoreService(".URLEncoder",new s.default(this)),this.registerCoreService(".Toast",new c.default(this)),this.registerCoreService(".Dialog",new i.default(this))},e.prototype.registerLegacyServices=function(){var t=this,n={ajax:new b.default(this.addToOptions()),fetch:new y.default(this.addToOptions()),userProfile:this.getCoreSvc(".UserProfile"),config:this.getCoreSvc(".Config"),logger:this.getCoreSvc(".Logger")};Object.keys(n).forEach(function(e){t.services.register(e,n[e]),t.services[e]=n[e]})},e.prototype.getSSOLoginURL=function(){return this.getCoreSvc(".Logger").info('Glass.getSSOLoginURL has been deprecated... use getCoreSvc(".Config").getSSOLoginURL() instead.'),this.getCoreSvc(".Config").getSSOLoginURL()},e.prototype.getSSOLogoutURL=function(){return this.getCoreSvc(".Logger").info('Glass.getSSOLogoutURL has been deprecated... use getCoreSvc(".Config").getSSOLogoutURL() instead.'),this.getCoreSvc(".Config").getSSOLogoutURL()},e.prototype.getAllowedUrlLoginParameters=function(){return this.getCoreSvc(".Logger").info('Glass.getAllowedUrlLoginParameters has been deprecated... use getCoreSvc(".Config").getAllowedUrlLoginParameters() instead.'),this.getCoreSvc(".Config").getAllowedUrlLoginParameters()},e.prototype.setSSOURL=function(){return this.getCoreSvc(".Logger").info('Glass.setSSOURL has been deprecated... use getCoreSvc(".Config").setSSOURL() instead.'),this.getCoreSvc(".Config").setSSOURL()},e}();t.default=O},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(10),r=n(5),o=r.types.model({url:r.types.optional(r.types.string,"")}),s=r.types.model({defaultId:r.types.string,text:r.types.string}),a=r.types.model("DialogModel",{key:r.types.optional(r.types.string,""),message:r.types.optional(r.types.string,""),title:r.types.string,subTitle:r.types.optional(r.types.string,""),type:r.types.enumeration("dialogType",["info","error","share","embed","warning"]),buttons:r.types.optional(r.types.array(r.types.union(r.types.string,s)),[]),width:r.types.optional(r.types.string,""),hasCallback:r.types.optional(r.types.boolean,!1),isHTMLContent:r.types.optional(r.types.union(r.types.boolean,r.types.null),!1),className:r.types.optional(r.types.string,""),size:r.types.enumeration("dialogSize",["small","large"]),payload:r.types.optional(o,{})}),c=r.types.model("DialogStore",{dialogStack:r.types.optional(r.types.array(a),[])}).views(function(e){return{get dialogs(){return e.dialogStack},get dialogsInPlain(){return(0,i.toJS)(e.dialogStack)}}}).actions(function(r){return{addDialog:function(e){var t,n;r.dialogStack=(0,i.observable)(r.dialogStack.concat((n={message:(t=e).message,title:t.title,subTitle:t.subTitle,type:t.type,buttons:t.buttons&&Array.isArray(t.buttons)?t.buttons:[],width:t.width,hasCallback:t.callback&&"object"==typeof t.callback&&0<Object.keys(t.callback).length&&0<Object.values(t.callback).filter(function(e){return e&&"function"==typeof e}).length,isHTMLContent:t.htmlContent,className:t.className,size:"error"===t.type?"small":"large",key:t.id,payload:t.payload},a.create(n))))},removeDialog:function(){r.dialogStack=(0,i.observable)(r.dialogStack.slice(0,r.dialogStack.length-1))},removeAllDialogs:function(){r.dialogStack=(0,i.observable)([])}}});t.default=c},function(e,t){e.exports=w},function(e,t){e.exports=C},function(e,t){e.exports=S},function(e,t){e.exports=P},function(e,t){e.exports=O},function(e,t){e.exports=E},function(e,t){e.exports=x},function(e,t){e.exports=M},function(e,t){e.exports=T},function(e,t){e.exports=A},function(e,t){e.exports=D},function(e,t){e.exports=j},function(e,t){e.exports=I},function(e,t){e.exports=L},function(e,t){e.exports=k},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=o(n(6)),a=o(n(1)),c=o(n(17)),l=o(n(80)),u=o(n(81)),d=o(n(82)),p=o(n(88)),f=o(n(90)),h=o(n(104)),g=o(n(105)),v=o(n(106)),y=o(n(19)),m=function(t){function e(e){var r=t.call(this,e)||this;return r.closeOpenWidgets=function(){return r.openPerspectiveController.closeOpenWidgets()},r.updateCurrentPerspectiveCache=function(){return r.perspectiveViewsCache.updateCache(r.Glass.currentAppView)},r.isOpeningAPerspective=function(){return r.openPerspectiveController.isOpeningAPerspective()},r.openLoginPerspective=function(e){return r.openPerspectiveController.openLoginPerspective(e)},r.openPerspective=function(e,t){return r.openPerspectiveController.openPerspective(e,t)},r.openPreviousPerspective=function(){return r.openPerspectiveController.openPreviousPerspective()},r.closeAllPerspectives=function(e,t){return r.closePerspectiveController.closeAllPerspectives(e,t)},r.closePerspective=function(e,t,n){return r.closePerspectiveController.closePerspective(e,t,n)},r.perspectiveSwitcherRegistry=new v.default(r.Glass),r.perspectiveViewsCache=new g.default(r.Glass),r.urlHelper=new y.default,r.initializeGlassUIRender(),r.openPerspectiveController=new d.default(r.Glass,r.perspectiveSwitcherRegistry,r.perspectiveViewsCache,r.glassStore,r.perspectivesRegistry,r.perspectivesFactory,r.urlHelper),r.closePerspectiveController=new l.default(r.Glass,r.perspectiveSwitcherRegistry,r.perspectiveViewsCache,r.glassStore,r.perspectivesRegistry),r}return i(e,t),Object.defineProperty(e.prototype,"cachedPerspectives",{get:function(){return this.perspectiveViewsCache.getCachedPerspectives()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isLoginViewShown",{get:function(){return!!this.openPerspectiveController.loginView},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"url",{get:function(){return this.urlHelper},enumerable:!1,configurable:!0}),e.prototype.getMountPointForGlassUI=function(){return 0<this.Glass.rootPane.length&&this.Glass.rootPane[0]?this.Glass.rootPane[0]:document.getElementById("main")},e.prototype.initializeGlassUIRender=function(){this.glassStore=u.default.create(),this.perspectivesRegistry=new h.default(this.glassStore),this.perspectivesFactory=new f.default(this.perspectivesRegistry,this.Glass);try{c.default.render(a.default.createElement(p.default,{perspectiveRegistry:this.perspectivesRegistry,glassStore:this.glassStore}),this.getMountPointForGlassUI())}catch(e){this.logger.error("Mount point is not correctly set for Glass UI",e,this.Glass.rootPane)}},e}(s.default);t.default=m},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),s=this&&this.__awaiter||function(e,s,a,c){return new(a||(a=Promise))(function(n,t){function r(e){try{o(c.next(e))}catch(e){t(e)}}function i(e){try{o(c.throw(e))}catch(e){t(e)}}function o(e){var t;e.done?n(e.value):(t=e.value,t instanceof a?t:new a(function(e){e(t)})).then(r,i)}o((c=c.apply(e,s||[])).next())})},a=this&&this.__generator||function(n,r){var i,o,s,e,a={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return e={next:t(0),throw:t(1),return:t(2)},"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(t){return function(e){return function(t){if(i)throw new TypeError("Generator is already executing.");for(;a;)try{if(i=1,o&&(s=2&t[0]?o.return:t[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,t[1])).done)return s;switch(o=0,s&&(t=[2&t[0],s.value]),t[0]){case 0:case 1:s=t;break;case 4:return a.label++,{value:t[1],done:!1};case 5:a.label++,o=t[1],t=[0];continue;case 7:t=a.ops.pop(),a.trys.pop();continue;default:if(!((s=0<(s=a.trys).length&&s[s.length-1])||6!==t[0]&&2!==t[0])){a=0;continue}if(3===t[0]&&(!s||t[1]>s[0]&&t[1]<s[3])){a.label=t[1];break}if(6===t[0]&&a.label<s[1]){a.label=s[1],s=t;break}if(s&&a.label<s[2]){a.label=s[2],a.ops.push(t);break}s[2]&&a.ops.pop(),a.trys.pop();continue}t=r.call(n,a)}catch(e){t=[6,e],o=0}finally{i=s=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}([t,e])}}},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var c=o(n(37)),l=o(n(39)),u=o(n(11)),d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.closeAllPerspectives=function(e,t){var n,r,i=this.perspectiveViewsCache.getDirtyCachedViews();if(e||!0!==t||0!==i.length){if(!e&&0<i.length)return t?(n=i,r=u.default.get("unsavedViewsMsg")+"\n\r",n.forEach(function(e){r+=e.getTitle(!0)+"\r"}),r):this.closeAllPerspectivesWithConfirmation();var o=this.closeAllPerspectiveViews(t,!0);return t?void 0:new Promise(function(e,t){o.then(e,t)})}},t.prototype.closePerspective=function(r,i,o){return s(this,void 0,void 0,function(){var t,n;return a(this,function(e){return t={perspective:r},i&&(t.content={id:i}),n=this.perspectiveViewsCache.getCachedViewByPerspectiveNameAndContext(r,t),[2,this.closePerspectiveView(n,null,null,o)]})})},t.prototype.closeAllPerspectivesWithConfirmation=function(){return s(this,void 0,void 0,function(){return a(this,function(e){switch(e.label){case 0:return[4,l.default.waitForCloseConfirmation(this.Glass)];case 1:return e.sent(),this.closeAllPerspectiveViews(!1,!0),[2]}})})},t.prototype.closeAllPerspectiveViews=function(t,o){return s(this,void 0,void 0,function(){var r,i=this;return a(this,function(e){return t&&this.Glass.currentAppView.updateRenderState(!0),this.Glass.previousAppView=void 0,r=[],this.perspectiveViewsCache.getCacheKeys().forEach(function(e){var t=i.perspectiveViewsCache.getCachedView(e);t.cleanupSlideoutController();var n=i.closePerspectiveView.bind(i,t,!0,o);r.push(n())}),this.perspectiveViewsCache.clearCache(),[2,Promise.all(r)]})})},t.prototype.closePerspectiveView=function(t,n,r,i){return s(this,void 0,void 0,function(){return a(this,function(e){switch(e.label){case 0:return t?!t.shouldShowCloseConfirmationDialog()||n?[3,2]:[4,l.default.waitForCloseConfirmation(this.Glass,i)]:[3,6];case 1:e.sent(),e.label=2;case 2:return t!==this.Glass.currentAppView?[3,4]:[4,this.closeOpenWidgets()];case 3:e.sent(),e.label=4;case 4:return[4,this.removePerspective(t,i)];case 5:e.sent(),this.removePerspectiveEvents(t),this.cleanSwitcherRegistry(t,r),this.Glass.previousAppView===t&&(this.Glass.previousAppView=void 0),this.perspectiveViewsCache.removeCachedView(t.cacheKey),null==r&&this.postPerspectiveClose(),e.label=6;case 6:return[2,!0]}})})},t.prototype.cleanSwitcherRegistry=function(e,t){var n=this.perspectiveSwitcherRegistry.getIndexOfPerspective(e);this.Glass.perspectiveSwitcherRegistry.removePerspective(e),e===this.Glass.currentAppView&&(-1===n&&(n=0),this.attemptToOpenPreviousPerspective(n,e,t))},t.prototype.postPerspectiveClose=function(){var e=this.Glass.noCloseOnLastPerspective;0===this.perspectiveSwitcherRegistry.size()&&e&&window.close(),this.pendingOpenPerspectivePromise=null},t.prototype.removePerspective=function(t,n){return s(this,void 0,void 0,function(){return a(this,function(e){switch(e.label){case 0:return this.perspectivesRegistry.remove(t.perspectiveModel.id),this.glassStore.removePerspectiveModel(t.perspectiveModel.id),[4,t.remove(!0,n)];case 1:return[2,e.sent()]}})})},t.prototype.removePerspectiveEvents=function(e){this.Glass.off("change:title",void 0,e.viewId)},t}(c.default);t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5),i=n(10),o=r.types.model({perspectiveModels:r.types.optional(r.types.array(r.types.string),[]),registeredPerspectives:r.types.optional(r.types.array(r.types.string),[]),currentPerspective:r.types.optional(r.types.string,"")}).actions(function(n){return{addPerspectiveModel:function(e){n.perspectiveModels.push(e.id)},removePerspectiveModel:function(t){var e=n.perspectiveModels.filter(function(e){return e!==t});n.perspectiveModels=(0,i.observable)(e)},registerPerspective:function(e){n.registeredPerspectives.push(e)},deregisterPerspective:function(e){n.registeredPerspectives.remove(e)},setCurrentPerspective:function(e){n.currentPerspective=e}}});t.default=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return s(t,e),t},p=this&&this.__awaiter||function(e,s,a,c){return new(a||(a=Promise))(function(n,t){function r(e){try{o(c.next(e))}catch(e){t(e)}}function i(e){try{o(c.throw(e))}catch(e){t(e)}}function o(e){var t;e.done?n(e.value):(t=e.value,t instanceof a?t:new a(function(e){e(t)})).then(r,i)}o((c=c.apply(e,s||[])).next())})},f=this&&this.__generator||function(n,r){var i,o,s,e,a={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return e={next:t(0),throw:t(1),return:t(2)},"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(t){return function(e){return function(t){if(i)throw new TypeError("Generator is already executing.");for(;a;)try{if(i=1,o&&(s=2&t[0]?o.return:t[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,t[1])).done)return s;switch(o=0,s&&(t=[2&t[0],s.value]),t[0]){case 0:case 1:s=t;break;case 4:return a.label++,{value:t[1],done:!1};case 5:a.label++,o=t[1],t=[0];continue;case 7:t=a.ops.pop(),a.trys.pop();continue;default:if(!((s=0<(s=a.trys).length&&s[s.length-1])||6!==t[0]&&2!==t[0])){a=0;continue}if(3===t[0]&&(!s||t[1]>s[0]&&t[1]<s[3])){a.label=t[1];break}if(6===t[0]&&a.label<s[1]){a.label=s[1],s=t;break}if(s&&a.label<s[2]){a.label=s[2],a.ops.push(t);break}s[2]&&a.ops.pop(),a.trys.pop();continue}t=r.call(n,a)}catch(e){t=[6,e],o=0}finally{i=s=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}([t,e])}}},c=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var l=c(n(37)),u=a(n(10)),d=c(n(24)),h=c(n(40)),g=n(41),v=n(42),y=c(n(14)),m=c(n(12)),b=c(n(11)),_=c(n(19)),w=c(n(4)),C=function(c){function e(e,t,n,r,i,o,s){var a=c.call(this,e,t,n,r,i)||this;return a.perspectivesFactory=o,a.urlHelper=s,a}return i(e,c),e.prototype.isOpeningAPerspective=function(){return void 0!==this.pendingOpenPerspectivePromise&&null!==this.pendingOpenPerspectivePromise},e.prototype.openLoginPerspective=function(r){return p(this,void 0,void 0,function(){var t,n;return f(this,function(e){switch(e.label){case 0:return r=void 0===r?{}:r,this.isOpeningAPerspective()?r&&r.content&&r.content.origin&&r.content.origin.relogin?(this.pendingOpenPerspectivePromise=null,[3,3]):[3,1]:[3,3];case 1:return[4,this.openPendingPerspective()];case 2:e.sent(),e.label=3;case 3:return e.trys.push([3,6,7,8]),[4,this.closeOpenWidgets()];case 4:return e.sent(),[4,this.renderPerspective("login",r,this.Glass.currentAppView)];case 5:return t=e.sent(),[2,this.loginView=t];case 6:throw n=e.sent(),this.handleOpenLoginViewError(),n;case 7:return this.Glass.reloadTheme(),[7];case 8:return[2]}})})},e.prototype.openPerspective=function(r,i){return p(this,void 0,void 0,function(){var t,n;return f(this,function(e){switch(e.label){case 0:return[4,this.openPendingPerspective()];case 1:e.sent(),e.label=2;case 2:return e.trys.push([2,6,,7]),"login"===r?(this.pendingOpenPerspectivePromise=this.openLoginPerspective(i),[2,this.pendingOpenPerspectivePromise]):[4,this.closeOpenWidgets()];case 3:return e.sent(),[4,this.buildPerspectiveContext(r,i)];case 4:return t=e.sent(),this.pendingOpenPerspectivePromise=this.showPerspective(t.perspectiveName,t.context),[4,this.pendingOpenPerspectivePromise];case 5:return[2,e.sent()];case 6:return n=e.sent(),this.pendingOpenPerspectivePromise=this.handleOpenPerspectiveError(n),[2,this.pendingOpenPerspectivePromise];case 7:return[2]}})})},e.prototype.openPreviousPerspective=function(){return this.Glass.previousAppView&&this.perspectiveViewsCache.getCachedView(this.Glass.previousAppView.cacheKey)?this.openPerspective(this.Glass.previousAppView.perspective,this.Glass.previousAppView.context):this.isOpeningAPerspective()?this.openPerspective():null},e.prototype.displayPerspective=function(e,t){return e&&"function"==typeof e.hasHomeFlag&&this.setHomeFlag(e,e.hasHomeFlag()),t&&"function"==typeof t.hide&&(t.hide(),0<this.perspectiveSwitcherRegistry.size()&&this.perspectiveViewsCache.updateCache(t)),"login"!==e.perspective&&this.loginView&&(this.removeLoginView(),this.Glass.reloadTheme()),e.show(),this.Glass.trigger("appView:loaded",{perspective:e.perspective,context:e.context,appView:e}),e.setFocus(),this.perspectiveSwitcherRegistry.addPerspective(e),this.Glass.unlockGlass(),this.Glass.isEmbedded()||this.Glass.isPrefetchDisabled()||this.prefetchResources(),e},e.prototype.deactivateCurrentPerspective=function(){return p(this,void 0,void 0,function(){return f(this,function(e){switch(e.label){case 0:return this.Glass.currentAppView?[4,this.Glass.currentAppView.deactivate()]:[3,2];case 1:e.sent(),"login"!==this.Glass.currentAppView.perspective&&(this.Glass.previousAppView=this.Glass.currentAppView),e.label=2;case 2:return[2]}})})},e.prototype.getPerspectiveModel=function(i,o){return p(this,void 0,void 0,function(){var t,n,r;return f(this,function(e){switch(e.label){case 0:return[4,this.Glass.getCoreSvc(".Perspective").getModel(i,o)];case 1:return t=e.sent(),n=w.default.extend(!0,{},t,o),(r=h.default.create({id:"login"===i?"login":(0,d.default)("id"),perspectiveName:i||n.perspective})).setSpec(n),r.setContext(o),[2,r]}})})},e.prototype.openHomePerspective=function(i){return p(this,void 0,void 0,function(){var t,n,r;return f(this,function(e){switch(e.label){case 0:return t="number"==typeof i?i:0,[4,this.Glass.getHomePageObject(t)];case 1:n=e.sent(),e.label=2;case 2:return e.trys.push([2,5,,6]),"login"===n.perspective?[2,this.openLoginPerspective(n)]:[4,this.closeOpenWidgets()];case 3:return e.sent(),[4,this.buildPerspectiveContext(n.perspective,n)];case 4:return r=e.sent(),[2,this.showPerspective(r.perspectiveName,r.context)];case 5:return e.sent(),this.logger.warn("Failed to open home page:",t,n.perspective),[2,this.openHomePerspective(t+1)];case 6:return[2]}})})},e.prototype.renderPerspective=function(l,u,d){return p(this,void 0,void 0,function(){var s,a,c;return f(this,function(e){switch(e.label){case 0:if((0,g.isPerspectiveValid)(l))return[3,1];throw new y.default(b.default.get("invalidPerspectiveErrorMessage"));case 1:return[4,this.getPerspectiveModel(l,u)];case 2:return s=e.sent(),"login"!==l&&this.updateUserProfileContext(s),[4,this.deactivateCurrentPerspective()];case 3:return e.sent(),[4,(0,v.preRenderSetup)(s,this.Glass)];case 4:return e.sent(),[4,this.renderPerspectiveView(s)];case 5:return a=e.sent(),this.perspectiveViewsCache.cacheView(l,s.spec,a),t=u,n=s,r=l,i=a,(o=JSON.parse(JSON.stringify(t))).content=i.content,o.perspective=r||n.perspectiveName,!o.id&&n.modelId&&(o.id=n.modelId),c=o,a.context=c,[2,this.displayPerspective(a,d)]}var t,n,r,i,o})})},e.prototype.renderPerspectiveView=function(e){var n=this;this.glassStore.addPerspectiveModel(e),this.perspectivesFactory.create(e),this.glassStore.setCurrentPerspective(e.id);var t=this.perspectivesRegistry.getPerspectiveById(e.id),r=t.getPerspectiveController();this.Glass.currentAppView=r;var i=t.getPerspectiveStore();return new Promise(function(e,t){u.when(function(){return i.contentViewRendered},function(){return e(r)}),u.when(function(){return i.contentViewRenderFailed},function(){n.logger.error(new Error("AppView Error: Error creating the AppView")),t()})})},e.prototype.showCachedPerspective=function(t,n,r){return p(this,void 0,void 0,function(){return f(this,function(e){switch(e.label){case 0:return t&&r?t===this.Glass.currentAppView?[3,2]:[4,this.Glass.currentAppView.deactivate()]:[3,3];case 1:return e.sent(),[2,this.showContentView(t,n,r)];case 2:return[2,this.showContentView(t,n,r)];case 3:throw new Error("Cached appview and/or its context can not be null.")}})})},e.prototype.showNonCachedPerspective=function(a,c,l){return p(this,void 0,void 0,function(){var o,s;return f(this,function(e){switch(e.label){case 0:return e.trys.push([0,3,,4]),(i=c).isHomepage||i.content&&i.content.isHomepage?[3,2]:[4,this.Glass.getHomePageObject()];case 1:return o=e.sent(),t=c,r=a,(n=o)&&n.perspective===r&&t.content&&n.content&&t.content.pathRef===n.content.pathRef?c.isHomepage=!0:c.isHomepage=!1,[2,this.renderPerspective(a,c,l)];case 2:return c.isHomepage=!0,c.content&&delete c.content.isHomepage,[2,this.renderPerspective(a,c,l)];case 3:return s=e.sent(),this.handleShowNonCachedPerspectiveError(s,c),[3,4];case 4:return[2,null]}var t,n,r,i})})},e.prototype.showContentView=function(t,n,r){return p(this,void 0,void 0,function(){return f(this,function(e){switch(e.label){case 0:return this.Glass.previousAppView=this.Glass.currentAppView,this.Glass.currentAppView=t,this.glassStore.setCurrentPerspective(t.perspectiveModel.id),[4,t.showContentView(r)];case 1:return e.sent(),n&&(r.perspective=n),[2,t]}})})},e.prototype.showPerspective=function(i,o){return p(this,void 0,void 0,function(){var t,n,r;return f(this,function(e){switch(e.label){case 0:return t=this.perspectiveViewsCache.getCachedViewByPerspectiveNameAndContext(i,o),n=this.Glass.currentAppView,(0,g.arePerspectivesEqual)(t,n)?[2,t]:t?[4,this.showCachedPerspective(t,i,o)]:[3,2];case 1:return e.sent(),r=t.hasHomeFlag()||o&&o.isHomepage,this.setHomeFlag(t,r),[2,this.displayPerspective(t,n)];case 2:return[4,this.showNonCachedPerspective(i,o,n)];case 3:return[2,e.sent()]}})})},e.prototype.buildPerspectiveContext=function(s,a){return p(this,void 0,void 0,function(){var i,o;return f(this,function(e){switch(e.label){case 0:return i=this.buildNewPerspectiveContext(s,a),void 0!==s&&void 0===i.content.pathRef?[2,{context:i,perspectiveName:s}]:[4,this.getDefaultActionUrlMap(i.content)];case 1:return o=e.sent(),[2,{context:(t=i,n=o,r=t,void 0===s&&(r.isDefaultAction=!0),r.isHomepage=t.isHomepage||n&&n.isHomepage,r.content=n,r),perspectiveName:void 0===s?o.perspective:s}]}var t,n,r})})},e.prototype.buildNewPerspectiveContext=function(e,t){var n=t||{};return n.content=n.content||{},n.content.perspective=e,this.Glass.currentAppView&&this.Glass.currentAppView.context&&this.Glass.currentAppView.context.content&&(n=this.urlHelper.updateContextWithCurrentUIFilters(this.Glass.currentAppView.context.content,n)),n},e.prototype.getDefaultActionUrlMap=function(s){return p(this,void 0,void 0,function(){var t,n,r,i,o;return f(this,function(e){switch(e.label){case 0:return s&&(s.pathRef||s.objRef)?[4,this.urlHelper.getObjInfoFromContent(this.Glass,s)]:[3,3];case 1:return t=e.sent(),w.default.extend(!0,t,s),void 0===t.id&&(t.id=t.objRef),t.perspective?[2,t]:[4,m.default.getSharedResourceActionController(this.Glass,t.type)];case 2:return n=e.sent(),r={urlMap:t,mode:_.default.MODES.DEFAULT_ACTION,Glass:this.Glass,glassContext:this.Glass},[2,this.urlHelper.getUrlMap(n,this.Glass,r)];case 3:return s&&s.perspective?[3,5]:[4,this.Glass.getHomePageObject()];case 4:return i=e.sent(),o={perspective:i.perspective},w.default.extend(!0,o,s,i.content),o.pathRef?[2,this.getDefaultActionUrlMap(o)]:[2,o];case 5:return[2,null]}})})},e.prototype.handleOpenLoginViewError=function(){var e=b.default.get("customLoginPerspectiveNotFound"),t=b.default.get("defaultToIBMLoginPage");this.Glass.showErrorMessage(t,e,function(){var e=window.location.href;e.includes("/",e.length-1)?window.location.href=e+"?factoryMode=true":window.location.href=e+"&factoryMode=true"})},e.prototype.handleOpenPerspectiveError=function(o){return p(this,void 0,void 0,function(){var t,n,r,i=this;return f(this,function(e){switch(e.label){case 0:if(this.logger.error("openAppView",o),t=function(e){var t=!0===e?"errLoadingViewShowHome":"errLoadingView";i.Glass.showToast(b.default.get(t),{type:"error",preventDuplicates:!1})},n=function(){var e=b.default.get("errLoadingView"),t=b.default.get("errorLabel");return i.Glass.showErrorMessage(e,t),i.Glass.currentAppView},0!==this.perspectiveSwitcherRegistry.size())return[3,4];this.pendingOpenPerspectivePromise=null,e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this.openHomePerspective()];case 2:return r=e.sent(),t(!0),[2,r];case 3:return e.sent(),n(),[3,4];case 4:return t(),[2,null]}})})},e.prototype.handleShowNonCachedPerspectiveError=function(e,t){var n=e.message,r="Error";throw e.ajaxOptions&&e.ajaxOptions.url?(n="Glass Perspective Service : "+e.ajaxOptions.url,r=b.default.get("error404NotFound")):"BaseError"===e.name?r="Error: "+b.default.get("invalidPerspectiveErrorTitle"):404===e.code&&(r=b.default.get("perspective404ErrorTitle"),n=b.default.get("perspective404ErrorMessage"),t.isHomepage&&(n=b.default.get("perspective404HomeErrorMessage"))),this.logger.error("Perspective Error: Failed to load the requested perspective"),this.Glass.showErrorMessage(n,r),e},e.prototype.openPendingPerspective=function(){var e=this;try{return this.pendingOpenPerspectivePromise=Promise.resolve(this.pendingOpenPerspectivePromise).finally(function(){e.pendingOpenPerspectivePromise=null}),this.pendingOpenPerspectivePromise}catch(e){return this.logger.error("openAppView - previous attempt failed",e),Promise.resolve()}},e.prototype.removeLoginView=function(){this.perspectivesRegistry.remove("login"),this.loginView.getContentPane().remove(),this.loginView.remove(!0),this.loginView=void 0},e.prototype.updateUserProfileContext=function(n){return p(this,void 0,void 0,function(){var t;return f(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,this.Glass.getCoreSvc(".UserProfile").updateContext(n.context)];case 1:return e.sent(),[3,3];case 2:return t=e.sent(),this.logger.error("Perspective Error: Could not get the account info",t),this.Glass.showErrorMessage(b.default.get("unableGetAccountInfo"),b.default.get("accountInfoTitle")),[3,3];case 3:return[2]}})})},e}(l.default);t.default=C},function(e,t,n){"use strict";var s=this&&this.__awaiter||function(e,s,a,c){return new(a||(a=Promise))(function(n,t){function r(e){try{o(c.next(e))}catch(e){t(e)}}function i(e){try{o(c.throw(e))}catch(e){t(e)}}function o(e){var t;e.done?n(e.value):(t=e.value,t instanceof a?t:new a(function(e){e(t)})).then(r,i)}o((c=c.apply(e,s||[])).next())})},a=this&&this.__generator||function(n,r){var i,o,s,e,a={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return e={next:t(0),throw:t(1),return:t(2)},"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(t){return function(e){return function(t){if(i)throw new TypeError("Generator is already executing.");for(;a;)try{if(i=1,o&&(s=2&t[0]?o.return:t[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,t[1])).done)return s;switch(o=0,s&&(t=[2&t[0],s.value]),t[0]){case 0:case 1:s=t;break;case 4:return a.label++,{value:t[1],done:!1};case 5:a.label++,o=t[1],t=[0];continue;case 7:t=a.ops.pop(),a.trys.pop();continue;default:if(!((s=0<(s=a.trys).length&&s[s.length-1])||6!==t[0]&&2!==t[0])){a=0;continue}if(3===t[0]&&(!s||t[1]>s[0]&&t[1]<s[3])){a.label=t[1];break}if(6===t[0]&&a.label<s[1]){a.label=s[1],s=t;break}if(s&&a.label<s[2]){a.label=s[2],a.ops.push(t);break}s[2]&&a.ops.pop(),a.trys.pop();continue}t=r.call(n,a)}catch(e){t=[6,e],o=0}finally{i=s=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}([t,e])}}},r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.loadStyles=t.disableStylesFromInactivePerspectives=void 0;var c=n(43),l=n(84),u=r(n(4));function d(e,t){for(var n=t.querySelectorAll('head link[rel="stylesheet"], head style[loader="ba-glass"]'),r=0;r<n.length;r+=1){var i=n[r],o=i.getAttribute("styleid");o&&!e.includes(o)&&i.setAttribute("media","none")}}t.disableStylesFromInactivePerspectives=d,t.loadStyles=function(i,o){return s(this,void 0,void 0,function(){var t,n,r;return a(this,function(e){switch(e.label){case 0:return i?(t=(0,c.getUrlArgs)(o),n=i.map(function(e){return t&&(e+=t),function(o){return s(this,void 0,void 0,function(){var r,i;return a(this,function(e){switch(e.label){case 0:return(n=o).includes("?")&&(n=n.substring(0,n.indexOf("?"))),t=r=n,(i=document.querySelector('head style[styleid="'+t+'"], head link[styleid="'+t+'"]'))?(i.setAttribute("media","all"),[3,3]):[3,1];case 1:return[4,(0,l.loadStylesheet)(u.default.ajax,o,[{name:"styleid",type:r},{name:"loader",type:"ba-glass"},{name:"type",type:"text/css"},{name:"media",type:"all"}])];case 2:e.sent(),e.label=3;case 3:return[2]}var t,n})})}(e)}),[4,Promise.all(n)]):[3,2];case 1:return r=e.sent(),d(i,document),[2,r];case 2:return[2,[]]}})})}},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,s,a,c){return new(a||(a=Promise))(function(n,t){function r(e){try{o(c.next(e))}catch(e){t(e)}}function i(e){try{o(c.throw(e))}catch(e){t(e)}}function o(e){var t;e.done?n(e.value):(t=e.value,t instanceof a?t:new a(function(e){e(t)})).then(r,i)}o((c=c.apply(e,s||[])).next())})},a=this&&this.__generator||function(n,r){var i,o,s,e,a={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return e={next:t(0),throw:t(1),return:t(2)},"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(t){return function(e){return function(t){if(i)throw new TypeError("Generator is already executing.");for(;a;)try{if(i=1,o&&(s=2&t[0]?o.return:t[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,t[1])).done)return s;switch(o=0,s&&(t=[2&t[0],s.value]),t[0]){case 0:case 1:s=t;break;case 4:return a.label++,{value:t[1],done:!1};case 5:a.label++,o=t[1],t=[0];continue;case 7:t=a.ops.pop(),a.trys.pop();continue;default:if(!((s=0<(s=a.trys).length&&s[s.length-1])||6!==t[0]&&2!==t[0])){a=0;continue}if(3===t[0]&&(!s||t[1]>s[0]&&t[1]<s[3])){a.label=t[1];break}if(6===t[0]&&a.label<s[1]){a.label=s[1],s=t;break}if(s&&a.label<s[2]){a.label=s[2],a.ops.push(t);break}s[2]&&a.ops.pop(),a.trys.pop();continue}t=r.call(n,a)}catch(e){t=[6,e],o=0}finally{i=s=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}([t,e])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.loadStylesheet=t.updateRelativeUrlsInCssFile=void 0;var s=["data:","//",'url("/',"url('/","url(/"],c=['url("./','url("',"url('./","url('","url(./","url("];function l(i,e){if(!e||!e.includes("/"))return i;try{var t=e.split("/");t.pop();var o=t.join("/"),n=i.match(/url\([^)]+\)/g);n&&0<n.length&&n.filter(function(e){for(var t=0;t<s.length;t+=1)if(e.includes(s[t]))return!1;return!0}).forEach(function(e){for(var t=0;t<c.length;t+=1){var n=c[t];if(e.includes(n)){var r=e.replace(n,""+n.replace("./","")+o+"/");i=i.replace(e,r);break}}})}catch(i){console.error(i)}return i}t.updateRelativeUrlsInCssFile=l,t.loadStylesheet=function(i,o,s){return void 0===s&&(s=[]),r(this,void 0,void 0,function(){var t,n;return a(this,function(e){switch(e.label){case 0:return t=new Promise(function(r,e){i(o).then(function(e){var t=l(e,o),n=document.createElement("style");n.innerHTML=t,s.forEach(function(e){return n.setAttribute(e.name,e.type)}),document.getElementsByTagName("head")[0].appendChild(n),r(n)}).catch(e)}),n=new Promise(function(e,t){setTimeout(t,12e4)}),[4,Promise.race([t,n])];case 1:return[2,e.sent()]}})})}},function(e,t,n){"use strict";n.r(t),n.d(t,"default",function(){return c});var r=n(7),i=n.n(r),o=n(30),s=n.n(o);function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var c=function(){function n(){!function(e,t){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this)}var e,t;return e=n,t=[{key:"loadSVGIcons",value:function(e){var t=this;e&&e.forEach(function(e){t.setSVGIcons(e)})}},{key:"unloadSVGIcons",value:function(e){var t=this;e&&e.forEach(function(e){t.unsetSVGIcons(e)})}},{key:"setSVGIcons",value:function(e){var r=this.getSVGId(e);document.getElementById(r)||this.loadSVGModule(e).then(function(e){var t=document.createElement("div");t.setAttribute("id",r),t.innerHTML=e;var n=document.getElementById("svgIcons");n||s()(),n.appendChild(t)}).catch(function(){throw new Error("failed to load svg icon: ".concat(e))})}},{key:"unsetSVGIcons",value:function(e){var t=this.getSVGId(e),n=document.getElementById(t);n&&n.parentNode&&n.parentNode.removeChild(n)}},{key:"loadSVGModule",value:function(e){return i.a.loadModule("text!".concat(e,"!strip"))}},{key:"getSVGId",value:function(e){return e.replace(/[^\w]/g,"_")}}],null&&a(e.prototype,null),a(e,t),Object.defineProperty(e,"prototype",{writable:!1}),n}()},function(e,t,n){"use strict";var r,i;Object.defineProperty(t,"__esModule",{value:!0}),(i=r||(r={})).Immediate="immediate",i.Defer="defer",i.Declare="declare",t.default=r},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,s,a,c){return new(a||(a=Promise))(function(n,t){function r(e){try{o(c.next(e))}catch(e){t(e)}}function i(e){try{o(c.throw(e))}catch(e){t(e)}}function o(e){var t;e.done?n(e.value):(t=e.value,t instanceof a?t:new a(function(e){e(t)})).then(r,i)}o((c=c.apply(e,s||[])).next())})},i=this&&this.__generator||function(n,r){var i,o,s,e,a={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return e={next:t(0),throw:t(1),return:t(2)},"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(t){return function(e){return function(t){if(i)throw new TypeError("Generator is already executing.");for(;a;)try{if(i=1,o&&(s=2&t[0]?o.return:t[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,t[1])).done)return s;switch(o=0,s&&(t=[2&t[0],s.value]),t[0]){case 0:case 1:s=t;break;case 4:return a.label++,{value:t[1],done:!1};case 5:a.label++,o=t[1],t=[0];continue;case 7:t=a.ops.pop(),a.trys.pop();continue;default:if(!((s=0<(s=a.trys).length&&s[s.length-1])||6!==t[0]&&2!==t[0])){a=0;continue}if(3===t[0]&&(!s||t[1]>s[0]&&t[1]<s[3])){a.label=t[1];break}if(6===t[0]&&a.label<s[1]){a.label=s[1],s=t;break}if(s&&a.label<s[2]){a.label=s[2],a.ops.push(t);break}s[2]&&a.ops.pop(),a.trys.pop();continue}t=r.call(n,a)}catch(e){t=[6,e],o=0}finally{i=s=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}([t,e])}}},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=o(n(7));t.default=function(n){return r(this,void 0,void 0,function(){var t;return i(this,function(e){switch(e.label){case 0:return n?(t=n.map(function(e){return s.default.loadModule(e)}),[4,Promise.all(t)]):[3,2];case 1:e.sent(),e.label=2;case 2:return[2]}})})}},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;0<=a;a--)(i=e[a])&&(s=(o<3?i(s):3<o?i(t,n,s):i(t,n))||s);return 3<o&&s&&Object.defineProperty(t,n,s),s},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=s(n(1)),c=n(9),l=s(n(89)),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.getPerspectiveView=function(e){var t=this.props,n=t.glassStore,r=t.perspectiveRegistry.getPerspectiveById(e);return a.default.createElement(l.default,{key:e,perspectiveStore:r.getPerspectiveStore(),glassStore:n},r.getPerspectiveView())},t.prototype.render=function(){var t=this,e=this.props.glassStore;return a.default.createElement(a.default.Fragment,null,e.registeredPerspectives.map(function(e){return t.getPerspectiveView(e)}))},o([c.observer],t)}(a.default.Component);t.default=u},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;0<=a;a--)(i=e[a])&&(s=(o<3?i(s):3<o?i(t,n,s):i(t,n))||s);return 3<o&&s&&Object.defineProperty(t,n,s),s},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=s(n(1)),c=n(9),l=s(n(2)),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.getClassNames=function(){var e=this.props,t=e.perspectiveStore,n=e.glassStore,r="appview";t.perspectiveModel.id!==n.currentPerspective&&(r+=" hidden");var i=t.perspectiveModel.layout;return i[l.default.LOOPS]&&i.class&&(r+=" "+i.class),r},t.prototype.render=function(){var e=this.props.children;return a.default.createElement("div",{className:this.getClassNames()},e)},o([c.observer],t)}(a.default.Component);t.default=u},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=r(n(91)),o=function(){function e(e,t){this.glassContext=t,this.perspectivesRegistry=e}return e.prototype.create=function(e){var t=this;e?(Array.isArray(e)||(e=[e]),e.forEach(function(e){t.perspectivesRegistry.add(e.id,new i.default(e,t.glassContext))})):this.glassContext.getCoreSvc(".Logger").error("Error creating the perspective, perspectiveModels is undefined")},e}();t.default=o},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var c=r(n(1)),l=r(n(92)),u=r(n(101)),d=r(n(111)),p=r(n(48)),i=function(){function e(e,t){var n,r,i,o,s,a;this.perspectiveStore=(a=e,u.default.create({perspectiveModel:a,contextMenuStore:p.default.create()})),this.perspectiveController=(o=this.perspectiveStore,s=t,new l.default(o,s)),this.perspectiveView=(n=this.perspectiveController,r=this.perspectiveStore,i=t,c.default.createElement(d.default,{appView:n,glassContext:i,perspectiveStore:r,toolBars:r.perspectiveModel.toolBars,addPluginRenderToQueue:n.addPluginRenderToQueue,onPerspectiveViewMounted:n.renderAllPlugins,onContentContainerMounted:n.setContentContainerMounted,onNoContentViewFound:n.resolveViewRenderPromise,successContentViewRenderCallback:n.successContentViewRenderCallback,failureContentViewRenderCallback:n.failureContentViewRenderCallback,getContentView:n.getCurrentContentView})),this.registeredPlugins={}}return e.prototype.registerPlugin=function(e,t){this.registeredPlugins[e]=t},e.prototype.getRegisteredPlugin=function(e){return this.registeredPlugins[e]?this.registeredPlugins[e]:null},e.prototype.getPerspectiveController=function(){return this.perspectiveController},e.prototype.getPerspectiveStore=function(){return this.perspectiveStore},e.prototype.getPerspectiveView=function(){return this.perspectiveView},e}();t.default=i},function(e,t,n){"use strict";var i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t},a=this&&this.__awaiter||function(e,s,a,c){return new(a||(a=Promise))(function(n,t){function r(e){try{o(c.next(e))}catch(e){t(e)}}function i(e){try{o(c.throw(e))}catch(e){t(e)}}function o(e){var t;e.done?n(e.value):(t=e.value,t instanceof a?t:new a(function(e){e(t)})).then(r,i)}o((c=c.apply(e,s||[])).next())})},c=this&&this.__generator||function(n,r){var i,o,s,e,a={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return e={next:t(0),throw:t(1),return:t(2)},"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(t){return function(e){return function(t){if(i)throw new TypeError("Generator is already executing.");for(;a;)try{if(i=1,o&&(s=2&t[0]?o.return:t[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,t[1])).done)return s;switch(o=0,s&&(t=[2&t[0],s.value]),t[0]){case 0:case 1:s=t;break;case 4:return a.label++,{value:t[1],done:!1};case 5:a.label++,o=t[1],t=[0];continue;case 7:t=a.ops.pop(),a.trys.pop();continue;default:if(!((s=0<(s=a.trys).length&&s[s.length-1])||6!==t[0]&&2!==t[0])){a=0;continue}if(3===t[0]&&(!s||t[1]>s[0]&&t[1]<s[3])){a.label=t[1];break}if(6===t[0]&&a.label<s[1]){a.label=s[1],s=t;break}if(s&&a.label<s[2]){a.label=s[2],a.ops.push(t);break}s[2]&&a.ops.pop(),a.trys.pop();continue}t=r.call(n,a)}catch(e){t=[6,e],o=0}finally{i=s=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}([t,e])}}},l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=l(n(4)),d=l(n(3)),p=s(n(10)),f=l(n(14)),h=l(n(39)),g=l(n(93)),v=l(n(94)),y=l(n(95)),m=l(n(46)),b=l(n(11)),_=l(n(19)),w=l(n(12)),C=l(n(96)),S=n(42),P=l(n(99)),O=l(n(47)),E=l(n(100)),x=n(44),M=function(){function e(e,t){var r=this;this.onContentViewReadyToLoad=function(){try{r.loadContentView()}catch(e){r.glassContext.getCoreSvc(".Logger").error("Error loading Content View",e)}},this.loadContentView=function(){var e=O.default.CONTENT_VIEW_LOAD_IN_PROGRESS;r.perspectiveStore.updateRenderState(e);var t=r._getContextForContentView();return(0,x.createContentView)(t,r.glassContext,r).then(function(e){return r.postContentViewCreation(t,e)}).catch(function(e){var t=O.default.CONTENT_VIEW_LOAD_FAILURE;r.perspectiveStore.updateRenderState(t),r.glassContext.getCoreSvc(".Logger").error("Failure showing the content view",e)})},this.addPluginRenderToQueue=function(e){r.pluginsRenderQueue.push(e)},this.renderAllPlugins=function(){return Promise.all(r.pluginsRenderQueue).then(function(e){e.forEach(function(e){if(e&&e.pluginId){var t=e.pluginId,n=e.plugin;r.registerPlugin(t,n)}});var t=O.default.PLUGINS_RENDER_SUCCESS;r.perspectiveStore.updateRenderState(t)})},this.setContentContainerMounted=function(e){r.perspectiveStore.setContainerMounted(!0),r.setContentPane(e)},this.successContentViewRenderCallback=function(){var e=r.getCurrentContentView();e&&(d.default.isFunction(e.on)?(e.on("change:title",r._triggerTitleChange),e.on("change:dirty",r._triggerStateChange),e.on("change:state",r._triggerStateChange)):(e.triggerTitleChange=r._triggerTitleChange,e.triggerStateChange=r._triggerStateChange)),r._triggerTitleChange({value:r.getTitle()}),g.default.createPerformanceMark({component:"glass",name:"renderContentView",state:"end"}),r.perspectiveStore.updateRenderState(O.default.CONTENT_VIEW_RENDER_SUCCESS)},this.failureContentViewRenderCallback=function(e){r.glassContext.getCoreSvc(".Logger").error("ContentView Error","Failed loading content view",e),e&&e.message&&""!==e.message&&r.glassContext.showErrorMessage(e.message,"Error",null,null),r.perspectiveStore.updateRenderState(O.default.CONTENT_VIEW_RENDER_FAILURE)},this.resolveViewRenderPromise=function(){r.perspectiveStore.updateRenderState(O.default.CONTENT_VIEW_RENDER_SUCCESS)},this.setContextMenuItemsAndPosition=function(e,t){var n=r.perspectiveStore.contextMenuStore;n&&(n.updatePosition(t),n.updateItems(e),n.showMenu())},this._getContextForContentView=function(){var e=i({},r.perspectiveModel.spec)||{};e.content||(e.content=r.defaultContent);var t=e.content;return t&&!t.module&&(e.module=r.defaultContent.module),e},this._triggerStateChange=function(){r.updateRenderState(!0)},this._triggerTitleChange=function(e){r.glassContext.trigger("appView:titleChange",{value:e.value,appView:r})},this.getCurrentContentView=function(){return r.currentContentView},this.perspectiveStore=e,this.perspectiveModel=this.perspectiveStore.perspectiveModel,this.perspective=this.perspectiveModel.perspectiveName,this.glassContext=t,this.defaultContent=this.perspectiveModel.spec.content,this.pluginsRenderQueue=[],this.registeredPlugins={},this._slideoutController=new y.default({registry:{application:t.slideoutRegistry,appView:new m.default}}),this._url=new _.default,this.isHomepage=!1,p.when(function(){return r.perspectiveStore.viewReadyToLoadContentView},this.onContentViewReadyToLoad)}return e.prototype.postContentViewCreation=function(t,n){var r=this;return this.prependContentView(n),this._updateSlideoutContainer().then(function(){r._setCurrentContentView(n,t),g.default.createPerformanceMark({component:"glass",name:"renderContentView",state:"start"});var e=O.default.CONTENT_VIEW_LOAD_SUCCESS;r.perspectiveStore.updateRenderState(e)})},e.prototype.prependContentView=function(e){this.$contentViewDomContainer=this.getContentPane(),this.$contentViewDomContainer.prepend(e.$el)},e.prototype.showContextMenu=function(n){return a(this,void 0,void 0,function(){var t;return c(this,function(e){switch(e.label){case 0:return(t=this.perspectiveModel.contextMenuSettings)?[4,(0,C.default)(t,n,this.glassContext)]:[3,2];case 1:return[2,e.sent()];case 2:return[2,null]}})})},e.prototype.show=function(){(0,S.loadStylesAndIcons)(this.perspectiveModel,this.glassContext)},e.prototype.hide=function(){(0,S.unloadIcons)(this.perspectiveModel,this.glassContext)},e.prototype.deactivate=function(){var e=this;return this.glassContext.getCoreSvc(".Events").trigger("deactivate"),this.currentContentView&&this.currentContentView.deactivate&&!this.currentContentView.deactivated?Promise.resolve(this.currentContentView.deactivate()).then(function(){e.currentContentView.deactivated=!0}):Promise.resolve()},e.prototype.remove=function(e,t){var n=this;return!e&&this.shouldShowCloseConfirmationDialog()?h.default.waitForCloseConfirmation(this.glassContext,t).then(function(){return n._remove()}):this._remove()},e.prototype._remove=function(){var t=this;if(this.deactivate(),this===this.glassContext.currentAppView&&1<this.glassContext.perspectiveSwitcherRegistry.size()){var e=this.glassContext.perspectiveSwitcherRegistry.getPerspectiveByIndex(0),n=e.getContentPane();n&&e._slideoutController.updateRegistryContainer(n)}return Promise.resolve().then(function(){return t.currentContentView&&d.default.isFunction(t.currentContentView.remove)?(t.contentViewRemoved=!0,t.currentContentView.remove()):Promise.resolve()}).catch(function(e){t.glassContext.getCoreSvc(".Logger").error("An error occurred while removing the content view",e)}).then(this._postRemove.bind(this))},e.prototype._postRemove=function(){this.setContentPane(void 0)},e.prototype.isDirty=function(){return this.currentContentView&&d.default.isFunction(this.currentContentView.isDirty)&&this.currentContentView.isDirty()},e.prototype.shouldShowCloseConfirmationDialog=function(){return!!this.isDirty()&&(!this.currentContentView||!d.default.isFunction(this.currentContentView.shouldShowCloseConfirmationDialog)||this.currentContentView.shouldShowCloseConfirmationDialog())},e.prototype.getTitle=function(e){var t=this.currentContentView&&d.default.isFunction(this.currentContentView.getTitle)?this.currentContentView.getTitle():this.perspectiveModel.perspectiveName;return void 0===t&&(t=b.default.get("unavailable")),!e&&this.isDirty()&&(t+=" *"),t},e.prototype.getIcon=function(){return this.currentContentView&&d.default.isFunction(this.currentContentView.getIcon)&&this.currentContentView.getIcon()},e.prototype.getIconTooltip=function(){return this.currentContentView&&d.default.isFunction(this.currentContentView.getIconTooltip)&&this.currentContentView.getIconTooltip()},e.prototype.getIconColor=function(){var e="";try{e=this.currentContentView&&d.default.isFunction(this.currentContentView.getIconColor)&&this.currentContentView.getIconColor()}catch(e){this.glassContext.getCoreSvc(".Logger").warn("issue getting icon color from current content view",e)}return e||(e="#1d3458"),e},e.prototype.getContentPane=function(){return this.$contentPane},e.prototype.setContentPane=function(e){this.$contentPane=e},e.prototype._updateSlideoutContainer=function(){var r=this;return new Promise(function(t){var n=r.getContentPane();if(n)try{r._slideoutController.updateRegistryContainer(n),t()}catch(e){r.glassContext.getCoreSvc(".Logger").warn("Failed to update slideout container. Slideouts stuck open in previous view. Closing and trying again...",e),r.glassContext.closeOpenWidgets().then(function(){r._slideoutController.updateRegistryContainer(n),t()}).catch(function(){r._slideoutController.updateRegistryContainer(n),t()})}else t()})},e.prototype.showContentView=function(t){var n=this;return this._updateSlideoutContainer().then(function(){(t=t||{}).content||(t.content=n.defaultContent);var e=t.content;return e&&!e.module&&(e.module=n.defaultContent.module),n.currentContentView?n._setContentView(t):Promise.resolve()})},e.prototype._setContentView=function(e){var t=this;return this.currentContentView.activate&&this.currentContentView.deactivated?this.currentContentView.activate(e.content).then(function(){return t._setContentViewHelper(e)}):Promise.resolve(this._setContentViewHelper(e))},e.prototype._setContentViewHelper=function(e){return this._setCurrentContentView(this.currentContentView,e),this.currentContentView},e.prototype.onViewRendered=function(){var n=this;return new Promise(function(e,t){p.when(function(){return n.perspectiveStore.contentViewRendered},function(){return e(n)}),p.when(function(){return n.perspectiveStore.contentViewRenderFailed},function(){return t()})})},e.prototype.registerPlugin=function(e,t){d.default.isString(e)&&(this.registeredPlugins[e]=t)},e.prototype.performAction=function(e,t){var n=this.perspectiveModel.actions;return n?Promise.resolve(P.default.performAction(e,t,n)):Promise.reject(new f.default("Internal error: unable to find action for "+e))},e.prototype.canExecuteAction=function(e,t){var n=this.perspectiveModel.actions;return n?P.default.canExecuteAction(e,t,n):Promise.reject(new f.default("Internal error: unable to find action for "+e))},e.prototype.openSlideout=function(e){return this.glassContext.addToOptions(e),this._openSlideout("appView",e)},e.prototype.closeAllOpenedSlideouts=function(e){return this._slideoutController.closeAllOpenedSlideouts(e)},e.prototype._openSlideout=function(e,t){return t.parent&&!Object.prototype.isPrototypeOf.call(v.default,t)?t.parent.addChild(t):this._slideoutController.openSlideout(e,t)},e.prototype._setCurrentContentView=function(e,t){this.context=t,this.content=t.content,this.currentContentView=e,this.updateRenderState(!1),this.currentContentView.deactivated=!1,e.show()},e.prototype.setAsHome=function(r){var i=this;return Promise.resolve().then(function(){var n=i.getType();return d.default.isUndefined(n)?i._setAsHome({perspective:i.perspectiveModel.perspectiveName,id:i.context&&i.context.id}):w.default.getSharedResourceActionController(i.glassContext,n).then(function(e){var t={urlMap:{objRef:i.content?i.content.objRef:void 0,type:n},mode:_.default.MODES.CURRENT};return i.content.mode&&(t.urlMap.mode=i.content.mode),d.default.extend(t,r),i._url.getUrlMap(e,i.glassContext,t).then(i._setAsHome.bind(i))})})},e.prototype.setHomeFlag=function(e){this.context.isHomepage=!0===e},e.prototype.hasHomeFlag=function(){return!0===this.context.isHomepage},e.prototype._setAsHome=function(e){var t=this._url.getContextFromUrlMap(e),n={homePage:JSON.stringify(t)};return this.glassContext.getCoreSvc(".UserProfile").savePreferences(n).then(this.setHomeFlag.bind(this,!0))},e.prototype.getType=function(){var e=this.currentContentView;return!d.default.isUndefined(e)&&d.default.isFunction(e.getType)?e.getType():E.default[this.perspective]},e.prototype.getContent=function(e){var t,n=this.currentContentView;return!d.default.isUndefined(n)&&d.default.isFunction(n.getContent)&&(t=n.getContent(e)),t},e.prototype._updateHistory=function(e,t,n,r){if(!this.context.content.options||!this.context.content.options.ignoreInWindowHistory){e.name=e.perspective;try{!0===r||this===this.glassContext.previousAppView?window.history.replaceState(e,t,n):window.history.pushState(e,t,n)}catch(e){}}},e.prototype.updateRenderState=function(e){var t=this._getContext(),n=this.getTitle();if(this.glassContext.trackHistory&&!this.glassContext.windowPoppingState&&"login"!==this.perspective&&t.content){var r=this._getContext({mode:"bookmark"}),i=d.default.omit(r,"content");Object.assign(i,this.content);var o=Object.assign(this._url.getPublicMap({urlMap:i}),r.content);delete o.module;var s=this._url.getUrl({urlMap:o},this.glassContext);this.glassContext.previousAppView&&"login"!==this.glassContext.previousAppView.perspective?this._updateHistory(t,n,s,e):this._updateHistory(t,n,s,!0)}this._triggerTitleChange({value:n})},e.prototype._getContext=function(e){var t={perspective:this.perspective},n=this.perspectiveModel.modelId;if(n&&(t.id=n),this.currentContentView){var r=this.getContent(e)||this.content;r&&(t.content=r)}return t},e.prototype.cleanupSlideoutController=function(){this._slideoutController.cleanupSlideoutRegistry()},e.prototype.getCurrentPerspective=function(){return this.perspective},e.prototype.setFocus=function(){!d.default.isUndefined(this.currentContentView)&&d.default.isFunction(this.currentContentView.setFocus)&&this.currentContentView.setFocus()},e.prototype.$=function(e){return(0,u.default)(".appview:not(.hidden)").find(e)},e}();t.default=M},function(e,t){e.exports=R},function(e,t){e.exports=N},function(e,t){e.exports=U},function(e,t,n){"use strict";var o=this&&this.__awaiter||function(e,s,a,c){return new(a||(a=Promise))(function(n,t){function r(e){try{o(c.next(e))}catch(e){t(e)}}function i(e){try{o(c.throw(e))}catch(e){t(e)}}function o(e){var t;e.done?n(e.value):(t=e.value,t instanceof a?t:new a(function(e){e(t)})).then(r,i)}o((c=c.apply(e,s||[])).next())})},s=this&&this.__generator||function(n,r){var i,o,s,e,a={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return e={next:t(0),throw:t(1),return:t(2)},"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(t){return function(e){return function(t){if(i)throw new TypeError("Generator is already executing.");for(;a;)try{if(i=1,o&&(s=2&t[0]?o.return:t[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,t[1])).done)return s;switch(o=0,s&&(t=[2&t[0],s.value]),t[0]){case 0:case 1:s=t;break;case 4:return a.label++,{value:t[1],done:!1};case 5:a.label++,o=t[1],t=[0];continue;case 7:t=a.ops.pop(),a.trys.pop();continue;default:if(!((s=0<(s=a.trys).length&&s[s.length-1])||6!==t[0]&&2!==t[0])){a=0;continue}if(3===t[0]&&(!s||t[1]>s[0]&&t[1]<s[3])){a.label=t[1];break}if(6===t[0]&&a.label<s[1]){a.label=s[1],s=t;break}if(s&&a.label<s[2]){a.label=s[2],a.ops.push(t);break}s[2]&&a.ops.pop(),a.trys.pop();continue}t=r.call(n,a)}catch(e){t=[6,e],o=0}finally{i=s=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}([t,e])}}},r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ContextMenuErrors=void 0;var y,i,a=r(n(97)),c=r(n(98)),l=r(n(3)),m=r(n(4));function b(e,t,n){return{msg:e,menuId:t,menuSpecs:n}}(i=y=t.ContextMenuErrors||(t.ContextMenuErrors={})).INVALID_MENU_ID="Menu id is not a valid string",i.NOT_FOUND_MENU_ID="The menu was not found with the provided id",i.FAILURE_RENDERING_MENU="The menu failed to render",t.default=function(n,r,i){return o(this,void 0,void 0,function(){var t;return s(this,function(e){switch(e.label){case 0:return c.default.hideOpenMenus(),function(e,t){if(!e||!l.default.isString(e.menuId))throw b(y.INVALID_MENU_ID,e&&e.menuId,t);if(!l.default.isArray(t))throw b(y.NOT_FOUND_MENU_ID,e.menuId,t)}(r,n),t=function(e,t){var n=e.reduce(function(e,t){return t.id&&(e[t.id]=t),e},{});if(!n[t])throw b(y.NOT_FOUND_MENU_ID,t,e);return n}(n,r.menuId),[4,function(f,h,g,v){return o(this,void 0,void 0,function(){var l,u,d,p;return s(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,f.render()];case 1:return l=e.sent(),u=(0,m.default)(l),(0,m.default)("body").append(u),n=u,r=(t=h).pageX,i=t.pageY,o=n.outerWidth()+3,s=n.outerHeight()+3,a=window.innerWidth,c=window.innerHeight,a-r<o?n.css("left",a-o):n.css("left",r),c-i<s?n.css("top",c-s):n.css("top",i),[3,3];case 2:throw d=e.sent(),(p=b(y.FAILURE_RENDERING_MENU,g,v)).causedBy=d,p;case 3:return[2]}var t,n,r,i,o,s,a,c})})}(new a.default({itemSpec:t[r.menuId],activeObject:r.activeObject,glassContext:i,options:r.options}),r.position,r.menuId,n)];case 1:return e.sent(),[2]}})})}},function(e,t){e.exports=F},function(e,t){e.exports=V},function(e,t,n){"use strict";n.r(t);var r=n(3),c=n.n(r),i=n(14),p=n.n(i),o=n(7),l=n.n(o),u={};function d(e,t,n,r,i){var o=n+1;return o>=e.length?"canExecute"!==i||!0!==r&&!1!==r?Promise.reject(r):Promise.resolve(r):h(e,t,o,i)}function f(e,t,n,r,i){return"defaultAction"===i?function(e,t,n,r){if(c.a.isFunction(e.doAction))return Promise.resolve(e.doAction(n)).catch(function(e){return d(t,n,r,e,"defaultAction")});var i=new p.a("doAction is not defined on the controller");return d(t,n,r,i,"defaultAction")}(e,t,n,r):"canExecute"===i?Promise.resolve(!0):Promise.resolve()}function h(n,r,i,o){return(e=n,t=i,a=e[t].controller,u[a]?Promise.resolve(u[a]):(s=a,l.a.instantiate(s)).then(function(e){return u[a]=e})).then(function(e){var t;return c.a.isFunction(e.canExecute)?!0===e.canExecute(r)?f(e,n,r,i,o):("defaultAction"===o?t=new p.a("Action controller can not execute this object."):"canExecute"===o&&(t=!1),d(n,r,i,t,o)):f(e,n,r,i,o)}).catch(function(e){return d(n,r,i,e,o)});var e,t,s,a}function s(e,t,n,r){return r?(i=e,o=t,s=n,(d=r.find(function(e){return e.id===i}))?(a=d.items,c=o,l=i,u=s,a&&0<a.length?h(a,c,0,u):Promise.reject(new p.a("Internal error: no controller defined for ".concat(l)))):Promise.reject(new p.a("Internal error: unable to find action for ".concat(i)))):Promise.reject(new p.a("No action controllers defined."));var i,o,s,a,c,l,u,d}var a={performAction:function(e,t,n){return s(e,t,"defaultAction",n)},canExecuteAction:function(e,t,n){return s(e,t,"canExecute",n)}};t.default=a},function(e,t,n){"use strict";var r,i;Object.defineProperty(t,"__esModule",{value:!0}),(i=r||(r={})).dashboard="exploration",i.authoring="report",i.classicviewer="interactiveReport",i.datasets="dataSet2",i.modeller="module",i.savedoutput="output",t.default=r},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=n(5),o=r(n(3)),s=r(n(47)),a=r(n(40)),c=r(n(48)),l=s.default.PLUGINS_RENDER_IN_PROGRESS,u=s.default.PLUGINS_RENDER_SUCCESS,d=s.default.CONTENT_VIEW_LOAD_SUCCESS,p=s.default.CONTENT_VIEW_LOAD_FAILURE,f=s.default.CONTENT_VIEW_RENDER_SUCCESS,h=s.default.CONTENT_VIEW_RENDER_FAILURE,g=i.types.model({containerMounted:i.types.optional(i.types.boolean,!1),perspectiveModel:a.default,renderState:i.types.optional(i.types.enumeration("RenderState",o.default.values(s.default)),l),visible:i.types.optional(i.types.boolean,!1),contextMenuStore:c.default}).views(function(e){return{get viewReadyToLoadContentView(){return e.renderState===u&&e.containerMounted},get contentViewLoadedSuccessfully(){return e.renderState===d||e.renderState===f},get contentViewLoadFailed(){return e.renderState===p},get contentViewRendered(){return e.renderState===f},get contentViewRenderFailed(){return e.renderState===h},get loaded(){return e.renderState===f||e.renderState===p||e.renderState===h}}}).actions(function(t){return{setVisibility:function(e){t.visible=e},updateRenderState:function(e){t.renderState=e},setContainerMounted:function(e){t.containerMounted=e}}});t.default=g},function(e,t,n){"use strict";n.r(t),n.d(t,"default",function(){return d});var i=n(1),r=n(0),o=n.n(r);function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function l(r){var i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=u(r);if(i){var n=u(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===s(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)}}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var d=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&c(e,t)}(r,i.Component);var t,n=l(r);function r(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),n.apply(this,arguments)}return a((t=r).prototype,[{key:"componentDidMount",value:function(){var e=this.props,t=e.htmlElement,n=e.containerRef;n&&t&&t.parentNode!==n&&n.appendChild(t)}},{key:"render",value:function(){return null}}]),Object.defineProperty(t,"prototype",{writable:!1}),r}();d.propTypes={htmlElement:o.a.object.isRequired,containerRef:o.a.instanceOf(Element).isRequired}},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;0<=a;a--)(i=e[a])&&(s=(o<3?i(s):3<o?i(t,n,s):i(t,n))||s);return 3<o&&s&&Object.defineProperty(t,n,s),s},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=s(n(1)),c=n(8),l=n(9),u=s(n(3)),d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.render=function(){var e=this.props,t=e.store,n=e.className,r=t.disabled,i=t.iconId,o=t.label,s=n+(r?" disabled":" enabled");return t.visible&&a.default.createElement("div",{className:s},i&&a.default.createElement(c.SVGIcon,{className:"svgIcon",iconId:i,size:"normal",verticalAlign:"middle"}),u.default.unescape(o))},o([l.observer],t)}(a.default.Component);t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e){this.perspectives={},this.glassStore=e}return e.prototype.add=function(e,t){this.perspectives[e]=t,this.glassStore.registerPerspective(e)},e.prototype.remove=function(e){this.glassStore.deregisterPerspective(e),delete this.perspectives[e]},e.prototype.getPerspectiveById=function(e){return this.perspectives[e]},e}();t.default=r},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};function c(e,t){var n=e;return t&&t.content&&t.content.id?n+="|"+t.content.id:t&&t.id&&(n+="|"+t.id),n}Object.defineProperty(t,"__esModule",{value:!0});var s=function(n){function e(e){var t=n.call(this,e)||this;return t.cache={},t}return i(e,n),Object.defineProperty(e.prototype,"perspectiveViewsCache",{get:function(){return this.cache},enumerable:!1,configurable:!0}),e.prototype.cacheView=function(e,t,n){if(this.Glass.cacheAppViews&&"login"!==e){var r=c(e,t);n.cacheKey=r,this.cache[r]=n}},e.prototype.clearCache=function(){this.cache={}},e.prototype.getCacheKeys=function(){return Object.keys(this.cache)},e.prototype.getCachedPerspectives=function(){return Object.values(this.cache)},e.prototype.getCachedView=function(e){return this.cache[e]},e.prototype.getCachedViewByPerspectiveNameAndContext=function(e,t){return this.cache[c(e,t)]},e.prototype.getDirtyCachedViews=function(){var n=this,r=[];return this.getCacheKeys().forEach(function(e){var t=n.getCachedView(e);t.shouldShowCloseConfirmationDialog()&&r.push(t)}),r},e.prototype.removeCachedView=function(e){this.getCachedView(e)&&delete this.cache[e]},e.prototype.updateCache=function(e){var t=c(e.perspective,e.context);if(e.context){var n=e.context.id,r=e.context?e.context.id:void 0,i=r||n,o=void 0,s=void 0,a={};e.contentViewRemoved||(o=e.getContent(e.context.content))&&(s=o.id?o.id:r,e.context.content=o,e.content=o,s!==i&&(e.id=s),delete this.cache[t],a={id:s},this.cacheView(e.perspective,a,e))}},e}(o(n(6)).default);t.default=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=function(n){function e(e){var t=n.call(this,e)||this;return t.registry=[],t}return i(e,n),e.prototype.addPerspective=function(e){e&&"login"!==e.perspective&&!this.registry.includes(e)&&this.registry.push(e)},e.prototype.clearAllPerspectiveHomeFlags=function(){this.registry.forEach(function(e){e.setHomeFlag(!1)})},e.prototype.containsPerspective=function(e){return this.registry.includes(e)},e.prototype.getIndexOfPerspective=function(e){return this.registry.indexOf(e)},e.prototype.getPerspectiveByIndex=function(e){return this.registry[e]},e.prototype.removePerspectiveAtIndex=function(e){this.registry.splice(e,1)},e.prototype.removePerspective=function(e){var t=this.getIndexOfPerspective(e);-1===t?t=0:this.registry.splice(t,1)},e.prototype.size=function(){return this.registry.length},e}(o(n(6)).default);t.default=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),s=this&&this.__awaiter||function(e,s,a,c){return new(a||(a=Promise))(function(n,t){function r(e){try{o(c.next(e))}catch(e){t(e)}}function i(e){try{o(c.throw(e))}catch(e){t(e)}}function o(e){var t;e.done?n(e.value):(t=e.value,t instanceof a?t:new a(function(e){e(t)})).then(r,i)}o((c=c.apply(e,s||[])).next())})},a=this&&this.__generator||function(n,r){var i,o,s,e,a={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return e={next:t(0),throw:t(1),return:t(2)},"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(t){return function(e){return function(t){if(i)throw new TypeError("Generator is already executing.");for(;a;)try{if(i=1,o&&(s=2&t[0]?o.return:t[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,t[1])).done)return s;switch(o=0,s&&(t=[2&t[0],s.value]),t[0]){case 0:case 1:s=t;break;case 4:return a.label++,{value:t[1],done:!1};case 5:a.label++,o=t[1],t=[0];continue;case 7:t=a.ops.pop(),a.trys.pop();continue;default:if(!((s=0<(s=a.trys).length&&s[s.length-1])||6!==t[0]&&2!==t[0])){a=0;continue}if(3===t[0]&&(!s||t[1]>s[0]&&t[1]<s[3])){a.label=t[1];break}if(6===t[0]&&a.label<s[1]){a.label=s[1],s=t;break}if(s&&a.label<s[2]){a.label=s[2],a.ops.push(t);break}s[2]&&a.ops.pop(),a.trys.pop();continue}t=r.call(n,a)}catch(e){t=[6,e],o=0}finally{i=s=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}([t,e])}}},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var c=o(n(6)),l=o(n(45)),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.findCollection=function(o){return s(this,void 0,void 0,function(){var t,n,r,i;return a(this,function(e){switch(e.label){case 0:return this.Glass.currentAppView&&"login"!==this.Glass.currentAppView.perspective?(t=this.Glass.currentAppView.perspectiveModel.spec).collectionContainers&&(i=t.collectionContainers.find(function(e){return e.id===o}))?[2,i.items]:[3,4]:[3,1];case 1:return[4,this.Glass.getCoreSvc(".Perspective").getModel("generic_iframe")];case 2:return n=e.sent(),[4,this.declarePerspectiveServices(n)];case 3:if(e.sent(),(r=n.collectionContainers)&&(i=r.find(function(e){return e.id===o})))return[2,i.items];e.label=4;case 4:return[2,null]}})})},t.prototype.isCollectionContainerAvailable=function(t){if(this.Glass.currentAppView){var e=this.Glass.currentAppView.perspectiveModel.spec;if(e.collectionContainers&&e.collectionContainers.find(function(e){return e.id===t}))return!0}return!1},t.prototype.findElement=function(e){if("string"==typeof e&&this.Glass.currentAppView){var t=document.querySelector(".appview.paneColumn:not(.hidden)");if(t)return t.querySelector("#"+e)}return null},t.prototype.findPlugin=function(e){return"string"==typeof e&&this.Glass.currentAppView?this.Glass.currentAppView.registeredPlugins[e]:null},t.prototype.declarePerspectiveServices=function(n){return s(this,void 0,void 0,function(){var t;return a(this,function(e){switch(e.label){case 0:if(!n||!n.services)return[3,4];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,(0,l.default)(this.Glass,n.services)];case 2:return e.sent(),[3,4];case 3:return t=e.sent(),this.logger.error("Failed to load perspective services",t),[3,4];case 4:return[2]}})})},t}(c.default);t.default=u},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,s,a,c){return new(a||(a=Promise))(function(n,t){function r(e){try{o(c.next(e))}catch(e){t(e)}}function i(e){try{o(c.throw(e))}catch(e){t(e)}}function o(e){var t;e.done?n(e.value):(t=e.value,t instanceof a?t:new a(function(e){e(t)})).then(r,i)}o((c=c.apply(e,s||[])).next())})},s=this&&this.__generator||function(n,r){var i,o,s,e,a={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return e={next:t(0),throw:t(1),return:t(2)},"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(t){return function(e){return function(t){if(i)throw new TypeError("Generator is already executing.");for(;a;)try{if(i=1,o&&(s=2&t[0]?o.return:t[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,t[1])).done)return s;switch(o=0,s&&(t=[2&t[0],s.value]),t[0]){case 0:case 1:s=t;break;case 4:return a.label++,{value:t[1],done:!1};case 5:a.label++,o=t[1],t=[0];continue;case 7:t=a.ops.pop(),a.trys.pop();continue;default:if(!((s=0<(s=a.trys).length&&s[s.length-1])||6!==t[0]&&2!==t[0])){a=0;continue}if(3===t[0]&&(!s||t[1]>s[0]&&t[1]<s[3])){a.label=t[1];break}if(6===t[0]&&a.label<s[1]){a.label=s[1],s=t;break}if(s&&a.label<s[2]){a.label=s[2],a.ops.push(t);break}s[2]&&a.ops.pop(),a.trys.pop();continue}t=r.call(n,a)}catch(e){t=[6,e],o=0}finally{i=s=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}([t,e])}}},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var c=a(n(6)),l=a(n(46)),u=function(n){function e(e){var t=n.call(this,e)||this;return t.slideoutRegistry=new l.default,t}return i(e,n),e.prototype.showSlideOut=function(e){var t;return this.Glass.addToOptions(e),this.Glass.currentAppView&&(t=this.Glass.currentAppView._openSlideout("application",e)),t},e.prototype.hideSlideOut=function(t){return o(this,void 0,void 0,function(){return s(this,function(e){switch(e.label){case 0:return this.Glass.currentAppView?[4,this.Glass.currentAppView.closeAllOpenedSlideouts(t)]:[3,2];case 1:return[2,e.sent()];case 2:return[2,null]}})})},e}(c.default);t.default=u},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s,a,c=o(n(6)),l=o(n(12));(a=s||(s={})).THEME_PATH="v1/plugins/themes/current/css/palette.css",a.BASE_URL="http://ibm.com/";var u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),Object.defineProperty(t.prototype,"defaultThemePath",{set:function(e){this.themePath=e},enumerable:!1,configurable:!0}),t.prototype.reloadTheme=function(){var n,e,t=(new Date).getTime();n=String(t),e=document.querySelector("head").getElementsByClassName("themeressource"),Array.from(e).forEach(function(e){var t=new URL(e.href);t.searchParams.set("v",String(n)),e.href=t.href}),this.reloadPalette(String(t))},t.prototype.reloadPalette=function(e){this.theme&&this.theme.remove();var t=document.createElement("link");t.type="text/css",t.rel="stylesheet";var n=new URL(this.themePath||s.THEME_PATH,s.BASE_URL);n.searchParams.set("v",String(e)),l.default.isFactoryMode()&&n.searchParams.set("factoryMode","true");var r=n.href.split(s.BASE_URL)[1];t.href=r,document.head.appendChild(t)},t}(c.default);t.default=u},function(e,t){e.exports=B},function(e,t,n){"use strict";n.r(t);var s=n(1),c=n.n(s),r=n(0),i=n.n(r),o=n(9),a=n(17),l=n.n(a),u=n(8),d=n(3),p=n.n(d),f=n(22),h=n.n(f);function g(e){return(g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function v(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function y(e,t){return(y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function m(r){var i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=b(r);if(i){var n=b(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===g(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)}}function b(e){return(b=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var _=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&y(e,t)}(o,s.Component);var t,r=m(o);function o(){var i;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(i=r.call.apply(r,[this].concat(t))).wrappedRender=function(){var n=i.props.contentView,r=n.renderTimeout||20,e=new Promise(function(e,t){return setTimeout(t,1e3*r)}),t=n.render().then(function(e){if(e&&p.a.isElement(e)||c.a.isValidElement(e))return e;var t=n.el||n.$el&&n.$el[0];if(!t)throw new Error("contentview does not contain el property");if(!p.a.isElement(t))throw new Error("el property should be an html element");return t}).catch(function(e){return Promise.reject(e)});return Promise.race([e,t])},i}return v((t=o).prototype,[{key:"getContentViewContainer",value:function(){var e=this.props.containerRef;return e&&e.current?e.current:null}},{key:"render",value:function(){var e=this.props,t=e.contentView,n=e.failRenderCallback,r=e.postRenderCallback;return c.a.createElement(h.a,{render:t&&this.wrappedRender,failRenderCallback:n,postRenderCallback:r,containerRef:this.getContentViewContainer()})}}]),Object.defineProperty(t,"prototype",{writable:!1}),o}();function w(e){return(w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function C(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function S(e,t){return(S=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function P(r){var i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=O(r);if(i){var n=O(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===w(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)}}function O(e){return(O=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}_.propTypes={contentView:i.a.object,failRenderCallback:i.a.func,postRenderCallback:i.a.func,containerRef:i.a.object};var E=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&S(e,t)}(r,s.PureComponent);var t,n=P(r);function r(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),n.apply(this,arguments)}return C((t=r).prototype,[{key:"render",value:function(){var e,t=this.props,n=t.containerRef,r=t.successContentViewRenderCallback,i=t.failureContentViewRenderCallback,o=t.getContentView,s=t.perspectiveStore,a=s.contentViewLoadedSuccessfully?o():null;return c.a.createElement(c.a.Fragment,null,c.a.createElement(_,{contentView:a,containerRef:n,postRenderCallback:r,failRenderCallback:i}),!s.loaded&&(e=c.a.createElement("div",{className:"loadingIndicatorContainer"},c.a.createElement("div",{className:"loading_indicator"},c.a.createElement(u.ProgressIndicator,{size:"large"}))),l.a.createPortal(e,document.body)))}}]),Object.defineProperty(t,"prototype",{writable:!1}),r}();E.propTypes={containerRef:i.a.object,getContentView:i.a.func,successContentViewRenderCallback:i.a.func,failureContentViewRenderCallback:i.a.func,perspectiveStore:i.a.object};var x=Object(o.observer)(E),M=n(13),T=n(2),A=n(4),D=n.n(A),j=n(7),I=n.n(j),L=n(18),k=n.n(L),R=n(16),N=n(20),U=n(21),F=c.a.createContext();function V(e){return(V="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function B(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function G(e,t){return(G=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function H(r){var i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=Y(r);if(i){var n=Y(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===V(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)}}function Y(e){return(Y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var q={Label:k.a,"glass/app/plugins/GlassPlugin":k.a,Button:R.a,SynchronousButton:N.a,"baglass/app/plugins-react/PersistentBannerController":U.a},$=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&G(e,t)}(i,s.Component);var t,n=H(i);function i(e,t){var r;return function(e,t){if(!(e instanceof i))throw new TypeError("Cannot call a class as a function")}(this),(r=n.call(this,e,t)).failRenderCallback=function(e){if(e){var t=r.props.itemSpec;r.context.glassContext.getCoreSvc(".Logger").error("Plugin Error","Failed to render plugin ".concat(t.id),e)}r.pluginRenderPromise.resolve()},r.postRenderCallback=function(){var e=r.props.itemSpec,t=r.state.plugin;if(p.a.isFunction(t.attachActionControllerCallbacks))try{t.attachActionControllerCallbacks()}catch(e){}var n={pluginId:e.id,plugin:t};r.pluginRenderPromise.resolve(n)},r.createPluginContainerRef=function(e){r.pluginContainer=e},(0,t.addPluginRenderToQueue)(new Promise(function(e,t){r.pluginRenderPromise={resolve:e,reject:t}})),r}return B((t=i).prototype,[{key:"componentDidMount",value:function(){var t=this,n=this.props.itemSpec;this.createPluginPromise=this.instantiatePlugin(n).catch(function(e){t.context.glassContext.getCoreSvc(".Logger").error(e,"Failed to instantiate plugin, ".concat(n.id)),t.pluginRenderPromise.resolve(e)})}},{key:"getPluginOptions",value:function(){var e=this.props,t=e.appView,n=e.itemSpec;return{glassContext:this.context.glassContext,$container:D()(this.pluginContainer),appView:t,itemSpec:n}}},{key:"getBuiltInPlugin",value:function(e){var t=this.getPluginOptions(),n=new q[e](t);return Promise.resolve(n)}},{key:"instantiatePlugin",value:function(e){var t=this;return this.createPluginInstance(e[this.keywords.type]).then(function(e){return p.a.isEmpty(e)||!e.render?Promise.reject(new Error("Invalid Plugin, may be missing render method")):p.a.isFunction(e.initialize)?e.initialize().then(function(){return e}):Promise.resolve(e)}).then(function(e){return t.setState({plugin:e}),Promise.resolve()})}},{key:"createPluginInstance",value:function(e){return void 0!==q[e]?this.getBuiltInPlugin(e):this.dynamicallyLoadPlugin(e)}},{key:"dynamicallyLoadPlugin",value:function(e){var t=this.getPluginOptions(),n=this.keywords.pluginID[e]||e;return I.a.instantiate(n,t)}},{key:"render",value:function(){var e=this.props.itemSpec,t=(this.state||{}).plugin;return c.a.createElement("div",{className:"pluginContainer",id:"".concat(e.id,"PluginContainer"),ref:this.createPluginContainerRef},c.a.createElement(h.a,{render:t&&t.render,renderScope:t,options:this.getPluginOptions(),postRenderCallback:this.postRenderCallback,failRenderCallback:this.failRenderCallback,containerRef:this.pluginContainer}))}}]),Object.defineProperty(t,"prototype",{writable:!1}),i}();$.contextType=F,$.prototype.keywords={type:"type",pluginID:{Menu:"baglass/app/plugins/GlassMenu"}},$.propTypes={appView:i.a.object,itemSpec:i.a.object},$.contextTypes={addPluginRenderToQueue:i.a.func,glassContext:i.a.object};var W=n(12),z=n.n(W);function J(e){return(J="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function K(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function X(e,t){return(X=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Q(r){var i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=ee(r);if(i){var n=ee(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===J(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Z(e)}(this,e)}}function Z(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ee(e){return(ee=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var te=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&X(e,t)}(r,s.Component);var t,n=Q(r);function r(e){var t;return function(e,t){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this),(t=n.call(this,e)).createDOMReference=function(e){t.itemContainer=e},t.itemContainer=c.a.createRef(),z.a.errorProtect(Z(t),["render"]),t}return K((t=r).prototype,[{key:"render",value:function(){var e=this.props,t=e.position,n=e.id,r=e.plugins,i=e.appView;return c.a.createElement("div",{className:t,id:n,ref:this.createDOMReference},r&&r.map(function(e){return c.a.createElement($,{key:p.a.uniqueId("GlassPluginContainer_"),itemSpec:e,appView:i})}))}}]),Object.defineProperty(t,"prototype",{writable:!1}),r}();function ne(e){return(ne="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function re(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ie(e,t){return(ie=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function oe(r){var i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=se(r);if(i){var n=se(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===ne(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)}}function se(e){return(se=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}te.propTypes={appView:i.a.object,id:i.a.string,position:i.a.string,plugins:i.a.oneOfType([i.a.array,i.a.object])};var ae=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ie(e,t)}(r,s.Component);var t,n=oe(r);function r(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),n.apply(this,arguments)}return re((t=r).prototype,[{key:"render",value:function(){var e=this.props,t=e.toolItemGroups,n=e.appView;return t.map(function(e){return c.a.createElement(te,{key:p.a.uniqueId("ToolItemGroup_"),appView:n,plugins:e[T.default.TOOL_ITEMS],position:e.position,id:e.id})})}}]),Object.defineProperty(t,"prototype",{writable:!1}),r}();function ce(e){return(ce="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function le(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ue(e,t){return(ue=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function de(r){var i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=pe(r);if(i){var n=pe(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===ce(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)}}function pe(e){return(pe=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}ae.propTypes={toolItemGroups:i.a.array,appView:i.a.object};var fe=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ue(e,t)}(r,s.Component);var t,n=de(r);function r(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),n.apply(this,arguments)}return le((t=r).prototype,[{key:"getPositionMap",value:function(){var e=this.props.toolBarSpec,t=M.default.generatePositionMap(e.toolItemGroups);return t[T.default.CENTER]||(t[T.default.CENTER]=[],t[T.default.CENTER].push({id:"".concat(e.attr.id,"_").concat(T.default.CENTER),position:T.default.CENTER})),t}},{key:"getToolPaneClassNames",value:function(){var e=this.props,t=e.toolBarSpec,n=e.placement,r=n.charAt(0).toUpperCase()+n.slice(1),i="toolpane toolpane".concat(r);return t.class?"".concat(t.class," ").concat(i):i}},{key:"render",value:function(){var e=this.props,t=e.toolBarSpec,n=e.appView,r=t.toolItemGroups?this.getPositionMap():null,i=[T.default.LEADING,T.default.CENTER,T.default.TRAILING];return c.a.createElement("div",{key:"toolPaneKey".concat(t.id),id:t.id,className:this.getToolPaneClassNames(),role:t.attr?t.attr.role:"","aria-label":t.attr?t.attr["aria-label"]:void 0},r&&i.map(function(e){return r[e]&&c.a.createElement(ae,{key:p.a.uniqueId("ToolItemGroupLayout_"),toolItemGroups:r[e],appView:n})}))}}]),Object.defineProperty(t,"prototype",{writable:!1}),r}();function he(e){return(he="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ge(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ve(e,t){return(ve=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ye(r){var i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=me(r);if(i){var n=me(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===he(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)}}function me(e){return(me=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}fe.propTypes={toolBarSpec:i.a.object,placement:i.a.string,appView:i.a.object};var be=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ve(e,t)}(r,s.Component);var t,n=ye(r);function r(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),n.apply(this,arguments)}return ge((t=r).prototype,[{key:"render",value:function(){var e=this.props,t=e.toolBars,n=e.placement,r=e.appView;return t?t.map(function(e){return c.a.createElement(fe,{key:p.a.uniqueId("ToolBar_"),toolBarSpec:e,placement:n,appView:r})}):null}}]),Object.defineProperty(t,"prototype",{writable:!1}),r}();function _e(e){return(_e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function we(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ce(e,t){return(Ce=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Se(r){var i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=Pe(r);if(i){var n=Pe(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===_e(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)}}function Pe(e){return(Pe=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}be.propTypes={toolBars:i.a.array,placement:i.a.string,appView:i.a.object};var Oe=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ce(e,t)}(r,s.Component);var t,n=Se(r);function r(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),n.apply(this,arguments)}return we((t=r).prototype,[{key:"getClassNames",value:function(){var e=this.props.classNames;return e?"".concat("pane paneContent"," ").concat(e):"pane paneContent"}},{key:"render",value:function(){var e=this.props,t=e.containerRef,n=e.role,r=e.onScroll,i=e.children;return c.a.createElement("div",{key:p.a.uniqueId("paneContent_"),className:this.getClassNames(),ref:t,role:n,onScroll:r},i)}}]),Object.defineProperty(t,"prototype",{writable:!1}),r}();function Ee(e){return(Ee="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function xe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Me(e,t){return(Me=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Te(r){var i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=Ae(r);if(i){var n=Ae(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===Ee(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)}}function Ae(e){return(Ae=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Oe.propTypes={classNames:i.a.string,containerRef:i.a.object,role:i.a.string,onScroll:i.a.func,children:i.a.oneOfType([i.a.arrayOf(i.a.node),i.a.node])};var De=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Me(e,t)}(r,s.Component);var t,n=Te(r);function r(e){var t;return function(e,t){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this),(t=n.call(this,e)).onContentScroll=function(){t.contentPaneContainerRef.current&&(t.contentPaneContainerRef.current.scrollLeft=0)},t.contentPaneContainerRef=c.a.createRef(),t}return xe((t=r).prototype,[{key:"componentDidMount",value:function(){(0,this.props.onContentContainerMounted)(D()(this.contentPaneContainerRef.current))}},{key:"render",value:function(){var e=this.props,t=e.classNames,n=e.children;return c.a.createElement(Oe,{classNames:t,role:"main",containerRef:this.contentPaneContainerRef,onScroll:this.onContentScroll},n&&c.a.cloneElement(n,{containerRef:this.contentPaneContainerRef}))}}]),Object.defineProperty(t,"prototype",{writable:!1}),r}();function je(e){return(je="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ie(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Le(e,t){return(Le=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ke(r){var i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=Re(r);if(i){var n=Re(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===je(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)}}function Re(e){return(Re=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}De.propTypes={classNames:i.a.string,children:i.a.element,onContentContainerMounted:i.a.func};var Ne=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Le(e,t)}(r,s.Component);var t,n=ke(r);function r(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),n.apply(this,arguments)}return Ie((t=r).prototype,[{key:"getLayoutPaneContainerClassName",value:function(){var e=this.props.paneData;return e&&e[T.default.PANE]&&e[T.default.PANE].class?e[T.default.PANE].class:""}},{key:"getContentPaneContainerClassNames",value:function(){var e=this.getLayoutPaneContainerClassName(),t="contentViewPane";return e&&(t+=" ".concat(e)),t}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.paneData,r=e.appView,i=e.onContentContainerMounted,o=n&&M.default.isContentPane(n[T.default.PANE]);return c.a.createElement(c.a.Fragment,null,n&&n[T.default.LOOPS]&&n[T.default.LOOPS].map(function(e){return c.a.createElement(be,{key:p.a.uniqueId("ToolBarLayout_"),toolBars:n[e],placement:e,appView:r})}),o?c.a.createElement(De,{classNames:this.getContentPaneContainerClassNames(),onContentContainerMounted:i},t):c.a.createElement(Oe,{className:this.getLayoutPaneContainerClassName()},t))}}]),Object.defineProperty(t,"prototype",{writable:!1}),r}();function Ue(e){return(Ue="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Fe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ve(e,t){return(Ve=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Be(r){var i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=Ge(r);if(i){var n=Ge(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===Ue(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)}}function Ge(e){return(Ge=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Ne.propTypes={appView:i.a.object,children:i.a.oneOfType([i.a.arrayOf(i.a.node),i.a.node]),paneData:i.a.object,onContentContainerMounted:i.a.func},n.d(t,"default",function(){return He});var He=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ve(e,t)}(r,s.Component);var t,n=Be(r);function r(e){var t;return function(e,t){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this),(t=n.call(this,e)).hasContentView=!1,t}return Fe((t=r).prototype,[{key:"componentDidMount",value:function(){var e=this.props,t=e.onNoContentViewFound,n=e.onPerspectiveViewMounted;this.hasContentView||t(),n()}},{key:"getViewContext",value:function(){var e=this.props;return{addPluginRenderToQueue:e.addPluginRenderToQueue,glassContext:e.glassContext}}},{key:"createContentPane",value:function(){var e=this.props,t=e.successContentViewRenderCallback,n=e.failureContentViewRenderCallback,r=e.perspectiveStore,i=e.getContentView;return c.a.createElement(x,{successContentViewRenderCallback:t,failureContentViewRenderCallback:n,perspectiveStore:r,getContentView:i})}},{key:"constructNextLayoutPane",value:function(e){var t=this.props,n=t.appView,r=t.onContentContainerMounted;return M.default.isContentPane(e)?(this.hasContentView=!0,this.createContentPane()):c.a.createElement(Ne,{appView:n,onContentContainerMounted:r,layoutsRenderPromise:this.layoutRenderComplete,paneData:e},this.constructNextLayoutPane(e[T.default.PANE]))}},{key:"render",value:function(){var e=this.props,t=e.toolBars,n=e.appView,r=e.onContentContainerMounted,i=M.default.convertToolBarsToLayoutObject(t),o=this.getViewContext();return c.a.createElement(F.Provider,{value:o},c.a.createElement(Ne,{appView:n,onContentContainerMounted:r,layoutsRenderPromise:this.layoutRenderComplete,paneData:i},this.constructNextLayoutPane(i[T.default.PANE])))}}]),Object.defineProperty(t,"prototype",{writable:!1}),r}();He.propTypes={appView:i.a.object,glassContext:i.a.object,toolBars:i.a.array,perspectiveStore:i.a.object,addPluginRenderToQueue:i.a.func,onPerspectiveViewMounted:i.a.func,onContentContainerMounted:i.a.func,successContentViewRenderCallback:i.a.func,failureContentViewRenderCallback:i.a.func,getContentView:i.a.func,onNoContentViewFound:i.a.func}},function(e,t,n){"use strict";n.r(t);var r=n(32),i=n.n(r),o=n(49),s=n.n(o),a=n(29),c=n.n(a),l=n(15),u=n(18),d=n.n(u),p=n(16),f=n(20),h=n(21),g=n(27),v=n.n(g),y=n(26),m=n.n(y),b=n(28),_=n.n(b),w=n(23),C=n.n(w),S=n(25),P=n.n(S),O=n(50),E=n.n(O);n.d(t,"Glass",function(){return i.a}),n.d(t,"AlertStore",function(){return s.a}),n.d(t,"ToastStore",function(){return c.a}),n.d(t,"GlassPluginController",function(){return l.default}),n.d(t,"IconLabelPluginController",function(){return d.a}),n.d(t,"ButtonPluginController",function(){return p.a}),n.d(t,"SyncButtonPluginController",function(){return f.a}),n.d(t,"PersistentBannerPluginController",function(){return h.a}),n.d(t,"TaxonomyService",function(){return v.a}),n.d(t,"URLEncoderService",function(){return m.a}),n.d(t,"ToastService",function(){return _.a}),n.d(t,"MessageDialogService",function(){return C.a}),n.d(t,"PerspectiveLoader",function(){return P.a}),n.d(t,"ExtendObject",function(){return E.a})}])}),define("baglass/core-client/js/core-client/utils/JQueryAria",["jquery"],function(i){i.fn.ariaButton=function(r){return this.each(function(e,t){var n=i(t);n.attr("type","button"),n.attr("role","button"),r&&(!0===r.haspopup&&n.attr("aria-haspopup","true"),n.text(r.label),n.attr("title",r.title?r.title:r.label),n.attr("id",r.id))})}}),define("baglass/core-client/js/core-client/utils/JQueryExt",["jquery","../ui/KeyCodes","./EventHelper","./JQueryAria"],function(s,a){return s.event.special.clicktap={add:function(t){var n=!1;s(this).on("click.clicktap_"+t.guid,t.selector,function(e){return n?!(!t.data||!t.data.allowPropagationDefaultAction)||(e.stopPropagation(),n=!1):t.handler.apply(this,arguments)}).on("tap.clicktap_"+t.guid,t.selector,function(e){return e.pageX=e.gesture.center.pageX,e.pageY=e.gesture.center.pageY,n=!0,t.handler.apply(this,arguments)})},remove:function(e){s(this).off(".clicktap_"+e.guid)}},s.event.special.primaryaction={add:function(n){var t=!1,r=a.ENTER,i=a.SPACE,o=!1;s(this).on("click.primaryaction_"+n.guid,n.selector,function(e){return o=!1,t?!(!n.data||!n.data.allowPropagationDefaultAction)||(e.stopPropagation(),t=!1):n.handler.apply(this,arguments)}).on("tap.primaryaction_"+n.guid,n.selector,function(e){return t=!0,e.pageX=e.gesture.center.pageX,e.pageY=e.gesture.center.pageY,n.handler.apply(this,arguments)}).on("keydown.primaryaction_"+n.guid,n.selector,function(e){var t=e.which||e.keyCode;o=(t===r||t===i)&&!s(e.target).is("button")}).on("keyup.primaryaction_"+n.guid,n.selector,function(e){var t=e.which||e.keyCode;if(!(t!==r&&t!==i||s(e.target).is("button")||!0!==o))return o=!1,n.handler.apply(this,arguments);o=!1})},remove:function(e){s(this).off(".primaryaction_"+e.guid)}},s.event.special.escapeaction={add:function(t){var n=a.ESCAPE,r=a.OPEN_BRACKET,i=!1;s(this).on("keydown.escapeaction_"+t.guid,t.selector,function(e){var t=e.which||e.keyCode;i=t===r&&e.ctrlKey}).on("keyup.escapeaction_"+t.guid,t.selector,function(e){return(e.which||e.keyCode)===n?(i=!1,t.handler.apply(this,arguments)):e.ctrlKey&&i?(i=!1,t.handler.apply(this,arguments)):void(i=!1)})},remove:function(e){s(this).off(".escapeaction_"+e.guid)}},s.event.special.deleteaction={add:function(t){var n=!1;s(this).on("keydown.deleteaction_"+t.guid,t.selector,function(e){var t=e.which||e.keyCode;n=t===a.SECOND&&e.ctrlKey}).on("keyup.deleteaction_"+t.guid,t.selector,function(e){return(e.which||e.keyCode)===a.DELETE?(n=!1,t.handler.apply(this,arguments)):e.ctrlKey&&n?(n=!1,t.handler.apply(this,arguments)):void(n=!1)})},remove:function(e){s(this).off(".deleteaction_"+e.guid)}},s}),define("baglass/app/AppController",["../core-client/js/core-client/ui/core/Class","baglass/glass.webpack.bundle","../core-client/js/core-client/utils/ClassFactory","../core-client/js/core-client/utils/JQueryExt","jquery-ui"],function(e,t,n){var r=t.Glass,i=t.ExtendObject,o=e.extend({_ClassFactory:n,init:function(e){o.inherited("init",this,arguments),i(this,e);var t={appController:this,trackHistory:!1!==e.trackHistory&&"false"!==e.trackHistory,cacheAppViews:!1!==e.cacheAppViews&&"false"!==e.cacheAppViews,installInfo:e.installInfo,versionInfo:e.versionInfo,authInfo:e.authInfo,requirejs:requirejs};this.Glass=new r(t,e),this.glassContext=this.Glass,this.Glass.initialize(),this.Glass.getCoreSvc(".Logger").setLevelWarn()},getCurrentContentView:function(){return this.Glass.getCurrentContentView()},canExecuteAction:function(e,t){return this.Glass.canExecuteAction(e,t)},performAction:function(e,t){return this.Glass.performAction(e,t)},isHighContrastOn:function(){return this.Glass.isApplicationStyledForHighContrast()},detectAccessibilityChange:function(e){return this.Glass.detectAccessibilityChange(e)},showContextMenu:function(e){return this.Glass.showContextMenu(e)},showErrorMessage:function(e,t,n,r){return this.Glass.showErrorMessage(e,t,n,r)},showMessage:function(e,t,n,r,i,o,s,a){return this.Glass.showMessage(e,t,n,r,i,o,s,a)},showEmbedDialog:function(e){return this.Glass.showEmbedDialog(e)},showResetHomeDialog:function(e){return this.Glass.showResetHomeDialog(e)},showShareDialog:function(e){return this.Glass.showShareDialog(e)},emit:function(e,t){return this.Glass.trigger(e,t)},on:function(e,t,n){return this.Glass.on(e,t,n)},off:function(e,t,n){return this.Glass.off(e,t,n)},trigger:function(e,t){return this.Glass.trigger(e,t)},setDefaultHomePerspective:function(e){return this.Glass.setDefaultHomePerspective(e)},resetHome:function(e){return this.Glass.resetHome(e)},closeAppView:function(e,t,n){return this.Glass.closeAppView(e,t,n)},close:function(e,t){return this.Glass.close(e,t)},getCurrentPerspective:function(){return this.Glass.getCurrentPerspective()},isOpeningAView:function(){return this.Glass.isOpeningAView()},isLoginViewShown:function(){return this.Glass.isLoginViewShown()},openAppView:function(e,t){return this.Glass.openAppView(e,t)},openLoginView:function(e){return this.Glass.openLoginView(e)},openPreviousAppView:function(){return this.Glass.openPreviousAppView()},findCollection:function(e){return this.Glass.findCollection(e)},findElement:function(e){return this.Glass.findElement(e)},findPlugin:function(e){return this.Glass.findPlugin(e)},hideSlideOut:function(e){return this.Glass.hideSlideOut(e)},showSlideOut:function(e){return this.Glass.showSlideOut(e)},showToast:function(e,t){return this.Glass.showToast(e,t)},reloadTheme:function(){return this.Glass.reloadTheme()},getUrl:function(e){return this.Glass.getUrl(e)},updateCurrentCachedAppView:function(){return this.Glass.updateCurrentCachedAppView()},lockGlass:function(){return this.Glass.lockGlass()},unlockGlass:function(){return this.Glass.unlockGlass()}});return o}),define("baglass/core-client/js/core-client/ui/Button",["./core/View","jquery","underscore","../utils/Utils","../utils/JQueryExt"],function(e,t,n,r){var i=e.extend({tagName:"button",events:{primaryaction:"_onSelect"},init:function(e){i.inherited("init",this,e.buttonSpec),n.extend(this,e.buttonSpec)},render:function(){return this.$el.ariaButton(this),r.addClass(this.$el,"button"),r.addClass(this.$el,this.class),r.setIcon(this.$el,this.icon,this.title),this._initializePressState(),Promise.resolve(this.el)},setPressed:function(){this.$el.addClass("pushed"),this.$el.attr("aria-pressed","true"),this.$el.attr("aria-checked","true")},setUnpressed:function(){this.$el.removeClass("pushed"),this.$el.blur(),this.$el.attr("aria-pressed","false"),this.$el.attr("aria-checked","false")},togglePressed:function(){return!0===this.isPressed()?this.setUnpressed():this.setPressed(),this.isPressed()},setSelected:function(){var e=t(".currentlySelected");e[0]&&e.removeClass("currentlySelected"),this.push||this.$el.addClass("currentlySelected")},isPressed:function(){return this.$el.hasClass("pushed")},disable:function(){this.$el.addClass("disabled"),this.$el.attr("aria-disabled","true"),this.$el.attr("tabindex","-1")},enable:function(){this.$el.removeClass("disabled"),this.$el.attr("aria-disabled","false"),this.$el.attr("tabindex","0")},isEnabled:function(){return!this.$el.hasClass("disabled")},_onSelect:function(e){!0===this.isEnabled()&&(this.push&&this.togglePressed(),n.isFunction(this.onSelect)&&this.onSelect(e))},_initializePressState:function(){this.push&&this.setUnpressed()},remove:function(){i.inherited("remove",this,arguments)}});return i}),define("baglass/app/plugins/Button",["./GlassPlugin","jquery","underscore","../../core-client/js/core-client/ui/Button","../../api/Context","../AppEvents"],function(e,t,o,n,s,r){var i=e.extend({init:function(){i.inherited("init",this,arguments)},render:function(){var e=this._updateButtonSpec();return this._createCommonButton(e),this.registerOneTimeCallback(r.APPVIEW_LOADED),this.button.render()},attachActionControllerCallbacks:function(){var i=this.glassContext.addToOptions({target:{plugin:this}}),t=this.glassContext.getCoreSvc(".Logger"),e=this;this.getBaseButton().onSelect=function(){var r=this;return e.getController().then(function(e){if(r.setSelected(),r.push&&(i.pushState=r.isPressed()),o.isFunction(e.onPress))e.onPress(i);else if(o.isFunction(e.execute)){var t=new s(i.glassContext),n={options:i.target.plugin.itemSpec.options};e.execute(t,n)}}).catch(function(e){t.error("failed to retrieved the actionController or invoke its method",e)})}},changeLabel:function(e){o.isString(e)&&(this.$el.contents().last()[0].nodeValue=e)},setPressed:function(){this.getBaseButton()&&this.getBaseButton().setPressed()},setUnpressed:function(){this.getBaseButton()&&this.getBaseButton().setUnpressed()},getBaseButton:function(){return this.button},_updateButtonSpec:function(){var e={buttonSpec:{id:this.itemSpec.id,class:this.itemSpec.class,label:this.itemSpec.label,title:this.itemSpec.title,icon:this.itemSpec.icon,push:this.itemSpec.push}};return this.itemSpec.label&&(e.buttonSpec.class?e.buttonSpec.class=e.buttonSpec.class+" labelled":e.buttonSpec.class="labelled"),e},_createCommonButton:function(e){this.button=new n(e),this.$el=this.button.$el}});return i}),define("baglass/app/plugins/ButtonActionInterface",["../../core-client/js/core-client/ui/core/Class"],function(e){return e.extend({onPress:function(e){console.info("I am pressed",e.target.itemId)},onRender:function(){},getCoachMarkSpec:function(){}})}),define("baglass/core-client/js/core-client/utils/StringMeasurementUtils",["jquery","underscore"],function(n,r){"use strict";var o=document.createElement("canvas").getContext("2d"),u={},e=function(){};return e.prototype.getNodeFont=function(e){var t=e.css(["font-variant","font-weight","font-size","font-family"]);return r.values(t).join(" ")},e.prototype.charWidth=function(e,t){void 0===u[t]&&(u[t]={});var n=u[t][e];if(void 0===n){o.font=t;n=o.measureText(Array(11).join(e)).width/10,u[t][e]=n}return n},e.prototype.getTextWidth=function(e,t,n){if(n)return o.font=t,o.measureText(e).width;for(var r=e.length,i=0;r--;)i+=this.charWidth(e[r],t);return i},e.prototype.charsInWidth=function(e,t,n,r,i){for(var o=0,s=0;s<r;s++){var a,c=e[i?s:e.length-1-s];if(void 0!==u[t]&&void 0===(a=u[t][c])&&(a=this.charWidth(c,t)),n-1<=(o+=a)&&o<n){var l=i?e.substring(0,s+1):e.substring(e.length-s-1);if(n<=this.getTextWidth(l,t,!0))return s}if(n<=o)return s}return r},e.prototype.isZoomTextOnly=function(){var e=n("<div>").css("font-size",14),t=14!==parseInt(e.css("font-size"));return e.remove(),t},e.prototype.getIntCSSProp=function(e,t){return parseInt(e.css(t))},e.prototype.getLineCount=function(e,t){void 0===t&&(t=this.isZoomTextOnly());var n=1,r=this.getIntCSSProp(e,"line-height"),i=this.getIntCSSProp(e,"max-height");return 0<r&&0<i&&"nowrap"!==e.css("white-space")&&!t&&(n=Math.max(1,parseInt(i/r))),n},e.prototype.getAvailableWidth=function(e,t){void 0===t&&(t=this.getLineCount(e));var n=e[0].getBoundingClientRect(),r=e.outerWidth()-e.width(),i=(Math.floor(n.width)-r)*t;return i-=e.children().length?e.children().width():0},e.prototype.getStringWidth=function(e,t,n){var r,i=this.isZoomTextOnly();void 0===n&&(n=this.getAvailableWidth(e)),void 0===t&&(t=this.getLineCount(e,i));var o=this.getIntCSSProp(e,"max-height");if(1<t||e.is("INPUT")||i&&0<o){var s=e.val()||e.text(),a=this.getNodeFont(e);r=this.getTextWidth(s,a,!0)}else r=n+e[0].scrollWidth-e[0].offsetWidth;return r},new e}),define("baglass/core-client/js/core-client/utils/ContentFormatter",["jquery","underscore","./StringMeasurementUtils"],function(m,b,_){"use strict";var e=function(){};function w(e,t,n,r,i){if(0===e.length)return"";var o=_.charsInWidth(e,t,Math.floor(n),r,i);if(i)return e.substring(0,o).trim();var s=e.length-o;if(-1===e.substring(s-1,s+1).indexOf(" ")){var a=e.indexOf(" ",s);-1!==a&&(s=a)}return e.substring(s).trim()}return e.prototype.updateEllipsesBasedOnWidth=function(e,t,n,r){var i,o,s,a=1<r&&0<e.scrollHeight-2-e.offsetHeight,c=m(e),l=null,u=c.is("INPUT");-1===(o=u?(i=null,c.val()):(s=e,(i=b.find(s.childNodes,function(e){return e.nodeType===Node.TEXT_NODE&&0<e.nodeValue.length}))?i.nodeValue:"")).indexOf("…")&&(u||c.attr("aria-label",o),c.attr("title",o));var d=o.replace(/([a-z])([a-z])([A-Z])([a-z])/g,"$1$2$3$4").trim();if(0<t&&(t<n-1||a)){var p=_.getNodeFont(c),f=_.getTextWidth(" ",p),h=_.getTextWidth("…",p);if(h<t){var g,v,y=t/2;if(1<r)g=w(d,p,y-h-f,d.length,!0),v=w(d,p,y-f,d.length-g.length,!1);else v=w(d,p,y-f,d.length,!1),g=w(d,p,t-_.getTextWidth(v,p)-h-2*f,d.length-v.length,!0);l=g.length+v.length<d.length?(0<g.length&&(g+=" "),0<v.length&&(v=(1<r?"":" ")+v),g+"…"+v):0<g.length&&0<v.length?g+""+v:g+v}else l=""}else d!==o&&(l=d);null!==l&&(u?c.val(l):i&&(i.nodeValue=l))},e.prototype.middleShortenString=function(e){var t=m(e),n=_.getLineCount(t),r=_.getAvailableWidth(t,n),i=_.getStringWidth(t,n,r);this.updateEllipsesBasedOnWidth(t[0],r,i,n)},e.prototype.resizeInput=function(e){var t=m(e);if(t.is("INPUT")){var n=_.getAvailableWidth(t)+1,r=_.getStringWidth(t);r<n?t.css("width",r+10+"px"):t.css("width",n+10+"px")}},new e}),define("baglass/core-client/js/core-client/ui/DropDownMenu",["./core/View","jquery","underscore","./Button","./Menu","../utils/ContentFormatter","../utils/BidiUtil","bootstrap"],function(e,a,t,n,r,c,i){var o=e.extend({init:function(e){o.inherited("init",this,e.dropDownMenuSpec),t.extend(this,e.dropDownMenuSpec)},render:function(){var e="menu ";this.class&&(e+=this.class);var t={id:this.id,title:i.enforceTextDirection(this.title),label:i.enforceTextDirection(this.label),class:e,icon:this.icon,haspopup:!0},n=this._createMenuButton(t);return n.onSelect=this._onMenuSelect.bind(this),n.render().then(function(e){return this.$el=n.$el,this._setTitle(),this.menuButton=n,this.menuButtonDom=e}.bind(this))},getButton:function(){return this.menuButton},setMenuItems:function(e,t,n){return this.items=e,t?this._onMenuSelect(n):Promise.resolve()},_setTitle:function(){this.$el&&this.$el.length&&(this.title?a(this.$el).attr("title",this.title):this.label&&a(this.$el).attr("title",this.label))},_onMenuSelect:function(){if(r.hideOpenMenus(),this.$ddPopover)return Promise.resolve();var e=a(".currentlySelected");return e[0]&&e.removeClass("currentlySelected"),this.$el.addClass("currentlySelected"),this.contentMenu=this._createMenu(this.items),this.contentMenu.render().then(function(e){this.contentMenu.whenReadyToClose=this._closePopover.bind(this);var t="popover glass-menu ";this.class&&(t+=this.class);var n={placement:this.ddMenuPlacement,trigger:"manual",container:"body",content:function(){return a(e)},template:'<div class="'+t+'" role="tooltip"><div class="arrow"></div><div class="popover-content"></div></div>',html:!0};this._showPopover(n)}.bind(this))},_createMenuButton:function(e){return new n({buttonSpec:e})},_createMenu:function(e){return new r({spec:{items:e}})},_showPopover:function(e){this.$el.attr("data-selector","true"),this.$ddPopover=this.$el.popover(e),this.$ddPopover.popover("show"),this.popupId=this.$ddPopover.attr("aria-describedby"),this._updatePopupover()},_updatePopupover:function(){var e=a("#"+this.popupId).find(".commonMenuItem");t.each(e,function(e){var t=a(e).find("a"),n=t.find("svg"),r=a(e).find("span"),i=t.width(),o=r.innerWidth()-r.width(),s=i-n.outerWidth(!0)-o;r.length&&c.updateEllipsesBasedOnWidth(r[0],s,r.width())},this)},_closePopover:function(){return new Promise(function(e,t){this.$ddPopover?(this.$ddPopover.on("hidden.bs.popover",function(){this._removePopover(),e()}.bind(this)),setTimeout(function(){this._removePopover(),e()}.bind(this),250),this.$el.removeClass("currentlySelected"),this.$el.blur(),this.$ddPopover.popover("hide")):t(new Error("Failed to close popover"))}.bind(this))},_removePopover:function(){this.$ddPopover&&(this.$ddPopover.off("hidden.bs.popover"),this.$ddPopover.popover("destroy"),this.$ddPopover=null,a("#"+this.popupId).remove())},remove:function(){this._removePopover(),o.inherited("remove",this,arguments)},closeDropDownMenu:function(e){if(this.contentMenu){var t=this.contentMenu;return this.contentMenu=null,t.closeMenu(e,!1)}return this._closePopover(e)}});return o}),define("baglass/app/plugins/GlassMenu",["./GlassPlugin","jquery","underscore","../../core-client/js/core-client/utils/ClassFactory","./MenuActionControllerDispatcher","../../core-client/js/core-client/ui/DropDownMenu","../../core-client/js/core-client/ui/Button","../AppEvents"],function(e,c,l,t,n,r,i,o){var s=e.extend({_ClassFactory:t,init:function(e){c.extend(!0,this,e);var t=this.itemSpec;void 0===t.labelOnly&&(t.icon?t.label&&(t.labelOnly="false"):t.labelOnly="true"),s.inherited("init",this,[t])},changeLabel:function(e){l.isString(e)&&(this.$el.contents().last()[0].nodeValue=e)},getButtonElement:function(){return this.activeObject},getDropdownMenu:function(){return this.ddMenu},getDefaultActionButton:function(){return this.defaultButton},render:function(){return this.registerOneTimeCallback(o.APPVIEW_LOADED),this._createMenu(),this.ddMenu.render().then(function(e){return this.$el=c(e),this.activeObject=this.ddMenu.$el,this.defaultButton?(this.$el=c('<div id = "'+this.id+'" >'),this.defaultButton.render().then(function(){return this.$el.append(this.defaultButton.$el),this.$el.append(this.ddMenu.menuButton.$el),this.$el.addClass("inlineFlex"),this.$el[0]}.bind(this))):this.$el[0]}.bind(this))},attachActionControllerCallbacks:function(){this.ddMenu.menuButton.onSelect=this._handleMenuClick.bind(this),this.defaultButton&&(this.defaultButton.onSelect=this._handleDefaultAction.bind(this))},getController:function(){var n=[],r=[],i={};return this._loadingController||(this._loadingController=new Promise(function(e){l.each(this.itemSpec.actionControllers,function(e,t){n.push(this._loadController(e,t)),r.push(t)}.bind(this)),e(Promise.all(n).then(function(e){return l.each(e,function(e,t){i[r[t]]=e}),this._controller=this._createControllerDispatcher(i),this._controller}.bind(this)))}.bind(this))),this._loadingController},_loadController:function(e,n){return this._ClassFactory.instantiate(e).then(function(e){if(l.isFunction(e.initialize)){var t={glassContext:this.glassContext,target:{plugin:this,itemId:this.itemSpec.id},controllerConfig:this.itemSpec.controllerConfig&&this.itemSpec.controllerConfig[n]};return Promise.resolve(e.initialize.apply(e,[t])).then(function(){return e})}return e}.bind(this))},_createMenu:function(){var e,t=this._findDefaultActionItem();if(t){var n;e={dropDownMenuSpec:{id:this.id+".menu",title:this.title,icon:"common-dropdown",class:"button menu comboBox",ddMenuPlacement:this.ddMenuPlacement,items:[]}};var r=l.isUndefined(t.title)?t.label:t.title;n={id:this.id+".default",title:r,icon:this.icon,class:this.class+" menu defaultButton",item:t},this.defaultButton=new i({buttonSpec:n})}else this.label&&(l.isUndefined(this.class)?this.class="dropDownImage":this.class+=" dropDownImage"),e={dropDownMenuSpec:{id:this.id,label:this.label,title:this.title,icon:this.icon,class:this.class,ddMenuPlacement:this.ddMenuPlacement,items:[]}};this.ddMenu=this._createDropDownMenu(e)},_handleMenuClick:function(t){var n=this.glassContext.getCoreSvc(".Logger");return this._updateMenuItemsList().then(function(e){this.ddMenu.setMenuItems(e,!0,t)}.bind(this)).catch(function(e){n.error("failure in the onSelect callback",e)})},_createControllerDispatcher:function(e){return new n(e)},_createDropDownMenu:function(e){return new r(e)},_handleDefaultAction:function(){var r=this,t=this.glassContext.getCoreSvc(".Logger");return this.getController().then(function(e){var t=e.getControllerMap()[r.defaultButton.item.featureId],n={glassContext:r.glassContext,target:{plugin:r,itemId:r.defaultButton.item.id,specItemIndex:r.defaultButton.item.index,index:0}};t&&l.isFunction(t.onSelectItem)&&t.onSelectItem.call(t,n)}).catch(function(e){t.error("failed to call the default action",e)})},_findDefaultActionItem:function(){var e,n;return l.isString(this.defaultAction)&&(e=l.find(this.itemSpec.items,function(e,t){return n=t,e.id===this.defaultAction}.bind(this))),e&&(e.index=n),e},_updateMenuItemsList:function(){var e=this,t={glassContext:this.glassContext,target:{plugin:this,itemId:this.itemSpec.id}};return this.getController().then(function(a){return a.onOpen(t).then(function(){var o=[];a.buildItemMap(this.itemSpec.items);var s=0;return l.each(this.itemSpec.items,function(e,t){var n={glassContext:this.glassContext,target:{plugin:this,itemId:e.id,specItemIndex:t}};if(a.isItemVisible(n)){n.target.index=s++;var r={};c.extend(!0,r,e),r.name=e.id,r.onSelect=function(e){n.target.activeObject=e,a.onSelectItem.call(a,n)}.bind(this),r.onRemove=function(e){return n.target.activeObject=e,a.onRemoveItem.call(a,n)}.bind(this),r.onRender=function(e){n.target.activeObject=e,a.onRenderItem.call(a,n)}.bind(this);var i=a.getLabel(n);l.isUndefined(i)||(r.label=i),a.isItemSelected(n)&&(r.selected=!0),o.push(r)}},this),o}.bind(e))})},closeGlassMenu:function(){return new Promise(function(e,t){this.ddMenu.closeDropDownMenu({}).then(e,t)}.bind(this))}});return s.errors={FAILURE_CREATING_CONTROLLER:"Failure creating one of the menu controllers"},s}),define("baglass/app/plugins/SynchronousButton",["underscore","./Button","../../api/Context"],function(a,e,c){return e.extend({initialize:function(){return this.getController()},getControllerSync:function(){if(this._controller)return this._controller;throw new Error("Controller has not been registered")},attachActionControllerCallbacks:function(){var i=this.glassContext.addToOptions({target:{plugin:this}}),o=this.glassContext.getCoreSvc(".Logger"),s=this;this.getBaseButton().onSelect=function(){try{var e,t=s.getControllerSync();if(this.setSelected(),this.push&&(i.pushState=this.isPressed()),a.isFunction(t.onPress))e=t.onPress(i);else if(a.isFunction(t.execute)){var n=new c(i.glassContext),r={options:i.target.plugin.itemSpec.options};e=t.execute(n,r)}return Promise.resolve(e).catch(function(e){o.error(e)})}catch(e){return o.error(e),Promise.resolve()}}}})}),define("baglass/app/plugins/all",["./Button","./ButtonActionInterface","./GlassMenu","./SynchronousButton"],function(){});var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function ownKeys(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function _objectSpread(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ownKeys(Object(n),!0).forEach(function(e){_defineProperty(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function _defineProperty(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _createForOfIteratorHelper(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=_unsupportedIterableToArray(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){a=!0,o=e},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw o}}}}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(e,t):void 0}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function _toConsumableArray(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}define("baglass/core-client/js/core-client/ui/dialogs/BaseDialog",["../AccessibleView","jquery","underscore","../../nls/StringResources","../Button","../../utils/Utils"],function(e,a,n,r,s,i){"use strict";var t=e.extend({_buttons:["ok","cancel"],_showCloseX:!0,_width:null,init:function(e){this._dialogId=n.uniqueId("modalDialog_"),this._queryId="#"+this._dialogId,this._footerButtons=[],this._showHeader=!0,this.setDialogOptions(e),this.enableTabLooping=!0,this.id||(this.id="com-ibm-ca-dialogDefaultId"),t.inherited("init",this,arguments)},setDialogOptions:function(e){e&&(e.width&&(this._width=e.width),!1===e.showCloseX&&(this._showCloseX=e.showCloseX),e.buttons&&(this._buttons=e.buttons),this.titleAriaLabel=e.titleAriaLabel,this._showHeader=void 0===e.showHeader||e.showHeader)},destroy:function(){a(this._queryId).remove(),a("body").removeClass("openedDialog")},remove:function(){this.destroy()},hide:function(){this._setFocusToLaunchPoint(),a(this._queryId).removeClass("show"),this.destroy()},open:function(){this.showBlocker(),this.show()},showBlocker:function(){var e=a(this._queryId);if(!e.length){e=a("<div>",{id:this._dialogId,class:"dialogBlocker show"}),this.blockerClass&&e.addClass(this.blockerClass),this.className&&e.addClass(this.className),e.height(a(document).height());var t=a("<div>",{id:this._dialogId+"Container",class:"dialogBlockerCell"});a("body").append(e.append(t.text(r.get("loading")))),e.on("keydown",this.onKey.bind(this))}this._container().parent().on("primaryaction",null,{allowPropagationDefaultAction:!0},function(e){i.setEventProperty(e,i.EVENT_DIALOG,!0)})},show:function(){var e=this._container();if(this._width&&e.css("max-width",this._width),e.length){e.empty();var t=a("<div>",{class:"modalDialog",role:"dialog","aria-labelledby":this.getId(),"aria-describedby":this.getContentId()});if(!0===this._showHeader){var n;n=a("<div>",{class:"dialogHeader"});var r=this.renderTitle(a("<header>",{class:"dialogTitle","aria-label":this.titleAriaLabel||this.title,role:"banner",id:this.getId()})),i=this.renderCloseX();n.append(r,i),t.append(n)}var o=this.renderContent(a("<div>",{class:"dialogContent",id:this.getContentId()})),s=this.renderFooter(a("<footer>"));t.append(o,s),e.append(t),this.enableLooping(t),this.setFocus(),a("body").addClass("openedDialog")}},getContentId:function(){return this.contentId},getId:function(){return this.id},setFocus:function(){var e=this._container().find("footer").find(".dialogButton")[0];e&&e.focus()},renderContent:function(e){return e.text("Dialog Content"),e},renderTitle:function(e){return e.text("Dialog Title"),e},verticalAlignDialog:function(){this._container().addClass("dialogVerticalAlign")},renderCloseX:function(){if(!this._showCloseX)return null;var e=a("<div>",{class:"dialogCloseX",title:r.get("close"),"aria-label":r.get("close"),role:"button",tabIndex:"0"});return i.setIcon(e,"dismiss_16"),e.on("primaryaction",this.cancel.bind(this)),e},findFooterButton:function(t){return n.find(this._footerButtons,function(e){return e.id===t})},renderFooter:function(e){for(var t=a("<div>",{class:"footerContainer"}),n=0,r=this._buttons.length;n<r;n++){var i=this._getButtonDef(this._buttons[n]),o=new s({buttonSpec:{class:"dialogButton "+i.type,label:i.text,onSelect:i.handler.bind(this),id:i.defaultId}});"string"==typeof i.style&&""!==i.style&&(o.$el[0].style.cssText=i.style),this._footerButtons.push(o),o.render(),t.append(o.$el)}return e.append(t),e},_getButtonDef:function(e){var t={ok:{text:r.get("ok"),handler:this.ok,type:"primary",defaultId:"ok"},cancel:{text:r.get("cancel"),handler:this.cancel,type:"secondary",defaultId:"cancel"},close:{text:r.get("close"),handler:this.cancel,type:"primary",defaultId:"close"}};return"object"===(void 0===e?"undefined":_typeof(e))?(e.defaultId&&(e.text||(e.text=t[e.defaultId].text),e.handler||(e.handler=t[e.defaultId].handler),e.type||(e.type=t[e.defaultId].type)),e):t[e]},onKey:function(e){return 27!==e.keyCode||(this.cancel(),!1)},ok:function(){this.hide()},cancel:function(){this.hide()},enableOk:function(e){var t=a(".dialogButton",this._container()).eq(0);t.toggleClass("disabled",!1===e),!1===e?t.attr("disabled","disabled"):t.removeAttr("disabled")},disableOk:function(){this.enableOk(!1)},_container:function(){return a(this._queryId+"Container")}});return t}),define("baglass/core-client/js/core-client/ui/dialogs/GenericViewDialog",["./BaseDialog","underscore"],function(e,n){var t=null;return t=e.extend({_buttons:["ok","cancel"],_okCallback:null,_cancelCallback:null,init:function(e){this.id=e.id||this.id,this.title=e.title,this.view=new e.viewClass(e.viewOptions),this._okCallback=e.okCallback,this._cancelCallback=e.cancelCallback,t.inherited("init",this,arguments)},destroy:function(){this.view&&this.view.remove(),t.inherited("destroy",this,arguments)},renderContent:function(e){var t=this.view.render();return n.isFunction(this.view.setFocus)&&(this.setFocus=function(){t&&t.done?t.done(function(){this.view.setFocus()}.bind(this)):this.view.setFocus()}.bind(this,t)),e.append(this.view.$el),e},renderTitle:function(e){return e.text(this.title),e},ok:function(){if(t.inherited("ok",this,arguments),this._okCallback)return this._okCallback()},cancel:function(e){if(e&&e.gesture&&e.gesture.preventDefault(),t.inherited("cancel",this,arguments),this._cancelCallback)return this._cancelCallback()},open:function(){t.inherited("open",this,arguments),this.view.onOpen&&this.view.onOpen()},hide:function(){t.inherited("hide",this,arguments),n.isFunction(this.view.onHide)&&this.view.onHide()}})}),define("baglass/common/views/PreviewView",["../../core-client/js/core-client/ui/View","jquery"],function(e,s){var t=e.extend({events:{},init:function(e){t.inherited("init",this,arguments),s.extend(this,e)},render:function(){return new Promise(function(e,t){try{var n=s.extend({ui_preview:!0,factoryMode:null},this.urlMap);"login"===n.perspective&&(n.perspective="IBMlogin");var r=this.glassContext.getUrl({urlMap:n}),i=s("<iframe>",{frameBorder:0,src:r,tabindex:"-1"}).css({width:"100%",flex:"1 1 auto"}),o=s("<div>").addClass("previewDialogOverlay");this.$el=i.add(o),i.on("load",function(){s(document.activeElement).on("blur",function(e){setTimeout(function(){document.activeElement===i[0]&&s(e.target).focus()},0)}),e(this.el)}.bind(this))}catch(e){t(e)}}.bind(this))}});return t}),define("baglass/common/ui/PreviewDialog",["../../core-client/js/core-client/ui/dialogs/GenericViewDialog","../../nls/StringResources","../views/PreviewView"],function(e,n,r){"use strict";var i=e.extend({init:function(e){this.options=e;var t={buttons:["close"],viewClass:r,title:n.get("previewDialogTitle"),className:"previewDialog",viewOptions:{glassContext:e.glassContext,urlMap:e.urlMap}};i.inherited("init",this,[t])}});return i}),define("baglass/common/ui/SlideoutView",["../../core-client/js/core-client/ui/View"],function(e){return e.extend({init:function(){e.inherited("init",this,arguments)},render:function(){return Promise.resolve(this.el)},setFocus:function(){this.$el.focus()},canHide:function(){return!0}})}),define("text!baglass/common/ui/properties/templates/DoubleLineWithInput.html",[],function(){return'<div class="inputRow flex property_{{=it.id}}">\n\t{{? it.label}}\n\t<div class="propertyName singleLine hide l_{{=it.name}}" id="row_{{=it.id}}">{{=it.label}}</div>\n\t{{?}}\n</div>\n<div class="inputRow flex property_{{=it.id}}">\n\t\t<input type="{{=it.inputType || \'password\'}}" aria-labelledby="row_{{=it.id}} com-ibm-ca-confirmPassword" placeholder="{{?it.placeholder}} {{=it.placeholder}} {{?}}"\n\t\t\tclass="propertyValue toggleEdit{{=it.id}} {{? it.editable === true}}editable{{=it.id}}{{?}} handleReturnKey v_{{=it.name}}" />\n</div>\n'}),define("baglass/common/ui/properties/DoubleLineWithInput",["../../../core-client/js/core-client/ui/View","text!./templates/DoubleLineWithInput.html","jquery","doT"],function(e,t,n,r){"use strict";var i=e.extend({ellipses:!0,init:function(e){(e.editable||e.editCallback)&&(this.events||(this.events={}),this.events["keyup .editable"+e.id]="_handleEditKeyup",this.events["clicktap .toggleEdit"+e.id]="_handleEditClick"),i.inherited("init",this,arguments),n.extend(this,e)},render:function(){var e=r.template(t)({label:this.label,editable:!(!this.editCallback&&!this.editable),inputType:this.inputType,placeholder:this.placeholder,value:this.value,id:this.id,name:this.name});this.$el.append(e)},_handleEditClick:function(){this.editClick&&this.editClick(this.name)},_handleEditKeyup:function(){this.editCallback&&this.editCallback(this.name)},setFocus:function(){this.$el.find("input").first().focus()}});return i}),define("baglass/common/ui/SubmitPasswordDialog",["../../core-client/js/core-client/ui/dialogs/GenericViewDialog","../../nls/StringResources","../../core-client/js/core-client/utils/ClassFactory","../ui/properties/DoubleLineWithInput","jquery"],function(e,o,t,i,s){"use strict";return e.extend({_ClassFactory:t,init:function(){},openSubmitPasswordDialog:function(e){this.oldPasswordName="oldPassword",this.newPasswordName="newPassword",this.confirmPasswordName="confirmNewPassword";var r=s.Deferred();return this._ClassFactory.loadModule("../ui/properties/PropertyUIControl").done(function(t){var n;e.id="submitPasswordDialogTitle",e.viewClass=t,n=e.viewOptions.displayPrompts?(e.viewOptions.items=this._getCreateCredentialItems(e.viewOptions.displayPrompts),e.viewOptions.displayPrompts[0].name):(e.viewOptions.items=this._getUpdatePasswordItems(),this.oldPasswordName),this._ClassFactory.instantiate("../ui/dialogs/GenericViewDialog",e).then(function(e){this.dialog=e,this.dialog.view.setFocus=function(){t.prototype.setFocus.call(this,n)}.bind(this.dialog.view),this.dialog.view.$el.addClass("submitPasswordDialog"),this.dialog.open(),s(".dialogButton.primary").addClass("disabled"),s(".dialogBlockerCell").addClass("inputDialog")}.bind(this),r.reject),r.resolve(this)}.bind(this),r.reject),r.promise()},_showPassword:function(e,t){t?this.dialog.view.$el.find("input:password").each(function(e,t){s(t).attr("type","text")}):s('input[class*="'+this.oldPasswordName+'"],input[class*="'+this.newPasswordName+'"],input[class*="'+this.confirmPasswordName+'"]').each(function(e,t){s(t).attr("type","password")})},_addSelectedClassAndLabel:function(e){var t=s(".editing");t[0]&&t.removeClass("editing");var n=s('div[class*="'+e+'"]');n.addClass("editing");var r=n.parent().nextAll(".separator:first");r[0]&&r.addClass("editing")},_enableOk:function(e){var t=s(".dialogButton").eq(0);t.toggleClass("disabled",!1===e),!1===e?t.attr("disabled","disabled"):t.removeAttr("disabled")},_checkPasswordMatch:function(){var e,t=s('input[class*="'+this.confirmPasswordName+'"]'),n=s('input[class*="'+this.newPasswordName+'"]').val(),r=t.val(),i=t.parent().next(".separator");n!==r?(this._enableOk(!1),(e=s(".confirm"))[0]?(e.removeClass("confirm"),e.addClass("warning"),e.html(o.get("passwordNotMatch"))):0===s(".warning").length&&(e=s('<div class="inputRow"><div id="com-ibm-ca-confirmPassword" class="warning" aria-live="assertive">'+o.get("passwordNotMatch")+"</div></div>")).insertAfter(i)):n&&r&&n===r?(this._enableOk(!0),(e=s(".warning"))[0]&&(e.removeClass("warning"),e.addClass("confirm"),e.html(o.get("passwordMatch")))):(this._enableOk(!1),s(".warning").parent().remove(),s(".confirm").parent().remove())},_getCreateCredentialItems:function(e){var n=[],r=[];return s.each(e,function(e,t){"text"===t.type?n.push({module:i,name:t.name,placeholder:t.caption+" "+(t.value||""),inputType:"text"},{type:"Separator"}):"textnoecho"===t.type&&(this.newPasswordName=t.name,r.push({module:i,name:this.newPasswordName,label:o.get("password"),placeholder:o.get("password"),editClick:this._addSelectedClassAndLabel.bind(this),editCallback:this._checkPasswordMatch.bind(this)},{type:"Separator"},{module:i,name:this.confirmPasswordName,editCallback:this._checkPasswordMatch.bind(this),label:o.get("confirmPassword"),placeholder:o.get("confirmPassword"),editClick:this._addSelectedClassAndLabel.bind(this)},{type:"Separator"},{type:"CheckBox",name:"showPassword",label:o.get("showPassword"),controlOnLeft:!0,checked:!1,onChange:this._showPassword.bind(this)}))}.bind(this)),n.concat(r)},_getUpdatePasswordItems:function(){return[{module:i,name:this.oldPasswordName,editable:!0,label:o.get(this.oldPasswordName),placeholder:o.get(this.oldPasswordName),editClick:this._addSelectedClassAndLabel.bind(this)},{type:"Separator"},{module:i,name:this.newPasswordName,label:o.get(this.newPasswordName),placeholder:o.get(this.newPasswordName),editCallback:this._checkPasswordMatch.bind(this),editClick:this._addSelectedClassAndLabel.bind(this)},{type:"Separator"},{module:i,name:this.confirmPasswordName,editCallback:this._checkPasswordMatch.bind(this),label:o.get(this.confirmPasswordName),placeholder:o.get(this.confirmPasswordName),editClick:this._addSelectedClassAndLabel.bind(this)},{type:"Separator"},{type:"CheckBox",name:"showPassword",label:o.get("showPassword"),controlOnLeft:!0,checked:!1,onChange:this._showPassword.bind(this)}]}})}),define("baglass/common/ui/all",["./PreviewDialog","./SlideoutView","./SubmitPasswordDialog"],function(){}),define("baglass/common/views/all",["./PreviewView"],function(){}),define("baglass/utils/ThemeUtils",[],function(){return{DEFAULT_BRAND_TEXT:"IBM Cognos Analytics",DEFAULT_BRAND_TEXT_SMALL:"IBM Cognos Analytics",DEFAULT_BRAND_ICON:"common-CA_Avatar_Colour_64",DEFAULT_BRAND_ICON_SMALL:"common-CA_Avatar_Black_24",THEME_URL:"v1/plugins/themes/current/spec.json",getCurrentThemeValues:function(e){return e.getCoreSvc(".Ajax").ajax({url:this.THEME_URL,type:"GET"}).then(function(e){return e.data}).catch(function(){return{brandText:this.DEFAULT_BRAND_TEXT,brandTextSmall:this.DEFAULT_BRAND_TEXT_SMALL,images:{brandIcon:this.DEFAULT_BRAND_ICON,brandIconSmall:this.DEFAULT_BRAND_ICON_SMALL}}}.bind(this))}}}),define("baglass/core-client/js/core-client/utils/UrlUtils",[],function(){var e=function(){};return e.prototype.base64Encode=function(e){return e?btoa(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,""):null},e.prototype.base64Decode=function(e){if(!e)return null;var t=e.replace(/-/g,"+").replace(/_/g,"/"),n=t.length%4;return 2===n?t+="==":3===n&&(t+="="),atob(t)},new e}),define("caglass/ajax/CAAuthentication",["underscore","jquery","baglass/utils/Utils","baglass/core-client/js/core-client/utils/Utils","baglass/core-client/js/core-client/utils/BrowserUtils","baglass/core-client/js/core-client/utils/Deferred","baglass/core-client/js/core-client/utils/UrlUtils","baglass/nls/StringResources","baglass/core-client/js/core-client/errors/BaseError"],function(s,a,c,l,u,d,p,f,i){var h=function(){};return h.prototype.login=function(t,e){var n=this,r=e||{initialLogin:!0};if(s.isUndefined(r.initialLogin)&&(r.initialLogin=!0),!0!==r.skipCALogin)return this._isLoggedIn(t,r).catch(function(e){return n._promptForLogin(t,e,r)});var i=new Error;return i.redirectUrl=r.redirectUrl,i.state={skipCALogin:!0},this._promptForExternalLogin(t,i,{relogin:!0})},h.prototype._isLoggedIn=function(r,i){var o=this;return new Promise(function(t,n){o._getAuthInfo(r,i).then(function(e){o._processSuccessfulLogin(r,e,i).then(function(){t(e)})},function(e){n(o._processAuthenticationError(r,e.jqXHR,i))})})},h.prototype._getAuthInfo=function(e,t){var n=h.LOGIN_URL;return t&&!0===t.relogin&&!0!==e.authInfo.isAnonymous?n+="?h_CAM_action=logonAs":t&&!0===t.initialLogin&&t.queryString&&(n=this._buildURLWithQueryString(n,t.queryString,e)),e.getCoreSvc(".Ajax").ajax({type:t.requestMethod,url:n,contentType:"application/json; charset=utf-8",dataType:"json",skipErrorHandling:!0}).then(function(e){return e.data})},h.prototype._buildURLWithQueryString=function(e,t,n){var r=t.CAMNamespace;s.isString(r)||s.isUndefined(r)||n.getCoreSvc(".Logger").info("There can only be 1 namespace in the queryString. Ignoring.");var i=c.getFilteredLoginParameters(n,t).map(function(e){var t=encodeURIComponent(e.name),n=encodeURIComponent(e.value);return"".concat(t,"=").concat(n)}).join("&");return i&&(e+="?".concat(i)),e},h.prototype.legacyLogin=function(t,n){return this.submitCredentials(t,{}).catch(function(e){return this._promptForLogin(t,e,n)}.bind(this))},h.prototype.secondaryLogin=function(t,e){var n={secondaryLogin:!0,newWindow:!0};return e&&(n.authError=e),this.submitCredentials(t,{}).then(function(e){return l.getCurrentWindow().location.reload(),e}).catch(function(e){return this._promptForLogin(t,e,n)}.bind(this))},h.prototype.externalLogin=function(e,t,n){var r=n||{};return r.redirectUrl||(r.redirectUrl=l.getCurrentWindow().location.href),this._promptForLogin(e,t,r)},h.prototype._promptForLogin=function(e,t,n){var r=e.getSSOLoginURL();return r&&!c.isFactoryMode()?this._promptWithSSOLoginUrl(r):!0===t.isExternalLogin?this._promptForExternalLogin(e,t,n):this._promptForInternalLogin(e,t,n)},h.prototype._promptWithSSOLoginUrl=function(e){var t=l.getCurrentWindow();if(!t.__ca_ssologin_in_progress__){var n=c.buildRedirectURL(e,t.location.href);t.location.assign(n),t.__ca_ssologin_in_progress__=new Promise(function(){})}return t.__ca_ssologin_in_progress__},h.prototype._promptForInternalLogin=function(e,t,n){var r=l.getCurrentWindow();if(!r.__ca_login_in_progress__){r.__ca_login_in_progress__=new d;var i=s.extend(n)||{};i.authInfo=e.authInfo,a(r).one("ca.loginSuccessful",this._onLoginSuccessful.bind(this,e,i)),a(r).on("popstate.ca_login",this._onPopStateFromLogin.bind(this,e,i));var o={content:{origin:i}};e.appController.openLoginView(o)}return r.__ca_login_in_progress__.promise},h.prototype._onPopStateFromLogin=function(e,t){if(l.getCurrentWindow().__ca_login_in_progress__){var n={content:{origin:t}};if(t.secondaryLogin){var r=new i("Login was cancelled by the user.");l.getCurrentWindow().__ca_login_in_progress__.reject(r),l.getCurrentWindow().__ca_login_in_progress__=void 0}else t.initialLogin&&e.appController.openLoginView(n)}},h.prototype._onLoginSuccessful=function(e,t,n,r){var i=-1!=navigator.userAgent.indexOf("CAMOBILE"),o=e.getSvcSync(".MobileCompleteAuthentication");i&&o?o.onSuccess():(l.getCurrentWindow().__ca_login_in_progress__.resolve(r),l.getCurrentWindow().__ca_login_in_progress__=void 0,a(l.getCurrentWindow()).off("popstate.ca_login"),r&&!0===r.stayAnonymous?e.appController.openPreviousAppView():!0===t.relogin&&!0!==e.authInfo.differentAccountLogin?e.appController.isOpeningAView()||e.appController.openPreviousAppView():!0!==t.legacyLogin&&!0!==t.initialLogin&&!0!==t.secondaryLogin&&this._reloadPage())},h.prototype._promptForExternalLogin=function(t,e,n){var i=t.window||l.getCurrentWindow(),r=e.redirectUrl,o=e.state;if(o.isMobile=-1!=navigator.userAgent.indexOf("CAMOBILE"),!i.__ca_external_login_in_progress__)if(i.__ca_external_login_in_progress__=new d,l.isInIframe(i)||n&&(!0===n.relogin||!0===n.authtc)){if(!0===o.skipCALogin&&!0!==n.authtc?r+="?state="+p.base64Encode(JSON.stringify(o)):((o=s.extend(o,s.omit(n,"authInfo"))).newWindow=!0,r+="&state="+p.base64Encode(JSON.stringify(o))),u.isIE()&&l.isInIframe(i))try{i.localStorage.removeItem("externalLoginResult");i.addEventListener("storage",function e(t){var n;if(t.key&&"externalLoginResult"===t.key&&(n=t.newValue),n){i.removeEventListener("storage",e);var r=JSON.parse(n);i.localStorage.removeItem("externalLoginResult"),i.postMessage(r,i.location.origin)}})}catch(e){t.getCoreSvc(".Logger").error(e)}i.addEventListener("message",this._onExternalLoginComplete.bind(this,t),{once:!0}),this._externalWindow=i.open(r,"")}else n&&n.redirectUrl?(o=s.extend(s.clone(o),s.omit(n,["authInfo","authError"]))).redirectUrl=n.redirectUrl:o.redirectUrl=i.location.href,r+="&state="+p.base64Encode(JSON.stringify(o)),i.location.assign(r,!0);return i.__ca_external_login_in_progress__.promise},h.prototype._onExternalLoginComplete=function(e,t){l.getCurrentWindow().__ca_external_login_in_progress__.resolve(t.data),delete l.getCurrentWindow().__ca_external_login_in_progress__,t.data||l.getCurrentWindow().location.assign(t.origin),this._externalWindow&&(this._externalWindow.close(),this._externalWindow=null)},h.prototype.submitCredentials=function(r,i,o){var s=this;return new Promise(function(n,t){var e={type:"POST",url:h.LOGIN_URL,data:JSON.stringify(i),contentType:"application/json; charset=utf-8",dataType:"json",skipErrorHandling:!0};r.getCoreSvc(".Ajax").ajax(e).then(function(e){var t=e.data;s._processSuccessfulLogin(r,t,o).then(function(){n(t)})},function(e){t(s._processAuthenticationError(r,e.jqXHR,o))})})},h.prototype.submitLoginTokens=function(t,n){var r=this,e={type:"GET",url:h.LOGIN_URL,data:n,skipErrorHandling:!0};return t.getCoreSvc(".Ajax").ajax(e).catch(function(e){return r.recoverFromCamError(t,e,n)})},h.prototype.recoverFromCamError=function(e,t,n){var r=this._processAuthenticationError(e,t.jqXHR);if(r.displayObjects&&0<r.displayObjects.length){var i=s.extend(n)||{};return i.authError=r,this._promptForLogin(e,r,i)}return Promise.reject(t)},h.prototype._reloadPage=function(){var e=l.getCurrentWindow();if(e.external&&e.external.HasOnClose)return e.external.OnClose(0);e.location=e.location.pathname},h.prototype._isDifferentPrimaryUser=function(e,t){return e&&t&&t.id!==e},h.prototype._processSuccessfulLogin=function(t,e,n){if(t.authInfo&&!0===t.authInfo.isAnonymous)return Promise.try(function(){if(n&&!0===n.relogin)return e;this._reloadPage()}.bind(this));var r=t&&t.profile&&t.profile.account&&t.profile.account.id,i=t.getCoreSvc(".UserProfile");return Promise.try(function(){return i.getAccountInfo(e)}).then(function(e){this._isDifferentPrimaryUser(r,e)&&this._reloadPage()}.bind(this)).catch(function(e){t.getCoreSvc(".Logger").error("Failed to get user account",e)}).then(function(){if(t.authInfo=e,t.appController.reloadTheme(),i.updatePreferences)return i.updatePreferences(!r)})},h.prototype.storeCredentials=function(r){var i=this,e={data:{h_CAM_action:"generateTC"},type:"GET",url:h.LOGIN_URL,contentType:"application/json; charset=utf-8",dataType:"json",skipErrorHandling:!0};return r.getCoreSvc(".Ajax").ajax(e).fail(function(e){var t=i._processAuthenticationError(r,e.jqXHR);if(!0!==t.isExternalLogin)throw t;var n={redirectUrl:t.redirectUrl,authtc:!0};return i.externalLogin(r,t,n).fail(function(e){throw r.appController.showToast(e,{type:"error"}),e})})},h.prototype.processAuthenticationError=function(e,t,n){return this._processAuthenticationError(e,t,n)},h.prototype._processAuthenticationError=function(e,t,n){var r=new Error;r.httpCode=t.status,r.jqXHR=t;try{this._processAuthDisplayObjects(r,t),this._processAuthErrorCodeAndMessage(e,r,t),this._processLoginParameters(e,r,n)}catch(e){r.code=h.LOGIN_FATAL,r.message=f.get("invalidLoginResponse")}return r},h.prototype._processAuthDisplayObjects=function(e,t){if(e.displayObjects=[],t.responseJSON.promptInfo&&t.responseJSON.promptInfo.displayObjects){e.displayObjects=t.responseJSON.promptInfo.displayObjects;for(var n={},r=e.displayObjects,i=0;i<r.length;i++)r[i].name===h.CAM_REDIRECT_URL_NAME?(e.isExternalLogin=!0,e.redirectUrl=r[i].value):n[r[i].name]=r[i].value;!0===e.isExternalLogin&&(e.state=n)}},h.prototype._processAuthErrorCodeAndMessage=function(e,t,n){this._processAuthErrorCode(t,n),this._processAuthErrorMessage(e,t,n),t.code===h.LOGIN_UNKNOWN_LOGIN_ERROR&&""===t.message&&(t.message=f.get("credentialSubmitError"))},h.prototype._processAuthErrorCode=function(e,t){var n=t.responseJSON.errorCodeString;e.code="camAuthUserRecoverable"===n?h.LOGIN_INVALID_CREDENTIALS:"camAuthUnrecoverable"===n?h.LOGIN_DEADEND:h.LOGIN_UNKNOWN_LOGIN_ERROR},h.prototype._processAuthErrorMessage=function(e,t,n){if(0<n.responseJSON.messages.length){var r=n.responseJSON.messages,i=r.length;if(n.status!==e.ajaxCodes.UNAUTHORIZED)t.message=r[0].messageString?r[0].messageString:r[0];else{var o=r[i-1].messageString?r[i-1].messageString:r[i-1];-1!==o.search("CAM-AAA-0036")||-1!==o.search("CAM-AAA-0125")?t.message=f.get("invalidLogin"):t.message=o}}else t.message=""},h.prototype._processLoginParameters=function(e,t,n){var r="";if(n){r=n.queryString;var i=c.getFilteredLoginParameters(e,r);if(t.state)for(var o=0;o<i.length;o++)t.state[i[o].name]=i[o].value;this._appendLoginParams(t,i)}},h.prototype._appendLoginParams=function(n,e){var r=[];n.displayObjects&&(s.each(n.displayObjects,function(e){-1==r.indexOf(e.name)&&r.push(e.name)}),s.each(e,function(e){var t=r.indexOf(e.name);-1==t?(e.type="hidden",n.displayObjects.push(e)):null==n.displayObjects[t].type&&(n.displayObjects[t].type="hidden")}))},h.LOGIN_URL=(h.BASE_URL="v1")+"/login",h.CAM_REDIRECT_URL_NAME="camRedirectURL",h.LOGIN_FATAL="LOGIN_FATAL",h.LOGIN_DEADEND="LOGIN_DEADEND",h.LOGIN_UNKNOWN_LOGIN_ERROR="LOGIN_UNKNOWN_LOGIN_ERROR",h.LOGIN_INVALID_CREDENTIALS="LOGIN_INVALID_CREDENTIALS",h}),define("caglass/ajax/CASimpleAuthentication",["./CAAuthentication"],function(e){var t=function(){};return(t.prototype=Object.create(new e))._processSuccessfulLogin=function(e,t,n){var r=this;return e.authInfo=t,Promise.resolve(t).then(function(){if(n&&n.relogin&&!n.newWindow)return t.updatedco?e.getCoreSvc(".DigitalContext").initialize().then(function(){return r._reloadIfDifferentUserLogin(e,t)}):r._reloadIfDifferentUserLogin(e,t)})},t.prototype._reloadIfDifferentUserLogin=function(t,n){var r=this,i=t&&t.profile&&t.profile.account&&t.profile.account.id,e=t.getCoreSvc(".UserProfile");return Promise.try(function(){return e.getAccountInfo(n)}).then(function(e){if(r._isDifferentPrimaryUser(i,e))return r._reloadPage(),n.differentAccountLogin=!0,n}).catch(function(e){t.getCoreSvc(".Logger").error("Failed to get user account",e)})},t}),define("caglass/nls/GlassResources",{root:!0,cs:!0,da:!0,de:!0,es:!0,fi:!0,fr:!0,hr:!0,hu:!0,it:!0,ja:!0,kk:!0,ko:!0,no:!0,nb:!0,nl:!0,pl:!0,pt:!0,"pt-br":!0,ro:!0,ru:!0,sl:!0,sv:!0,th:!0,tr:!0,zh:!0,"zh-cn":!0,"zh-tw":!0}),define("caglass/nls/root/GlassResources",{credentialCreate:"Create",communicationErrorMessage:"A network error has occurred. Http code: %{code}",maintenanceLink:"More info",credentialChange:"Renew",maintenanceTitle:"Maintenance",credentialRenewed:"Your credentials were renewed with your current user ID and password.",communicationErrorTitle:"Communication Error",ok:"OK",credentialCreateSuccess:"You have successfully created your credentials",secondaryLoginRefresh:"Refresh the page now?",secondaryLoginSuccess:"Successfully logged into an additional Namespace. The page must be refreshed to use your new capabilities.",errLoadingView:"The specified view is no longer available. The default home view is being displayed instead.",wrongPassword:"Unable to authenticate",error404NotFound:"Error 404 resource not found"}),define("caglass/nls/StringResources",["i18n!caglass/nls/GlassResources","baglass/core-client/js/core-client/utils/Lexicon"],function(e,r){"use strict";var i=new r({data:e,allowMissing:!0,verbose:!1});return{get:function(e,t){var n=i.translate(e,t);return n!==e?n:r.NOT_TRANSLATED+"("+e+")"}}}),define("caglass/ajax/CAErrorHandler",["baglass/core-client/js/core-client/ui/core/Class","./CAAuthentication","jquery","caglass/nls/StringResources"],function(e,t,n,r){return e.extend({init:function(e){this.CAM_LOCATION="X-CAM-Location",this.isOpeningLoginView=!1,n.extend(this,e)},handleError:function(t,e,n){var r=t.jqXHR.status;return Promise.resolve().then(function(){if(r===n.ajaxCodes.UNAUTHORIZED)return this._getCAAuthentication().login(n,{relogin:!0}).then(function(){return{retry:!0}});if(r===n.ajaxCodes.AUTH_DENIED){var e=JSON.parse(t.jqXHR.responseText);if("siteminder"===e.origin&&e.redirectUrl)return this._getCAAuthentication().login(n,{relogin:!0,skipCALogin:!0,redirectUrl:e.redirectUrl}).then(function(){return{retry:!0}})}return 503===r&&this._showError(r,n),{retry:!1}}.bind(this))},_getCAAuthentication:function(){return new t},_showError:function(e,t){t.appController.showErrorMessage(r.get("communicationErrorMessage",{code:e}),r.get("communicationErrorTitle"))}})}),define("caglass/ajax/HandleError",["./CAErrorHandler"],function(t){var e=function(e){this.glassContext=e,this.caErrorHandler=new t};return e.prototype.handleError=function(t,n){return!0===t.params.skipErrorHandling?Promise.reject(n):this._getErrorHandler().handleError(n,{},this.glassContext).then(function(e){return!0===e.retry?this.glassContext.getCoreSvc(".Ajax").ajax(t.params):Promise.reject(n)}.bind(this),function(e){return this.glassContext.getCoreSvc(".Logger").error("error while processing the initial error",n),Promise.reject(e)}.bind(this))},e.prototype._getErrorHandler=function(){return this.caErrorHandler},e}),define("caglass/ajax/HandleResponse",[],function(){var e=function(e){this.glassContext=e};return e.prototype.handleResponse=function(t){return Promise.try(function(){this.glassContext.services.exists(".Notification")&&this.glassContext.getSvc(".Notification").then(function(e){e.pollForNewNotifications(t.params)})}.bind(this)).catch(function(){})},e}),define("caglass/ajax/PrepareRequest",["baglass/utils/Utils"],function(n){var e=function(e){this.glassContext=e};return e.prototype.prepareRequest=function(e){this._addDefaultHeaders(e),this._isServiceUrl(e.params.url)&&(e.params.url=this._screenUrl(e.params.url))},e.prototype._addDefaultHeaders=function(e){var t=e.params;return t.headers=t.headers||{},t.headers["X-XSRF-TOKEN"]=n.getCookieValue("XSRF-TOKEN"),n.isFactoryMode()&&(t.headers.X_BI_UI_FACTORYMODE="true"),this._shouldAddOverrideHeader(e.params.type||e.params.method)&&this._addOverrideHeader(e,e.params.type||e.params.method),Promise.resolve()},e.prototype._shouldAddOverrideHeader=function(e){var t=this.glassContext.getCoreSvc(".Config").getXSSChecking();return!!(0<=this.MASKED_METHODS.indexOf(e)&&t)},e.prototype._addOverrideHeader=function(e,t){e.params.headers["X-Http-Method-Override"]=t,e.params.type="POST",e.params.method="POST"},e.prototype._screenUrl=function(e){var t=e.split("?");return t[0]=t[0].replace("/.","/_dot_"),t[0]=t[0].replace(/~/g,"_tilde_"),e=t.join("?")},e.prototype._isServiceUrl=function(e){return e&&0<=e.indexOf("v1/")},e.prototype.MASKED_METHODS=["PUT","DELETE"],e}),define("caglass/ajax/PrepareRequestURL",["underscore","baglass/app/services/ConfigService","baglass/utils/Utils"],function(s,e,a){var t=function(){function o(e){_classCallCheck(this,o),this.glassContext=e}return _createClass(o,[{key:"prepareRequest",value:function(e){this._isGET(e)&&!0===this.glassContext.getCoreSvc(".Config").getXSSChecking()&&this._CAFEncode(e)}},{key:"_CAFEncode",value:function(e){var t=this.glassContext.getCoreSvc(".CAFEncoding"),n=this._getDataObject(e.params.data);if(e.params.url){var r=this._getQueryString(e.params.url),i=a.deparam(r,!1);s.extend(n,i),e.params.url=e.params.url.replace("?"+r,"")}this._encodeObject(n,t),e.params.data=n,e.params.headers[o.XSS_ENCODING_HEADER]=!0}},{key:"_isGET",value:function(e){return e.params.method&&"GET"===e.params.method.toUpperCase()||e.params.type&&"GET"===e.params.type.toUpperCase()||void 0===e.params.method&&void 0===e.params.type}},{key:"_encodeObject",value:function(e,t){for(var n in e)s.isObject(e[n])?this._encodeObject(e[n],t):s.isString(e[n])&&(e[n]=t.encode(e[n]))}},{key:"_getQueryString",value:function(e){return-1!==e.indexOf("?")?e.substring(e.indexOf("?")+1):""}},{key:"_getDataObject",value:function(e){var t={};return s.isUndefined(e)||(s.isString(e)?s.extend(t,this._parseDataString(e)):s.isObject(e)&&s.extend(t,e)),t}},{key:"_parseDataString",value:function(t){try{return JSON.parse(t)}catch(e){return a.deparam(t,!1)}}}]),o}();return t.XSS_ENCODING_HEADER="X-CA-XSSEncoded",t}),define("caglass/ajax/all",["./CASimpleAuthentication","./CAErrorHandler","./HandleError","./HandleResponse","./PrepareRequest","./PrepareRequestURL"],function(){}),define("baglass/api/BaseOpener",["../core-client/js/core-client/ui/core/Class","../nls/StringResources","../core-client/js/core-client/errors/BaseError"],function(e,i,n){"use strict";return e.extend({_context:null,onSelectItem:function(e){this.getCustomSpec=this._getMenuItemCustomSpec,this.onPress(e)},onPress:function(e){return this._context=e,this._sendRequest().then(function(e){return this._openObject(e)}.bind(this))},getCustomSpec:function(){return this._context.target.plugin.itemSpec},_getMenuItemCustomSpec:function(){return this._context.target.plugin.itemSpec.items[this._context.target.specItemIndex]},getRequestParameters:function(){return"ancestors,owner,modificationTime,permissions,defaultName"},_openObject:function(t){return Promise.resolve(this.getActionId(t)).then(function(e){if(!e)throw new n("Undefined actionId");return this._context.glassContext.performAction(e,this._buildPayload(t,e))}.bind(this)).then(function(){return this._context.glassContext.getSvc(".Content")}.bind(this)).then(function(e){return e.addToMRU(t)}).catch(function(e){throw this._showToastOnLaunchError(t),e}.bind(this))},_sendRequest:function(){return this._buildRequestURL().then(function(e){return this._context.glassContext.getCoreSvc(".Ajax").ajax({url:e,type:"GET",dataType:"json",data:{fields:this.getRequestParameters()}})}.bind(this)).then(function(e){return e.data.data[0]}).catch(function(e){var t=e.requestInfo.jqXHR,n="",r=t.responseJSON;if(r){if(r.messages)n=t.responseJSON.messages.join("\n");else if(r.cause)try{n=JSON.parse(r.cause).messages.join("\n")}catch(e){n=r.cause}}else""===(n=t.responseText)&&404===e.code&&(n=i.get("error404NotFound"));this._context.glassContext.showErrorMessage(n,"Error")}.bind(this))},_buildRequestURL:function(){var t=this.getCustomSpec();return this._context.glassContext.getSvc(".Content").then(function(e){return t.options.id?e.getBaseObjectsURL()+"/"+encodeURIComponent(t.options.id):e.getPathUrl(t.options.path)}.bind(this))},_buildPayload:function(e,t){return{glassContext:this._context.glassContext,target:{activeObject:{aSelectedContext:[e]},itemId:t}}},_showToastOnLaunchError:function(e){var t=e.defaultName;this._context.glassContext.showToast(i.get("openPerspectiveFailed",{name:t}),{type:"error"})},getActionId:function(e){return"com.ibm.bi.contentApps.defaultAction."+e.type}})}),define("caglass/api/DashboardOpener",["baglass/api/BaseOpener"],function(e){"use strict";return e.extend({})}),define("caglass/api/ExtensionViewAdaptor",["baglass/api/ExtensionViewAdaptor","jquery","../ajax/CAAuthentication","baglass/utils/Utils","baglass/core-client/js/core-client/utils/Utils","baglass/core-client/js/core-client/utils/ClassFactory","underscore"],function(e,t,n,r,i){return e.extend({signin:function(e){return this._getCAAuthentication().submitCredentials(this.glassContext,{parameters:e}).then(function(e){t(i.getCurrentWindow()).trigger("ca.loginSuccessful",e)})},render:function(){var e=this;if(this.origin&&this.origin.queryString&&this.origin.queryString.CAMUsername&&this.origin.queryString.CAMPassword){var t=this.origin.queryString,n=r.getFilteredLoginParameters(this.glassContext,t);return this.signin(n).then(function(){return Promise.resolve()}).catch(function(){return e._openLoginView()})}return this._openLoginView()},_openLoginView:function(){return this.doRender()},_getCAAuthentication:function(){return new n}})}),define("baglass/app/NavbarButtonSlideoutController",["../core-client/js/core-client/ui/core/Class","jquery","underscore"],function(e,t,r){"use strict";return e.extend({init:function(e){t.extend(!0,this,e)},_slideout:null,onPress:function(e){!0===e.pushState?this._onPush(e):this._onUnpush(e)},_onPush:function(e){var t=this._pushHandler(e);this.onShowCallback(e,t)},_pushHandler:function(e){var t=this.getCustomSpec(e),n=this._openSlideout(e,t.options);return n.on("show",function(e){r.isFunction(e.setPressed)&&e.setPressed()}.bind(this,e.target.plugin)),n.on("hide",function(e){r.isFunction(e.setUnpressed)&&e.setUnpressed()}.bind(this,e.target.plugin)),n.setLaunchPoint(e.target.plugin.getRootElement()),this._slideout=n},_openSlideout:function(e,t){return this._sendInstrumentationEvt(e,t),this.isAppviewScope?e.glassContext.currentAppView.openSlideout(t):e.glassContext.showSlideOut(t)},_onUnpush:function(e){this.onHideCallback(e)},getSlideout:function(){return this._slideout},_setSlideout:function(e){this._slideout=e},getCustomSpec:function(e){var t=e.target.plugin.itemSpec;return t.options&&t.options.content&&(t.options.id=t.id+"."+t.options.content.module+".global"),t},_sendInstrumentationEvt:function(e,t){var n=e.glassContext.getCoreSvc(".Instrumentation");n.enabled&&t&&t.instrumentation&&t.instrumentation.enabled&&n.track(_objectSpread({type:t.instrumentation.type,objectType:t.instrumentation.objectType,action:t.instrumentation.action,uiElement:t.instrumentation.uiElement,milestoneName:t.instrumentation.action+"_"+t.instrumentation.objectType+"_"+t.instrumentation.uiElement},t.instrumentation.CTA&&{CTA:t.instrumentation.CTA}))},onShowCallback:function(){},onHideCallback:function(){}})}),define("caglass/api/FolderOpener",["underscore","baglass/app/NavbarButtonSlideoutController"],function(r,e){"use strict";return e.extend({_getDefaultItemSpec:function(){return{hideOnly:!0,position:"left",width:"400px",perspective:"home",label:"Untitled Label",resizable:!0,content:{module:"bi/content_apps/GenericFolderWideView",trackBreadcrumbs:!0,showFilter:!0,showAddFolder:!0,showBreadcrumbs:!0,showSort:!0}}},getCustomSpec:function(e){var t;t=r.isNumber(e.target.specItemIndex)&&r.isArray(e.target.plugin.itemSpec.items)?e.target.plugin.itemSpec.items[e.target.specItemIndex]:e.target.plugin.itemSpec;var n=this._getDefaultItemSpec();return t.options&&(t.options.id?(n.content.id="folder."+t.options.id,n.content.folder=t.options.id):t.options.path&&(n.content.id="folder."+t.options.path,n.content.folder=t.options.path),void 0===t.options.showNewItem&&void 0===(t.options.content&&t.options.content.showNewItem)||(n.content.showNewItem=t.options.showNewItem||t.options.content&&t.options.content.showNewItem,!0===n.content.showNewItem&&(n.content.showAddFolder=!1)),n.id=t.id+"."+n.content.module+".global",t.label&&(n.label=t.label),r.isBoolean(t.options.skipAncestors)&&(n.content.skipAncestors=t.options.skipAncestors)),t.options=n,t},onSelectItem:function(e){e.pushState=!0,this.onPress(e)}})}),define("caglass/api/ReportOpener",["baglass/api/BaseOpener"],function(e){"use strict";return e.extend({getRequestParameters:function(){return"ancestors,owner,modificationTime,permissions,defaultName,runInAdvancedViewer"}})}),define("caglass/api/all",["./DashboardOpener","./ExtensionViewAdaptor","./FolderOpener","./ReportOpener"],function(){}),define("baglass/common/ui/OfflineOnlineDialog",["ca-ui-toolkit-core","react","react-dom","prop-types","../../nls/StringResources"],function(e,s,t,n,a){var c=e.Dialog,l=e.ProgressIndicator;function r(e){var t=a.get("offlineErrorTitle"),n=a.get("offlineErrorMessage"),r=a.get("refreshButton"),i={size:"small",minWidth:"400px",maxWidth:"500px",clickaway:!1,startingFocusIndex:-1},o={tabIndex:-1,variant:"bar",size:"normal",determinate:!1};return e.online?null:s.createElement("div",null,s.createElement(c,i,s.createElement(c.Header,null,t),s.createElement(c.Body,null,n),s.createElement(l,o),s.createElement(c.Footer,null,s.createElement(c.Button,{label:r,onClick:function(){window.location.reload()}}))))}return r.propTypes={online:n.bool},r}),define("baglass/services/OfflineOnlineService",["react","react-dom","../common/ui/OfflineOnlineDialog"],function(r,i,o){return function(){function n(){var e=this;_classCallCheck(this,n),window.addEventListener("offline",function(){e.renderDialog(!1)}),window.addEventListener("online",function(){e.renderDialog(!0)});var t=document.createElement("div");t.id="offlineOnlineDialogContainer",document.getElementById("main").appendChild(t)}return _createClass(n,[{key:"renderDialog",value:function(e){var t=document.getElementById("offlineOnlineDialogContainer");i.render(r.createElement(o,{online:e}),t)}}]),n}()}),define("caglass/app/services/CAUserProfileService",["baglass/app/services/UserProfileService","underscore","baglass/core-client/js/core-client/errors/BaseError","baglass/core-client/js/core-client/utils/BidiUtil","jquery","baglass/utils/Utils"],function(e,o,n,r,i,t){var s=e.extend({initialize:function(e){if(o.isObject(e)){if(e.authInfo&&e.capabilities&&e.userAccount){if(o.extend(this,o.pick(e,"userAccount","tenants","credentials","userProfileSettings","capabilities","authInfo","preferences")),this.preferences){var t=this.preferences.biDirectionalFeaturesEnabled||!1,n=this.preferences.baseTextDirection||"";this._setBidiPrefs(n,t.toString(),this.preferences.contentLocale||"en")}return this.glassContext.getCoreSvc(".Config").getLegacyLaunchable().then(function(e){return this._updateContextWithAccountInfo(this.userAccount,this.capabilities,e,this.authInfo)}.bind(this)).then(function(e){return this.userAccount&&(this.userAccount.isSystemAdmin||this.userAccount.isTenantAdmin)&&(this._setUserTenantName(e,this.tenants),this._bindToAdminEvent()),e}.bind(this))}return Promise.reject(new Error("Context must contain authInfo, capabilities and userAccount properties"))}return Promise.reject(new Error("Invalid context"))},logout:function(){return this._clearCache(),this.glassContext.profile={},this.glassContext.getCoreSvc(".Ajax").ajax({url:s.LOGIN_URL,type:"DELETE"})},updatePreferences:function(e){return this._catchLogReturn(this._getPreferences(e),{}).then(function(e){this._setPreferences(e)}.bind(this))},_clearCache:function(){s.inherited("updateContext",this,[{userProfileSettings:null,capabilities:null,preferences:null,tenants:null,userAccount:null,credentials:null,authInfo:null}]),this.glassContext.getCoreSvc(".Config").clearConfigs()},disableLoggingSession:function(){return this.glassContext.getCoreSvc(".Ajax").ajax({type:"DELETE",url:s.SESSIONLOGGING_URL})},getUserAccount:function(e){return o.isEmpty(this.userAccount)||!0!==e?this.glassContext.getCoreSvc(".Ajax").ajax({url:s.USER_ACCOUNT_URL,type:"GET"}).then(function(e){return this.userAccount=e.data,this.userAccount}.bind(this)).catch(function(e){var t=new n("Internal error retrieving user account:"+e.message,e);throw this.glassContext.getCoreSvc(".Logger").warn(t),t}.bind(this)):Promise.resolve(this.userAccount)},getPortalPages:function(){return this.glassContext.getCoreSvc(".Ajax").ajax({url:s.USER_PORTALPAGES_URL,type:"GET"}).then(function(e){return e.data})},addPortalPage:function(e){return this.glassContext.getCoreSvc(".Ajax").ajax({headers:{Accept:"application/json","Content-Type":"application/json"},url:s.USER_PORTALPAGES_URL,type:"POST",data:JSON.stringify({target:e})})},deletePortalPage:function(e){return this.glassContext.getCoreSvc(".Ajax").ajax({url:s.USER_PORTALPAGES_URL+"/"+encodeURIComponent(e),type:"DELETE"})},resetHome:function(){return this.savePreferences({homePage:""})},savePreferences:function(e){return this._saveEmail({email:e.email}).then(this._savePreferences.bind(this,e)).then(this._setPreferences.bind(this,e))},_savePreferences:function(e){if(e&&!i.isEmptyObject(e)){var t=JSON.stringify(o.omit(e,"email"));return this.glassContext.getCoreSvc(".Ajax").ajax({url:s.PREFERENCES_URL,type:"PUT",headers:{Accept:"application/json","Content-Type":"application/json"},data:t})}},_saveEmail:function(t){return Promise.try(function(){if(void 0!==t.email&&this.glassContext.profile.account._meta&&this.glassContext.profile.account._meta.schemaInfo.email.modifiable)return this.glassContext.getCoreSvc(".Ajax").ajax({url:"v1/users_ex/"+this.glassContext.getCoreSvc(".UserProfile").preferences.id,type:"PUT",headers:{Accept:"application/json","Content-Type":"application/json"},data:JSON.stringify({email:t.email})}).then(function(e){1===e.data.errorCode?this.glassContext.getCoreSvc(".Logger").error("Update email failed"):(this.glassContext.profile.account.email=t.email,this.userAccount.email=t.email)}.bind(this))}.bind(this))},saveDataSourceCredential:function(e){return this.glassContext.getCoreSvc(".Ajax").ajax({url:s.DATASOURCE_CREDENTIAL_PATH,type:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},data:JSON.stringify(e)}).then(function(e){return e.data})},_saveCredentials:function(){return this.glassContext.getCoreSvc(".Ajax").ajax({url:s.CREDENTIALS_URL,type:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},data:"{}",skipErrorHandling:!0}).then(function(e){return e&&e.data}).catch(function(e){throw e.jqXHR})},resetCredentials:function(){return this._saveCredentials()},getAccountInfo:function(e){return Promise.try(this._getAccountInfo.bind(this,e))},_getAccountInfo:function(o){var e=this.glassContext.getCoreSvc(".Config"),t=this.getUserAccount(),n=this._getCredentials().catchReturn(),r=this._catchLogReturn(e.getDefaultHome(),{}),i=this._catchLogReturn(this._getUserProfileSettings(),{}),s=this._catchLogReturn(this.getCapabilities(),{}),a=this._catchLogReturn(e.getLegacyLaunchable(),{});return Promise.all([t,n,i,s,a,r]).spread(function(e,t,n,r,i){return this._updateContextWithAccountInfo(e,r,i,o)}.bind(this)).then(function(t){return this.userAccount&&(this.userAccount.isSystemAdmin||this.userAccount.isTenantAdmin)?this.fetchTenants().then(function(e){return this.tenants=e,this._setUserTenantName(t,e),this._bindToAdminEvent(),t}.bind(this)).catch(function(e){return this.glassContext.getCoreSvc(".Logger").warn(e),this.tenants=void 0,t}.bind(this)):t}.bind(this))},updateIdentity:function(e){return this.glassContext.getCoreSvc(".Logger").warn("The `updateIdentity` method of CAUserProfileService has been deprecated, to update the isSystemAdmin or isTenantAdmin data please use `getUserAccount` method instead."),this.getUserAccount(e)},_setUserTenantName:function(e,t){if(e.tenantID){var n=o.findWhere(t,{tenantID:e.tenantID});n&&n.defaultName?e.tenantName=n.defaultName:(this.glassContext.getCoreSvc(".Logger").error("tenant name not set for "+e.tenantID+", the id is used to set the tenant name"),e.tenantName=e.tenantID)}else this.glassContext.getCoreSvc(".Logger").debug("user is not part of a tenant: no tenant name is set in the account object")},_getPreferences:function(e){return o.isEmpty(this.preferences)||!0!==e?this.glassContext.getCoreSvc(".Ajax").ajax({url:s.PREFERENCES_URL,type:"GET"}).then(function(e){return this.preferences=e.data,this.preferences}.bind(this)):Promise.resolve(this.preferences)},_getCredentials:function(e){return o.isEmpty(this.credentials)||!0!==e?this.glassContext.getCoreSvc(".Ajax").ajax({url:s.CREDENTIALS_URL,type:"GET"}).then(function(e){return this.credentials=e.data,this.credentials}.bind(this)):Promise.resolve(this.credentials)},_getUserProfileSettings:function(){return this.userProfileSettings?Promise.resolve(this.userProfileSettings):this.glassContext.getCoreSvc(".Ajax").ajax({url:s.USER_PROFILE_SETTINGS,type:"GET",dataType:"json"}).then(function(e){return this.userProfileSettings=e.data,this.userProfileSettings}.bind(this)).catch(function(e){return this.glassContext.getCoreSvc(".Logger").error("Internal error retrieving user profile settings:"+e.message),this.userProfileSettings=s.defaultUserSettings,this.userProfileSettings}.bind(this))},getCapabilities:function(){return this.capabilities?Promise.resolve(this.capabilities):this.glassContext.getCoreSvc(".Ajax").ajax({url:s.CAPABILITIES_PATH,type:"GET"}).then(function(e){return this.capabilities=e.data.userCapabilities,this.capabilities}.bind(this)).catch(function(e){throw new n("Internal error retrieving capabilities:"+e.textStatus,e)})},_updateContextWithAccountInfo:function(e,t,n,r){this.hasCredentials=!!this.credentials,this.glassContext.primaryUserChanged=!1;var i={displayName:(this.glassContext.profile.account=e).defaultName,isAnonymous:r?r.isAnonymous:void 0,showLogIn:r?r.canCallLogon:void 0};return o.extend(this.glassContext.profile.account,i),this.glassContext.legacyLaunchable=1===n,r&&(this.glassContext.cafContextId=r.cafContextId),e},_setPreferences:function(e){this.preferences||(this.preferences={}),i.extend(!0,this.preferences,e);var t=e&&e.biDirectionalFeaturesEnabled||!1;this._setBidiPrefs(e&&e.baseTextDirection||"",t.toString(),e&&e.contentLocale||"en")},_setBidiPrefs:function(e,t,n){r.setUserPreferredTextDir(e,t),r.setUserPreferredContentLocale(n)},fetchTenants:function(e){var t=this;return o.isEmpty(this.tenants)||!0!==e?this.glassContext.getCoreSvc(".Ajax").ajax({url:s.TENANTS_PATH,type:"GET"}).then(function(e){return t.tenants=e.data.data,t.tenants}).catch(function(e){throw new n("Internal error retrieving tenants:"+e.message,e)}):Promise.resolve(this.tenants)},updateTenants:function(){return this.fetchTenants().then(function(e){return this.tenants=e}.bind(this)).catch(function(e){this.glassContext.getCoreSvc(".Logger").warn(e)}.bind(this))},isSysAdmin:function(){return this.getUserAccount(!0).then(function(e){return e.isSystemAdmin}.bind(this))},isTenantAdmin:function(){return this.getUserAccount(!0).then(function(e){return e.isTenantAdmin}.bind(this))},getHomePage:function(){var e=this._getMutableHomePage();return this._buildHomePageObject(e)},getFactoryHomePage:function(){return this._buildHomePageObject(s.defaultUserSettings.ui_homePage)},_getMutableHomePage:function(){if(t.isFactoryMode())return s.defaultUserSettings.ui_homePage;if(this.preferences&&!o.isEmpty(this.preferences.homePage))try{return JSON.parse(this.preferences.homePage)}catch(e){return this.glassContext.getCoreSvc(".Logger").error("error parsing home page",e),s.defaultUserSettings.ui_homePage}if(this.userProfileSettings&&this.userProfileSettings.ui_homePage){var e=this.userProfileSettings.ui_homePage;return e&&e.content&&"run"===e.content.action&&delete e.content.action,e}return s.defaultUserSettings.ui_homePage},_buildHomePageObject:function(e){return i.extend(!0,{content:{isHomePage:!0}},e)},getProductLocale:function(){return this.preferences&&this.preferences.productLocale},getAccountID:function(){return this.userAccount&&this.userAccount.id},_bindToAdminEvent:function(){i(document).on("com.ibm.cognos.bi.admin.updatetenantlist",this.updateTenants.bind(this))},_catchLogReturn:function(e,t){return Promise.resolve(e).catch(function(e){return this.glassContext.getCoreSvc(".Logger").error(e.message||e),t}.bind(this))}});return s.BASE_URL="v1",s.LOGIN_URL=s.BASE_URL+"/login",s.PREFERENCES_URL=s.BASE_URL+"/users/~/preferences",s.USER_ACCOUNT_URL=s.BASE_URL+"/users/~/account",s.USER_PORTALPAGES_URL=s.BASE_URL+"/users/~/my_portalPages",s.CREDENTIALS_URL=s.BASE_URL+"/users/~/credentials",s.CAPABILITIES_PATH=s.BASE_URL+"/users/~/capabilities",s.TENANTS_PATH=s.BASE_URL+"/tenants",s.DATASOURCE_CREDENTIAL_PATH=s.BASE_URL+"/users/~/credentials/datasources",s.USER_PROFILE_SETTINGS=s.BASE_URL+"/users/~/user_profile_settings",s.SESSIONLOGGING_URL=s.BASE_URL+"/glug/sessions/current",s.defaultUserSettings={ui_excludedFeatures:{},ui_homePage:{perspective:"home"},ui_theme:"IBM"},s}),define("caglass/app/services/LogoutService",["baglass/core-client/js/core-client/utils/Utils","underscore"],function(t,n){var e=function(){this._preLogoutActions=[],this._postLogoutActions=[]};return e.prototype.logOut=function(t){return this._preLogout(t.glassContext).finally(function(){var e=function(){var e=t.glassContext.getSSOLogoutURL();e?this._redirectBrowser(e):this._redirectBrowser(window.location.pathname)}.bind(this);return this.registerPostLogout(e),t.glassContext.services.userProfile.logout()}.bind(this)).then(this._postLogout.bind(this,t.glassContext))},e.prototype.registerPreLogout=function(e){if(!n.isFunction(e))throw new Error(e+" is not a function");this._preLogoutActions.push(e)},e.prototype.registerPostLogout=function(e){if(!n.isFunction(e))throw new Error(e+" is not a function");this._postLogoutActions.push(e)},e.prototype._redirectBrowser=function(e){t.getCurrentWindow().location=e},e.prototype._preLogout=function(e){return this._invokeActions(e,this._preLogoutActions,"preLogout")},e.prototype._postLogout=function(e){return this._invokeActions(e,this._postLogoutActions,"postLogout")},e.prototype._invokeActions=function(n,e,r){return e.reduce(function(e,t){return e.then(function(){return t(n)}).catch(function(e){n.getCoreSvc(".Logger").error("failure while executing an action of type "+r,e)})},Promise.resolve())},e}),define("caglass/utils/CAUtils",["jquery"],function(t){var e=function(){};return e.prototype.removeCAMNamespaceHref=function(e){var t=/([?&])(CAMNamespace=\w*[^#&]*&?)/g,n=e.substring(0,e.indexOf("#"));return 0<n.length?n.replace(t,"$1").concat(e.substring(e.indexOf("#"))):e.replace(t,"$1")},e.prototype.addUpdateDcoToQuerystring=function(e,t){var n=/([?])(.*)/,r=e.substring(0,e.indexOf("#"));return 0<r.length?r.replace(n,"?updatedco=".concat(t,"&$2")).concat(e.substring(e.indexOf("#"))):n.test(e)?e.replace(n,"?updatedco=".concat(t,"&$2")):/updatedco=\w+/.test(e)?e:e.concat("?updatedco=".concat(t))},e.prototype.removeLoadingSpinner=function(e){t("#ba-splash-styles").remove(),t(".ba-splash").remove(),e.getCoreSvc(".Events").off("appView:loaded",void 0,"removeLoadingSpinnerFunction")},e.prototype.preventWritesToObject=function(e){var t,n=_createForOfIteratorHelper(Object.getOwnPropertyNames(e));try{for(n.s();!(t=n.n()).done;){var r=t.value,i=e[r];e[r]=i&&"object"==_typeof(i)?this.preventWritesToObject(i):i}}catch(e){n.e(e)}finally{n.f()}return Object.freeze(e)},new e}),define("caglass/ba-instrumentation/dist/bundle",[],function(){return function(n){var r={};function i(e){if(r[e])return r[e].exports;var t=r[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,i),t.l=!0,t.exports}return i.m=n,i.c=r,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)i.d(n,r,function(e){return t[e]}.bind(null,r));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=0)}([function(e,t,n){var r,i;r=[n,t,n(1),n(6)],void 0===(i=function(e,t,n,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InstrumentationService=n.default,t.BluemixAnalytics=r}.apply(t,r))||(e.exports=i)},function(e,t,n){var r,i,s=this&&this.__assign||function(){return(s=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},a=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&(n[r[i]]=e[r[i]])}return n};r=[n,t,n(2)],void 0===(i=function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){this.analyticsKey="_analytics",this.bluemixKey="bluemixAnalytics",this.instrumentationKey="instrumentation",this.bluemixLoaded=!1,this.category="Offering Interface",this.digitalDataKey="digitalData",this.segmentApiKey="analytics"}return e.prototype.initialize=function(e,t){var n=this;if(this.glassContext=e,this.configBuilder=new i.default(t),this.eventQueue=[],this._logger=this.glassContext.getCoreSvc(".Logger"),!0===t.enabled&&""!==t.key)return this.configureAnalytics(),this.requireBluemixScript(this.configBuilder.config.scriptURL).then(function(){var e=n.configBuilder.buildTraits(),t=n.configBuilder.buildContext();n.bluemixLoaded=!0,window[n.bluemixKey].identify(e,t),n.configBuilder.config.autoSPAEnabled||n.registerPageEventListener()}).catch(function(e){n.configBuilder.disableService(),n.logger.error("InstrumentationService is not enabled, Bluemix script failed to load",e)});var r="InstrumentationService was not enabled. Config: "+JSON.stringify(this.configBuilder.config);return Promise.resolve(r)},Object.defineProperty(e.prototype,"config",{get:function(){return this.configBuilder.config},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"logger",{get:function(){return this._logger||console},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"enabled",{get:function(){return!0===this.bluemixLoaded&&void 0!==window[this.analyticsKey]&&this.configBuilder.config.enabled},enumerable:!0,configurable:!0}),e.prototype.resetAnalyticsCookie=function(){var n=this;return new Promise(function(e,t){if(n.enabled&&Object.prototype.hasOwnProperty.call(window,n.segmentApiKey))try{return window[n.segmentApiKey].reset(),e()}catch(e){n.logger.error(e),t()}})},e.prototype.track=function(e){try{if(this.enabled){var t=this.configBuilder.trackEventPayload(),n=this.configBuilder.buildContext();e.productTitle=this.configBuilder.config.productTitle;var r=e.type,i=a(e,["type"]),o=s({},i,t);this.callAction(window[this.bluemixKey].trackEvent,r,o,n)}}catch(e){this.logger.warn("Failed to call a trackEvent as instrumentation is disabled")}},e.prototype.page=function(e){try{if(this.enabled){var t=this.configBuilder.pageEventPayload(),n=this.configBuilder.buildContext();this.callAction(window[this.bluemixKey].pageEvent,this.category,e,t,n)}}catch(t){this.logger.warn("Failed to call a pageEvent for '"+e+"' as instrumentation is disabled")}},e.prototype.isBluemixAnalyticsLoaded=function(){return!!window[this.bluemixKey]},e.prototype.sendQueuedEvents=function(){for(;0<this.eventQueue.length;){var e=this.eventQueue.shift(),t=e.fn,n=e.args;t.apply(void 0,n)}},e.prototype.callAction=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this.isBluemixAnalyticsLoaded()?e.apply(void 0,t):this.eventQueue.push({fn:e,args:t})},e.prototype.configureAnalytics=function(){this.category=this.configBuilder.config.category||this.category,window[this.analyticsKey]=this.configBuilder.buildAnalyticsKey(),window[this.digitalDataKey]=this.configBuilder.buildDigitalDataKey(this.category),window[this.instrumentationKey]=this.configBuilder.buildDDO()},e.prototype.requireBluemixScript=function(r){var i=this;return new Promise(function(e,t){var n=document.createElement("script");n.type="text/javascript",n.async=!0,n.src=r,n.addEventListener("load",function(){if(i.isBluemixAnalyticsLoaded())return i.sendQueuedEvents(),e();t("The bluemix script loaded but did not successfully initialize: window.bluemixAnalytics was not created.")}),n.addEventListener("error",function(){t("Error loading script '"+r+"'")}),n.addEventListener("abort",function(){t("Script loading aborted '"+r+"'")}),document.head.appendChild(n)})},e.prototype.registerPageEventListener=function(){var n=this;try{this.glassContext.getCoreSvc(".Events").on("appView:loaded",function(e){var t=e.context.content.perspective;n.page(t)})}catch(n){this.logger.warn("Failed to register page listener for instrumentation on core service .Events 'appView:loaded'")}},e}();t.default=n}.apply(t,r))||(e.exports=i)},function(e,t,n){var r,i,d=this&&this.__assign||function(){return(d=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};r=[n,t,n(3)],void 0===(i=function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var u,r,i,o,s=new n.default;(o=u=t.SegmentKeys||(t.SegmentKeys={})).accountId="accountId",o.accountIdType="accountIdType",o.browserLanguage="browserLanguage",o.capabilities="capabilities",o.gbt10="GBT10",o.gbt15="GBT15",o.gbt17="GBT17",o.gbt20="GBT20",o.gbtlvlcd="GBTLVLCD",o.isIBMer="isIBMer",o.isTestUser="isTestUser",o.isTrial="isTrial",o.productVersion="productVersion",o.partIds="partNumber",o.productID="productId",o.productTitle="productTitle",o.roles="user.role",o.tenantId="tenantId",o.url="url",(i=r=t.EmailDomains||(t.EmailDomains={})).IBM="ibm.com",i.YOPMAIL="yopmail.com",i.MAILINATOR="mailinator.com",i.COGNOS="cognos.com";var a=function(){function e(e){this.serviceConfig={enabled:!(!e||!0!==e.enabled),key:e&&e.key&&"string"==typeof e.key?e.key:"",scriptURL:e&&e.scriptURL&&"string"==typeof e.scriptURL?e.scriptURL:"",productTitle:e&&e.productTitle&&"string"==typeof e.productTitle?e.productTitle:"",productID:e&&e.productID&&"string"==typeof e.productID?e.productID:"",versionNumber:e&&e.versionNumber&&"string"==typeof e.versionNumber?e.versionNumber:"",tenantId:e&&e.tenantId&&"string"==typeof e.tenantId?e.tenantId:"",accountId:e&&e.accountId&&"string"==typeof e.accountId?e.accountId:"",accountIdType:e&&e.accountIdType&&"string"==typeof e.accountIdType?e.accountIdType:"",whitelistedValues:e&&e.whitelistedValues&&Array.isArray(e.whitelistedValues)?e.whitelistedValues:[""],digitalContextEnable:!(!e||!e.digitalContextEnable||"boolean"!=typeof e.digitalContextEnable)&&e.digitalContextEnable,whitelist:!(!e||!0!==e.whitelist),autoSPAEnabled:!(!e||!0!==e.autoSPAEnabled),email:e&&e.email&&"string"==typeof e.email?e.email:"",creationTime:e&&e.creationTime&&"string"==typeof e.creationTime?e.creationTime:"",productLocale:e&&e.productLocale&&"string"==typeof e.productLocale?e.productLocale:"",gbt10:e&&e.gbt10&&"string"==typeof e.gbt10?e.gbt10:"",gbt15:e&&e.gbt15&&"string"==typeof e.gbt15?e.gbt15:"",gbt17:e&&e.gbt17&&"string"==typeof e.gbt17?e.gbt17:"",gbt20:e&&e.gbt20&&"string"==typeof e.gbt20?e.gbt20:"",gbtlvlcd:e&&e.gbtlvlcd&&"string"==typeof e.gbtlvlcd?e.gbtlvlcd:"",category:e&&e.category&&"string"==typeof e.category?e.category:null,environment:e&&e.environment&&"string"==typeof e.environment?e.environment:null,partIds:e&&e.partIds&&Array.isArray(e.partIds)?e.partIds.sort():[""],capabilities:e&&e.capabilities&&Array.isArray(e.capabilities)?e.capabilities.sort():[""],isTrial:!e||!0!==e.isTrial&&!1!==e.isTrial?void 0:e.isTrial,roles:e&&e.roles&&Array.isArray(e.roles)?e.roles.sort():[""]}}return Object.defineProperty(e.prototype,"config",{get:function(){return this.serviceConfig},enumerable:!0,configurable:!0}),e.prototype.disableService=function(){this.config.enabled=!1},e.prototype.buildTraits=function(){var e,t=null;return this.isEnabled&&((e={})[u.productVersion]=this.version,e[u.partIds]=this.partIdsString,e[u.tenantId]=this.tenantId,e[u.accountId]=this.accountId,e[u.isIBMer]=this.isIBMer(this.email),e[u.isTestUser]=this.isTestUser(this.email),e.url=s.getSanitizedURL(this.url,this.whitelistedValues,this.whitelist),e.createdAt=this.creationTime,t=e),t},e.prototype.buildContext=function(){var e=null;return this.isEnabled?e={context:{isIBMer:this.isIBMer(this.email),isTestUser:this.isTestUser(this.email),page:this.commonHrefProps}}:console.warn("Instrumentation.ConfigBuilder.buildContext(): Instrumentation is disabled."),e},e.prototype.buildAnalyticsKey=function(){var e;return this.isEnabled&&""!==this.key&&(e={skipIdentify:!0,autoPageEventSpa:this.isAutoSPAEnabled,autoPageView:this.isAutoSPAEnabled,segment:!0,segment_key:this.key,coremetrics:!1,optimizely:!1,nps:!1}),e},e.prototype.buildDigitalDataKey=function(e){var t,n;return this.isEnabled&&""!==this.key&&(n={pageInfo:(t={},t[u.productTitle]=this.productTitle,t.analytics={category:e},t)},this.environment&&(n.appInfo={plan:this.environment})),n},e.prototype.buildDDO=function(){var e,t,n,r,i,o,s,a,c,l={};return this.isEnabled&&(l=d({},this.capabilities&&""!==this.capabilitiesString&&((e={})[u.capabilities]=this.capabilities,e),this.version&&((t={})[u.productVersion]=this.version,t),this.url&&((n={})[u.url]=this.url,n),this.partIds&&""!==this.partIdsString&&((r={})[u.partIds]=this.partIds,r),this.accountIdType&&((i={})[u.accountIdType]=this.accountIdType,i),this.accountId&&((o={})[u.accountId]=this.accountId,o),this.tenantId&&((s={})[u.tenantId]=this.tenantId,s),this.productID&&((a={})[u.productID]=this.productID,a),this.isTrial&&((c={})[u.isTrial]=this.isTrial,c))),l},e.prototype.pageEventPayload=function(){var e,t={};if(this.isEnabled){var n=((e={name:s.getPerspectiveName(this.url),path:this.pathname})[u.browserLanguage]=this.productLocale,e);t=d({},this.commonEvtProps,n,this.commonHrefProps)}return t},e.prototype.trackEventPayload=function(){var e={};if(this.isEnabled){var t={url:s.getSanitizedURL(this.url,this.whitelistedValues,this.whitelist)};e=d({},this.commonEvtProps,t)}return e},Object.defineProperty(e.prototype,"isEnabled",{get:function(){var e=!1;return this.config&&this.config.enabled?e=!0:console.warn("Instrumentation.ConfigBuilder: Instrumentation is disabled."),e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"commonHrefProps",{get:function(){return{referrer:s.getSanitizedURL(this.referrer,this.whitelistedValues,this.whitelist),search:s.getSanitizedQueryParams(this.search,this.whitelistedValues,this.whitelist),title:s.getPerspectiveName(this.url),url:s.getSanitizedURL(this.url,this.whitelistedValues,this.whitelist)}},enumerable:!0,configurable:!0}),e.prototype.isIBMer=function(e){var t=!1;return this.isEnabled&&(this.validateEmail(e)?t=e.split("@")[1].includes(r.IBM):console.warn("Instrumentation.ConfigBuilder.isIBMer: Invalid email passed as parameter "+e)),t},e.prototype.isTestUser=function(e){var t=!1;if(this.isEnabled)if(this.validateEmail(e)){var n=e.split("@")[1];t=n.includes(r.YOPMAIL)||n.includes(r.MAILINATOR)||n.includes(r.COGNOS)}else console.warn("Instrumentation.ConfigBuilder.isTestUser: Invalid email passed as parameter "+e);return t},e.prototype.validateEmail=function(e){var t=RegExp(/\S+@\S+\.\S+/);return e&&t.test(e)},Object.defineProperty(e.prototype,"commonEvtProps",{get:function(){var e;return(e={})[u.productVersion]=this.version,e[u.productTitle]=this.productTitle,e[u.partIds]=this.partIdsString,e[u.productID]=this.productID,e[u.tenantId]=this.tenantId,e[u.accountId]=this.accountId,e[u.accountIdType]=this.accountIdType,e[u.gbt10]=this.gbt10,e[u.gbt15]=this.gbt15,e[u.gbt17]=this.gbt17,e[u.gbt20]=this.gbt20,e[u.gbtlvlcd]=this.gbtlvlcd,e["custom.capabilities"]=this.capabilitiesString,e[u.roles]=this.rolesString,e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"email",{get:function(){return this.config.email},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"creationTime",{get:function(){return this.config.creationTime},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"productLocale",{get:function(){return this.config.productLocale},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"url",{get:function(){return window.location.href},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"search",{get:function(){return window.location.search},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pathname",{get:function(){return window.location.pathname},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"referrer",{get:function(){return window.document.referrer||" "},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"whitelist",{get:function(){return this.config.whitelist},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"whitelistedValues",{get:function(){return this.config.whitelistedValues},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"key",{get:function(){return this.config.key},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"environment",{get:function(){return this.config.environment},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"version",{get:function(){return this.config.versionNumber},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"productID",{get:function(){return this.config.productID},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"productTitle",{get:function(){return this.config.productTitle},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tenantId",{get:function(){return this.config.tenantId},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"accountId",{get:function(){return this.config.accountId},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"accountIdType",{get:function(){return this.config.accountIdType},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"gbt10",{get:function(){return this.config.gbt10},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"gbt15",{get:function(){return this.config.gbt15},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"gbt17",{get:function(){return this.config.gbt17},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"gbt20",{get:function(){return this.config.gbt20},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"gbtlvlcd",{get:function(){return this.config.gbtlvlcd},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"partIds",{get:function(){return this.config.partIds},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"partIdsString",{get:function(){return this.partIds.join()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isAutoSPAEnabled",{get:function(){return this.config.autoSPAEnabled},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"capabilities",{get:function(){return this.config.capabilities},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"capabilitiesString",{get:function(){return this.capabilities.join()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isTrial",{get:function(){return this.config.isTrial},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"roles",{get:function(){return this.config.roles},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rolesString",{get:function(){return this.roles.join()},enumerable:!0,configurable:!0}),e}();t.default=a}.apply(t,r))||(e.exports=i)},function(e,t,n){var r,i;r=[n,t,n(4)],void 0===(i=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){}return e.prototype.getSanitizedURL=function(t,e,n){var r="",i="";return t&&e?t.includes("?")?e.some(function(e){return t.includes(e)})&&(i=t.substring(t.indexOf("?"),t.length),r=t.substring(0,t.indexOf("?"))+this.getSanitizedQueryParams(i,e,n)):r=t:console.warn("Instrumentation.URLSanitizer.getSanitizedURL(): Cannot sanitize. Missing url: "+t+" or whitelisted arguments "+e+"."),r},e.prototype.getSanitizedQueryParams=function(e,t,n){var r=new URLSearchParams,i="";if(e)if(!t||0===t.length||null===n&&void 0===n)console.warn("Instrumentation.URLSanitizer.getSanitizedQueryParams(): Missing list of values: "+t+" or whitelist flag is undefined: "+n);else if("?"===e.substring(0,1)){for(var o=new URLSearchParams(e.substring(1)),s=0;s<t.length;s++)o.has(t[s])&&(r.append(t[s],o.get(t[s])),o.delete(t[s]));""!==(i+=n?r.toString():o.toString())&&(i="?"+i)}else console.warn("Instrumentation.URLSanitizer.getSanitizedQueryParams(): Passed argument "+e+" is not valid.");else console.warn("Instrumentation.URLSanitizer.getSanitizedQueryParams(): Cannot sanitize. Missing search string: "+e);return i},e.prototype.getPerspectiveName=function(e){var t="",n=[];if(e){if(1<(n=e.split("?")).length){var r=new URLSearchParams(n[1]);r.has("perspective")?t=r.get("perspective"):console.warn("Instrumentation.URLSanitizer.getPerspectiveName(): No perspective name found in the url.")}}else console.warn("Instrumentation.URLSanitizer.getPerspectiveName(): Cannot return perspective name. Missing a valid url: "+e);return t},e}();t.default=n}.apply(t,r))||(e.exports=i)},function(e,t,n){(function(e){function g(e){return(g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}!function(n){"use strict";var e=n.URLSearchParams?n.URLSearchParams:null,t=e&&"a=1"===new e({a:1}).toString(),r=e&&"+"===new e("s=%2B").get("s"),s="__URLSearchParams__",i=l.prototype,o=!(!n.Symbol||!n.Symbol.iterator);if(!(e&&t&&r)){i.append=function(e,t){h(this[s],e,t)},i.delete=function(e){delete this[s][e]},i.get=function(e){var t=this[s];return e in t?t[e][0]:null},i.getAll=function(e){var t=this[s];return e in t?t[e].slice(0):[]},i.has=function(e){return e in this[s]},i.set=function(e,t){this[s][e]=[""+t]},i.toString=function(){var e,t,n,r,i=this[s],o=[];for(t in i)for(n=u(t),e=0,r=i[t];e<r.length;e++)o.push(n+"="+u(r[e]));return o.join("&")};var a=!!r&&e&&!t&&n.Proxy;n.URLSearchParams=a?new Proxy(e,{construct:function(e,t){return new e(new l(t[0]).toString())}}):l;var c=n.URLSearchParams.prototype;c.polyfill=!0,c.forEach=c.forEach||function(n,r){var e=f(this.toString());Object.getOwnPropertyNames(e).forEach(function(t){e[t].forEach(function(e){n.call(r,e,t,this)},this)},this)},c.sort=c.sort||function(){var e,t,n,r=f(this.toString()),i=[];for(e in r)i.push(e);for(i.sort(),t=0;t<i.length;t++)this.delete(i[t]);for(t=0;t<i.length;t++){var o=i[t],s=r[o];for(n=0;n<s.length;n++)this.append(o,s[n])}},c.keys=c.keys||function(){var n=[];return this.forEach(function(e,t){n.push(t)}),p(n)},c.values=c.values||function(){var t=[];return this.forEach(function(e){t.push(e)}),p(t)},c.entries=c.entries||function(){var n=[];return this.forEach(function(e,t){n.push([t,e])}),p(n)},o&&(c[n.Symbol.iterator]=c[n.Symbol.iterator]||c.entries)}function l(e){((e=e||"")instanceof URLSearchParams||e instanceof l)&&(e=e.toString()),this[s]=f(e)}function u(e){var t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'\(\)~]|%20|%00/g,function(e){return t[e]})}function d(e){return decodeURIComponent(e.replace(/\+/g," "))}function p(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return o&&(e[n.Symbol.iterator]=function(){return e}),e}function f(e){var t={};if("object"===g(e))for(var n in e)e.hasOwnProperty(n)&&h(t,n,e[n]);else{0===e.indexOf("?")&&(e=e.slice(1));for(var r=e.split("&"),i=0;i<r.length;i++){var o=r[i],s=o.indexOf("=");-1<s?h(t,d(o.slice(0,s)),d(o.slice(s+1))):o&&h(t,d(o),"")}}return t}function h(e,t,n){var r="string"==typeof n?n:null!=n&&"function"==typeof n.toString?n.toString():JSON.stringify(n);t in e?e[t].push(r):e[t]=[r]}}(void 0!==e?e:"undefined"!=typeof window?window:this)}).call(this,n(5))},function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(e){"object"===("undefined"==typeof window?"undefined":n(window))&&(r=window)}e.exports=r},function(e,t,n){var r,i,S=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});void 0===(r=function(e,t){"use strict";var r,n;Object.defineProperty(t,"__esModule",{value:!0}),(n=r=t.AnalyticsEventType||(t.AnalyticsEventType={})).CreatedObject="Created Object",n.ReadObject="Read Object",n.UpdatedObject="Updated Object",n.DeletedObject="Deleted Object",n.SearchedObject="Searched Object",n.RanProcess="Ran Process",n.StartedProcess="Started Process",n.EndedProcess="Ended Process",n.CustomEvent="Custom Event",n.ServiceLogin="Service Login",n.ServiceLogout="Service Logout",n.HybridRatedUsage="Hybrid Rated Usage",n.VideoPlaybackStarted="Video Playback Started",n.VideoPlaybackCompleted="Video Playback Completed",n.ObjectInteraction="Object Interaction";var i=function(e,t){this.customName1="action",this.type=e,this.customValue1=t},o=function(n){function e(e,t){return n.call(this,e,t)||this}return S(e,n),e}(t.AnalyticsEvent=i),s=function(t){function e(e){return t.call(this,r.CreatedObject,e)||this}return S(e,t),e}(o);t.CreatedObjectEvent=s;var a=function(t){function e(e){return t.call(this,r.ReadObject,e)||this}return S(e,t),e}(o);t.ReadObjectEvent=a;var c=function(t){function e(e){return t.call(this,r.UpdatedObject,e)||this}return S(e,t),e}(o);t.UpdatedObjectEvent=c;var l=function(t){function e(e){return t.call(this,r.DeletedObject,e)||this}return S(e,t),e}(o);t.DeletedObjectEvent=l;var u=function(t){function e(e){return t.call(this,r.SearchedObject,e)||this}return S(e,t),e}(o);t.SearchedObjectEvent=u;var d=function(r){function e(e,t){var n=r.call(this,e,t)||this;return n.processType=t,n}return S(e,r),e}(i),p=function(t){function e(e){return t.call(this,r.RanProcess,e)||this}return S(e,t),e}(d);t.RanProcessEvent=p;var f=function(t){function e(e){return t.call(this,r.StartedProcess,e)||this}return S(e,t),e}(d);t.StartedProcessEvent=f;var h=function(t){function e(e){return t.call(this,r.EndedProcess,e)||this}return S(e,t),e}(d);t.EndedProcessEvent=h;var g=function(n){function e(e){var t=n.call(this,r.CreatedObject,"")||this;return t.action=e,t}return S(e,n),e}(o);t.CustomEvent=g;var v=function(n){function e(e,t){return n.call(this,e,t)||this}return S(e,n),e}(i),y=function(t){function e(e){return t.call(this,r.ServiceLogin,e)||this}return S(e,t),e}(v);t.ServiceLoginEvent=y;var m=function(t){function e(e){return t.call(this,r.ServiceLogout,e)||this}return S(e,t),e}(v);t.ServiceLogoutEvent=m;var b=function(t){function e(e){return t.call(this,r.HybridRatedUsage,e)||this}return S(e,t),e}(i);t.HybridRatedUsageEvent=b;var _=function(i){function e(e,t,n){var r=i.call(this,e,t)||this;return r.customName2="videoUrl",r.customValue2=n,r}return S(e,i),e}(i),w=function(n){function e(e,t){return n.call(this,r.VideoPlaybackStarted,e,t)||this}return S(e,n),e}(_);t.VideoPlaybackStartedEvent=w;var C=function(n){function e(e,t){return n.call(this,r.VideoPlaybackCompleted,e,t)||this}return S(e,n),e}(_);t.VideoPlaybackCompletedEvent=C}.apply(t,[n,t]))||(e.exports=r)}])}),define("caglass/app/services/CAFEncodingService",["underscore","jquery"],function(n,r){var e=function(){function s(e,t){_classCallCheck(this,s),this.glassContext=e,this._xssChars=t||""}return _createClass(s,[{key:"cafEncodeQSValue",value:function(e){if(!0===this.glassContext.getCoreSvc(".Config").getXSSChecking()){if(n.isObject(e)){var t=r.extend(!0,{},e);return this._encodeObjectWithTags(t),t}if(n.isString(e))return this.encodeWithTags(e)}return e}},{key:"_encodeObjectWithTags",value:function(e){for(var t in e)n.isObject(e[t])?this._encodeObjectWithTags(e[t]):n.isString(e[t])&&(e[t]=this.encodeWithTags(e[t]))}},{key:"encodeWithTags",value:function(e){return"XSSSTART"+this.encode(e)+"XSSEND"}},{key:"encode",value:function(e){for(var t="",n="",r=""+e,i=0;i<r.length;i++)t+='"'==(n=r.charAt(i))?"_22":"%"==n?"*":"*"==n?"_2a":"_"==n?"_5f":this._getXSSChar(n);return t}},{key:"_getXSSChar",value:function(e){for(var t="",n=!1,r=0;r<this._xssChars.length;++r)if(e==this._xssChars.charAt(r)){n=!0;break}if(n){t+="_";var i=Math.floor(e.charCodeAt(0)/16),o=e.charCodeAt(0)-16*i;t+=s.HEX_CHARS.charAt(i),t+=s.HEX_CHARS.charAt(o)}else t+=e;return t}}]),s}();return e.HEX_CHARS="0123456789abcdef",e}),function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("caglass/nls/StringResources"),require("baglass/core-client/js/core-client/utils/UrlUtils"),require("baglass/core-client/js/core-client/utils/BrowserUtils"),require("baglass/core-client/js/core-client/utils/Utils"));else if("function"==typeof define&&define.amd)define("caglass/caglass.webpack.bundle",["caglass/nls/StringResources","baglass/core-client/js/core-client/utils/UrlUtils","baglass/core-client/js/core-client/utils/BrowserUtils","baglass/core-client/js/core-client/utils/Utils"],t);else{var n="object"==typeof exports?t(require("caglass/nls/StringResources"),require("baglass/core-client/js/core-client/utils/UrlUtils"),require("baglass/core-client/js/core-client/utils/BrowserUtils"),require("baglass/core-client/js/core-client/utils/Utils")):t(e["caglass/nls/StringResources"],e["baglass/core-client/js/core-client/utils/UrlUtils"],e["baglass/core-client/js/core-client/utils/BrowserUtils"],e["baglass/core-client/js/core-client/utils/Utils"]);for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}(window,function(n,r,i,o){return function(n){var r={};function i(e){if(r[e])return r[e].exports;var t=r[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,i),t.l=!0,t.exports}return i.m=n,i.c=r,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)i.d(n,r,function(e){return t[e]}.bind(null,r));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=3)}([function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.postSecondaryLogin=t.SecondaryLoginConstants=void 0;var i,o,s=r(n(5)),a=r(n(6)),d=r(n(7)),c=r(n(8));(o=i=t.SecondaryLoginConstants||(t.SecondaryLoginConstants={})).path="/login",o.parameters="secondaryLogin=true",o.successMessageKey="secondaryLoginSuccess",o.refreshMessageKey="secondaryLoginRefresh";var p=i.path+"?"+i.parameters;function f(t){t.appController.showMessage(s.default.get(i.successMessageKey),s.default.get(i.refreshMessageKey),"info",["ok","cancel"],"500px",function(e){"ok"===e.btn&&setTimeout(function(){t.close().then(function(){var e=c.default.getCurrentWindow();e.location=e.location.pathname})},1)},!0,"ANSDialog")}t.postSecondaryLogin=function(e,t){return d.default.isIE()?e.localStorage.secondaryLoginResult=JSON.stringify(t):e.opener?e.opener.postMessage(t):e.close(),t},t.default=function(l,e){var t=l.gateway?l.gateway:"/bi",n=window.location.origin+t+p;e&&(n+="&state="+a.default.base64Encode(JSON.stringify(e)));var u=window.open(n,"");return c.default.getCurrentWindow().onbeforeunload=function(){u&&u.close()},new Promise(function(e,t){try{u&&(u.onbeforeunload=function(){t(new Error("SecondaryLogin cancelled"))}),d.default.isIE()?(window.localStorage.removeItem("secondaryLoginResult"),o=u,s=l,a=e,c=function(e){var t;if(e.key&&"secondaryLoginResult"===e.key&&(t=e.newValue),t&&o){window.removeEventListener("storage",c),window.localStorage.removeItem("secondaryLoginResult");var n=JSON.parse(t);a(n),o.close(),f(s)}},window.addEventListener("storage",c)):(n=u,r=l,i=e,window.addEventListener("message",function(e){n&&e.source===n&&(i(e.data),n.close(),f(r))},{once:!0}))}catch(e){t(e)}var n,r,i,o,s,a,c}).catch(function(){return l.appController.unlockGlass(),Promise.reject()})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){this.getNavBar=function(){var e=document.querySelector(".appview.paneColumn:not(.hidden)").getElementsByClassName("navbar");return e&&0<e.length?e[0]:null}}return e.prototype.canExecute=function(e){if(e.glassContext.appController.currentAppView){var t=e.glassContext.appController.currentAppView.hasHomeFlag();return null!==this.getNavBar()&&!t}return!1},e.prototype.doAction=function(){var e=this.getNavBar();null!==e&&e.classList.add("narrow")},e}();t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){this.getNavBar=function(){var e=document.querySelector(".appview.paneColumn:not(.hidden)").getElementsByClassName("navbar");return e&&0<e.length?e[0]:null}}return e.prototype.canExecute=function(e){return!!e.glassContext.appController.currentAppView&&null!==this.getNavBar()},e.prototype.doAction=function(){var e=this.getNavBar();null!==e&&e.classList.remove("narrow")},e}();t.default=r},function(e,t,n){e.exports=n(4)},function(e,t,n){"use strict";n.r(t);var r=n(1),i=n.n(r);n.d(t,"HideNavBarItemLabelsAction",function(){return i.a});var o=n(2),s=n.n(o);n.d(t,"ShowNavBarItemLabelsAction",function(){return s.a});var a=n(0),c=n.n(a);n.d(t,"secondaryLogin",function(){return c.a}),n.d(t,"postSecondaryLogin",function(){return a.postSecondaryLogin})},function(e,t){e.exports=n},function(e,t){e.exports=r},function(e,t){e.exports=i},function(e,t){e.exports=o}])}),define("caglass/app/services/CredentialDialogBuilder",["baglass/common/ui/SubmitPasswordDialog","caglass/nls/StringResources","jquery"],function(s,a,i){return function(){function n(e,t){_classCallCheck(this,n),this.glassContext=e,this.endpoint=t}return _createClass(n,[{key:"openRenewCredentialDialog",value:function(e){return this._openCredentialDialog(e,a.get("credentialChange"),"renewCredential")}},{key:"_openCredentialDialog",value:function(e,t,n){var r=this._buildParameters(e),i={glassContext:this.glassContext,displayPrompts:r},o={buttons:[{text:a.get("ok"),handler:this._submitCredential.bind(this),type:"primary",defaultId:n},"cancel"],title:t,viewOptions:i,cancelCallback:function(){this._credentialDialogObj.dialog.hide()}.bind(this)};return s.prototype.openSubmitPasswordDialog(o).then(function(e){return this._credentialDialogObj=e,Promise.resolve()}.bind(this),function(){return Promise.reject("Failed to open submit-password dialog")}.bind(this))}},{key:"_buildParameters",value:function(e){this.credentialParameters=[];var n=[];return i.each(e,function(e,t){this.credentialParameters.push(t),"hidden"!==t.type&&"display"!==t.type&&n.push(t)}.bind(this)),n}},{key:"_submitCredential",value:function(){i.each(this.credentialParameters,function(e,t){var n=i('input[class*="'+t.name+'"]');if(n.length){var r=n.val();r&&(t.value=r)}}.bind(this));var e={type:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},url:this.endpoint,data:JSON.stringify({parameters:this.credentialParameters}),skipErrorHandling:!0};return this.glassContext.services.ajax.ajax(e).then(function(){return this._submitSuccessHandler(),Promise.resolve()}.bind(this),function(e,t,n,r){return t.status===this.glassContext.ajaxCodes.UNAUTHORIZED&&t.responseJSON&&"camAuthUserRecoverable"===t.responseJSON.errorCodeString?this._submitErrorHandler(t,r,!1):this._submitErrorHandler(t,r,!0),Promise.reject("Failed to renew credential: ".concat(r))}.bind(this))}},{key:"_submitSuccessHandler",value:function(){this._credentialDialogObj.dialog.hide(),this.glassContext.appController.showToast(a.get("credentialCreateSuccess"))}},{key:"_submitErrorHandler",value:function(e,t,n){n?(this.glassContext.appController.showToast(t,{type:"error"}),this._credentialDialogObj.dialog.hide()):(this.glassContext.appController.showToast(a.get("wrongPassword"),{type:"error"}),this._buildParameters(e.responseJSON.promptInfo.displayObjects))}}]),n}()}),define("caglass/app/services/LoginService",["caglass/ajax/CAAuthentication","caglass/caglass.webpack.bundle","caglass/nls/StringResources","caglass/app/services/CredentialDialogBuilder"],function(t,e,r,i){var o=e.secondaryLogin,n=function(){function n(e){_classCallCheck(this,n),this.glassContext=e,this.caAuth=new t}return _createClass(n,[{key:"secondaryLogin",value:function(e){var t=this;return o(this.glassContext,e).catch(function(e){t.glassContext.getCoreSvc(".Logger").error("Secondary login failed",e)})}},{key:"renewCredential",value:function(){var t=this;return this.caAuth.storeCredentials(this.glassContext).then(function(){return t.glassContext.appController.showToast(r.get("credentialRenewed"))},function(e){return e&&e.displayObjects?new i(t.glassContext,n.CREDENTIALS_URL).openRenewCredentialDialog(e.displayObjects):(t.glassContext.getCoreSvc(".Logger").error("Missing displayObjects while opening crendential dialog",e),Promise.reject())})}},{key:"recoverFromCamError",value:function(e){return e&&"camAuthUserRecoverable"==e.errorCodeString?this._recoverFromError(e):Promise.reject(e)}},{key:"_recoverFromError",value:function(e){var t={responseJSON:e},n=this.caAuth.processAuthenticationError(this.glassContext,t);return n.displayObjects&&0<n.displayObjects.length?this.secondaryLogin(n):Promise.reject(e)}}]),n}();return n.CREDENTIALS_URL="v1/users/~/credentials",n}),define("caglass/utils/EntitlementObject",[],function(){var e={ENTITLEMENTS:{enabled:!0,display_name:"display_name",entitled_organization:{country_code:"country_code",name:"name",other_identifier:{org_id:"org_id",sap_sold_to_site_number:"string",ibm_customer_number:"ibm_customer_number"}},entitled_user:{family_name:"string",email_address:"user@example.com",given_name:"string",language:"string",ibm_unique_id:"string"},third_party_marketplace:{route_indicator:"3PM"},entitled_parts:[{part_number:"part_number",display_name:"TRIAL_PART",type:"trial",offering:"CA",subscription_id:"2",expiration_date:"2020-05-29T23:59:59.000Z",abilities:[{type:"CAPABILITY",value:"value1"},{type:"GROUP",value:"value2"}]},{part_number:"part_number",display_name:"BASE_PART",type:"base",offering:"CA",subscription_id:"3",expiration_date:"2019-03-29T23:59:59.000Z",abilities:[{type:"GROUP",value:"value1"}]},{part_number:"part_number",display_name:"BASE_PART",type:"something else",offering:"CA",subscription_id:"4",expiration_date:"2019-03-29T23:59:59.000Z",abilities:[{type:"GROUP",value:"value1"}]}],tenant_id:"tenant_id",user_id:"user_id",account_id:"account_id",subscription_id:"1",product_deployment:{product_deployment_location:"multitenant1.dal10.us-south",instance_url:"https://ca1.analytics.ibm.com",offering:"CA",description:"CA on DAL10 US-South"}}};return e}),define("caglass/app/services/DigitalContextService",["underscore","caglass/utils/EntitlementObject","caglass/utils/CAUtils","baglass/utils/Utils"],function(n,e,i,t){var r=function(){function r(e){_classCallCheck(this,r),this._glassContext=e,this._setLogger(e)}return _createClass(r,[{key:"initialize",value:function(){if(this.isEnabled()){if(null==t.getCookieValue(r.DCO_COOKIE))return this.fetchEntitlements();var e=this.parseJsonFromDcoCookie(t.getCookieValue(r.DCO_COOKIE));if(e)return this.digitalContext=e,Promise.resolve(e)}return Promise.resolve()}},{key:"fetchEntitlements",value:function(){var t=this;return this._glassContext.getCoreSvc(".Ajax").ajax({url:r.DIGITAL_CONTEXT_URL,type:"POST"}).then(function(e){e.data&&!1!==e.data.enabled?(t.digitalContext=e.data,i.preventWritesToObject(t.digitalContext)):t._getLogger().error("DigitalContextService Retrieved Entitlement data invalid ")}).catch(function(e){t._getLogger().error("DigitalContextService Communication error with digitalcontext API",e)})}},{key:"isInitialized",value:function(){return!!this.digitalContext}},{key:"isEnabled",value:function(){return this._glassContext.getCoreSvc(".Config").getConfigValueSync("Glass.digitalContextEnabled")}},{key:"getAccountId",value:function(){if(this.digitalContext&&this.digitalContext[r.ACCOUNT_ID])return this.digitalContext[r.ACCOUNT_ID]}},{key:"getSubscriptionId",value:function(){var e=this.getEntitledParts(),t=this._findBasePartSbsId(e);if(t)return t;var n=this._findTrialPartSbsId();return n||this.digitalContext[r.SUBSCRIPTION_ID]}},{key:"_findBasePartSbsId",value:function(e){return e.map(function(e){return e.type&&e.type.toLowerCase()===r.BASE&&e[r.SUBSCRIPTION_ID]}).filter(function(e){return!1!==e})[0]}},{key:"_findTrialPartSbsId",value:function(){var e=this.getTrialPart();return e&&e[r.SUBSCRIPTION_ID]}},{key:"getValueByKey",value:function(e){if(this.digitalContext&&this.digitalContext[e])return this.digitalContext[e]}},{key:"getTrialPart",value:function(){var e=this.getEntitledParts();if(e&&0<e.length)return this._getTrialParts(e)}},{key:"_getTrialParts",value:function(e){var t;if(n.each(e,function(e){if(e[r.PART_TYPE]&&e[r.PART_TYPE].toLowerCase()==r.TRIAL)return t=e,!1}),t)return t}},{key:"isTrial",value:function(){return!!this.getTrialPart()}},{key:"getTieredParts",value:function(){var e=this.getEntitledParts();return e&&0<e.length?this._getTieredParts(e):e}},{key:"_getTieredParts",value:function(e){var t=[];return n.each(e,function(e){e[r.PART_TYPE]&&e[r.PART_TYPE].toLowerCase()!==r.TRIAL&&e[r.PART_TYPE].toLowerCase()!==r.BASE&&e[r.PART_NUMBER]&&e[r.PART_NUMBER].toLowerCase()==r.PART_NUMBER&&t.push(e)}),t}},{key:"getEntitledOrganization",value:function(){return this.getValueByKey(r.ENTITLED_ORGANIZATION)}},{key:"getEntitledParts",value:function(){return this.digitalContext&&this.digitalContext[r.ENTITLED_PARTS]?this.digitalContext[r.ENTITLED_PARTS]:[]}},{key:"getEntitledUser",value:function(){return this.getValueByKey(r.ENTITLED_USER)}},{key:"getThirdPartyMarketplace",value:function(){return this.getValueByKey(r.THIRD_PARTY_MARKETPLACE)}},{key:"isThirdPartyMarketplace",value:function(){var e=this.getThirdPartyMarketplace();return!n.isEmpty(e)&&e.route_indicator===r.THIRD_PARTY_MARKETPLACE_ID}},{key:"getUserOtherIdentifiers",value:function(){var e=this.getEntitledOrganization();return e&&e[r.OTHER_IDENTIFIER]}},{key:"getICN",value:function(){var e=this.getUserOtherIdentifiers();return e&&e[r.ICN]}},{key:"getOrgId",value:function(){var e=this.getUserOtherIdentifiers();return e&&e[r.ORG_ID]}},{key:"getTenantId",value:function(){if(this.digitalContext&&this.digitalContext[r.TENANT_ID])return this.digitalContext[r.TENANT_ID]}},{key:"getPartIds",value:function(){var e=this.getEntitledParts(),t=[];return e&&0<e.length&&n.each(e,function(e){t.push(e[r.PART_NUMBER])}),t}},{key:"_getLogger",value:function(){return this._logger}},{key:"_setLogger",value:function(e){e&&e.getCoreSvc(".Logger")?this._logger=e.getCoreSvc(".Logger"):this._logger=console}},{key:"getDigitalContextObject",value:function(){return this.digitalContext}},{key:"getDigitalContextObjectMock",value:function(){return e.ENTITLEMENTS}},{key:"killDcoCookie",value:function(){return this.isEnabled()?this._glassContext.getCoreSvc(".Ajax").ajax({type:"DELETE",url:r.DIGITAL_CONTEXT_URL}):Promise.resolve()}},{key:"parseJsonFromDcoCookie",value:function(e){var t,n=e.split("_json_");try{t=JSON.parse(n[1])}catch(e){this._getLogger().error("DigitalContextService Not initialized with an invalid cookie")}return t}}]),r}();return r.ACCOUNT_ID="account_id",r.BASE="base",r.BASE_URL="v1",r.DCO_COOKIE="dco",r.DIGITAL_CONTEXT_ENABLED_CONF="Glass.digitalContextEnabled",r.DIGITAL_CONTEXT_URL=r.BASE_URL+"/digitalcontext",r.ENTITLED_USER="entitled_user",r.ENTITLED_PARTS="entitled_parts",r.ENTITLED_ORGANIZATION="entitled_organization",r.ICN="ibm_customer_number",r.IS_ENABLED="enabled",r.PART_NUMBER="part_number",r.PART_TYPE="type",r.ORG_ID="org_id",r.OTHER_IDENTIFIER="other_identifier",r.SUBSCRIPTION_ID="subscription_id",r.THIRD_PARTY_MARKETPLACE="third_party_marketplace",r.THIRD_PARTY_MARKETPLACE_ID="3PM",r.TENANT_ID="tenant_id",r.TIERED_PART_NUMBER="tiered_part_number",r.TRIAL="trial",r}),define("caglass/app/services/InstrumentationConfigBuilder",[],function(){return _createClass(function e(t){if(_classCallCheck(this,e),t){var n=t.getCoreSvc(".Config"),r=t.getCoreSvc(".UserProfile"),i=t.getCoreSvc(".DigitalContext"),o=n.getInstrumentationConfig();return o&&o.enabled&&(o.whitelistedValues=o.whitelistedValues.split(","),n&&(o.versionNumber=n.getVersion()),r&&r.userAccount&&r.preferences&&(o.email=r.userAccount.email,o.capabilities=r.capabilities,o.creationTime=r.userAccount.creationTime,o.productLocale=r.preferences.productLocale),i&&i.isInitialized()&&(o.tenantId=i.getTenantId(),o.accountId=i.getOrgId(),o.accountIdType="ssmHubId",o.partIds=i.getPartIds(),o.isTrial=i.isTrial())),o}})}),define("baglass/utils/Notifier",[],function(){return function(){function e(){_classCallCheck(this,e),this.cache={}}return _createClass(e,[{key:"register",value:function(e,t){var n=this;Array.isArray(e)||(e=[e]),e.forEach(function(e){return n.cache[e]=t})}},{key:"notify",value:function(e){var t,n=this;if(this.cache.hasOwnProperty(e)){try{t=this.cache[e](e)}catch(e){return Promise.reject(e)}return(t=t||Promise.resolve()).then(function(){n.remove(e)})}return Promise.reject("Notifier::notify '".concat(e,"' not found"))}},{key:"remove",value:function(e){delete this.cache[e]}}]),e}()}),define("baglass/services/AlertBannerService",["../utils/Notifier","baglass/glass.webpack.bundle","baglass/app/services/ConfigService"],function(n,e,r){var i=e.AlertStore;return function(){function t(e){_classCallCheck(this,t),this.glassContext=e,this.store=i.create({disabled:this._isDisabled()}),this.notifier=new n}return _createClass(t,[{key:"_isDisabled",value:function(){return this.glassContext.getCoreSvc(".Config").getConfigValueSync(r.DISABLE_ALERTBANNER)}},{key:"getDisabled",value:function(){return this.store.disabled}},{key:"addAlerts",value:function(e,t){Array.isArray(e)||(e=[e]),t&&this.notifier.register(e.map(function(e){return e.id}),t),this.store.addAlerts(e)}},{key:"removeAlert",value:function(e){var t=this,n=this.store.getAlertAt(e),r=function(){t.store.removeAlert(e)};return this.notifier.notify(n.id).then(function(){r()}).catch(function(){r()})}},{key:"getStore",value:function(){return this.store}}]),t}()}),define("caglass/app/StartupCA",["jquery","baglass/app/AppController","baglass/services/OfflineOnlineService","baglass/nls/StringResources","baglass/core-client/js/core-client/utils/PerfUtils","baglass/core-client/js/core-client/utils/Utils","baglass/utils/Utils","caglass/app/services/CAUserProfileService","caglass/app/services/LogoutService","caglass/ajax/PrepareRequest","caglass/ajax/HandleError","caglass/ajax/HandleResponse","caglass/utils/CAUtils","underscore","caglass/ba-instrumentation/dist/bundle","caglass/app/services/CAFEncodingService","caglass/ajax/PrepareRequestURL","caglass/app/services/LoginService","caglass/app/services/DigitalContextService","caglass/app/services/InstrumentationConfigBuilder","baglass/services/AlertBannerService","jquery-ui","jquery-bbq"],function(v,y,m,b,_,w,C,S,P,O,E,x,M,T,A,D,j,I,L,k,R){return function(e){_.createPerformanceMark({component:"glass-foundation",name:"entry",state:"start"});var t=new y({$rootPane:v("#main"),installInfo:e.configuration.installInfo,versionInfo:e.versionInfo,authInfo:e.authInfo,perspectives:e.perspectives}),n=(window.__glassAppController=t).glassContext;n.getCoreSvc(".Config").initialize(e.configuration),n.getCoreSvc(".Taxonomy").initialize(e.taxonomy);var r=new D(n,"<'>");n.registerCoreService(".CAFEncoding",r),n.getCoreSvc(".URLEncoder").registerQSValueEncoder(r.cafEncodeQSValue.bind(r));var i=n.getCoreSvc(".Ajax");i.addRequestHandler(new O(n)),i.addRequestHandler(new j(n)),i.setErrorHandler(new E(n)),i.addResponseHandler(new x(n)),n.registerCoreService(".Login",new I(n));var o=new P;n.services.register(".Logout",o);var s=new S({glassContext:n});n.services.userProfile=s,n.services.register(".UserProfile",s);var a=new L(n);n.registerCoreService(".DigitalContext",a);var c=new A.InstrumentationService;n.registerCoreService(".Instrumentation",c);var l=new m;n.registerCoreService(".OfflineOnline",l);var u=new R(n);n.registerCoreService(".Message",u),n.gateway=window.location.pathname.substr(0,window.location.pathname.lastIndexOf("/")),t.detectAccessibilityChange();var d=T.unescape(v("#queryString_data").text()),p=C.getAppContent(d,v.param.fragment(),n),f=p.perspective,h=p.objRef,g={perspective:f,content:p};return h&&(g.id=h,g.content.objRef=h),delete g.content.module,n.getCoreSvc(".Events").on("appView:loaded",M.removeLoadingSpinner.bind(this,n),"removeLoadingSpinnerFunction"),v(document).ready(function(){window.cssVars&&window.cssVars();var e=w.getCurrentWindow();v(e).on("beforeunload",function(){return t.close(!1,!0)}.bind(this)),v(e).on("unload",function(){t.close(!0)}.bind(this))}.bind(this)),Promise.all([s.initialize(e),a.initialize()]).catch(function(e){return n.getCoreSvc(".Logger").error("Error loading UPS and DCS",e),Promise.resolve()}).then(function(){var e=new k(n);return c.initialize(n,e).then(function(){return c.enabled&&c.track({type:"Service Login"}),Promise.resolve}).catch(function(e){return n.getCoreSvc(".Logger").error("Error loading the InstrumentationService",e),Promise.resolve()})}).then(function(){return t.openAppView(f,g)}).catch(function(e){return n.getCoreSvc(".Logger").error("error while showing showing the home page",e),M.removeLoadingSpinner(n),t.showErrorMessage(b.get("errLoadingView"),b.get("CAInitTitle"))})}}),function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define("caglass/icons/ba-login-icon-bundle",[],t);else{var n=t();for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}(window,function(){return function(n){var r={};function i(e){if(r[e])return r[e].exports;var t=r[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,i),t.l=!0,t.exports}return i.m=n,i.c=r,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},i.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=0)}({0:function(e,t,n){n("f69f3cc35d9d7e069ab8"),n("c7e74f3ded7b2423ac05"),n("502bc6fc6b5a47d78dca"),n("dd7a6562fd2654d2c026"),n("ade9a0280e3f1ee6338b"),n("3849399a2893e2397738"),e.exports=n("2ea9df5638a4b723c072")},"2b419eb9b5086dc822ae":function(Dvb,Evb){var Fvb;Fvb=function(){return this}();try{Fvb=Fvb||Function("return this")()||eval("this")}catch(Dvb){"object"==typeof window&&(Fvb=window)}Dvb.exports=Fvb},"2ea9df5638a4b723c072":function(e,t,n){"use strict";n.r(t);var r=n("9689a9c94ae38b47fa2c"),i=n.n(r),o=n("9ce58a7deea14f49ef01"),s=n.n(o),a=new i.a({id:"login-TheOldPassword",use:"login-TheOldPassword-usage",viewBox:"0 0 32 32",content:'<symbol xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 32 32" id="login-TheOldPassword">\r\n<g>\r\n\t<path d="M25,1L12.611,13.388C11.785,13.138,10.908,13,10,13c-4.971,0-9,4.029-9,9s4.029,9,9,9s9-4.029,9-9\r\n\t\tc0-0.909-0.138-1.785-0.389-2.612L21,17v-2h2l8-8V1H25z M29,6.171L22.172,13H21h-2v2v1.171l-1.803,1.802l-0.848,0.848l0.348,1.147\r\n\t\tC16.898,20.63,17,21.313,17,22c0,3.86-3.141,7-7,7s-7-3.14-7-7s3.141-7,7-7c0.686,0,1.37,0.102,2.031,0.302l1.146,0.348\r\n\t\tl0.848-0.848L25.828,3H29V6.171z" />\r\n\t<circle cx="8" cy="24" r="2" />\r\n\t<rect x="19.757" y="7.5" transform="matrix(-0.7071 0.7071 -0.7071 -0.7071 46.6274 -3.3137)" width="8.485" height="1" />\r\n</g>\r\n</symbol>'});s.a.add(a),t.default=a},"3849399a2893e2397738":function(e,t,n){"use strict";n.r(t);var r=n("9689a9c94ae38b47fa2c"),i=n.n(r),o=n("9ce58a7deea14f49ef01"),s=n.n(o),a=new i.a({id:"login-TheNewPassword",use:"login-TheNewPassword-usage",viewBox:"0 0 32 32",content:'<symbol xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 32 32" id="login-TheNewPassword">\r\n<g>\r\n\t<path d="M25,1L12.611,13.388C11.785,13.138,10.908,13,10,13c-4.971,0-9,4.029-9,9s4.029,9,9,9s9-4.029,9-9\r\n\t\tc0-0.909-0.138-1.785-0.389-2.612L21,17v-2h2l8-8V1H25z M29,6.171L22.172,13H21h-2v2v1.171l-1.803,1.802l-0.848,0.848l0.348,1.147\r\n\t\tC16.898,20.63,17,21.313,17,22c0,3.86-3.141,7-7,7s-7-3.14-7-7s3.141-7,7-7c0.686,0,1.37,0.102,2.031,0.302l1.146,0.348\r\n\t\tl0.848-0.848L25.828,3H29V6.171z" />\r\n\t<circle cx="8" cy="24" r="2" />\r\n\t<rect x="19.757" y="7.5" transform="matrix(-0.7071 0.7071 -0.7071 -0.7071 46.6274 -3.3137)" width="8.485" height="1" />\r\n</g>\r\n</symbol>'});s.a.add(a),t.default=a},"502bc6fc6b5a47d78dca":function(e,t,n){"use strict";n.r(t);var r=n("9689a9c94ae38b47fa2c"),i=n.n(r),o=n("9ce58a7deea14f49ef01"),s=n.n(o),a=new i.a({id:"login-CAMPassword",use:"login-CAMPassword-usage",viewBox:"0 0 32 32",content:'<symbol xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 32 32" id="login-CAMPassword">\r\n<g>\r\n\t<path d="M25,1L12.611,13.388C11.785,13.138,10.908,13,10,13c-4.971,0-9,4.029-9,9s4.029,9,9,9s9-4.029,9-9\r\n\t\tc0-0.909-0.138-1.785-0.389-2.612L21,17v-2h2l8-8V1H25z M29,6.171L22.172,13H21h-2v2v1.171l-1.803,1.802l-0.848,0.848l0.348,1.147\r\n\t\tC16.898,20.63,17,21.313,17,22c0,3.86-3.141,7-7,7s-7-3.14-7-7s3.141-7,7-7c0.686,0,1.37,0.102,2.031,0.302l1.146,0.348\r\n\t\tl0.848-0.848L25.828,3H29V6.171z" />\r\n\t<circle cx="8" cy="24" r="2" />\r\n\t<rect x="19.757" y="7.5" transform="matrix(-0.7071 0.7071 -0.7071 -0.7071 46.6274 -3.3137)" width="8.485" height="1" />\r\n</g>\r\n</symbol>'});s.a.add(a),t.default=a},"9689a9c94ae38b47fa2c":function(e,t,n){(function(o){e.exports=function(){"use strict";var e=function(e){var t=e.id,n=e.viewBox,r=e.content;this.id=t,this.viewBox=n,this.content=r};function t(e,t){return e(t={exports:{}},t.exports),t.exports}e.prototype.stringify=function(){return this.content},e.prototype.toString=function(){return this.stringify()},e.prototype.destroy=function(){var t=this;["id","viewBox","content"].forEach(function(e){return delete t[e]})},"undefined"!=typeof window?window:void 0!==o||"undefined"!=typeof self&&self;var a=t(function(e,t){e.exports=function(){function u(e){var t=e&&"object"==typeof e;return t&&"[object RegExp]"!==Object.prototype.toString.call(e)&&"[object Date]"!==Object.prototype.toString.call(e)}function d(e,t){var n,r=t&&!0===t.clone;return r&&u(e)?f((n=e,Array.isArray(n)?[]:{}),e,t):e}function p(n,e,r){var i=n.slice();return e.forEach(function(e,t){void 0===i[t]?i[t]=d(e,r):u(e)?i[t]=f(n[t],e,r):-1===n.indexOf(e)&&i.push(d(e,r))}),i}function f(e,t,n){var r,i,o,s,a=Array.isArray(t),c=n||{arrayMerge:p},l=c.arrayMerge||p;return a?Array.isArray(e)?l(e,t,n):d(t,n):(i=t,o=n,s={},u(r=e)&&Object.keys(r).forEach(function(e){s[e]=d(r[e],o)}),Object.keys(i).forEach(function(e){u(i[e])&&r[e]?s[e]=f(r[e],i[e],o):s[e]=d(i[e],o)}),s)}return f.all=function(e,n){if(!Array.isArray(e)||e.length<2)throw new Error("first argument should be an array with at least two elements");return e.reduce(function(e,t){return f(e,t,n)})},f}()}),n=t(function(e,t){t.default={svg:{name:"xmlns",uri:"http://www.w3.org/2000/svg"},xlink:{name:"xmlns:xlink",uri:"http://www.w3.org/1999/xlink"}},e.exports=t.default}),r=n.svg,i=n.xlink,c={};return c[r.name]=r.uri,c[i.name]=i.uri,function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t;var n={isMounted:{}};return n.isMounted.get=function(){return!!this.node},t.createFromExistingNode=function(e){return new t({id:e.getAttribute("id"),viewBox:e.getAttribute("viewBox"),content:e.outerHTML})},t.prototype.destroy=function(){this.isMounted&&this.unmount(),e.prototype.destroy.call(this)},t.prototype.mount=function(e){if(this.isMounted)return this.node;var t="string"==typeof e?document.querySelector(e):e,n=this.render();return this.node=n,t.appendChild(n),n},t.prototype.render=function(){var e,t,n,r,i,o,s=this.stringify();return(r=s,void 0===r&&(r=""),e="<svg "+(o=a(c,i||{}),Object.keys(o).map(function(e){return e+'="'+o[e].toString().replace(/"/g,""")+'"'}).join(" "))+">"+r+"</svg>",t=!!document.importNode,n=(new DOMParser).parseFromString(e,"image/svg+xml").documentElement,t?document.importNode(n,!0):n).childNodes[0]},t.prototype.unmount=function(){this.node.parentNode.removeChild(this.node)},Object.defineProperties(t.prototype,n),t}(e)}()}).call(this,n("2b419eb9b5086dc822ae"))},"9ce58a7deea14f49ef01":function(e,t,n){(function(j){e.exports=function(){"use strict";function e(e,t){return e(t={exports:{}},t.exports),t.exports}"undefined"!=typeof window?window:void 0!==j||"undefined"!=typeof self&&self;var l=e(function(e,t){e.exports=function(){function u(e){var t=e&&"object"==typeof e;return t&&"[object RegExp]"!==Object.prototype.toString.call(e)&&"[object Date]"!==Object.prototype.toString.call(e)}function d(e,t){var n,r=t&&!0===t.clone;return r&&u(e)?f((n=e,Array.isArray(n)?[]:{}),e,t):e}function p(n,e,r){var i=n.slice();return e.forEach(function(e,t){void 0===i[t]?i[t]=d(e,r):u(e)?i[t]=f(n[t],e,r):-1===n.indexOf(e)&&i.push(d(e,r))}),i}function f(e,t,n){var r,i,o,s,a=Array.isArray(t),c=n||{arrayMerge:p},l=c.arrayMerge||p;return a?Array.isArray(e)?l(e,t,n):d(t,n):(i=t,o=n,s={},u(r=e)&&Object.keys(r).forEach(function(e){s[e]=d(r[e],o)}),Object.keys(i).forEach(function(e){u(i[e])&&r[e]?s[e]=f(r[e],i[e],o):s[e]=d(i[e],o)}),s)}return f.all=function(e,n){if(!Array.isArray(e)||e.length<2)throw new Error("first argument should be an array with at least two elements");return e.reduce(function(e,t){return f(e,t,n)})},f}()}),t=e(function(e,t){t.default={svg:{name:"xmlns",uri:"http://www.w3.org/2000/svg"},xlink:{name:"xmlns:xlink",uri:"http://www.w3.org/1999/xlink"}},e.exports=t.default}),n=t.svg,r=t.xlink,i={};i[n.name]=n.uri,i[r.name]=r.uri;var o,s=function(e,t){return void 0===e&&(e=""),"<svg "+(n=l(i,t||{}),Object.keys(n).map(function(e){return e+'="'+n[e].toString().replace(/"/g,""")+'"'}).join(" "))+">"+e+"</svg>";var n},a=t.svg,c=t.xlink,u={attrs:(o={style:["position: absolute","width: 0","height: 0"].join("; ")},o[a.name]=a.uri,o[c.name]=c.uri,o)},d=function(e){this.config=l(u,e||{}),this.symbols=[]};d.prototype.add=function(e){var t=this.symbols,n=this.find(e.id);return n?(t[t.indexOf(n)]=e,!1):(t.push(e),!0)},d.prototype.remove=function(e){var t=this.symbols,n=this.find(e);return!!n&&(t.splice(t.indexOf(n),1),n.destroy(),!0)},d.prototype.find=function(t){return this.symbols.filter(function(e){return e.id===t})[0]||null},d.prototype.has=function(e){return null!==this.find(e)},d.prototype.stringify=function(){var e=this.config.attrs,t=this.symbols.map(function(e){return e.stringify()}).join("");return s(t,e)},d.prototype.toString=function(){return this.stringify()},d.prototype.destroy=function(){this.symbols.forEach(function(e){return e.destroy()})};var p=function(e){var t=e.id,n=e.viewBox,r=e.content;this.id=t,this.viewBox=n,this.content=r};p.prototype.stringify=function(){return this.content},p.prototype.toString=function(){return this.stringify()},p.prototype.destroy=function(){var t=this;["id","viewBox","content"].forEach(function(e){return delete t[e]})};var f=function(e){var t=!!document.importNode,n=(new DOMParser).parseFromString(e,"image/svg+xml").documentElement;return t?document.importNode(n,!0):n},h=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t;var n={isMounted:{}};return n.isMounted.get=function(){return!!this.node},t.createFromExistingNode=function(e){return new t({id:e.getAttribute("id"),viewBox:e.getAttribute("viewBox"),content:e.outerHTML})},t.prototype.destroy=function(){this.isMounted&&this.unmount(),e.prototype.destroy.call(this)},t.prototype.mount=function(e){if(this.isMounted)return this.node;var t="string"==typeof e?document.querySelector(e):e,n=this.render();return this.node=n,t.appendChild(n),n},t.prototype.render=function(){var e=this.stringify();return f(s(e)).childNodes[0]},t.prototype.unmount=function(){this.node.parentNode.removeChild(this.node)},Object.defineProperties(t.prototype,n),t}(p),g={autoConfigure:!0,mountTo:"body",syncUrlsWithBaseTag:!1,listenLocationChangeEvent:!0,locationChangeEvent:"locationChange",locationChangeAngularEmitter:!1,usagesToUpdate:"use[*|href]",moveGradientsOutsideSymbol:!1},v=function(e){return Array.prototype.slice.call(e,0)},y=navigator.userAgent,m={isChrome:/chrome/i.test(y),isFirefox:/firefox/i.test(y),isIE:/msie/i.test(y)||/trident/i.test(y),isEdge:/edge/i.test(y)},b=function(e){return(e||window.location.href).split("#")[0]},_=function(e,n){return void 0===n&&(n="linearGradient, radialGradient, pattern"),v(e.querySelectorAll("symbol")).forEach(function(t){v(t.querySelectorAll(n)).forEach(function(e){t.parentNode.insertBefore(e,t)})}),e},w=t.xlink.uri,C="xlink:href",S=/[{}|\\\^\[\]`"<>]/g;function P(e){return e.replace(S,function(e){return"%"+e[0].charCodeAt(0).toString(16).toUpperCase()})}var O,E=["clipPath","colorProfile","src","cursor","fill","filter","marker","markerStart","markerMid","markerEnd","mask","stroke","style"],x=E.map(function(e){return"["+e+"]"}).join(","),M={MOUNT:"mount",SYMBOL_MOUNT:"symbol_mount"},T=function(c){function e(e){var t=this;void 0===e&&(e={}),c.call(this,l(g,e));var r,n=(r=r||Object.create(null),{on:function(e,t){(r[e]||(r[e]=[])).push(t)},off:function(e,t){r[e]&&r[e].splice(r[e].indexOf(t)>>>0,1)},emit:function(t,n){(r[t]||[]).map(function(e){e(n)}),(r["*"]||[]).map(function(e){e(t,n)})}});this._emitter=n,this.node=null;var i=this.config;if(i.autoConfigure&&this._autoConfigure(e),i.syncUrlsWithBaseTag){var o=document.getElementsByTagName("base")[0].getAttribute("href");n.on(M.MOUNT,function(){return t.updateUrls("#",o)})}var s,a=this._handleLocationChange.bind(this);this._handleLocationChange=a,i.listenLocationChangeEvent&&window.addEventListener(i.locationChangeEvent,a),i.locationChangeAngularEmitter&&(s=i.locationChangeEvent,angular.module("ng").run(["$rootScope",function(e){e.$on("$locationChangeSuccess",function(e,t,n){var r,i,o;r=s,i={oldUrl:n,newUrl:t},(o=document.createEvent("CustomEvent")).initCustomEvent(r,!1,!1,i),window.dispatchEvent(o)})}])),n.on(M.MOUNT,function(e){i.moveGradientsOutsideSymbol&&_(e)}),n.on(M.SYMBOL_MOUNT,function(e){var t;i.moveGradientsOutsideSymbol&&_(e.parentNode),(m.isIE||m.isEdge)&&(t=[],v(e.querySelectorAll("style")).forEach(function(e){e.textContent+="",t.push(e)}))})}c&&(e.__proto__=c),(e.prototype=Object.create(c&&c.prototype)).constructor=e;var t={isMounted:{}};return t.isMounted.get=function(){return!!this.node},e.prototype._autoConfigure=function(e){var t=this.config;void 0===e.syncUrlsWithBaseTag&&(t.syncUrlsWithBaseTag=void 0!==document.getElementsByTagName("base")[0]),void 0===e.locationChangeAngularEmitter&&(t.locationChangeAngularEmitter="angular"in window),void 0===e.moveGradientsOutsideSymbol&&(t.moveGradientsOutsideSymbol=m.isFirefox)},e.prototype._handleLocationChange=function(e){var t=e.detail,n=t.oldUrl,r=t.newUrl;this.updateUrls(n,r)},e.prototype.add=function(e){var t=c.prototype.add.call(this,e);return this.isMounted&&t&&(e.mount(this.node),this._emitter.emit(M.SYMBOL_MOUNT,e.node)),t},e.prototype.attach=function(e){var t=this,n=this;if(n.isMounted)return n.node;var r="string"==typeof e?document.querySelector(e):e;return n.node=r,this.symbols.forEach(function(e){e.mount(n.node),t._emitter.emit(M.SYMBOL_MOUNT,e.node)}),v(r.querySelectorAll("symbol")).forEach(function(e){var t=h.createFromExistingNode(e);t.node=e,n.add(t)}),this._emitter.emit(M.MOUNT,r),r},e.prototype.destroy=function(){var e=this.config,t=this.symbols,n=this._emitter;t.forEach(function(e){return e.destroy()}),n.off("*"),window.removeEventListener(e.locationChangeEvent,this._handleLocationChange),this.isMounted&&this.unmount()},e.prototype.mount=function(e,t){if(void 0===e&&(e=this.config.mountTo),void 0===t&&(t=!1),this.isMounted)return this.node;var n="string"==typeof e?document.querySelector(e):e,r=this.render();return this.node=r,t&&n.childNodes[0]?n.insertBefore(r,n.childNodes[0]):n.appendChild(r),this._emitter.emit(M.MOUNT,r),r},e.prototype.render=function(){return f(this.stringify())},e.prototype.unmount=function(){this.node.parentNode.removeChild(this.node)},e.prototype.updateUrls=function(e,t){if(!this.isMounted)return!1;var n,r,i,o,s,a,c,l,u,d,p=document.querySelectorAll(this.config.usagesToUpdate);return n=this.node,r=p,i=b(e)+"#",o=b(t)+"#",s=P(i),a=P(o),(u=n.querySelectorAll(x),d=function(e){var t=e.localName,n=e.value;return-1!==E.indexOf(t)&&-1!==n.indexOf("url("+s)},v(u).reduce(function(e,t){if(!t.attributes)return e;var n=v(t.attributes),r=n.filter(d);return e.concat(r)},[])).forEach(function(e){return e.value=e.value.replace(s,a)}),c=s,l=a,v(r).forEach(function(e){var t=e.getAttribute(C);if(t&&0===t.indexOf(c)){var n=t.replace(c,l);e.setAttributeNS(w,C,n)}}),!0},Object.defineProperties(e.prototype,t),e}(d),A=e(function(e){var t,n,r,i;e.exports=(n=[],r=document,(i=(r.documentElement.doScroll?/^loaded|^c/:/^loaded|^i|^c/).test(r.readyState))||r.addEventListener("DOMContentLoaded",t=function(){for(r.removeEventListener("DOMContentLoaded",t),i=1;t=n.shift();)t()}),function(e){i?setTimeout(e,0):n.push(e)})});window.__SVG_SPRITE__?O=window.__SVG_SPRITE__:(O=new T({attrs:{id:"__SVG_SPRITE_NODE__"}}),window.__SVG_SPRITE__=O);var D=function(){var e=document.getElementById("__SVG_SPRITE_NODE__");e?O.attach(e):O.mount(document.body,!0)};return document.body?D():A(D),O}()}).call(this,n("2b419eb9b5086dc822ae"))},ade9a0280e3f1ee6338b:function(e,t,n){"use strict";n.r(t);var r=n("9689a9c94ae38b47fa2c"),i=n.n(r),o=n("9ce58a7deea14f49ef01"),s=n.n(o),a=new i.a({id:"login-tenantid",use:"login-tenantid-usage",viewBox:"0 0 32 32",content:'<symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" id="login-tenantid">\n<path d="M16 21c5.523 0 10-4.477 10-10S21.523 1 16 1 6 5.477 6 11s4.477 10 10 10zm0-18c4.411 0 8 3.589 8 8s-3.589 8-8 8-8-3.589-8-8 3.589-8 8-8zm8 20H8a4 4 0 0 0-4 4v4h24v-4a4 4 0 0 0-4-4z" />\n</symbol>'});s.a.add(a),t.default=a},c7e74f3ded7b2423ac05:function(e,t,n){"use strict";n.r(t);var r=n("9689a9c94ae38b47fa2c"),i=n.n(r),o=n("9ce58a7deea14f49ef01"),s=n.n(o),a=new i.a({id:"login-CAMNamespace",use:"login-CAMNamespace-usage",viewBox:"0 0 32 32",content:'<symbol xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 32 32" id="login-CAMNamespace">\n<g>\n\t<g>\n\t\t<g>\n\t\t\t<path d="M24,19c-2.419,0-4.435,1.718-4.899,4h-6.201c-0.13-0.638-0.384-1.23-0.731-1.754l9.078-9.077\n\t\t\t\tC22.036,12.692,22.981,13,24,13c2.762,0,5-2.238,5-5s-2.238-5-5-5c-2.419,0-4.435,1.718-4.899,4h-6.201\n\t\t\t\tC12.436,4.718,10.419,3,8,3C5.238,3,3,5.238,3,8s2.238,5,5,5c2.419,0,4.436-1.718,4.899-4h6.201\n\t\t\t\tc0.13,0.638,0.384,1.23,0.731,1.754l-9.078,9.077C9.964,19.308,9.019,19,8,19c-2.762,0-5,2.238-5,5s2.238,5,5,5\n\t\t\t\tc2.419,0,4.436-1.718,4.899-4h6.201c0.464,2.282,2.481,4,4.899,4c2.762,0,5-2.238,5-5S26.762,19,24,19z M24,5\n\t\t\t\tc1.657,0,3,1.343,3,3s-1.343,3-3,3s-3-1.343-3-3S22.343,5,24,5z M8,11c-1.657,0-3-1.343-3-3s1.343-3,3-3s3,1.343,3,3\n\t\t\t\tS9.657,11,8,11z M8,27c-1.657,0-3-1.343-3-3s1.343-3,3-3s3,1.343,3,3S9.657,27,8,27z" />\n\t\t</g>\n\t</g>\n</g>\n</symbol>'});s.a.add(a),t.default=a},dd7a6562fd2654d2c026:function(e,t,n){"use strict";n.r(t);var r=n("9689a9c94ae38b47fa2c"),i=n.n(r),o=n("9ce58a7deea14f49ef01"),s=n.n(o),a=new i.a({id:"login-CAMUsername",use:"login-CAMUsername-usage",viewBox:"0 0 32 32",content:'<symbol xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 32 32" id="login-CAMUsername">\r\n<g>\r\n\t<path d="M16,21c5.523,0,10-4.477,10-10S21.523,1,16,1S6,5.477,6,11S10.477,21,16,21z M16,3c4.411,0,8,3.589,8,8s-3.589,8-8,8\r\n\t\ts-8-3.589-8-8S11.589,3,16,3z" />\r\n\t<path d="M24,23H8c-2.209,0-4,1.791-4,4v4h24v-4C28,24.791,26.209,23,24,23z" />\r\n</g>\r\n</symbol>'});s.a.add(a),t.default=a},f69f3cc35d9d7e069ab8:function(e,t,n){"use strict";n.r(t);var r=n("9689a9c94ae38b47fa2c"),i=n.n(r),o=n("9ce58a7deea14f49ef01"),s=n.n(o),a=new i.a({id:"error_24",use:"error_24-usage",viewBox:"0 0 24 24",content:'<symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" id="error_24"><path d="M12 1C5.9 1 1 5.9 1 12s4.9 11 11 11 11-4.9 11-11S18.1 1 12 1zm1 16h-2v-2h2v2zm0-4h-2V6h2v7z" /></symbol>'});s.a.add(a),t.default=a}})}),define("caglass/app/LoginCA",["jquery","underscore","baglass/app/AppController","caglass/ajax/CAAuthentication","baglass/nls/StringResources","baglass/core-client/js/core-client/utils/PerfUtils","baglass/core-client/js/core-client/utils/Utils","baglass/core-client/js/core-client/utils/UrlUtils","baglass/core-client/js/core-client/utils/BrowserUtils","baglass/utils/Utils","caglass/app/services/LogoutService","caglass/ajax/PrepareRequest","caglass/ajax/HandleError","caglass/utils/CAUtils","caglass/caglass.webpack.bundle","jquery-ui","jquery-bbq","../icons/ba-login-icon-bundle"],function(f,h,g,v,y,m,b,_,e,w,C,S,P,O,t){var E=t.postSecondaryLogin;return function(e){m.createPerformanceMark({component:"bi_commons",name:"entry",state:"start"});var t=new g({$rootPane:f("#main"),installInfo:e.configuration.installInfo,versionInfo:e.versionInfo,perspectives:e.perspectives}),n=(window.__glassAppController=t).glassContext;n.getCoreSvc(".Config").initialize(e.configuration);var r=n.getCoreSvc(".Ajax");r.addRequestHandler(new S(n)),r.setErrorHandler(new P(n));var i=new C;n.services.register(".Logout",i);var o=n.window||b.getCurrentWindow();n.gateway=o.location.pathname.substr(0,o.location.pathname.lastIndexOf("/")),t.detectAccessibilityChange();var s=h.unescape(f("#queryString_data").text()),a=w.getAppContent(s,f.param.fragment(),n);n.getCoreSvc(".Events").on("appView:loaded",O.removeLoadingSpinner.bind(this,n),"removeLoadingSpinnerFunction");var c,l=e.requestMethod||"GET",u=new v;if(a.legacyLogin){var d={legacyLogin:!0,redirectUrl:a.legacyLogin};c=u.legacyLogin(n,d).then(function(){o.location=a.legacyLogin})}else if(a.secondaryLogin){var p;a.state&&(p=JSON.parse(_.base64Decode(a.state))),c=u.secondaryLogin(n,p).then(function(e){return E(o,e)}).catch(function(e){return n.getCoreSvc(".Logger").error("Error showing the login prompt",e),t.showErrorMessage(y.get("unableLogin"),y.get("CAInitTitle"))})}else c=u.login(n,{initialLogin:!0,requestMethod:l,queryString:f.deparam(s)}).then(function(){if(o.external&&o.external.HasOnClose)return o.external.OnClose(0);if("POST"===l)o.location.assign(o.location.pathname+"?"+O.removeCAMNamespaceHref(s));else{var e=new window.URL(o.location.href),t=e.searchParams.get("perspective");n.isLoginViewShown()&&t===n.getCurrentPerspective()&&e.searchParams.delete("perspective"),e.pathname=e.pathname.replace("/login",""),a.CAMNamespace&&(e.href=O.removeCAMNamespaceHref(e.href)),o.location.assign(e.pathname+e.search+e.hash)}}).catch(function(e){return n.getCoreSvc(".Logger").error("Cannot login",e),t.showErrorMessage(y.get("unableLogin"),y.get("CAInitTitle"))});return c}}),define("caglass/app/services/CloudMaintenanceBannerService",["caglass/nls/StringResources"],function(i){var o="Glass.maintenanceMessage",s="Glass.maintenanceLink";return function(){function e(){_classCallCheck(this,e)}return _createClass(e,[{key:"initialize",value:function(e){if(e){var t=e.getCoreSvc(".Config");if(t[o]){var n={id:"MaintenanceMessage",title:i.get("maintenanceTitle"),message:t[o]};t[s]&&(n.action={id:s,label:i.get("maintenanceLink"),url:t[s]});var r=e.getCoreSvc(".Message");r&&r.addAlerts([n])}}}}]),e}()}),define("caglass/app/services/all",["./CAFEncodingService","./CAUserProfileService","./CloudMaintenanceBannerService","./CredentialDialogBuilder","./DigitalContextService","./InstrumentationConfigBuilder","./LoginService","./LogoutService"],function(){}),define("caglass/app/all",["./StartupCA","./LoginCA","./services/all"],function(){}),define("caglass/common/services/WhatsNewService",["underscore","baglass/app/services/ConfigService"],function(r,t){var e=function(){function n(){var t=this;_classCallCheck(this,n),this._loadMessage=function(e){t._perspectivesLoaded[e.perspective]||(t._perspectivesLoaded[e.perspective]=!0,t._getWhatsNewMessages(e.perspective))},this.dismissMessage=function(e){window.localStorage.setItem(t._getDismissalID(e),!0)}}return _createClass(n,[{key:"initialize",value:function(e){this.glassContext=e,this._perspectivesLoaded={},this.messageService=this.glassContext.getCoreSvc(".Message"),this._isDisabled()||(e.getCoreSvc(".Events").on("appView:loaded",this._loadMessage),this._getWhatsNewMessages())}},{key:"_isDisabled",value:function(){var e=this.glassContext.getCoreSvc(".Config").getConfigValueSync(t.DISABLE_WHATSNEWSERVICE);return!this.messageService||this.messageService.getDisabled()||e}},{key:"_getWhatsNewMessages",value:function(e){var n=this;return this._getMessagesAjax(e).then(function(e){var t=e.data;t&&r.isArray(t)&&0<t.length&&(t=t.filter(function(e){return!n.isMessageDismissed(e.id)}),n.messageService&&n.messageService.addAlerts(t,n.dismissMessage))})}},{key:"_getMessagesAjax",value:function(e){return this.glassContext.getCoreSvc(".Ajax").ajax({url:e?n.ENDPOINT_PATH+e:n.ENDPOINT_PATH,headers:{"accept-language":this.glassContext.getCoreSvc(".UserProfile").getProductLocale()}})}},{key:"isMessageDismissed",value:function(e){return null!=window.localStorage.getItem(this._getDismissalID(e))}},{key:"_getDismissalID",value:function(e){return e+"-"+this.glassContext.getCoreSvc(".UserProfile").getAccountID()}}]),n}();return e.ENDPOINT_PATH="v1/whatsnew/",e}),define("caglass/common/services/all",["./WhatsNewService"],function(){}),define("caglass/common/all",["./services/all"],function(){}),define("caglass/utils/all",["./CAUtils","./EntitlementObject"],function(){}),define("baglass/core-client/js/core-client/utils/Promise",["bluebird"],function(e){return e.prototype.fail=e.prototype.catch,e.prototype.done=e.prototype.then,/\b(MSIE|Trident|Edge)\b/.test(navigator.userAgent)&&e.setScheduler(function(e){setTimeout(e,0)}),Object.defineProperty(window,"Promise",{get:function(){return e},set:function(){try{throw new Error("Tried to override the global Promise object")}catch(e){console.warn(e)}}}),e}),define("baglass/core-client/js/core-client/ui/ProgressToast",["./View","underscore","jquery","toastr","../utils/Utils","../nls/StringResources","./ToastMessage","../utils/JQueryExt","jquery-ui"],function(e,h,g,v,t,y,s){return s.extend({open:!1,hide:!1,currentBar:null,progressPercentage:null,statusBars:null,_onComplete:null,REMOVE_DELAY:3e3,DEFAULT_DURATION:500,defaultOptions:{newestOnTop:!0,tapToDismiss:!1,positionClass:"toast-top-center",preventDuplicates:!1,hideDuration:500,showEasing:"swing",hideEasing:"linear",showMethod:"slideDown",hideMethod:"slideUp",onClick:function(){},iconClasses:{success:"toast-progress"}},btns:{hide:{class:"hide-action",i18n:"progressHideBtn",callback:function(e){g(e.target).blur(),this.remove(0),this.setNextTabFocus(this.$el)}},cancel:{class:"cancel",i18n:"cancel",callback:function(e){g(e.target).blur(),this.remove(0),this.setNextTabFocus(this.$el)}},details:{class:"details",i18n:"details"}},render:function(e){var o=g("<div></div>",{style:"float:right;padding-right:16px;"});h.each(this.btns,function(e,t){var n=g('<button type="button" tabIndex="0" class="toast-close-button '+e.class+'" role="button">'+y.get(e.i18n)+"</button>");e.$btn=n;var r=t.charAt(0).toUpperCase()+t.slice(1),i=e.callback||this.toastrOptions["on"+r];(h.isUndefined(i)||!0===this.toastrOptions["no"+r+"Btn"])&&this.hideButton(t),h.isFunction(i)&&this["on"+r](i.bind(this)),o.append(n)}.bind(this));var t=h.isUndefined(e)?y.get("defaultProgressMessage"):e;this.$el=v.success(h.escape(t)),this.$el.parent().removeAttr("role aria-live"),this.setMessage(t);var n=this._getUniqueId(),r=n+"Msg";this.$el.attr({id:n,"aria-labelledby":r}),this.$el.find("div.toast-close-button").attr("class","toast-buttons");var i=g("<div>",{class:"linear-bar-wrapper"}),s=g("<div>"),a=g("<div>",{class:"loading-indef-meter hidden"}),c=g("<div>",{class:"loading-indicator"}),l=g("<div>",{class:"loading-meter"}),u=g("<div>",{class:"loading-complete hidden"}),d=g("<div>",{class:"loading-pause-grey hidden"}),p=g("<div>",{}),f=g("<div>",{class:"loading-fail-grey hidden"});return s.append(c),l.append(s),i.append(l),d.append(p),i.append(d),i.append(f),i.append(a),i.append(u),this.currentBar=l,this.statusBars={progress:l,indefinite:a,pause:d,fail:f,complete:u},this.progressPercentage=0,this.$el.append(o),this.$el.append(i),g(this.$el).unbind("mouseenter mouseleave"),this.$el.find(".toast-message").attr("id",r),this.$el},show:function(e){if(!this.open)return this.open=!0,v.options=this.toastrOptions,this.render(e)},hideButton:function(e){if(h.isString(e)){var t=e.toLowerCase(),n=this.btns[t].$btn;n&&n.addClass("hidden")}},showButton:function(e){if(h.isString(e)){var t=e.toLowerCase(),n=this.btns[t].$btn;n&&n.removeClass("hidden")}},progress:function(e){var t=h.isUndefined(e)?y.get("defaultProgressMessage"):e;this.setMessage(t),this._setStatusToBar("progress"),this._changeBorderColor("progress"),this._setBarToNormal()},fail:function(e){var t=h.isUndefined(e)?y.get("defaultFailMessage"):e;this.setMessage(t),this._setStatusToBar("fail"),this._changeBorderColor("fail")},pause:function(e){var t=h.isUndefined(e)?y.get("defaultPauseMessage"):e;this.setMessage(t),this._setStatusToBar("pause"),this.currentBar.children().css("width",this.progressPercentage+"%")},indefinite:function(e){var t=h.isUndefined(e)?y.get("defaultIndefiniteMessage"):e;this.setMessage(t),this._changeBorderColor("indefinite"),this._setStatusToBar("indefinite")},setMessage:function(e){e&&(this.$el.find(".toast-message").text(e),t.activateAriaAlert(e))},onCancel:function(t){this.btns.cancel.$btn.on("primaryaction",function(e){t(e),this.open=!1}.bind(this))},onHide:function(t){this.btns.hide.$btn.on("primaryaction",function(e){t(e),this.hide=!0}.bind(this))},onDetails:function(t){this.btns.details.$btn.on("primaryaction",function(e){t(e)}.bind(this))},reset:function(){this.statusBars.progress.find("> div").css("width",0),this.progress(),this.progressPercentage=0,this.open&&(this.open=!1)},getCurrentProgress:function(){return this.progressPercentage},remove:function(t){if(this.open){var n=g("#"+this.$el.attr("id"));return t=h.isUndefined(t)?this.REMOVE_DELAY:t,new Promise(function(e){setTimeout(function(){v.clear(n),e()}.bind(this),t)})}},setComplete:function(e,i){var t;if(h.isUndefined(e))return!1;if(this.currentBar.hasClass("loading-meter")||this.progress(),!this.open||this.progressPercentage>e||100<e)return!1;h.isUndefined(i)||(t=h.isUndefined(i.duration)?this.DEFAULT_DURATION:i.duration);var n=e+"%";this.progressPercentage=e;var r={width:n},o={duration:t,easing:"swing"};return o.complete=function(){var e,t,n,r=!1;(h.isUndefined(i)||(h.isUndefined(i.completeMsg)||(e=i.completeMsg),h.isFunction(i.onComplete)&&(r=!0),n=i.isComplete,t=h.isUndefined(i.removeDelay)?this.REMOVE_DELAY:i.removeDelay),n)&&(h.isUndefined(e)&&(e=y.get("defaultCompleteMessage")),this.hide?(new s).show(e):(0<=t&&this.remove(t).then(function(){this.open=!1}.bind(this)),this._setBarToComplete(e),this._changeBorderColor("complete")));e&&this.setMessage(e),r&&i.onComplete()}.bind(this),this.$el.find(".loading-meter > div").animate(r,o),!0},_getUniqueId:function(){return this.viewId+h.uniqueId("_progress")},_setStatusToBar:function(e){this.currentBar.addClass("hidden"),this.statusBars[e].removeClass("hidden"),this.currentBar=this.statusBars[e]},_setBarToComplete:function(){this._setStatusToBar("complete"),this.btns.cancel.$btn.addClass("hidden")},_changeBorderColor:function(e){this.$el.removeClass("progress indefinite fail complete"),this.$el.addClass(e)},_setBarToNormal:function(){this._setStatusToBar("progress"),this.btns.cancel.$btn.removeClass("hidden")}})}),define("baglass/core-client/js/core-client/utils/DatasetExecutionManager",["../ui/core/Events","../nls/StringResources","../ui/ProgressToast","./Deferred","underscore"],function(e,r,n,o,s){"use strict";var t=e.extend({init:function(){t.inherited("init",this,arguments),this._backgroundExecutions={},this._pingTimeouts=[300,600,1e3,1500,2e3,4e3,6e3,1e4],this._defaultOptions={showToastWhenDone:!0}},execute:function(r){var i=new o;s.defaults(r,this._defaultOptions),this.isExecuting(r.id)&&this.cancel(r,!1);var e=Date.now();r.timestamp=e,this._backgroundExecutions[r.id]={status:"executing",timestamp:e,isRefresh:r.isRefresh},r.showToastWhenDone&&this._createProgressToast(r);var t=JSON.stringify({options:{delivery:{save:{notify:!1}}}});return r.glassContext.services.ajax.post("v1/datasets/"+r.id+"/executions",{headers:{"Content-Type":"application/vnd.ibm.bi.platform.execution+json; charset=UTF-8",Accept:"application/json"},datatype:"json",data:t}).then(function(e,t,n){this._backgroundExecutions[r.id].executionURL=n.getResponseHeader("location"),this._backgroundExecutions[r.id].eventID=e.eventID,i.resolve(),this._pingForStatus(r)}.bind(this),function(){this._rejectDeferredObjects(r,"failed"),i.reject()}.bind(this)),i.promise},_createProgressToast:function(e){var t=new n;t.show(this._getToastMessage(e)),t.indefinite(this._getToastMessage(e)),t.onCancel(function(e){this.cancel(e,!0)}.bind(this,e)),t.onHide(function(e){this._hideProgressToast(e.id)}.bind(this,e)),this._backgroundExecutions[e.id].progressToast=t},_hideProgressToast:function(e){var t=this._backgroundExecutions[e];t&&t.progressToast&&(t.progressToast.remove(0),t.progressToast=null)},_showErrorToast:function(e){var t=this._backgroundExecutions[e.id];if(e.showToastWhenDone)if(t&&t.progressToast){var n=t.progressToast;t.progressToast=null,n.fail(this._getToastMessage(e)),n.hideButton("cancel")}else e.glassContext.appController.showToast(this._getToastMessage(e),{type:"error"})},_showCancelledRefreshToast:function(e){e.glassContext.appController.showToast(this._getToastMessage(e),{type:"info"})},_pingForStatus:function(t){var n=this._backgroundExecutions[t.id];if(n&&t.timestamp===n.timestamp&&n.executionURL&&"cancelled"!==n.status)return"failed"===n.status?(this._rejectDeferredObjects(t,"failed"),void this._cleanupAfterExecutionFinished(t.id)):void(this.isExecuting(t.id)?t.glassContext.services.ajax.get(n.executionURL,{headers:{"Content-Type":"application/vnd.ibm.bi.platform.execution+json; charset=UTF-8",Accept:"application/json"},datatype:"json"}).then(function(e){n.status=e.status,this._processExecutionStatus(n.status,t)}.bind(this),function(){this._rejectDeferredObjects(t,"statusPingFailed")}):this._processExecutionStatus(n.status,t))},_processExecutionStatus:function(e,t){var n=this._backgroundExecutions[t.id];switch(e){case"complete":case"succeeded":"cancelled"===n.status?this._rejectDeferredObjects(t,"cancelled"):(this._resolveDefferedObjects(t.id),t.showToastWhenDone&&t.glassContext.appController.showToast(this._getToastMessage(t)),this.trigger("loadComplete",{id:t.id})),this._cleanupAfterExecutionFinished(t.id);break;case"cancelled":this._rejectDeferredObjects(t,"cancelled"),this._cleanupAfterExecutionFinished(t.id);break;case"failed":this._rejectDeferredObjects(t,"failed"),this._cleanupAfterExecutionFinished(t.id);break;case"executing":case"pending":var r=t.pingTimeoutIndex||0;(r+=1)>=this._pingTimeouts.length&&(r=this._pingTimeouts.length-1),t.pingTimeoutIndex=r,setTimeout(function(){this._pingForStatus(t)}.bind(this),this._pingTimeouts[r]);break;default:this._cleanupAfterExecutionFinished(t.id),console.log("Unknown status returned by "+n.executionURL+". Status of: "+e)}},_rejectDeferredObjects:function(e,t){var n=this._backgroundExecutions[e.id];n&&("failed"===(n.status=t)&&this._showErrorToast(e),n.deferredObjects&&n.deferredObjects.forEach(function(e){e.reject({status:t})}.bind(this)))},_resolveDefferedObjects:function(e){var t=this._backgroundExecutions[e];t.deferredObjects&&t.deferredObjects.forEach(function(e){e.resolve()}.bind(this))},_cleanupAfterExecutionFinished:function(e){this._hideProgressToast(e),this._backgroundExecutions[e]={status:this._backgroundExecutions[e].status}},cancel:function(e,t){this._hideProgressToast(e.id);var n=this._backgroundExecutions[e.id];n&&this.isExecuting(e.id)&&(!(n.status="cancelled")!==t&&this._showCancelledRefreshToast(e),this._rejectDeferredObjects(e,"cancelled"),n.executionURL&&e.glassContext.services.ajax.delete(n.executionURL,{headers:{"Content-Type":"application/vnd.ibm.bi.platform.execution+json; charset=UTF-8",Accept:"application/json"},datatype:"json"}))},whenComplete:function(e){var t=this.getStatus(e),n=this._backgroundExecutions[e];if(n&&"complete"!==t){if("failed"===t||"cancelled"===t){var r=new Error;return r.status=t,Promise.reject(r)}n.deferredObjects||(n.deferredObjects=[]);var i=new o;return n.deferredObjects.push(i),i.promise}return Promise.resolve()},getStatus:function(e){return this._backgroundExecutions[e]?this._backgroundExecutions[e].status:null},isExecuting:function(e){var t=this.getStatus(e);return"pending"===t||"executing"===t},_getToastMessage:function(e){var t=this._backgroundExecutions[e.id];if(!t)return"";var n="";if(t.isRefresh)switch(t.status){case"executing":case"pending":n="datasetRefreshing";break;case"complete":case"succeeded":n="datasetFinishedRefreshing";break;case"failed":n="datasetRefreshFailed";break;case"cancelled":n="datasetRefreshCancelled"}else switch(t.status){case"executing":case"pending":n="datasetLoading";break;case"complete":case"succeeded":n="datasetFinishedLoading";break;case"failed":n="datasetLoadingFailed";break;case"cancelled":n="datasetLoadingCancelled"}return r.get(n,{name:e.name})}});return new t}),define("baglass/core-client/js/core-client/utils/Downloader",["../ui/core/Class","jquery","underscore"],function(e,t,n){"use strict";var r=e.extend({init:function(e){this.fallback=!0,r.inherited("init",this,arguments),n.extend(this,e)},doDownload:function(){return this.url?(this._removeContainers(),this._useHtml5Download()?this._html5Download():this._iFrameDownload(),Promise.resolve()):(this.logger&&this.logger.error("Downloader url is undefined."),Promise.reject(new Error("Downloader url is undefined.")))},_useHtml5Download:function(){return!this.fallback||"download"in document.createElement("a")},_html5Download:function(){r.container=t("<div>").hide().on("click",function(e){e.stopPropagation()}).appendTo("body");var e=t("<a>",{target:"_blank",href:this.url,download:!this.name||this.name}).appendTo(r.container);this._fireDownload(e)},_iFrameDownload:function(){r.container=t("<iframe>").hide().attr("src",this.url).appendTo("body")},_removeContainers:function(){r.container&&(r.container.remove(),r.container=null)},_fireDownload:function(e){e.length&&e[0].click()}});return r}),define("baglass/core-client/js/core-client/utils/PromptCapabilities",[],function(){return{BOUND_RANGE:"boundRange",DEFAULT_VALUE_NOT_ACCEPTABLE:"defaultValueNotAcceptable",DISCRETE_VALUE:"discreteValue",EXCLUDE_VALUE:"excludeValues",MULTIVALUED:"multivalued",OPTIONAL:"optional",UNBOUNDED_RANGE:"unboundedRange"}}),define("baglass/core-client/js/core-client/utils/PromptManager",["../ui/core/Class","../utils/ClassFactory","underscore","jquery"],function(e,i,t,o){"use strict";var n=e.extend({init:function(){n.inherited("init",arguments),this.inProgressMap={},this.pendingPrompts=[]},promptForDataSourceSignon:function(e,t){var n="promptForSignon"+e.dataSourceName,r=this.inProgressMap[n];if(!r)if(r=t||o.Deferred(),this._isPrompting()){var i=this._getPendingPrompt(n);i?r=i.deferred:this.pendingPrompts.push({promptFunction:this.promptForDataSourceSignon.bind(this,e,r),id:n,deferred:r})}else this.inProgressMap[n]=r,this._getSignOnDialog(e,n,r);return r.promise()},_getSignOnDialog:function(e,t,n){var r={dataSourceName:e.dataSourceName,dataSourceConnectionName:e.dataSourceConnectionName,glassContext:e.glassContext,displayErrMsg:!0,promptForPasswordOnly:e.promptForPasswordOnly,isPowerCube:e.isPowerCube,onSubmit:function(){this._removeInProgress(t),n.resolve()}.bind(this),onCancel:function(){this._removeInProgress(t),n.reject()}.bind(this)};return i.instantiate("../ui/content/dialog/SignOnDialog",r).then(function(e){return e.open(),e})},_getPendingPrompt:function(e){for(var t=null,n=0;n<this.pendingPrompts.length;n++)if(this.pendingPrompts[n].id===e){t=this.pendingPrompts[n];break}return t},_executeNextPrompt:function(){0<this.pendingPrompts.length&&(this.pendingPrompts[0].promptFunction(),this.pendingPrompts.splice(0,1))},_removeInProgress:function(e){delete this.inProgressMap[e],this._executeNextPrompt()},_isPrompting:function(){return 0<Object.keys(this.inProgressMap).length}});return new n}),define("baglass/core-client/js/core-client/i18n/Locales",["require","exports","module"],function(e,t,n){return n.config()&&n.config().locales||[]}),define("baglass/core-client/js/core-client/i18n/Utils",[],function(){return{parseLocale:function(e){var t,n=-1!=e.indexOf("-")?"-":"_",r=e.split(n),i=null,o=null;function s(e){return e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()}return t=r[0].toLowerCase(),3===r.length?(i=s(r[1]),o=r[2].toUpperCase()):2===r.length&&(r[1].length<=2?o=r[1].toUpperCase():i=s(r[1])),{lang:t,script:i,region:o,toString:function(){var e=[t];return i&&e.push(i),o&&e.push(o),e.join("-")}}}}}),Object.entries||(Object.entries=function(e){for(var t=Object.keys(e),n=t.length,r=new Array(n);n--;)r[n]=[t[n],e[t[n]]];return r}),define("baglass/core-client/js/core-client/i18n/Load",["require","text!ecma402/cldr/config/availableLocales.json","underscore","module","./Locales","./Utils","text"],function(e,o,u,t,d,p){return{id:t.id,load:function(e,t,n,r){var i=this;if(r&&r.isBuild)n();else{var o=d.map(function(e){return i._resolveLocale(e)}),s=[];o.forEach(function(e){var t=p.parseLocale(e),n=t.lang;t.region&&!u.contains(o,n)&&s.push(n)});var a=["root"].concat(s,_toConsumableArray(o)),c=[];a.forEach(function(e){c.push("text!ecma402/cldr/"+e+"/custom_numbers.json"),c.push("text!ecma402/cldr/"+e+"/ca-gregorian.json")});var l=null;Promise.all(this._loadDependencies(t,c)).then(function(e){e.forEach(function(e){if(e){var t=Object.entries(e.data.main)[0][0];null===l?l=e.data.main:l[t]?Object.assign(l[t],e.data.main[t]):Object.assign(l,e.data.main)}}),n(l)}).catch(function(e){console.error("Failed to load cldr data.",e),n(l)})}},_loadDependencies:function(e,t){var i=[],o=/cldr\/([a-zA-z-]+)\//;return t.forEach(function(n){var r=n.match(o)[1];i.push(new Promise(function(t){e([n],function(e){t({data:JSON.parse(e),locale:r,path:n})},function(){t(),console.warn("Unable to load formatting resource: '"+n+"'")})}))}),i},_resolveLocale:function(e){if(e){var t=e.indexOf("-"),n=JSON.parse(o).availableLocales,r=e;if(0<t){var i=p.parseLocale(e);r=i.toString(),u.contains(n,r)||(r=u.contains(n,i.lang)?i.lang:"en")}return u.contains(n,r)||(r="en"),r}return"en"}}}),define("baglass/core-client/js/core-client/i18n/Const",[],function(){return{TOKENS:{DOW:"dddd",FULL_M:"MMMM",LONG_M:"MMM",MEDIUM_M:"MM",MO:"Mo",SHORT_M:"M",D:"D",DO:"Do",DD:"DD",Y:"Y",Y_SHORT:"YY",A:"A",ZZ:"zz"},SIZES:["full","long","medium","short"],TYPES:{numbers:"numbers",dates:"dates"}}}),define("baglass/core-client/js/core-client/i18n/FormatResources",["../ui/core/Class","./Load!","./Const","./Locales","./Utils"],function(e,n,t,r,a){return new(e.extend({init:function(){},getListSeparatorSymbol:function(e){return this._lookupResource(e,"numbers.symbols-numberSystem-latn.list")},getShortNumberFormatPatterns:function(e){return this._lookupResource(e,"numbers.decimalFormats-numberSystem-latn.short.decimalFormat")},getDateFormatPatterns:function(e){var t=this._lookupResource(e,"dates.calendars.gregorian.dateFormats");return t.short=t.short.replace(/yy/,"y"),t},getTimeFormatPatterns:function(e){return this._lookupResource(e,"dates.calendars.gregorian.timeFormats")},getDateTimeFormatPatterns:function(i){var o=this,s=this._lookupResource(i,"dates.calendars.gregorian.dateTimeFormats"),e=t.SIZES,a=/\{1\}/,c=/\{0\}/,l={};return e.forEach(function(e){var t=o.getDateFormatPatterns(i)[e],n=o.getTimeFormatPatterns(i)[e],r=s[e];l[e]=r.replace(a,t).replace(c,n)}),l},_lookupResource:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"root",t=arguments[1],n=a.parseLocale(e),r=n.lang,i=n.script,o=n.region,s=this._getResource(r+"."+t);return null===s&&(s=this._getResource("root."+t)),i&&(s=this._extendResource(s,r+"-"+i+"."+t)),i&&o&&(s=this._extendResource(s,r+"-"+i+"-"+o+"."+t)),!i&&o&&(s=this._extendResource(s,r+"-"+o+"."+t)),s},_extendResource:function(e,t){var n=this._getResource(t);return null!==n?"string"==typeof e?n:Object.assign(Object.create(e),n):e},_getResource:function(e){var t=e.split(".").reduce(function(e,t){return e?e[t]:null},n);return void 0===t?null:t}}))}),define("baglass/core-client/js/core-client/i18n/CurrencySymbols",[],function(){return{AED:{symbol:"د.إ."},ARS:{symbol:"$"},AUD:{symbol:"$",replace:"A$"},BDT:{symbol:"৳"},BRL:{symbol:"R$"},CAD:{symbol:"$",replace:"CA$"},CHF:{symbol:"Fr."},CLP:{symbol:"$"},CNY:{symbol:"¥",replace:"CN¥"},COP:{symbol:"$"},CZK:{symbol:"Kč"},DKK:{symbol:"kr"},DZD:{symbol:"د.ج."},EGP:{symbol:"ج.م."},EUR:{symbol:"€"},GBP:{symbol:"£"},HKD:{symbol:"HK$"},HUF:{symbol:"Ft"},IDR:{symbol:"Rp"},ILS:{symbol:"₪"},INR:{symbol:"₹"},IRR:{symbol:"﷼"},JPY:{symbol:"¥"},KRW:{symbol:"₩"},KZT:{symbol:"₸"},MXN:{symbol:"$"},MYR:{symbol:"RM"},NGN:{symbol:"₦"},NOK:{symbol:"kr"},PEN:{symbol:"S/."},PHP:{symbol:"₱"},PKR:{symbol:"₨"},PLN:{symbol:"zł"},RON:{symbol:"lei"},RUB:{symbol:"руб."},SAR:{symbol:"﷼"},SEK:{symbol:"kr"},SGD:{symbol:"S$"},THB:{symbol:"฿"},TRY:{symbol:"TL"},TWD:{symbol:"NT$"},UAH:{symbol:"₴"},USD:{symbol:"$",replace:"US$"},VEF:{symbol:"Bs.F."},VND:{symbol:"₫"},ZAR:{symbol:"R"}}}),define("text!baglass/core-client/js/core-client/i18n/custom/locale/ar.json",[],function(){return'{\n\t"defaultOrder": [1,1,1,1],\n\t"dateFormats": {\n "full": [\n "dddd، MMMM[ ]D[، ]Y",\n "dddd، D[ ]MMMM[، ]Y",\n "dddd، Y[ ]MMMM[ ]D"\n ],\n "long": [\n "MMMM[ ]D[، ]Y",\n "D[ ]MMMM[، ]Y",\n "Y[ ]MMMM[ ]D"\n ],\n "medium": [\n "MM[/]DD[/]Y",\n "DD[/]MM[/]Y",\n "Y[/]MM[/]DD"\n ],\n "short": [\n "M[/]D[/]Y",\n "D[/]M[/]Y",\n "Y[/]M[/]D"\n ]\n}\n}\n'}),define("text!baglass/core-client/js/core-client/i18n/custom/locale/zh-cn.json",[],function(){return'{\n\t"defaultOrder": [2,2,2,2],\n\t"dateFormats": {\n "full": [\n "M[月]D[日]Y年dddd",\n "D[日]M[月]Y年dddd",\n "Y[年]M[月]D日dddd"\n ],\n "long": [\n "M[月]D[日]Y[年]",\n "D[日]M[月]Y[年]",\n "Y[年]M[月]D[日]"\n ],\n "medium": [\n "M[月]D[日]Y[年]",\n "D[日]M[月]Y[年]",\n "Y[年]M[月]D[日]"\n ],\n "short": [\n "M[/]D[/]Y",\n "D[/]M[/]Y",\n "Y[/]M[/]D"\n ]\n}\n}\n'}),define("text!baglass/core-client/js/core-client/i18n/custom/locale/cs.json",[],function(){return'{\n\t"defaultOrder": [1,1,1,1],\n\t"dateFormats": {\n "full": [\n "dddd, MMMM[. ]D[ ]Y",\n "dddd, D[. ]MMMM[ ]Y",\n "dddd, Y[. ]MMMM[. ]D"\n ],\n "long": [\n "MMMM[. ]D[ ]Y",\n "D[. ]MMMM[ ]Y",\n "Y[. ]MMMM[. ]D"\n ],\n "medium": [\n "M[. ]D[. ]Y",\n "D[. ]M[. ]Y",\n "Y[. ]M[. ]D"\n ],\n "short": [\n "MM[.]DD[.]YY",\n "DD[.]MM[.]YY",\n "YY[.]MM[.]DD"\n ]\n}\n}\n'}),define("text!baglass/core-client/js/core-client/i18n/custom/locale/da.json",[],function(){return'{\n\t"defaultOrder": [1,1,1,1],\n\t"dateFormats": {\n "full": [\n "dddd d. MMMM[ ]D[. ]Y",\n "dddd d. D[. ]MMMM[ ]Y",\n "dddd d. Y[ ]MMMM[ ]D[.]"\n ],\n "long": [\n "MMMM[ ]D[. ]Y",\n "D[. ]MMMM[ ]Y",\n "Y[. ]MMMM[ ]D"\n ],\n "medium": [\n "MMM[ ]D[. ]Y",\n "D[. ]MMM[ ]Y",\n "Y[ ]MMM[ ]D[.]"\n ],\n "short": [\n "MM[/]DD[/]Y",\n "DD[/]MM[/]Y",\n "Y[/]MM[/]DD"\n ]\n}\n}\n'}),define("text!baglass/core-client/js/core-client/i18n/custom/locale/nl.json",[],function(){return'{\n\t"defaultOrder": [1,1,1,1],\n\t"dateFormats": {\n "full": [\n "dddd MMMM[ ]D[ ]Y",\n "dddd D[ ]MMMM[ ]Y",\n "dddd Y[ ]MMMM[ ]D"\n ],\n "long": [\n "MMMM[ ]D[ ]Y",\n "D[ ]MMMM[ ]Y",\n "Y[ ]MMMM[ ]D"\n ],\n "medium": [\n "MMM[-]D[-]Y",\n "D[-]MMM[-]Y",\n "Y[-]MMM[-]D"\n ],\n "short": [\n "M[-]D[-]YY",\n "D[-]M[-]YY",\n "YY[-]M[-]D"\n ]\n}\n}\n'}),define("text!baglass/core-client/js/core-client/i18n/custom/locale/en.json",[],function(){return'{\n\t"defaultOrder": [0,0,0,0],\n\t"dateFormats": {\n "full": [\n "dddd, MMMM[ ]D[, ]Y",\n "dddd, D[ ]MMMM[, ]Y",\n "dddd, Y[ ]MMMM[ ]D"\n ],\n "long": [\n "MMMM[ ]D[, ]Y",\n "D[ ]MMMM[, ]Y",\n "Y[ ]MMMM[ ]D"\n ],\n "medium": [\n "MMM[ ]D[, ]Y",\n "D[ ]MMM[, ]Y",\n "Y[ ]MMM[ ]D"\n ],\n "short": [\n "M[/]D[/]Y",\n "D[/]M[/]Y",\n "Y[/]M[/]D"\n ]\n}\n}\n'}),define("text!baglass/core-client/js/core-client/i18n/custom/locale/en-au.json",[],function(){return'{\n\t"defaultOrder": [1,1,1,1],\n\t"dateFormats": {\n "full": [\n "dddd, MMMM[ ]D[ ]Y",\n "dddd, D[ ]MMMM[ ]Y",\n "dddd, Y[ ]MMMM[ ]D"\n ],\n "long": [\n "MMMM[ ]D[ ]Y",\n "D[ ]MMMM[ ]Y",\n "Y[ ]MMMM[ ]D"\n ],\n "medium": [\n "MMM[ ]D[ ]Y",\n "D[ ]MMM[ ]Y",\n "Y[ ]MMM[ ]D"\n ],\n "short": [\n "M[/]D[/]YY",\n "D[/]M[/]YY",\n "YY[/]M[/]D"\n ]\n}\n}\n'}),define("text!baglass/core-client/js/core-client/i18n/custom/locale/en-ie.json",[],function(){return'{\n\t"defaultOrder": [1,1,1,1],\n\t"dateFormats": {\n "full": [\n "dddd MMMM[ ]D[ ]Y",\n "dddd D[ ]MMMM[ ]Y",\n "dddd Y[ ]MMMM[ ]D"\n ],\n "long": [\n "MMMM[ ]D[ ]Y",\n "D[ ]MMMM[ ]Y",\n "Y[ ]MMMM[ ]D"\n ],\n "medium": [\n "MMM[ ]D[ ]Y",\n "D[ ]MMM[ ]Y",\n "Y[ ]MMM[ ]D"\n ],\n "short": [\n "MM[/]DD[/]Y",\n "DD[/]MM[/]Y",\n "Y[/]MM[/]DD"\n ]\n}\n}\n'}),define("text!baglass/core-client/js/core-client/i18n/custom/locale/fo.json",[],function(){return'{\n\t"defaultOrder": [1,1,1,1],\n\t"dateFormats": {\n "full": [\n "dddd, MMMM D[.] Y",\n "dddd, D[.] MMMM Y",\n "dddd, Y MMMM D[.]"\n ],\n "long": [\n "MMMM[. ]D[ ]Y",\n "D[. ]MMMM[ ]Y",\n "Y[. ]MMMM[ ]D"\n ],\n "medium": [\n "MM[.]DD[.]Y",\n "DD[.]MM[.]Y",\n "Y[.]MM[.]DD"\n ],\n "short": [\n "MM[.]DD[.]YY",\n "DD[.]MM[.]YY",\n "YY[.]MM[.]DD"\n ]\n}\n}\n'}),define("text!baglass/core-client/js/core-client/i18n/custom/locale/fi.json",[],function(){return'{\n\t"defaultOrder": [1,1,1,1],\n\t"dateFormats": {\n "full": [\n "dddd, MMMM[ta ]D[ta ]Y",\n "dddd, D[. ]MMMM[ta ]Y",\n "dddd, Y[. ]MMMM[ta ]D"\n ],\n "long": [\n "MMMM[. ]D[ta ]Y",\n "D[. ]MMMM[ta ]Y",\n "Y[. ]MMMM[. ]D"\n ],\n "medium": [\n "M[.]D[.]Y",\n "D[.]M[.]Y",\n "Y[.]M[.]D"\n ],\n "short": [\n "M[.]D[.]Y",\n "D[.]M[.]Y",\n "Y[.]M[.]D"\n ]\n}\n}\n'}),define("text!baglass/core-client/js/core-client/i18n/custom/locale/fr-ch.json",[],function(){return'{\n\t"defaultOrder": [1,1,1,1],\n\t"dateFormats": {\n "full": [\n "dddd, MMMM[ ]D[ ]Y",\n "dddd, D[ ]MMMM[ ]Y",\n "dddd, Y[ ]MMMM[ ]D"\n ],\n "long": [\n "MMMM[ ]D[ ]Y",\n "D[ ]MMMM[ ]Y",\n "Y[ ]MMMM[ ]D"\n ],\n "medium": [\n "MMM[ ]D[ ]YY",\n "D[ ]MMM[ ]YY",\n "YY[ ]MMM[ ]D"\n ],\n "short": [\n "MM[.]DD[.]YY",\n "DD[.]MM[.]YY",\n "MM[.]DD[.]YY"\n ]\n}\n}\n'}),define("text!baglass/core-client/js/core-client/i18n/custom/locale/hu.json",[],function(){return'{\n\t"defaultOrder": [2,2,2,2],\n\t"dateFormats": {\n "full": [\n "MMMM[ ]D[. ]Y., dddd",\n "D[. ]MMMM[. ]Y., dddd",\n "Y[. ]MMMM[ ]D., dddd"\n ],\n "long": [\n "MMMM[ ]D[. ]Y[.]",\n "D[. ]MMMM[. ]Y[.]",\n "Y[. ]MMMM[ ]D[.]"\n ],\n "medium": [\n "MMM[ ]D[. ]Y[.]",\n "D[. ]MMM[ ]Y[.]",\n "Y[. ]MMM[ ]D[.]"\n ],\n "short": [\n "MM[. ]DD[. ]Y[.]",\n "DD[. ]MM[. ]Y[.]",\n "Y[. ]MM[. ]DD[.]"\n ]\n}\n}\n'}),define("text!baglass/core-client/js/core-client/i18n/custom/locale/it.json",[],function(){return'{\n\t"defaultOrder": [1,1,1,1],\n\t"dateFormats": {\n "full": [\n "dddd MMMM[ ]D[ ]Y",\n "dddd D[ ]MMMM[ ]Y",\n "dddd Y[ ]MMMM[ ]D"\n ],\n "long": [\n "MMMM[ ]DD[ ]Y",\n "DD[ ]MMMM[ ]Y",\n "Y[ ]MMMM[ ]DD"\n ],\n "medium": [\n "MMM[/]DD[/]Y[/]",\n "DD[/]MMM[/]Y",\n "Y[/]MMM[/]DD"\n ],\n "short": [\n "MM[/]DD[/]YY",\n "DD[/]MM[/]YY",\n "YY[/]MM[/]DD"\n ]\n}\n}\n'}),define("text!baglass/core-client/js/core-client/i18n/custom/locale/ja.json",[],function(){return'{\n\t"defaultOrder": [2,2,2,2],\n\t"dateFormats": {\n "full": [\n "M[月]D[日]Y年dddd",\n "D[日]M[月]Y年dddd",\n "Y[年]M[月]D日dddd"\n ],\n "long": [\n "M[月]D[日]Y[年]",\n "D[月]M[日]Y[年]",\n "Y[年]M[月]D[日]"\n ],\n "medium": [\n "MM[/]DD[/]Y",\n "DD[/]MM[/]Y",\n "Y[/]MM[/]DD"\n ],\n "short": [\n "MM[/]DD[/]YY",\n "DD[/]MM[/]YY",\n "YY[/]MM[/]DD"\n ]\n}\n}\n'}),define("text!baglass/core-client/js/core-client/i18n/custom/locale/ko.json",[],function(){return'{\n\t"defaultOrder": [2,2,2,2],\n\t"dateFormats": {\n "full": [\n "M[월 ]D[일 ]Y년 dddd",\n "D[일]M[월 ]Y년 dddd",\n "Y[년 ]M[월 ]D일 dddd"\n ],\n "long": [\n "M[월 ]D[일]Y[년]",\n "D[일]M[월 ]Y[년]",\n "Y[년 ]M[월 ]D[일]"\n ],\n "medium": [\n "M[. ]D[. ]Y[.]",\n "D[. ]M[. ]Y[.]",\n "Y[. ]M[. ]D[.]"\n ],\n "short": [\n "M[. ]D[. ]YY[.]",\n "D[. ]M[. ]YY[.]",\n "YY[. ]M[. ]D[.]"\n ]\n}\n}\n'}),define("text!baglass/core-client/js/core-client/i18n/custom/locale/nb.json",[],function(){return'{\n\t"defaultOrder": [1,1,1,1],\n\t"dateFormats": {\n "full": [\n "dddd MMMM[. ]D[ ]Y",\n "dddd D[. ]MMMM[ ]Y",\n "dddd Y[. ]MMMM[. ]D"\n ],\n "long": [\n "MMMM[. ]D[ ]Y",\n "D[. ]MMMM[ ]Y",\n "Y[. ]MMMM[. ]D"\n ],\n "medium": [\n "MMM[ ]D[. ]Y",\n "D[. ]MMM[ ]Y",\n "Y[. ]MMM[ ]D"\n ],\n "short": [\n "MM[.]DD[.]YY",\n "DD[.]MM[.]YY",\n "YY[.]MM[.]DD"\n ]\n}\n}\n'}),define("text!baglass/core-client/js/core-client/i18n/custom/locale/pl.json",[],function(){return'{\n\t"defaultOrder": [1,1,1,1],\n\t"dateFormats": {\n "full": [\n "dddd, MMMM[ ]D[ ]Y",\n "dddd, D[ ]MMMM[ ]Y",\n "dddd, Y[ ]MMMM[ ]D"\n ],\n "long": [\n "MMMM[ ]D[ ]Y",\n "D[ ]MMMM[ ]Y",\n "Y[ ]MMMM[ ]D"\n ],\n "medium": [\n "MM[-]DD[-]Y",\n "DD[-]MM[-]Y",\n "Y[-]MM[-]DD"\n ],\n "short": [\n "MM[-]DD[-]YY",\n "DD[-]MM[-]YY",\n "YY[-]MM[-]DD"\n ]\n}\n}\n'}),define("text!baglass/core-client/js/core-client/i18n/custom/locale/pt.json",[],function(){return'{\n\t"defaultOrder": [1,1,1,1],\n\t"dateFormats": {\n "full": [\n "dddd, MMMM[ de ]D[ de ]Y",\n "dddd, D[ de ]MMMM[ de ]Y",\n "dddd, Y[ de ]MMMM[ de ]D"\n ],\n "long": [\n "MMMM[ de ]D[ de ]Y",\n "D[ de ]MMMM[ de ]Y",\n "Y[ de ]MMMM[ de ]D"\n ],\n "medium": [\n "MMM[ de ]D[ de ]Y",\n "D[ de ]MMM[ de ]Y",\n "Y[ de ]MMM[ de ]D"\n ],\n "short": [\n "MM[/]DD[/]Y",\n "DD[/]MM[/]Y",\n "Y[/]MM[/]DD"\n ]\n}\n}\n'}),define("text!baglass/core-client/js/core-client/i18n/custom/locale/ru.json",[],function(){return'{\n\t"defaultOrder": [1,1,1,1],\n\t"dateFormats": {\n "full": [\n "dddd, MMMM[ ]D[ ]Y[ г.]",\n "dddd, D[ ]MMMM[ ]Y[ г.]",\n "dddd, Y[ ]MMMM[ ]D[ г.]"\n ],\n "long": [\n "MMMM[ ]D[ ]Y[ г.]",\n "D[ ]MMMM[ ]Y[ г.]",\n "Y[ ]MMMM[ ]D[ г.]"\n ],\n "medium": [\n "MMM[ ]D[ ]Y[ г.]",\n "D[ ]MMM[ ]Y[ г.]",\n "Y[ ]MMM[ ]D[ г.]"\n ],\n "short": [\n "MM[.]DD[.]YY",\n "DD[.]MM[.]YY",\n "YY[.]MM[.]DD"\n ]\n}\n}\n'}),define("text!baglass/core-client/js/core-client/i18n/custom/locale/sk.json",[],function(){return'{\n\t"defaultOrder": [1,1,1,1],\n\t"dateFormats": {\n "full": [\n "dddd MMMM[. ]D[ ]Y",\n "dddd D[. ]MMMM[ ]Y",\n "dddd Y[. ]MMMM[. ]D"\n ],\n "long": [\n "MMMM[. ]D[ ]Y",\n "D[. ]MMMM[ ]Y",\n "Y[. ]MMMM[. ]D"\n ],\n "medium": [\n "M[. ]D[. ]Y",\n "D[. ]M[. ]Y",\n "Y[. ]M[. ]D"\n ],\n "short": [\n "M[. ]D[. ]Y",\n "D[. ]M[. ]Y",\n "Y[. ]M[. ]D"\n ]\n}\n}\n'}),define("text!baglass/core-client/js/core-client/i18n/custom/locale/es.json",[],function(){return'{\n\t"defaultOrder": [1,1,1,1],\n\t"dateFormats": {\n "full": [\n "dddd, MMMM[ de ]D[ de ]Y",\n "dddd, D[ de ]MMMM[ de ]Y",\n "dddd, Y[ de ]MMMM[ de ]D"\n ],\n "long": [\n "MMMM[ de ]D[ de ]Y",\n "D[ de ]MMMM[ de ]Y",\n "Y[ de ]MMMM[ de ]D"\n ],\n "medium": [\n "MM[/]DD[/]Y",\n "DD[/]MM[/]Y",\n "Y[/]MM[/]DD"\n ],\n "short": [\n "MM[/]DD[/]YY",\n "DD[/]MM[/]YY",\n "YY[/]MM[/]DD"\n ]\n}\n}\n'}),define("text!baglass/core-client/js/core-client/i18n/custom/locale/sv.json",[],function(){return'{\n\t"defaultOrder": [1,1,1,2],\n\t"dateFormats": {\n "full": [\n "dddd MMMM[ ]D[ ]Y",\n "dddd D[ ]MMMM[ ]Y",\n "dddd Y[ ]MMMM[ ]D"\n ],\n "long": [\n "MMM[ ]D[ ]Y",\n "D[ ]MMM[ ]Y",\n "Y[ ]MMM[ ]D"\n ],\n "medium": [\n "MM[-]DD[-]Y",\n "DD[-]MM[-]Y",\n "Y[-]MM[-]DD"\n ],\n "short": [\n "MM[-]DD[-]Y",\n "DD[-]MM[-]Y",\n "Y[-]MM[-]DD"\n ]\n}\n}\n'}),define("text!baglass/core-client/js/core-client/i18n/custom/locale/tr.json",[],function(){return'{\n\t"defaultOrder": [1,1,1,1],\n\t"dateFormats": {\n "full": [\n "MMMM[ ]DD[ ]Y dddd",\n "DD[ ]MMMM[ ]Y dddd",\n "Y[ ]MMMM[ ]DD dddd"\n ],\n "long": [\n "MMMM[ ]D[ ]Y",\n "D[ ]MMMM[ ]Y",\n "Y[ ]MMMM[ ]D"\n ],\n "medium": [\n "MMM[ ]D[ ]Y",\n "D[ ]MMM[ ]Y",\n "Y[ ]MMM[ ]D"\n ],\n "short": [\n "MM[.]D[.]Y",\n "D[.]MM[.]Y",\n "Y[.]MM[.]D"\n ]\n}\n}\n'}),define("baglass/core-client/js/core-client/i18n/custom/locale/all",["text!./ar.json","text!./zh-cn.json","text!./cs.json","text!./da.json","text!./nl.json","text!./en.json","text!./en-au.json","text!./en-ie.json","text!./fo.json","text!./fi.json","text!./fr-ch.json","text!./hu.json","text!./it.json","text!./ja.json","text!./ko.json","text!./nb.json","text!./pl.json","text!./pt.json","text!./ru.json","text!./sk.json","text!./es.json","text!./sv.json","text!./tr.json"],function(e,t,n,r,i,o,s,a,c,l,u,d,p,f,h,g,v,y,m,b,_,w,C){return{no:JSON.parse(g),nono:JSON.parse(g),ar:JSON.parse(e),ardz:JSON.parse(e),arbh:JSON.parse(e),areg:JSON.parse(e),ariq:JSON.parse(e),arjo:JSON.parse(e),arkw:JSON.parse(e),arlb:JSON.parse(e),arly:JSON.parse(e),arma:JSON.parse(e),arom:JSON.parse(e),arqa:JSON.parse(e),arsa:JSON.parse(e),arsy:JSON.parse(e),artn:JSON.parse(e),arae:JSON.parse(e),arye:JSON.parse(e),zhcn:JSON.parse(t),zhhk:JSON.parse(t),zhmo:JSON.parse(t),zhsg:JSON.parse(t),zhtw:JSON.parse(t),zh:JSON.parse(t),cs:JSON.parse(n),cscz:JSON.parse(n),da:JSON.parse(r),dadk:JSON.parse(r),nl:JSON.parse(i),nlnl:JSON.parse(i),en:JSON.parse(o),envi:JSON.parse(o),enus:JSON.parse(o),or:JSON.parse(o),orin:JSON.parse(o),zu:JSON.parse(o),zuza:JSON.parse(o),enau:JSON.parse(s),ensg:JSON.parse(s),el:JSON.parse(s),elgr:JSON.parse(s),hi:JSON.parse(s),hiin:JSON.parse(s),pa:JSON.parse(s),pain:JSON.parse(s),enie:JSON.parse(a),fr:JSON.parse(a),frfr:JSON.parse(a),frlu:JSON.parse(a),ga:JSON.parse(a),gaie:JSON.parse(a),fo:JSON.parse(c),fofo:JSON.parse(c),de:JSON.parse(c),deat:JSON.parse(c),debe:JSON.parse(c),dede:JSON.parse(c),delu:JSON.parse(c),dech:JSON.parse(c),fi:JSON.parse(l),fifi:JSON.parse(l),frch:JSON.parse(u),itch:JSON.parse(u),hu:JSON.parse(d),huhu:JSON.parse(d),it:JSON.parse(p),itit:JSON.parse(p),ja:JSON.parse(f),jajp:JSON.parse(f),ko:JSON.parse(h),kokr:JSON.parse(h),nb:JSON.parse(g),nbno:JSON.parse(g),nn:JSON.parse(g),nnno:JSON.parse(g),pl:JSON.parse(v),plpl:JSON.parse(v),ro:JSON.parse(v),roro:JSON.parse(v),pt:JSON.parse(y),ptbr:JSON.parse(y),ru:JSON.parse(m),ruru:JSON.parse(m),ruua:JSON.parse(m),sk:JSON.parse(b),sksk:JSON.parse(b),es:JSON.parse(_),esar:JSON.parse(_),escr:JSON.parse(_),esdo:JSON.parse(_),esec:JSON.parse(_),essv:JSON.parse(_),esni:JSON.parse(_),espy:JSON.parse(_),eses:JSON.parse(_),esus:JSON.parse(_),esuy:JSON.parse(_),esve:JSON.parse(_),sv:JSON.parse(w),svse:JSON.parse(w),tr:JSON.parse(C),trtr:JSON.parse(C)}});var _createClass=function(){function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}();function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}define("baglass/core-client/js/core-client/i18n/custom/Date",["./locale/all"],function(c){var l={MDY:0,DMY:1,YMD:2},u="short",d={full:0,long:1,medium:2,short:3};return{getDateFormat:function(){function e(){_classCallCheck(this,e)}return _createClass(e,null,[{key:"getDateFormat",value:function(e,t){var n=t.formatLength,r=t.separator,i=t.displayOrder;n=n||u;var o=c[e]||c.en,s="";if(i=i?l[i]:o.defaultOrder[d[n]],s=o.dateFormats[n][i],r){s=s.replace(/\[[^[\]]*\]/g,function(){return r}),r="[\\^$.|?*+(){}".includes(r)?"\\\\"+r:r;var a=new RegExp("("+r+"$|^"+r+")","g");s=s.replace(a,function(){return""})}return s}}]),e}().getDateFormat}});var _slicedToArray=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var s,a=e[Symbol.iterator]();!(r=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&a.return&&a.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};define("baglass/core-client/js/core-client/i18n/Formatter",["../ui/core/Class","moment-timezone","ecma402/IntlShim","./FormatResources","./CurrencySymbols","underscore","./Const","../i18n/custom/Date"],function(e,c,s,_,l,u,a,n){var w="NumberFormat",r=0,i=20;return new(e.extend({init:function(){this.formatterCache={}},parseDecimal:function(e,t){function n(e){return e.replace(/[-[\]{}()*+?.,\\^$|]/g,"\\$&").replace(/[\s]/g,"\\s")}var r=this.formatNumber(.1,t?{locale:t}:null).substring(1,2),i=new RegExp("["+n(r)+"]"),o=new RegExp("[^\\d"+n(r)+"]","g"),s=e.replace(o,"");return Number(s.replace(i,"."))},format:function(e,t){return t?null!=e&&""!==e||!t.defaultValue?"date"===t.type||"datetime"===t.type||"time"===t.type||"lastModified"===t.type?this.formatDateTime(e,t):"year"===t.type?this.formatYear(e,t):"text"===t.type?this.formatText(e,t):this.formatNumber(e,t):t.defaultValue:this.formatNumber(e,{type:"decimal"})},formatNumber:function(e,t){if(u.isNaN(e))return"NaN";var n=e,r={style:"decimal"},i=t&&t.locale||this._getUserLocale();if(t)if("currency"===t.type){t.currencyCode&&(r.style=t.type,r.currency=t.currencyCode,r.currencyDisplay=t.currencyDisplay),r.useGrouping=t.useGrouping;var o=0;if(u.isNumber(t.minimumFractionDigits)&&(o=t.minimumFractionDigits,r.minimumFractionDigits=t.minimumFractionDigits),u.isNumber(t.maximumFractionDigits)&&(r.maximumFractionDigits=Math.max(t.maximumFractionDigits,o)),r.pattern=t.pattern,t.decimalFormatLength&&"short"===t.decimalFormatLength)return this._formatShortNumber(e,i,t)}else if("percent"===t.type)!1===t.convertPercent&&(e/=100),r.style=t.type,u.isNumber(t.minimumFractionDigits)&&(r.minimumFractionDigits=t.minimumFractionDigits),u.isNumber(t.maximumFractionDigits)&&(r.maximumFractionDigits=t.maximumFractionDigits),r.useGrouping=t.useGrouping;else if(u.extend(r,t),t.decimalFormatLength&&"short"===t.decimalFormatLength)return this._formatShortNumber(e,i,t);var s=this._getFormatter(i,r,w);if(t&&t.pattern&&(s.resolved.pattern=t.pattern),n=s.format(e),r.currency&&"code"!==t.currencyDisplay&&l[r.currency]){var a=l[r.currency].replace?l[r.currency].replace:r.currency;n=n.replace(a,l[r.currency].symbol)}if(t&&t.currencySymbol&&"code"!==t.currencyDisplay){var c=r.currency&&l[r.currency]&&l[r.currency].symbol;n=c?n.replace(c,t.currencySymbol):t.currencySymbol+n}return(n=this._addNumberLabel(n,t))&&"NaN"!==n&&"-NaN"!==n?n:e},formatDateTime:function(t,e){var n=null,r=this._getUserLocale(),i=c.tz.guess(),o="l",s="";e&&("lastModified"===(s=e.type||"")&&(e.type="datetime"),r=e.locale||r,o=this._getDateTimeFormat(r,e),i=e.timezone||i);try{if(this.isTimeOnly(t))n=c.utc("1970-01-01T"+t).locale(r).format(o);else if("lastModified"===s)n=c.utc(t,"ddd, DD MMM YYYY HH:mm:ss [GMT]").tz(i).format(o);else if("year"===s&&(o=this._getMomentDateTimeFormatOption(t,e)),"Invalid Date"===c.tz(t,i).locale(r).tz(i).format(o))n=c.tz(new Date(t),i).locale(r).tz(i).format(o);else{var a="";n=e.displayOrder||e.separator?(a=this._getCustomDateFormat(r,e),c.tz(t,i).locale(r).format(a)):c.tz(t,i).locale(r).format(o)}}catch(e){n=t}return n||t},formatYear:function(e,t){var n="l";return t&&(n=this._getMomentDateTimeFormatOption(e,t)),c(e+"010").format(n)},formatText:function(e,t){return e},_getUserLocale:function(){return requirejs.s.contexts._.config.locale||"en-us"},_getCustomDateFormat:function(e,t){var n={formatLength:t.formatLength||t.dateStyle,displayOrder:t.displayOrder,separator:t.separator};return this.getCustomDateFormat(e,n)},isTimeOnly:function(e){var t=new Date(e),n=t.getTime();return!!isNaN(n)&&(n=(t=new Date("1970-01-01T"+e)).getTime(),!isNaN(n)||(n=(t=new Date("1970-01-01T"+e+"Z")).getTime(),!isNaN(n)))},_formatShortNumber:function(e,t,n){var r=String(Math.round(Math.abs(e))),i=r.length;if(i<=3){var o={};return n.currencyCode&&(o.style="currency",o.currency=n.currencyCode),this._getFormatter(t,o,w).format(e)}var s=_.getShortNumberFormatPatterns(t),a=Object.keys(s),c=a[a.length-1],l=c.substring(0,c.indexOf("-")).length;r.length>l&&(i=l);var u=n.maximumSignificantDigits?n.maximumSignificantDigits:15<r.length?r.length-15+3:3,d=s[this._generatePatternKey(i)],p=d.lastIndexOf("0")-d.indexOf("0")+1;u<p&&(u=p);var f={maximumFractionDigits:2,maximumSignificantDigits:u};n.currencyCode&&(f.style="currency",f.currency=n.currencyCode,f.currencyDisplay=n.currencyDisplay);var h,g=this._getFormatter(t,f,w).format(e/this._getDevisionFactor(i,p));if(n.currencyCode&&!isNaN(parseInt(g.charAt(0)))){var v=g.split(/\s/),y=_slicedToArray(v,2),m=y[0],b=y[1];h=d.replace(/0+/g,m)+" "+b}else h=d.replace(/0+/g,g);return(h=this._addNumberLabel(h,n)).replace(/'/g,"")},_addNumberLabel:function(e,t){return t&&t.numberLabel&&(e=t.numberLabelPosition&&"left"===t.numberLabelPosition?t.numberLabel+e:e+t.numberLabel),e},_getDevisionFactor:function(e,t){return Math.pow(10,e-t)},_generatePatternKey:function(e){return"1"+new Array(e).join("0")+"-count-other"},_getFormatter:function(e,t,n){var r=this._getFormatTypeValidOptions(t,n),i=this._createCacheKey(e,r,n),o=this.formatterCache[i];return o||(o=new s[n](e,r),this.formatterCache[i]=o),o},_getFormatTypeValidOptions:function(e,t){var n=e;switch(t){case w:n=this._getValidNumberOptions(n)}return n},_getValidNumberOptions:function(e){var t=u.extend(e),n=function(e){u.isUndefined(t[e])||(t[e]>i?t[e]=i:t[e]<r&&(t[e]=r))};return n("minimumFractionDigits"),n("maximumFractionDigits"),t},_createCacheKey:function(e,t,n){for(var r,i=Object.keys(t).sort(),o=[n,e],s=0;s<i.length;s++)r=i[s],o.push(r,t[r]);return o.join()},isInt:function(e){return"number"==typeof e&&e%1==0},_hasTime:function(e){return e instanceof Date||this.isInt(e)||0<e.indexOf("T")||0<e.indexOf(":")},_getMomentDateTimeFormatOption:function(e,t){var n="l";if("time"===t.type||this.isTimeOnly(e))switch(t.formatLength||t.timeStyle){case"full":n="HH:mm:ss A";break;case"long":n="hh:mm:ss A";break;case"medium":n="h:m:s A";break;case"short":default:n="LT"}else if("year"===t.type)switch(t.formatLength){case"full":case"long":case"medium":n="YYYY";break;case"short":n="YY";break;default:n="YYYY"}else if("date"===t.type)switch(t.formatLength||t.dateStyle){case"full":n="LLLL";break;case"long":n="LLL";break;case"medium":n="ll";break;case"short":default:n="l"}else if("datetime"===t.type||this._hasTime(e))switch(t.formatLength||t.dateStyle){case"full":n="LLLL";break;case"long":n="LLL";break;case"medium":n="lll";break;case"short":default:n="l LT"}return n},_getDateTimeFormat:function(e,t){var n=t.formatLength||t.dateStyle||t.timeStyle||"short";-1===a.SIZES.indexOf(n)&&(n="short");var r,i,o=void 0;switch(t.type){case"time":o=_.getTimeFormatPatterns;break;case"date":o=_.getDateFormatPatterns;break;case"datetime":o=_.getDateTimeFormatPatterns;break;default:o=_.getDateTimeFormatPatterns}return r=o.call(_,e)[n],i=a.TOKENS,r=(r=(r=(r=(r=(r=(r=(r=(r=r.replace(/'[^']+'/g,function(e){return"["+(e=e.replace(/'/g,""))+"]"})).replace(/\bEEEE\b/,i.DOW)).replace(/\bcccc\b/,i.DOW)).replace(/\bdd\b/,i.DD)).replace(/\bd\b/,i.D)).replace(/\byy\b/,i.Y_SHORT)).replace(/\by\b/,i.Y)).replace(/\ba\b/,i.A)).replace(/\bzzzz\b/,i.ZZ)},getCustomDateFormat:function(e,t){return n.getDateFormat(e,t)}}))}),define("baglass/core-client/js/core-client/utils/DateTimeUtils",["moment-timezone","../i18n/Formatter","baglass/services/LogService"],function(t,o,n){return{LOCALIZED_DATE_FORMAT:{long:"ddd LL",medium:"ll",short:"l"},LOCALIZED_DATETIME_FORMAT:{long:"llll",medium:"lll",short:"l LT"},LOCALIZED_TIME_FORMAT:{long:"LTS",short:"LT"},LOCALE_MOMENT_MAP:{"zh-hans":"zh-cn","zh-hans-sg":"zh-cn","zh-sg":"zh-cn","zh-hant":"zh-tw","zh-hant-hk":"zh-tw","zh-hk":"zh-tw","zh-mo":"zh-tw"},_userTimeLocale:function(e){var t,n=e||{},r={contentLocale:n.contentLocale||"en",timeZone:n.timeZone||"America/New_York"};return void 0!==(t=this.LOCALE_MOMENT_MAP[r.contentLocale.toLowerCase()])&&(r.contentLocale=t),r},format:function(e,t,n,r){var i={type:e,locale:(r=this._userTimeLocale(r)).contentLocale,timezone:r.timeZone,formatLength:n};return o.format(t,i)},formatDate:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.format.apply(this,["date"].concat(t))},formatDateTime:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.format.apply(this,["datetime"].concat(t))},formatTime:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.format.apply(this,["time"].concat(t))},is24HrFormat:function(e){e||(new n).error("No locale provided");return-1<(t.localeData(e)||t.localeData("en")).longDateFormat("LT").indexOf("H")},getCustomDateFormat:function(e,t){return o.getCustomDateFormat(e,t)}}}),define("baglass/core-client/js/core-client/utils/all",["./Promise","./DatasetExecutionManager","./dom-utils","./Downloader","./PromptCapabilities","./PromptManager","./DateTimeUtils","./PerfUtils"],function(){}),define("baglass/core-client/js/core-client/ui/dialogs/BaseShareAndEmbedDialog",["./GenericViewDialog","jquery","../../nls/StringResources","../../utils/BrowserUtils"],function(e,n,r,t){var i=e.extend({init:function(e){var t={buttons:[{text:r.get("copyText"),handler:this.copyToClipboard.bind(this),type:"primary",defaultId:"copy_button"},"cancel"],blockerClass:"newModalDialog"};n.extend(!0,t,e),i.inherited("init",this,[t])},setFocus:function(){var e=this._container().find(".displayedURLOrCode")[0];t.isIPad()&&n(e).attr("readonly",!1),n(e).on("focus",function(){e.setSelectionRange(0,e.value.length),n(e).mouseup(function(e){e.preventDefault()})}),n(e).focus()},copyToClipboard:function(){this.setFocus(),document.execCommand("copy")},destroy:function(){i.inherited("destroy",this,arguments)}});return i}),define("baglass/core-client/js/core-client/ui/dialogs/MessageBox",["./BaseDialog","jquery","underscore"],function(e,t,n){var r=null;return r=e.extend({_buttons:["ok"],init:function(e,t,n){this._props={type:e,title:t,msg:n},this.id="com-ibm-ca-messageBoxTitle",this.contentId="com-ibm-ca-messageBoxContent",r.inherited("init",this,[this._props])},renderContent:function(e){return e.append(t("<div>",{class:"messageBox "+this._props.type,html:n.escape(this._props.msg)})),e},renderTitle:function(e){return e.text(this._props.title),e}})}),define("baglass/core-client/js/core-client/ui/dialogs/ConfirmationDialog",["./MessageBox"],function(e){var n=null;return n=e.extend({_buttons:["ok","cancel"],_confirmCallback:null,_cancelCallback:null,confirm:function(e,t){this._confirmCallback=e,this._cancelCallback=t,n.inherited("open",this)},ok:function(){n.inherited("ok",this,arguments),this._confirmCallback&&this._confirmCallback()},cancel:function(){n.inherited("cancel",this,arguments),this._cancelCallback&&this._cancelCallback()}})}),define("baglass/core-client/js/core-client/ui/dialogs/all",["./BaseDialog","./BaseShareAndEmbedDialog","./ConfirmationDialog","./GenericViewDialog","./MessageBox"],function(){}),define("baglass/core-client/js/core-client/ui/all",["./dialogs/all","./ProgressToast"],function(){}),define("baglass/core-client/js/core-client/i18n/V5Formatter",["../ui/core/Class","underscore","./Formatter"],function(e,o,i){var s={numberFormat:"number",currencyFormat:"currency",percentFormat:"percent",dateFormat:"date",dateTimeFormat:"datetime",timeFormat:"time",stringFormat:"text"},a={decimalSize:function(e){if(e.decimalSize)return{minimumFractionDigits:parseInt(e.decimalSize),maximumFractionDigits:parseInt(e.decimalSize)}},useGrouping:function(e){return o.isUndefined(e.useGrouping)?{}:{useGrouping:"true"===e.useGrouping}},currencyCode:"currencyCode",currencySymbol:"currencySymbol",useIntlSymbol:function(e){return{currencyDisplay:"true"===e.useIntlSymbol?"code":"symbol"}},dateStyle:"dateStyle",dateSeparator:"separator",displayOrder:"displayOrder",timeStyle:"timeStyle",numberLabel:"numberLabel",numberLabelPosition:"numberLabelPosition",whenMissing:function(e){if(e.whenMissing)return{defaultValue:e.whenMissing}}},n={number:["decimalSize","useGrouping","numberLabel","numberLabelPosition","whenMissing"],currency:["decimalSize","currencyCode","currencySymbol","useIntlSymbol","useGrouping","numberLabel","numberLabelPosition","whenMissing"],percent:["decimalSize","useGrouping","whenMissing"],date:["dateStyle","dateSeparator","displayOrder","whenMissing"],datetime:["dateStyle","timeStyle"],time:["timeStyle","whenMissing"],text:["whenMissing"]},t=["decimalSize","currencyCode","currencySymbol","useIntlSymbol","useGrouping","dateStyle","timeStyle","numberLabel","numberLabelPosition","whenMissing"],r=["numberFormat","currencyFormat","percentFormat","dateFormat","dateTimeFormat","timeFormat","stringFormat"];return new(e.extend({format:function(e,t,n){var r=n||t.getFormat();return r&&this.getFormatSpec(r)?i.format(e,this.getFormatSpec(n)):e},getFormatSpec:function(t){var e=null;if(t)try{var n=o.isObject(t)?t:JSON.parse(t);e=this._getFormatSpec(n)}catch(e){console.error("Invalid format spec: "+t)}return e},_getFormatSpec:function(e){var t,n=this._getFormatGroup(e),r=null;if(n)for(t in n)if(n.hasOwnProperty(t)){r=n[t];break}var i=null;return r&&t in s&&(i={type:s[t]},this._fillInSpecProperties(i,n)),i},_fillInSpecProperties:function(r,e){var i={};o.each(e,function(e){for(var t in e)i[t]=e[t]});var t=n[r.type];o.each(t,function(e){var t=a[e];if(o.isObject(t))o.extend(r,t(i));else{var n=i[e];void 0!==n&&(r[t]=n)}})},_getPropValue:function(e,t){var n=a[e];return n&&o.isFunction(n)?n(t):t[n]},_getFormatGroup:function(e){return e.formatGroup||e.format&&e.format.formatGroup},getSupportedV5Props:function(){return t},getFormatType:function(e){return s[e]},getSupportedV5Types:function(){return r}}))}),define("js/glass/bundle",function(){});
|