@openfin/workspace-platform 10.3.0 → 10.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/990.js CHANGED
@@ -1,2 +1,2 @@
1
- (globalThis.webpackChunk_openfin_workspace_platform=globalThis.webpackChunk_openfin_workspace_platform||[]).push([[990],{7:e=>{var t;self,t=()=>{return e={17187:e=>{"use strict";var t,n="object"==typeof Reflect?Reflect:null,i=n&&"function"==typeof n.apply?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var r=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}e.exports=o,e.exports.once=function(e,t){return new Promise((function(n,i){function r(n){e.removeListener(t,o),i(n)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",r),n([].slice.call(arguments))}m(e,t,o,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&m(e,"error",t,{once:!0})}(e,r)}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var s=10;function a(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function u(e,t,n,i){var r,o,s,u;if(a(n),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),s=o[t]),void 0===s)s=o[t]=n,++e._eventsCount;else if("function"==typeof s?s=o[t]=i?[n,s]:[s,n]:i?s.unshift(n):s.push(n),(r=c(e))>0&&s.length>r&&!s.warned){s.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=s.length,u=l,console&&console.warn&&console.warn(u)}return e}function l(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(e,t,n){var i={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},r=l.bind(i);return r.listener=n,i.wrapFn=r,r}function p(e,t,n){var i=e._events;if(void 0===i)return[];var r=i[t];return void 0===r?[]:"function"==typeof r?n?[r.listener||r]:[r]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(r):v(r,r.length)}function d(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function v(e,t){for(var n=new Array(t),i=0;i<t;++i)n[i]=e[i];return n}function m(e,t,n,i){if("function"==typeof e.on)i.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function r(o){i.once&&e.removeEventListener(t,r),n(o)}))}}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e||e<0||r(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");s=e}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||r(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},o.prototype.getMaxListeners=function(){return c(this)},o.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r="error"===e,o=this._events;if(void 0!==o)r=r&&void 0===o.error;else if(!r)return!1;if(r){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var c=o[e];if(void 0===c)return!1;if("function"==typeof c)i(c,this,t);else{var u=c.length,l=v(c,u);for(n=0;n<u;++n)i(l[n],this,t)}return!0},o.prototype.addListener=function(e,t){return u(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return u(this,e,t,!0)},o.prototype.once=function(e,t){return a(t),this.on(e,f(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,f(this,e,t)),this},o.prototype.removeListener=function(e,t){var n,i,r,o,s;if(a(t),void 0===(i=this._events))return this;if(void 0===(n=i[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete i[e],i.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(r=-1,o=n.length-1;o>=0;o--)if(n[o]===t||n[o].listener===t){s=n[o].listener,r=o;break}if(r<0)return this;0===r?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,r),1===n.length&&(i[e]=n[0]),void 0!==i.removeListener&&this.emit("removeListener",e,s||t)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(e){var t,n,i;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var r,o=Object.keys(n);for(i=0;i<o.length;++i)"removeListener"!==(r=o[i])&&this.removeAllListeners(r);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(i=t.length-1;i>=0;i--)this.removeListener(e,t[i]);return this},o.prototype.listeners=function(e){return p(this,e,!0)},o.prototype.rawListeners=function(e){return p(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):d.call(e,t)},o.prototype.listenerCount=d,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},54456:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DeferredPromise=class{constructor(){const e=new Promise(((e,t)=>{this._resolve=e,this._reject=t}));this._promise=e}get promise(){return this._promise}get resolve(){return this._resolve}get reject(){return this._reject}}},16272:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(54456);async function r(e,t){let n=0;for(const i of e)await t(i,n,e),n++}async function o(e,t){await Promise.all(e.map(t))}function s(e,t,n){const r=new i.DeferredPromise,o=e.add(((...e)=>{t(...e)&&(o.remove(),r.resolve())}));return n&&n.catch((e=>{o.remove(),r.reject(e)})),a(r.promise)}function a(e){return e.catch((()=>{})),e}t.serialForEach=r,t.serialMap=async function(e,t){const n=[];return await r(e,(async(e,i,r)=>{n.push(await t(e,i,r))})),n},t.serialFilter=async function(e,t){const n=[];return await r(e,(async(e,i,r)=>{await t(e,i,r)&&n.push(e)})),n},t.parallelForEach=o,t.parallelMap=async function(e,t){const n=[];return await o(e,(async(e,i,r)=>{n[i]=await t(e,i,r)})),n},t.parallelFilter=async function(e,t){const n=[];return await o(e,(async(e,i,r)=>{n[i]=await t(e,i,r)})),e.filter(((e,t)=>n[t]))},t.withStrictTimeout=function(e,t,n){const i=new Promise(((t,i)=>setTimeout((()=>i(new Error(n))),e)));return a(Promise.race([i,t]))},t.withTimeout=function(e,t){const n=new Promise((t=>setTimeout((()=>t([!0,void 0])),e))),i=t.then((e=>[!1,e]));return Promise.race([n,i])},t.untilTrue=function(e,t,n){return t()?Promise.resolve():s(e,t,n)},t.untilSignal=s,t.allowReject=a},95881:(e,t,n)=>{"use strict";function i(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),i(n(16272)),i(n(54456))},29140:e=>{e.exports=function(e,t){for(var n=e.split("."),i=t.split("."),r=0;r<3;r++){var o=Number(n[r]),s=Number(i[r]);if(o>s)return 1;if(s>o)return-1;if(!isNaN(o)&&isNaN(s))return 1;if(isNaN(o)&&!isNaN(s))return-1}return 0}},47924:function(e,t){"use strict";var n=this&&this.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.EventRouter=void 0,t.EventRouter=class{constructor(e){this._emitterProviders={},this._deserializers={},this._defaultEmitter=e}registerEmitterProvider(e,t){this._emitterProviders[e]=t}registerDeserializer(e,t){this._deserializers[e]=t}dispatchEvent(e){const{type:t,target:i}=e,r=n(e,["type","target"]);let o;if(!i)throw new Error("Invalid event, no target specified");if("default"===i)o=this._defaultEmitter;else{if(!this._emitterProviders[i.type])throw new Error(`Invalid target, no provider registered for '${i.type}'`);o=this._emitterProviders[i.type](i.id)}const s=Object.assign({type:t},r),a=this._deserializers[t];a?o.emit(t,a(s)):o.emit(t,s)}}},85400:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ActionBodyClickType=t.ActionNoopType=t.ActionTrigger=void 0,(n=t.ActionTrigger||(t.ActionTrigger={})).CONTROL="control",n.SELECT="select",n.CLOSE="close",n.EXPIRE="expire",n.PROGRAMMATIC="programmatic",(t.ActionNoopType||(t.ActionNoopType={})).EVENT_DISMISS="event_dismiss",(t.ActionBodyClickType||(t.ActionBodyClickType={})).DISMISS_EVENT="dismiss_event"},53595:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getEventRouter=t.tryServiceDispatch=t.getServicePromise=t.eventEmitter=void 0;const i=n(17187),r=n(95881),o=n(84666),s=n(47924);let a;t.eventEmitter=new i.EventEmitter;const c=new r.DeferredPromise;let u,l=!1;async function f(){if(window.navigator.appVersion.includes("Windows"))try{const e=await fin.System.getRvmInfo();parseInt(e.version.split(".")[0])>=6&&(fin.System.launchManifest?fin.System.launchManifest("fins://system-apps/notification-center",{noUi:!0}).catch((e=>{console.error("Unable to launch the Notification Center as a system app",e)})):fin.System.openUrlWithBrowser("fins://system-apps/notification-center").catch((()=>{})))}catch(e){}else fin.System.openUrlWithBrowser("fins://system-apps/notification-center")}async function p(){var e;if(await c.promise,!a){if("undefined"==typeof fin){const e="fin is not defined. The openfin-notifications module is only intended for use in an OpenFin application.";return a=Promise.reject(new Error(e)),a}fin.System.getVersion().then((e=>{const t=parseInt(e.split(".")[2]);t<53&&console.warn(`API version ${t} of OpenFin version ${e} is less than 53. Please upgrade the runtime version.`)}));const{name:t,uuid:n}=null!==(e=fin.me.identity)&&void 0!==e?e:fin.Window.me;if(n===o.SERVICE_IDENTITY.uuid&&t===o.SERVICE_IDENTITY.name)a=Promise.reject(new Error("Trying to connect to provider from provider"));else{const e=window.setTimeout((()=>{console.warn("Taking a long time to connect to Notifications service. Is the Notifications service running?")}),5e3);a=fin.InterApplicationBus.Channel.connect(o.SERVICE_CHANNEL,{wait:!0,payload:{version:"1.18.0-alpha-1519"}}).then((t=>{window.clearTimeout(e);const n=d();return t.register("WARN",(e=>console.warn(e))),t.register("event",(e=>{n.dispatchEvent(e)})),t.setDefaultAction((()=>!1)),t.onDisconnection((()=>{console.warn("Disconnected from Notifications service"),l=!0,a=null,f(),setTimeout((()=>{p()}),300)})),t}))}}return a}function d(){return u||(u=new s.EventRouter(t.eventEmitter)),u}"undefined"!=typeof fin&&"undefined"!=typeof window&&(f(),p(),"loading"!==document.readyState?c.resolve():(window.addEventListener("DOMContentLoaded",(()=>{c.resolve()})),document.addEventListener("DOMContentLoaded",(()=>{c.resolve()})))),t.getServicePromise=p,t.tryServiceDispatch=async function(e,t){return(await p()).dispatch(e,t)},t.getEventRouter=d},4575:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},176:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FieldType=void 0,t.FieldType={string:"string",number:"number",boolean:"boolean"}},93407:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),r(n(176),t),r(n(49725),t)},49725:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WidgetType=t.BooleanWidgetType=t.NumberWidgetType=t.StringWidgetType=void 0,t.StringWidgetType={Text:"Text"},t.NumberWidgetType={Number:"Number"},t.BooleanWidgetType={Toggle:"Toggle",Checkbox:"Checkbox"},t.WidgetType=Object.assign(Object.assign(Object.assign({},t.StringWidgetType),t.NumberWidgetType),t.BooleanWidgetType)},3771:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=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)&&i(t,e,n);return r(t,e),t},s=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)},a=this&&this.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.getNotificationsCount=t.hide=t.show=t.toggleNotificationCenter=t.clearAll=t.getAll=t.clear=t.update=t.create=t.removeEventListener=t.addEventListener=t.VERSION=t.NotificationIndicatorType=t.IndicatorColor=t.NotificationIndicator=t.NotificationOptions=t.provider=void 0;const c=n(85400),u=n(53595),l=n(84666),f=o(n(14045));t.provider=f;const p=n(10314),d=n(43392);Object.defineProperty(t,"NotificationIndicator",{enumerable:!0,get:function(){return d.NotificationIndicator}}),Object.defineProperty(t,"NotificationIndicatorType",{enumerable:!0,get:function(){return d.IndicatorType}}),Object.defineProperty(t,"IndicatorColor",{enumerable:!0,get:function(){return d.IndicatorColor}});const v=n(69695);Object.defineProperty(t,"NotificationOptions",{enumerable:!0,get:function(){return v.NotificationOptions}}),s(n(85400),t),s(n(4575),t),s(n(69742),t),s(n(93407),t),s(n(78985),t),s(n(95482),t),s(n(23310),t),t.VERSION="1.18.0-alpha-1519";const m=(0,u.getEventRouter)();function y(e){const{notification:t}=e;return Object.assign(Object.assign({},e),{notification:Object.assign(Object.assign({},t),{date:new Date(t.date),expires:null!==t.expires?new Date(t.expires):null})})}m.registerDeserializer("notification-created",(e=>y(e))),m.registerDeserializer("notification-toast-dismissed",(e=>y(e))),m.registerDeserializer("notification-closed",(e=>y(e))),m.registerDeserializer("notification-action",(e=>{const t=y(e),{controlSource:n,controlIndex:i}=t,r=a(t,["controlSource","controlIndex"]);if(e.trigger===c.ActionTrigger.CONTROL){const t=e.notification[n][i];return Object.assign(Object.assign({},r),{control:t})}return r})),m.registerDeserializer("notifications-count-changed",(e=>e)),t.addEventListener=function(e,t){(0,p.validateEnvironment)(),e=(0,p.sanitizeEventType)(e),t=(0,p.sanitizeFunction)(t);const n=u.eventEmitter.listenerCount(e);u.eventEmitter.addListener(e,t),0===n&&1===u.eventEmitter.listenerCount(e)&&(0,u.tryServiceDispatch)(l.APITopic.ADD_EVENT_LISTENER,e)},t.removeEventListener=function(e,t){(0,p.validateEnvironment)(),e=(0,p.sanitizeEventType)(e),t=(0,p.sanitizeFunction)(t);const n=u.eventEmitter.listenerCount(e);u.eventEmitter.removeListener(e,t),1===n&&0===u.eventEmitter.listenerCount(e)&&(0,u.tryServiceDispatch)(l.APITopic.REMOVE_EVENT_LISTENER,e)},t.create=async function(e){if("object"!=typeof e||null===e)throw new Error("Invalid argument passed to create: argument must be an object and must not be null");if(void 0!==e.date&&!(e.date instanceof Date))throw new Error('Invalid argument passed to create: "date" must be a valid Date object');if(void 0!==e.expires&&null!==e.expires&&!(e.expires instanceof Date))throw new Error('Invalid argument passed to create: "expires" must be null or a valid Date object');const t=await(0,u.tryServiceDispatch)(l.APITopic.CREATE_NOTIFICATION,Object.assign(Object.assign({},e),{date:e.date&&e.date.valueOf(),expires:e.expires&&e.expires.valueOf()}));return Object.assign(Object.assign({},t),{date:new Date(t.date),expires:null!==t.expires?new Date(t.expires):null})},t.update=async function(e){if("object"!=typeof e||null===e)throw new Error("Invalid argument passed to create: argument must be an object and must not be null");if(!e.id)throw new Error('Invalid argument passed to create: "id" must be Id of previously created Notification');const t=await(0,u.tryServiceDispatch)(l.APITopic.UPDATE_NOTIFICATION,Object.assign({},e));return Object.assign({},t)},t.clear=async function(e){return(0,u.tryServiceDispatch)(l.APITopic.CLEAR_NOTIFICATION,{id:e})},t.getAll=async function(){return(await(0,u.tryServiceDispatch)(l.APITopic.GET_APP_NOTIFICATIONS,void 0)).map((e=>Object.assign(Object.assign({},e),{indicator:e.indicator||null,date:new Date(e.date),expires:null!==e.expires?new Date(e.expires):null})))},t.clearAll=async function(){return(0,u.tryServiceDispatch)(l.APITopic.CLEAR_APP_NOTIFICATIONS,void 0)},t.toggleNotificationCenter=async function(){return(0,u.tryServiceDispatch)(l.APITopic.TOGGLE_NOTIFICATION_CENTER,void 0)},t.show=async function(e){return(0,u.tryServiceDispatch)(l.APITopic.SHOW_NOTIFICATION_CENTER,e)},t.hide=async function(){return(0,u.tryServiceDispatch)(l.APITopic.HIDE_NOTIFICATION_CENTER,void 0)},t.getNotificationsCount=async function(){return(0,u.tryServiceDispatch)(l.APITopic.GET_NOTIFICATIONS_COUNT,void 0)}},43392:(e,t)=>{"use strict";var n,i;Object.defineProperty(t,"__esModule",{value:!0}),t.IndicatorColor=t.IndicatorType=void 0,(i=t.IndicatorType||(t.IndicatorType={})).FAILURE="failure",i.WARNING="warning",i.SUCCESS="success",(n=t.IndicatorColor||(t.IndicatorColor={})).RED="red",n.GREEN="green",n.YELLOW="yellow",n.BLUE="blue",n.PURPLE="purple",n.GRAY="gray"},84666:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.APITopic=t.SERVICE_CHANNEL=t.SERVICE_IDENTITY=void 0,t.SERVICE_IDENTITY={uuid:"notifications-service",name:"notifications-service"},t.SERVICE_CHANNEL="of-notifications-service-v1",(n=t.APITopic||(t.APITopic={})).CREATE_NOTIFICATION="create-notification",n.UPDATE_NOTIFICATION="update-notification",n.CLEAR_NOTIFICATION="clear-notification",n.GET_APP_NOTIFICATIONS="fetch-app-notifications",n.CLEAR_APP_NOTIFICATIONS="clear-app-notifications",n.TOGGLE_NOTIFICATION_CENTER="toggle-notification-center",n.ADD_EVENT_LISTENER="add-event-listener",n.REMOVE_EVENT_LISTENER="remove-event-listener",n.GET_PROVIDER_STATUS="get-provider-status",n.GET_NOTIFICATIONS_COUNT="get-notifications-count",n.REGISTER_PLATFORM="register-notifications-platform",n.DEREGISTER_PLATFORM="deregister-notifications-platform",n.SHOW_NOTIFICATION_CENTER="show-notification-center",n.HIDE_NOTIFICATION_CENTER="hide-notification-center",n.UPDATE_PLATFORM_SCHEME="update-platform-scheme"},23310:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.updatePlatformScheme=t.deregisterPlatform=t.registerPlatform=void 0;const i=n(53595),r=n(84666);t.registerPlatform=async function(e){if("object"!=typeof e||null===e)throw new Error("Invalid argument passed to registerPlatform: argument must be an object and must not be null");if(!e.id)throw new Error('Invalid argument passed to registerPlatform: "id" must be a non-empty string in platform info.');return(0,i.tryServiceDispatch)(r.APITopic.REGISTER_PLATFORM,Object.assign({},e))},t.deregisterPlatform=async function(e){if(!e)throw new Error('Invalid argument passed to deregisterPlatform: "id" must be a non-empty string.');return(0,i.tryServiceDispatch)(r.APITopic.DEREGISTER_PLATFORM,{id:e})},t.updatePlatformScheme=async function({scheme:e}){if(!e)throw new Error('Invalid argument passed to updatePlatformScheme: "scheme" must be a non-empty string.');return(0,i.tryServiceDispatch)(r.APITopic.UPDATE_PLATFORM_SCHEME,{scheme:e})}},14045:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.isConnectedToAtLeast=t.getStatus=void 0;const r=i(n(29140)),o=n(95881),s=n(53595),a=n(84666);function c(){return(0,o.withStrictTimeout)(500,(0,s.tryServiceDispatch)(a.APITopic.GET_PROVIDER_STATUS,void 0),"").catch((()=>({connected:!1,version:null,templateAPIVersion:null})))}t.getStatus=c,t.isConnectedToAtLeast=async function(e){const t=await c();if(t.connected&&null!==t.version){const n=(0,r.default)(t.version,e);if(0===n||1===n)return!0}return!1}},69742:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},78985:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},69045:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},56242:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},95482:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),r(n(69045),t),r(n(56242),t),r(n(69695),t),r(n(81627),t)},69695:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TemplateFragmentNames=t.PresentationTemplateFragmentNames=t.ContainerTemplateFragmentNames=t.TemplateNames=void 0,t.TemplateNames={markdown:"markdown",list:"list",custom:"custom"},t.ContainerTemplateFragmentNames={container:"container"},t.PresentationTemplateFragmentNames={text:"text",image:"image",list:"list"},t.TemplateFragmentNames=Object.assign(Object.assign({},t.ContainerTemplateFragmentNames),t.PresentationTemplateFragmentNames)},81627:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},10314:(e,t)=>{"use strict";function n(e,t){let n;try{n=JSON.stringify(e)}catch(e){n=t}return n}Object.defineProperty(t,"__esModule",{value:!0}),t.safeStringify=t.validateEnvironment=t.sanitizeEventType=t.sanitizeFunction=void 0,t.sanitizeFunction=function(e){if("function"!=typeof e)throw new Error(`Invalid argument passed: ${n(e,"The provided value")} is not a valid function`);return e},t.sanitizeEventType=function(e){if("notification-action"===e||"notification-created"===e||"notification-toast-dismissed"===e||"notification-closed"===e||"notifications-count-changed"===e||"notification-form-submitted"===e)return e;throw new Error(`Invalid argument passed: ${n(e,"The provided event type")} is not a valid Notifications event type`)},t.validateEnvironment=function(){if("undefined"==typeof fin)throw new Error("fin is not defined. The openfin-notifications module is only intended for use in an OpenFin application.")},t.safeStringify=n}},t={},function n(i){var r=t[i];if(void 0!==r)return r.exports;var o=t[i]={exports:{}};return e[i].call(o.exports,o,o.exports,n),o.exports}(3771);var e,t},e.exports=t()},990:(e,t,n)=>{"use strict";n.r(t),n.d(t,{deregister:()=>l,register:()=>u,updateScheme:()=>f});var i=n(7),r=n(532),o=n(730),s={};for(const e in i)["default","register","deregister","updateScheme"].indexOf(e)<0&&(s[e]=()=>i[e]);n.d(t,s);const a=async e=>{if(e instanceof Error){let t=e.message;if(e.message.includes("register-notifications-platform")){if(t="Notifications platforms are not supported in versions below 1.13.0, try updating your notifications-service.",i?.provider?.getStatus){const{version:e}=await i.provider.getStatus();t+=` Your version is: ${e}`}return t}return e.message}return"string"==typeof e?e:"unkwnown error registering Notifications"},c=async e=>{if(e instanceof Error&&e.message.includes("register-notifications-platform"))throw new Error(await a(e));throw e},u=async e=>{const t=await(0,o.Vb)(fin.me.identity);try{await i.registerPlatform({...e,theme:t.theme,scheme:t.defaultScheme,workspacePlatform:{identity:fin.Platform.getCurrentSync().identity,analytics:{isSupported:!0}}}),(0,r.tj)({allowed:!0,apiVersion:i.VERSION})}catch(e){(0,r.tj)({allowed:!1,rejectionCode:await a(e),apiVersion:i.VERSION}),await c(e)}},l=async e=>{try{await i.deregisterPlatform(e)}catch(e){await c(e)}},f=async e=>{await i.updatePlatformScheme({scheme:e})}}}]);
1
+ (globalThis.webpackChunk_openfin_workspace_platform=globalThis.webpackChunk_openfin_workspace_platform||[]).push([[990],{7:e=>{var t;self,t=()=>{return e={17187:e=>{"use strict";var t,n="object"==typeof Reflect?Reflect:null,i=n&&"function"==typeof n.apply?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var r=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}e.exports=o,e.exports.once=function(e,t){return new Promise((function(n,i){function r(n){e.removeListener(t,o),i(n)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",r),n([].slice.call(arguments))}m(e,t,o,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&m(e,"error",t,{once:!0})}(e,r)}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var s=10;function a(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function u(e,t,n,i){var r,o,s,u;if(a(n),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),s=o[t]),void 0===s)s=o[t]=n,++e._eventsCount;else if("function"==typeof s?s=o[t]=i?[n,s]:[s,n]:i?s.unshift(n):s.push(n),(r=c(e))>0&&s.length>r&&!s.warned){s.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=s.length,u=l,console&&console.warn&&console.warn(u)}return e}function l(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(e,t,n){var i={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},r=l.bind(i);return r.listener=n,i.wrapFn=r,r}function p(e,t,n){var i=e._events;if(void 0===i)return[];var r=i[t];return void 0===r?[]:"function"==typeof r?n?[r.listener||r]:[r]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(r):v(r,r.length)}function d(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function v(e,t){for(var n=new Array(t),i=0;i<t;++i)n[i]=e[i];return n}function m(e,t,n,i){if("function"==typeof e.on)i.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function r(o){i.once&&e.removeEventListener(t,r),n(o)}))}}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e||e<0||r(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");s=e}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||r(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},o.prototype.getMaxListeners=function(){return c(this)},o.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r="error"===e,o=this._events;if(void 0!==o)r=r&&void 0===o.error;else if(!r)return!1;if(r){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var c=o[e];if(void 0===c)return!1;if("function"==typeof c)i(c,this,t);else{var u=c.length,l=v(c,u);for(n=0;n<u;++n)i(l[n],this,t)}return!0},o.prototype.addListener=function(e,t){return u(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return u(this,e,t,!0)},o.prototype.once=function(e,t){return a(t),this.on(e,f(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,f(this,e,t)),this},o.prototype.removeListener=function(e,t){var n,i,r,o,s;if(a(t),void 0===(i=this._events))return this;if(void 0===(n=i[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete i[e],i.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(r=-1,o=n.length-1;o>=0;o--)if(n[o]===t||n[o].listener===t){s=n[o].listener,r=o;break}if(r<0)return this;0===r?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,r),1===n.length&&(i[e]=n[0]),void 0!==i.removeListener&&this.emit("removeListener",e,s||t)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(e){var t,n,i;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var r,o=Object.keys(n);for(i=0;i<o.length;++i)"removeListener"!==(r=o[i])&&this.removeAllListeners(r);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(i=t.length-1;i>=0;i--)this.removeListener(e,t[i]);return this},o.prototype.listeners=function(e){return p(this,e,!0)},o.prototype.rawListeners=function(e){return p(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):d.call(e,t)},o.prototype.listenerCount=d,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},54456:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DeferredPromise=class{constructor(){const e=new Promise(((e,t)=>{this._resolve=e,this._reject=t}));this._promise=e}get promise(){return this._promise}get resolve(){return this._resolve}get reject(){return this._reject}}},16272:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(54456);async function r(e,t){let n=0;for(const i of e)await t(i,n,e),n++}async function o(e,t){await Promise.all(e.map(t))}function s(e,t,n){const r=new i.DeferredPromise,o=e.add(((...e)=>{t(...e)&&(o.remove(),r.resolve())}));return n&&n.catch((e=>{o.remove(),r.reject(e)})),a(r.promise)}function a(e){return e.catch((()=>{})),e}t.serialForEach=r,t.serialMap=async function(e,t){const n=[];return await r(e,(async(e,i,r)=>{n.push(await t(e,i,r))})),n},t.serialFilter=async function(e,t){const n=[];return await r(e,(async(e,i,r)=>{await t(e,i,r)&&n.push(e)})),n},t.parallelForEach=o,t.parallelMap=async function(e,t){const n=[];return await o(e,(async(e,i,r)=>{n[i]=await t(e,i,r)})),n},t.parallelFilter=async function(e,t){const n=[];return await o(e,(async(e,i,r)=>{n[i]=await t(e,i,r)})),e.filter(((e,t)=>n[t]))},t.withStrictTimeout=function(e,t,n){const i=new Promise(((t,i)=>setTimeout((()=>i(new Error(n))),e)));return a(Promise.race([i,t]))},t.withTimeout=function(e,t){const n=new Promise((t=>setTimeout((()=>t([!0,void 0])),e))),i=t.then((e=>[!1,e]));return Promise.race([n,i])},t.untilTrue=function(e,t,n){return t()?Promise.resolve():s(e,t,n)},t.untilSignal=s,t.allowReject=a},95881:(e,t,n)=>{"use strict";function i(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),i(n(16272)),i(n(54456))},29140:e=>{e.exports=function(e,t){for(var n=e.split("."),i=t.split("."),r=0;r<3;r++){var o=Number(n[r]),s=Number(i[r]);if(o>s)return 1;if(s>o)return-1;if(!isNaN(o)&&isNaN(s))return 1;if(isNaN(o)&&!isNaN(s))return-1}return 0}},47924:function(e,t){"use strict";var n=this&&this.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.EventRouter=void 0,t.EventRouter=class{constructor(e){this._emitterProviders={},this._deserializers={},this._defaultEmitter=e}registerEmitterProvider(e,t){this._emitterProviders[e]=t}registerDeserializer(e,t){this._deserializers[e]=t}dispatchEvent(e){const{type:t,target:i}=e,r=n(e,["type","target"]);let o;if(!i)throw new Error("Invalid event, no target specified");if("default"===i)o=this._defaultEmitter;else{if(!this._emitterProviders[i.type])throw new Error(`Invalid target, no provider registered for '${i.type}'`);o=this._emitterProviders[i.type](i.id)}const s=Object.assign({type:t},r),a=this._deserializers[t];a?o.emit(t,a(s)):o.emit(t,s)}}},85400:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ActionBodyClickType=t.ActionNoopType=t.ActionTrigger=void 0,(n=t.ActionTrigger||(t.ActionTrigger={})).CONTROL="control",n.SELECT="select",n.CLOSE="close",n.EXPIRE="expire",n.PROGRAMMATIC="programmatic",(t.ActionNoopType||(t.ActionNoopType={})).EVENT_DISMISS="event_dismiss",(t.ActionBodyClickType||(t.ActionBodyClickType={})).DISMISS_EVENT="dismiss_event"},53595:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getEventRouter=t.tryServiceDispatch=t.getServicePromise=t.eventEmitter=void 0;const i=n(17187),r=n(95881),o=n(84666),s=n(47924);let a;t.eventEmitter=new i.EventEmitter;const c=new r.DeferredPromise;let u,l=!1;async function f(){if(window.navigator.appVersion.includes("Windows"))try{const e=await fin.System.getRvmInfo();parseInt(e.version.split(".")[0])>=6&&(fin.System.launchManifest?fin.System.launchManifest("fins://system-apps/notification-center",{noUi:!0}).catch((e=>{console.error("Unable to launch the Notification Center as a system app",e)})):fin.System.openUrlWithBrowser("fins://system-apps/notification-center").catch((()=>{})))}catch(e){}else fin.System.openUrlWithBrowser("fins://system-apps/notification-center")}async function p(){var e;if(await c.promise,!a){if("undefined"==typeof fin){const e="fin is not defined. The openfin-notifications module is only intended for use in an OpenFin application.";return a=Promise.reject(new Error(e)),a}fin.System.getVersion().then((e=>{const t=parseInt(e.split(".")[2]);t<53&&console.warn(`API version ${t} of OpenFin version ${e} is less than 53. Please upgrade the runtime version.`)}));const{name:t,uuid:n}=null!==(e=fin.me.identity)&&void 0!==e?e:fin.Window.me;if(n===o.SERVICE_IDENTITY.uuid&&t===o.SERVICE_IDENTITY.name)a=Promise.reject(new Error("Trying to connect to provider from provider"));else{const e=window.setTimeout((()=>{console.warn("Taking a long time to connect to Notifications service. Is the Notifications service running?")}),5e3);a=fin.InterApplicationBus.Channel.connect(o.SERVICE_CHANNEL,{wait:!0,payload:{version:"1.18.0-alpha-1576"}}).then((t=>{window.clearTimeout(e);const n=d();return t.register("WARN",(e=>console.warn(e))),t.register("event",(e=>{n.dispatchEvent(e)})),t.setDefaultAction((()=>!1)),t.onDisconnection((()=>{console.warn("Disconnected from Notifications service"),l=!0,a=null,f(),setTimeout((()=>{p()}),300)})),t}))}}return a}function d(){return u||(u=new s.EventRouter(t.eventEmitter)),u}"undefined"!=typeof fin&&"undefined"!=typeof window&&(f(),p(),"loading"!==document.readyState?c.resolve():(window.addEventListener("DOMContentLoaded",(()=>{c.resolve()})),document.addEventListener("DOMContentLoaded",(()=>{c.resolve()})))),t.getServicePromise=p,t.tryServiceDispatch=async function(e,t){return(await p()).dispatch(e,t)},t.getEventRouter=d},4575:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},176:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FieldType=void 0,t.FieldType={string:"string",number:"number",boolean:"boolean"}},93407:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),r(n(176),t),r(n(49725),t)},49725:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WidgetType=t.BooleanWidgetType=t.NumberWidgetType=t.StringWidgetType=void 0,t.StringWidgetType={Text:"Text"},t.NumberWidgetType={Number:"Number"},t.BooleanWidgetType={Toggle:"Toggle",Checkbox:"Checkbox"},t.WidgetType=Object.assign(Object.assign(Object.assign({},t.StringWidgetType),t.NumberWidgetType),t.BooleanWidgetType)},3771:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=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)&&i(t,e,n);return r(t,e),t},s=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)},a=this&&this.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.getNotificationsCount=t.hide=t.show=t.toggleNotificationCenter=t.clearAll=t.getAll=t.clear=t.update=t.create=t.removeEventListener=t.addEventListener=t.VERSION=t.NotificationIndicatorType=t.IndicatorColor=t.NotificationIndicator=t.NotificationOptions=t.provider=void 0;const c=n(85400),u=n(53595),l=n(84666),f=o(n(14045));t.provider=f;const p=n(10314),d=n(43392);Object.defineProperty(t,"NotificationIndicator",{enumerable:!0,get:function(){return d.NotificationIndicator}}),Object.defineProperty(t,"NotificationIndicatorType",{enumerable:!0,get:function(){return d.IndicatorType}}),Object.defineProperty(t,"IndicatorColor",{enumerable:!0,get:function(){return d.IndicatorColor}});const v=n(69695);Object.defineProperty(t,"NotificationOptions",{enumerable:!0,get:function(){return v.NotificationOptions}}),s(n(85400),t),s(n(4575),t),s(n(69742),t),s(n(93407),t),s(n(78985),t),s(n(95482),t),s(n(23310),t),t.VERSION="1.18.0-alpha-1576";const m=(0,u.getEventRouter)();function y(e){const{notification:t}=e;return Object.assign(Object.assign({},e),{notification:Object.assign(Object.assign({},t),{date:new Date(t.date),expires:null!==t.expires?new Date(t.expires):null})})}m.registerDeserializer("notification-created",(e=>y(e))),m.registerDeserializer("notification-toast-dismissed",(e=>y(e))),m.registerDeserializer("notification-closed",(e=>y(e))),m.registerDeserializer("notification-action",(e=>{const t=y(e),{controlSource:n,controlIndex:i}=t,r=a(t,["controlSource","controlIndex"]);if(e.trigger===c.ActionTrigger.CONTROL){const t=e.notification[n][i];return Object.assign(Object.assign({},r),{control:t})}return r})),m.registerDeserializer("notifications-count-changed",(e=>e)),t.addEventListener=function(e,t){(0,p.validateEnvironment)(),e=(0,p.sanitizeEventType)(e),t=(0,p.sanitizeFunction)(t);const n=u.eventEmitter.listenerCount(e);u.eventEmitter.addListener(e,t),0===n&&1===u.eventEmitter.listenerCount(e)&&(0,u.tryServiceDispatch)(l.APITopic.ADD_EVENT_LISTENER,e)},t.removeEventListener=function(e,t){(0,p.validateEnvironment)(),e=(0,p.sanitizeEventType)(e),t=(0,p.sanitizeFunction)(t);const n=u.eventEmitter.listenerCount(e);u.eventEmitter.removeListener(e,t),1===n&&0===u.eventEmitter.listenerCount(e)&&(0,u.tryServiceDispatch)(l.APITopic.REMOVE_EVENT_LISTENER,e)},t.create=async function(e){if("object"!=typeof e||null===e)throw new Error("Invalid argument passed to create: argument must be an object and must not be null");if(void 0!==e.date&&!(e.date instanceof Date))throw new Error('Invalid argument passed to create: "date" must be a valid Date object');if(void 0!==e.expires&&null!==e.expires&&!(e.expires instanceof Date))throw new Error('Invalid argument passed to create: "expires" must be null or a valid Date object');const t=await(0,u.tryServiceDispatch)(l.APITopic.CREATE_NOTIFICATION,Object.assign(Object.assign({},e),{date:e.date&&e.date.valueOf(),expires:e.expires&&e.expires.valueOf()}));return Object.assign(Object.assign({},t),{date:new Date(t.date),expires:null!==t.expires?new Date(t.expires):null})},t.update=async function(e){if("object"!=typeof e||null===e)throw new Error("Invalid argument passed to create: argument must be an object and must not be null");if(!e.id)throw new Error('Invalid argument passed to create: "id" must be Id of previously created Notification');const t=await(0,u.tryServiceDispatch)(l.APITopic.UPDATE_NOTIFICATION,Object.assign({},e));return Object.assign({},t)},t.clear=async function(e){return(0,u.tryServiceDispatch)(l.APITopic.CLEAR_NOTIFICATION,{id:e})},t.getAll=async function(){return(await(0,u.tryServiceDispatch)(l.APITopic.GET_APP_NOTIFICATIONS,void 0)).map((e=>Object.assign(Object.assign({},e),{indicator:e.indicator||null,date:new Date(e.date),expires:null!==e.expires?new Date(e.expires):null})))},t.clearAll=async function(){return(0,u.tryServiceDispatch)(l.APITopic.CLEAR_APP_NOTIFICATIONS,void 0)},t.toggleNotificationCenter=async function(){return(0,u.tryServiceDispatch)(l.APITopic.TOGGLE_NOTIFICATION_CENTER,void 0)},t.show=async function(e){return(0,u.tryServiceDispatch)(l.APITopic.SHOW_NOTIFICATION_CENTER,e)},t.hide=async function(){return(0,u.tryServiceDispatch)(l.APITopic.HIDE_NOTIFICATION_CENTER,void 0)},t.getNotificationsCount=async function(){return(0,u.tryServiceDispatch)(l.APITopic.GET_NOTIFICATIONS_COUNT,void 0)}},43392:(e,t)=>{"use strict";var n,i;Object.defineProperty(t,"__esModule",{value:!0}),t.IndicatorColor=t.IndicatorType=void 0,(i=t.IndicatorType||(t.IndicatorType={})).FAILURE="failure",i.WARNING="warning",i.SUCCESS="success",(n=t.IndicatorColor||(t.IndicatorColor={})).RED="red",n.GREEN="green",n.YELLOW="yellow",n.BLUE="blue",n.PURPLE="purple",n.GRAY="gray"},84666:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.APITopic=t.SERVICE_CHANNEL=t.SERVICE_IDENTITY=void 0,t.SERVICE_IDENTITY={uuid:"notifications-service",name:"notifications-service"},t.SERVICE_CHANNEL="of-notifications-service-v1",(n=t.APITopic||(t.APITopic={})).CREATE_NOTIFICATION="create-notification",n.UPDATE_NOTIFICATION="update-notification",n.CLEAR_NOTIFICATION="clear-notification",n.GET_APP_NOTIFICATIONS="fetch-app-notifications",n.CLEAR_APP_NOTIFICATIONS="clear-app-notifications",n.TOGGLE_NOTIFICATION_CENTER="toggle-notification-center",n.ADD_EVENT_LISTENER="add-event-listener",n.REMOVE_EVENT_LISTENER="remove-event-listener",n.GET_PROVIDER_STATUS="get-provider-status",n.GET_NOTIFICATIONS_COUNT="get-notifications-count",n.REGISTER_PLATFORM="register-notifications-platform",n.DEREGISTER_PLATFORM="deregister-notifications-platform",n.SHOW_NOTIFICATION_CENTER="show-notification-center",n.HIDE_NOTIFICATION_CENTER="hide-notification-center",n.UPDATE_PLATFORM_SCHEME="update-platform-scheme"},23310:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.updatePlatformScheme=t.deregisterPlatform=t.registerPlatform=void 0;const i=n(53595),r=n(84666);t.registerPlatform=async function(e){if("object"!=typeof e||null===e)throw new Error("Invalid argument passed to registerPlatform: argument must be an object and must not be null");if(!e.id)throw new Error('Invalid argument passed to registerPlatform: "id" must be a non-empty string in platform info.');return(0,i.tryServiceDispatch)(r.APITopic.REGISTER_PLATFORM,Object.assign({},e))},t.deregisterPlatform=async function(e){if(!e)throw new Error('Invalid argument passed to deregisterPlatform: "id" must be a non-empty string.');return(0,i.tryServiceDispatch)(r.APITopic.DEREGISTER_PLATFORM,{id:e})},t.updatePlatformScheme=async function({scheme:e}){if(!e)throw new Error('Invalid argument passed to updatePlatformScheme: "scheme" must be a non-empty string.');return(0,i.tryServiceDispatch)(r.APITopic.UPDATE_PLATFORM_SCHEME,{scheme:e})}},14045:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.isConnectedToAtLeast=t.getStatus=void 0;const r=i(n(29140)),o=n(95881),s=n(53595),a=n(84666);function c(){return(0,o.withStrictTimeout)(500,(0,s.tryServiceDispatch)(a.APITopic.GET_PROVIDER_STATUS,void 0),"").catch((()=>({connected:!1,version:null,templateAPIVersion:null})))}t.getStatus=c,t.isConnectedToAtLeast=async function(e){const t=await c();if(t.connected&&null!==t.version){const n=(0,r.default)(t.version,e);if(0===n||1===n)return!0}return!1}},69742:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},78985:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},69045:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},56242:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},95482:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),r(n(69045),t),r(n(56242),t),r(n(69695),t),r(n(81627),t)},69695:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TemplateFragmentNames=t.PresentationTemplateFragmentNames=t.ContainerTemplateFragmentNames=t.TemplateNames=void 0,t.TemplateNames={markdown:"markdown",list:"list",custom:"custom"},t.ContainerTemplateFragmentNames={container:"container"},t.PresentationTemplateFragmentNames={text:"text",image:"image",list:"list"},t.TemplateFragmentNames=Object.assign(Object.assign({},t.ContainerTemplateFragmentNames),t.PresentationTemplateFragmentNames)},81627:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},10314:(e,t)=>{"use strict";function n(e,t){let n;try{n=JSON.stringify(e)}catch(e){n=t}return n}Object.defineProperty(t,"__esModule",{value:!0}),t.safeStringify=t.validateEnvironment=t.sanitizeEventType=t.sanitizeFunction=void 0,t.sanitizeFunction=function(e){if("function"!=typeof e)throw new Error(`Invalid argument passed: ${n(e,"The provided value")} is not a valid function`);return e},t.sanitizeEventType=function(e){if("notification-action"===e||"notification-created"===e||"notification-toast-dismissed"===e||"notification-closed"===e||"notifications-count-changed"===e||"notification-form-submitted"===e)return e;throw new Error(`Invalid argument passed: ${n(e,"The provided event type")} is not a valid Notifications event type`)},t.validateEnvironment=function(){if("undefined"==typeof fin)throw new Error("fin is not defined. The openfin-notifications module is only intended for use in an OpenFin application.")},t.safeStringify=n}},t={},function n(i){var r=t[i];if(void 0!==r)return r.exports;var o=t[i]={exports:{}};return e[i].call(o.exports,o,o.exports,n),o.exports}(3771);var e,t},e.exports=t()},990:(e,t,n)=>{"use strict";n.r(t),n.d(t,{deregister:()=>l,register:()=>u,updateScheme:()=>f});var i=n(7),r=n(532),o=n(730),s={};for(const e in i)["default","register","deregister","updateScheme"].indexOf(e)<0&&(s[e]=()=>i[e]);n.d(t,s);const a=async e=>{if(e instanceof Error){let t=e.message;if(e.message.includes("register-notifications-platform")){if(t="Notifications platforms are not supported in versions below 1.13.0, try updating your notifications-service.",i?.provider?.getStatus){const{version:e}=await i.provider.getStatus();t+=` Your version is: ${e}`}return t}return e.message}return"string"==typeof e?e:"unkwnown error registering Notifications"},c=async e=>{if(e instanceof Error&&e.message.includes("register-notifications-platform"))throw new Error(await a(e));throw e},u=async e=>{const t=await(0,o.Vb)(fin.me.identity);try{await i.registerPlatform({...e,theme:t.theme,scheme:t.defaultScheme,workspacePlatform:{identity:fin.Platform.getCurrentSync().identity,analytics:{isSupported:!0}}}),(0,r.tj)({allowed:!0,apiVersion:i.VERSION})}catch(e){(0,r.tj)({allowed:!1,rejectionCode:await a(e),apiVersion:i.VERSION}),await c(e)}},l=async e=>{try{await i.deregisterPlatform(e)}catch(e){await c(e)}},f=async e=>{await i.updatePlatformScheme({scheme:e})}}}]);
2
2
  //# sourceMappingURL=990.js.map
