/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/

/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/

/*******************************************************************************
 * @license
 * Copyright (c) 2011, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/

/**
 * @license RequireJS domReady 2.0.1 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
 * Available via the MIT or new BSD license.
 * see: http://github.com/requirejs/domReady for details
 */

/*

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2011, 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors:
 IBM Corporation - initial API and implementation

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors:
 IBM Corporation - initial API and implementation
 RequireJS domReady 2.0.1 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
 Available via the MIT or new BSD license.
 see: http://github.com/requirejs/domReady for details

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors:
 IBM Corporation - initial API and implementation

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors:
 IBM Corporation - initial API and implementation
*/
(function(c,d){typeof define==="function"&&define.amd?define("orion/Deferred",d):typeof exports==="object"?module.exports=d():(c.orion=c.orion||{},c.orion.Deferred=d())})(this,function(){function c(){for(var g;g=b.shift();)g();a=!1}function d(g){b.push(g);a||(a=!0,setTimeout(c,0))}function i(g){return function(){g.apply(void 0,arguments)}}function h(){function g(){for(var e;e=j.shift();){var a=e.deferred,g=m==="fulfilled"?"resolve":"reject";if(typeof e[g]==="function")try{var f=(0,e[g])(c),n=f&&(typeof f===
"object"||typeof f==="function")&&f.then;if(typeof n==="function")if(f===a.promise)a.reject(new TypeError);else{var d=f.cancel;typeof d==="function"?a._protected(b).parentCancel=d.bind(f):delete a._protected(b).parentCancel;n.call(f,i(a.resolve),i(a.reject),i(a.progress))}else a.resolve(f)}catch(p){a.reject(p)}else a[g](c)}}function e(a){delete p.parentCancel;m="rejected";c=a;j.length&&d(g)}function a(b){function n(w){return function(a){i||(i=!0,w(a))}}var i=!1;delete p.parentCancel;try{var s=b&&
(typeof b==="object"||typeof b==="function")&&b.then;if(typeof s==="function")if(b===l)e(new TypeError);else{m="assumed";var u=b&&b.cancel;if(typeof u!=="function"){var q=new h,b=q.promise;try{s(q.resolve,q.reject,q.progress)}catch(r){q.reject(r)}u=b.cancel;s=b.then}c=b;s.call(b,n(a),n(e));p.parentCancel=u.bind(b)}else m="fulfilled",c=b,j.length&&d(g)}catch(w){n(e)(w)}}function n(){var a=p.parentCancel;if(a)delete p.parentCancel,a();else if(!m)a=Error("Cancel"),a.name="Cancel",e(a)}var c,m,j=[],l=
this,p={};Object.defineProperty(this,"_protected",{value:function(a){if(a!==b)throw Error("protected");return p}});this.resolve=function(b){m||a(b);return l};this.reject=function(a){m||e(a);return l};this.progress=function(a){m||j.forEach(function(b){if(b.progress)try{b.progress(a)}catch(e){}});return l.promise};this.cancel=function(){p.parentCancel?setTimeout(n,0):n();return l};this.then=function(a,e,f){a={resolve:a,reject:e,progress:f,deferred:new h};j.push(a);a.deferred._protected(b).parentCancel=
l.promise.cancel.bind(l);(m==="fulfilled"||m==="rejected")&&d(g);return a.deferred.promise};this.promise={then:l.then,cancel:l.cancel}}var b=[],a=!1;h.all=function(a,b){function f(a,b){j||(d[a]=b,--c===0&&i.resolve(d))}function n(a,g){if(!j){if(b)try{f(a,b(g));return}catch(c){g=c}i.reject(g)}}var c=a.length,d=[],j=!1,i=new h;i.then(void 0,function(){j=!0;a.forEach(function(a){a.cancel&&a.cancel()})});c===0?i.resolve(d):a.forEach(function(a,b){a.then(f.bind(void 0,b),n.bind(void 0,b))});return i.promise};
h.when=function(a,b,f,c){var d;if(!(a&&typeof a.then==="function"))d=new h,d.resolve(a),a=d.promise;return a.then(b,f,c)};return h});
define("orion/xhr",["orion/Deferred"],function(c){function d(c,d,b,a){var g=typeof b.response!=="undefined"?b.response:b.responseText,e;try{e=b.status}catch(f){e=0}c={args:d,response:g,responseText:typeof g==="string"?g:null,status:e,url:c,xhr:b};if(typeof a!=="undefined")c.error=a;return c}return function(i,h,b){var b=b||{},a=arguments.length>3&&arguments[3]?arguments[3]:new XMLHttpRequest,g=new c,e=b.headers||{},f=b.log||!1,n;typeof e["X-Requested-With"]==="undefined"&&(e["X-Requested-With"]="XMLHttpRequest");
if(typeof b.data!=="undefined"&&(i==="POST"||i==="PUT"))n=b.data;var t=!1,m=!1;g.promise.then(void 0,function(b){t=!0;!m&&b instanceof Error&&b.name==="Cancel"&&a.abort()});a.onabort=function(){m=!0;if(!t){var a=Error("Cancel");a.name="Cancel";g.reject(a)}};a.onload=function(){var c=d(h,b,a);200<=a.status&&a.status<400?g.resolve(c):(g.reject(c),f&&typeof console!=="undefined"&&console.log(Error(a.statusText)))};a.onerror=function(){var c=d(h,b,a);g.reject(c);f&&typeof console!=="undefined"&&console.log(Error(a.statusText))};
a.onprogress=function(b){b.xhr=a;g.progress(b)};try{a.open(i,h,!0);if(typeof b.responseType==="string")a.responseType=b.responseType;if(typeof b.timeout==="number")if(typeof a.timeout==="number")a.timeout=b.timeout,a.addEventListener("timeout",function(){g.reject(d(h,b,a,"Timeout exceeded"))});else{var j=setTimeout(function(){g.reject(d(h,b,a,"Timeout exceeded"))},b.timeout);g.promise.then(clearTimeout.bind(null,j),clearTimeout.bind(null,j))}Object.keys(e).forEach(function(b){a.setRequestHeader(b,
e[b])});a.send(n||null)}catch(l){g.reject(d(h,b,a,l))}return g.promise}});
(function(c,d){typeof define==="function"&&define.amd?define("orion/plugin",["orion/Deferred"],d):typeof exports==="object"?module.exports=d(require("orion/Deferred")):(c.orion=c.orion||{},c.orion.PluginProvider=d(c.orion.Deferred))})(this,function(c){function d(c,d){this.__objectId=c;this.__methods=d}return function(i){function h(a){l&&(typeof ArrayBuffer==="undefined"&&(a=JSON.stringify(a)),l===self?l.postMessage(a):l.postMessage(a,"*"))}function b(){var a=[];Object.keys(q).forEach(function(b){var c=
q[b];a.push({serviceId:b,names:c.names,methods:c.methods,properties:c.properties})});return{headers:m||{},services:a}}function a(a,b){if(b&&b instanceof XMLHttpRequest){var c,f;try{c=b.status,f=b.statusText}catch(k){c=0,f=""}return{status:c||0,statusText:f}}return b}function g(b){var c=b?JSON.parse(JSON.stringify(b,a)):b;if(b instanceof Error)c.__isError=!0,c.message=c.message||b.message,c.name=c.name||b.name;return c}function e(a){if(!l)return(new c).reject(Error("plugin not connected"));a.id=String(p++);
var b=new c;s[a.id]=b;b.then(null,function(b){j&&b instanceof Error&&b.name==="Cancel"&&r({requestId:a.id,method:"cancel",params:b.message?[b.message]:[]})});var f=Object.prototype.toString;a.params.forEach(function(c,k){if(f.call(c)==="[object Object]"&&!(c instanceof d)){var o,e;for(o in c)f.call(c[o])==="[object Function]"&&(e=e||[],e.push(o));if(e){var A=z++;u[A]=c;o=function(){delete u[A]};b.then(o,o);a.params[k]=new d(A,e)}}});r(a);return b.promise}function f(a,b){a||a===0?r({id:a,result:null,
error:b}):console.log(b)}function n(a,b,c,f){f.forEach(function(k,a){if(k&&typeof k.__objectId!=="undefined"){var b={};k.__methods.forEach(function(a){b[a]=function(){return e({objectId:k.__objectId,method:a,params:Array.prototype.slice.call(arguments)})}});f[a]=b}});var k=typeof a===void 0?null:{id:a,result:null,error:null};try{var o=c.apply(b,f);if(k)o&&typeof o.then==="function"?(v[a]=o,o.then(function(b){delete v[a];k.result=b;r(k)},function(b){if(v[a])delete v[a],k.error=g(b),r(k)},function(){r({responseId:a,
method:"progress",params:Array.prototype.slice.call(arguments)})})):(k.result=o,r(k))}catch(d){if(k)k.error=g(d),r(k)}}function t(a){if(a.source===l){a=typeof a.data!=="string"?a.data:JSON.parse(a.data);try{if(a.method){var b=a.method,c=a.params||[];if("serviceId"in a){var e=q[a.serviceId];e||f(a.id,"service not found");e=e.implementation;b in e?n(a.id,e,e[b],c):f(a.id,"method not found")}else if("objectId"in a){var k=u[a.objectId];k||f(a.id,"object not found");!b in k?n(a.id,k,k[b],c):f(a.id,"method not found")}else if("requestId"in
a){var o=v[a.requestId];o&&b==="cancel"&&o.cancel&&o.cancel.apply(o,c)}else if("responseId"in a){var d=s[a.responseId];d&&b==="progress"&&d.progress&&d.progress.apply(d,c)}else throw Error("Bad method: "+a.method);}else{var g=s[String(a.id)];delete s[String(a.id)];a.error?g.reject(a.error):g.resolve(a.result)}}catch(h){console.log("Plugin._messageHandler "+h)}}}var m=i,j=!1,l=null,p=0,z=0,x=0,v={},s={},u={},q={},r=h;this.updateHeaders=function(a){if(j)throw Error("Cannot update headers. Plugin Provider is connected");
m=a};this.registerServiceProvider=this.registerService=function(a,b,c){if(j)throw Error("Cannot register service. Plugin Provider is connected");typeof a==="string"?a=[a]:Array.isArray(a)||(a=[]);var e=null,k=[];for(e in b)typeof b[e]==="function"&&k.push(e);q[x++]={names:a,methods:k,implementation:b,properties:c||{},listeners:{}}};this.connect=function(a,c){if(!j){if(typeof window==="undefined")l=self;else if(window!==window.parent)l=window.parent;else if(window.opener!==null)l=window.opener;else{c&&
c("No valid plugin target");return}addEventListener("message",t,!1);var e={method:"plugin",params:[b()]};h(e);j=!0}a&&a()};this.disconnect=function(){j&&(removeEventListener("message",t),l=null,j=!1)}}});
define("orion/operation",["orion/xhr","orion/Deferred"],function(c,d){function i(b,a,d,e){c("GET",b,{headers:{"Orion-Version":"1"},timeout:15E3}).then(function(f){f=f.response?JSON.parse(f.response):null;a.progress(f);!f.type||f.type==="loadstart"||f.type==="progress"?setTimeout(function(){i(b,a,d,e)},2E3):(f.type==="error"||f.type==="abort"?a.reject(e?e(f):f.Result):a.resolve(d?d(f):f.Result.JsonData),f.Location||c("DELETE",b,{headers:{"Orion-Version":"1"},timeout:15E3}))},function(b){var c=b;if(b.responseText!==
void 0){c=b.responseText;try{c=JSON.parse(b.responseText)}catch(e){}}c.Message!==void 0?(c.HttpCode=c.HttpCode===void 0?b.status:c.HttpCode,c.Severity=c.Severity===void 0?"Error":c.Severity,a.reject(c)):a.reject({Severity:"Error",Message:c,HttpCode:b.status})})}function h(b,a){a.then(null,function(a){a instanceof Error&&a.name==="Cancel"&&c("PUT",b,{headers:{"Orion-Version":"1"},data:JSON.stringify({abort:!0}),timeout:15E3})})}return{handle:function(b,a,c){var e=new d;h(b,e);i(b,e,a,c);return e}}});
(function(){function c(a){if(typeof a!=="string")throw new TypeError;}function d(a){return a?a.split("&"):[]}function i(a){return a.length===0?"":a.join("&")}function h(a){var b=/([^=]*)(?:=?)(.*)/.exec(a),a=b[1]?decodeURIComponent(b[1]):"",b=b[2]?decodeURIComponent(b[2]):"";return[a,b]}function b(a){var b=encodeURIComponent(a[0]);a[1]&&(b+="="+encodeURIComponent(a[1]));return b}function a(a,b){var c="",e=[],f=0;return{next:function(){if(c!==a.query)c=a.query,e=d(c);if(f<e.length){var g=h(e[f++]);
switch(b){case "keys":return g[0];case "values":return g[1];case "keys+values":return[g[0],g[1]];default:throw new TypeError;}}throw B;}}}function g(a){Object.defineProperty(this,"_url",{get:function(){return a._url}})}function e(a){return a?/[1-9]\d*$/.exec(a)[0]:""}function f(a){var b=[];a.split("/").forEach(function(a){a===".."?b.pop():a!=="."&&b.push(a)});return b.join("/")}function n(a){return a.replace(/\s/g,function(a){return"%"+a.charCodeAt(0).toString(16)})}function t(a,b){if(typeof a!==
"string")throw new TypeError;var a=n(a),c=p.exec(a);if(!c)return null;var d={};d.scheme=c[1]||"";if(d.scheme&&!x.test(d.scheme))return null;var g=c[2];if(g&&(g=z.exec(g),d.userinfo=g[1],d.host=g[2],d.port=g[3],d.port&&!v.test(d.port)))return null;d.path=c[3];d.query=c[4];d.fragment=c[5];if(!d.scheme&&b&&(d.scheme=b.scheme,!d.host&&b.host))d.userinfo=b.userinfo,d.host=b.host,d.port=b.port,d.pathRelative=!0;if(d.pathRelative)if(d.path){if(d.path[0]!=="/")c=/^(.*\/)[^\/]*$/.exec(b.path)[1]||"/",d.path=
c+d.path}else d.path=b.path;if(d.scheme)d.scheme=d.scheme.toLowerCase();if(d.port)d.port=e(d.port);if(d.host&&d.path)d.path=f(d.path);return d}function m(a,b){var c;if(b){b=b.href||b;c=t(b);if(!c||!c.scheme)throw new SyntaxError;Object.defineProperty(this,"_baseURL",{value:c})}c=t(a,c);if(!c)throw new SyntaxError;Object.defineProperty(this,"_input",{value:a,writable:!0});Object.defineProperty(this,"_url",{value:c,writable:!0});var d=new g(this);Object.defineProperty(this,"query",{get:function(){return this._url?
d:null},enumerable:!0})}try{var j;if(typeof window.URL==="function"&&window.URL.length!==0&&(j=new window.URL("http://www.w3.org?q")).protocol==="http:"&&j.query)return}catch(l){}var p=/^(?:([^:\/?#]+):)?(?:\/\/([^\/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?$/,z=/^(?:(.*)@)?(\[[^\]]*\]|[^:]*)(?::(.*))?$/,x=/^([a-zA-Z](?:[a-zA-Z0-9+-.])*)$/,v=/^\d*$/,s=/^(\[[^\]\/?#\s]*\]|[^:\/?#\s]*)$/,u=/^(\[[^\]\/?#\s]*\]|[^:\/?#\s]*)(?::(\d*))?$/,q=/^([^?#\s]*)$/,r=/^([^\s]*)$/,w=/^\S*$/,y=/([^:]*):?(.*)/,B=typeof StopIteration!==
"undefined"?StopIteration:Error("Stop Iteration"),C={"ftp:":"21","gopher:":"70","http:":"80","https:":"443","ws:":"80","wss:":"443"};Object.defineProperties(g.prototype,{get:{value:function(a){c(a);var b;d(this._url.query).some(function(c){c=h(c);if(c[0]===a)return b=c[1],!0});return b},enumerable:!0},set:{value:function(a,e){c(a);c(e);var f=d(this._url.query);f.some(function(c,d){var g=h(c);if(g[0]===a)return g[1]=e,f[d]=b(g),!0})||f.push(b([a,e]));this._url.query=i(f)},enumerable:!0},has:{value:function(a){c(a);
return d(this._url.query).some(function(b){if(h(b)[0]===a)return!0})},enumerable:!0},"delete":{value:function(a){c(a);var b=d(this._url.query),e=b.filter(function(b){return h(b)[0]!==a});return e.length!==b.length?(this._url.query=i(e),!0):!1},enumerable:!0},clear:{value:function(){this._url.query=""},enumerable:!0},forEach:{value:function(b,c){if(typeof b!=="function")throw new TypeError;var d=a(this._url,"keys+values");try{for(;;){var e=d.next();b.call(c,e[1],e[0],this)}}catch(f){if(f!==B)throw f;
}},enumerable:!0},keys:{value:function(){return a(this._url,"keys")},enumerable:!0},values:{value:function(){return a(this._url,"values")},enumerable:!0},items:{value:function(){return a(this._url,"keys+values")}},size:{get:function(){return d(this._url.query).length},enumerable:!0},getAll:{value:function(a){c(a);var b=[];d(this._url.query).forEach(function(c){c=h(c);c[0]===a&&b.push(c[1])});return b},enumerable:!0},append:{value:function(a,e){c(a);c(e);var f=d(this._url.query);f.push(b([a,e]));this._url.query=
i(f)},enumerable:!0}});Object.defineProperties(m.prototype,{href:{get:function(){var a;if(this._url){a=this._url;var b=a.scheme?a.scheme+":":"";a.host&&(b+="//",a.userinfo&&(b+=a.userinfo+"@"),b+=a.host,a.port&&(b+=":"+a.port));b+=a.path;a.query&&(b+="?"+a.query);a.fragment&&(b+="#"+a.fragment);a=b}else a=this._input;return a},set:function(a){c(a);this._input=a;this._url=t(this._input,this._baseURL)},enumerable:!0},origin:{get:function(){return this._url&&this._url.host?this.protocol+"//"+this.host:
""},enumerable:!0},protocol:{get:function(){return this._url?this._url.scheme+":":":"},set:function(a){c(a);if(this._url&&(a=a.slice(-1)===":"?a.substring(0,a.length-1):a,a===""||x.test(a)))this._url.scheme=a.toLowerCase()},enumerable:!0},_userinfo:{get:function(){return this._url?this._url.userinfo:""},set:function(a){c(a);if(this._url)this._url.userinfo=a}},username:{get:function(){if(!this._url)return"";var a=y.exec(this._userinfo);return decodeURIComponent(a[1]||"")},set:function(a){c(a);if(this._url){var b=
y.exec(this._userinfo),a=[encodeURIComponent(a||"")];b[2]&&a.push(b[2]);this._userinfo=a.join(":")}},enumerable:!0},password:{get:function(){if(!this._url)return"";var a=y.exec(this._userinfo);return decodeURIComponent(a[2]||"")},set:function(a){c(a);if(this._url){var b=[y.exec(this._userinfo)[1]||""];a&&b.push(encodeURIComponent(a));this._userinfo=b.join(":")}},enumerable:!0},host:{get:function(){var a="";this._url&&this._url.host&&(a+=this._url.host,this._url.port&&(a+=":"+this._url.port));return a},
set:function(a){c(a);if(this._url&&(a=u.exec(a)))this._url.host=a[1],this._url.port=e(a[2])},enumerable:!0},hostname:{get:function(){return this._url?this._url.host:""},set:function(a){c(a);if(this._url&&s.exec(a))this._url.host=a},enumerable:!0},port:{get:function(){var a=this._url?this._url.port||"":"";a&&a===C[this.protocol]&&(a="");return a},set:function(a){c(a);if(this._url&&v.exec(a))this._url.port=e(a)},enumerable:!0},pathname:{get:function(){return this._url?this._url.path:""},set:function(a){c(a);
if(this._url&&q.exec(a))this._url.host&&a&&a[0]!=="/"&&(a="/"+a),this._url.path=a?f(a):""},enumerable:!0},search:{get:function(){return this._url&&this._url.query?"?"+this._url.query:""},set:function(a){c(a);if(this._url&&(a&&a[0]==="?"&&(a=a.substring(1)),r.exec(a)))this._url.query=a},enumerable:!0},hash:{get:function(){return this._url&&this._url.fragment?"#"+this._url.fragment:""},set:function(a){c(a);if(this._url&&(a&&a[0]==="#"&&(a=a.substring(1)),w.exec(a)))this._url.fragment=a},enumerable:!0}});
if((j=window.URL||window.webkitURL)&&j.createObjectURL)Object.defineProperty(m,"createObjectURL",{value:j.createObjectURL.bind(j),enumerable:!1}),Object.defineProperty(m,"revokeObjectURL",{value:j.revokeObjectURL.bind(j),enumerable:!1});window.URL=m})();define("orion/URL-shim",function(){});
define("domReady",[],function(){function c(){if(!g){g=!0;b&&clearInterval(b);var a=f;if(g&&a.length){f=[];var c;for(c=0;c<a.length;c+=1)a[c](e)}}}function d(a){g?a(e):f.push(a);return d}var i,h,b,a=typeof window!=="undefined"&&window.document,g=!a,e=a?document:null,f=[];if(a){if(document.addEventListener)document.addEventListener("DOMContentLoaded",c,!1),window.addEventListener("load",c,!1);else if(window.attachEvent){window.attachEvent("onload",c);h=document.createElement("div");try{i=window.frameElement===
null}catch(n){}h.doScroll&&i&&window.external&&(b=setInterval(function(){try{h.doScroll(),c()}catch(a){}},30))}document.readyState==="complete"&&c()}d.version="2.0.1";d.load=function(a,b,c,e){e.isBuild?c(null):d(c)};return d});
define('built-taskPlugin.js',"orion/xhr,orion/plugin,orion/operation,orion/Deferred,orion/URL-shim,domReady!".split(","),function(c,d,i,h){function b(c){c&&typeof c==="object"&&Object.keys(c).forEach(function(d){var g=c[d];d.indexOf("Location")!==-1?(a.href=g,c[d]=a.href):b(g)});return c}var a=document.createElement("a");a.href="../mixloginstatic/LoginWindow.html";d=new d({name:"Orion Task Management Service",version:"1.0",description:"This plugin provides access to the tasks a user is currently running or ran recently, and provides management of those tasks.",
login:a.href});a.href="../task";var g=function(a){try{if(window.location.host===parent.location.host&&window.location.protocol===parent.location.protocol)return a.substring(parent.location.href.indexOf(parent.location.host)+parent.location.host.length)}catch(b){}return a}(a.href);d.registerService("orion.core.operation",{getOperations:function(a){var d=new URL(g,window.location);a&&typeof a==="object"&&Object.keys(a).forEach(function(b){d.query.set(b,a[b])});return c("GET",d.href,{headers:{"Orion-Version":"1"},
timeout:a.Longpolling?7E4:15E3}).then(function(a){a=a.response?JSON.parse(a.response):null;b(a);return a})},getOperation:function(a){return i.handle(a)},removeCompletedOperations:function(){return c("DELETE",g,{headers:{"Orion-Version":"1"},timeout:15E3}).then(function(a){a=a.response?JSON.parse(a.response):null;b(a);return a})},removeOperation:function(a){var d=new h;c("DELETE",a,{headers:{"Orion-Version":"1"},timeout:15E3}).then(function(a){a=a.response?JSON.parse(a.response):null;b(a);d.resolve(a)},
function(a){var b=a;if(a.responseText){b=a.responseText;try{b=JSON.parse(a.responseText)}catch(c){}}b.Message?d.reject(b):d.reject({Severity:"Error",Message:b})});return d}},{name:"Tasks",pattern:g});d.connect()});