├── .babelrc ├── .github └── workflows │ └── tests-functional.yml ├── .gitignore ├── .npmignore ├── .stylelintrc.json ├── .testrc.json ├── LICENSE ├── README.md ├── cypress.config.js ├── dist ├── clappr-ima-plugin.js └── clappr-ima-plugin.min.js ├── eslint.config.mjs ├── package.json ├── public ├── index.html └── tests │ └── vmap_spec.html ├── src ├── index.js └── style.sass ├── tests ├── functional │ └── vmap_spec.js └── support │ ├── event-dom-storage.js │ └── index.js ├── webpack.config.js └── yarn.lock /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [["@babel/preset-env", { 3 | "modules": "commonjs", 4 | "corejs": "3", 5 | "useBuiltIns": "usage" 6 | }]] 7 | } 8 | -------------------------------------------------------------------------------- /.github/workflows/tests-functional.yml: -------------------------------------------------------------------------------- 1 | name: Functional tests 2 | 3 | on: [pull_request] 4 | 5 | jobs: 6 | test: 7 | runs-on: ubuntu-latest 8 | steps: 9 | - uses: actions/checkout@v4 10 | - uses: actions/setup-node@v4 11 | with: 12 | node-version: 20 13 | - run: yarn 14 | - run: yarn lint 15 | - run: yarn test 16 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | *.log -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | .babelrc 2 | cypress.config.js 3 | .eslintrc.json 4 | .github 5 | .gitignore 6 | node_modules 7 | public 8 | src 9 | .stylelintrc.json 10 | .testrc.json 11 | tests 12 | webpack.config.js 13 | yarn.lock 14 | -------------------------------------------------------------------------------- /.stylelintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "stylelint-config-recommended", 3 | "customSyntax": "postcss-sass" 4 | } -------------------------------------------------------------------------------- /.testrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "http-server": { 3 | "cmd": [ "webpack", "serve", "--mode", "development" ], 4 | "log": { 5 | "type": "output" 6 | }, 7 | "wait": { 8 | "type": "output", 9 | "options": { 10 | "match": " compiled successfully in ", 11 | "timeout": "15000" 12 | } 13 | } 14 | }, 15 | "cypress-run": { 16 | "depends": [ "http-server" ], 17 | "cmd": [ "npm", "run", "cypress:run" ], 18 | "log": { 19 | "type": "output" 20 | }, 21 | "exit_on_success": true 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2018 - present kslimani 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![](https://github.com/kslimani/clappr-ima-plugin/workflows/Functional%20tests/badge.svg) [![MIT license](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE) 2 | 3 | # Interactive Media Ads (IMA) SDK plugin for Clappr 4 | 5 | [Google IMA HTML5 SDK](https://developers.google.com/interactive-media-ads/docs/sdks/html5/quickstart) ads plugin for [Clappr](https://github.com/clappr/clappr) video player. 6 | 7 | To see the plugin in action, check out [demo page](https://kslimani.github.io/clappr-ima-plugin/). 8 | 9 | # Getting started 10 | 11 | Add both Clappr and the plugin scripts to your HTML : 12 | 13 | ```html 14 | 15 | 16 | 17 | 18 | ``` 19 | 20 | Then add `ClapprImaPlugin` into the list of plugins of your player instance, and the options for the plugin go in the `imaPlugin` property as shown below : 21 | 22 | ```javascript 23 | var player = new Clappr.Player({ 24 | source: "https://your.video/here.mp4", 25 | playback: { 26 | playInline: true, // Required by skippable ads on iOS (not fullscreen) 27 | }, 28 | plugins: [ 29 | ClapprImaPlugin 30 | ], 31 | imaPlugin: { 32 | // requestAdIfNoAutoplay: true, 33 | // disableNonLinear: true, 34 | // disableNonLinearForIOS: true, 35 | // resetAdOnEnded: true, 36 | // onAdPlayerReady: function (adPlayer) { adPlayer.on('midpoint', function(o) { console.log(o); }); }, 37 | imaAdPlayer: { 38 | tag: 'https://myadserver.com/path/to/vast/tag.xml', 39 | // vpaidMode: ClapprImaPlugin.vpaidMode.INSECURE, 40 | // locale: 'fr', 41 | // maxDuration: 30000, 42 | // nonLinearMaxDuration: 8000, 43 | // adsRenderingOptions: { 44 | // useStyledNonLinearAds: true, 45 | // }, 46 | }, 47 | }, 48 | }); 49 | ``` 50 | 51 | [Skippable ads](https://developers.google.com/interactive-media-ads/docs/sdks/html5/skippable-ads) require that your video player play content inline (not fullscreen) on iPhone. 52 | 53 | # Plugin options 54 | 55 | | Name | Type | Required | Description | 56 | | --- | :---: | :---: | --- | 57 | | imaAdPlayer | object | __yes__ | The IMA Ad player [configuration object](https://github.com/kslimani/ima-ad-player/blob/master/docs/config.md). _(must at least contain "tag" property)_ | 58 | | disableNonLinear | boolean | no | Set this option to `true` to not display non-linear ads (default is false) | 59 | | disableNonLinearForIOS | boolean | no | Set this option to `true` to not display non-linear ads on iOS devices. There is a [known issue](https://github.com/kslimani/clappr-ima-plugin/issues/3) with non-linear ads and "click_to_play" Clappr internal plugin on iOS devices. (default is false) | 60 | | onAdPlayerReady | Function | no | Can be used to retrieve [IMA Ad Player](https://github.com/kslimani/ima-ad-player) instance. For example, to bind specific [ad player events](https://github.com/kslimani/ima-ad-player/blob/master/docs/events.md). | 61 | | requestAdIfNoAutoplay | boolean | no | Set this option to `true` to attempt to pre-request ads if autoplay is not allowed by browser. By default, ads are requested when video content is started. (default is false) | 62 | | resetAdOnEnded | boolean | no | Set this option to `true` to reset ads scenario when content video is ended. By default, ads are not displayed again if video content is restarted. (default is false) | 63 | 64 | # Development 65 | 66 | Install dependencies : 67 | 68 | ```shell 69 | yarn 70 | ``` 71 | 72 | Start HTTP dev server (http://0.0.0.0:8080) : 73 | 74 | ```shell 75 | npm start 76 | ``` 77 | 78 | # License 79 | 80 | The MIT License (MIT). Please see [License File](LICENSE) for more information. 81 | -------------------------------------------------------------------------------- /cypress.config.js: -------------------------------------------------------------------------------- 1 | const { defineConfig } = require('cypress') 2 | 3 | module.exports = defineConfig({ 4 | e2e: { 5 | baseUrl: 'http://localhost:8080', 6 | supportFile: 'tests/support/index.js', 7 | specPattern: 'tests/functional', 8 | }, 9 | fixturesFolder: false, 10 | numTestsKeptInMemory: 0, 11 | video: false, 12 | }) 13 | -------------------------------------------------------------------------------- /dist/clappr-ima-plugin.min.js: -------------------------------------------------------------------------------- 1 | !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("clappr")):"function"==typeof define&&define.amd?define(["clappr"],e):"object"==typeof exports?exports.ClapprImaPlugin=e(require("clappr")):t.ClapprImaPlugin=e(t.Clappr)}(self,(t=>(()=>{var e={6373:(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>s});var n=r(1601),o=r.n(n),i=r(6314),a=r.n(i)()(o());a.push([t.id,".ima-plugin[data-ima]{position:absolute;top:0;left:0;width:100%;height:100%;text-align:left;z-index:10000}.ima-plugin[data-ima] .ima-ad-container[data-ima]{position:absolute;top:0;left:0;width:100%;height:100%}\n",""]);const s=a},6314:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var r="",n=void 0!==e[5];return e[4]&&(r+="@supports (".concat(e[4],") {")),e[2]&&(r+="@media ".concat(e[2]," {")),n&&(r+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),r+=t(e),n&&(r+="}"),e[2]&&(r+="}"),e[4]&&(r+="}"),r})).join("")},e.i=function(t,r,n,o,i){"string"==typeof t&&(t=[[null,t,void 0]]);var a={};if(n)for(var s=0;s0?" ".concat(f[5]):""," {").concat(f[1],"}")),f[5]=i),r&&(f[2]?(f[1]="@media ".concat(f[2]," {").concat(f[1],"}"),f[2]=r):f[2]=r),o&&(f[4]?(f[1]="@supports (".concat(f[4],") {").concat(f[1],"}"),f[4]=o):f[4]="".concat(o)),e.push(f))}},e}},1601:t=>{"use strict";t.exports=function(t){return t[1]}},6370:t=>{var e;self,e=()=>(()=>{"use strict";var t={6058:(t,e,r)=>{r(4185),Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6e3,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=window,o=document,i="script",a=null,s=function(e){n.clearTimeout(a),"function"==typeof t&&t(e)};if(n.google&&n.google.ima)return s(!0);var u=o.getElementsByTagName(i)[0],c=o.createElement(i);c.src="https://imasdk.googleapis.com/js/sdkloader/ima3"+(r?"_debug":"")+".js",c.async=!0,"function"==typeof t&&(c.onload=function(){s(!0)}),u.parentNode.insertBefore(c,u),e&&(a=n.setTimeout((function(){s(!1)}),e))},r(6031)},3772:(t,e,r)=>{r(2675),r(9463),r(2259),r(3792),r(4185),r(6099),r(7764),r(2953),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,r(5700),r(9572),r(2892),r(6031);var n,o=r(5948),i=(n=r(9880))&&n.__esModule?n:{default:n};function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function s(t,e){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:null;null===e?this._evt.unsubscribeAll(t):this._evt.unsubscribe(t,e)}},{key:"play",value:function(){this._dispatch("ad_play_intent"),this._adPlayIntent=!0,this.initAdDisplayContainer(),this._requestAd()}},{key:"request",value:function(t){this._dispatch("ad_request_intent",t),this._requestAd(t)}},{key:"resize",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this._adsManager&&(r||(r=google.ima.ViewMode.NORMAL),this._adsManager.resize(t,e,r))}},{key:"setVolume",value:function(t){this._adsManager&&this._adsManager.setVolume(t)}},{key:"getVolume",value:function(){return this._adsManager?this._adsManager.getVolume():null}},{key:"discardAdBreak",value:function(){this._adsManager&&this._adsManager.discardAdBreak()}},{key:"pause",value:function(){this._adsManager&&this._adsManager.pause()}},{key:"resume",value:function(){this._adsManager&&this._adsManager.resume()}},{key:"skip",value:function(){this._adsManager&&this._adsManager.skip()}},{key:"updateAdsRenderingSettings",value:function(t){this._adsManager&&this._adsManager.updateAdsRenderingSettings(t)}},{key:"configureAdsManager",value:function(t,e){this._adsManager&&this._adsManager.configureAdsManager(t,e)}},{key:"focus",value:function(){this._adsManager&&this._adsManager.focus()}},{key:"getDisplayContainer",value:function(){return this._o.displayContainer}},{key:"getCuePoints",value:function(){return this._adsManager?this._adsManager.getCuePoints():null}},{key:"getAdSkippableState",value:function(){return this._adsManager?this._adsManager.getAdSkippableState():null}},{key:"getRemainingTime",value:function(){return this._adsManager?this._adsManager.getRemainingTime():null}},{key:"isCustomClickTrackingUsed",value:function(){return this._adsManager?this._adsManager.isCustomClickTrackingUsed():null}},{key:"isCustomPlaybackUsed",value:function(){return this._adsManager?this._adsManager.isCustomPlaybackUsed():null}},{key:"setAdWillAutoPlay",value:function(t){this._o.adWillAutoPlay=t}},{key:"setAdWillPlayMuted",value:function(t){this._o.adWillPlayMuted=t}},{key:"setContinuousPlayback",value:function(t){this._o.continuousPlayback=t}},{key:"stop",value:function(){this._dispatch("ad_stop_intent"),this._stop()}},{key:"ended",value:function(){this._adsLoader&&this._adsLoader.contentComplete()}},{key:"initAdDisplayContainer",value:function(){this._adDisplayContainerInit||(this._adDisplayContainer.initialize(),this._adDisplayContainerInit=!0)}},{key:"destroy",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this._adsManager&&this._adsManager.stop(),this._endAd(),t&&this._evt.unsubscribeAll(),this._destroyAdsManager(),this._destroyAdsLoader(),this._destroyAdDisplayContainer(),this._destroyOptions()}},{key:"_destroyAdsLoader",value:function(){this._adsLoader&&(this._adsLoader.destroy(),this._adsLoader=null,delete this._adsLoader)}},{key:"_destroyAdsManager",value:function(){this._adsManager&&(this._adsManager.destroy(),this._adsManager=null,delete this._adsManager)}},{key:"_destroyAdDisplayContainer",value:function(){this._adDisplayContainer&&(this._adDisplayContainer.destroy(),this._adDisplayContainer=null,delete this._adDisplayContainer)}},{key:"_destroyOptions",value:function(){this._o=null,delete this._o}},{key:"_stop",value:function(){this._dispatch("ad_stop"),this._adsManager?this._adsManager.stop():this._endAd()}},{key:"_makeAdsLoader",value:function(){var t=this;this._adsLoader=new google.ima.AdsLoader(this._adDisplayContainer),this._adsLoader.addEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,(function(e){t._onAdsManagerLoaded(e)})),this._adsLoader.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,(function(e){t._adRequested=!1,t._onAdError(e)}))}},{key:"_requestAd",value:function(t){if(!this._adRequesting)if(this._adRequested)this._adPlayIntent&&this._playAd();else{this._adRequesting=!0,this._adsLoader||this._makeAdsLoader();var e=new google.ima.AdsRequest;e.adTagUrl=this._o.tag,e.linearAdSlotWidth=this._o.video.offsetWidth,e.linearAdSlotHeight=this._o.video.offsetHeight,e.nonLinearAdSlotWidth=this._o.video.offsetWidth,e.nonLinearAdSlotHeight=this._o.video.offsetHeight,e.setAdWillAutoPlay(this._o.adWillAutoPlay),e.setAdWillPlayMuted(this._o.adWillPlayMuted),void 0!==this._o.continuousPlayback&&e.setContinuousPlayback(this._o.continuousPlayback);var r=t||this._o.adsRequestOptions;r&&this._setProperties(e,r),this._dispatch("ad_request",e),this._adsLoader.requestAds(e)}}},{key:"_bindAdsManagerEvents",value:function(){var t=this;this._adsManager.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,(function(e){t._onAdError(e)})),this._adsManager.addEventListener(google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,(function(e){t._adEnded=!1,t._dispatch("content_pause_requested",e),t._dispatch("ad_begin")})),this._adsManager.addEventListener(google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,(function(e){t._dispatch("content_resume_requested",e),t._endAd()})),this._adsManager.addEventListener(google.ima.AdEvent.Type.STARTED,(function(e){t._dispatch("started",e);var r=e.getAd();if(r.isLinear())t._o.maxDuration&&t._startMaxDurationTimer();else{var n=t._o.nonLinearMaxDuration;t._dispatch("ad_non_linear",{ad:r,duration:n}),t._o.nonLinearMaxDuration>0&&setTimeout((function(){t._adsManager&&t._adsManager.stop()}),t._o.nonLinearMaxDuration),t._endAd()}})),this._adsManager.addEventListener(google.ima.AdEvent.Type.ALL_ADS_COMPLETED,(function(e){t._adRequested=!1,t._dispatch("all_ads_completed",e)}));var e={ad_break_ready:google.ima.AdEvent.Type.AD_BREAK_READY,ad_buffering:google.ima.AdEvent.Type.AD_BUFFERING,ad_metadata:google.ima.AdEvent.Type.AD_METADATA,ad_progress:google.ima.AdEvent.Type.AD_PROGRESS,click:google.ima.AdEvent.Type.CLICK,complete:google.ima.AdEvent.Type.COMPLETE,duration_change:google.ima.AdEvent.Type.DURATION_CHANGE,first_quartile:google.ima.AdEvent.Type.FIRST_QUARTILE,impression:google.ima.AdEvent.Type.IMPRESSION,interaction:google.ima.AdEvent.Type.INTERACTION,linear_changed:google.ima.AdEvent.Type.LINEAR_CHANGED,loaded:google.ima.AdEvent.Type.LOADED,log:google.ima.AdEvent.Type.LOG,midpoint:google.ima.AdEvent.Type.MIDPOINT,paused:google.ima.AdEvent.Type.PAUSED,resumed:google.ima.AdEvent.Type.RESUMED,skippable_state_changed:google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,skipped:google.ima.AdEvent.Type.SKIPPED,third_quartile:google.ima.AdEvent.Type.THIRD_QUARTILE,user_close:google.ima.AdEvent.Type.USER_CLOSE,video_clicked:google.ima.AdEvent.Type.VIDEO_CLICKED,video_icon_clicked:google.ima.AdEvent.Type.VIDEO_ICON_CLICKED,volume_changed:google.ima.AdEvent.Type.VOLUME_CHANGED,volume_muted:google.ima.AdEvent.Type.VOLUME_MUTED};google.ima.AdEvent.Type.AD_CAN_PLAY&&(e.ad_can_play=google.ima.AdEvent.Type.AD_CAN_PLAY),google.ima.AdEvent.Type.VIEWABLE_IMPRESSION&&(e.viewable_impression=google.ima.AdEvent.Type.VIEWABLE_IMPRESSION);var r=function(r){t._adsManager.addEventListener(e[r],(function(e){t._dispatch(r,e)}))};for(var n in e)r(n)}},{key:"_onAdsManagerLoaded",value:function(t){this._dispatch("ads_manager_loaded",t);var e=new google.ima.AdsRenderingSettings;e.restoreCustomPlaybackStateOnAdBreakComplete=this._o.restoreVideo,this._o.adsRenderingOptions&&this._setProperties(e,this._o.adsRenderingOptions),this._dispatch("ads_rendering_settings",e),this._destroyAdsManager(),this._adsManager=t.getAdsManager(this._o.video,e),this._bindAdsManagerEvents(),this._dispatch("ads_manager",this._adsManager),this._adRequesting=!1,this._adRequested=!0,this._adPlayIntent&&this._playAd()}},{key:"_onMaxDuration",value:function(){this._dispatch("error",new Error("Maximum duration of "+this._o.maxDuration+" ms reached")),this._stop()}},{key:"_startMaxDurationTimer",value:function(){var t=this;this._maxDurationTimer=setTimeout((function(){t._onMaxDuration()}),this._o.maxDuration)}},{key:"_resetMaxDurationTimer",value:function(){"number"==typeof this._maxDurationTimer&&(clearTimeout(this._maxDurationTimer),this._maxDurationTimer=void 0)}},{key:"_onAdError",value:function(t){this._dispatch("ad_error",t),this._endAd()}},{key:"_playAd",value:function(){try{this._dispatch("ad_play"),this._adEnded=!1,this._adsManager.init(this._o.video.offsetWidth,this._o.video.offsetHeight,google.ima.ViewMode.NORMAL),this._adsManager.start()}catch(t){this._dispatch("error",t),this._endAd()}}},{key:"_dispatch",value:function(t,e){this._evt.notify(t,{name:t,data:e,target:this})}},{key:"_endAd",value:function(){this._adEnded||(this._adEnded=!0,this._adPlayIntent=!1,this._adRequesting=!1,this._resetMaxDurationTimer(),this._dispatch("ad_end"))}}],[{key:"vpaidMode",get:function(){return{DISABLED:0,ENABLED:1,INSECURE:2}}}])}()},9880:(t,e,r)=>{function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(t,e){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:null;null===t?(this.observers=null,this.observers={}):this.observers[t]&&(this.observers[t]=null,delete this.observers[t])}},{key:"notify",value:function(t,e){this.observers[t]&&this.observers[t].forEach((function(t){return t(e)}))}}],e&&o(t.prototype,e),r&&o(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r}()},5948:(t,e,r)=>{function n(t){return!isNaN(parseFloat(t))&&isFinite(t)}r(4185),Object.defineProperty(e,"__esModule",{value:!0}),e.isNumeric=n,e.makeDefault=function(t,e){return void 0===t?e:t},e.makeNum=function(t,e){return n(t)?t+0:e},r(8459)},9306:(t,e,r)=>{var n=r(4901),o=r(6823),i=TypeError;t.exports=function(t){if(n(t))return t;throw new i(o(t)+" is not a function")}},3506:(t,e,r)=>{var n=r(3925),o=String,i=TypeError;t.exports=function(t){if(n(t))return t;throw new i("Can't set "+o(t)+" as a prototype")}},6469:(t,e,r)=>{var n=r(8227),o=r(2360),i=r(4913).f,a=n("unscopables"),s=Array.prototype;void 0===s[a]&&i(s,a,{configurable:!0,value:o(null)}),t.exports=function(t){s[a][t]=!0}},8551:(t,e,r)=>{var n=r(34),o=String,i=TypeError;t.exports=function(t){if(n(t))return t;throw new i(o(t)+" is not an object")}},5652:(t,e,r)=>{var n=r(9039);t.exports=n((function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}))},235:(t,e,r)=>{var n=r(9213).forEach,o=r(4598)("forEach");t.exports=o?[].forEach:function(t){return n(this,t,arguments.length>1?arguments[1]:void 0)}},9617:(t,e,r)=>{var n=r(5397),o=r(5610),i=r(6198),a=function(t){return function(e,r,a){var s=n(e),u=i(s);if(0===u)return!t&&-1;var c,f=o(a,u);if(t&&r!=r){for(;u>f;)if((c=s[f++])!=c)return!0}else for(;u>f;f++)if((t||f in s)&&s[f]===r)return t||f||0;return!t&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}},9213:(t,e,r)=>{var n=r(6080),o=r(9504),i=r(7055),a=r(8981),s=r(6198),u=r(1469),c=o([].push),f=function(t){var e=1===t,r=2===t,o=3===t,f=4===t,l=6===t,p=7===t,d=5===t||l;return function(v,y,h,g){for(var _,b,m=a(v),S=i(m),x=s(S),E=n(y,h),O=0,A=g||u,w=e?A(v,x):r||p?A(v,0):void 0;x>O;O++)if((d||O in S)&&(b=E(_=S[O],O,m),t))if(e)w[O]=b;else if(b)switch(t){case 3:return!0;case 5:return _;case 6:return O;case 2:c(w,_)}else switch(t){case 4:return!1;case 7:c(w,_)}return l?-1:o||f?f:w}};t.exports={forEach:f(0),map:f(1),filter:f(2),some:f(3),every:f(4),find:f(5),findIndex:f(6),filterReject:f(7)}},597:(t,e,r)=>{var n=r(9039),o=r(8227),i=r(9519),a=o("species");t.exports=function(t){return i>=51||!n((function(){var e=[];return(e.constructor={})[a]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},4598:(t,e,r)=>{var n=r(9039);t.exports=function(t,e){var r=[][t];return!!r&&n((function(){r.call(null,e||function(){return 1},1)}))}},4527:(t,e,r)=>{var n=r(3724),o=r(4376),i=TypeError,a=Object.getOwnPropertyDescriptor,s=n&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}();t.exports=s?function(t,e){if(o(t)&&!a(t,"length").writable)throw new i("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e}},7680:(t,e,r)=>{var n=r(9504);t.exports=n([].slice)},7433:(t,e,r)=>{var n=r(4376),o=r(3517),i=r(34),a=r(8227)("species"),s=Array;t.exports=function(t){var e;return n(t)&&(e=t.constructor,(o(e)&&(e===s||n(e.prototype))||i(e)&&null===(e=e[a]))&&(e=void 0)),void 0===e?s:e}},1469:(t,e,r)=>{var n=r(7433);t.exports=function(t,e){return new(n(t))(0===e?0:e)}},2195:(t,e,r)=>{var n=r(9504),o=n({}.toString),i=n("".slice);t.exports=function(t){return i(o(t),8,-1)}},6955:(t,e,r)=>{var n=r(2140),o=r(4901),i=r(2195),a=r(8227)("toStringTag"),s=Object,u="Arguments"===i(function(){return arguments}());t.exports=n?i:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=s(t),a))?r:u?i(e):"Object"===(n=i(e))&&o(e.callee)?"Arguments":n}},7740:(t,e,r)=>{var n=r(9297),o=r(5031),i=r(7347),a=r(4913);t.exports=function(t,e,r){for(var s=o(e),u=a.f,c=i.f,f=0;f{var n=r(9039);t.exports=!n((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},2529:t=>{t.exports=function(t,e){return{value:t,done:e}}},6699:(t,e,r)=>{var n=r(3724),o=r(4913),i=r(6980);t.exports=n?function(t,e,r){return o.f(t,e,i(1,r))}:function(t,e,r){return t[e]=r,t}},6980:t=>{t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},4659:(t,e,r)=>{var n=r(3724),o=r(4913),i=r(6980);t.exports=function(t,e,r){n?o.f(t,e,i(0,r)):t[e]=r}},3640:(t,e,r)=>{var n=r(8551),o=r(4270),i=TypeError;t.exports=function(t){if(n(this),"string"===t||"default"===t)t="string";else if("number"!==t)throw new i("Incorrect hint");return o(this,t)}},2106:(t,e,r)=>{var n=r(283),o=r(4913);t.exports=function(t,e,r){return r.get&&n(r.get,e,{getter:!0}),r.set&&n(r.set,e,{setter:!0}),o.f(t,e,r)}},6840:(t,e,r)=>{var n=r(4901),o=r(4913),i=r(283),a=r(9433);t.exports=function(t,e,r,s){s||(s={});var u=s.enumerable,c=void 0!==s.name?s.name:e;if(n(r)&&i(r,c,s),s.global)u?t[e]=r:a(e,r);else{try{s.unsafe?t[e]&&(u=!0):delete t[e]}catch(t){}u?t[e]=r:o.f(t,e,{value:r,enumerable:!1,configurable:!s.nonConfigurable,writable:!s.nonWritable})}return t}},9433:(t,e,r)=>{var n=r(4576),o=Object.defineProperty;t.exports=function(t,e){try{o(n,t,{value:e,configurable:!0,writable:!0})}catch(r){n[t]=e}return e}},4606:(t,e,r)=>{var n=r(6823),o=TypeError;t.exports=function(t,e){if(!delete t[e])throw new o("Cannot delete property "+n(e)+" of "+n(t))}},3724:(t,e,r)=>{var n=r(9039);t.exports=!n((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},4055:(t,e,r)=>{var n=r(4576),o=r(34),i=n.document,a=o(i)&&o(i.createElement);t.exports=function(t){return a?i.createElement(t):{}}},6837:t=>{var e=TypeError;t.exports=function(t){if(t>9007199254740991)throw e("Maximum allowed index exceeded");return t}},7400:t=>{t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},9296:(t,e,r)=>{var n=r(4055)("span").classList,o=n&&n.constructor&&n.constructor.prototype;t.exports=o===Object.prototype?void 0:o},8727:t=>{t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},2839:(t,e,r)=>{var n=r(4576).navigator,o=n&&n.userAgent;t.exports=o?String(o):""},9519:(t,e,r)=>{var n,o,i=r(4576),a=r(2839),s=i.process,u=i.Deno,c=s&&s.versions||u&&u.version,f=c&&c.v8;f&&(o=(n=f.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!o&&a&&(!(n=a.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=a.match(/Chrome\/(\d+)/))&&(o=+n[1]),t.exports=o},4215:(t,e,r)=>{var n=r(4576),o=r(2839),i=r(2195),a=function(t){return o.slice(0,t.length)===t};t.exports=a("Bun/")?"BUN":a("Cloudflare-Workers")?"CLOUDFLARE":a("Deno/")?"DENO":a("Node.js/")?"NODE":n.Bun&&"string"==typeof Bun.version?"BUN":n.Deno&&"object"==typeof Deno.version?"DENO":"process"===i(n.process)?"NODE":n.window&&n.document?"BROWSER":"REST"},6518:(t,e,r)=>{var n=r(4576),o=r(7347).f,i=r(6699),a=r(6840),s=r(9433),u=r(7740),c=r(2796);t.exports=function(t,e){var r,f,l,p,d,v=t.target,y=t.global,h=t.stat;if(r=y?n:h?n[v]||s(v,{}):n[v]&&n[v].prototype)for(f in e){if(p=e[f],l=t.dontCallGetSet?(d=o(r,f))&&d.value:r[f],!c(y?f:v+(h?".":"#")+f,t.forced)&&void 0!==l){if(typeof p==typeof l)continue;u(p,l)}(t.sham||l&&l.sham)&&i(p,"sham",!0),a(r,f,p,t)}}},9039:t=>{t.exports=function(t){try{return!!t()}catch(t){return!0}}},2744:(t,e,r)=>{var n=r(9039);t.exports=!n((function(){return Object.isExtensible(Object.preventExtensions({}))}))},8745:(t,e,r)=>{var n=r(616),o=Function.prototype,i=o.apply,a=o.call;t.exports="object"==typeof Reflect&&Reflect.apply||(n?a.bind(i):function(){return a.apply(i,arguments)})},6080:(t,e,r)=>{var n=r(7476),o=r(9306),i=r(616),a=n(n.bind);t.exports=function(t,e){return o(t),void 0===e?t:i?a(t,e):function(){return t.apply(e,arguments)}}},616:(t,e,r)=>{var n=r(9039);t.exports=!n((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},9565:(t,e,r)=>{var n=r(616),o=Function.prototype.call;t.exports=n?o.bind(o):function(){return o.apply(o,arguments)}},350:(t,e,r)=>{var n=r(3724),o=r(9297),i=Function.prototype,a=n&&Object.getOwnPropertyDescriptor,s=o(i,"name"),u=s&&"something"===function(){}.name,c=s&&(!n||n&&a(i,"name").configurable);t.exports={EXISTS:s,PROPER:u,CONFIGURABLE:c}},6706:(t,e,r)=>{var n=r(9504),o=r(9306);t.exports=function(t,e,r){try{return n(o(Object.getOwnPropertyDescriptor(t,e)[r]))}catch(t){}}},7476:(t,e,r)=>{var n=r(2195),o=r(9504);t.exports=function(t){if("Function"===n(t))return o(t)}},9504:(t,e,r)=>{var n=r(616),o=Function.prototype,i=o.call,a=n&&o.bind.bind(i,i);t.exports=n?a:function(t){return function(){return i.apply(t,arguments)}}},7751:(t,e,r)=>{var n=r(4576),o=r(4901);t.exports=function(t,e){return arguments.length<2?(r=n[t],o(r)?r:void 0):n[t]&&n[t][e];var r}},6933:(t,e,r)=>{var n=r(9504),o=r(4376),i=r(4901),a=r(2195),s=r(655),u=n([].push);t.exports=function(t){if(i(t))return t;if(o(t)){for(var e=t.length,r=[],n=0;n{var n=r(9306),o=r(4117);t.exports=function(t,e){var r=t[e];return o(r)?void 0:n(r)}},4576:function(t,e,r){var n=function(t){return t&&t.Math===Math&&t};t.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof r.g&&r.g)||n("object"==typeof this&&this)||function(){return this}()||Function("return this")()},9297:(t,e,r)=>{var n=r(9504),o=r(8981),i=n({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return i(o(t),e)}},421:t=>{t.exports={}},397:(t,e,r)=>{var n=r(7751);t.exports=n("document","documentElement")},5917:(t,e,r)=>{var n=r(3724),o=r(9039),i=r(4055);t.exports=!n&&!o((function(){return 7!==Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},7055:(t,e,r)=>{var n=r(9504),o=r(9039),i=r(2195),a=Object,s=n("".split);t.exports=o((function(){return!a("z").propertyIsEnumerable(0)}))?function(t){return"String"===i(t)?s(t,""):a(t)}:a},3167:(t,e,r)=>{var n=r(4901),o=r(34),i=r(2967);t.exports=function(t,e,r){var a,s;return i&&n(a=e.constructor)&&a!==r&&o(s=a.prototype)&&s!==r.prototype&&i(t,s),t}},3706:(t,e,r)=>{var n=r(9504),o=r(4901),i=r(7629),a=n(Function.toString);o(i.inspectSource)||(i.inspectSource=function(t){return a(t)}),t.exports=i.inspectSource},3451:(t,e,r)=>{var n=r(6518),o=r(9504),i=r(421),a=r(34),s=r(9297),u=r(4913).f,c=r(8480),f=r(298),l=r(4124),p=r(3392),d=r(2744),v=!1,y=p("meta"),h=0,g=function(t){u(t,y,{value:{objectID:"O"+h++,weakData:{}}})},_=t.exports={enable:function(){_.enable=function(){},v=!0;var t=c.f,e=o([].splice),r={};r[y]=1,t(r).length&&(c.f=function(r){for(var n=t(r),o=0,i=n.length;o{var n,o,i,a=r(8622),s=r(4576),u=r(34),c=r(6699),f=r(9297),l=r(7629),p=r(6119),d=r(421),v="Object already initialized",y=s.TypeError,h=s.WeakMap;if(a||l.state){var g=l.state||(l.state=new h);g.get=g.get,g.has=g.has,g.set=g.set,n=function(t,e){if(g.has(t))throw new y(v);return e.facade=t,g.set(t,e),e},o=function(t){return g.get(t)||{}},i=function(t){return g.has(t)}}else{var _=p("state");d[_]=!0,n=function(t,e){if(f(t,_))throw new y(v);return e.facade=t,c(t,_,e),e},o=function(t){return f(t,_)?t[_]:{}},i=function(t){return f(t,_)}}t.exports={set:n,get:o,has:i,enforce:function(t){return i(t)?o(t):n(t,{})},getterFor:function(t){return function(e){var r;if(!u(e)||(r=o(e)).type!==t)throw new y("Incompatible receiver, "+t+" required");return r}}}},4376:(t,e,r)=>{var n=r(2195);t.exports=Array.isArray||function(t){return"Array"===n(t)}},4901:t=>{var e="object"==typeof document&&document.all;t.exports=void 0===e&&void 0!==e?function(t){return"function"==typeof t||t===e}:function(t){return"function"==typeof t}},3517:(t,e,r)=>{var n=r(9504),o=r(9039),i=r(4901),a=r(6955),s=r(7751),u=r(3706),c=function(){},f=s("Reflect","construct"),l=/^\s*(?:class|function)\b/,p=n(l.exec),d=!l.test(c),v=function(t){if(!i(t))return!1;try{return f(c,[],t),!0}catch(t){return!1}},y=function(t){if(!i(t))return!1;switch(a(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return d||!!p(l,u(t))}catch(t){return!0}};y.sham=!0,t.exports=!f||o((function(){var t;return v(v.call)||!v(Object)||!v((function(){t=!0}))||t}))?y:v},2796:(t,e,r)=>{var n=r(9039),o=r(4901),i=/#|\.prototype\./,a=function(t,e){var r=u[s(t)];return r===f||r!==c&&(o(e)?n(e):!!e)},s=a.normalize=function(t){return String(t).replace(i,".").toLowerCase()},u=a.data={},c=a.NATIVE="N",f=a.POLYFILL="P";t.exports=a},4117:t=>{t.exports=function(t){return null==t}},34:(t,e,r)=>{var n=r(4901);t.exports=function(t){return"object"==typeof t?null!==t:n(t)}},3925:(t,e,r)=>{var n=r(34);t.exports=function(t){return n(t)||null===t}},6395:t=>{t.exports=!1},757:(t,e,r)=>{var n=r(7751),o=r(4901),i=r(1625),a=r(7040),s=Object;t.exports=a?function(t){return"symbol"==typeof t}:function(t){var e=n("Symbol");return o(e)&&i(e.prototype,s(t))}},3994:(t,e,r)=>{var n=r(7657).IteratorPrototype,o=r(2360),i=r(6980),a=r(687),s=r(6269),u=function(){return this};t.exports=function(t,e,r,c){var f=e+" Iterator";return t.prototype=o(n,{next:i(+!c,r)}),a(t,f,!1,!0),s[f]=u,t}},1088:(t,e,r)=>{var n=r(6518),o=r(9565),i=r(6395),a=r(350),s=r(4901),u=r(3994),c=r(2787),f=r(2967),l=r(687),p=r(6699),d=r(6840),v=r(8227),y=r(6269),h=r(7657),g=a.PROPER,_=a.CONFIGURABLE,b=h.IteratorPrototype,m=h.BUGGY_SAFARI_ITERATORS,S=v("iterator"),x="keys",E="values",O="entries",A=function(){return this};t.exports=function(t,e,r,a,v,h,w){u(r,e,a);var P,k,T,M=function(t){if(t===v&&N)return N;if(!m&&t&&t in C)return C[t];switch(t){case x:case E:case O:return function(){return new r(this,t)}}return function(){return new r(this)}},j=e+" Iterator",I=!1,C=t.prototype,L=C[S]||C["@@iterator"]||v&&C[v],N=!m&&L||M(v),D="Array"===e&&C.entries||L;if(D&&(P=c(D.call(new t)))!==Object.prototype&&P.next&&(i||c(P)===b||(f?f(P,b):s(P[S])||d(P,S,A)),l(P,j,!0,!0),i&&(y[j]=A)),g&&v===E&&L&&L.name!==E&&(!i&&_?p(C,"name",E):(I=!0,N=function(){return o(L,this)})),v)if(k={values:M(E),keys:h?N:M(x),entries:M(O)},w)for(T in k)(m||I||!(T in C))&&d(C,T,k[T]);else n({target:e,proto:!0,forced:m||I},k);return i&&!w||C[S]===N||d(C,S,N,{name:v}),y[e]=N,k}},7657:(t,e,r)=>{var n,o,i,a=r(9039),s=r(4901),u=r(34),c=r(2360),f=r(2787),l=r(6840),p=r(8227),d=r(6395),v=p("iterator"),y=!1;[].keys&&("next"in(i=[].keys())?(o=f(f(i)))!==Object.prototype&&(n=o):y=!0),!u(n)||a((function(){var t={};return n[v].call(t)!==t}))?n={}:d&&(n=c(n)),s(n[v])||l(n,v,(function(){return this})),t.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:y}},6269:t=>{t.exports={}},6198:(t,e,r)=>{var n=r(8014);t.exports=function(t){return n(t.length)}},283:(t,e,r)=>{var n=r(9504),o=r(9039),i=r(4901),a=r(9297),s=r(3724),u=r(350).CONFIGURABLE,c=r(3706),f=r(1181),l=f.enforce,p=f.get,d=String,v=Object.defineProperty,y=n("".slice),h=n("".replace),g=n([].join),_=s&&!o((function(){return 8!==v((function(){}),"length",{value:8}).length})),b=String(String).split("String"),m=t.exports=function(t,e,r){"Symbol("===y(d(e),0,7)&&(e="["+h(d(e),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),r&&r.getter&&(e="get "+e),r&&r.setter&&(e="set "+e),(!a(t,"name")||u&&t.name!==e)&&(s?v(t,"name",{value:e,configurable:!0}):t.name=e),_&&r&&a(r,"arity")&&t.length!==r.arity&&v(t,"length",{value:r.arity});try{r&&a(r,"constructor")&&r.constructor?s&&v(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var n=l(t);return a(n,"source")||(n.source=g(b,"string"==typeof e?e:"")),t};Function.prototype.toString=m((function(){return i(this)&&p(this).source||c(this)}),"toString")},741:t=>{var e=Math.ceil,r=Math.floor;t.exports=Math.trunc||function(t){var n=+t;return(n>0?r:e)(n)}},3904:(t,e,r)=>{var n=r(4576),o=r(9039),i=r(9504),a=r(655),s=r(3802).trim,u=r(7452),c=i("".charAt),f=n.parseFloat,l=n.Symbol,p=l&&l.iterator,d=1/f(u+"-0")!=-1/0||p&&!o((function(){f(Object(p))}));t.exports=d?function(t){var e=s(a(t)),r=f(e);return 0===r&&"-"===c(e,0)?-0:r}:f},2360:(t,e,r)=>{var n,o=r(8551),i=r(6801),a=r(8727),s=r(421),u=r(397),c=r(4055),f=r(6119),l="prototype",p="script",d=f("IE_PROTO"),v=function(){},y=function(t){return"<"+p+">"+t+""},h=function(t){t.write(y("")),t.close();var e=t.parentWindow.Object;return t=null,e},g=function(){try{n=new ActiveXObject("htmlfile")}catch(t){}var t,e,r;g="undefined"!=typeof document?document.domain&&n?h(n):(e=c("iframe"),r="java"+p+":",e.style.display="none",u.appendChild(e),e.src=String(r),(t=e.contentWindow.document).open(),t.write(y("document.F=Object")),t.close(),t.F):h(n);for(var o=a.length;o--;)delete g[l][a[o]];return g()};s[d]=!0,t.exports=Object.create||function(t,e){var r;return null!==t?(v[l]=o(t),r=new v,v[l]=null,r[d]=t):r=g(),void 0===e?r:i.f(r,e)}},6801:(t,e,r)=>{var n=r(3724),o=r(8686),i=r(4913),a=r(8551),s=r(5397),u=r(1072);e.f=n&&!o?Object.defineProperties:function(t,e){a(t);for(var r,n=s(e),o=u(e),c=o.length,f=0;c>f;)i.f(t,r=o[f++],n[r]);return t}},4913:(t,e,r)=>{var n=r(3724),o=r(5917),i=r(8686),a=r(8551),s=r(6969),u=TypeError,c=Object.defineProperty,f=Object.getOwnPropertyDescriptor,l="enumerable",p="configurable",d="writable";e.f=n?i?function(t,e,r){if(a(t),e=s(e),a(r),"function"==typeof t&&"prototype"===e&&"value"in r&&d in r&&!r[d]){var n=f(t,e);n&&n[d]&&(t[e]=r.value,r={configurable:p in r?r[p]:n[p],enumerable:l in r?r[l]:n[l],writable:!1})}return c(t,e,r)}:c:function(t,e,r){if(a(t),e=s(e),a(r),o)try{return c(t,e,r)}catch(t){}if("get"in r||"set"in r)throw new u("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},7347:(t,e,r)=>{var n=r(3724),o=r(9565),i=r(8773),a=r(6980),s=r(5397),u=r(6969),c=r(9297),f=r(5917),l=Object.getOwnPropertyDescriptor;e.f=n?l:function(t,e){if(t=s(t),e=u(e),f)try{return l(t,e)}catch(t){}if(c(t,e))return a(!o(i.f,t,e),t[e])}},298:(t,e,r)=>{var n=r(2195),o=r(5397),i=r(8480).f,a=r(7680),s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return s&&"Window"===n(t)?function(t){try{return i(t)}catch(t){return a(s)}}(t):i(o(t))}},8480:(t,e,r)=>{var n=r(1828),o=r(8727).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return n(t,o)}},3717:(t,e)=>{e.f=Object.getOwnPropertySymbols},2787:(t,e,r)=>{var n=r(9297),o=r(4901),i=r(8981),a=r(6119),s=r(2211),u=a("IE_PROTO"),c=Object,f=c.prototype;t.exports=s?c.getPrototypeOf:function(t){var e=i(t);if(n(e,u))return e[u];var r=e.constructor;return o(r)&&e instanceof r?r.prototype:e instanceof c?f:null}},4124:(t,e,r)=>{var n=r(9039),o=r(34),i=r(2195),a=r(5652),s=Object.isExtensible,u=n((function(){s(1)}));t.exports=u||a?function(t){return!!o(t)&&(!a||"ArrayBuffer"!==i(t))&&(!s||s(t))}:s},1625:(t,e,r)=>{var n=r(9504);t.exports=n({}.isPrototypeOf)},1828:(t,e,r)=>{var n=r(9504),o=r(9297),i=r(5397),a=r(9617).indexOf,s=r(421),u=n([].push);t.exports=function(t,e){var r,n=i(t),c=0,f=[];for(r in n)!o(s,r)&&o(n,r)&&u(f,r);for(;e.length>c;)o(n,r=e[c++])&&(~a(f,r)||u(f,r));return f}},1072:(t,e,r)=>{var n=r(1828),o=r(8727);t.exports=Object.keys||function(t){return n(t,o)}},8773:(t,e)=>{var r={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,o=n&&!r.call({1:2},1);e.f=o?function(t){var e=n(this,t);return!!e&&e.enumerable}:r},2967:(t,e,r)=>{var n=r(6706),o=r(34),i=r(7750),a=r(3506);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{(t=n(Object.prototype,"__proto__","set"))(r,[]),e=r instanceof Array}catch(t){}return function(r,n){return i(r),a(n),o(r)?(e?t(r,n):r.__proto__=n,r):r}}():void 0)},3179:(t,e,r)=>{var n=r(2140),o=r(6955);t.exports=n?{}.toString:function(){return"[object "+o(this)+"]"}},4270:(t,e,r)=>{var n=r(9565),o=r(4901),i=r(34),a=TypeError;t.exports=function(t,e){var r,s;if("string"===e&&o(r=t.toString)&&!i(s=n(r,t)))return s;if(o(r=t.valueOf)&&!i(s=n(r,t)))return s;if("string"!==e&&o(r=t.toString)&&!i(s=n(r,t)))return s;throw new a("Can't convert object to primitive value")}},5031:(t,e,r)=>{var n=r(7751),o=r(9504),i=r(8480),a=r(3717),s=r(8551),u=o([].concat);t.exports=n("Reflect","ownKeys")||function(t){var e=i.f(s(t)),r=a.f;return r?u(e,r(t)):e}},9167:(t,e,r)=>{var n=r(4576);t.exports=n},7750:(t,e,r)=>{var n=r(4117),o=TypeError;t.exports=function(t){if(n(t))throw new o("Can't call method on "+t);return t}},9472:(t,e,r)=>{var n,o=r(4576),i=r(8745),a=r(4901),s=r(4215),u=r(2839),c=r(7680),f=r(2812),l=o.Function,p=/MSIE .\./.test(u)||"BUN"===s&&((n=o.Bun.version.split(".")).length<3||"0"===n[0]&&(n[1]<3||"3"===n[1]&&"0"===n[2]));t.exports=function(t,e){var r=e?2:1;return p?function(n,o){var s=f(arguments.length,1)>r,u=a(n)?n:l(n),p=s?c(arguments,r):[],d=s?function(){i(u,this,p)}:u;return e?t(d,o):t(d)}:t}},687:(t,e,r)=>{var n=r(4913).f,o=r(9297),i=r(8227)("toStringTag");t.exports=function(t,e,r){t&&!r&&(t=t.prototype),t&&!o(t,i)&&n(t,i,{configurable:!0,value:e})}},6119:(t,e,r)=>{var n=r(5745),o=r(3392),i=n("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},7629:(t,e,r)=>{var n=r(6395),o=r(4576),i=r(9433),a="__core-js_shared__",s=t.exports=o[a]||i(a,{});(s.versions||(s.versions=[])).push({version:"3.38.1",mode:n?"pure":"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.38.1/LICENSE",source:"https://github.com/zloirock/core-js"})},5745:(t,e,r)=>{var n=r(7629);t.exports=function(t,e){return n[t]||(n[t]=e||{})}},8183:(t,e,r)=>{var n=r(9504),o=r(1291),i=r(655),a=r(7750),s=n("".charAt),u=n("".charCodeAt),c=n("".slice),f=function(t){return function(e,r){var n,f,l=i(a(e)),p=o(r),d=l.length;return p<0||p>=d?t?"":void 0:(n=u(l,p))<55296||n>56319||p+1===d||(f=u(l,p+1))<56320||f>57343?t?s(l,p):n:t?c(l,p,p+2):f-56320+(n-55296<<10)+65536}};t.exports={codeAt:f(!1),charAt:f(!0)}},3802:(t,e,r)=>{var n=r(9504),o=r(7750),i=r(655),a=r(7452),s=n("".replace),u=RegExp("^["+a+"]+"),c=RegExp("(^|[^"+a+"])["+a+"]+$"),f=function(t){return function(e){var r=i(o(e));return 1&t&&(r=s(r,u,"")),2&t&&(r=s(r,c,"$1")),r}};t.exports={start:f(1),end:f(2),trim:f(3)}},4495:(t,e,r)=>{var n=r(9519),o=r(9039),i=r(4576).String;t.exports=!!Object.getOwnPropertySymbols&&!o((function(){var t=Symbol("symbol detection");return!i(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&n&&n<41}))},8242:(t,e,r)=>{var n=r(9565),o=r(7751),i=r(8227),a=r(6840);t.exports=function(){var t=o("Symbol"),e=t&&t.prototype,r=e&&e.valueOf,s=i("toPrimitive");e&&!e[s]&&a(e,s,(function(t){return n(r,this)}),{arity:1})}},1296:(t,e,r)=>{var n=r(4495);t.exports=n&&!!Symbol.for&&!!Symbol.keyFor},1240:(t,e,r)=>{var n=r(9504);t.exports=n(1..valueOf)},5610:(t,e,r)=>{var n=r(1291),o=Math.max,i=Math.min;t.exports=function(t,e){var r=n(t);return r<0?o(r+e,0):i(r,e)}},5397:(t,e,r)=>{var n=r(7055),o=r(7750);t.exports=function(t){return n(o(t))}},1291:(t,e,r)=>{var n=r(741);t.exports=function(t){var e=+t;return e!=e||0===e?0:n(e)}},8014:(t,e,r)=>{var n=r(1291),o=Math.min;t.exports=function(t){var e=n(t);return e>0?o(e,9007199254740991):0}},8981:(t,e,r)=>{var n=r(7750),o=Object;t.exports=function(t){return o(n(t))}},2777:(t,e,r)=>{var n=r(9565),o=r(34),i=r(757),a=r(5966),s=r(4270),u=r(8227),c=TypeError,f=u("toPrimitive");t.exports=function(t,e){if(!o(t)||i(t))return t;var r,u=a(t,f);if(u){if(void 0===e&&(e="default"),r=n(u,t,e),!o(r)||i(r))return r;throw new c("Can't convert object to primitive value")}return void 0===e&&(e="number"),s(t,e)}},6969:(t,e,r)=>{var n=r(2777),o=r(757);t.exports=function(t){var e=n(t,"string");return o(e)?e:e+""}},2140:(t,e,r)=>{var n={};n[r(8227)("toStringTag")]="z",t.exports="[object z]"===String(n)},655:(t,e,r)=>{var n=r(6955),o=String;t.exports=function(t){if("Symbol"===n(t))throw new TypeError("Cannot convert a Symbol value to a string");return o(t)}},6823:t=>{var e=String;t.exports=function(t){try{return e(t)}catch(t){return"Object"}}},3392:(t,e,r)=>{var n=r(9504),o=0,i=Math.random(),a=n(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+a(++o+i,36)}},7040:(t,e,r)=>{var n=r(4495);t.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},8686:(t,e,r)=>{var n=r(3724),o=r(9039);t.exports=n&&o((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},2812:t=>{var e=TypeError;t.exports=function(t,r){if(t{var n=r(4576),o=r(4901),i=n.WeakMap;t.exports=o(i)&&/native code/.test(String(i))},511:(t,e,r)=>{var n=r(9167),o=r(9297),i=r(1951),a=r(4913).f;t.exports=function(t){var e=n.Symbol||(n.Symbol={});o(e,t)||a(e,t,{value:i.f(t)})}},1951:(t,e,r)=>{var n=r(8227);e.f=n},8227:(t,e,r)=>{var n=r(4576),o=r(5745),i=r(9297),a=r(3392),s=r(4495),u=r(7040),c=n.Symbol,f=o("wks"),l=u?c.for||c:c&&c.withoutSetter||a;t.exports=function(t){return i(f,t)||(f[t]=s&&i(c,t)?c[t]:l("Symbol."+t)),f[t]}},7452:t=>{t.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"},1629:(t,e,r)=>{var n=r(6518),o=r(235);n({target:"Array",proto:!0,forced:[].forEach!==o},{forEach:o})},5276:(t,e,r)=>{var n=r(6518),o=r(7476),i=r(9617).indexOf,a=r(4598),s=o([].indexOf),u=!!s&&1/s([1],1,-0)<0;n({target:"Array",proto:!0,forced:u||!a("indexOf")},{indexOf:function(t){var e=arguments.length>1?arguments[1]:void 0;return u?s(this,t,e)||0:i(this,t,e)}})},3792:(t,e,r)=>{var n=r(5397),o=r(6469),i=r(6269),a=r(1181),s=r(4913).f,u=r(1088),c=r(2529),f=r(6395),l=r(3724),p="Array Iterator",d=a.set,v=a.getterFor(p);t.exports=u(Array,"Array",(function(t,e){d(this,{type:p,target:n(t),index:0,kind:e})}),(function(){var t=v(this),e=t.target,r=t.index++;if(!e||r>=e.length)return t.target=null,c(void 0,!0);switch(t.kind){case"keys":return c(r,!1);case"values":return c(e[r],!1)}return c([r,e[r]],!1)}),"values");var y=i.Arguments=i.Array;if(o("keys"),o("values"),o("entries"),!f&&l&&"values"!==y.name)try{s(y,"name",{value:"values"})}catch(t){}},4554:(t,e,r)=>{var n=r(6518),o=r(8981),i=r(5610),a=r(1291),s=r(6198),u=r(4527),c=r(6837),f=r(1469),l=r(4659),p=r(4606),d=r(597)("splice"),v=Math.max,y=Math.min;n({target:"Array",proto:!0,forced:!d},{splice:function(t,e){var r,n,d,h,g,_,b=o(this),m=s(b),S=i(t,m),x=arguments.length;for(0===x?r=n=0:1===x?(r=0,n=m-S):(r=x-2,n=y(v(a(e),0),m-S)),c(m+r-n),d=f(b,n),h=0;hm-n+r;h--)p(b,h-1)}else if(r>n)for(h=m-n;h>S;h--)_=h+r-1,(g=h+n-1)in b?b[_]=b[g]:p(b,_);for(h=0;h{var n=r(9297),o=r(6840),i=r(3640),a=r(8227)("toPrimitive"),s=Date.prototype;n(s,a)||o(s,a,i)},3110:(t,e,r)=>{var n=r(6518),o=r(7751),i=r(8745),a=r(9565),s=r(9504),u=r(9039),c=r(4901),f=r(757),l=r(7680),p=r(6933),d=r(4495),v=String,y=o("JSON","stringify"),h=s(/./.exec),g=s("".charAt),_=s("".charCodeAt),b=s("".replace),m=s(1..toString),S=/[\uD800-\uDFFF]/g,x=/^[\uD800-\uDBFF]$/,E=/^[\uDC00-\uDFFF]$/,O=!d||u((function(){var t=o("Symbol")("stringify detection");return"[null]"!==y([t])||"{}"!==y({a:t})||"{}"!==y(Object(t))})),A=u((function(){return'"\\udf06\\ud834"'!==y("\udf06\ud834")||'"\\udead"'!==y("\udead")})),w=function(t,e){var r=l(arguments),n=p(e);if(c(n)||void 0!==t&&!f(t))return r[1]=function(t,e){if(c(n)&&(e=a(n,this,v(t),e)),!f(e))return e},i(y,null,r)},P=function(t,e,r){var n=g(r,e-1),o=g(r,e+1);return h(x,t)&&!h(E,o)||h(E,t)&&!h(x,n)?"\\u"+m(_(t,0),16):t};y&&n({target:"JSON",stat:!0,arity:3,forced:O||A},{stringify:function(t,e,r){var n=l(arguments),o=i(O?w:y,null,n);return A&&"string"==typeof o?b(o,S,P):o}})},2892:(t,e,r)=>{var n=r(6518),o=r(6395),i=r(3724),a=r(4576),s=r(9167),u=r(9504),c=r(2796),f=r(9297),l=r(3167),p=r(1625),d=r(757),v=r(2777),y=r(9039),h=r(8480).f,g=r(7347).f,_=r(4913).f,b=r(1240),m=r(3802).trim,S="Number",x=a[S],E=s[S],O=x.prototype,A=a.TypeError,w=u("".slice),P=u("".charCodeAt),k=function(t){var e,r,n,o,i,a,s,u,c=v(t,"number");if(d(c))throw new A("Cannot convert a Symbol value to a number");if("string"==typeof c&&c.length>2)if(c=m(c),43===(e=P(c,0))||45===e){if(88===(r=P(c,2))||120===r)return NaN}else if(48===e){switch(P(c,1)){case 66:case 98:n=2,o=49;break;case 79:case 111:n=8,o=55;break;default:return+c}for(a=(i=w(c,2)).length,s=0;so)return NaN;return parseInt(i,n)}return+c},T=c(S,!x(" 0o1")||!x("0b1")||x("+0x1")),M=function(t){var e,r=arguments.length<1?0:x(function(t){var e=v(t,"number");return"bigint"==typeof e?e:k(e)}(t));return p(O,e=this)&&y((function(){b(e)}))?l(Object(r),this,M):r};M.prototype=O,T&&!o&&(O.constructor=M),n({global:!0,constructor:!0,wrap:!0,forced:T},{Number:M});var j=function(t,e){for(var r,n=i?h(e):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),o=0;n.length>o;o++)f(e,r=n[o])&&!f(t,r)&&_(t,r,g(e,r))};o&&E&&j(s[S],E),(T||o)&&j(s[S],x)},4185:(t,e,r)=>{var n=r(6518),o=r(3724),i=r(4913).f;n({target:"Object",stat:!0,forced:Object.defineProperty!==i,sham:!o},{defineProperty:i})},2811:(t,e,r)=>{var n=r(6518),o=r(2744),i=r(9039),a=r(34),s=r(3451).onFreeze,u=Object.freeze;n({target:"Object",stat:!0,forced:i((function(){u(1)})),sham:!o},{freeze:function(t){return u&&a(t)?u(s(t)):t}})},9773:(t,e,r)=>{var n=r(6518),o=r(4495),i=r(9039),a=r(3717),s=r(8981);n({target:"Object",stat:!0,forced:!o||i((function(){a.f(1)}))},{getOwnPropertySymbols:function(t){var e=a.f;return e?e(s(t)):[]}})},6099:(t,e,r)=>{var n=r(2140),o=r(6840),i=r(3179);n||o(Object.prototype,"toString",i,{unsafe:!0})},8459:(t,e,r)=>{var n=r(6518),o=r(3904);n({global:!0,forced:parseFloat!==o},{parseFloat:o})},7764:(t,e,r)=>{var n=r(8183).charAt,o=r(655),i=r(1181),a=r(1088),s=r(2529),u="String Iterator",c=i.set,f=i.getterFor(u);a(String,"String",(function(t){c(this,{type:u,string:o(t),index:0})}),(function(){var t,e=f(this),r=e.string,o=e.index;return o>=r.length?s(void 0,!0):(t=n(r,o),e.index+=t.length,s(t,!1))}))},6761:(t,e,r)=>{var n=r(6518),o=r(4576),i=r(9565),a=r(9504),s=r(6395),u=r(3724),c=r(4495),f=r(9039),l=r(9297),p=r(1625),d=r(8551),v=r(5397),y=r(6969),h=r(655),g=r(6980),_=r(2360),b=r(1072),m=r(8480),S=r(298),x=r(3717),E=r(7347),O=r(4913),A=r(6801),w=r(8773),P=r(6840),k=r(2106),T=r(5745),M=r(6119),j=r(421),I=r(3392),C=r(8227),L=r(1951),N=r(511),D=r(8242),R=r(687),F=r(1181),B=r(9213).forEach,U=M("hidden"),V="Symbol",G="prototype",W=F.set,q=F.getterFor(V),$=Object[G],z=o.Symbol,H=z&&z[G],Y=o.RangeError,K=o.TypeError,X=o.QObject,Q=E.f,J=O.f,Z=S.f,tt=w.f,et=a([].push),rt=T("symbols"),nt=T("op-symbols"),ot=T("wks"),it=!X||!X[G]||!X[G].findChild,at=function(t,e,r){var n=Q($,e);n&&delete $[e],J(t,e,r),n&&t!==$&&J($,e,n)},st=u&&f((function(){return 7!==_(J({},"a",{get:function(){return J(this,"a",{value:7}).a}})).a}))?at:J,ut=function(t,e){var r=rt[t]=_(H);return W(r,{type:V,tag:t,description:e}),u||(r.description=e),r},ct=function(t,e,r){t===$&&ct(nt,e,r),d(t);var n=y(e);return d(r),l(rt,n)?(r.enumerable?(l(t,U)&&t[U][n]&&(t[U][n]=!1),r=_(r,{enumerable:g(0,!1)})):(l(t,U)||J(t,U,g(1,_(null))),t[U][n]=!0),st(t,n,r)):J(t,n,r)},ft=function(t,e){d(t);var r=v(e),n=b(r).concat(vt(r));return B(n,(function(e){u&&!i(lt,r,e)||ct(t,e,r[e])})),t},lt=function(t){var e=y(t),r=i(tt,this,e);return!(this===$&&l(rt,e)&&!l(nt,e))&&(!(r||!l(this,e)||!l(rt,e)||l(this,U)&&this[U][e])||r)},pt=function(t,e){var r=v(t),n=y(e);if(r!==$||!l(rt,n)||l(nt,n)){var o=Q(r,n);return!o||!l(rt,n)||l(r,U)&&r[U][n]||(o.enumerable=!0),o}},dt=function(t){var e=Z(v(t)),r=[];return B(e,(function(t){l(rt,t)||l(j,t)||et(r,t)})),r},vt=function(t){var e=t===$,r=Z(e?nt:v(t)),n=[];return B(r,(function(t){!l(rt,t)||e&&!l($,t)||et(n,rt[t])})),n};c||(P(H=(z=function(){if(p(H,this))throw new K("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?h(arguments[0]):void 0,e=I(t),r=function(t){var n=void 0===this?o:this;n===$&&i(r,nt,t),l(n,U)&&l(n[U],e)&&(n[U][e]=!1);var a=g(1,t);try{st(n,e,a)}catch(t){if(!(t instanceof Y))throw t;at(n,e,a)}};return u&&it&&st($,e,{configurable:!0,set:r}),ut(e,t)})[G],"toString",(function(){return q(this).tag})),P(z,"withoutSetter",(function(t){return ut(I(t),t)})),w.f=lt,O.f=ct,A.f=ft,E.f=pt,m.f=S.f=dt,x.f=vt,L.f=function(t){return ut(C(t),t)},u&&(k(H,"description",{configurable:!0,get:function(){return q(this).description}}),s||P($,"propertyIsEnumerable",lt,{unsafe:!0}))),n({global:!0,constructor:!0,wrap:!0,forced:!c,sham:!c},{Symbol:z}),B(b(ot),(function(t){N(t)})),n({target:V,stat:!0,forced:!c},{useSetter:function(){it=!0},useSimple:function(){it=!1}}),n({target:"Object",stat:!0,forced:!c,sham:!u},{create:function(t,e){return void 0===e?_(t):ft(_(t),e)},defineProperty:ct,defineProperties:ft,getOwnPropertyDescriptor:pt}),n({target:"Object",stat:!0,forced:!c},{getOwnPropertyNames:dt}),D(),R(z,V),j[U]=!0},9463:(t,e,r)=>{var n=r(6518),o=r(3724),i=r(4576),a=r(9504),s=r(9297),u=r(4901),c=r(1625),f=r(655),l=r(2106),p=r(7740),d=i.Symbol,v=d&&d.prototype;if(o&&u(d)&&(!("description"in v)||void 0!==d().description)){var y={},h=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:f(arguments[0]),e=c(v,this)?new d(t):void 0===t?d():d(t);return""===t&&(y[e]=!0),e};p(h,d),h.prototype=v,v.constructor=h;var g="Symbol(description detection)"===String(d("description detection")),_=a(v.valueOf),b=a(v.toString),m=/^Symbol\((.*)\)[^)]+$/,S=a("".replace),x=a("".slice);l(v,"description",{configurable:!0,get:function(){var t=_(this);if(s(y,t))return"";var e=b(t),r=g?x(e,7,-1):S(e,m,"$1");return""===r?void 0:r}}),n({global:!0,constructor:!0,forced:!0},{Symbol:h})}},1510:(t,e,r)=>{var n=r(6518),o=r(7751),i=r(9297),a=r(655),s=r(5745),u=r(1296),c=s("string-to-symbol-registry"),f=s("symbol-to-string-registry");n({target:"Symbol",stat:!0,forced:!u},{for:function(t){var e=a(t);if(i(c,e))return c[e];var r=o("Symbol")(e);return c[e]=r,f[r]=e,r}})},2259:(t,e,r)=>{r(511)("iterator")},2675:(t,e,r)=>{r(6761),r(1510),r(7812),r(3110),r(9773)},7812:(t,e,r)=>{var n=r(6518),o=r(9297),i=r(757),a=r(6823),s=r(5745),u=r(1296),c=s("symbol-to-string-registry");n({target:"Symbol",stat:!0,forced:!u},{keyFor:function(t){if(!i(t))throw new TypeError(a(t)+" is not a symbol");if(o(c,t))return c[t]}})},5700:(t,e,r)=>{var n=r(511),o=r(8242);n("toPrimitive"),o()},3500:(t,e,r)=>{var n=r(4576),o=r(7400),i=r(9296),a=r(235),s=r(6699),u=function(t){if(t&&t.forEach!==a)try{s(t,"forEach",a)}catch(e){t.forEach=a}};for(var c in o)o[c]&&u(n[c]&&n[c].prototype);u(i)},2953:(t,e,r)=>{var n=r(4576),o=r(7400),i=r(9296),a=r(3792),s=r(6699),u=r(687),c=r(8227)("iterator"),f=a.values,l=function(t,e){if(t){if(t[c]!==f)try{s(t,c,f)}catch(e){t[c]=f}if(u(t,e,!0),o[e])for(var r in a)if(t[r]!==a[r])try{s(t,r,a[r])}catch(e){t[r]=a[r]}}};for(var p in o)l(n[p]&&n[p].prototype,p);l(i,"DOMTokenList")},5575:(t,e,r)=>{var n=r(6518),o=r(4576),i=r(9472)(o.setInterval,!0);n({global:!0,bind:!0,forced:o.setInterval!==i},{setInterval:i})},4599:(t,e,r)=>{var n=r(6518),o=r(4576),i=r(9472)(o.setTimeout,!0);n({global:!0,bind:!0,forced:o.setTimeout!==i},{setTimeout:i})},6031:(t,e,r)=>{r(5575),r(4599)}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n].call(i.exports,i,i.exports,r),i.exports}r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}();var n={};return(()=>{var t=n;r(4185),t.default=s,r(2811);var e=a(r(6058)),o=a(r(3772)),i=r(5948);function a(t){return t&&t.__esModule?t:{default:t}}function s(t,r){(0,e.default)((function(e){if(!e)return r(null,new Error("Failed to load IMA SDK"));r(new o.default(t),null)}),(0,i.makeNum)(t.timeout,6e3),!!t.debug)}s.vpaidMode=Object.freeze(o.default.vpaidMode)})(),n=n.default})(),t.exports=e()},7502:e=>{"use strict";e.exports=t},9306:(t,e,r)=>{"use strict";var n=r(4901),o=r(6823),i=TypeError;t.exports=function(t){if(n(t))return t;throw new i(o(t)+" is not a function")}},5548:(t,e,r)=>{"use strict";var n=r(3517),o=r(6823),i=TypeError;t.exports=function(t){if(n(t))return t;throw new i(o(t)+" is not a constructor")}},3506:(t,e,r)=>{"use strict";var n=r(3925),o=String,i=TypeError;t.exports=function(t){if(n(t))return t;throw new i("Can't set "+o(t)+" as a prototype")}},6469:(t,e,r)=>{"use strict";var n=r(8227),o=r(2360),i=r(4913).f,a=n("unscopables"),s=Array.prototype;void 0===s[a]&&i(s,a,{configurable:!0,value:o(null)}),t.exports=function(t){s[a][t]=!0}},8551:(t,e,r)=>{"use strict";var n=r(34),o=String,i=TypeError;t.exports=function(t){if(n(t))return t;throw new i(o(t)+" is not an object")}},9617:(t,e,r)=>{"use strict";var n=r(5397),o=r(5610),i=r(6198),a=function(t){return function(e,r,a){var s=n(e),u=i(s);if(0===u)return!t&&-1;var c,f=o(a,u);if(t&&r!=r){for(;u>f;)if((c=s[f++])!=c)return!0}else for(;u>f;f++)if((t||f in s)&&s[f]===r)return t||f||0;return!t&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}},9213:(t,e,r)=>{"use strict";var n=r(6080),o=r(9504),i=r(7055),a=r(8981),s=r(6198),u=r(1469),c=o([].push),f=function(t){var e=1===t,r=2===t,o=3===t,f=4===t,l=6===t,p=7===t,d=5===t||l;return function(v,y,h,g){for(var _,b,m=a(v),S=i(m),x=s(S),E=n(y,h),O=0,A=g||u,w=e?A(v,x):r||p?A(v,0):void 0;x>O;O++)if((d||O in S)&&(b=E(_=S[O],O,m),t))if(e)w[O]=b;else if(b)switch(t){case 3:return!0;case 5:return _;case 6:return O;case 2:c(w,_)}else switch(t){case 4:return!1;case 7:c(w,_)}return l?-1:o||f?f:w}};t.exports={forEach:f(0),map:f(1),filter:f(2),some:f(3),every:f(4),find:f(5),findIndex:f(6),filterReject:f(7)}},7680:(t,e,r)=>{"use strict";var n=r(9504);t.exports=n([].slice)},7433:(t,e,r)=>{"use strict";var n=r(4376),o=r(3517),i=r(34),a=r(8227)("species"),s=Array;t.exports=function(t){var e;return n(t)&&(e=t.constructor,(o(e)&&(e===s||n(e.prototype))||i(e)&&null===(e=e[a]))&&(e=void 0)),void 0===e?s:e}},1469:(t,e,r)=>{"use strict";var n=r(7433);t.exports=function(t,e){return new(n(t))(0===e?0:e)}},2195:(t,e,r)=>{"use strict";var n=r(9504),o=n({}.toString),i=n("".slice);t.exports=function(t){return i(o(t),8,-1)}},6955:(t,e,r)=>{"use strict";var n=r(2140),o=r(4901),i=r(2195),a=r(8227)("toStringTag"),s=Object,u="Arguments"===i(function(){return arguments}());t.exports=n?i:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=s(t),a))?r:u?i(e):"Object"===(n=i(e))&&o(e.callee)?"Arguments":n}},7740:(t,e,r)=>{"use strict";var n=r(9297),o=r(5031),i=r(7347),a=r(4913);t.exports=function(t,e,r){for(var s=o(e),u=a.f,c=i.f,f=0;f{"use strict";var n=r(9039);t.exports=!n((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},2529:t=>{"use strict";t.exports=function(t,e){return{value:t,done:e}}},6699:(t,e,r)=>{"use strict";var n=r(3724),o=r(4913),i=r(6980);t.exports=n?function(t,e,r){return o.f(t,e,i(1,r))}:function(t,e,r){return t[e]=r,t}},6980:t=>{"use strict";t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},3640:(t,e,r)=>{"use strict";var n=r(8551),o=r(4270),i=TypeError;t.exports=function(t){if(n(this),"string"===t||"default"===t)t="string";else if("number"!==t)throw new i("Incorrect hint");return o(this,t)}},2106:(t,e,r)=>{"use strict";var n=r(283),o=r(4913);t.exports=function(t,e,r){return r.get&&n(r.get,e,{getter:!0}),r.set&&n(r.set,e,{setter:!0}),o.f(t,e,r)}},6840:(t,e,r)=>{"use strict";var n=r(4901),o=r(4913),i=r(283),a=r(9433);t.exports=function(t,e,r,s){s||(s={});var u=s.enumerable,c=void 0!==s.name?s.name:e;if(n(r)&&i(r,c,s),s.global)u?t[e]=r:a(e,r);else{try{s.unsafe?t[e]&&(u=!0):delete t[e]}catch(t){}u?t[e]=r:o.f(t,e,{value:r,enumerable:!1,configurable:!s.nonConfigurable,writable:!s.nonWritable})}return t}},9433:(t,e,r)=>{"use strict";var n=r(4576),o=Object.defineProperty;t.exports=function(t,e){try{o(n,t,{value:e,configurable:!0,writable:!0})}catch(r){n[t]=e}return e}},3724:(t,e,r)=>{"use strict";var n=r(9039);t.exports=!n((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},4055:(t,e,r)=>{"use strict";var n=r(4576),o=r(34),i=n.document,a=o(i)&&o(i.createElement);t.exports=function(t){return a?i.createElement(t):{}}},7400:t=>{"use strict";t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},9296:(t,e,r)=>{"use strict";var n=r(4055)("span").classList,o=n&&n.constructor&&n.constructor.prototype;t.exports=o===Object.prototype?void 0:o},8727:t=>{"use strict";t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},2839:(t,e,r)=>{"use strict";var n=r(4576).navigator,o=n&&n.userAgent;t.exports=o?String(o):""},9519:(t,e,r)=>{"use strict";var n,o,i=r(4576),a=r(2839),s=i.process,u=i.Deno,c=s&&s.versions||u&&u.version,f=c&&c.v8;f&&(o=(n=f.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!o&&a&&(!(n=a.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=a.match(/Chrome\/(\d+)/))&&(o=+n[1]),t.exports=o},4215:(t,e,r)=>{"use strict";var n=r(4576),o=r(2839),i=r(2195),a=function(t){return o.slice(0,t.length)===t};t.exports=a("Bun/")?"BUN":a("Cloudflare-Workers")?"CLOUDFLARE":a("Deno/")?"DENO":a("Node.js/")?"NODE":n.Bun&&"string"==typeof Bun.version?"BUN":n.Deno&&"object"==typeof Deno.version?"DENO":"process"===i(n.process)?"NODE":n.window&&n.document?"BROWSER":"REST"},6518:(t,e,r)=>{"use strict";var n=r(4576),o=r(7347).f,i=r(6699),a=r(6840),s=r(9433),u=r(7740),c=r(2796);t.exports=function(t,e){var r,f,l,p,d,v=t.target,y=t.global,h=t.stat;if(r=y?n:h?n[v]||s(v,{}):n[v]&&n[v].prototype)for(f in e){if(p=e[f],l=t.dontCallGetSet?(d=o(r,f))&&d.value:r[f],!c(y?f:v+(h?".":"#")+f,t.forced)&&void 0!==l){if(typeof p==typeof l)continue;u(p,l)}(t.sham||l&&l.sham)&&i(p,"sham",!0),a(r,f,p,t)}}},9039:t=>{"use strict";t.exports=function(t){try{return!!t()}catch(t){return!0}}},8745:(t,e,r)=>{"use strict";var n=r(616),o=Function.prototype,i=o.apply,a=o.call;t.exports="object"==typeof Reflect&&Reflect.apply||(n?a.bind(i):function(){return a.apply(i,arguments)})},6080:(t,e,r)=>{"use strict";var n=r(7476),o=r(9306),i=r(616),a=n(n.bind);t.exports=function(t,e){return o(t),void 0===e?t:i?a(t,e):function(){return t.apply(e,arguments)}}},616:(t,e,r)=>{"use strict";var n=r(9039);t.exports=!n((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},566:(t,e,r)=>{"use strict";var n=r(9504),o=r(9306),i=r(34),a=r(9297),s=r(7680),u=r(616),c=Function,f=n([].concat),l=n([].join),p={};t.exports=u?c.bind:function(t){var e=o(this),r=e.prototype,n=s(arguments,1),u=function(){var r=f(n,s(arguments));return this instanceof u?function(t,e,r){if(!a(p,e)){for(var n=[],o=0;o{"use strict";var n=r(616),o=Function.prototype.call;t.exports=n?o.bind(o):function(){return o.apply(o,arguments)}},350:(t,e,r)=>{"use strict";var n=r(3724),o=r(9297),i=Function.prototype,a=n&&Object.getOwnPropertyDescriptor,s=o(i,"name"),u=s&&"something"===function(){}.name,c=s&&(!n||n&&a(i,"name").configurable);t.exports={EXISTS:s,PROPER:u,CONFIGURABLE:c}},6706:(t,e,r)=>{"use strict";var n=r(9504),o=r(9306);t.exports=function(t,e,r){try{return n(o(Object.getOwnPropertyDescriptor(t,e)[r]))}catch(t){}}},7476:(t,e,r)=>{"use strict";var n=r(2195),o=r(9504);t.exports=function(t){if("Function"===n(t))return o(t)}},9504:(t,e,r)=>{"use strict";var n=r(616),o=Function.prototype,i=o.call,a=n&&o.bind.bind(i,i);t.exports=n?a:function(t){return function(){return i.apply(t,arguments)}}},7751:(t,e,r)=>{"use strict";var n=r(4576),o=r(4901);t.exports=function(t,e){return arguments.length<2?(r=n[t],o(r)?r:void 0):n[t]&&n[t][e];var r}},6933:(t,e,r)=>{"use strict";var n=r(9504),o=r(4376),i=r(4901),a=r(2195),s=r(655),u=n([].push);t.exports=function(t){if(i(t))return t;if(o(t)){for(var e=t.length,r=[],n=0;n{"use strict";var n=r(9306),o=r(4117);t.exports=function(t,e){var r=t[e];return o(r)?void 0:n(r)}},4576:function(t,e,r){"use strict";var n=function(t){return t&&t.Math===Math&&t};t.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof r.g&&r.g)||n("object"==typeof this&&this)||function(){return this}()||Function("return this")()},9297:(t,e,r)=>{"use strict";var n=r(9504),o=r(8981),i=n({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return i(o(t),e)}},421:t=>{"use strict";t.exports={}},397:(t,e,r)=>{"use strict";var n=r(7751);t.exports=n("document","documentElement")},5917:(t,e,r)=>{"use strict";var n=r(3724),o=r(9039),i=r(4055);t.exports=!n&&!o((function(){return 7!==Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},7055:(t,e,r)=>{"use strict";var n=r(9504),o=r(9039),i=r(2195),a=Object,s=n("".split);t.exports=o((function(){return!a("z").propertyIsEnumerable(0)}))?function(t){return"String"===i(t)?s(t,""):a(t)}:a},3167:(t,e,r)=>{"use strict";var n=r(4901),o=r(34),i=r(2967);t.exports=function(t,e,r){var a,s;return i&&n(a=e.constructor)&&a!==r&&o(s=a.prototype)&&s!==r.prototype&&i(t,s),t}},3706:(t,e,r)=>{"use strict";var n=r(9504),o=r(4901),i=r(7629),a=n(Function.toString);o(i.inspectSource)||(i.inspectSource=function(t){return a(t)}),t.exports=i.inspectSource},1181:(t,e,r)=>{"use strict";var n,o,i,a=r(8622),s=r(4576),u=r(34),c=r(6699),f=r(9297),l=r(7629),p=r(6119),d=r(421),v="Object already initialized",y=s.TypeError,h=s.WeakMap;if(a||l.state){var g=l.state||(l.state=new h);g.get=g.get,g.has=g.has,g.set=g.set,n=function(t,e){if(g.has(t))throw new y(v);return e.facade=t,g.set(t,e),e},o=function(t){return g.get(t)||{}},i=function(t){return g.has(t)}}else{var _=p("state");d[_]=!0,n=function(t,e){if(f(t,_))throw new y(v);return e.facade=t,c(t,_,e),e},o=function(t){return f(t,_)?t[_]:{}},i=function(t){return f(t,_)}}t.exports={set:n,get:o,has:i,enforce:function(t){return i(t)?o(t):n(t,{})},getterFor:function(t){return function(e){var r;if(!u(e)||(r=o(e)).type!==t)throw new y("Incompatible receiver, "+t+" required");return r}}}},4376:(t,e,r)=>{"use strict";var n=r(2195);t.exports=Array.isArray||function(t){return"Array"===n(t)}},4901:t=>{"use strict";var e="object"==typeof document&&document.all;t.exports=void 0===e&&void 0!==e?function(t){return"function"==typeof t||t===e}:function(t){return"function"==typeof t}},3517:(t,e,r)=>{"use strict";var n=r(9504),o=r(9039),i=r(4901),a=r(6955),s=r(7751),u=r(3706),c=function(){},f=s("Reflect","construct"),l=/^\s*(?:class|function)\b/,p=n(l.exec),d=!l.test(c),v=function(t){if(!i(t))return!1;try{return f(c,[],t),!0}catch(t){return!1}},y=function(t){if(!i(t))return!1;switch(a(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return d||!!p(l,u(t))}catch(t){return!0}};y.sham=!0,t.exports=!f||o((function(){var t;return v(v.call)||!v(Object)||!v((function(){t=!0}))||t}))?y:v},6575:(t,e,r)=>{"use strict";var n=r(9297);t.exports=function(t){return void 0!==t&&(n(t,"value")||n(t,"writable"))}},2796:(t,e,r)=>{"use strict";var n=r(9039),o=r(4901),i=/#|\.prototype\./,a=function(t,e){var r=u[s(t)];return r===f||r!==c&&(o(e)?n(e):!!e)},s=a.normalize=function(t){return String(t).replace(i,".").toLowerCase()},u=a.data={},c=a.NATIVE="N",f=a.POLYFILL="P";t.exports=a},4117:t=>{"use strict";t.exports=function(t){return null==t}},34:(t,e,r)=>{"use strict";var n=r(4901);t.exports=function(t){return"object"==typeof t?null!==t:n(t)}},3925:(t,e,r)=>{"use strict";var n=r(34);t.exports=function(t){return n(t)||null===t}},6395:t=>{"use strict";t.exports=!1},757:(t,e,r)=>{"use strict";var n=r(7751),o=r(4901),i=r(1625),a=r(7040),s=Object;t.exports=a?function(t){return"symbol"==typeof t}:function(t){var e=n("Symbol");return o(e)&&i(e.prototype,s(t))}},3994:(t,e,r)=>{"use strict";var n=r(7657).IteratorPrototype,o=r(2360),i=r(6980),a=r(687),s=r(6269),u=function(){return this};t.exports=function(t,e,r,c){var f=e+" Iterator";return t.prototype=o(n,{next:i(+!c,r)}),a(t,f,!1,!0),s[f]=u,t}},1088:(t,e,r)=>{"use strict";var n=r(6518),o=r(9565),i=r(6395),a=r(350),s=r(4901),u=r(3994),c=r(2787),f=r(2967),l=r(687),p=r(6699),d=r(6840),v=r(8227),y=r(6269),h=r(7657),g=a.PROPER,_=a.CONFIGURABLE,b=h.IteratorPrototype,m=h.BUGGY_SAFARI_ITERATORS,S=v("iterator"),x="keys",E="values",O="entries",A=function(){return this};t.exports=function(t,e,r,a,v,h,w){u(r,e,a);var P,k,T,M=function(t){if(t===v&&N)return N;if(!m&&t&&t in C)return C[t];switch(t){case x:case E:case O:return function(){return new r(this,t)}}return function(){return new r(this)}},j=e+" Iterator",I=!1,C=t.prototype,L=C[S]||C["@@iterator"]||v&&C[v],N=!m&&L||M(v),D="Array"===e&&C.entries||L;if(D&&(P=c(D.call(new t)))!==Object.prototype&&P.next&&(i||c(P)===b||(f?f(P,b):s(P[S])||d(P,S,A)),l(P,j,!0,!0),i&&(y[j]=A)),g&&v===E&&L&&L.name!==E&&(!i&&_?p(C,"name",E):(I=!0,N=function(){return o(L,this)})),v)if(k={values:M(E),keys:h?N:M(x),entries:M(O)},w)for(T in k)(m||I||!(T in C))&&d(C,T,k[T]);else n({target:e,proto:!0,forced:m||I},k);return i&&!w||C[S]===N||d(C,S,N,{name:v}),y[e]=N,k}},7657:(t,e,r)=>{"use strict";var n,o,i,a=r(9039),s=r(4901),u=r(34),c=r(2360),f=r(2787),l=r(6840),p=r(8227),d=r(6395),v=p("iterator"),y=!1;[].keys&&("next"in(i=[].keys())?(o=f(f(i)))!==Object.prototype&&(n=o):y=!0),!u(n)||a((function(){var t={};return n[v].call(t)!==t}))?n={}:d&&(n=c(n)),s(n[v])||l(n,v,(function(){return this})),t.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:y}},6269:t=>{"use strict";t.exports={}},6198:(t,e,r)=>{"use strict";var n=r(8014);t.exports=function(t){return n(t.length)}},283:(t,e,r)=>{"use strict";var n=r(9504),o=r(9039),i=r(4901),a=r(9297),s=r(3724),u=r(350).CONFIGURABLE,c=r(3706),f=r(1181),l=f.enforce,p=f.get,d=String,v=Object.defineProperty,y=n("".slice),h=n("".replace),g=n([].join),_=s&&!o((function(){return 8!==v((function(){}),"length",{value:8}).length})),b=String(String).split("String"),m=t.exports=function(t,e,r){"Symbol("===y(d(e),0,7)&&(e="["+h(d(e),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),r&&r.getter&&(e="get "+e),r&&r.setter&&(e="set "+e),(!a(t,"name")||u&&t.name!==e)&&(s?v(t,"name",{value:e,configurable:!0}):t.name=e),_&&r&&a(r,"arity")&&t.length!==r.arity&&v(t,"length",{value:r.arity});try{r&&a(r,"constructor")&&r.constructor?s&&v(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var n=l(t);return a(n,"source")||(n.source=g(b,"string"==typeof e?e:"")),t};Function.prototype.toString=m((function(){return i(this)&&p(this).source||c(this)}),"toString")},741:t=>{"use strict";var e=Math.ceil,r=Math.floor;t.exports=Math.trunc||function(t){var n=+t;return(n>0?r:e)(n)}},2360:(t,e,r)=>{"use strict";var n,o=r(8551),i=r(6801),a=r(8727),s=r(421),u=r(397),c=r(4055),f=r(6119),l="prototype",p="script",d=f("IE_PROTO"),v=function(){},y=function(t){return"<"+p+">"+t+""},h=function(t){t.write(y("")),t.close();var e=t.parentWindow.Object;return t=null,e},g=function(){try{n=new ActiveXObject("htmlfile")}catch(t){}var t,e,r;g="undefined"!=typeof document?document.domain&&n?h(n):(e=c("iframe"),r="java"+p+":",e.style.display="none",u.appendChild(e),e.src=String(r),(t=e.contentWindow.document).open(),t.write(y("document.F=Object")),t.close(),t.F):h(n);for(var o=a.length;o--;)delete g[l][a[o]];return g()};s[d]=!0,t.exports=Object.create||function(t,e){var r;return null!==t?(v[l]=o(t),r=new v,v[l]=null,r[d]=t):r=g(),void 0===e?r:i.f(r,e)}},6801:(t,e,r)=>{"use strict";var n=r(3724),o=r(8686),i=r(4913),a=r(8551),s=r(5397),u=r(1072);e.f=n&&!o?Object.defineProperties:function(t,e){a(t);for(var r,n=s(e),o=u(e),c=o.length,f=0;c>f;)i.f(t,r=o[f++],n[r]);return t}},4913:(t,e,r)=>{"use strict";var n=r(3724),o=r(5917),i=r(8686),a=r(8551),s=r(6969),u=TypeError,c=Object.defineProperty,f=Object.getOwnPropertyDescriptor,l="enumerable",p="configurable",d="writable";e.f=n?i?function(t,e,r){if(a(t),e=s(e),a(r),"function"==typeof t&&"prototype"===e&&"value"in r&&d in r&&!r[d]){var n=f(t,e);n&&n[d]&&(t[e]=r.value,r={configurable:p in r?r[p]:n[p],enumerable:l in r?r[l]:n[l],writable:!1})}return c(t,e,r)}:c:function(t,e,r){if(a(t),e=s(e),a(r),o)try{return c(t,e,r)}catch(t){}if("get"in r||"set"in r)throw new u("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},7347:(t,e,r)=>{"use strict";var n=r(3724),o=r(9565),i=r(8773),a=r(6980),s=r(5397),u=r(6969),c=r(9297),f=r(5917),l=Object.getOwnPropertyDescriptor;e.f=n?l:function(t,e){if(t=s(t),e=u(e),f)try{return l(t,e)}catch(t){}if(c(t,e))return a(!o(i.f,t,e),t[e])}},298:(t,e,r)=>{"use strict";var n=r(2195),o=r(5397),i=r(8480).f,a=r(7680),s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return s&&"Window"===n(t)?function(t){try{return i(t)}catch(t){return a(s)}}(t):i(o(t))}},8480:(t,e,r)=>{"use strict";var n=r(1828),o=r(8727).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return n(t,o)}},3717:(t,e)=>{"use strict";e.f=Object.getOwnPropertySymbols},2787:(t,e,r)=>{"use strict";var n=r(9297),o=r(4901),i=r(8981),a=r(6119),s=r(2211),u=a("IE_PROTO"),c=Object,f=c.prototype;t.exports=s?c.getPrototypeOf:function(t){var e=i(t);if(n(e,u))return e[u];var r=e.constructor;return o(r)&&e instanceof r?r.prototype:e instanceof c?f:null}},1625:(t,e,r)=>{"use strict";var n=r(9504);t.exports=n({}.isPrototypeOf)},1828:(t,e,r)=>{"use strict";var n=r(9504),o=r(9297),i=r(5397),a=r(9617).indexOf,s=r(421),u=n([].push);t.exports=function(t,e){var r,n=i(t),c=0,f=[];for(r in n)!o(s,r)&&o(n,r)&&u(f,r);for(;e.length>c;)o(n,r=e[c++])&&(~a(f,r)||u(f,r));return f}},1072:(t,e,r)=>{"use strict";var n=r(1828),o=r(8727);t.exports=Object.keys||function(t){return n(t,o)}},8773:(t,e)=>{"use strict";var r={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,o=n&&!r.call({1:2},1);e.f=o?function(t){var e=n(this,t);return!!e&&e.enumerable}:r},2967:(t,e,r)=>{"use strict";var n=r(6706),o=r(34),i=r(7750),a=r(3506);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{(t=n(Object.prototype,"__proto__","set"))(r,[]),e=r instanceof Array}catch(t){}return function(r,n){return i(r),a(n),o(r)?(e?t(r,n):r.__proto__=n,r):r}}():void 0)},3179:(t,e,r)=>{"use strict";var n=r(2140),o=r(6955);t.exports=n?{}.toString:function(){return"[object "+o(this)+"]"}},4270:(t,e,r)=>{"use strict";var n=r(9565),o=r(4901),i=r(34),a=TypeError;t.exports=function(t,e){var r,s;if("string"===e&&o(r=t.toString)&&!i(s=n(r,t)))return s;if(o(r=t.valueOf)&&!i(s=n(r,t)))return s;if("string"!==e&&o(r=t.toString)&&!i(s=n(r,t)))return s;throw new a("Can't convert object to primitive value")}},5031:(t,e,r)=>{"use strict";var n=r(7751),o=r(9504),i=r(8480),a=r(3717),s=r(8551),u=o([].concat);t.exports=n("Reflect","ownKeys")||function(t){var e=i.f(s(t)),r=a.f;return r?u(e,r(t)):e}},9167:(t,e,r)=>{"use strict";var n=r(4576);t.exports=n},7750:(t,e,r)=>{"use strict";var n=r(4117),o=TypeError;t.exports=function(t){if(n(t))throw new o("Can't call method on "+t);return t}},9472:(t,e,r)=>{"use strict";var n,o=r(4576),i=r(8745),a=r(4901),s=r(4215),u=r(2839),c=r(7680),f=r(2812),l=o.Function,p=/MSIE .\./.test(u)||"BUN"===s&&((n=o.Bun.version.split(".")).length<3||"0"===n[0]&&(n[1]<3||"3"===n[1]&&"0"===n[2]));t.exports=function(t,e){var r=e?2:1;return p?function(n,o){var s=f(arguments.length,1)>r,u=a(n)?n:l(n),p=s?c(arguments,r):[],d=s?function(){i(u,this,p)}:u;return e?t(d,o):t(d)}:t}},687:(t,e,r)=>{"use strict";var n=r(4913).f,o=r(9297),i=r(8227)("toStringTag");t.exports=function(t,e,r){t&&!r&&(t=t.prototype),t&&!o(t,i)&&n(t,i,{configurable:!0,value:e})}},6119:(t,e,r)=>{"use strict";var n=r(5745),o=r(3392),i=n("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},7629:(t,e,r)=>{"use strict";var n=r(6395),o=r(4576),i=r(9433),a="__core-js_shared__",s=t.exports=o[a]||i(a,{});(s.versions||(s.versions=[])).push({version:"3.38.1",mode:n?"pure":"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.38.1/LICENSE",source:"https://github.com/zloirock/core-js"})},5745:(t,e,r)=>{"use strict";var n=r(7629);t.exports=function(t,e){return n[t]||(n[t]=e||{})}},8183:(t,e,r)=>{"use strict";var n=r(9504),o=r(1291),i=r(655),a=r(7750),s=n("".charAt),u=n("".charCodeAt),c=n("".slice),f=function(t){return function(e,r){var n,f,l=i(a(e)),p=o(r),d=l.length;return p<0||p>=d?t?"":void 0:(n=u(l,p))<55296||n>56319||p+1===d||(f=u(l,p+1))<56320||f>57343?t?s(l,p):n:t?c(l,p,p+2):f-56320+(n-55296<<10)+65536}};t.exports={codeAt:f(!1),charAt:f(!0)}},3802:(t,e,r)=>{"use strict";var n=r(9504),o=r(7750),i=r(655),a=r(7452),s=n("".replace),u=RegExp("^["+a+"]+"),c=RegExp("(^|[^"+a+"])["+a+"]+$"),f=function(t){return function(e){var r=i(o(e));return 1&t&&(r=s(r,u,"")),2&t&&(r=s(r,c,"$1")),r}};t.exports={start:f(1),end:f(2),trim:f(3)}},4495:(t,e,r)=>{"use strict";var n=r(9519),o=r(9039),i=r(4576).String;t.exports=!!Object.getOwnPropertySymbols&&!o((function(){var t=Symbol("symbol detection");return!i(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&n&&n<41}))},8242:(t,e,r)=>{"use strict";var n=r(9565),o=r(7751),i=r(8227),a=r(6840);t.exports=function(){var t=o("Symbol"),e=t&&t.prototype,r=e&&e.valueOf,s=i("toPrimitive");e&&!e[s]&&a(e,s,(function(t){return n(r,this)}),{arity:1})}},1296:(t,e,r)=>{"use strict";var n=r(4495);t.exports=n&&!!Symbol.for&&!!Symbol.keyFor},1240:(t,e,r)=>{"use strict";var n=r(9504);t.exports=n(1..valueOf)},5610:(t,e,r)=>{"use strict";var n=r(1291),o=Math.max,i=Math.min;t.exports=function(t,e){var r=n(t);return r<0?o(r+e,0):i(r,e)}},5397:(t,e,r)=>{"use strict";var n=r(7055),o=r(7750);t.exports=function(t){return n(o(t))}},1291:(t,e,r)=>{"use strict";var n=r(741);t.exports=function(t){var e=+t;return e!=e||0===e?0:n(e)}},8014:(t,e,r)=>{"use strict";var n=r(1291),o=Math.min;t.exports=function(t){var e=n(t);return e>0?o(e,9007199254740991):0}},8981:(t,e,r)=>{"use strict";var n=r(7750),o=Object;t.exports=function(t){return o(n(t))}},2777:(t,e,r)=>{"use strict";var n=r(9565),o=r(34),i=r(757),a=r(5966),s=r(4270),u=r(8227),c=TypeError,f=u("toPrimitive");t.exports=function(t,e){if(!o(t)||i(t))return t;var r,u=a(t,f);if(u){if(void 0===e&&(e="default"),r=n(u,t,e),!o(r)||i(r))return r;throw new c("Can't convert object to primitive value")}return void 0===e&&(e="number"),s(t,e)}},6969:(t,e,r)=>{"use strict";var n=r(2777),o=r(757);t.exports=function(t){var e=n(t,"string");return o(e)?e:e+""}},2140:(t,e,r)=>{"use strict";var n={};n[r(8227)("toStringTag")]="z",t.exports="[object z]"===String(n)},655:(t,e,r)=>{"use strict";var n=r(6955),o=String;t.exports=function(t){if("Symbol"===n(t))throw new TypeError("Cannot convert a Symbol value to a string");return o(t)}},6823:t=>{"use strict";var e=String;t.exports=function(t){try{return e(t)}catch(t){return"Object"}}},3392:(t,e,r)=>{"use strict";var n=r(9504),o=0,i=Math.random(),a=n(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+a(++o+i,36)}},7040:(t,e,r)=>{"use strict";var n=r(4495);t.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},8686:(t,e,r)=>{"use strict";var n=r(3724),o=r(9039);t.exports=n&&o((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},2812:t=>{"use strict";var e=TypeError;t.exports=function(t,r){if(t{"use strict";var n=r(4576),o=r(4901),i=n.WeakMap;t.exports=o(i)&&/native code/.test(String(i))},511:(t,e,r)=>{"use strict";var n=r(9167),o=r(9297),i=r(1951),a=r(4913).f;t.exports=function(t){var e=n.Symbol||(n.Symbol={});o(e,t)||a(e,t,{value:i.f(t)})}},1951:(t,e,r)=>{"use strict";var n=r(8227);e.f=n},8227:(t,e,r)=>{"use strict";var n=r(4576),o=r(5745),i=r(9297),a=r(3392),s=r(4495),u=r(7040),c=n.Symbol,f=o("wks"),l=u?c.for||c:c&&c.withoutSetter||a;t.exports=function(t){return i(f,t)||(f[t]=s&&i(c,t)?c[t]:l("Symbol."+t)),f[t]}},7452:t=>{"use strict";t.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"},3792:(t,e,r)=>{"use strict";var n=r(5397),o=r(6469),i=r(6269),a=r(1181),s=r(4913).f,u=r(1088),c=r(2529),f=r(6395),l=r(3724),p="Array Iterator",d=a.set,v=a.getterFor(p);t.exports=u(Array,"Array",(function(t,e){d(this,{type:p,target:n(t),index:0,kind:e})}),(function(){var t=v(this),e=t.target,r=t.index++;if(!e||r>=e.length)return t.target=null,c(void 0,!0);switch(t.kind){case"keys":return c(r,!1);case"values":return c(e[r],!1)}return c([r,e[r]],!1)}),"values");var y=i.Arguments=i.Array;if(o("keys"),o("values"),o("entries"),!f&&l&&"values"!==y.name)try{s(y,"name",{value:"values"})}catch(t){}},9572:(t,e,r)=>{"use strict";var n=r(9297),o=r(6840),i=r(3640),a=r(8227)("toPrimitive"),s=Date.prototype;n(s,a)||o(s,a,i)},4170:(t,e,r)=>{"use strict";var n=r(6518),o=r(566);n({target:"Function",proto:!0,forced:Function.bind!==o},{bind:o})},2010:(t,e,r)=>{"use strict";var n=r(3724),o=r(350).EXISTS,i=r(9504),a=r(2106),s=Function.prototype,u=i(s.toString),c=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,f=i(c.exec);n&&!o&&a(s,"name",{configurable:!0,get:function(){try{return f(c,u(this))[1]}catch(t){return""}}})},3110:(t,e,r)=>{"use strict";var n=r(6518),o=r(7751),i=r(8745),a=r(9565),s=r(9504),u=r(9039),c=r(4901),f=r(757),l=r(7680),p=r(6933),d=r(4495),v=String,y=o("JSON","stringify"),h=s(/./.exec),g=s("".charAt),_=s("".charCodeAt),b=s("".replace),m=s(1..toString),S=/[\uD800-\uDFFF]/g,x=/^[\uD800-\uDBFF]$/,E=/^[\uDC00-\uDFFF]$/,O=!d||u((function(){var t=o("Symbol")("stringify detection");return"[null]"!==y([t])||"{}"!==y({a:t})||"{}"!==y(Object(t))})),A=u((function(){return'"\\udf06\\ud834"'!==y("\udf06\ud834")||'"\\udead"'!==y("\udead")})),w=function(t,e){var r=l(arguments),n=p(e);if(c(n)||void 0!==t&&!f(t))return r[1]=function(t,e){if(c(n)&&(e=a(n,this,v(t),e)),!f(e))return e},i(y,null,r)},P=function(t,e,r){var n=g(r,e-1),o=g(r,e+1);return h(x,t)&&!h(E,o)||h(E,t)&&!h(x,n)?"\\u"+m(_(t,0),16):t};y&&n({target:"JSON",stat:!0,arity:3,forced:O||A},{stringify:function(t,e,r){var n=l(arguments),o=i(O?w:y,null,n);return A&&"string"==typeof o?b(o,S,P):o}})},2892:(t,e,r)=>{"use strict";var n=r(6518),o=r(6395),i=r(3724),a=r(4576),s=r(9167),u=r(9504),c=r(2796),f=r(9297),l=r(3167),p=r(1625),d=r(757),v=r(2777),y=r(9039),h=r(8480).f,g=r(7347).f,_=r(4913).f,b=r(1240),m=r(3802).trim,S="Number",x=a[S],E=s[S],O=x.prototype,A=a.TypeError,w=u("".slice),P=u("".charCodeAt),k=function(t){var e,r,n,o,i,a,s,u,c=v(t,"number");if(d(c))throw new A("Cannot convert a Symbol value to a number");if("string"==typeof c&&c.length>2)if(c=m(c),43===(e=P(c,0))||45===e){if(88===(r=P(c,2))||120===r)return NaN}else if(48===e){switch(P(c,1)){case 66:case 98:n=2,o=49;break;case 79:case 111:n=8,o=55;break;default:return+c}for(a=(i=w(c,2)).length,s=0;so)return NaN;return parseInt(i,n)}return+c},T=c(S,!x(" 0o1")||!x("0b1")||x("+0x1")),M=function(t){var e,r=arguments.length<1?0:x(function(t){var e=v(t,"number");return"bigint"==typeof e?e:k(e)}(t));return p(O,e=this)&&y((function(){b(e)}))?l(Object(r),this,M):r};M.prototype=O,T&&!o&&(O.constructor=M),n({global:!0,constructor:!0,wrap:!0,forced:T},{Number:M});var j=function(t,e){for(var r,n=i?h(e):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),o=0;n.length>o;o++)f(e,r=n[o])&&!f(t,r)&&_(t,r,g(e,r))};o&&E&&j(s[S],E),(T||o)&&j(s[S],x)},9904:(t,e,r)=>{"use strict";r(6518)({target:"Object",stat:!0,sham:!r(3724)},{create:r(2360)})},4185:(t,e,r)=>{"use strict";var n=r(6518),o=r(3724),i=r(4913).f;n({target:"Object",stat:!0,forced:Object.defineProperty!==i,sham:!o},{defineProperty:i})},3851:(t,e,r)=>{"use strict";var n=r(6518),o=r(9039),i=r(5397),a=r(7347).f,s=r(3724);n({target:"Object",stat:!0,forced:!s||o((function(){a(1)})),sham:!s},{getOwnPropertyDescriptor:function(t,e){return a(i(t),e)}})},9773:(t,e,r)=>{"use strict";var n=r(6518),o=r(4495),i=r(9039),a=r(3717),s=r(8981);n({target:"Object",stat:!0,forced:!o||i((function(){a.f(1)}))},{getOwnPropertySymbols:function(t){var e=a.f;return e?e(s(t)):[]}})},875:(t,e,r)=>{"use strict";var n=r(6518),o=r(9039),i=r(8981),a=r(2787),s=r(2211);n({target:"Object",stat:!0,forced:o((function(){a(1)})),sham:!s},{getPrototypeOf:function(t){return a(i(t))}})},287:(t,e,r)=>{"use strict";r(6518)({target:"Object",stat:!0},{setPrototypeOf:r(2967)})},6099:(t,e,r)=>{"use strict";var n=r(2140),o=r(6840),i=r(3179);n||o(Object.prototype,"toString",i,{unsafe:!0})},825:(t,e,r)=>{"use strict";var n=r(6518),o=r(7751),i=r(8745),a=r(566),s=r(5548),u=r(8551),c=r(34),f=r(2360),l=r(9039),p=o("Reflect","construct"),d=Object.prototype,v=[].push,y=l((function(){function t(){}return!(p((function(){}),[],t)instanceof t)})),h=!l((function(){p((function(){}))})),g=y||h;n({target:"Reflect",stat:!0,forced:g,sham:g},{construct:function(t,e){s(t),u(e);var r=arguments.length<3?t:s(arguments[2]);if(h&&!y)return p(t,e,r);if(t===r){switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3])}var n=[null];return i(v,n,e),new(i(a,t,n))}var o=r.prototype,l=f(c(o)?o:d),g=i(t,l,e);return c(g)?g:l}})},888:(t,e,r)=>{"use strict";var n=r(6518),o=r(9565),i=r(34),a=r(8551),s=r(6575),u=r(7347),c=r(2787);n({target:"Reflect",stat:!0},{get:function t(e,r){var n,f,l=arguments.length<3?e:arguments[2];return a(e)===l?e[r]:(n=u.f(e,r))?s(n)?n.value:void 0===n.get?void 0:o(n.get,l):i(f=c(e))?t(f,r,l):void 0}})},7764:(t,e,r)=>{"use strict";var n=r(8183).charAt,o=r(655),i=r(1181),a=r(1088),s=r(2529),u="String Iterator",c=i.set,f=i.getterFor(u);a(String,"String",(function(t){c(this,{type:u,string:o(t),index:0})}),(function(){var t,e=f(this),r=e.string,o=e.index;return o>=r.length?s(void 0,!0):(t=n(r,o),e.index+=t.length,s(t,!1))}))},6761:(t,e,r)=>{"use strict";var n=r(6518),o=r(4576),i=r(9565),a=r(9504),s=r(6395),u=r(3724),c=r(4495),f=r(9039),l=r(9297),p=r(1625),d=r(8551),v=r(5397),y=r(6969),h=r(655),g=r(6980),_=r(2360),b=r(1072),m=r(8480),S=r(298),x=r(3717),E=r(7347),O=r(4913),A=r(6801),w=r(8773),P=r(6840),k=r(2106),T=r(5745),M=r(6119),j=r(421),I=r(3392),C=r(8227),L=r(1951),N=r(511),D=r(8242),R=r(687),F=r(1181),B=r(9213).forEach,U=M("hidden"),V="Symbol",G="prototype",W=F.set,q=F.getterFor(V),$=Object[G],z=o.Symbol,H=z&&z[G],Y=o.RangeError,K=o.TypeError,X=o.QObject,Q=E.f,J=O.f,Z=S.f,tt=w.f,et=a([].push),rt=T("symbols"),nt=T("op-symbols"),ot=T("wks"),it=!X||!X[G]||!X[G].findChild,at=function(t,e,r){var n=Q($,e);n&&delete $[e],J(t,e,r),n&&t!==$&&J($,e,n)},st=u&&f((function(){return 7!==_(J({},"a",{get:function(){return J(this,"a",{value:7}).a}})).a}))?at:J,ut=function(t,e){var r=rt[t]=_(H);return W(r,{type:V,tag:t,description:e}),u||(r.description=e),r},ct=function(t,e,r){t===$&&ct(nt,e,r),d(t);var n=y(e);return d(r),l(rt,n)?(r.enumerable?(l(t,U)&&t[U][n]&&(t[U][n]=!1),r=_(r,{enumerable:g(0,!1)})):(l(t,U)||J(t,U,g(1,_(null))),t[U][n]=!0),st(t,n,r)):J(t,n,r)},ft=function(t,e){d(t);var r=v(e),n=b(r).concat(vt(r));return B(n,(function(e){u&&!i(lt,r,e)||ct(t,e,r[e])})),t},lt=function(t){var e=y(t),r=i(tt,this,e);return!(this===$&&l(rt,e)&&!l(nt,e))&&(!(r||!l(this,e)||!l(rt,e)||l(this,U)&&this[U][e])||r)},pt=function(t,e){var r=v(t),n=y(e);if(r!==$||!l(rt,n)||l(nt,n)){var o=Q(r,n);return!o||!l(rt,n)||l(r,U)&&r[U][n]||(o.enumerable=!0),o}},dt=function(t){var e=Z(v(t)),r=[];return B(e,(function(t){l(rt,t)||l(j,t)||et(r,t)})),r},vt=function(t){var e=t===$,r=Z(e?nt:v(t)),n=[];return B(r,(function(t){!l(rt,t)||e&&!l($,t)||et(n,rt[t])})),n};c||(P(H=(z=function(){if(p(H,this))throw new K("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?h(arguments[0]):void 0,e=I(t),r=function(t){var n=void 0===this?o:this;n===$&&i(r,nt,t),l(n,U)&&l(n[U],e)&&(n[U][e]=!1);var a=g(1,t);try{st(n,e,a)}catch(t){if(!(t instanceof Y))throw t;at(n,e,a)}};return u&&it&&st($,e,{configurable:!0,set:r}),ut(e,t)})[G],"toString",(function(){return q(this).tag})),P(z,"withoutSetter",(function(t){return ut(I(t),t)})),w.f=lt,O.f=ct,A.f=ft,E.f=pt,m.f=S.f=dt,x.f=vt,L.f=function(t){return ut(C(t),t)},u&&(k(H,"description",{configurable:!0,get:function(){return q(this).description}}),s||P($,"propertyIsEnumerable",lt,{unsafe:!0}))),n({global:!0,constructor:!0,wrap:!0,forced:!c,sham:!c},{Symbol:z}),B(b(ot),(function(t){N(t)})),n({target:V,stat:!0,forced:!c},{useSetter:function(){it=!0},useSimple:function(){it=!1}}),n({target:"Object",stat:!0,forced:!c,sham:!u},{create:function(t,e){return void 0===e?_(t):ft(_(t),e)},defineProperty:ct,defineProperties:ft,getOwnPropertyDescriptor:pt}),n({target:"Object",stat:!0,forced:!c},{getOwnPropertyNames:dt}),D(),R(z,V),j[U]=!0},9463:(t,e,r)=>{"use strict";var n=r(6518),o=r(3724),i=r(4576),a=r(9504),s=r(9297),u=r(4901),c=r(1625),f=r(655),l=r(2106),p=r(7740),d=i.Symbol,v=d&&d.prototype;if(o&&u(d)&&(!("description"in v)||void 0!==d().description)){var y={},h=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:f(arguments[0]),e=c(v,this)?new d(t):void 0===t?d():d(t);return""===t&&(y[e]=!0),e};p(h,d),h.prototype=v,v.constructor=h;var g="Symbol(description detection)"===String(d("description detection")),_=a(v.valueOf),b=a(v.toString),m=/^Symbol\((.*)\)[^)]+$/,S=a("".replace),x=a("".slice);l(v,"description",{configurable:!0,get:function(){var t=_(this);if(s(y,t))return"";var e=b(t),r=g?x(e,7,-1):S(e,m,"$1");return""===r?void 0:r}}),n({global:!0,constructor:!0,forced:!0},{Symbol:h})}},1510:(t,e,r)=>{"use strict";var n=r(6518),o=r(7751),i=r(9297),a=r(655),s=r(5745),u=r(1296),c=s("string-to-symbol-registry"),f=s("symbol-to-string-registry");n({target:"Symbol",stat:!0,forced:!u},{for:function(t){var e=a(t);if(i(c,e))return c[e];var r=o("Symbol")(e);return c[e]=r,f[r]=e,r}})},2259:(t,e,r)=>{"use strict";r(511)("iterator")},2675:(t,e,r)=>{"use strict";r(6761),r(1510),r(7812),r(3110),r(9773)},7812:(t,e,r)=>{"use strict";var n=r(6518),o=r(9297),i=r(757),a=r(6823),s=r(5745),u=r(1296),c=s("symbol-to-string-registry");n({target:"Symbol",stat:!0,forced:!u},{keyFor:function(t){if(!i(t))throw new TypeError(a(t)+" is not a symbol");if(o(c,t))return c[t]}})},5700:(t,e,r)=>{"use strict";var n=r(511),o=r(8242);n("toPrimitive"),o()},2953:(t,e,r)=>{"use strict";var n=r(4576),o=r(7400),i=r(9296),a=r(3792),s=r(6699),u=r(687),c=r(8227)("iterator"),f=a.values,l=function(t,e){if(t){if(t[c]!==f)try{s(t,c,f)}catch(e){t[c]=f}if(u(t,e,!0),o[e])for(var r in a)if(t[r]!==a[r])try{s(t,r,a[r])}catch(e){t[r]=a[r]}}};for(var p in o)l(n[p]&&n[p].prototype,p);l(i,"DOMTokenList")},5575:(t,e,r)=>{"use strict";var n=r(6518),o=r(4576),i=r(9472)(o.setInterval,!0);n({global:!0,bind:!0,forced:o.setInterval!==i},{setInterval:i})},4599:(t,e,r)=>{"use strict";var n=r(6518),o=r(4576),i=r(9472)(o.setTimeout,!0);n({global:!0,bind:!0,forced:o.setTimeout!==i},{setTimeout:i})},6031:(t,e,r)=>{"use strict";r(5575),r(4599)}},r={};function n(t){var o=r[t];if(void 0!==o)return o.exports;var i=r[t]={id:t,exports:{}};return e[t].call(i.exports,i,i.exports,n),i.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var o={};return(()=>{"use strict";var t=o;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(t)}n(2675),n(9463),n(2259),n(5700),n(3792),n(9572),n(2892),n(9904),n(4185),n(3851),n(875),n(6099),n(825),n(888),n(7764),n(2953),t.default=void 0,n(4170),n(2010),n(287),n(6031);var r=n(7502),i=s(n(6370)),a=s(n(6373));function s(t){return t&&t.__esModule?t:{default:t}}function u(t,e){for(var r=0;r=10}},{key:"_isIOS10PlusWithAdError",get:function(){return this._hasAdError&&this._isIOS10Plus}},{key:"_onContainerChanged",value:function(){var t=this;this._adPlayer&&(this.$el.hide(),this._adPlayer.destroy(),this._coreAutoplay=this.core.options.autoPlay),this._resetAd(),this._isEnded=!1,this.listenTo(this.__playback,r.Events.PLAYBACK_PLAY_INTENT,(function(){t._isPlayingAd||t._adPlayer&&t._isFirstPlay&&(t._adPlayer.initAdDisplayContainer(),t._disableUI())})),this.listenTo(this.__playback,r.Events.PLAYBACK_PLAY,(function(){t._isPlayingAd||(t._src!==t.__playback.el.src&&(t._src=t.__playback.el.src),t._adPlayer&&t._isFirstPlay&&(t._isFirstPlay=!1,t._isEnded=!1,t._src=t.__playback.el.src,t.__playback.pause(),t._adPlayer.play()))})),this.listenTo(this.__playback,r.Events.PLAYBACK_ENDED,(function(){t._isPlayingAd||t._mayAutoStartMutedAdPlayer||t._adPlayer&&!t._isEnded&&(t._isEnded=!0,t._adPlayer&&t._adPlayer.ended(),t.__config.resetAdOnEnded&&t._resetAd())})),this.listenTo(this.__container,r.Events.CONTAINER_VOLUME,(function(e){t._adPlayer&&t._adPlayer.setVolume(e/100)})),this.__container.$el.append(this.el)}},{key:"_onCoreReady",value:function(){this._initPlugin(),this._coreAutoplay&&(this.core._options.autoPlay=!0)}},{key:"_onResize",value:function(t){t.width&&t.width>0&&this._adPlayer&&this._adPlayer.resize(t.width,t.height)}},{key:"_resetAd",value:function(){this._isFirstPlay=!0,this._isNonLinear=!1}},{key:"_initPlugin",value:function(){var t=this,e=this.__config.imaAdPlayer||{tag:!1};e.video=this.__playback.el,e.displayContainer=this._adContainer,(!this._playbackIsMedia&&r.Browser.isMobile||"no_op"===this.__playback.name)&&(e.tag=!1),e.tag?(this._errorScreenPlugin=this.core.getPlugin("error_screen"),this._posterPlugin=this.__container.getPlugin("poster"),this._clickToPausePlugin=this.__container.getPlugin("click_to_pause"),this._playbackIsMedia&&!this.__playback.el.hasAttribute("poster")&&(this.__playback.el.poster='data:image/svg+xml, '),(0,i.default)(e,(function(e,n){if(n)return t._mayAutoStartMutedAdPlayer=!1,t._resumeContent();t.__config.enableCustomPlaybackForIOS10Plus||google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0),e.on("ad_begin",(function(){t.$el.show(),t._isPlayingAd=!0,t._hasAdError=!1,t._pauseContent()})),e.on("ad_error",(function(){t._hasAdError=!0})),e.on("ad_non_linear",(function(){t._isNonLinear=!0})),e.on("ad_end",(function(){t._isNonLinear?t.__config.disableNonLinear||t.__config.disableNonLinearForIOS&&r.Browser.isiOS?(t._isPlayingAd=!1,t.$el.hide(),t._adPlayer&&t._adPlayer.stop()):(t._isPlayingAd=!0,t.$el.show()):(t._isPlayingAd=!1,t.$el.hide()),t._mayAutoStartMutedAdPlayer=!1,t._isEnded?t._restoreSourceIfMissing((function(){t._enableUI(!1)})):t._restoreSourceIfMissing((function(){t._resumeContent()}))})),t._adPlayer=e,"function"==typeof t.__config.onAdPlayerReady&&t.__config.onAdPlayerReady(t._adPlayer),t._coreAutoplay?t.__playback.canAutoPlay((function(e){e?(t._isFirstPlay=!1,t._isEnded=!1,t._setDummySourceIfMissing((function(){t._mayAutoStartMutedAdPlayer=!0,t._adPlayer.play()}))):t._mayRequestAdIfNoAutoplay()})):t._mayRequestAdIfNoAutoplay()}))):this._adPlayer=null}},{key:"_mayRequestAdIfNoAutoplay",value:function(){this.__config.requestAdIfNoAutoplay&&this._adPlayer.request()}},{key:"_setDummySourceIfMissing",value:function(t){if(this._playbackIsMedia){var e=this.__playback.el&&this.__playback.el.src;e&&0!==e.length?this._src=e:this.__playback.el.src=r.Utils.Media.mp4}t&&t()}},{key:"_restoreSourceIfMissing",value:function(t){var e=this;this._sourceIsRestored&&!this._isIOS10PlusWithAdError?t&&t():this._setSource(this._src,(function(){e._pauseTime>1&&!e._isEnded?e._seek(e._pauseTime,t):t&&t()}))}},{key:"_setSource",value:function(t,e){var r=this,n=function(){r.__playback.el.removeEventListener("loadedmetadata",n,!1),r.__playback.el.removeEventListener("error",n,!1),e&&e()};this.__playback.el.addEventListener("loadedmetadata",n,!1),this.__playback.el.addEventListener("error",n,!1),this.__playback.el.src=t,this.__playback.el.load()}},{key:"_seek",value:function(t,e){var r=this;if(this._playbackIsMedia&&!this.__playback.el.seekable.length)return setTimeout((function(){r._seek(t,e)}),100);this.__playback.seek&&this.__playback.seek(t),e&&e()}},{key:"_disableUI",value:function(){if(this.core.disableMediaControl)this.core.disableMediaControl();else{var t=this.core.getPlugin("media_control");t&&t.disable()}this._posterPlugin&&this._posterPlugin.disable(),this._clickToPausePlugin&&this._clickToPausePlugin.disable(),this._errorScreenPlugin&&this._errorScreenPlugin.disable(),this._uiEnabled=!1}},{key:"_enableUI",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(!this._uiEnabled){if(this._errorScreenPlugin&&this._errorScreenPlugin.enable(),this._clickToPausePlugin&&this._clickToPausePlugin.enable(),this._posterPlugin&&this._posterPlugin.enable(),t)if(this.core.enableMediaControl)this.core.enableMediaControl();else{var e=this.core.getPlugin("media_control");e&&e.enable()}this._uiEnabled=!0}}},{key:"_pauseContent",value:function(){this._pauseTime=this._playbackCurrentTime,this.__playback.pause(),this._disableUI()}},{key:"_resumeContent",value:function(){this._enableUI(),this.__playback.play()}},{key:"render",value:function(){return this._$adContainer=(0,r.$)("
").addClass("ima-ad-container").attr("data-ima",""),this.$el.append(this._$adContainer),this.$el.append(r.Styler.getStyleFor(a.default)),this._adContainer=this._$adContainer[0],this.$el.hide(),this}},{key:"destroy",value:function(){var t,r,n,o,i;this._adPlayer&&this._adPlayer.destroy(),(t=e,r="destroy",n=this,i=p(d(1&(o=3)?t.prototype:t),r,n),2&o&&"function"==typeof i?function(t){return i.apply(n,t)}:i)([])}}],s=[{key:"vpaidMode",get:function(){return i.default.vpaidMode}}],o&&u(n.prototype,o),s&&u(n,s),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o,s}(r.UICorePlugin)})(),o=o.default})())); -------------------------------------------------------------------------------- /eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import cypress from "eslint-plugin-cypress"; 2 | import globals from "globals"; 3 | import path from "node:path"; 4 | import { fileURLToPath } from "node:url"; 5 | import js from "@eslint/js"; 6 | import { FlatCompat } from "@eslint/eslintrc"; 7 | 8 | const __filename = fileURLToPath(import.meta.url); 9 | const __dirname = path.dirname(__filename); 10 | const compat = new FlatCompat({ 11 | baseDirectory: __dirname, 12 | recommendedConfig: js.configs.recommended, 13 | allConfig: js.configs.all 14 | }); 15 | 16 | export default [...compat.extends("eslint:recommended"), { 17 | plugins: { 18 | cypress, 19 | }, 20 | 21 | languageOptions: { 22 | globals: { 23 | ...globals.browser, 24 | ...cypress.environments.globals.globals, 25 | ...globals.node, 26 | Atomics: "readonly", 27 | SharedArrayBuffer: "readonly", 28 | }, 29 | 30 | ecmaVersion: 2018, 31 | sourceType: "module", 32 | }, 33 | 34 | rules: { 35 | "brace-style": [2, "1tbs", { 36 | allowSingleLine: true, 37 | }], 38 | }, 39 | }]; -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "clappr-ima-plugin", 3 | "version": "0.5.3", 4 | "description": "IMA SDK Plugin for Clappr.", 5 | "main": "dist/clappr-ima-plugin.js", 6 | "scripts": { 7 | "build": "webpack --progress --mode production", 8 | "dist": "webpack --progress --mode production", 9 | "lint": "eslint webpack.config.js src/**/*.js tests/**/*.js && stylelint src/**/*.sass", 10 | "release": "npm run lint && npm run build && npm run dist", 11 | "start": "webpack serve --mode development", 12 | "cypress:run": "cypress run --browser chrome", 13 | "cypress:open": "cypress open --browser chrome", 14 | "test": "NO_COLOR=1 cr -c .testrc.json" 15 | }, 16 | "author": "Karim Slimani ", 17 | "license": "MIT", 18 | "keywords": [ 19 | "clappr", 20 | "ima", 21 | "plugin", 22 | "ad", 23 | "googleads" 24 | ], 25 | "repository": "kslimani/clappr-ima-plugin", 26 | "devDependencies": { 27 | "@babel/core": "^7.26.9", 28 | "@babel/preset-env": "^7.26.9", 29 | "@eslint/eslintrc": "^3.3.0", 30 | "@eslint/js": "^9.22.0", 31 | "babel-loader": "^10.0.0", 32 | "command-runner": "^0.2.2", 33 | "core-js": "^3.41.0", 34 | "css-loader": "^7.1.2", 35 | "cypress": "^14.1.0", 36 | "eslint": "^9.22.0", 37 | "eslint-plugin-cypress": "^4.2.0", 38 | "globals": "^16.0.0", 39 | "ima-ad-player": "^0.5.7", 40 | "node-sass": "^9.0.0", 41 | "postcss-sass": "^0.5.0", 42 | "sass-loader": "^16.0.5", 43 | "stylelint": "^16.15.0", 44 | "stylelint-config-recommended": "^15.0.0", 45 | "terser-webpack-plugin": "^5.3.14", 46 | "webpack": "^5.98.0", 47 | "webpack-build-notifier": "^3.1.0", 48 | "webpack-cli": "^6.0.1", 49 | "webpack-dev-server": "^5.2.0" 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 26 | 27 | 28 |
29 |
30 | 31 | 32 | 33 | 34 |
35 | 188 | 189 | 190 | -------------------------------------------------------------------------------- /public/tests/vmap_spec.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 15 | 16 | 17 |
18 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | import {UICorePlugin, Events, Browser, Styler, Utils, $} from 'clappr' 2 | import ImaAdPlayer from 'ima-ad-player' 3 | import pluginStyle from './style.sass' 4 | 5 | const svgPixel = 'data:image/svg+xml, ' 6 | 7 | /* global google */ 8 | export default class ClapprImaPlugin extends UICorePlugin { 9 | get name() { 10 | return 'ima-plugin' 11 | } 12 | 13 | get supportedVersion() { 14 | return { 15 | min: '0.4.0', 16 | max: '1.0.0' 17 | } 18 | } 19 | 20 | get attributes() { 21 | return { 22 | 'class': this.name, 23 | 'data-ima': '' 24 | } 25 | } 26 | 27 | static get vpaidMode() { 28 | return ImaAdPlayer.vpaidMode 29 | } 30 | 31 | constructor(core) { 32 | super(core) 33 | 34 | // Store autoplay value 35 | this._coreAutoplay = this.core.options.autoPlay 36 | 37 | // Disable autoplay if VAST tag is set to prevents content playback 38 | this._hasTag && (this.core._options.autoPlay = false) 39 | } 40 | 41 | bindEvents() { 42 | if (Events.CORE_ACTIVE_CONTAINER_CHANGED) { 43 | this.listenTo(this.core, Events.CORE_ACTIVE_CONTAINER_CHANGED, this._onContainerChanged) 44 | } else { 45 | this.listenTo(this.core.mediaControl, Events.MEDIACONTROL_CONTAINERCHANGED, this._onContainerChanged) 46 | } 47 | 48 | this.listenTo(this.core, Events.CORE_READY, this._onCoreReady) 49 | this.listenTo(this.core, Events.CORE_RESIZE, this._onResize) 50 | } 51 | 52 | get __config() { 53 | return this.options.imaPlugin || {} 54 | } 55 | 56 | get __container() { 57 | return this.core.activeContainer 58 | ? this.core.activeContainer 59 | : this.core.mediaControl.container 60 | } 61 | 62 | get __playback() { 63 | return this.core.activePlayback 64 | ? this.core.activePlayback 65 | : this.core.getCurrentPlayback() 66 | } 67 | 68 | get _hasTag() { 69 | return !!(this.__config.imaAdPlayer && this.__config.imaAdPlayer.tag) 70 | } 71 | 72 | get _playbackIsMedia() { 73 | return this.__playback.tagName === 'video' 74 | || this.__playback.tagName === 'audio' 75 | } 76 | 77 | get _playbackIsNativeVideo() { 78 | return this.__playback.name === 'html5_video' 79 | } 80 | 81 | get _sourceIsRestored() { 82 | // Video source is checked only if "native" video playback, 83 | // otherwise it assume that custom playback is not used by IMA SDK 84 | // See also https://github.com/kslimani/clappr-ima-plugin/issues/5 85 | return (this._playbackIsNativeVideo && ! this._isNonLinear) 86 | ? this._src === this.__playback.el.src 87 | : true 88 | } 89 | 90 | get _playbackCurrentTime() { 91 | return this.__playback.getCurrentTime 92 | ? this.__playback.getCurrentTime() 93 | : this.__playback.el.currentTime // Assume video element 94 | } 95 | 96 | get _isIOS10Plus() { 97 | return Browser.isiOS && Browser.os.majorVersion >= 10 98 | } 99 | 100 | get _isIOS10PlusWithAdError() { 101 | return this._hasAdError && this._isIOS10Plus 102 | } 103 | 104 | _onContainerChanged() { 105 | if (this._adPlayer) { 106 | // Assumes player has loaded another source 107 | this.$el.hide() 108 | this._adPlayer.destroy() 109 | 110 | // If autoplay is true on mobile device then player 111 | // must be consented and recycle video must be enabled 112 | this._coreAutoplay = this.core.options.autoPlay 113 | } 114 | 115 | // Reset ad scenario 116 | this._resetAd() 117 | 118 | this._isEnded = false 119 | 120 | this.listenTo(this.__playback, Events.PLAYBACK_PLAY_INTENT, () => { 121 | if (this._isPlayingAd) return 122 | 123 | // Assumes that "PLAYBACK_PLAY_INTENT" event is from user interaction 124 | if (this._adPlayer && this._isFirstPlay) { 125 | this._adPlayer.initAdDisplayContainer() 126 | this._disableUI() 127 | } 128 | }) 129 | 130 | this.listenTo(this.__playback, Events.PLAYBACK_PLAY, () => { 131 | if (this._isPlayingAd) return 132 | 133 | // Playback source may have changed 134 | if (this._src !== this.__playback.el.src) { 135 | this._src = this.__playback.el.src 136 | } 137 | 138 | // FIXME: add a mechanism in Clappr to prevents playback to play on "PLAYBACK_PLAY_INTENT" event 139 | // FIXME: Alternatively, remove "dummy" source feature and autostart playback, with the risk to degrade user experience ? 140 | if (this._adPlayer && this._isFirstPlay) { 141 | this._isFirstPlay = false 142 | this._isEnded = false 143 | this._src = this.__playback.el.src 144 | this.__playback.pause() 145 | this._adPlayer.play() 146 | } 147 | }) 148 | 149 | this.listenTo(this.__playback, Events.PLAYBACK_ENDED, () => { 150 | if (this._isPlayingAd || this._mayAutoStartMutedAdPlayer) return 151 | 152 | if (this._adPlayer && ! this._isEnded) { 153 | this._isEnded = true 154 | 155 | // Signal ad player that playback completed 156 | this._adPlayer && this._adPlayer.ended() 157 | 158 | this.__config.resetAdOnEnded && this._resetAd() 159 | } 160 | }) 161 | 162 | this.listenTo(this.__container, Events.CONTAINER_VOLUME, (v) => { 163 | this._adPlayer && this._adPlayer.setVolume(v/100) 164 | }) 165 | 166 | this.__container.$el.append(this.el) 167 | } 168 | 169 | _onCoreReady() { 170 | // Since Clappr 0.2.84, "CORE_READY" event is trigerred after container changed 171 | this._initPlugin() 172 | 173 | // Restore autoplay (if previously enabled) 174 | this._coreAutoplay && (this.core._options.autoPlay = true) 175 | } 176 | 177 | _onResize(evt) { 178 | if (evt.width && evt.width > 0) { 179 | this._adPlayer && this._adPlayer.resize(evt.width, evt.height) 180 | } 181 | } 182 | 183 | _resetAd() { 184 | this._isFirstPlay = true 185 | this._isNonLinear = false 186 | } 187 | 188 | _initPlugin() { 189 | // Build ad player configuration 190 | let config = this.__config.imaAdPlayer || {tag: false} 191 | config.video = this.__playback.el 192 | config.displayContainer = this._adContainer 193 | 194 | if (! this._playbackIsMedia && Browser.isMobile) { 195 | // Mobile device require an HTML5 video element 196 | config.tag = false 197 | } else if (this.__playback.name === 'no_op') { 198 | // Avoid to display an ad if player cannot play content 199 | config.tag = false 200 | } 201 | 202 | // Prevents ad player creation if no VAST tag 203 | if (! config.tag) { 204 | this._adPlayer = null 205 | 206 | return 207 | } 208 | 209 | // Attempt to get "error screen" core plugin 210 | this._errorScreenPlugin = this.core.getPlugin('error_screen') 211 | 212 | // Attempt to get "poster" container plugin 213 | this._posterPlugin = this.__container.getPlugin('poster') 214 | 215 | // Attempt to get "click to pause" container plugin 216 | this._clickToPausePlugin = this.__container.getPlugin('click_to_pause') 217 | 218 | // Hide video source preview using a black 1 pixel video poster for smoother user experience (iOS/MacOSX) 219 | if (this._playbackIsMedia && ! this.__playback.el.hasAttribute('poster')) { 220 | this.__playback.el.poster = svgPixel 221 | } 222 | 223 | // Create ad player 224 | ImaAdPlayer(config, (player, error) => { 225 | // Resume content if ad player creation failed 226 | if (error) { 227 | this._mayAutoStartMutedAdPlayer = false 228 | 229 | return this._resumeContent() 230 | } 231 | 232 | // Disable custom playback by default for iOS 10+ to handle skippable ads 233 | // Plugin will take care of video content source 234 | this.__config.enableCustomPlaybackForIOS10Plus || google.ima.settings.setDisableCustomPlaybackForIOS10Plus(true) 235 | 236 | player.on('ad_begin', () => { 237 | this.$el.show() 238 | this._isPlayingAd = true 239 | this._hasAdError = false 240 | this._pauseContent() 241 | }) 242 | 243 | player.on('ad_error', () => { 244 | this._hasAdError = true 245 | }) 246 | 247 | player.on('ad_non_linear', () => { 248 | this._isNonLinear = true 249 | }) 250 | 251 | player.on('ad_end', () => { 252 | if (this._isNonLinear) { 253 | if (this.__config.disableNonLinear || (this.__config.disableNonLinearForIOS && Browser.isiOS)) { 254 | // Non-linear conflicts with "click_to_play" plugin on iOS devices, 255 | // therefore it is skipped if disableNonLinearForIOS is set 256 | this._isPlayingAd = false 257 | this.$el.hide() 258 | this._adPlayer && this._adPlayer.stop() 259 | } else { 260 | this._isPlayingAd = true 261 | this.$el.show() 262 | } 263 | } else { 264 | this._isPlayingAd = false 265 | this.$el.hide() 266 | } 267 | 268 | this._mayAutoStartMutedAdPlayer = false 269 | 270 | // Avoid video to starts over after a post-roll 271 | if (this._isEnded) { 272 | this._restoreSourceIfMissing(() => { 273 | this._enableUI(false) 274 | }) 275 | } else { 276 | this._restoreSourceIfMissing(() => { 277 | this._resumeContent() 278 | }) 279 | } 280 | }) 281 | 282 | this._adPlayer = player 283 | 284 | if (typeof this.__config.onAdPlayerReady === 'function') { 285 | this.__config.onAdPlayerReady(this._adPlayer) 286 | } 287 | 288 | // Check if autoplay was enabled 289 | if (this._coreAutoplay) { 290 | // Attempt to autoplay ad player 291 | this.__playback.canAutoPlay((result) => { 292 | if (result) { 293 | this._isFirstPlay = false 294 | this._isEnded = false 295 | this._setDummySourceIfMissing(() => { 296 | this._mayAutoStartMutedAdPlayer = true 297 | this._adPlayer.play() 298 | }) 299 | } else { 300 | this._mayRequestAdIfNoAutoplay() 301 | } 302 | }) 303 | } else { 304 | this._mayRequestAdIfNoAutoplay() 305 | } 306 | }) 307 | } 308 | 309 | _mayRequestAdIfNoAutoplay() { 310 | this.__config.requestAdIfNoAutoplay && this._adPlayer.request() 311 | } 312 | 313 | _setDummySourceIfMissing(next) { 314 | if (this._playbackIsMedia) { 315 | let src = this.__playback.el && this.__playback.el.src 316 | 317 | // Video source may not be set yet by playback 318 | if (!src || src.length === 0) { 319 | this.__playback.el.src = Utils.Media.mp4 320 | } else { 321 | this._src = src 322 | } 323 | } 324 | 325 | next && next() 326 | } 327 | 328 | _restoreSourceIfMissing(next) { 329 | if (this._sourceIsRestored && ! this._isIOS10PlusWithAdError) { 330 | next && next() 331 | } else { 332 | // Source may not be restored on iOS 10 plus if IMA custom playback is disabled 333 | this._setSource(this._src, () => { 334 | // Check for seek after mid-roll 335 | if (this._pauseTime > 1 && ! this._isEnded) { 336 | this._seek(this._pauseTime, next) 337 | } else { 338 | next && next() 339 | } 340 | }) 341 | } 342 | } 343 | 344 | _setSource(src, next) { 345 | let eh = () => { 346 | this.__playback.el.removeEventListener('loadedmetadata', eh, false) 347 | this.__playback.el.removeEventListener('error', eh, false) 348 | next && next() 349 | } 350 | 351 | this.__playback.el.addEventListener('loadedmetadata', eh, false) 352 | this.__playback.el.addEventListener('error', eh, false) 353 | this.__playback.el.src = src 354 | this.__playback.el.load() 355 | } 356 | 357 | _seek(seekTime, next) { 358 | if (this._playbackIsMedia && ! this.__playback.el.seekable.length) { 359 | return setTimeout(() => { 360 | this._seek(seekTime, next) 361 | }, 100) 362 | } 363 | 364 | // Assume playback implements seek method 365 | this.__playback.seek && this.__playback.seek(seekTime) 366 | next && next() 367 | } 368 | 369 | _disableUI() { 370 | if (this.core.disableMediaControl) { 371 | this.core.disableMediaControl() 372 | } else { 373 | let mediaControl = this.core.getPlugin('media_control') 374 | mediaControl && mediaControl.disable() 375 | } 376 | 377 | this._posterPlugin && this._posterPlugin.disable() 378 | this._clickToPausePlugin && this._clickToPausePlugin.disable() 379 | this._errorScreenPlugin && this._errorScreenPlugin.disable() 380 | this._uiEnabled = false 381 | } 382 | 383 | _enableUI(enableMediaControl = true) { 384 | if (this._uiEnabled) { 385 | return 386 | } 387 | 388 | this._errorScreenPlugin && this._errorScreenPlugin.enable() 389 | this._clickToPausePlugin && this._clickToPausePlugin.enable() 390 | this._posterPlugin && this._posterPlugin.enable() 391 | 392 | if (enableMediaControl) { 393 | if (this.core.enableMediaControl) { 394 | this.core.enableMediaControl() 395 | } else { 396 | let mediaControl = this.core.getPlugin('media_control') 397 | mediaControl && mediaControl.enable() 398 | } 399 | } 400 | 401 | this._uiEnabled = true 402 | } 403 | 404 | _pauseContent() { 405 | this._pauseTime = this._playbackCurrentTime 406 | this.__playback.pause() 407 | this._disableUI() 408 | } 409 | 410 | _resumeContent() { 411 | this._enableUI() 412 | this.__playback.play() 413 | } 414 | 415 | render() { 416 | this._$adContainer = $("
") 417 | .addClass("ima-ad-container") 418 | .attr('data-ima', '') 419 | 420 | this.$el.append(this._$adContainer) 421 | this.$el.append(Styler.getStyleFor(pluginStyle)) 422 | this._adContainer = this._$adContainer[0] 423 | this.$el.hide() 424 | 425 | return this 426 | } 427 | 428 | destroy() { 429 | this._adPlayer && this._adPlayer.destroy() 430 | super.destroy() 431 | } 432 | } 433 | -------------------------------------------------------------------------------- /src/style.sass: -------------------------------------------------------------------------------- 1 | .ima-plugin[data-ima] 2 | position: absolute 3 | top: 0 4 | left: 0 5 | width: 100% 6 | height: 100% 7 | text-align: left 8 | z-index: 10000 /* media-control z-index is 9999 */ 9 | .ima-ad-container[data-ima] 10 | position: absolute 11 | top: 0 12 | left: 0 13 | width: 100% 14 | height: 100% 15 | -------------------------------------------------------------------------------- /tests/functional/vmap_spec.js: -------------------------------------------------------------------------------- 1 | import EventDomStorage from '../support/event-dom-storage' 2 | 3 | describe('VAST VMAP ads scenario', () => { 4 | it('display preroll, midroll and postroll', () => { 5 | 6 | cy.visit('/tests/vmap_spec.html', { 7 | onBeforeLoad(win) { EventDomStorage.make(win) } 8 | }) 9 | 10 | cy.window().then((win) => { 11 | expect(win.Clappr).to.be.an('object') 12 | expect(win.ClapprImaPlugin).to.be.a('function') 13 | expect(win.google.ima).to.be.an('object') 14 | }) 15 | 16 | cy.get('.player-poster[data-poster]').should('not.be.visible') 17 | 18 | // PREROLL 19 | cy.expectEvent(1, 'ad_begin') 20 | cy.get('.ima-plugin[data-ima]').should('be.visible') 21 | cy.expectEvent(2, 'impression', 'ad_begin') 22 | cy.expectEvent(3, 'started', 'impression') 23 | cy.expectEvent(4, 'first_quartile', 'started') 24 | cy.expectEvent(5, 'midpoint', 'first_quartile') 25 | cy.expectEvent(6, 'third_quartile', 'midpoint') 26 | cy.expectEvent(7, 'complete', 'third_quartile') 27 | cy.expectEvent(8, 'ad_end', 'complete') 28 | cy.get('.ima-plugin[data-ima]').should('not.be.visible') 29 | cy.expectEvent(9, 'player_play', 'ad_end') 30 | 31 | // Midroll is scheduled at 15 seconds 32 | cy.wait(15000) 33 | 34 | // MIDROLL 35 | cy.expectEvent(10, 'ad_begin', 'player_play') 36 | cy.get('.ima-plugin[data-ima]').should('be.visible') 37 | cy.expectEvent(11, 'impression', 'ad_begin') 38 | cy.expectEvent(12, 'started', 'impression') 39 | cy.expectEvent(13, 'first_quartile', 'started') 40 | cy.expectEvent(14, 'midpoint', 'first_quartile') 41 | cy.expectEvent(15, 'third_quartile', 'midpoint') 42 | cy.expectEvent(16, 'complete', 'third_quartile') 43 | cy.expectEvent(17, 'ad_end', 'complete') 44 | cy.get('.ima-plugin[data-ima]').should('not.be.visible') 45 | cy.expectEvent(18, 'player_play', 'ad_end') 46 | 47 | // Video length is 33 seconds 48 | cy.wait(16000) 49 | 50 | // POSTROLL 51 | cy.expectEvent(19, 'player_ended', 'player_play') 52 | cy.expectEvent(20, 'ad_begin', 'player_ended') 53 | cy.get('.ima-plugin[data-ima]').should('be.visible') 54 | cy.expectEvent(21, 'impression', 'ad_begin') 55 | cy.expectEvent(22, 'started', 'impression') 56 | cy.expectEvent(23, 'first_quartile', 'started') 57 | cy.expectEvent(24, 'midpoint', 'first_quartile') 58 | cy.expectEvent(25, 'third_quartile', 'midpoint') 59 | cy.expectEvent(26, 'complete', 'third_quartile') 60 | cy.expectEvent(27, 'ad_end', 'complete') 61 | cy.get('.ima-plugin[data-ima]').should('not.be.visible') 62 | 63 | cy.get('.player-poster[data-poster]').should('be.visible') 64 | 65 | }) 66 | }) 67 | -------------------------------------------------------------------------------- /tests/support/event-dom-storage.js: -------------------------------------------------------------------------------- 1 | /** 2 | * EventDomStorage helper class. See also "cy.expectEvent" test command. 3 | */ 4 | export default class EventDomStorage { 5 | 6 | constructor(win, fn = 'spyEvent') { 7 | this.$el = null 8 | this.fn = fn 9 | this.win = win 10 | this.win[this.fn] = this.store.bind(this) 11 | } 12 | 13 | static make(win, fn) { 14 | return new EventDomStorage(win, fn) 15 | } 16 | 17 | _mount() { 18 | // Ensure document.body is available 19 | if (!this.win || !this.win.document || !this.win.document.body) { 20 | throw 'EventDomStorage: document.body unavailable' 21 | } 22 | 23 | // Create hidden container element 24 | this.$el = Cypress.$('
    ') 25 | .attr('data-cy', this.fn) 26 | .hide() 27 | 28 | // Append to document body 29 | Cypress.$(this.win.document.body) 30 | .append(this.$el) 31 | } 32 | 33 | store(event) { 34 | if (this.$el === null) { 35 | this._mount() 36 | } 37 | 38 | // Calculate order from previous stored event 39 | let $prev = this.$el.find('li').last() 40 | let order = $prev.length > 0 ? parseInt($prev.attr('data-order')) + 1 : 1 41 | let prev = $prev.attr('data-event') 42 | 43 | // Prevents duplicated event 44 | if (event === prev) return 45 | 46 | // Append event to container 47 | this.$el.append( 48 | Cypress.$('
  • ') 49 | .attr('data-event', event) 50 | .attr('data-order', order) 51 | .attr('data-prev', prev) 52 | ) 53 | 54 | console.log(`[${order}] ${event}`) 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /tests/support/index.js: -------------------------------------------------------------------------------- 1 | // Cypress.io support file 2 | 3 | /** 4 | * Disable screenshot on failure 5 | */ 6 | Cypress.Screenshot.defaults({ 7 | screenshotOnRunFailure: false, 8 | }) 9 | 10 | /** 11 | * Add "cy.expectEvent" test command. See also EventDomStorage class. 12 | * 13 | * @example cy.expectEvent(2, 'expectedEvent', 'expectedOptionalPreviousEvent') 14 | */ 15 | Cypress.Commands.add('expectEvent', (order, event, previousEvent) => { 16 | if (previousEvent) { 17 | cy.log(`[${order}] expect event "${event}" fired after event "${previousEvent}"`) 18 | 19 | cy.get('ul[data-cy="spyEvent"]') 20 | .find(`li[data-event="${event}"][data-order="${order}"]`) 21 | .should('have.attr', 'data-prev', previousEvent) 22 | } else { 23 | cy.log(`[${order}] expect event "${event}" fired first`) 24 | 25 | cy.get('ul[data-cy="spyEvent"]') 26 | .find(`li[data-event="${event}"][data-order="${order}"]`) 27 | .should('not.have.attr', 'data-prev') 28 | } 29 | }) 30 | -------------------------------------------------------------------------------- /webpack.config.js: -------------------------------------------------------------------------------- 1 | // Webpack 5 configuration 2 | const path = require('path') 3 | const TerserPlugin = require('terser-webpack-plugin'); 4 | const NotifierPlugin = require('webpack-build-notifier') 5 | 6 | var name = 'clappr-ima-plugin' 7 | var outputFile, plugins = [], optimization = {} 8 | 9 | if (process.env.npm_lifecycle_event === 'dist') { 10 | outputFile = name + '.min.js' 11 | optimization.minimizer = [ 12 | new TerserPlugin(), 13 | ] 14 | } else { 15 | outputFile = name + '.js' 16 | optimization.minimize = false 17 | } 18 | 19 | plugins.push(new NotifierPlugin({ 20 | title: optimization.minimizer ? 'minified ' + name : name, 21 | })) 22 | 23 | module.exports = { 24 | entry: path.resolve(__dirname, 'src/index.js'), 25 | output: { 26 | path: path.resolve(__dirname, 'dist'), 27 | filename: outputFile, 28 | library: { 29 | type: 'umd', 30 | name: 'ClapprImaPlugin', 31 | export: 'default', 32 | }, 33 | }, 34 | optimization: optimization, 35 | module: { 36 | rules: [ 37 | { 38 | test: /\.js$/, 39 | use: { 40 | loader: 'babel-loader' 41 | }, 42 | include: [ 43 | path.resolve(__dirname, 'src') 44 | ], 45 | }, 46 | { 47 | test: /\.sass$/, 48 | use: [ 49 | { 50 | loader: 'css-loader', 51 | }, 52 | { 53 | loader: 'sass-loader', 54 | }, 55 | ], 56 | }, 57 | ], 58 | }, 59 | plugins: plugins, 60 | externals: { 61 | clappr: { 62 | amd: 'clappr', 63 | commonjs: 'clappr', 64 | commonjs2: 'clappr', 65 | root: 'Clappr' 66 | } 67 | }, 68 | devServer: { 69 | static: [ 70 | path.resolve(__dirname, "public"), 71 | ], 72 | // firewall: false, 73 | compress: true, 74 | host: '0.0.0.0', 75 | port: 8080 76 | } 77 | } 78 | --------------------------------------------------------------------------------