@@ -9,7 +9,7 @@ export { AppManifestType } from '../../client-api/src/shapes';
9
9
  export type { App, AppIntent, Image } from '../../client-api/src/shapes';
10
10
  export type { CustomActionSpecifier, CustomButtonConfig } from '../../common/src/api/action';
11
11
  export type { AttachedPage, Page, PageLayout, PageLayoutDetails, PageWithUpdatableRuntimeAttribs } from '../../common/src/api/pages/shapes';
12
- export type { CustomThemes } from '../../common/src/api/theming';
12
+ export type { CustomThemes, CustomThemeOptions, CustomThemeOptionsWithScheme, CustomPaletteSet } from '../../common/src/api/theming';
13
13
  /**
14
14
  * Request for creating a saved page in persistent storage.
15
15
  */
@@ -1210,6 +1210,15 @@ export interface WorkspacePlatformProvider extends OpenFin.PlatformProvider {
1210
1210
  * @param callerIdentity OF identity of the entity from which the request originated
1211
1211
  */
1212
1212
  openSaveButtonContextMenu(req: OpenSaveButtonContextMenuPayload, callerIdentity: OpenFin.Identity): Promise<void>;
1213
+ /**
1214
+ * Implementation for getting selected {@link CustomThemes theme} scheme.
1215
+ */
1216
+ getSelectedScheme(): ColorSchemeOptionType | null | undefined;
1217
+ /**
1218
+ * Implementation for setting selected {@link CustomThemes theme} scheme.
1219
+ * @param schemeType {@link ColorSchemeOptionType scheme} to be set
1220
+ */
1221
+ setSelectedScheme(schemeType: ColorSchemeOptionType): Promise<void>;
1213
1222
  /**
1214
1223
  * Implementation for handling Workspace analytics events
1215
1224
  * @param req the payload received by the provider