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e,EAAW,EAAc,EAAQ,EAAa,GAc5D,OAXK,KAAK,MAAM,eAAe,YAAY,eAAe,uBAEzD,KAAK,MAAM,eAAe,eAAe,qBAAsB,yBAI3D,KAAK,MAAM,oBAEf,KAAK,MAAM,eAAe,2BAA2B,qBAAsB,CAAC,EAAG,+BAGzE,KAAK,MAAM,mBAAmB,eAAe,EAAW,EAAc,EAAQ,EAAa,EACnG,CAmBA,2BAAA,CAA4B,EAAW,EAAc,EAAQ,EAAa,EAAS,GAWlF,OATK,KAAK,MAAM,eAAe,YAAY,eAAe,uBAEzD,KAAK,MAAM,eAAe,eAAe,qBAAsB,yBAE3D,KAAK,MAAM,oBAEf,KAAK,MAAM,eAAe,2BAA2B,qBAAsB,CAAC,EAAG,+BAGzE,KAAK,MAAM,mBAAmB,4BACpC,EAAW,EAAc,EAAQ,EAAa,EAAS,EACzD,EAGD,OAAO,QAAU,OACjB,OAAO,QAAQ,kBAAoB,QAAQ,6BAC3C,OAAO,QAAQ,iBAAmB,QAAQ","file":"/npm/orator@6.1.3/source/Orator.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.48.0.\n * Original file: /npm/orator@6.1.3/source/Orator.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","/**\n* Orator Service Abstraction\n*\n* @license MIT\n*\n* @author Steven Velozo <steven@velozo.com>\n* @module Orator Service\n*/\n\nconst libFableServiceProviderBase = require('fable-serviceproviderbase');\n\nconst libDefaultOratorServiceServer = require('./Orator-Default-ServiceServer.js');\n\n// orator-static-server is lazy-loaded so that browser bundles using orator's\n// IPC mode don't pay the cost of (or trip over) its server-only deps. Only\n// setMimeHeader / addStaticRoute / addStaticRouteWithFallbacks need it, and\n// none of those are reachable from IPC-only consumers.\nlet libOratorStaticServer = null;\nconst getOratorStaticServer = () =>\n{\n\tif (!libOratorStaticServer)\n\t{\n\t\tlibOratorStaticServer = require('orator-static-server');\n\t}\n\treturn libOratorStaticServer;\n};\n\nconst defaultOratorConfiguration = require('./Orator-Default-Configuration.js');\n\n/**\n * @class Orator\n * @extends libFableServiceProviderBase\n * \n * Represents the Orator service provider.\n * \n * @param {Object} pFable - The Fable instance.\n * @param {Object} pOptions - The options for the Orator service.\n * @param {string} pServiceHash - The hash of the service.\n */\nclass Orator extends libFableServiceProviderBase\n{\n\tconstructor(pFable, pOptions, pServiceHash)\n\t{\n        super(pFable, pOptions, pServiceHash);\n\n        this.serviceType = 'Orator';\n\n\t\t// Create the empty, important logic containers\n\t\tthis.serviceServer = false;\n\t\tthis.serviceServerProvider = false;\n\n\t\t// Now check to see that the ServicePort is set (this used to be APIServerPort)\n\t\tif (!this.options.hasOwnProperty('ServicePort'))\n\t\t{\n\t\t\tif (this.fable.settings.hasOwnProperty('APIServerPort'))\n\t\t\t{\n\t\t\t\t// Automatically migrate the legacy APIServerPort to ServicePort\n\t\t\t\tthis.options.ServicePort = this.fable.settings.APIServerPort;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// Default to whatever the ... default is!\n\t\t\t\tthis.options.ServicePort = defaultOratorConfiguration.ServicePort;\n\t\t\t}\n\t\t}\n\n\t\t// Now check to see that the Product name is set\n\t\tif (!this.options.hasOwnProperty('Product'))\n\t\t{\n\t\t\tthis.options.Product = defaultOratorConfiguration.Product;\n\t\t}\n\t}\n\n\t/**\n\t * Lifecycle event that executes before initializing the service.  For overloading.\n\t */\n\tonBeforeInitialize()\n\t{\n\t\tif (this.fable.settings.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`Orator [${this.UUID}]::[${this.Hash}] ${this.options.Product} onBeforeInitialize:`);\n\t\t}\n\t}\n\t/**\n\t * Lifecycle event that executes before initializing the service.  For overloading.\n\t * \n\t * @param {Function} fNext - The callback function to be called after the actions are executed.\n\t */\n\tonBeforeInitializeAsync(fNext)\n\t{\n\t\tthis.onBeforeInitialize();\n\t\t// Check to see if there is a service server active; if not instantiate one (and use IPC if none is registered with Fable as the default provider)\n\t\tif (!this.serviceServer)\n\t\t{\n\t\t\t// If the developer hasn't set this to a service provider class of their own choosing, \n\t\t\t// TODO: Give the developer a chance to set a service provider instantiation address of their own choosing.\n\t\t\t// use the built-in network-less one.\n\t\t\tif (!this.fable.OratorServiceServer)\n\t\t\t{\n\t\t\t\t// If there isn't a default Service Server setup, create one.\n\t\t\t\tlet tmpServiceServerOptions = (typeof(this.options.ServiceServerOptions) == 'undefined') ? {} : this.options.ServiceServerOptions;\n\t\t\t\tif (!this.fable.serviceManager.servicesMap.hasOwnProperty('OratorServiceServer'))\n\t\t\t\t{\n\t\t\t\t\t// Only register IPC if there isn't one yet.\n\t\t\t\t\tthis.fable.serviceManager.addServiceType('OratorServiceServer', libDefaultOratorServiceServer);\n\t\t\t\t}\n\t\t\t\tthis.fable.serviceManager.instantiateServiceProvider('OratorServiceServer', tmpServiceServerOptions, 'OratorServiceServer-AutoInit');\n\t\t\t}\n\t\t\tthis.serviceServer = this.fable.OratorServiceServer;\n\t\t\t// For legacy reasons, we also will provide this under the \"webServer\" variable.\n\t\t\tthis.webServer = this.serviceServer;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.log.warn(`Orator attempting to initialize a service server after initialization has already completed.`)\n\t\t}\n\t\tfNext();\n\t}\n\n\tonInitialize()\n\t{\n\t\tif (this.fable.settings.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`Orator [${this.UUID}]::[${this.Hash}] ${this.options.Product} onInitialize:`);\n\t\t}\n\t}\n\t/**\n\t * Lifecycle event that executes at the moment of initializing the service.  For overloading.\n\t *\n\t * @param {Function} fNext - The callback function to be executed after initialization.\n\t */\n\tonInitializeAsync(fNext)\n\t{\n\t\tthis.onInitialize();\n\t\treturn fNext();\n\t}\n\n\t/**\n\t * Lifecycle event that executes after initializing the service.  For overloading.\n\t */\n\tonAfterInitialize()\n\t{\n\t\tif (this.fable.settings.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`Orator [${this.UUID}]::[${this.Hash}] ${this.options.Product} onAfterInitialize:`);\n\t\t}\n\t}\n\t/**\n\t * Lifecycle event that executes after initializing the service.  For overloading.\n\t * @param {Function} fNext - The callback function to be called after executing onAfterInitialize.\n\t * @returns {Promise} - A promise that resolves when the callback function is called.\n\t */\n\tonAfterInitializeAsync(fNext)\n\t{\n\t\tthis.onAfterInitialize();\n\t\treturn fNext();\n\t}\n\n\t/**\n\t * Initializes the Orator instance.\n\t *\n\t * @param {Function} fCallback - The callback function to be executed after initialization.\n\t */\n\tinitialize(fCallback)\n\t{\n\t\t// I hate this -- as long as we want to be \"mostly\" backwards compatible it needs to do it though\n\t\tlet tmpCallback = (typeof(fCallback) === 'function') ? fCallback : () => {};\n\n\t\tif (!this.initializeTimestamp)\n\t\t{\n\t\t\tlet tmpAnticipate = this.fable.serviceManager.instantiateServiceProviderWithoutRegistration('Anticipate');\n\n\t\t\tif (this.fable.LogNoisiness > 3)\n\t\t\t{\n\t\t\t\tthis.log.trace(`Orator [${this.UUID}]::[${this.Hash}] ${this.options.Product} beginning initialization steps...`);\n\t\t\t}\n\n\t\t\ttmpAnticipate.anticipate(this.onBeforeInitializeAsync.bind(this));\n\t\t\ttmpAnticipate.anticipate(this.onInitializeAsync.bind(this));\n\t\t\ttmpAnticipate.anticipate(this.onAfterInitializeAsync.bind(this));\n\n\t\t\ttmpAnticipate.wait(\n\t\t\t\t(pError) =>\n\t\t\t\t{\n\t\t\t\t\tthis.initializeTimestamp = this.fable.log.getTimeStamp();\n\t\t\t\t\tif (this.fable.LogNoisiness > 2)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.log.trace(`Orator [${this.UUID}]::[${this.Hash}] ${this.options.Product} initialization steps complete.`);\n\t\t\t\t\t}\n\t\t\t\t\treturn tmpCallback(pError);\n\t\t\t\t});\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.log.warn(`Orator [${this.UUID}]::[${this.Hash}] ${this.options.Product} async initialize called but initialization is already completed.  Aborting.`);\n\t\t\t// TODO: Should this be returning an error?\n\t\t\treturn tmpCallback();\n\t\t}\n\t}\n\n\t/**\n\t * Lifecycle event that executes before starting the service.  For overloading.\n\t *\n\t * @param {Function} fNext - The function to be executed before starting the service.\n\t * @returns {Promise} A promise that resolves when the function is completed.\n\t */\n\tonBeforeStartService(fNext)\n\t{\n\t\treturn fNext();\n\t}\n\t/**\n\t * Lifecycle event that executes when the service starts.  For overloading.\n\t * \n\t * @param {Function} fNext - The callback function to be called after the service starts.\n\t * @returns {Promise} A promise that resolves when the service starts successfully, or rejects with an error.\n\t */\n\tonStartService(fNext)\n\t{\n\t\tthis.onAfterInitialize();\n\t\treturn this.serviceServer.listen\n\t\t(\n\t\t\tthis.options.ServicePort,\n\t\t\t(pError)\t=>\n\t\t\t{\n\t\t\t\tthis.log.info(`${this.serviceServer.Name} listening on port ${this.options.ServicePort}`);\n\t\t\t\treturn fNext(pError);\n\t\t\t}\n\t\t);\n\t}\n\t/**\n\t * Lifecycle event that executes after starting the service.  For overloading.\n\t *\n\t * @param {Function} fNext - The callback function to be executed after the service starts.\n\t * @returns {Promise} - A promise that resolves when the callback function is completed.\n\t */\n\tonAfterStartService(fNext)\n\t{\n\t\treturn fNext();\n\t}\n\n\t/**\n\t * Starts the service.\n\t * \n\t * @param {Function} fNext - The callback function to be executed after the service has started.\n\t */\n\tstartService(fNext)\n\t{\n\t\tvar tmpNext = (typeof(fNext) === 'function') ? fNext : ()=>{};\n\n\t\tlet tmpAnticipate = this.fable.serviceManager.instantiateServiceProviderWithoutRegistration('Anticipate');\n\n\t\tif (this.fable.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`Orator [${this.UUID}]::[${this.Hash}] ${this.options.Product} beginning startService steps...`);\n\t\t}\n\n\t\t// Auto initialize if there is no serviceServer\n\t\tif (!this.serviceServer)\n\t\t{\n\t\t\ttmpAnticipate.anticipate(this.initialize.bind(this));\n\t\t}\n\n\t\ttmpAnticipate.anticipate(this.onBeforeStartService.bind(this));\n\t\ttmpAnticipate.anticipate(this.onStartService.bind(this));\n\t\ttmpAnticipate.anticipate(this.onAfterStartService.bind(this));\n\n\t\ttmpAnticipate.wait(\n\t\t\t(pError) =>\n\t\t\t{\n\t\t\t\tthis.startServiceTimestamp = this.fable.log.getTimeStamp();\n\t\t\t\tif (this.fable.LogNoisiness > 2)\n\t\t\t\t{\n\t\t\t\t\tthis.log.trace(`Orator [${this.UUID}]::[${this.Hash}] ${this.options.Product} startService steps complete.`);\n\t\t\t\t}\n\t\t\t\treturn tmpNext(pError);\n\t\t\t});\n\t}\n\n\t/**\n\t * Stops the service server.\n\t * \n\t * @param {Function} fCallback - The callback function to be executed after the service server is stopped.\n\t * @returns {void}\n\t */\n\tstopService(fCallback)\n\t{\n\t\tvar tmpCallback = (typeof(fCallback) === 'function') ? fCallback : ()=>{};\n\n\t\tif (!this.serviceServer)\n\t\t{\n\t\t\tlet tmpMessage = `Orator attempting to stop a service server but the service server has not been intialized yet.`;\n\t\t\tthis.log.warn(tmpMessage);\n\t\t\treturn tmpCallback(tmpMessage);\n\t\t}\n\n\t\tif (!this.serviceServer.Active)\n\t\t{\n\t\t\tlet tmpMessage = `Orator attempting to stop a service server but the service server is not actively running.`;\n\t\t\tthis.log.warn(tmpMessage);\n\t\t\treturn tmpCallback(tmpMessage);\n\t\t}\n\n\t\treturn this.serviceServer.close(tmpCallback);\n\t}\n\n\t/**\n\t * Programmatically invokes a method on the service server.\n\t *\n\t * @param {string} pMethod - The method to invoke.\n\t * @param {string} pRoute - The route to invoke.\n\t * @param {any|Function} pData - The request body, exposed to handlers as pRequest.body, or the completion callback when the body is skipped.\n\t * @param {Function} [fCallback] - The callback function to execute after the invocation; required unless passed via pData.\n\t * @returns {any} - The result of the invocation.\n\t */\n\tinvoke(pMethod, pRoute, pData, fCallback)\n\t{\n\t\t//this.log.trace(`Orator [${this.UUID}]::[${this.Hash}] ${this.options.Product} invoking ${pMethod} ${pRoute}`);\n\t\treturn this.serviceServer.invoke(pMethod, pRoute, pData, fCallback);\n\t}\n\n\t/*\n\t * Legacy Orator / Backwards Compatibility Functions\n\t *************************************************************************/\n\t/**\n\t * Starts the web server.\n\t *\n\t * @param {Function} fNext - The callback function to be executed after the web server starts.\n\t * @returns {Promise} A promise that resolves when the web server has started.\n\t */\n\tstartWebServer(fNext)\n\t{\n\t\treturn this.startService(fNext);\n\t}\n\n\t/**\n\t * Stops the web server.\n\t *\n\t * @param {Function} fNext - The callback function to be called after the web server is stopped.\n\t * @returns {Promise} A promise that resolves when the web server is stopped.\n\t */\n\tstopWebServer(fNext)\n\t{\n\t\treturn this.stopService(fNext);\n\t}\n\n\t/**\n\t * Retrieves the web server instance.\n\t * \n\t * @returns {WebServer} The web server instance.\n\t */\n\tgetWebServer()\n\t{\n\t\t// The old behavior was to lazily construct the service the first time \n\t\t// this accessor function is called.\n\t\tif (!this.serviceServer)\n\t\t{\n\t\t\tthis.initialize();\n\t\t}\n\n\t\treturn this.serviceServer;\n\t}\n\t/*************************************************************************\n\t * End of Legacy Orator Functions\n\t */\n\n\t/*\n\t * Backwards Compatibility: setMimeHeader and oldLibMime\n\t *\n\t * These used to live directly on Orator but now live on OratorStaticServer.\n\t * These thin wrappers delegate to the OratorStaticServer instance so that\n\t * any code calling orator.setMimeHeader() or reading orator.oldLibMime\n\t * continues to work without changes.\n\t *************************************************************************/\n\t/**\n\t * @deprecated Use fable.OratorStaticServer.oldLibMime instead.\n\t */\n\tget oldLibMime()\n\t{\n\t\tif (this.fable.OratorStaticServer)\n\t\t{\n\t\t\treturn this.fable.OratorStaticServer.oldLibMime;\n\t\t}\n\t\treturn false;\n\t}\n\n\t/**\n\t * @deprecated Use fable.OratorStaticServer.setMimeHeader() instead.\n\t */\n\tsetMimeHeader(pFileName, pResponse)\n\t{\n\t\tif (!this.fable.OratorStaticServer)\n\t\t{\n\t\t\t// Force auto-registration so the method is available\n\t\t\tif (!this.fable.serviceManager.servicesMap.hasOwnProperty('OratorStaticServer'))\n\t\t\t{\n\t\t\t\tthis.fable.serviceManager.addServiceType('OratorStaticServer', getOratorStaticServer());\n\t\t\t}\n\t\t\tthis.fable.serviceManager.instantiateServiceProvider('OratorStaticServer', {}, 'OratorStaticServer-AutoInit');\n\t\t}\n\t\treturn this.fable.OratorStaticServer.setMimeHeader(pFileName, pResponse);\n\t}\n\n\t/**\n\t * Serve a static folder, optionally with magic subdomain masking.\n\t * Delegates to the OratorStaticServer service provider.\n\t *\n\t * @param {string} pFilePath The path on disk that we are serving files from.\n\t * @param {string?} pDefaultFile (optional) The default file served if no specific file is requested.\n\t * @param {string?} pRoute (optional) The route matcher that will be used. Defaults to everything.\n\t * @param {string?} pRouteStrip (optional) If provided, this prefix will be removed from URL paths before being served.\n\t * @param {object?} pParams (optional) Additional parameters to pass to serve-static.\n\t * @return {boolean} true if the handler was successfully installed, otherwise false.\n\t */\n\taddStaticRoute(pFilePath, pDefaultFile, pRoute, pRouteStrip, pParams)\n\t{\n\t\t// Auto-register the OratorStaticServer service type if it hasn't been registered yet\n\t\tif (!this.fable.serviceManager.servicesMap.hasOwnProperty('OratorStaticServer'))\n\t\t{\n\t\t\tthis.fable.serviceManager.addServiceType('OratorStaticServer', getOratorStaticServer());\n\t\t}\n\n\t\t// Auto-instantiate a default OratorStaticServer instance if none exists\n\t\tif (!this.fable.OratorStaticServer)\n\t\t{\n\t\t\tthis.fable.serviceManager.instantiateServiceProvider('OratorStaticServer', {}, 'OratorStaticServer-AutoInit');\n\t\t}\n\n\t\treturn this.fable.OratorStaticServer.addStaticRoute(pFilePath, pDefaultFile, pRoute, pRouteStrip, pParams);\n\t}\n\n\t/**\n\t * Register a static-file route with a per-file CDN fallback map.\n\t *\n\t * Behaves like addStaticRoute for every local hit. For any request whose\n\t * relative path is a key in pFallbackMap and whose file isn't present\n\t * on disk, responds with 302 to the mapped URL instead of a 404. Any\n\t * request whose relative path isn't in the map behaves exactly as\n\t * addStaticRoute would (local hit → stream, local miss → 404).\n\t *\n\t * @param {string} pFilePath The path on disk that we are serving files from.\n\t * @param {string?} pDefaultFile (optional) The default file served if no specific file is requested.\n\t * @param {string?} pRoute (optional) The route matcher that will be used. Defaults to everything.\n\t * @param {string?} pRouteStrip (optional) If provided, this prefix will be removed from URL paths before being served.\n\t * @param {object?} pParams (optional) Additional parameters to pass to serve-static.\n\t * @param {Object<string,string>?} pFallbackMap (optional) Map of relative path (under the route prefix) to absolute URL for CDN fallback.\n\t * @return {boolean} true if the handler was successfully installed, otherwise false.\n\t */\n\taddStaticRouteWithFallbacks(pFilePath, pDefaultFile, pRoute, pRouteStrip, pParams, pFallbackMap)\n\t{\n\t\tif (!this.fable.serviceManager.servicesMap.hasOwnProperty('OratorStaticServer'))\n\t\t{\n\t\t\tthis.fable.serviceManager.addServiceType('OratorStaticServer', getOratorStaticServer());\n\t\t}\n\t\tif (!this.fable.OratorStaticServer)\n\t\t{\n\t\t\tthis.fable.serviceManager.instantiateServiceProvider('OratorStaticServer', {}, 'OratorStaticServer-AutoInit');\n\t\t}\n\n\t\treturn this.fable.OratorStaticServer.addStaticRouteWithFallbacks(\n\t\t\tpFilePath, pDefaultFile, pRoute, pRouteStrip, pParams, pFallbackMap);\n\t}\n}\n\nmodule.exports = Orator;\nmodule.exports.ServiceServerBase = require('orator-serviceserver-base');\nmodule.exports.ServiceServerIPC = require('./Orator-ServiceServer-IPC.js');\n"]}