PageSourceSearch

https://www.trainwithkickoff.com/_next/static/chunks/1464.83fe3f72874bac29.js

js trainwithkickoff.com collected 2026-10-04 00:01:46 UTC 67,994 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1464],{25948:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.WASM_INFERENCE_DIMENSIONS=t.TWILIO_VIRTUAL_BACKGROUND_PROCESSOR_PIPELINE_WORKER=t.TWILIO_GAUSSIAN_BLUR_BACKGROUND_PROCESSOR_PIPELINE_WORKER=t.TFLITE_SIMD_LOADER_NAME=t.TFLITE_LOADER_NAME=t.MODEL_NAME=t.MASK_BLUR_RADIUS=t.BLUR_FILTER_RADIUS=void 0,t.BLUR_FILTER_RADIUS=15,t.MASK_BLUR_RADIUS=8,t.MODEL_NAME="selfie_segmentation_landscape.tflite",t.TFLITE_LOADER_NAME="tflite-1-0-0.js",t.TFLITE_SIMD_LOADER_NAME="tflite-simd-1-0-0.js",t.TWILIO_GAUSSIAN_BLUR_BACKGROUND_PROCESSOR_PIPELINE_WORKER="twilio-gaussian-blur-background-processor-pipeline-worker.js",t.TWILIO_VIRTUAL_BACKGROUND_PROCESSOR_PIPELINE_WORKER="twilio-virtual-background-processor-pipeline-worker.js",t.WASM_INFERENCE_DIMENSIONS={width:256,height:144}},38390:function(e,t,n){var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.VirtualBackgroundProcessor=t.version=t.isSupported=t.ImageFit=t.GaussianBlurBackgroundProcessor=void 0;var i=n(66240);Object.defineProperty(t,"GaussianBlurBackgroundProcessor",{enumerable:!0,get:function(){return i.GaussianBlurBackgroundProcessor}});var o=n(56191);Object.defineProperty(t,"VirtualBackgroundProcessor",{enumerable:!0,get:function(){return o.VirtualBackgroundProcessor}});var a=n(65519);Object.defineProperty(t,"ImageFit",{enumerable:!0,get:function(){return a.ImageFit}});var u=n(25590);Object.defineProperty(t,"isSupported",{enumerable:!0,get:function(){return u.isSupported}});var s=n(37347);Object.defineProperty(t,"version",{enumerable:!0,get:function(){return s.version}}),"undefined"!=typeof window&&(window.Twilio=window.Twilio||{},window.Twilio.VideoProcessors=r(r({},window.Twilio.VideoProcessors),{GaussianBlurBackgroundProcessor:i.GaussianBlurBackgroundProcessor,ImageFit:a.ImageFit,isSupported:u.isSupported,version:s.version,VirtualBackgroundProcessor:o.VirtualBackgroundProcessor}))},36067:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Processor=void 0,t.Processor=function(){}},71520:function(e,t,n){var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{s(r.next(e))}catch(e){o(e)}}function u(e){try{s(r.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,u)}s((r=r.apply(e,t||[])).next())})},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(u){return function(s){return function(u){if(n)throw TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(a=0)),a;)try{if(n=1,r&&(i=2&u[0]?r.return:u[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,u[1])).done)return i;switch(r=0,i&&(u=[2&u[0],i.value]),u[0]){case 0:case 1:i=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,r=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===u[0]||2===u[0])){a=0;continue}if(3===u[0]&&(!i||u[1]>i[0]&&u[1]<i[3])){a.label=u[1];break}if(6===u[0]&&a.label<i[1]){a.label=i[1],i=u;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(u);break}i[2]&&a.ops.pop(),a.trys.pop();continue}u=t.call(e,a)}catch(e){u=[6,e],r=0}finally{n=i=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,s])}}};
1Object.defineProperty(t,"__esModule",{value:!0}),t.BackgroundProcessor=void 0;var u=n(25948),s=n(37347),c=n(36067),l=n(29200),p=function(e){function t(t,n){var r=e.call(this)||this;r._deferInputFrameDownscale=!1,r._inputFrameCanvas=new OffscreenCanvas(1,1),r._inputFrameContext=r._inputFrameCanvas.getContext("2d",{willReadFrequently:!0}),r._isSimdEnabled=null,r._maskBlurRadius=u.MASK_BLUR_RADIUS,r._outputFrameBuffer=null,r._outputFrameBufferContext=null,r._version=s.version;var i=n.assetsPath,o=n.deferInputFrameDownscale,a=void 0===o?r._deferInputFrameDownscale:o,c=n.maskBlurRadius,l=void 0===c?r._maskBlurRadius:c;if("string"!=typeof i)throw Error("assetsPath parameter must be a string");return r._assetsPath=i.replace(/([^/])$/,"$1/"),r._backgroundProcessorPipeline=t,r._benchmark=r._backgroundProcessorPipeline._benchmark,r.deferInputFrameDownscale=a,r.maskBlurRadius=l,r}return i(t,e),Object.defineProperty(t.prototype,"deferInputFrameDownscale",{get:function(){return this._deferInputFrameDownscale},set:function(e){"boolean"!=typeof e&&(console.warn("Provided deferInputFrameDownscale is not a boolean."),e=this._deferInputFrameDownscale),this._deferInputFrameDownscale!==e&&(this._deferInputFrameDownscale=e,this._backgroundProcessorPipeline.setDeferInputFrameDownscale(this._deferInputFrameDownscale).catch(function(){}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maskBlurRadius",{get:function(){return this._maskBlurRadius},set:function(e){("number"!=typeof e||e<0)&&(console.warn("Valid mask blur radius not found. Using ".concat(u.MASK_BLUR_RADIUS," as default.")),e=u.MASK_BLUR_RADIUS),this._maskBlurRadius!==e&&(this._maskBlurRadius=e,this._backgroundProcessorPipeline.setMaskBlurRadius(this._maskBlurRadius).catch(function(){}))},enumerable:!1,configurable:!0}),t.prototype.loadModel=function(){return o(this,void 0,void 0,function(){var e;return a(this,function(t){switch(t.label){case 0:return e=this,[4,this._backgroundProcessorPipeline.loadTwilioTFLite()];case 1:return e._isSimdEnabled=t.sent(),[2]}})})},t.prototype.processFrame=function(e,t){return o(this,void 0,void 0,function(){var n,r,i,o,u,s,c,p,f,h,d;return a(this,function(a){switch(a.label){case 0:if(!e||!t)throw Error("Missing input or output frame buffer");if(n=this,r=n._backgroundProcessorPipeline,i=n._benchmark,o=n._outputFrameBufferContext,i.end("captureFrameDelay"),i.end("totalProcessingDelay"),i.start("totalProcessingDelay"),i.start("processFrameDelay"),s=(u=this._getFrameDimensions(e)).width,c=u.height,this._outputFrameBuffer!==t&&(this._outputFrameBuffer=t,this._outputFrameBufferContext=t.getContext("2d")||t.getContext("bitmaprenderer")),this._inputFrameCanvas.width!==s&&(this._inputFrameCanvas.width=s),this._inputFrameCanvas.height!==c&&(this._inputFrameCanvas.height=c),e instanceof HTMLVideoElement?(this._inputFrameContext.drawImage(e,0,0),p=this._inputFrameCanvas):p=e,!(r instanceof l.BackgroundProcessorPipeline))return[3,2];return[4,r.render(p)];case 1:return h=a.sent(),[3,4];case 2:return[4,r.render(p instanceof OffscreenCanvas?p.transferToImageBitmap():p)];case 3:h=a.sent(),a.label=4;case 4:return f=h,o instanceof ImageBitmapRenderingContext?(d=f instanceof OffscreenCanvas?f.transferToImageBitmap():f,o.transferFromImageBitmap(d)):o instanceof CanvasRenderingContext2D&&f&&o.drawImage(f,0,0),i.end("processFrameDelay"),i.start("captureFrameDelay"),[2]}})})},t.prototype._getFrameDimensions=function(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:e instanceof VideoFrame?{width:e.displayWidth,height:e.displayHeight}:{width:e.width,height:e.height}},t}(c.Processor);t.BackgroundProcessor=p},66240:function(e,t,n){var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});
1Object.defineProperty(t,"__esModule",{value:!0}),t.GaussianBlurBackgroundProcessor=void 0;var o=n(25948),a=n(71520),u=n(29200),s=function(e){function t(t){var n=this,r=t.blurFilterRadius,i=void 0===r?o.BLUR_FILTER_RADIUS:r,a=t.deferInputFrameDownscale,s=t.maskBlurRadius,c=void 0===s?o.MASK_BLUR_RADIUS:s,l=t.useWebWorker,p=t.assetsPath.replace(/([^/])$/,"$1/"),f=new(void 0===l||l?u.GaussianBlurBackgroundProcessorPipelineProxy:u.GaussianBlurBackgroundProcessorPipeline)({assetsPath:p,blurFilterRadius:i,deferInputFrameDownscale:void 0!==a&&a,maskBlurRadius:c});return(n=e.call(this,f,t)||this)._blurFilterRadius=o.BLUR_FILTER_RADIUS,n._name="GaussianBlurBackgroundProcessor",n.blurFilterRadius=t.blurFilterRadius,n}return i(t,e),Object.defineProperty(t.prototype,"blurFilterRadius",{get:function(){return this._blurFilterRadius},set:function(e){e||(console.warn("Valid blur filter radius not found. Using ".concat(o.BLUR_FILTER_RADIUS," as default.")),e=o.BLUR_FILTER_RADIUS),this._blurFilterRadius=e,this._backgroundProcessorPipeline.setBlurFilterRadius(this._blurFilterRadius).catch(function(){})},enumerable:!1,configurable:!0}),t}
1(a.BackgroundProcessor);t.GaussianBlurBackgroundProcessor=s},56191:function(e,t,n){var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.VirtualBackgroundProcessor=void 0;var o=n(65519),a=n(25948),u=n(71520),s=n(29200),c=function(e){function t(t){var n=this,r=t.backgroundImage,i=t.deferInputFrameDownscale,u=t.fitType,c=void 0===u?o.ImageFit.Fill:u,l=t.maskBlurRadius,p=void 0===l?a.MASK_BLUR_RADIUS:l,f=t.useWebWorker,h=t.assetsPath.replace(/([^/])$/,"$1/"),d=new(void 0===f||f?s.VirtualBackgroundProcessorPipelineProxy:s.VirtualBackgroundProcessorPipeline)({assetsPath:h,deferInputFrameDownscale:void 0!==i&&i,fitType:c,maskBlurRadius:p});return(n=e.call(this,d,t)||this)._name="VirtualBackgroundProcessor",n.backgroundImage=r,n.fitType=c,n}return i(t,e),Object.defineProperty(t.prototype,"backgroundImage",{get:function(){return this._backgroundImage},set:function(e){var t=this;if(!e||!e.complete||!e.naturalHeight)throw Error("Invalid image. Make sure that the image is an HTMLImageElement and has been successfully loaded");this._backgroundImage=e,createImageBitmap(this._backgroundImage).then(function(e){return t._backgroundProcessorPipeline.setBackgroundImage(e)}).catch(function(){})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fitType",{get:function(){return this._fitType},set:function(e){Object.keys(o.ImageFit).includes(e)||(console.warn("Valid fitType not found. Using '".concat(o.ImageFit.Fill,"' as default.")),e=o.ImageFit.Fill),this._fitType=e,this._backgroundProcessorPipeline.setFitType(this._fitType).catch(function(){})},enumerable:!1,configurable:!0}),t}(u.BackgroundProcessor);t.VirtualBackgroundProcessor=c},54259:function(e,t,n){var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{s(r.next(e))}catch(e){o(e)}}function u(e){try{s(r.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,u)}s((r=r.apply(e,t||[])).next())})},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(u){return function(s){return function(u){if(n)throw TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(a=0)),a;)try{if(n=1,r&&(i=2&u[0]?r.return:u[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,u[1])).done)return i;switch(r=0,i&&(u=[2&u[0],i.value]),u[0]){case 0:case 1:i=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,r=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===u[0]||2===u[0])){a=0;continue}if(3===u[0]&&(!i||u[1]>i[0]&&u[1]<i[3])){a.label=u[1];break}if(6===u[0]&&a.label<i[1]){a.label=i[1],i=u;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(u);break}i[2]&&a.ops.pop(),a.trys.pop();continue}u=t.call(e,a)}catch(e){u=[6,e],r=0}finally{n=i=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,s])}}};Object.defineProperty(t,"__esModule",{value:!0}
1),t.BackgroundProcessorPipeline=void 0;var u=n(25948),s=n(61125),c=n(25590),l=n(35823),p=n(86058),f=n(95912),h=n(13935),d=function(e){function t(t,n){void 0===n&&(n=function(){});var r=e.call(this)||this;r._outputCanvas=new OffscreenCanvas(1,1),r._webgl2Canvas=new OffscreenCanvas(1,1),r._benchmark=new s.Benchmark,r._inferenceInputCanvas=new OffscreenCanvas(u.WASM_INFERENCE_DIMENSIONS.width,u.WASM_INFERENCE_DIMENSIONS.height),r._inputFrameDownscaleMode=(0,c.isChromiumImageBitmap)()?"image-bitmap":"canvas";var i=t.assetsPath,o=t.deferInputFrameDownscale,a=t.maskBlurRadius;return r._assetsPath=i,r._deferInputFrameDownscale=o,r._onResizeWebGL2Canvas=n,r.addStage(new f.InputFrameDowscaleStage(r._inferenceInputCanvas,r._inputFrameDownscaleMode)),r.addStage(new h.PostProcessingStage(u.WASM_INFERENCE_DIMENSIONS,r._webgl2Canvas,r._outputCanvas,a,function(e){return r._setBackground(e)})),r}return i(t,e),t.prototype.loadTwilioTFLite=function(){return o(this,void 0,void 0,function(){var e;return a(this,function(n){switch(n.label){case 0:if(e=t._twilioTFLite)return[3,2];return[4,(e=new l.TwilioTFLite).initialize(this._assetsPath,u.MODEL_NAME,u.TFLITE_LOADER_NAME,u.TFLITE_SIMD_LOADER_NAME)];case 1:n.sent(),t._twilioTFLite=e,n.label=2;case 2:return[2,e.isSimdEnabled]}})})},t.prototype.render=function(e){return o(this,void 0,void 0,function(){var n,r,i,o,u,s,c,l,p,f,h,d,_,g,v,y,m,b,P,w;return a(this,function(a){switch(a.label){case 0:if(!t._twilioTFLite)return[2,null];if(r=(n=this._stages)[0],i=n[1],o=this,u=o._benchmark,s=o._deferInputFrameDownscale,l=(c=o._inferenceInputCanvas).height,p=c.width,f=o._outputCanvas,h=o._webgl2Canvas,d=t._twilioTFLite,g=(_="function"==typeof VideoFrame&&e instanceof VideoFrame?{height:e.displayHeight,width:e.displayWidth}:e).height,v=_.width,y=f.width!==v,m=f.height!==g,b=y||m,y&&(f.width=v,h.width=v),m&&(f.height=g,h.height=g),b&&(i.resetPersonMaskUpscalePipeline(),this._onResizeWebGL2Canvas()),u.start("inputImageResizeDelay"),P=r.render(e).then(function(e){d.loadInputBuffer(e)}),s)return[3,2];return[4,P];case 1:a.sent(),a.label=2;case 2:return u.end("inputImageResizeDelay"),u.start("segmentationDelay"),w=new ImageData(d.runInference(),p,l),u.end("segmentationDelay"),u.start("imageCompositionDelay"),i.render(e,w),u.end("imageCompositionDelay"),("function"==typeof VideoFrame&&e instanceof VideoFrame||"function"==typeof ImageBitmap&&e instanceof ImageBitmap)&&e.close(),[2,this._outputCanvas]}})})},t.prototype.setDeferInputFrameDownscale=function(e){return o(this,void 0,void 0,function(){return a(this,function(t){return this._deferInputFrameDownscale=e,[2]})})},t.prototype.setMaskBlurRadius=function(e){return o(this,void 0,void 0,function(){return a(this,function(t){return this._stages[1].updateMaskBlurRadius(e),[2]})})},t._twilioTFLite=null,t}(p.Pipeline);t.BackgroundProcessorPipeline=d},1301:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{s(r.next(e))}catch(e){o(e)}}function u(e){try{s(r.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,u)}s((r=r.apply(e,t||[])).next())})},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(u){return function(s){return function(u){if(n)throw TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(a=0)),a;)try{if(n=1,r&&(i=2&u[0]?r.return:u[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,u[1])).done)return i;switch(r=0,i&&(u=[2&u[0],i.value]),u[0]){case 0:case 1:i=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,r=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===u[0]||2===u[0])){a=0;continue}if(3===u[0]&&(!i||u[1]>i[0]&&u[1]<i[3])){a.label=u[1];break}if(6===u[0]&&a.label<i[1]){a.label=i[1],i=u;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(u);break}i[2]&&a.ops.pop(),a.trys.pop();continue}u=t.call(e,a)}catch(e){u=[6,e],r=0}finally{n=i=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,s])}}};
1Object.defineProperty(t,"__esModule",{value:!0}),t.BackgroundProcessorPipelineProxy=void 0;var o=n(54375),a=n(61125),u=function(){function e(e){this._benchmark=new a.Benchmark,this._pipelineWorkerPromise=e}return e.prototype.loadTwilioTFLite=function(){return r(this,void 0,void 0,function(){return i(this,function(e){switch(e.label){case 0:return[4,this._pipelineWorkerPromise];case 1:return[2,e.sent().loadTwilioTFLite()]}})})},e.prototype.render=function(e){return r(this,void 0,void 0,function(){var t,n,r,a;return i(this,function(i){switch(i.label){case 0:return[4,this._pipelineWorkerPromise];case 1:return[4,(t=i.sent()).render((0,o.transfer)(e,[e]))];case 2:return n=i.sent(),a=(r=this._benchmark).merge,[4,t._benchmark];case 3:return a.apply(r,[i.sent()]),[2,n]}})})},e.prototype.setDeferInputFrameDownscale=function(e){return r(this,void 0,void 0,function(){return i(this,function(t){switch(t.label){case 0:return[4,this._pipelineWorkerPromise];case 1:return[2,t.sent().setDeferInputFrameDownscale(e)]}})})},e.prototype.setMaskBlurRadius=function(e){return r(this,void 0,void 0,function(){return i(this,function(t){switch(t.label){case 0:return[4,this._pipelineWorkerPromise];case 1:return[2,t.sent().setMaskBlurRadius(e)]}})})},e}();t.BackgroundProcessorPipelineProxy=u},84094:function(e,t,n){var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{s(r.next(e))}catch(e){o(e)}}function u(e){try{s(r.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,u)}s((r=r.apply(e,t||[])).next())})},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(u){return function(s){return function(u){if(n)throw TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(a=0)),a;)try{if(n=1,r&&(i=2&u[0]?r.return:u[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,u[1])).done)return i;switch(r=0,i&&(u=[2&u[0],i.value]),u[0]){case 0:case 1:i=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,r=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===u[0]||2===u[0])){a=0;continue}if(3===u[0]&&(!i||u[1]>i[0]&&u[1]<i[3])){a.label=u[1];break}if(6===u[0]&&a.label<i[1]){a.label=i[1],i=u;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(u);break}i[2]&&a.ops.pop(),a.trys.pop();continue}u=t.call(e,a)}catch(e){u=[6,e],r=0}finally{n=i=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,s])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.GaussianBlurBackgroundProcessorPipeline=void 0;var u=n(25590),s=n(63608),c=function(e){function t(t){var n=e.call(this,t,function(){return n._resetGaussianBlurFilterPipeline()})||this;n._gaussianBlurFilterPipeline=null;var r=t.blurFilterRadius;return n._blurFilterRadius=r,n}return i(t,e),t.prototype.setBlurFilterRadius=function(e){var t;return o(this,void 0,void 0,function(){return a(this,function(n){return this._blurFilterRadius=e,[2,null===(t=this._gaussianBlurFilterPipeline)||void 0===t?void 0:t.updateRadius(this._blurFilterRadius)]})})},t.prototype._setBackground=function(e){var t=this._blurFilterRadius,n=this._outputCanvas,r=this._webgl2Canvas,i=n.getContext("2d");if(u.isCanvasBlurSupported){i.filter="blur(".concat(t,"px)"),i.drawImage(e,0,0),i.filter="none";return}this._gaussianBlurFilterPipeline||this._resetGaussianBlurFilterPipeline(),this._gaussianBlurFilterPipeline.render(),i.drawImage(r,0,0)},t.prototype._resetGaussianBlurFilterPipeline=function(){var e,t=this._blurFilterRadius,n=this._webgl2Canvas;null===(e=this._gaussianBlurFilterPipeline)||void 0===e||e.cleanUp(),this._gaussianBlurFilterPipeline=new s.GaussianBlurFilterPipeline(n,t),this._gaussianBlurFilterPipeline.updateRadius(t)},t}
1(n(54259).BackgroundProcessorPipeline);t.GaussianBlurBackgroundProcessorPipeline=c},68197:function(e,t,n){var r,i,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{s(r.next(e))}catch(e){o(e)}}function u(e){try{s(r.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,u)}s((r=r.apply(e,t||[])).next())})},u=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(u){return function(s){return function(u){if(n)throw TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(a=0)),a;)try{if(n=1,r&&(i=2&u[0]?r.return:u[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,u[1])).done)return i;switch(r=0,i&&(u=[2&u[0],i.value]),u[0]){case 0:case 1:i=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,r=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===u[0]||2===u[0])){a=0;continue}if(3===u[0]&&(!i||u[1]>i[0]&&u[1]<i[3])){a.label=u[1];break}if(6===u[0]&&a.label<i[1]){a.label=i[1],i=u;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(u);break}i[2]&&a.ops.pop(),a.trys.pop();continue}u=t.call(e,a)}catch(e){u=[6,e],r=0}finally{n=i=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,s])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.GaussianBlurBackgroundProcessorPipelineProxy=void 0;var s=n(54375),c=n(25948),l=n(27287),p=function(e){function t(t){var n=this,r=new l.CorsWorker("".concat(t.assetsPath).concat(c.TWILIO_GAUSSIAN_BLUR_BACKGROUND_PROCESSOR_PIPELINE_WORKER)).workerPromise.then(function(e){return i||(i=(0,s.wrap)(e)),new i(t)});return(n=e.call(this,r)||this)._pipelineWorkerPromise=r,n}return o(t,e),t.prototype.setBlurFilterRadius=function(e){return a(this,void 0,void 0,function(){return u(this,function(t){switch(t.label){case 0:return[4,this._pipelineWorkerPromise];case 1:return[2,t.sent().setBlurFilterRadius(e)]}})})},t}
1(n(1301).BackgroundProcessorPipelineProxy);t.GaussianBlurBackgroundProcessorPipelineProxy=p},95912:function(e,t){var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{s(r.next(e))}catch(e){o(e)}}function u(e){try{s(r.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,u)}s((r=r.apply(e,t||[])).next())})},r=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(u){return function(s){return function(u){if(n)throw TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(a=0)),a;)try{if(n=1,r&&(i=2&u[0]?r.return:u[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,u[1])).done)return i;switch(r=0,i&&(u=[2&u[0],i.value]),u[0]){case 0:case 1:i=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,r=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===u[0]||2===u[0])){a=0;continue}if(3===u[0]&&(!i||u[1]>i[0]&&u[1]<i[3])){a.label=u[1];break}if(6===u[0]&&a.label<i[1]){a.label=i[1],i=u;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(u);break}i[2]&&a.ops.pop(),a.trys.pop();continue}u=t.call(e,a)}catch(e){u=[6,e],r=0}finally{n=i=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,s])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.InputFrameDowscaleStage=void 0;var i=function(){function e(e,t){this._inputFrameDownscaleMode=t,this._outputContext=e.getContext("2d",{willReadFrequently:!0})}return e.prototype.render=function(e){return n(this,void 0,void 0,function(){var t,n,i,o,a,u,s;return r(this,function(r){switch(r.label){case 0:if(t=this,n=t._outputContext,i=t._inputFrameDownscaleMode,a=(o=n.canvas).height,u=o.width,"image-bitmap"!==i)return[3,2];return[4,createImageBitmap(e,{resizeWidth:u,resizeHeight:a,resizeQuality:"pixelated"})];case 1:return s=r.sent(),n.drawImage(s,0,0),s.close(),[3,3];case 2:n.drawImage(e,0,0,u,a),r.label=3;case 3:return[2,n.getImageData(0,0,u,a).data]}})})},e}();t.InputFrameDowscaleStage=i},13935:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.PostProcessingStage=void 0;var r=n(52778),i=function(){function e(e,t,n,r,i){this._personMaskUpscalePipeline=null,this._inputDimensions=e,this._maskBlurRadius=r,this._outputContext=n.getContext("2d"),this._webgl2Canvas=t,this._setBackground=i}return e.prototype.render=function(e,t){var n=this._outputContext,r=this._setBackground,i=this._webgl2Canvas;this._personMaskUpscalePipeline||this.resetPersonMaskUpscalePipeline(),this._personMaskUpscalePipeline.render(e,t),n.save(),n.globalCompositeOperation="copy",n.drawImage(i,0,0),n.globalCompositeOperation="destination-over",r(e),n.restore()},e.prototype.resetPersonMaskUpscalePipeline=function(){var e,t=this._inputDimensions,n=this._maskBlurRadius,i=this._webgl2Canvas;null===(e=this._personMaskUpscalePipeline)||void 0===e||e.cleanUp(),this._personMaskUpscalePipeline=new r.PersonMaskUpscalePipeline(t,i,n),this._personMaskUpscalePipeline.updateBilateralFilterConfig({sigmaSpace:n})},e.prototype.updateMaskBlurRadius=function(e){var t;this._maskBlurRadius!==e&&(this._maskBlurRadius=e,null===(t=this._personMaskUpscalePipeline)||void 0===t||t.updateBilateralFilterConfig({sigmaSpace:e}))},e}();t.PostProcessingStage=i},8625:function(e,t,n){var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{s(r.next(e))}catch(e){o(e)}}function u(e){try{s(r.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,u)}s((r=r.apply(e,t||[])).next())})},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(u){return function(s){return function(u){if(n)throw TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(a=0)),a;)try{if(n=1,r&&(i=2&u[0]?r.return:u[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,u[1])).done)return i;switch(r=0,i&&(u=[2&u[0],i.value]),u[0]){case 0:case 1:i=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,r=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===u[0]||2===u[0])){a=0;continue}if(3===u[0]&&(!i||u[1]>i[0]&&u[1]<i[3])){a.label=u[1];break}if(6===u[0]&&a.label<i[1]){a.label=i[1],i=u;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(u);break}i[2]&&a.ops.pop(),a.trys.pop();continue}u=t.call(e,a)}catch(e){u=[6,e],r=0}finally{n=i=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,s])}}};
1Object.defineProperty(t,"__esModule",{value:!0}),t.VirtualBackgroundProcessorPipeline=void 0;var u=n(65519),s=function(e){function t(t){var n=e.call(this,t)||this,r=t.fitType;return n._backgroundImage=null,n._fitType=r,n}return i(t,e),t.prototype.setBackgroundImage=function(e){var t;return o(this,void 0,void 0,function(){return a(this,function(n){return null===(t=this._backgroundImage)||void 0===t||t.close(),this._backgroundImage=e,[2]})})},t.prototype.setFitType=function(e){return o(this,void 0,void 0,function(){return a(this,function(t){return this._fitType=e,[2]})})},t.prototype._setBackground=function(){var e=this._backgroundImage,t=this._fitType,n=this._outputCanvas;if(e){var r=n.getContext("2d"),i=e.width,o=e.height,a=n.width,s=n.height;if(t===u.ImageFit.Fill)r.drawImage(e,0,0,i,o,0,0,a,s);else if(t===u.ImageFit.None)r.drawImage(e,0,0,i,o);else{var c=this._getFitPosition(i,o,a,s,t),l=c.x,p=c.y,f=c.w,h=c.h;r.drawImage(e,0,0,i,o,l,p,f,h)}}},t.prototype._getFitPosition=function(e,t,n,r,i){var o=n/e,a=n,s=o*t;return(i===u.ImageFit.Contain&&s>r||i===u.ImageFit.Cover&&r>s)&&(a*=o=r/s,s=r),{x:(n-a)/2,y:(r-s)/2,w:a,h:s}},t}(n(54259).BackgroundProcessorPipeline);t.VirtualBackgroundProcessorPipeline=s},79619:function(e,t,n){var r,i,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{s(r.next(e))}catch(e){o(e)}}function u(e){try{s(r.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,u)}s((r=r.apply(e,t||[])).next())})},u=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(u){return function(s){return function(u){if(n)throw TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(a=0)),a;)try{if(n=1,r&&(i=2&u[0]?r.return:u[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,u[1])).done)return i;switch(r=0,i&&(u=[2&u[0],i.value]),u[0]){case 0:case 1:i=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,r=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===u[0]||2===u[0])){a=0;continue}if(3===u[0]&&(!i||u[1]>i[0]&&u[1]<i[3])){a.label=u[1];break}if(6===u[0]&&a.label<i[1]){a.label=i[1],i=u;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(u);break}i[2]&&a.ops.pop(),a.trys.pop();continue}u=t.call(e,a)}catch(e){u=[6,e],r=0}finally{n=i=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,s])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.VirtualBackgroundProcessorPipelineProxy=void 0;var s=n(54375),c=n(25948),l=n(27287),p=function(e){function t(t){var n=this,r=new l.CorsWorker("".concat(t.assetsPath).concat(c.TWILIO_VIRTUAL_BACKGROUND_PROCESSOR_PIPELINE_WORKER)).workerPromise.then(function(e){return i||(i=(0,s.wrap)(e)),new i(t)});return(n=e.call(this,r)||this)._pipelineWorkerPromise=r,n}return o(t,e),t.prototype.setBackgroundImage=function(e){return a(this,void 0,void 0,function(){return u(this,function(t){switch(t.label){case 0:return[4,this._pipelineWorkerPromise];case 1:return[2,t.sent().setBackgroundImage((0,s.transfer)(e,[e]))]}})})},t.prototype.setFitType=function(e){return a(this,void 0,void 0,function(){return u(this,function(t){switch(t.label){case 0:return[4,this._pipelineWorkerPromise];case 1:return[2,t.sent().setFitType(e)]}})})},t}
1(n(1301).BackgroundProcessorPipelineProxy);t.VirtualBackgroundProcessorPipelineProxy=p},29200:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.VirtualBackgroundProcessorPipelineProxy=t.VirtualBackgroundProcessorPipeline=t.GaussianBlurBackgroundProcessorPipelineProxy=t.GaussianBlurBackgroundProcessorPipeline=t.BackgroundProcessorPipelineProxy=t.BackgroundProcessorPipeline=void 0;var r=n(54259);Object.defineProperty(t,"BackgroundProcessorPipeline",{enumerable:!0,get:function(){return r.BackgroundProcessorPipeline}});var i=n(1301);Object.defineProperty(t,"BackgroundProcessorPipelineProxy",{enumerable:!0,get:function(){return i.BackgroundProcessorPipelineProxy}});var o=n(84094);Object.defineProperty(t,"GaussianBlurBackgroundProcessorPipeline",{enumerable:!0,get:function(){return o.GaussianBlurBackgroundProcessorPipeline}});var a=n(68197);Object.defineProperty(t,"GaussianBlurBackgroundProcessorPipelineProxy",{enumerable:!0,get:function(){return a.GaussianBlurBackgroundProcessorPipelineProxy}});var u=n(8625);Object.defineProperty(t,"VirtualBackgroundProcessorPipeline",{enumerable:!0,get:function(){return u.VirtualBackgroundProcessorPipeline}});var s=n(79619);Object.defineProperty(t,"VirtualBackgroundProcessorPipelineProxy",{enumerable:!0,get:function(){return s.VirtualBackgroundProcessorPipelineProxy}})},97423:function(e,t,n){var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.SinglePassGaussianBlurFilterStage=void 0;var o=function(e){function t(t,n,r,i,o){var a=this;void 0===o&&(o=i+1);var u=t.canvas,s=u.height,c=u.width;return(a=e.call(this,{textureName:"u_inputTexture",textureUnit:i},{fragmentShaderSource:"#version 300 es\n          precision highp float;\n\n          uniform sampler2D u_inputTexture;\n          uniform vec2 u_texelSize;\n          uniform float u_direction;\n          uniform float u_radius;\n          uniform float u_gaussianBlurWeights[128];\n\n          in vec2 v_texCoord;\n\n          out vec4 outColor;\n\n          void main() {\n            float totalWeight = u_gaussianBlurWeights[0];\n            vec3 newColor = totalWeight * texture(u_inputTexture, v_texCoord).rgb;\n\n            for (float i = 1.0; i <= u_radius; i += 1.0) {\n              float x = (1.0 - u_direction) * i;\n              float y = u_direction * i;\n\n              vec2 shift = vec2(x, y) * u_texelSize;\n              vec2 coord = vec2(v_texCoord + shift);\n              float weight = u_gaussianBlurWeights[int(i)];\n              newColor += weight * texture(u_inputTexture, coord).rgb;\n              totalWeight += weight;\n\n              shift = vec2(-x, -y) * u_texelSize;\n              coord = vec2(v_texCoord + shift);\n              newColor += weight * texture(u_inputTexture, coord).rgb;\n              totalWeight += weight;\n            }\n\n            newColor /= totalWeight;\n            outColor = vec4(newColor, 1.0);\n          }\n        ",glOut:t,height:s,textureUnit:o,type:r,width:c,uniformVars:[{name:"u_direction",type:"float",values:["vertical"===n?1:0]},{name:"u_texelSize",type:"float",values:[1/c,1/s]}]})||this).updateRadius(0),a}return i(t,e),t.prototype.updateRadius=function(e){var t;this._setUniformVars([{name:"u_radius",type:"float",values:[e]},{name:"u_gaussianBlurWeights",type:"float:v",values:(t=1/Math.sqrt(2*Math.PI)/e,"0".repeat(e+1).split("").map(function(n,r){return t*Math.exp(-.5*r*r/e/e)}))}])},t}(n(86058).WebGL2Pipeline.ProcessingStage);t.SinglePassGaussianBlurFilterStage=o},63608:function(e,t,n){var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});
1Object.defineProperty(t,"__esModule",{value:!0}),t.GaussianBlurFilterPipeline=void 0;var o=n(86058),a=n(97423),u=function(e){function t(t,n){var r=e.call(this)||this;r._isWebGL2Supported=!0,r._outputCanvas=t,r._blurFilterRadius=n;var i=t.getContext("webgl2");return i?r.initializeWebGL2Pipeline(i):(r._isWebGL2Supported=!1,console.warn("Downgraded to Canvas2D for Gaussian blur due to missing WebGL2 support.")),r}return i(t,e),t.prototype.render=function(){this._isWebGL2Supported?e.prototype.render.call(this):this._renderFallback()},t.prototype._renderFallback=function(){this._outputCanvas.getContext("2d").filter="blur(".concat(this._blurFilterRadius,"px)")},t.prototype.initializeWebGL2Pipeline=function(e){this.addStage(new a.SinglePassGaussianBlurFilterStage(e,"horizontal","texture",0,2)),this.addStage(new a.SinglePassGaussianBlurFilterStage(e,"vertical","canvas",2))},t.prototype.updateRadius=function(e){this._blurFilterRadius=e,this._isWebGL2Supported&&this._stages.forEach(function(t){return t.updateRadius(e)})},t.prototype.cleanUp=function(){this._isWebGL2Supported&&e.prototype.cleanUp.call(this)},t}(o.WebGL2Pipeline);t.GaussianBlurFilterPipeline=u},89570:function(e,t,n){var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.SinglePassBilateralFilterStage=void 0;var o=function(e){function t(t,n,r,i,o,a,u){var s=this;void 0===u&&(u=a+1);var c=o.height,l=o.width;return(s=e.call(this,{textureName:"u_segmentationMask",textureUnit:a},{fragmentShaderSource:"#version 300 es\n          precision highp float;\n\n          uniform sampler2D u_inputFrame;\n          uniform sampler2D u_segmentationMask;\n          uniform vec2 u_texelSize;\n          uniform float u_direction;\n          uniform float u_radius;\n          uniform float u_step;\n          uniform float u_spaceWeights[128];\n          uniform float u_colorWeights[256];\n\n          in vec2 v_texCoord;\n\n          out vec4 outColor;\n\n          float calculateColorWeight(vec2 coord, vec3 centerColor) {\n            vec3 coordColor = texture(u_inputFrame, coord).rgb;\n            float x = distance(centerColor, coordColor);\n            return u_colorWeights[int(x * 255.0)];\n          }\n\n          float edgePixelsAverageAlpha(float outAlpha) {\n            float totalAlpha = outAlpha;\n            float totalPixels = 1.0;\n\n            for (float i = -u_radius; u_radius > 0.0 && i <= u_radius; i += u_radius) {\n              for (float j = -u_radius; j <= u_radius; j += u_radius * (j == 0.0 ? 2.0 : 1.0)) {\n                vec2 shift = vec2(i, j) * u_texelSize;\n                vec2 coord = vec2(v_texCoord + shift);\n                totalAlpha += texture(u_segmentationMask, coord).a;\n                totalPixels++;\n              }\n            }\n\n            return totalAlpha / totalPixels;\n          }\n\n          void main() {\n            vec3 centerColor = texture(u_inputFrame, v_texCoord).rgb;\n            float outAlpha = texture(u_segmentationMask, v_texCoord).a;\n            float averageAlpha = edgePixelsAverageAlpha(outAlpha);\n            float totalWeight = 1.0;\n\n            if (averageAlpha == 0.0 || averageAlpha == 1.0) {\n              outColor = vec4(averageAlpha * centerColor, averageAlpha);\n              return;\n            }\n\n            for (float i = 1.0; i <= u_radius; i += u_step) {\n              float x = (1.0 - u_direction) * i;\n              float y = u_direction * i;\n              vec2 shift = vec2(x, y) * u_texelSize;\n              vec2 coord = vec2(v_texCoord + shift);\n              float spaceWeight = u_spaceWeights[int(i - 1.0)];\n              float colorWeight = calculateColorWeight(coord, centerColor);\n              float weight = spaceWeight * colorWeight;\n              float alpha = texture(u_segmentationMask, coord).a;\n              totalWeight += weight;\n              outAlpha += weight * alpha;\n\n              shift = vec2(-x, -y) * u_texelSize;\n              coord = vec2(v_texCoord + shift);\n              colorWeight = calculateColorWeight(coord, centerColor);\n              weight = spaceWeight * colorWeight;\n              alpha = texture(u_segmentationMask, coord).a;\n              totalWeight += weight;\n              outAlpha += weight * alpha;\n            }\n\n            outAlpha /= totalWeight;
1\n            outColor = vec4(outAlpha * centerColor, outAlpha);\n          }\n        ",glOut:t,height:c,textureUnit:u,type:r,width:l,uniformVars:[{name:"u_inputFrame",type:"int",values:[0]},{name:"u_direction",type:"float",values:["vertical"===n?1:0]},{name:"u_texelSize",type:"float",values:[1/l,1/c]}]})||this)._direction=n,s._inputDimensions=i,s.updateSigmaColor(0),s.updateSigmaSpace(0),s}return i(t,e),t.prototype.updateSigmaColor=function(e){this._setUniformVars([{name:"u_colorWeights",type:"float:v",values:"0".repeat(256).split("").map(function(t,n){var r=n/255;return Math.exp(-.5*r*r/e/e)})}])},t.prototype.updateSigmaSpace=function(e){var t,n=this._inputDimensions,r=n.height,i=n.width,o=this._outputDimensions,a=o.height,u=o.width,s=Math.floor(.5*(e*=Math.max(u/i,a/r))/Math.log(e)),c=Math.max(1/u,1/a)*e,l=1/("horizontal"===this._direction?u:a);this._setUniformVars([{name:"u_radius",type:"float",values:[e]},{name:"u_spaceWeights",type:"float:v",values:(t=e,"0".repeat(t).split("").map(function(e,t){var n=(t+1)*l;return Math.exp(-.5*n*n/c/c)}))},{name:"u_step",type:"float",values:[s]}])},t}(n(86058).WebGL2Pipeline.ProcessingStage);t.SinglePassBilateralFilterStage=o},52778:function(e,t,n){var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.PersonMaskUpscalePipeline=void 0;var o=n(86058),a=n(89570),u=function(e){function t(t,n,r){var i=e.call(this)||this;i._isWebGL2Supported=!0,i._outputCanvas=n,i._inputDimensions=t,i._maskBlurRadius=r;var o=n.getContext("webgl2");return o?i.initializeWebGL2Pipeline(o):(i._isWebGL2Supported=!1,console.warn("Downgraded to Canvas2D for person mask upscaling due to missing WebGL2 support.")),i}return i(t,e),t.prototype.initializeWebGL2Pipeline=function(e){var t={height:this._outputCanvas.height,width:this._outputCanvas.width};this.addStage(new o.WebGL2Pipeline.InputStage(e)),this.addStage(new a.SinglePassBilateralFilterStage(e,"horizontal","texture",this._inputDimensions,t,1,2)),this.addStage(new a.SinglePassBilateralFilterStage(e,"vertical","canvas",this._inputDimensions,t,2))},t.prototype.render=function(t,n){this._isWebGL2Supported?e.prototype.render.call(this,t,n):this._renderFallback(t,n)},t.prototype._renderFallback=function(e,t){var n=new OffscreenCanvas(t.width,t.height);n.getContext("2d").putImageData(t,0,0);var r=this._outputCanvas.getContext("2d");r.save(),r.filter="blur(".concat(this._maskBlurRadius,"px)"),r.globalCompositeOperation="copy",r.drawImage(n,0,0,this._outputCanvas.width,this._outputCanvas.height),r.filter="none",r.globalCompositeOperation="source-in",r.drawImage(e,0,0,this._outputCanvas.width,this._outputCanvas.height),r.restore()},t.prototype.updateBilateralFilterConfig=function(e){var t=e.sigmaSpace;if("number"==typeof t){if(!this._isWebGL2Supported){this._maskBlurRadius=t;return}this._stages.slice(1).forEach(function(e){e.updateSigmaColor(.1),e.updateSigmaSpace(t)})}},t.prototype.cleanUp=function(){this._isWebGL2Supported&&e.prototype.cleanUp.call(this)},t}(o.WebGL2Pipeline);t.PersonMaskUpscalePipeline=u},91043:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Pipeline=void 0;var n=function(){function e(){this._stages=[]}return e.prototype.addStage=function(e){this._stages.push(e)},e.prototype.render=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];
1this._stages.forEach(function(t){t.render.apply(t,e)})},e}();t.Pipeline=n},86058:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.WebGL2Pipeline=t.Pipeline=void 0;var r=n(91043);Object.defineProperty(t,"Pipeline",{enumerable:!0,get:function(){return r.Pipeline}});var i=n(3998);Object.defineProperty(t,"WebGL2Pipeline",{enumerable:!0,get:function(){return i.WebGL2Pipeline}})},64678:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.WebGL2PipelineInputStage=void 0;var r=n(79310),i=function(){function e(e){this._inputTexture=null;var t=e.canvas,n=t.height,i=t.width;this._glOut=e,this._inputFrameTexture=(0,r.createTexture)(e,e.RGBA8,i,n,e.NEAREST,e.NEAREST)}return e.prototype.cleanUp=function(){var e=this._glOut,t=this._inputFrameTexture,n=this._inputTexture;e.deleteTexture(t),e.deleteTexture(n)},e.prototype.render=function(e,t){var n=this._glOut,i=this._inputFrameTexture,o=n.canvas,a=o.height,u=o.width;if(n.viewport(0,0,u,a),n.clearColor(0,0,0,0),n.clear(n.COLOR_BUFFER_BIT),e&&(n.activeTexture(n.TEXTURE0),n.bindTexture(n.TEXTURE_2D,i),n.texSubImage2D(n.TEXTURE_2D,0,0,0,u,a,n.RGBA,n.UNSIGNED_BYTE,e)),t){var s=t.data,c=t.height,l=t.width;this._inputTexture||(this._inputTexture=(0,r.createTexture)(n,n.RGBA8,l,c,n.NEAREST,n.NEAREST)),n.viewport(0,0,l,c),n.activeTexture(n.TEXTURE1),n.bindTexture(n.TEXTURE_2D,this._inputTexture),n.texSubImage2D(n.TEXTURE_2D,0,0,0,l,c,n.RGBA,n.UNSIGNED_BYTE,s)}},e}();t.WebGL2PipelineInputStage=i},84522:function(e,t,n){var r=this&&this.__spreadArray||function(e,t,n){if(n||2==arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.WebGL2PipelineProcessingStage=void 0;var i=n(79310),o=function(){function e(e,t){this._outputFramebuffer=null,this._outputTexture=null;var n=e.textureName,o=e.textureUnit,a=t.glOut;this._glOut=a;var u=t.fragmentShaderSource,s=t.height,c=void 0===s?a.canvas.height:s,l=t.textureUnit,p=void 0===l?o+1:l,f=t.type,h=t.uniformVars,d=t.vertexShaderSource,_=t.width,g=void 0===_?a.canvas.width:_;this._outputDimensions={height:c,width:g},this._outputTextureUnit=p,this._fragmentShader=(0,i.compileShader)(a,a.FRAGMENT_SHADER,u),this._vertexShader=(0,i.compileShader)(a,a.VERTEX_SHADER,void 0===d?"#version 300 es\n        in vec2 a_position;\n        in vec2 a_texCoord;\n\n        out vec2 v_texCoord;\n\n        void main() {\n          gl_Position = vec4(a_position".concat("canvas"===f?" * vec2(1.0, -1.0)":"",", 0.0, 1.0);\n          v_texCoord = a_texCoord;\n        }\n      "):d),this._positionBuffer=(0,i.initBuffer)(a,[-1,-1,1,-1,-1,1,1,1]),this._texCoordBuffer=(0,i.initBuffer)(a,[0,0,1,0,0,1,1,1]),"texture"===f&&(this._outputTexture=(0,i.createTexture)(a,a.RGBA8,g,c),this._outputFramebuffer=a.createFramebuffer(),a.bindFramebuffer(a.FRAMEBUFFER,this._outputFramebuffer),a.framebufferTexture2D(a.FRAMEBUFFER,a.COLOR_ATTACHMENT0,a.TEXTURE_2D,this._outputTexture,0));var v=(0,i.createPipelineStageProgram)(a,this._vertexShader,this._fragmentShader,this._positionBuffer,this._texCoordBuffer);this._program=v,this._setUniformVars(r([{name:n,type:"int",values:[o]}],void 0===h?[]:h,!0))}return e.prototype.cleanUp=function(){var e=this._fragmentShader,t=this._glOut,n=this._positionBuffer,r=this._program,i=this._texCoordBuffer,o=this._vertexShader;t.deleteProgram(r),t.deleteBuffer(i),t.deleteBuffer(n),t.deleteShader(o),t.deleteShader(e)},e.prototype.render=function(){var e=this._glOut,t=this._outputDimensions,n=t.height,r=t.width,i=this._outputFramebuffer,o=this._outputTexture,a=this._outputTextureUnit,u=this._program;e.viewport(0,0,r,n),e.useProgram(u),o&&(e.activeTexture(e.TEXTURE0+a),e.bindTexture(e.TEXTURE_2D,o)),e.bindFramebuffer(e.FRAMEBUFFER,i),e.drawArrays(e.TRIANGLE_STRIP,0,4)},e.prototype._setUniformVars=function(e){var t=this._glOut,n=this._program;t.useProgram(n),e.forEach(function(e){var i=e.name,o=e.type,a=e.values,u=t.getUniformLocation(n,i);"v"===o.split(":")[1]?t["uniform1".concat(o[0],"v")](u,a):t["uniform".concat(a.length).concat(o[0])].apply(t,r([u],a,!1))})},e}();t.WebGL2PipelineProcessingStage=o},3998:function(e,t,n){var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]}
1)instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.WebGL2Pipeline=void 0;var o=n(91043),a=n(64678),u=n(84522),s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._stages=[],t}return i(t,e),t.prototype.cleanUp=function(){this._stages.forEach(function(e){return e.cleanUp()})},t.prototype.render=function(e,t){var n=this._stages,r=n[0],i=n.slice(1);r.render(e,t),i.forEach(function(e){return e.render()})},t.InputStage=a.WebGL2PipelineInputStage,t.ProcessingStage=u.WebGL2PipelineProcessingStage,t}(o.Pipeline);t.WebGL2Pipeline=s},79310:function(e,t){function n(e,t,n){var r=e.createProgram();if(e.attachShader(r,t),e.attachShader(r,n),e.linkProgram(r),!e.getProgramParameter(r,e.LINK_STATUS))throw Error("Could not link WebGL program: ".concat(e.getProgramInfoLog(r)));return r}Object.defineProperty(t,"__esModule",{value:!0}),t.initBuffer=t.createTexture=t.compileShader=t.createProgram=t.createPipelineStageProgram=void 0,t.createPipelineStageProgram=function(e,t,r,i,o){var a=n(e,t,r),u=e.getAttribLocation(a,"a_position");e.enableVertexAttribArray(u),e.bindBuffer(e.ARRAY_BUFFER,i),e.vertexAttribPointer(u,2,e.FLOAT,!1,0,0);var s=e.getAttribLocation(a,"a_texCoord");return e.enableVertexAttribArray(s),e.bindBuffer(e.ARRAY_BUFFER,o),e.vertexAttribPointer(s,2,e.FLOAT,!1,0,0),a},t.createProgram=n,t.compileShader=function(e,t,n){var r=e.createShader(t);if(e.shaderSource(r,n),e.compileShader(r),!e.getShaderParameter(r,e.COMPILE_STATUS))throw Error("Could not compile shader: ".concat(e.getShaderInfoLog(r)));return r},t.createTexture=function(e,t,n,r,i,o){void 0===i&&(i=e.NEAREST),void 0===o&&(o=e.NEAREST);var a=e.createTexture();return e.bindTexture(e.TEXTURE_2D,a),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,i),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,o),e.texStorage2D(e.TEXTURE_2D,1,t,n,r),a},t.initBuffer=function(e,t){var n=e.createBuffer();return e.bindBuffer(e.ARRAY_BUFFER,n),e.bufferData(e.ARRAY_BUFFER,new Float32Array(t),e.STATIC_DRAW),n}},65519:function(e,t){var n,r;Object.defineProperty(t,"__esModule",{value:!0}),t.ImageFit=void 0,(r=n||(t.ImageFit=n={})).Contain="Contain",r.Cover="Cover",r.Fill="Fill",r.None="None"},61125:function(e,t){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.Benchmark=void 0;var r=function(){function e(){this._timingCache=new Map,this._timings=new Map}return e.prototype.end=function(e){var t=this._timings.get(e);t&&(t.end=Date.now(),t.delay=t.end-t.start,this._save(e,n({},t)))},e.prototype.getAverageDelay=function(e){var t=this._timingCache.get(e);if(t&&t.length)return t.map(function(e){return e.delay}).reduce(function(e,t){return e+t},0)/t.length},e.prototype.getNames=function(){return Array.from(this._timingCache.keys())},e.prototype.getRate=function(e){var t=this._timingCache.get(e);if(t&&!(t.length<2)){var n=t[t.length-1].end-t[0].start;return t.length/n*1e3}},e.prototype.merge=function(e){var t=this,n=e._timingCache,r=e._timings;n.forEach(function(e,n){return t._timingCache.set(n,e)}),r.forEach(function(e,n){return t._timings.set(n,e)})},e.prototype.start=function(e){var t=this._timings.get(e);t||(t={},this._timings.set(e,t)),t.start=Date.now(),delete t.end,delete t.delay},e.prototype._save=function(t,n){var r=this._timingCache.get(t);r||(r=[],this._timingCache.set(t,r)),r.push(n),r.length>e.cacheSize&&r.splice(0,r.length-e.cacheSize)},e.cacheSize=41,e}();t.Benchmark=r},27287:function(e,t){var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Prom
1ise))(function(i,o){function a(e){try{s(r.next(e))}catch(e){o(e)}}function u(e){try{s(r.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,u)}s((r=r.apply(e,t||[])).next())})},r=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(u){return function(s){return function(u){if(n)throw TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(a=0)),a;)try{if(n=1,r&&(i=2&u[0]?r.return:u[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,u[1])).done)return i;switch(r=0,i&&(u=[2&u[0],i.value]),u[0]){case 0:case 1:i=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,r=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===u[0]||2===u[0])){a=0;continue}if(3===u[0]&&(!i||u[1]>i[0]&&u[1]<i[3])){a.label=u[1];break}if(6===u[0]&&a.label<i[1]){a.label=i[1],i=u;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(u);break}i[2]&&a.ops.pop(),a.trys.pop();continue}u=t.call(e,a)}catch(e){u=[6,e],r=0}finally{n=i=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,s])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.CorsWorker=void 0;var i=function(e){var t=fetch;fetch=function(n,r){return t("".concat(e).concat(n),r)}},o=function(e){var t=importScripts;importScripts=function(n){return t("".concat(e).concat(n))}},a=function(){function e(e){!/:\/\//.test(e)||new RegExp("^".concat(window.location.origin)).test(e)?this.workerPromise=this._loadSameOrigin(e):this.workerPromise=this._loadCrossOrigin(e)}return e.prototype._loadCrossOrigin=function(e){return n(this,void 0,void 0,function(){var t,n,a,u,s;return r(this,function(r){switch(r.label){case 0:return[4,fetch(e)];case 1:return[4,r.sent().text()];case 2:return t=r.sent(),n="application/javascript",a="".concat(e.split("/").slice(0,-1).join("/"),"/"),u=["data:".concat(n,","),encodeURIComponent("(".concat(i,')("').concat(a,'");')),encodeURIComponent("(".concat(o,')("').concat(a,'");')),encodeURIComponent(t)].join(""),s=new Blob(['importScripts("'.concat(u,'")')],{type:n}),[2,new Worker(URL.createObjectURL(s))]}})})},e.prototype._loadSameOrigin=function(e){return n(this,void 0,void 0,function(){return r(this,function(t){return[2,new Worker(e)]})})},e}();t.CorsWorker=a},35823:function(e,t){var n,r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{s(r.next(e))}catch(e){o(e)}}function u(e){try{s(r.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,u)}s((r=r.apply(e,t||[])).next())})},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(u){return function(s){return function(u){if(n)throw TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(a=0)),a;)try{if(n=1,r&&(i=2&u[0]?r.return:u[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,u[1])).done)return i;switch(r=0,i&&(u=[2&u[0],i.value]),u[0]){case 0:case 1:i=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,r=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===u[0]||2===u[0])){a=0;continue}if(3===u[0]&&(!i||u[1]>i[0]&&u[1]<i[3])){a.label=u[1];break}if(6===u[0]&&a.label<i[1]){a.label=i[1],i=u;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(u);break}i[2]&&a.ops.pop(),a.trys.pop();continue}u=t.call(e,a)}catch(e){u=[6,e],r=0}finally{n=i=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,s])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.TwilioTFLite=void 0;var o="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,a=new Set,u=function(){function e(){this._inputBuffer=null,this._isSimdEnabled=null,this._tflite=null}return Object.defineProperty(e.prototype,"isSimdEnabled",{get:function(){return this._isSimdEnabled}
1,enumerable:!1,configurable:!0}),e.prototype.initialize=function(e,t,a,u){return r(this,void 0,void 0,function(){var r,s,c,l;return i(this,function(i){switch(i.label){case 0:if(this._tflite)return[2];return o&&(e=""),[4,Promise.all([this._loadWasmModule(e,a,u),fetch("".concat(e).concat(t))])];case 1:if(r=i.sent()[1],s=n)return[3,3];return[4,r.arrayBuffer()];case 2:s=i.sent(),i.label=3;case 3:return n=s,l=(c=this._tflite)._getModelBufferMemoryOffset(),c.HEAPU8.set(new Uint8Array(n),l),c._loadModel(n.byteLength),[2]}})})},e.prototype.loadInputBuffer=function(e){for(var t=this._tflite,n=t._getInputHeight(),r=t._getInputWidth()*n,i=t._getInputMemoryOffset()/4,o=0;o<r;o++){var a=i+3*o,u=4*o;t.HEAPF32[a]=e[u]/255,t.HEAPF32[a+1]=e[u+1]/255,t.HEAPF32[a+2]=e[u+2]/255}this._inputBuffer=e},e.prototype.runInference=function(){var e=this._tflite,t=e._getInputHeight(),n=e._getInputWidth()*t,r=e._getOutputMemoryOffset()/4;e._runInference();for(var i=this._inputBuffer||new Uint8ClampedArray(4*n),o=0;o<n;o++)i[4*o+3]=Math.round(255*e.HEAPF32[r+o]);return i},e.prototype._loadScript=function(e){return r(this,void 0,void 0,function(){return i(this,function(t){return a.has(e)?[2]:o?(importScripts(e),a.add(e),[2]):[2,new Promise(function(t,n){var r=document.createElement("script");r.onload=function(){a.add(e),t()},r.onerror=function(){n()},document.head.append(r),r.src=e})]})})},e.prototype._loadWasmModule=function(e,t,n){return r(this,void 0,void 0,function(){var r,o;return i(this,function(i){switch(i.label){case 0:return i.trys.push([0,3,,6]),[4,this._loadScript("".concat(e).concat(n))];case 1:return i.sent(),r=this,[4,createTwilioTFLiteSIMDModule()];case 2:return r._tflite=i.sent(),this._isSimdEnabled=!0,[3,6];case 3:return i.sent(),[4,this._loadScript("".concat(e).concat(t))];case 4:return i.sent(),o=this,[4,createTwilioTFLiteModule()];case 5:return o._tflite=i.sent(),this._isSimdEnabled=!1,[3,6];case 6:return[2]}})})},e}();t.TwilioTFLite=u},25590:function(e,t){var n,r,i,o,a=this&&this.__spreadArray||function(e,t,n){if(n||2==arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))};function u(){return"undefined"!=typeof OffscreenCanvas?new OffscreenCanvas(1,1):document.createElement("canvas")}function s(){return null!==function(){if("undefined"==typeof window||"undefined"==typeof document)return null;var e=u();return e.getContext("webgl2")?"webgl2":e.getContext("2d")?"2d":null}()}Object.defineProperty(t,"__esModule",{value:!0}),t.isSupported=t.isCanvasBlurSupported=t.isChromiumImageBitmap=t.isBrowserSupported=void 0,t.isBrowserSupported=s,t.isChromiumImageBitmap=function(){return/Chrome/.test(navigator.userAgent)&&"function"==typeof createImageBitmap},t.isCanvasBlurSupported=(r=new ImageData(new Uint8ClampedArray(a(a(a(a(a(a(a(a(a([],n=[0,0,0,255],!0),n,!0),n,!0),n,!0),[255,255,255,255],!0),n,!0),n,!0),n,!0),n,!0)),3,3),o=(i=u()).getContext("2d"),i.width=3,i.height=3,o.putImageData(r,0,0),o.filter="blur(1px)",o.drawImage(i,0,0),o.getImageData(0,0,3,3).data[0]>0),t.isSupported=s()},37347:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0,t.version="3.1.0"},54375:function(e,t,n){n.r(t),n.d(t,{createEndpoint:function(){return i},expose:function(){return l},finalizer:function(){return a},proxy:function(){return b},proxyMarker:function(){return r},releaseProxy:function(){return o},transfer:function(){return m},transferHandlers:function(){return c},windowEndpoint:function(){return P},wrap:function(){return f}});let r=Symbol("Comlink.proxy"),i=Symbol("Comlink.endpoint"),o=Symbol("Comlink.releaseProxy"),a=Symbol("Comlink.finalizer"),u=Symbol("Comlink.thrown"),s=e=>"object"==typeof e&&null!==e||"function"==typeof e,c=new Map([["proxy",{canHandle:e=>s(e)&&e[r],serialize(e){let{port1:t,port2:n}=new MessageChannel;return l(e,t),[n,[n]]},deserialize:e=>(e.start(),f(e))}],["throw",{canHandle:e=>s(e)&&u in e,serialize:({value:e})=>[e instanceof Error?{isError:!0,value:{message:e.message,name:e.name,stack:e.stack}}:{isError:!1,value:e},[]],deserialize(e){if(e.isError)throw Object.assign(Error(e.value.message),e.value);throw e.value}}]]);function l(e,t=globalThis,n=["*"]){t.addEventListener("message",function r(i){let o;if(!i||!i.data)return;if(!function(e,t){for(let n of e)if(t===n||"*"===n||n instanceof RegExp&&n.test(t))return!0;return!1}(n,i.origin)){console.warn(`Invalid origin '${i.origin}' for comlink proxy`);return}let{id:s,type:c,path:f}=Object.assign({path:[]},i.data),h=(i.data.argumentList||[]).map(S);try{let t=f.slice(0,-1).reduce((e,t)=>
1e[t],e),n=f.reduce((e,t)=>e[t],e);switch(c){case"GET":o=n;break;case"SET":t[f.slice(-1)[0]]=S(i.data.value),o=!0;break;case"APPLY":o=n.apply(t,h);break;case"CONSTRUCT":{let e=new n(...h);o=b(e)}break;case"ENDPOINT":{let{port1:t,port2:n}=new MessageChannel;l(e,n),o=m(t,[t])}break;case"RELEASE":o=void 0;break;default:return}}catch(e){o={value:e,[u]:0}}Promise.resolve(o).catch(e=>({value:e,[u]:0})).then(n=>{let[i,o]=w(n);t.postMessage(Object.assign(Object.assign({},i),{id:s}),o),"RELEASE"===c&&(t.removeEventListener("message",r),p(t),a in e&&"function"==typeof e[a]&&e[a]())}).catch(e=>{let[n,r]=w({value:TypeError("Unserializable return value"),[u]:0});t.postMessage(Object.assign(Object.assign({},n),{id:s}),r)})}),t.start&&t.start()}function p(e){"MessagePort"===e.constructor.name&&e.close()}function f(e,t){let n=new Map;return e.addEventListener("message",function(e){let{data:t}=e;if(!t||!t.id)return;let r=n.get(t.id);if(r)try{r(t)}finally{n.delete(t.id)}}),function e(t,n,r=[],a=function(){}){let u=!1,s=new Proxy(a,{get(i,a){if(h(u),a===o)return()=>{g&&g.unregister(s),d(t),n.clear(),u=!0};if("then"===a){if(0===r.length)return{then:()=>s};let e=x(t,n,{type:"GET",path:r.map(e=>e.toString())}).then(S);return e.then.bind(e)}return e(t,n,[...r,a])},set(e,i,o){h(u);let[a,s]=w(o);return x(t,n,{type:"SET",path:[...r,i].map(e=>e.toString()),value:a},s).then(S)},apply(o,a,s){h(u);let c=r[r.length-1];if(c===i)return x(t,n,{type:"ENDPOINT"}).then(S);if("bind"===c)return e(t,n,r.slice(0,-1));let[l,p]=v(s);return x(t,n,{type:"APPLY",path:r.map(e=>e.toString()),argumentList:l},p).then(S)},construct(e,i){h(u);let[o,a]=v(i);return x(t,n,{type:"CONSTRUCT",path:r.map(e=>e.toString()),argumentList:o},a).then(S)}});return function(e,t){let n=(_.get(t)||0)+1;_.set(t,n),g&&g.register(e,t,e)}(s,t),s}(e,n,[],t)}function h(e){if(e)throw Error("Proxy has been released and is not useable")}function d(e){return x(e,new Map,{type:"RELEASE"}).then(()=>{p(e)})}let _=new WeakMap,g="FinalizationRegistry"in globalThis&&new FinalizationRegistry(e=>{let t=(_.get(e)||0)-1;_.set(e,t),0===t&&d(e)});function v(e){var t;let n=e.map(w);return[n.map(e=>e[0]),(t=n.map(e=>e[1]),Array.prototype.concat.apply([],t))]}let y=new WeakMap;function m(e,t){return y.set(e,t),e}function b(e){return Object.assign(e,{[r]:!0})}function P(e,t=globalThis,n="*"){return{postMessage:(t,r)=>e.postMessage(t,n,r),addEventListener:t.addEventListener.bind(t),removeEventListener:t.removeEventListener.bind(t)}}function w(e){for(let[t,n]of c)if(n.canHandle(e)){let[r,i]=n.serialize(e);return[{type:"HANDLER",name:t,value:r},i]}return[{type:"RAW",value:e},y.get(e)||[]]}function S(e){switch(e.type){case"HANDLER":return c.get(e.name).deserialize(e.value);case"RAW":return e.value}}function x(e,t,n,r){return new Promise(i=>{let o=[,,,,].fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-");t.set(o,i),e.start&&e.start(),e.postMessage(Object.assign({id:o},n),r)})}}}]);
2//# sourceMappingURL=1464.83fe3f72874bac29.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.