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