cobrowse-sdk-js 2.22.3 → 2.22.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see CobrowseIO.umd.js.LICENSE.txt */
2
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.CobrowseIO=t():e.CobrowseIO=t()}(self,(function(){return function(){"use strict";var e={3606:function(e,t,r){function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function o(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}Object.defineProperty(t,"__esModule",{value:!0}),t.EbmlElementId=void 0,t.getEbmlElementIdLength=c,t.getEbmlElementLevel=function(e){switch(e){case a.Ebml:case a.Segment:return 0;case a.Cluster:case a.Cues:case a.DocType:case a.DocTypeReadVersion:case a.DocTypeVersion:case a.EbmlMaxIdLength:case a.EbmlMaxSizeLength:case a.EbmlReadVersion:case a.EbmlVersion:case a.Info:case a.SeekHead:case a.Tracks:return 1;case a.CuePoint:case a.DateUTC:case a.Duration:case a.MuxingApp:case a.Position:case a.SegmentUID:case a.Seek:case a.SimpleBlock:case a.Timestamp:case a.TimestampScale:case a.Title:case a.TrackEntry:case a.WritingApp:return 2;case a.Audio:case a.CodecDecodeAll:case a.CodecID:case a.CodecName:case a.CodecPrivate:case a.CueTime:case a.CueTrackPositions:case a.DefaultDuration:case a.FlagDefault:case a.FlagEnabled:case a.FlagForced:case a.FlagLacing:case a.MaxBlockAdditionID:case a.MinCache:case a.SeekID:case a.SeekPosition:case a.SeekPreRoll:case a.TrackNumber:case a.TrackTimestampScale:case a.TrackType:case a.TrackUID:case a.Video:return 3;case a.Channels:case a.CueBlockNumber:case a.CueClusterPosition:case a.CueTrack:case a.FlagInterlaced:case a.PixelHeight:case a.PixelWidth:case a.SamplingFrequency:case a.Colour:return 4;case a.CueRefTime:return 5;case a.Void:return-1;default:throw Error("cannot determine level of unknown ebml element with id ".concat(e))}},t.getEbmlElementName=function(e){switch(e){case a.Ebml:return"EBML";case a.EbmlVersion:return"EBMLVersion";case a.EbmlReadVersion:return"EBMLReadVersion";case a.EbmlMaxIdLength:return"EBMLMaxIDLength";case a.EbmlMaxSizeLength:return"EBMLMaxSizeLength";case a.DocType:return"DocType";case a.DocTypeVersion:return"DocTypeVersion";case a.DocTypeReadVersion:return"DocTypeReadVersion";case a.Void:return"Void";case a.Segment:return"Segment";case a.SeekHead:return"SeekHead";case a.Seek:return"Seek";case a.SeekID:return"SeekID";case a.SeekPosition:return"SeekPosition";case a.Info:return"Info";case a.TimestampScale:return"TimestampScale";case a.Duration:return"Duration";case a.DateUTC:return"DateUTC";case a.Title:return"Title";case a.MuxingApp:return"MuxingApp";case a.WritingApp:return"WritinApp";case a.Cluster:return"Cluster";case a.Timestamp:return"Timestamp";case a.SimpleBlock:return"SimpleBlock";case a.SegmentUID:return"SegmentUID (unsupported by WebM)";case a.Tracks:return"Tracks";case a.TrackEntry:return"TrackEntry";case a.TrackNumber:return"TrackNumber";case a.TrackUID:return"TrackUID";case a.TrackType:return"TrackType";case a.FlagEnabled:return"FlagEnabled";case a.FlagDefault:return"FlagDefault";case a.FlagForced:return"FlagForced";case a.FlagLacing:return"FlagLacing";case a.MinCache:return"MinCache";case a.MaxBlockAdditionID:return"MaxBlockAdditionID";case a.CodecID:return"CodecID";case a.CodecDecodeAll:return"CodecDecodeAll";case a.SeekPreRoll:return"SeekPreRoll";case a.Video:return"Video";case a.FlagInterlaced:return"FlagInterlaced";case a.PixelWidth:return"PixelWidth";case a.PixelHeight:return"PixelHeight";case a.DefaultDuration:return"DefaultDuration";case a.TrackTimestampScale:return"TrackTimestampScale";case a.CodecName:return"CodecName";case a.CodecPrivate:return"CodecPrivate";case a.Audio:return"Audio";case a.SamplingFrequency:return"SamplingFrequency";case a.Channels:return"Channels";case a.Cues:return"Cues";case a.CuePoint:return"CuePoint";case a.CueTime:return"CueTime";case a.CueTrackPositions:return"CueTrackPositions";case a.CueTrack:return"CueTrack";case a.CueClusterPosition:return"CueClusterPosition";case a.CueRefTime:return"CueRefTime";case a.CueBlockNumber:return"CueBlockNumber";case a.Position:return"Position";case a.Colour:return"Colour";default:return""}},t.readEbmlElementId=function(e,t){var r=c(e.current);if(r>e.bytesAvailable)return!1;for(var n=e.current,o=0;o<r-1;++o)n=n<<8|e.nextUnsafe();return e.nextUnsafe(),e.checkBounds(),t.id=n,t.idLength=r,!0},r(4843);var a=o((function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}));function c(e){for(var t=7;t>3;t--)if(e&1<<t)return 8-t;throw Error("invalid ebml element id")}t.EbmlElementId=a,i(a,"Ebml",440786851),i(a,"EbmlVersion",17030),i(a,"EbmlReadVersion",17143),i(a,"EbmlMaxIdLength",17138),i(a,"EbmlMaxSizeLength",17139),i(a,"DocType",17026),i(a,"DocTypeVersion",17031),i(a,"DocTypeReadVersion",17029),i(a,"Void",236),i(a,"Segment",408125543),i(a,"SeekHead",290298740),i(a,"Seek",19899),i(a,"SeekID",21419),i(a,"SeekPosition",21420),i(a,"Info",357149030),i(a,"TimestampScale",2807729),i(a,"Duration",17545),i(a,"DateUTC",17505),i(a,"Title",31657),i(a,"MuxingApp",19840),i(a,"WritingApp",22337),i(a,"Cluster",524531317),i(a,"Timestamp",231),i(a,"SimpleBlock",163),i(a,"SegmentUID",29604),i(a,"Tracks",374648427),i(a,"TrackEntry",174),i(a,"TrackNumber",215),i(a,"TrackUID",29637),i(a,"TrackType",131),i(a,"FlagEnabled",185),i(a,"FlagDefault",136),i(a,"FlagForced",21930),i(a,"FlagLacing",156),i(a,"MinCache",28135),i(a,"MaxBlockAdditionID",21998),i(a,"CodecID",134),i(a,"CodecDecodeAll",170),i(a,"SeekPreRoll",22203),i(a,"Video",224),i(a,"FlagInterlaced",154),i(a,"PixelWidth",176),i(a,"PixelHeight",186),i(a,"DefaultDuration",2352003),i(a,"TrackTimestampScale",2306383),i(a,"CodecName",2459272),i(a,"CodecPrivate",25506),i(a,"Audio",225),i(a,"SamplingFrequency",181),i(a,"Channels",159),i(a,"Cues",475249515),i(a,"CuePoint",187),i(a,"CueTime",179),i(a,"CueTrackPositions",183),i(a,"CueTrack",247),i(a,"CueClusterPosition",241),i(a,"CueRefTime",150),i(a,"CueBlockNumber",21368),i(a,"Position",167),i(a,"Colour",21936)},3300:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.EbmlElementType=void 0,t.getEbmlElementType=function(e){switch(e){case n.EbmlElementId.Segment:case n.EbmlElementId.Ebml:case n.EbmlElementId.SeekHead:case n.EbmlElementId.Seek:case n.EbmlElementId.Cluster:case n.EbmlElementId.Info:case n.EbmlElementId.Tracks:case n.EbmlElementId.TrackEntry:case n.EbmlElementId.Video:case n.EbmlElementId.Audio:case n.EbmlElementId.Cues:case n.EbmlElementId.CuePoint:case n.EbmlElementId.CueTrackPositions:case n.EbmlElementId.Colour:return c.Master;case n.EbmlElementId.EbmlVersion:case n.EbmlElementId.EbmlReadVersion:case n.EbmlElementId.EbmlMaxIdLength:case n.EbmlElementId.EbmlMaxSizeLength:case n.EbmlElementId.DocTypeVersion:case n.EbmlElementId.DocTypeReadVersion:case n.EbmlElementId.SeekPosition:case n.EbmlElementId.TimestampScale:case n.EbmlElementId.Timestamp:case n.EbmlElementId.TrackNumber:case n.EbmlElementId.TrackUID:case n.EbmlElementId.TrackType:case n.EbmlElementId.FlagEnabled:case n.EbmlElementId.FlagDefault:case n.EbmlElementId.FlagForced:case n.EbmlElementId.FlagLacing:case n.EbmlElementId.MinCache:case n.EbmlElementId.MaxBlockAdditionID:case n.EbmlElementId.CodecDecodeAll:case n.EbmlElementId.SeekPreRoll:case n.EbmlElementId.FlagInterlaced:case n.EbmlElementId.PixelWidth:case n.EbmlElementId.PixelHeight:case n.EbmlElementId.DefaultDuration:case n.EbmlElementId.Channels:case n.EbmlElementId.CueTime:case n.EbmlElementId.CueTrack:case n.EbmlElementId.CueClusterPosition:case n.EbmlElementId.CueRefTime:case n.EbmlElementId.CueBlockNumber:case n.EbmlElementId.Position:return c.UnsignedInteger;case n.EbmlElementId.DocType:case n.EbmlElementId.CodecID:return c.String;case n.EbmlElementId.Void:case n.EbmlElementId.SeekID:case n.EbmlElementId.SimpleBlock:case n.EbmlElementId.SegmentUID:case n.EbmlElementId.CodecPrivate:return c.Binary;case n.EbmlElementId.Duration:case n.EbmlElementId.TrackTimestampScale:case n.EbmlElementId.SamplingFrequency:return c.Float;case n.EbmlElementId.DateUTC:return c.Date;case n.EbmlElementId.Title:case n.EbmlElementId.MuxingApp:case n.EbmlElementId.WritingApp:case n.EbmlElementId.CodecName:return c.Utf8String;default:throw Error("cannot determine type of unknown ebml element with id ".concat(e))}},r(4843);var n=r(3606);function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function i(e,t,r){return t&&o(e.prototype,t),r&&o(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var c=i((function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}));t.EbmlElementType=c,a(c,"Unknown",0),a(c,"Master",1),a(c,"UnsignedInteger",2),a(c,"SignedInteger",3),a(c,"String",4),a(c,"Utf8String",5),a(c,"Binary",6),a(c,"Float",7),a(c,"Date",8)},1981:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.epochTimestampOffset=t.EbmlElement=void 0,t.getEbmlElementSizeLength=s,t.getEbmlElementValue=function(e,t){switch(e){case o.EbmlElementType.UnsignedInteger:case o.EbmlElementType.SignedInteger:return(0,i.readBigEndianNumber)(t);case o.EbmlElementType.String:return String.fromCharCode.apply(null,t);case o.EbmlElementType.Utf8String:case o.EbmlElementType.Float:throw new Error("cannot read value of element with type ".concat(e));case o.EbmlElementType.Date:return c+(0,i.readBigEndianNumber)(t);case o.EbmlElementType.Binary:return t}},t.readEbmlLementSize=function(e,t){var r=s(e.current);if(r>e.bytesAvailable)return!1;for(var n=e.current-(1<<8-r),o=0;o<r-1;++o)n=n<<8|e.nextUnsafe();return e.nextUnsafe(),e.checkBounds(),t.sizeLength=r,t.size=n===1<<8*r-1?-1:n,!0},r(6941),r(4843);var n=r(3606),o=r(3300),i=r(2706);function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var c=978307200;t.epochTimestampOffset=c;var u=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,r;return t=e,(r=[{key:"elementSize",get:function(){return this.idLength+this.sizeLength+this.size}},{key:"id",get:function(){return this._id},set:function(e){this._id=e,this.name=(0,n.getEbmlElementName)(this._id),this.type=(0,o.getEbmlElementType)(this._id)}}])&&a(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function s(e){if(1==e)return 8;for(var t=7;t>0;t--)if(e&1<<t)return 8-t;throw Error("invalid ebml element size")}t.EbmlElement=u},1639:function(e,t,r){r(4843),Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"MediaInfo",{enumerable:!0,get:function(){return c.MediaInfo}}),Object.defineProperty(t,"MediaPacket",{enumerable:!0,get:function(){return a.MediaPacket}}),Object.defineProperty(t,"MediaRecorderDemuxer",{enumerable:!0,get:function(){return n.MediaRecorderDemuxer}}),Object.defineProperty(t,"MediaRecorderDemuxerEvents",{enumerable:!0,get:function(){return o.MediaRecorderDemuxerEvents}}),Object.defineProperty(t,"createMediaRecorderDemuxer",{enumerable:!0,get:function(){return i.createMediaRecorderDemuxer}});var n=r(9285),o=r(2981),i=r(6202),a=r(4151),c=r(5504)},5504:function(e,t,r){function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function o(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}r(4843),Object.defineProperty(t,"__esModule",{value:!0}),t.MediaInfo=void 0;var i=o((function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.videoTrack={},this.audioTrack={}}));t.MediaInfo=i},4151:function(e,t,r){function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function o(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}r(4843),Object.defineProperty(t,"__esModule",{value:!0}),t.MediaPacket=void 0;var i=o((function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.data=t,this.ptsMs=r}));t.MediaPacket=i},2981:function(e,t,r){function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function o(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}Object.defineProperty(t,"__esModule",{value:!0}),t.MediaRecorderDemuxerEvents=void 0,r(4843);var a=o((function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}));t.MediaRecorderDemuxerEvents=a,i(a,"Error","error"),i(a,"MediaInfo","media-info"),i(a,"MediaPacket","media-packet")},6202:function(e,t,r){r(4843),Object.defineProperty(t,"__esModule",{value:!0}),t.createMediaRecorderDemuxer=function(e,t){var r;return"undefined"!=typeof MediaRecorder==0?null:(("function"==typeof MediaRecorder.isTypeSupported==0||MediaRecorder.isTypeSupported("video/webm;codecs=h264"))&&(r=new n.WebmMediaRecorderDemuxer(new MediaRecorder(e,{mimeType:"video/webm;codecs=h264"}),t)),r)};var n=r(5102);r(2981)},9285:function(e,t,r){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}r(1e3),r(9616),r(4843),r(5128),r(444),r(4011),r(5226),r(3275),r(9270),r(6507),r(1076),r(5547),r(1624),r(2047),r(8534),r(8496),r(4802),r(2112),r(6353),r(6941),r(6257),Object.defineProperty(t,"__esModule",{value:!0}),t.defaultMediaRecorderOptions=t.MediaRecorderDemuxer=void 0,r(4277),r(3064);var o=r(5504),i=r(2981);function a(){a=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var i=t&&t.prototype instanceof h?t:h,a=Object.create(i.prototype),c=new k(n||[]);return o(a,"_invoke",{value:O(e,r,c)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=f;var p={};function h(){}function y(){}function v(){}var m={};l(m,c,(function(){return this}));var b=Object.getPrototypeOf,g=b&&b(b(P([])));g&&g!==t&&r.call(g,c)&&(m=g);var w=v.prototype=h.prototype=Object.create(m);function E(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function i(o,a,c,u){var s=d(e[o],e,a);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==n(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){i("next",e,c,u)}),(function(e){i("throw",e,c,u)})):t.resolve(f).then((function(e){l.value=e,c(l)}),(function(e){return i("throw",e,c,u)}))}u(s.arg)}var a;o(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){i(e,r,t,n)}))}return a=a?a.then(n,n):n()}})}function O(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=S(a,r);if(c){if(c===p)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=d(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,S(e,t),"throw"===t.method))return p;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var n=d(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,p;var o=n.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function P(e){if(e){var t=e[c];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:T}}function T(){return{value:void 0,done:!0}}return y.prototype=v,o(w,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,l(e,s,"GeneratorFunction")),e.prototype=Object.create(w),e},e.awrap=function(e){return{__await:e}},E(_.prototype),l(_.prototype,u,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},E(w),l(w,s,"Generator"),l(w,c,(function(){return this})),l(w,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=P,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),x(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:P(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function c(e,t,r,n,o,i,a){try{var c=e[i](a),u=c.value}catch(e){return void r(e)}c.done?t(u):Promise.resolve(u).then(n,o)}function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u(Object(r),!0).forEach((function(t){l(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function l(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function f(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d(e,t)}function p(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}var y=r(1239),v={timerInterval:100,logCallback:null};t.defaultMediaRecorderOptions=v;var m=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&d(e,t)}(m,e);var t,r,n,u,l,y=(u=m,l=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=h(u);if(l){var r=h(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return p(this,e)});function m(e,t){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,m),(r=y.call(this)).options=t?s(s({},v),t):v,r.mediaRecorder=e,r.mediaInfo=new o.MediaInfo,r.mediaRecorder.addEventListener("dataavailable",function(){var e,t=(e=a().mark((function e(t){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r.addBlob(t.data);case 1:case"end":return e.stop()}}),e)})),function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){c(i,n,o,a,u,"next",e)}function u(e){c(i,n,o,a,u,"throw",e)}a(void 0)}))});return function(e){return t.apply(this,arguments)}}()),r.mediaRecorder.addEventListener("error",(function(e){r.emit(i.MediaRecorderDemuxerEvents.Error,e.error)})),r}return t=m,n=[{key:"isSupported",value:function(e){return"undefined"!=typeof MediaRecorder&&"function"==typeof MediaRecorder.prototype.requestData&&"function"==typeof MediaRecorder.isTypeSupported&&MediaRecorder.isTypeSupported(e)}}],(r=[{key:"start",value:function(){var e=this;this.mediaRecorder.start(),"function"==typeof this.mediaRecorder.requestData?this.timer=window.setInterval((function(){e.mediaRecorder.requestData()}),this.options.timerInterval):this.timer=window.setTimeout((function(){e.mediaRecorder.stop()}),this.options.timerInterval)}},{key:"stop",value:function(){"recording"===this.mediaRecorder.state&&this.mediaRecorder.stop(),this.timer&&(clearInterval(this.timer),this.timer=null)}}])&&f(t.prototype,r),n&&f(t,n),Object.defineProperty(t,"prototype",{writable:!1}),m}(y);t.MediaRecorderDemuxer=m},5102:function(e,t,r){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}r(4843),r(4277),r(3064),r(9616),r(444),r(1076),r(5547),r(2047),r(8534),r(8496),r(4802),r(2112),r(6353),r(3275),r(6257),Object.defineProperty(t,"__esModule",{value:!0}),t.webmVideoTrackType=t.webmAudioTrackType=t.WebmMediaRecorderDemuxer=void 0,r(1e3),r(1624),r(2827),r(7639),r(6996),r(1366),r(3558),r(8852),r(8630),r(8858),r(6480),r(7219),r(2160),r(4289),r(8165),r(4613),r(3292),r(3748),r(9157),r(5529),r(4882),r(7233),r(1086),r(8786),r(5544),r(1304),r(3114),r(6941),r(6369),r(242);var o=r(9285),i=r(3606),a=r(1981),c=r(2706),u=r(3300),s=r(2981),l=r(4151);function f(){f=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var i=t&&t.prototype instanceof h?t:h,a=Object.create(i.prototype),c=new k(n||[]);return o(a,"_invoke",{value:O(e,r,c)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var p={};function h(){}function y(){}function v(){}var m={};s(m,a,(function(){return this}));var b=Object.getPrototypeOf,g=b&&b(b(P([])));g&&g!==t&&r.call(g,a)&&(m=g);var w=v.prototype=h.prototype=Object.create(m);function E(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function i(o,a,c,u){var s=d(e[o],e,a);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==n(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){i("next",e,c,u)}),(function(e){i("throw",e,c,u)})):t.resolve(f).then((function(e){l.value=e,c(l)}),(function(e){return i("throw",e,c,u)}))}u(s.arg)}var a;o(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){i(e,r,t,n)}))}return a=a?a.then(n,n):n()}})}function O(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=S(a,r);if(c){if(c===p)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=d(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,S(e,t),"throw"===t.method))return p;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var n=d(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,p;var o=n.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function P(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:T}}function T(){return{value:void 0,done:!0}}return y.prototype=v,o(w,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=s(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,u,"GeneratorFunction")),e.prototype=Object.create(w),e},e.awrap=function(e){return{__await:e}},E(_.prototype),s(_.prototype,c,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(l(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},E(w),s(w,u,"Generator"),s(w,a,(function(){return this})),s(w,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=P,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),x(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:P(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function d(e,t,r,n,o,i,a){try{var c=e[i](a),u=c.value}catch(e){return void r(e)}c.done?t(u):Promise.resolve(u).then(n,o)}function p(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function h(e,t){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},h(e,t)}function y(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function v(e){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},v(e)}function m(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function b(){var e=this;return new Promise((function(t){var r=new FileReader;r.onload=function(){t(r.result)},r.readAsArrayBuffer(e)}))}t.webmVideoTrackType=1,t.webmAudioTrackType=2;var g=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&h(e,t)}(E,e);var t,r,n,o,m,g,w=(m=E,g=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=v(m);if(g){var r=v(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return y(this,e)});function E(e,t){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,E),(r=w.call(this,e,t)).state=E.stateParseElementId,r.currentEbmlElement=new a.EbmlElement,r.uint8ArrayAggregator=new c.Uint8ArrayAggregator,r.clusterTimestamp=0,r.timestampMsScale=1,r.ebmlElementStack=[],Blob.prototype.arrayBuffer=Blob.prototype.arrayBuffer||b,r}return t=E,r=[{key:"addBlob",value:(n=f().mark((function e(t){var r,n,o,d,p,h,y,v,m,b,g,w,_;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.t0=this.uint8ArrayAggregator,e.t1=Uint8Array,e.next=5,t.arrayBuffer();case 5:e.t2=e.sent,e.t3=new e.t1(e.t2),e.t0.addArray.call(e.t0,e.t3);case 8:if(!this.uint8ArrayAggregator.bytesAvailable){e.next=106;break}e.t4=this.state,e.next=e.t4===E.stateParseElementId?12:e.t4===E.stateParseElementLength?19:e.t4===E.stateParseElementValue?27:104;break;case 12:if(!(0,i.readEbmlElementId)(this.uint8ArrayAggregator,this.currentEbmlElement)){e.next=16;break}null==this.options.logCallback||this.options.logCallback("got new current ebml element (id: ".concat(this.currentEbmlElement.id,", name: ").concat(this.currentEbmlElement.name,")")),e.next=17;break;case 16:return e.abrupt("break",104);case 17:return this.state=E.stateParseElementLength,e.abrupt("break",104);case 19:if(!(0,a.readEbmlLementSize)(this.uint8ArrayAggregator,this.currentEbmlElement)){e.next=23;break}null==this.options.logCallback||this.options.logCallback("got size ".concat(this.currentEbmlElement.size," for current ebml element (id: ").concat(this.currentEbmlElement.id,", name: ").concat(this.currentEbmlElement.name,")")),e.next=24;break;case 23:return e.abrupt("break",104);case 24:return this.ebmlElementStack.length&&-1==this.currentEbmlElement.size&&(this.ebmlElementStack=[]),this.state=E.stateParseElementValue,e.abrupt("break",104);case 27:if(r=(0,u.getEbmlElementType)(this.currentEbmlElement.id),n=r!==u.EbmlElementType.Master||this.currentEbmlElement.id===i.EbmlElementId.Colour,r===u.EbmlElementType.Master&&-1!==this.currentEbmlElement.size&&this.ebmlElementStack.push({element:Object.assign(new a.EbmlElement,this.currentEbmlElement),bytesRemaining:this.currentEbmlElement.size}),this.currentEbmlElement.id!==i.EbmlElementId.CodecID){e.next=40;break}if(n=!1,null!=(o=this.uint8ArrayAggregator.extract(this.currentEbmlElement.size))){e.next=35;break}return e.abrupt("break",104);case 35:d=(0,a.getEbmlElementValue)(this.currentEbmlElement.type,o),1===this.currentTrackType?this.mediaInfo.videoTrack.codecName=d:2===this.currentTrackType&&(this.mediaInfo.audioTrack.codecName=d),null==this.options.logCallback||this.options.logCallback("got codec id ".concat(d)),e.next=91;break;case 40:if(this.currentEbmlElement.id!==i.EbmlElementId.CodecPrivate){e.next=47;break}if(n=!1,null!=this.uint8ArrayAggregator.extract(this.currentEbmlElement.size)){e.next=45;break}return e.abrupt("break",104);case 45:e.next=91;break;case 47:if(this.currentEbmlElement.id!==i.EbmlElementId.TimestampScale){e.next=57;break}if(n=!1,null!=(p=this.uint8ArrayAggregator.extract(this.currentEbmlElement.size))){e.next=52;break}return e.abrupt("break",104);case 52:this.mediaInfo.timestampScale=(0,a.getEbmlElementValue)(this.currentEbmlElement.type,p),this.timestampMsScale=this.mediaInfo.timestampScale/1e6,null==this.options.logCallback||this.options.logCallback("got timestamp scale ".concat(this.mediaInfo.timestampScale)),e.next=91;break;case 57:if(this.currentEbmlElement.id!==i.EbmlElementId.Timestamp){e.next=66;break}if(n=!1,null!=(h=this.uint8ArrayAggregator.extract(this.currentEbmlElement.size))){e.next=62;break}return e.abrupt("break",104);case 62:this.clusterTimestamp=(0,a.getEbmlElementValue)(this.currentEbmlElement.type,h),null==this.options.logCallback||this.options.logCallback("got cluser timestamp ".concat(this.clusterTimestamp)),e.next=91;break;case 66:if(this.currentEbmlElement.id!==i.EbmlElementId.TrackType){e.next=75;break}if(n=!1,null!=(y=this.uint8ArrayAggregator.extract(this.currentEbmlElement.size))){e.next=71;break}return e.abrupt("break",104);case 71:this.currentTrackType=(0,a.getEbmlElementValue)(this.currentEbmlElement.type,y),null==this.options.logCallback||this.options.logCallback("got track with type ".concat(this.currentTrackType)),e.next=91;break;case 75:if(this.currentEbmlElement.id!==i.EbmlElementId.SimpleBlock){e.next=91;break}if(n=!1,null!=(v=this.uint8ArrayAggregator.extract(this.currentEbmlElement.size))){e.next=80;break}return e.abrupt("break",104);case 80:(m=new c.Uint8ArrayAggregator).addArray(v),b={},(0,a.readEbmlLementSize)(m,b),g=(0,c.readBigEndianNumber)(m.extract(2)),m.current,m.next(),m.trim(),w=(this.clusterTimestamp+g)*this.timestampMsScale,this.emit(s.MediaRecorderDemuxerEvents.MediaPacket,new l.MediaPacket(m.array,w));case 91:if(n&&this.uint8ArrayAggregator.skip(this.currentEbmlElement.size),r===u.EbmlElementType.Master||!this.ebmlElementStack.length){e.next=102;break}this.ebmlElementStack[this.ebmlElementStack.length-1].bytesRemaining-=this.currentEbmlElement.elementSize;case 94:if(0!==this.ebmlElementStack[this.ebmlElementStack.length-1].bytesRemaining){e.next=100;break}_=this.ebmlElementStack.pop(),this.ebmlElementStack.length&&(this.ebmlElementStack[this.ebmlElementStack.length-1].bytesRemaining-=_.element.elementSize),_.element.id===i.EbmlElementId.Tracks&&this.emit(s.MediaRecorderDemuxerEvents.MediaInfo,this.mediaInfo),e.next=101;break;case 100:return e.abrupt("break",102);case 101:if(this.ebmlElementStack.length){e.next=94;break}case 102:return this.state=E.stateParseElementId,e.abrupt("break",104);case 104:e.next=8;break;case 106:this.uint8ArrayAggregator.trim(),e.next=113;break;case 109:e.prev=109,e.t5=e.catch(0),this.stop(),this.emit(s.MediaRecorderDemuxerEvents.Error,e.t5);case 113:case"end":return e.stop()}}),e,this,[[0,109]])})),o=function(){var e=this,t=arguments;return new Promise((function(r,o){var i=n.apply(e,t);function a(e){d(i,r,o,a,c,"next",e)}function c(e){d(i,r,o,a,c,"throw",e)}a(void 0)}))},function(e){return o.apply(this,arguments)})}],r&&p(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),E}(o.MediaRecorderDemuxer);t.WebmMediaRecorderDemuxer=g,m(g,"stateParseElementId",1),m(g,"stateParseElementLength",2),m(g,"stateParseElementValue",3)},2706:function(e,t,r){function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}r(4843),Object.defineProperty(t,"__esModule",{value:!0}),t.Uint8ArrayAggregator=void 0,t.readBigEndianNumber=function(e){var t=0;return e.forEach((function(e){t=t<<8|e})),t},r(1e3),r(3275),r(6257),r(1624),r(2827),r(7639),r(6996),r(1366),r(3558),r(8852),r(8630),r(8858),r(6480),r(7219),r(2160),r(4289),r(8165),r(4613),r(3292),r(3748),r(9157),r(5529),r(4882),r(7233),r(1086),r(8786),r(5544),r(1304),r(3114);var o=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.array=null,this.current=null,this.offset=0}var t,r;return t=e,(r=[{key:"addArray",value:function(e){if(null!=e&&0!=e.length)if(this.bytesToSkip>=e.length)this.bytesToSkip-=e.length;else{if(this.bytesToSkip&&(e=e.slice(this.bytesToSkip)),this.array){var t=new Uint8Array(this.array.length-this.offset+e.length);t.set(this.offset?this.array.slice(this.offset):this.array,0),t.set(e,this.array.length-this.offset),this.array=t,this.offset=0}else this.array=e;this.current=this.array[0]}}},{key:"checkBounds",value:function(){if(this.offset===this.array.length)this.offset=0,this.current=null,this.array=null;else{if(!(this.offset<this.array.length))throw Error("invalid Uint8ArrayAggregator state, offset (".concat(this.offset,") is larger than bytes in the current array (").concat(this.array.length,")"));this.current=this.array[this.offset]}}},{key:"next",value:function(){return this.array?(this.offset++,this.checkBounds(),this.current):null}},{key:"nextUnsafe",value:function(){return this.offset++,this.current=this.array[this.offset],this.current}},{key:"bytesAvailable",get:function(){return this.array?this.array.length-this.offset:0}},{key:"trim",value:function(){if(this.array)if(this.offset<this.array.length)this.array=this.array.slice(this.offset),this.offset=0,this.current=this.array[0];else{if(this.offset>this.array.length)throw Error("invalid Uint8ArrayAggregator state, offset (".concat(this.offset,") is larger than bytes in the current array (").concat(this.array.length,")"));this.array=null,this.offset=0,this.current=null}}},{key:"extract",value:function(e){if(this.bytesAvailable>=e){var t=this.offset,r=this.array.slice(t,t+e);return this.offset+=e,this.current=this.array[this.offset],this.checkBounds(),r}return null}},{key:"skip",value:function(e){if(this.bytesAvailable>=e)return this.offset+=e,this.current=this.array[this.offset],void this.checkBounds();e-=this.bytesAvailable,this.array=null,this.offset=0,this.current=null,this.bytesToSkip=e}}])&&n(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.Uint8ArrayAggregator=o},9727:function(e,t,r){r(4843),Object.defineProperty(t,"__esModule",{value:!0}),t.GLOBAL_READY_MESSAGE=void 0,t.GLOBAL_READY_MESSAGE="trusted-origin-storage-ready"},3304:function(e,t,r){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach((function(t){f(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function c(){c=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var i=t&&t.prototype instanceof h?t:h,a=Object.create(i.prototype),c=new k(n||[]);return o(a,"_invoke",{value:O(e,r,c)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=f;var p={};function h(){}function y(){}function v(){}var m={};l(m,a,(function(){return this}));var b=Object.getPrototypeOf,g=b&&b(b(P([])));g&&g!==t&&r.call(g,a)&&(m=g);var w=v.prototype=h.prototype=Object.create(m);function E(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function i(o,a,c,u){var s=d(e[o],e,a);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==n(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){i("next",e,c,u)}),(function(e){i("throw",e,c,u)})):t.resolve(f).then((function(e){l.value=e,c(l)}),(function(e){return i("throw",e,c,u)}))}u(s.arg)}var a;o(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){i(e,r,t,n)}))}return a=a?a.then(n,n):n()}})}function O(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=S(a,r);if(c){if(c===p)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=d(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,S(e,t),"throw"===t.method))return p;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var n=d(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,p;var o=n.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function P(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:T}}function T(){return{value:void 0,done:!0}}return y.prototype=v,o(w,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,l(e,s,"GeneratorFunction")),e.prototype=Object.create(w),e},e.awrap=function(e){return{__await:e}},E(_.prototype),l(_.prototype,u,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},E(w),l(w,s,"Generator"),l(w,a,(function(){return this})),l(w,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=P,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),x(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:P(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function u(e,t,r,n,o,i,a){try{var c=e[i](a),u=c.value}catch(e){return void r(e)}c.done?t(u):Promise.resolve(u).then(n,o)}function s(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){u(i,n,o,a,c,"next",e)}function c(e){u(i,n,o,a,c,"throw",e)}a(void 0)}))}}function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function f(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function d(e,t,r){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,r)}function p(e,t){return function(e,t){return t.get?t.get.call(e):t.value}(e,y(e,t,"get"))}function h(e,t,r){return function(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}(e,y(e,t,"set"),r),r}function y(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}r(444),r(1076),r(5547),r(8496),r(4802),r(2112),r(6353),r(3064),r(3275),r(6941),r(4277),r(6257),r(5128),r(4011),r(5226),r(9270),r(6507),r(6486),r(3524),r(4843),r(3260),r(1896),r(1e3),r(7285),r(887),r(3257),r(3794),r(1624),r(2047),r(1157),r(8534),Object.defineProperty(t,"__esModule",{value:!0});var v=r(3059),m=r(9011),b=r(861),g=r(5625),w=r(1154),E=r(9145),_=new WeakMap,O=new WeakMap,S=new WeakMap,j=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),d(this,_,{writable:!0,value:void 0}),d(this,O,{writable:!0,value:void 0}),d(this,S,{writable:!0,value:void 0}),f(this,"storage",void 0),f(this,"timeout",void 0),h(this,S,Object.freeze(r.sort())),h(this,O,new v.default(t)),this.timeout=2500,h(this,_,[]),Object.defineProperty(this,"storage",{writable:!1,enumerable:!0,configurable:!1,value:(0,m.default)(this.request.bind(this))}),window.addEventListener("message",this.listen.bind(this))}var t,r,n,i;return t=e,r=[{key:"isCrossDomainSupported",get:function(){return p(this,O).isCrossDomainSupported}},{key:"ready",value:(i=s(c().mark((function e(){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,p(this,O).ready();case 2:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})},{key:"destroy",value:function(){p(this,O).destroy()}},{key:"request",value:(n=s(c().mark((function e(t){var r=this;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.ready();case 2:if("string"!=typeof t.method||"string"!=typeof t.path){e.next=6;break}return e.next=5,new Promise((function(e,n){var o=a(a({},t),{},{trustedOrigins:p(r,S),id:(0,E.uuidHash)(Math.random().toString(),p(r,S).join(","))});r.addListener(e,n,o),p(r,O).postMessage(JSON.stringify(o))}));case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})},{key:"listen",value:function(e){var t,r=this;e.source===(null===(t=p(this,O).iframe)||void 0===t?void 0:t.contentWindow)&&"string"==typeof e.data&&function(){var t,n=(0,w.default)(e.data),i=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,c=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return c=e.done,e},e:function(e){u=!0,a=e},f:function(){try{c||null==r.return||r.return()}finally{if(u)throw a}}}}(p(r,_));try{var a=function(){var e=t.value;new Promise((function(t,r){try{e(n),t()}catch(e){r(e)}}))};for(i.s();!(t=i.n()).done;)a()}catch(e){i.e(e)}finally{i.f()}}()}},{key:"addListener",value:function(e,t,r){var n=this,o=null,i=function i(a){(0,g.default)(a,r)&&(n.removeListener(i),window.clearTimeout(o),(0,b.default)(a.body)?t(a.body):e(a))};p(this,_).push(i),o=window.setTimeout((function(){n.removeListener(i),t(new Error("Timeout: time of "+n.timeout.toString()+"ms exceeded"))}),this.timeout)}},{key:"removeListener",value:function(e){var t=p(this,_).indexOf(e);t>-1&&p(this,_).splice(t,1)}}],r&&l(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.default=j},5453:function(e,t,r){function n(){n=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var i=t&&t.prototype instanceof h?t:h,a=Object.create(i.prototype),c=new k(n||[]);return o(a,"_invoke",{value:O(e,r,c)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=f;var p={};function h(){}function y(){}function v(){}var m={};l(m,c,(function(){return this}));var b=Object.getPrototypeOf,g=b&&b(b(P([])));g&&g!==t&&r.call(g,c)&&(m=g);var w=v.prototype=h.prototype=Object.create(m);function E(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function n(o,i,c,u){var s=d(e[o],e,i);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==a(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,c,u)}),(function(e){n("throw",e,c,u)})):t.resolve(f).then((function(e){l.value=e,c(l)}),(function(e){return n("throw",e,c,u)}))}u(s.arg)}var i;o(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,o){n(e,r,t,o)}))}return i=i?i.then(o,o):o()}})}function O(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=S(a,r);if(c){if(c===p)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=d(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,S(e,t),"throw"===t.method))return p;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var n=d(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,p;var o=n.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function P(e){if(e){var t=e[c];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:T}}function T(){return{value:void 0,done:!0}}return y.prototype=v,o(w,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,l(e,s,"GeneratorFunction")),e.prototype=Object.create(w),e},e.awrap=function(e){return{__await:e}},E(_.prototype),l(_.prototype,u,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},E(w),l(w,s,"Generator"),l(w,c,(function(){return this})),l(w,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=P,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),x(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:P(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function o(e,t,r,n,o,i,a){try{var c=e[i](a),u=c.value}catch(e){return void r(e)}c.done?t(u):Promise.resolve(u).then(n,o)}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function c(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function u(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r(444),r(1076),r(5547),r(1624),r(2047),r(8534),r(6257),r(6941),r(6486),r(3524),r(8496),r(4802),r(2112),r(6353),r(3064),r(3275),r(4277),r(4843),r(1e3),r(6565),Object.defineProperty(t,"__esModule",{value:!0});var s=r(9727),l=r(7983),f=r(2401),d=r(1154),p=r(7005),h=r(5857),y=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),u(this,"storage",void 0),u(this,"operations",void 0),u(this,"listenWrap",void 0),this.storage=t,this.operations=new l.default}var t,r,y,v,m;return t=e,r=[{key:"engage",value:function(){var e=this;this.listenWrap=function(t){return e.listen(t)},this.operation("GET /storage",p.getStorageEntries.bind(this)).operation("GET /storage/:key",p.getStorageItem.bind(this)).operation("PUT /storage/:key",p.putStorageItem.bind(this)).operation("DELETE /storage/:key",p.deleteStorageItem.bind(this)).operation("DELETE /storage",p.deleteStorageEntries.bind(this)),window.addEventListener("message",this.listenWrap),window.parent.postMessage(JSON.stringify({name:s.GLOBAL_READY_MESSAGE,ready:!0,isCrossDomainSupported:this.storage.isCrossDomainSupported}),"*")}},{key:"operation",value:function(e,t){return this.operations.set(e,t),this}},{key:"dismiss",value:function(){this.operations.clear(),window.removeEventListener("message",this.listenWrap),delete this.listenWrap}},{key:"isTrusted",value:function(e,t){return Array.isArray(t)||(t=[]),t.some((function(t){return t===e}))}},{key:"listen",value:function(e){if("string"==typeof e.data){var t=(0,d.default)(e.data);if(this.isTrusted(e.origin,t.trustedOrigins)&&(0,f.default)(t)){var r=t.method+" "+t.path,n=this.operations.get(r),o={id:t.id,body:void 0};if("object"===a(n))try{o.body=n.call(this.storage,{origin:e.origin,params:n.params,request:t})}catch(e){o.body=this.objectifyError(e)}else o.body=this.objectifyError(new Error("Resource '"+r+"' not found."));window.parent.postMessage(JSON.stringify(o),e.origin)}}}},{key:"objectifyError",value:function(e){var t,r={__isCrossDomainError:!0},n=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,c=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return c=e.done,e},e:function(e){u=!0,a=e},f:function(){try{c||null==r.return||r.return()}finally{if(u)throw a}}}}(Object.getOwnPropertyNames(e));try{for(n.s();!(t=n.n()).done;){var o=t.value;r[o]=e[o]}}catch(e){n.e(e)}finally{n.f()}return r}}],y=[{key:"engage",value:(v=n().mark((function t(){var r,o;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,h.default.create();case 2:return r=t.sent,(o=new e(r)).engage(),t.abrupt("return",o);case 6:case"end":return t.stop()}}),t)})),m=function(){var e=this,t=arguments;return new Promise((function(r,n){var i=v.apply(e,t);function a(e){o(i,r,n,a,c,"next",e)}function c(e){o(i,r,n,a,c,"throw",e)}a(void 0)}))},function(){return m.apply(this,arguments)})}],r&&c(t.prototype,r),y&&c(t,y),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.default=y},3059:function(e,t,r){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(){o=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},c=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var o=t&&t.prototype instanceof h?t:h,a=Object.create(o.prototype),c=new k(n||[]);return i(a,"_invoke",{value:O(e,r,c)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=f;var p={};function h(){}function y(){}function v(){}var m={};l(m,c,(function(){return this}));var b=Object.getPrototypeOf,g=b&&b(b(P([])));g&&g!==t&&r.call(g,c)&&(m=g);var w=v.prototype=h.prototype=Object.create(m);function E(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function o(i,a,c,u){var s=d(e[i],e,a);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==n(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){o("next",e,c,u)}),(function(e){o("throw",e,c,u)})):t.resolve(f).then((function(e){l.value=e,c(l)}),(function(e){return o("throw",e,c,u)}))}u(s.arg)}var a;i(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){o(e,r,t,n)}))}return a=a?a.then(n,n):n()}})}function O(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=S(a,r);if(c){if(c===p)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=d(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,S(e,t),"throw"===t.method))return p;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var n=d(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,p;var o=n.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function P(e){if(e){var t=e[c];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:T}}function T(){return{value:void 0,done:!0}}return y.prototype=v,i(w,"constructor",{value:v,configurable:!0}),i(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,l(e,s,"GeneratorFunction")),e.prototype=Object.create(w),e},e.awrap=function(e){return{__await:e}},E(_.prototype),l(_.prototype,u,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},E(w),l(w,s,"Generator"),l(w,c,(function(){return this})),l(w,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=P,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),x(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:P(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function i(e,t,r,n,o,i,a){try{var c=e[i](a),u=c.value}catch(e){return void r(e)}c.done?t(u):Promise.resolve(u).then(n,o)}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function c(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r(444),r(1076),r(5547),r(1624),r(2047),r(8534),r(8496),r(4802),r(2112),r(6353),r(3064),r(3275),r(4277),r(6257),r(4843),r(6941),r(1e3),Object.defineProperty(t,"__esModule",{value:!0});var u=r(9727),s=r(1154),l=r(3632),f=function(){function e(t){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),c(this,"_isCrossDomainSupported",void 0),c(this,"container",void 0),c(this,"iframe",void 0),c(this,"frameReady",void 0),c(this,"neverReady",void 0),this.frameReady=!1,this.neverReady=!1;var n=function e(t){if(t.source===r.iframe.contentWindow&&"string"==typeof t.data){var n=(0,s.default)(t.data);(null==n?void 0:n.name)===u.GLOBAL_READY_MESSAGE&&!0===(null==n?void 0:n.ready)&&(window.removeEventListener("message",e),r._isCrossDomainSupported=n.isCrossDomainSupported,r.frameReady=!0)}};window.addEventListener("message",n),setTimeout((function(){r.frameReady||(window.removeEventListener("message",n),r.neverReady=!0)}),1e4);var o=window.document.createElement("div");this.styler(o),this.container=o,this.makeIFrame(t);var i=function(){window.document.body.appendChild(o),r.container.appendChild(r.iframe)};"interactive"===window.document.readyState||"complete"===window.document.readyState?i():window.document.addEventListener("readystatechange",(function e(){"interactive"!==window.document.readyState&&"complete"!==window.document.readyState||(window.document.removeEventListener("readystatechange",e),i())}))}var t,r,n,f;return t=e,r=[{key:"isCrossDomainSupported",get:function(){return this._isCrossDomainSupported}},{key:"postMessage",value:function(e){void 0!==this.iframe&&this.iframe.contentWindow.postMessage(e,"*")}},{key:"destroy",value:function(){this.container.removeChild(this.iframe),delete this.iframe}},{key:"ready",value:(n=o().mark((function e(){var t,r=this,n=arguments;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=n.length>0&&void 0!==n[0]?n[0]:0,!this.neverReady&&!this.frameReady&&34!==t){e.next=3;break}return e.abrupt("return");case 3:return e.next=5,new Promise((function(e){setTimeout((function(){e(r.ready(t+1))}),300)}));case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e,this)})),f=function(){var e=this,t=arguments;return new Promise((function(r,o){var a=n.apply(e,t);function c(e){i(a,r,o,c,u,"next",e)}function u(e){i(a,r,o,c,u,"throw",e)}c(void 0)}))},function(){return f.apply(this,arguments)})},{key:"styler",value:function(e){var t={display:"none",position:"absolute",top:"-999px",left:"-999px"};for(var r in t)(0,l.default)(t,r)&&(e.style[r]=t[r])}},{key:"makeIFrame",value:function(e){this.iframe=window.document.createElement("iframe"),this.styler(this.iframe),this.iframe.sandbox.add("allow-scripts"),this.iframe.sandbox.add("allow-same-origin"),this.iframe.src=e}}],r&&a(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.default=f},9011:function(e,t,r){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(){o=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},c=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var o=t&&t.prototype instanceof h?t:h,a=Object.create(o.prototype),c=new k(n||[]);return i(a,"_invoke",{value:O(e,r,c)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=f;var p={};function h(){}function y(){}function v(){}var m={};l(m,c,(function(){return this}));var b=Object.getPrototypeOf,g=b&&b(b(P([])));g&&g!==t&&r.call(g,c)&&(m=g);var w=v.prototype=h.prototype=Object.create(m);function E(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function o(i,a,c,u){var s=d(e[i],e,a);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==n(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){o("next",e,c,u)}),(function(e){o("throw",e,c,u)})):t.resolve(f).then((function(e){l.value=e,c(l)}),(function(e){return o("throw",e,c,u)}))}u(s.arg)}var a;i(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){o(e,r,t,n)}))}return a=a?a.then(n,n):n()}})}function O(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=S(a,r);if(c){if(c===p)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=d(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,S(e,t),"throw"===t.method))return p;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var n=d(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,p;var o=n.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function P(e){if(e){var t=e[c];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:T}}function T(){return{value:void 0,done:!0}}return y.prototype=v,i(w,"constructor",{value:v,configurable:!0}),i(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,l(e,s,"GeneratorFunction")),e.prototype=Object.create(w),e},e.awrap=function(e){return{__await:e}},E(_.prototype),l(_.prototype,u,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},E(w),l(w,s,"Generator"),l(w,c,(function(){return this})),l(w,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=P,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),x(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:P(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function i(e,t,r,n,o,i,a){try{var c=e[i](a),u=c.value}catch(e){return void r(e)}c.done?t(u):Promise.resolve(u).then(n,o)}function a(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function c(e){i(a,n,o,c,u,"next",e)}function u(e){i(a,n,o,c,u,"throw",e)}c(void 0)}))}}r(444),r(1076),r(5547),r(2047),r(8496),r(4802),r(2112),r(6353),r(3064),r(3275),r(6941),r(4277),r(6257),r(4843),r(1624),r(1e3),r(8534),Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return{clear:function(){return a(o().mark((function t(){return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e({method:"DELETE",path:"/storage"});case 2:case"end":return t.stop()}}),t)})))()},entries:function(){return a(o().mark((function t(){var r;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e({method:"GET",path:"/storage"});case 2:return r=t.sent,t.abrupt("return",r.body.entries);case 4:case"end":return t.stop()}}),t)})))()},getItem:function(t){return a(o().mark((function r(){var n;return o().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,e({method:"GET",path:"/storage/".concat(t)});case 2:return n=r.sent,r.abrupt("return",n.body.value);case 4:case"end":return r.stop()}}),r)})))()},removeItem:function(t){return a(o().mark((function r(){return o().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,e({method:"DELETE",path:"/storage/".concat(t)});case 2:case"end":return r.stop()}}),r)})))()},setItem:function(t,r){return a(o().mark((function n(){return o().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,e({method:"PUT",path:"/storage/".concat(t),body:{value:r}});case 2:case"end":return n.stop()}}),n)})))()}}}},861:function(e,t,r){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}r(444),r(1076),r(1e3),r(5547),r(1624),r(2047),r(8534),r(4843),Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return null!==e&&"object"===n(e)&&!0===e.__isCrossDomainError}},5625:function(e,t,r){r(4843),Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return"string"==typeof e.id&&"string"==typeof t.id&&e.id===t.id}},7345:function(e,t,r){r(4843),Object.defineProperty(t,"__esModule",{value:!0}),t.TrustedOriginStorageServer=t.TrustedOriginStorageClient=void 0;var n=r(3304);Object.defineProperty(t,"TrustedOriginStorageClient",{enumerable:!0,get:function(){return n.default}});var o=r(5453);Object.defineProperty(t,"TrustedOriginStorageServer",{enumerable:!0,get:function(){return o.default}})},7983:function(e,t,r){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r(444),r(1076),r(1e3),r(5547),r(1624),r(2047),r(8534),r(4843),r(5128),r(9806),r(3524),r(7285),r(3317),r(3114),r(9344),Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),i(this,"operations",void 0),i(this,"routable",void 0),this.operations={},this.routable={}}var t,r;return t=e,(r=[{key:"get",value:function(e){return"function"==typeof this.operations[e]?{call:this.operations[e]}:this.getRoutable(e)}},{key:"set",value:function(e,t){this.operations[e]=t,this.setRoutable(e)}},{key:"clear",value:function(){for(var e=0,t=Object.keys(this.operations);e<t.length;e++){var r=t[e];this.operations[r]=void 0}for(var n=0,o=Object.keys(this.routable);n<o.length;n++){var i=o[n];this.routable[i]=void 0}this.operations={},this.routable={}}},{key:"isRoutable",value:function(e){var t=this.pathToRegExp(e),r=new RegExp(t,"g").exec(e);return(1!==r.length||r[0]!==e)&&t}},{key:"getRoutable",value:function(e){for(var t=Object.keys(this.routable),r=0;r<t.length;r+=1){var o=t[r],i=(0,this.routable[o])(e);if("object"===n(i))return{call:this.operations[o],params:i.params}}}},{key:"setRoutable",value:function(e){var t=this.isRoutable(e);!1!==t&&(this.routable[e]=this.match(t))}},{key:"pathToRegExp",value:function(e){return"^"+(e=e.replace(/\./g,"\\.").replace(/\//g,"/").replace(/\?/g,"\\?").replace(/\/+$/,"").replace(/\*+/g,".*").replace(/:([^\d|^/][a-zA-Z0-9_]*(?=(?:\/|\\.)|$))/g,(function(e,t){return"(?<".concat(t,">[^/]+?)")})).concat("(\\/|$)"))+"(\\?.*){0,1}$"}},{key:"match",value:function(e){return function(t){var r,n=new RegExp(e,"g").exec(t),o=Array.isArray(n);if(o)return{matches:o,params:null!==(r=null==n?void 0:n.groups)&&void 0!==r?r:void 0}}}}])&&o(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.default=a},7005:function(e,t,r){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}r(444),r(1076),r(5547),r(2047),r(4843),r(1624),r(1e3),r(8534),Object.defineProperty(t,"__esModule",{value:!0}),t.deleteStorageEntries=t.deleteStorageItem=t.putStorageItem=t.getStorageItem=t.getStorageEntries=void 0;var o=r(9975);t.getStorageEntries=function(e,t){var r=(0,o.default)(t.request.trustedOrigins);return{entries:e.entries(r)}},t.getStorageItem=function(e,t){if("object"===n(t.params)){var r=(0,o.default)(t.request.trustedOrigins);return{value:e.get(r,t.params.key)}}return{value:null}},t.putStorageItem=function(e,t){if("object"===n(t.params)&&"object"===n(t.request.body)){var r=(0,o.default)(t.request.trustedOrigins);return e.set(r,t.params.key,t.request.body.value),{key:t.params.key,value:t.request.body.value}}return{key:"undefined"}},t.deleteStorageItem=function(e,t){if("object"===n(t.params)){var r=(0,o.default)(t.request.trustedOrigins);e.delete(r,t.params.key)}},t.deleteStorageEntries=function(e,t){var r=(0,o.default)(t.request.trustedOrigins);e.clear(r)}},9975:function(e,t,r){r(4843),r(887),r(1896),Object.defineProperty(t,"__esModule",{value:!0});var n=r(9145);t.default=function(e){return(0,n.uuidHash)(e.sort().join(","),"db0ec212-8371-47d7-b44a-c2d50493194d")}},2401:function(e,t,r){r(4843),r(3600),Object.defineProperty(t,"__esModule",{value:!0});var n=["DELETE","GET","POST","PUT"];t.default=function(e){return"string"==typeof e.id&&"string"==typeof e.method&&n.includes(e.method)&&"string"==typeof e.path&&void 0!==e.trustedOrigins&&Array.isArray(e.trustedOrigins)}},2375:function(e,t,r){function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r(4843),r(5128),Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),o(this,"memory",void 0),o(this,"length",void 0),this.memory={},Object.defineProperty(this,"length",{get:function(){return Object.keys(this.memory).length}})}var t,r;return t=e,(r=[{key:"getItem",value:function(e){var t;return null!==(t=this.memory[e])&&void 0!==t?t:null}},{key:"setItem",value:function(e,t){this.memory[e]=t}},{key:"removeItem",value:function(e){delete this.memory[e]}},{key:"key",value:function(e){return Object.keys(this.memory)[e]}},{key:"clear",value:function(){this.memory={}}}])&&n(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.default=i},5857:function(e,t,r){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(){o=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},c=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var o=t&&t.prototype instanceof h?t:h,a=Object.create(o.prototype),c=new k(n||[]);return i(a,"_invoke",{value:O(e,r,c)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=f;var p={};function h(){}function y(){}function v(){}var m={};l(m,c,(function(){return this}));var b=Object.getPrototypeOf,g=b&&b(b(P([])));g&&g!==t&&r.call(g,c)&&(m=g);var w=v.prototype=h.prototype=Object.create(m);function E(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function o(i,a,c,u){var s=d(e[i],e,a);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==n(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){o("next",e,c,u)}),(function(e){o("throw",e,c,u)})):t.resolve(f).then((function(e){l.value=e,c(l)}),(function(e){return o("throw",e,c,u)}))}u(s.arg)}var a;i(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){o(e,r,t,n)}))}return a=a?a.then(n,n):n()}})}function O(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=S(a,r);if(c){if(c===p)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=d(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,S(e,t),"throw"===t.method))return p;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var n=d(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,p;var o=n.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function P(e){if(e){var t=e[c];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:T}}function T(){return{value:void 0,done:!0}}return y.prototype=v,i(w,"constructor",{value:v,configurable:!0}),i(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,l(e,s,"GeneratorFunction")),e.prototype=Object.create(w),e},e.awrap=function(e){return{__await:e}},E(_.prototype),l(_.prototype,u,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},E(w),l(w,s,"Generator"),l(w,c,(function(){return this})),l(w,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=P,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),x(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:P(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function i(e,t,r,n,o,i,a){try{var c=e[i](a),u=c.value}catch(e){return void r(e)}c.done?t(u):Promise.resolve(u).then(n,o)}function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i=[],a=!0,c=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){c=!0,o=e}finally{try{a||null==r.return||r.return()}finally{if(c)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function s(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r(444),r(1076),r(5547),r(6257),r(6941),r(6486),r(8496),r(4802),r(2112),r(6353),r(3064),r(4277),r(4843),r(3600),r(6770),r(3524),r(685),r(1624),r(1e3),r(8719),r(2047),r(8534),r(3275),Object.defineProperty(t,"__esModule",{value:!0});var l=r(7191),f=r(2375),d=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),s(this,"storage",void 0),s(this,"isCrossDomainSupported",void 0),s(this,"sep",":||:"),s(this,"keyCache",void 0),this.storage=t,this.isCrossDomainSupported=r,this.initKeyCache()}var t,r,n,c,d;return t=e,r=[{key:"initKeyCache",value:function(){this.keyCache={};for(var e=this.storage.length,t=0;t<e;t+=1){var r=this.storage.key(t);if("string"==typeof r&&r.includes(this.sep)){var n=a(r.split(this.sep),2),o=n[0],i=n[1];this.getKeySet(o).add(i)}}}},{key:"compositeKey",value:function(e,t){return e+this.sep+t}},{key:"getKeySet",value:function(e){var t=this.keyCache[e];return void 0===t&&(t=new Set,this.keyCache[e]=t),t}},{key:"get",value:function(e,t){return this.storage.getItem(this.compositeKey(e,t))}},{key:"set",value:function(e,t,r){this.getKeySet(e).add(t),this.storage.setItem(this.compositeKey(e,t),r)}},{key:"delete",value:function(e,t){this.storage.removeItem(this.compositeKey(e,t))}},{key:"clear",value:function(e){var t=this,r=this.getKeySet(e);r.forEach((function(r){t.delete(e,r)})),r.clear()}},{key:"entries",value:function(e){var t=this,r=[];return this.getKeySet(e).forEach((function(n){r.push([n,t.get(e,n)])})),r}}],n=[{key:"create",value:(c=o().mark((function t(){return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,l.default)("localStorage");case 2:if(!t.sent){t.next=6;break}t.t0=new e(window.localStorage,!0),t.next=7;break;case 6:t.t0=new e(new f.default,!1);case 7:return t.abrupt("return",t.t0);case 8:case"end":return t.stop()}}),t)})),d=function(){var e=this,t=arguments;return new Promise((function(r,n){var o=c.apply(e,t);function a(e){i(o,r,n,a,u,"next",e)}function u(e){i(o,r,n,a,u,"throw",e)}a(void 0)}))},function(){return d.apply(this,arguments)})}],r&&u(t.prototype,r),n&&u(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.default=d},3632:function(e,t,r){r(4843),Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},1154:function(e,t,r){r(4843),Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t={};try{var r;return null!==(r=JSON.parse(e))&&void 0!==r?r:t}catch(e){}return t}},7191:function(e,t,r){function n(){n=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},c=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var o=t&&t.prototype instanceof h?t:h,a=Object.create(o.prototype),c=new k(n||[]);return i(a,"_invoke",{value:O(e,r,c)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=f;var p={};function h(){}function y(){}function v(){}var m={};l(m,c,(function(){return this}));var b=Object.getPrototypeOf,g=b&&b(b(P([])));g&&g!==t&&r.call(g,c)&&(m=g);var w=v.prototype=h.prototype=Object.create(m);function E(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function n(i,a,c,u){var s=d(e[i],e,a);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==o(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,c,u)}),(function(e){n("throw",e,c,u)})):t.resolve(f).then((function(e){l.value=e,c(l)}),(function(e){return n("throw",e,c,u)}))}u(s.arg)}var a;i(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,o){n(e,r,t,o)}))}return a=a?a.then(o,o):o()}})}function O(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=S(a,r);if(c){if(c===p)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=d(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,S(e,t),"throw"===t.method))return p;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var n=d(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,p;var o=n.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function P(e){if(e){var t=e[c];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:T}}function T(){return{value:void 0,done:!0}}return y.prototype=v,i(w,"constructor",{value:v,configurable:!0}),i(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,l(e,s,"GeneratorFunction")),e.prototype=Object.create(w),e},e.awrap=function(e){return{__await:e}},E(_.prototype),l(_.prototype,u,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},E(w),l(w,s,"Generator"),l(w,c,(function(){return this})),l(w,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=P,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),x(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:P(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function i(e,t,r,n,o,i,a){try{var c=e[i](a),u=c.value}catch(e){return void r(e)}c.done?t(u):Promise.resolve(u).then(n,o)}function a(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function c(e){i(a,n,o,c,u,"next",e)}function u(e){i(a,n,o,c,u,"throw",e)}c(void 0)}))}}function c(){return(c=a(n().mark((function e(t){var r,i,a;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("function"!=typeof document.hasStorageAccess){e.next=6;break}return e.next=3,document.hasStorageAccess();case 3:e.t0=e.sent,e.next=7;break;case 6:e.t0=void 0;case 7:if(void 0===(i=e.t0)){e.next=10;break}return e.abrupt("return",i);case 10:return e.prev=10,r="string"==typeof t?window[t]:t,a="__storage_test__",r.setItem(a,a),r.removeItem(a),e.abrupt("return",!0);case 18:return e.prev=18,e.t1=e.catch(10),e.abrupt("return",e.t1 instanceof DOMException&&(22===e.t1.code||1014===e.t1.code||"QuotaExceededError"===e.t1.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.t1.name)&&"object"===o(r)&&0!==r.length);case 21:case"end":return e.stop()}}),e,null,[[10,18]])})))).apply(this,arguments)}r(1e3),r(444),r(1076),r(5547),r(1624),r(2047),r(8534),r(8496),r(4802),r(2112),r(6353),r(3064),r(3275),r(4277),r(6257),r(4843),r(6941),Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return c.apply(this,arguments)}},9145:function(e,t,r){function n(e,t){var r=(4194303&e)*(t|=0);return 0!=(4290772992&e)&&(r+=(4290772992&e)*t|0),0|r}r(4843),r(5393),r(1e3),r(7285),r(1624),r(9382),r(7639),r(6996),r(1366),r(3558),r(8852),r(8630),r(8858),r(6480),r(7219),r(2160),r(4289),r(8165),r(4613),r(3292),r(3748),r(9157),r(5529),r(4882),r(7233),r(1086),r(8786),r(5544),r(1304),r(9497),r(3524),r(9344),r(887),Object.defineProperty(t,"__esModule",{value:!0}),t.uuidHash=void 0,t.uuidHash=function(e,t){var r=function(e){for(var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=3735928559^r,i=1103547991^r,a=2207095982^r,c=1867964279^r,u=0;u<e.length;u++)o=n(o^(t=e.charCodeAt(u)),2654435761),i=n(i^t,1597334677),a=n(a^t,2654435761),c=n(c^t,1597334677);function s(e){return(e>>>0).toString(16).padStart(8,"0")}function l(e){for(var t=new Uint16Array(e.length),r=0;r<e.length;r++)t[r]=parseInt(e.charAt(r),16);return t}return o=n(o^o>>>16,2246822507)^n(i^i>>>13,3266489909),i=n(i^i>>>16,2246822507)^n(o^o>>>13,3266489909),a=n(a^a>>>16,2246822507)^n(c^c>>>13,3266489909),c=n(c^c>>>16,2246822507)^n(a^a>>>13,3266489909),l(s(i)+s(o)+s(c)+s(a))}(t+e),o=0;return[1e7,1e3,1e3,1e3,1e11].join("-").replace(/[01]/g,(function(e){var t=r[o].toString(16);return o+=1,t}))}},1043:function(e,t,r){function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(4843);var o=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._message=t,this._node=r}var t,r;return t=e,(r=[{key:"message",get:function(){return this._message}},{key:"node",get:function(){return this._node}}])&&n(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.default=o},9290:function(e,t,r){function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(1624),r(1e3),r(8719),r(2047),r(8534),r(5226),r(3275),r(4843);var o=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.onPropertySet=t,this._klasses=new Set}var t,r;return t=e,(r=[{key:"_trackObserver",value:function(e){e.__cbio_observers||(e.__cbio_observers=new Set),e.__cbio_observers.add(this)}},{key:"_untrackObserver",value:function(e){e.__cbio_observers&&e.__cbio_observers.delete(this)}},{key:"_tap",value:function(e,t){if(!e["__cbio_override_".concat(t)]){var r=Object.getOwnPropertyDescriptor(e.prototype,t);if(r){e["__cbio_override_".concat(t)]=!0;var n=r.set;r.set=function(r){var o=this;n.call(this,r),e.__cbio_observers&&e.__cbio_observers.forEach((function(e){e.onPropertySet(o,t,r)}))},Object.defineProperty(e.prototype,t,r)}}}},{key:"observe",value:function(e,t){this._klasses.add(e),this._trackObserver(e),this._tap(e,t)}},{key:"disconnect",value:function(){var e=this;this._klasses.forEach((function(t){return e._untrackObserver(t)})),this._klasses.clear()}}])&&n(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.default=o},1213:function(e,t,r){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}r(5128),r(444),r(4011),r(5226),r(9270),r(6507),r(1624),r(2047),r(1157),r(8534),r(1076),r(5547),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(1e3),r(3275),r(1087),r(3133),r(5562),r(4843);var o,i=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var r=c(t);if(r&&r.has(e))return r.get(e);var o={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var u=i?Object.getOwnPropertyDescriptor(e,a):null;u&&(u.get||u.set)?Object.defineProperty(o,a,u):o[a]=e[a]}return o.default=e,r&&r.set(e,o),o}(r(3682)),a=(o=r(1043))&&o.__esModule?o:{default:o};function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(c=function(e){return e?r:t})(e)}function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u(Object(r),!0).forEach((function(t){l(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function l(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function f(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var d=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._id=t,this._dom={id:t,childNodes:[]},this._mapping={}}var t,r,n;return t=e,n=[{key:"createMapping",value:function(e){var t={};return(0,i.default)(e,(function(e){e.id?t[e.id]=e:console.warn("node missing id",e)})),t}},{key:"applyPatch",value:function(e,t){var r=this.createMapping(e),n={};t.forEach((function(e){if(e.id){var t=r[e.id]||{};r[e.id]=s(s({},t),e),n[e.id]=!0}else console.warn("diff missing id",e)})),Object.values(r).forEach((function(e){e.childNodes=(e.childNodes||[]).map((function(t){var n=t.id||t,o=r[n];if(!o)throw new a.default("denormalisation failed for child ".concat(n),e);return o}))}));var o=r[e.id],c=(0,i.depthFirstPostOrder)(o,(function(e,t){if(e.childNodes=t,t.map((function(e){return n[e.id]})).reduce((function(e,t){return e||t}),!1)){n[e.id]=!0;var o=s({},e);return r[e.id]=o,o}return e}));return{dom:c,mapping:this.createMapping(c)}}}],(r=[{key:"id",get:function(){return this._id}},{key:"document",get:function(){return this._dom}},{key:"node",value:function(e){return this._mapping[e]}},{key:"applyPatch",value:function(t){var r=e.applyPatch(this._dom,t),n=r.dom,o=r.mapping;return this._dom=n,this._mapping=o,this}}])&&f(t.prototype,r),n&&f(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.default=d},3682:function(e,t,r){function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach((function(t){i(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r(5128),r(444),r(4011),r(1e3),r(5226),r(3275),r(9270),r(6507),Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t,r){var n=t.childNodes,i=r(t,(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];n=e}));return n&&n.length?o(o({},i),{},{childNodes:Array.from(n).map((function(t){return e(t,r)}))}):i},t.depthFirstPostOrder=function e(t,r){var n=Array.from(t.childNodes||[]).map((function(t){return e(t,r)}));return r(t,n)},r(3133),r(6486),r(2047),r(4843)},1514:function(e,t,r){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}r(1624),r(1e3),r(2047),r(1157),r(8534),r(4843),r(5226),r(444),r(1076),r(5547),Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"CompressionError",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"PropertyObserver",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"VirtualDOM",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"depthFirst",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"depthFirstPostOrder",{enumerable:!0,get:function(){return a.depthFirstPostOrder}}),Object.defineProperty(t,"isxdoc",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(t,"parents",{enumerable:!0,get:function(){return u.default}});var o=f(r(1043)),i=f(r(1213)),a=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var r=l(t);if(r&&r.has(e))return r.get(e);var o={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var c=i?Object.getOwnPropertyDescriptor(e,a):null;c&&(c.get||c.set)?Object.defineProperty(o,a,c):o[a]=e[a]}return o.default=e,r&&r.set(e,o),o}(r(3682)),c=f(r(9122)),u=f(r(1725)),s=f(r(9290));function l(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(l=function(e){return e?r:t})(e)}function f(e){return e&&e.__esModule?e:{default:e}}},9122:function(e,t,r){function n(e){try{return!e.document&&!1}catch(e){return!0}}r(4843),Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return!!n(e)||!("IFRAME"!==e.tagName||!n(e.contentWindow))}},1725:function(e,t,r){function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}r(444),r(1076),r(1e3),r(5547),r(1624),r(2047),r(8534),r(6486),r(6257),r(6941),r(3524),r(4843),Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t,r){for(var o=[],i=t;i.parentNode&&i.parentNode!==r;)o.push(i.parentNode),i=i.parentNode;var a,c=i.defaultView&&i.defaultView.frameElement;return c?[].concat(o,[c],function(e){if(Array.isArray(e))return n(e)}(a=e(c))||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(a)||function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}(a)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()):o},r(3114)},9796:function(e,t,r){var n;r(3524),r(3317),r(9497),r(9806),r(7285),r(3794),r(9344),t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),this.useColors){var r="color: "+this.color;t.splice(1,0,r,"color: inherit");var n=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(n++,"%c"===e&&(o=n))})),t.splice(o,0,r)}},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){var e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},t.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(n=!1,function(){n||(n=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||function(){},e.exports=r(4701)(t),e.exports.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},4701:function(e,t,r){function n(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}r(444),r(1076),r(5547),r(1624),r(2047),r(8534),r(6486),r(6941),r(1e3),r(3275),r(5128),r(5538),r(3524),r(9344),r(3794),r(4843),r(685),r(9806),r(7285),r(6257),r(887),r(3114),r(3133),e.exports=function(e){function t(e){var r,n,i,a=null;function c(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];if(c.enabled){var i=c,a=Number(new Date),u=a-(r||a);i.diff=u,i.prev=r,i.curr=a,r=a,n[0]=t.coerce(n[0]),"string"!=typeof n[0]&&n.unshift("%O");var s=0;n[0]=n[0].replace(/%([a-zA-Z%])/g,(function(e,r){if("%%"===e)return"%";s++;var o=t.formatters[r];if("function"==typeof o){var a=n[s];e=o.call(i,a),n.splice(s,1),s--}return e})),t.formatArgs.call(i,n);var l=i.log||t.log;l.apply(i,n)}}return c.namespace=e,c.useColors=t.useColors(),c.color=t.selectColor(e),c.extend=o,c.destroy=t.destroy,Object.defineProperty(c,"enabled",{enumerable:!0,configurable:!1,get:function(){return null!==a?a:(n!==t.namespaces&&(n=t.namespaces,i=t.enabled(e)),i)},set:function(e){a=e}}),"function"==typeof t.init&&t.init(c),c}function o(e,r){var n=t(this.namespace+(void 0===r?":":r)+e);return n.log=this.log,n}function i(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){var e=[].concat(n(t.names.map(i)),n(t.skips.map(i).map((function(e){return"-"+e})))).join(",");return t.enable(""),e},t.enable=function(e){var r;t.save(e),t.namespaces=e,t.names=[],t.skips=[];var n=("string"==typeof e?e:"").split(/[\s,]+/),o=n.length;for(r=0;r<o;r++)n[r]&&("-"===(e=n[r].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;var r,n;for(r=0,n=t.skips.length;r<n;r++)if(t.skips[r].test(e))return!1;for(r=0,n=t.names.length;r<n;r++)if(t.names[r].test(e))return!0;return!1},t.humanize=r(3231),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((function(r){t[r]=e[r]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){for(var r=0,n=0;n<e.length;n++)r=(r<<5)-r+e.charCodeAt(n),r|=0;return t.colors[Math.abs(r)%t.colors.length]},t.enable(t.load()),t}},1178:function(e,t,r){r(4843),r(4277),r(3064),r(9616),r(444),r(1076),r(5547),r(8496),r(4802),r(2112),r(6353),r(3275),r(6941),r(6257),r(5226),r(9270),r(6507),Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.CobrowseIO=void 0,r(1e3),r(4011),r(3600),r(6770),r(6706),r(5128),r(3133),r(1624),r(2047),r(8534),r(6955),r(8927),r(1157);var n=E(r(1381)),o=r(1514),i=r(1239),a=r(5064),c=r(8302),u=r(5161),s=r(6362),l=r(3042),f=E(r(1289)),d=r(7368),p=E(r(1560)),h=E(r(9356)),y=E(r(3191)),v=r(1640),m=r(9426),b=E(r(2175)),g=E(r(9796)),w=E(r(3677));function E(e){return e&&e.__esModule?e:{default:e}}function _(e){return _="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_(e)}function O(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function S(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?O(Object(r),!0).forEach((function(t){N(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):O(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function j(){j=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,r){return e[t]=r}}function s(e,t,r,o){var i=t&&t.prototype instanceof d?t:d,a=Object.create(i.prototype),c=new k(o||[]);return n(a,"_invoke",{value:E(e,r,c)}),a}function l(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=s;var f={};function d(){}function p(){}function h(){}var y={};u(y,i,(function(){return this}));var v=Object.getPrototypeOf,m=v&&v(v(P([])));m&&m!==t&&r.call(m,i)&&(y=m);var b=h.prototype=d.prototype=Object.create(y);function g(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){function o(n,i,a,c){var u=l(e[n],e,i);if("throw"!==u.type){var s=u.arg,f=s.value;return f&&"object"==_(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){o("next",e,a,c)}),(function(e){o("throw",e,a,c)})):t.resolve(f).then((function(e){s.value=e,a(s)}),(function(e){return o("throw",e,a,c)}))}c(u.arg)}var i;n(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){o(e,r,t,n)}))}return i=i?i.then(n,n):n()}})}function E(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=O(a,r);if(c){if(c===f)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=l(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function O(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method))return f;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var n=l(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,f;var o=n.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function P(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:T}}function T(){return{value:void 0,done:!0}}return p.prototype=h,n(b,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:p,configurable:!0}),p.displayName=u(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,u(e,c,"GeneratorFunction")),e.prototype=Object.create(b),e},e.awrap=function(e){return{__await:e}},g(w.prototype),u(w.prototype,a,(function(){return this})),e.AsyncIterator=w,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new w(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},g(b),u(b,c,"Generator"),u(b,i,(function(){return this})),u(b,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=P,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),f},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),x(r),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:P(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},e}function x(e,t,r,n,o,i,a){try{var c=e[i](a),u=c.value}catch(e){return void r(e)}c.done?t(u):Promise.resolve(u).then(n,o)}function k(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){x(i,n,o,a,c,"next",e)}function c(e){x(i,n,o,a,c,"throw",e)}a(void 0)}))}}function P(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function T(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function L(e,t){return L=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},L(e,t)}function C(e,t){if(t&&("object"===_(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return I(e)}function I(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function M(e){return M=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},M(e)}function N(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function A(e,t,r){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,r)}function R(e,t){return function(e,t){return t.get?t.get.call(e):t.value}(e,F(e,t,"get"))}function D(e,t,r){return function(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}(e,F(e,t,"set"),r),r}function F(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}var W=(0,g.default)("cbio.CobrowseIO"),z=new WeakMap,G=new WeakMap,U=new WeakMap,Y=new WeakMap,B=new WeakMap,q=new WeakMap,V=new WeakMap,H=new WeakMap,K=new WeakMap,X=new WeakMap,$=new WeakMap,Q=new WeakMap,Z=new WeakMap,J=new WeakMap,ee=new WeakMap,te=new WeakMap,re=new WeakMap,ne=new WeakMap,oe=new WeakMap,ie=new WeakMap,ae=new WeakMap,ce=new WeakMap,ue=new WeakMap,se=new WeakMap,le=new WeakMap,fe=new WeakMap,de=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&L(e,t)}(x,e);var t,r,i,g,E,O=(g=x,E=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=M(g);if(E){var r=M(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return C(this,e)});function x(){var e,t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=r.sessionStorageFactory,c=void 0===i?function(e,t,r){var n=r.localStorage;return v.SessionStorage.create(e,t,{localStorage:n})}:i;return P(this,x),A(I(e=O.call(this)),z,{writable:!0,value:new a.ActivityDetection}),A(I(e),G,{writable:!0,value:void 0}),A(I(e),U,{writable:!0,value:void 0}),A(I(e),Y,{writable:!0,value:void 0}),A(I(e),B,{writable:!0,value:new m.LocalSessionStorage}),A(I(e),q,{writable:!0,value:void 0}),A(I(e),V,{writable:!0,value:void 0}),A(I(e),H,{writable:!0,value:{}}),A(I(e),K,{writable:!0,value:new s.SessionCapabilities(u.Device.info.capabilities)}),A(I(e),X,{writable:!0,value:new u.Device(I(e))}),A(I(e),$,{writable:!0,value:new l.ConsentDialog}),A(I(e),Q,{writable:!0,value:new l.ConsentDialog}),A(I(e),Z,{writable:!0,value:new l.ConsentDialog}),A(I(e),J,{writable:!0,value:void 0}),A(I(e),ee,{writable:!0,value:void 0}),A(I(e),te,{writable:!0,value:{}}),A(I(e),re,{writable:!0,value:void 0}),N(I(e),"start",k(j().mark((function t(){var r,n,i=arguments;return j().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=i.length>0&&void 0!==i[0]?i[0]:{},W("start()",r,"in",document),D(I(e),te,r),!y.default.isHeadless()||r.allowHeadless){t.next=6;break}return console.warn("CobrowseIO: Not starting Cobrowse in a headless browser"),t.abrupt("return");case 6:if(window.self===window.top){t.next=18;break}if(!r.allowIFrameStart){t.next=11;break}a.WindowTracking.setTracksIframes(!0),t.next=18;break;case 11:if(!(0,o.isxdoc)(window.parent)){t.next=16;break}return W("Starting Cobrowse in Iframe bridge mode with trusted origins:",h.default.trustedOrigins,"for",document),t.abrupt("return");case 16:return W("Not starting Cobrowse for same-origin iframe",document),t.abrupt("return");case 18:if(e.license){t.next=21;break}return console.error("CobrowseIO.license must be set before calling start"),t.abrupt("return");case 21:if(R(I(e),Y)){t.next=36;break}return f.default.initialize(),a.WindowTracking.start(),(0,p.default)(x.version).catch((function(){})),D(I(e),V,R(I(e),q).call(I(e),e.trustedOrigins,e.api,{localStorage:R(I(e),B)})),console.log("CobrowseIO started",x.version),D(I(e),Y,!0),!1!==r.register&&(R(I(e),z).on("active",(function(){return R(I(e),X).runRegistrationLoop()})),R(I(e),z).on("inactive",(function(){return R(I(e),X).pauseRegistrationLoop()}))),R(I(e),z).start(),W("attempting to restore session after start"),t.next=33,R(I(e),ne).call(I(e));case 33:D(I(e),U,null),null!==(n=e.currentSession)&&void 0!==n&&n.isActive()||e.hideSessionControls(),window.addEventListener("focus",R(I(e),ne),{capture:!0});case 36:case"end":return t.stop()}}),t)})))),N(I(e),"stop",k(j().mark((function t(){return j().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.currentSession||e.currentSession.isEnded()){t.next=3;break}return t.next=3,e.currentSession.end().catch((function(e){console.warn("CobrowseIO: Failed to end session on stop",e)}));case 3:return window.removeEventListener("focus",R(I(e),ne),{capture:!0}),R(I(e),ie).call(I(e),null),a.WindowTracking.stop(),R(I(e),z).stop(),t.next=9,R(I(e),X).destroy();case 9:return t.next=11,R(I(e),V)&&R(I(e),V).destroy();case 11:return D(I(e),V,void 0),D(I(e),Y,!1),t.abrupt("return",I(e));case 14:case"end":return t.stop()}}),t)})))),A(I(e),ne,{writable:!0,value:(t=k(j().mark((function t(){var r;return j().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,R(I(e),V).load(I(e));case 2:if(!(r=t.sent)){t.next=14;break}if(t.prev=4,r.state()){t.next=8;break}return t.next=8,r.fetch();case 8:R(I(e),ie).call(I(e),r,{invalidateFrames:!0}),t.next=14;break;case 11:t.prev=11,t.t0=t.catch(4),console.warn("CobrowseIO: Failed to fetch restored session",t.t0);case 14:return t.abrupt("return",null);case 15:case"end":return t.stop()}}),t,null,[[4,11]])}))),function(){return t.apply(this,arguments)})}),A(I(e),oe,{writable:!0,value:function(){R(I(e),X).bannerMessage()&&l.Toast.show(R(I(e),X).bannerMessage())}}),A(I(e),ie,{writable:!0,value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.invalidateFrames,o=void 0!==n&&n;if(W("setting current session",t),t&&R(I(e),G)){var i=R(I(e),G).session;if(i.id()===t.id())return}R(I(e),$).hide(),R(I(e),Q).hide(),R(I(e),Z).hide();var a=function(e,t){return h.default.broadcastToChildren("control",[e,t])};R(I(e),G)&&(R(I(e),G).session.off("updated",R(I(e),ae)),R(I(e),G).session.off("ended",R(I(e),ce)),R(I(e),G).session.off("control",a),R(I(e),G).destroy(),D(I(e),G,null)),t&&(D(I(e),G,new s.SessionContext(t,I(e),R(I(e),V))),t.state()&&R(I(e),ae).call(I(e),t),t.on("updated",R(I(e),ae)),t.once("ended",R(I(e),ce)),t.on("control",a),o&&R(I(e),G).invalidateFrames())}}),A(I(e),ae,{writable:!0,value:function(t){t.fullDevice()||R(I(e),Z).hide(),"requested"!==t.remoteControl()&&R(I(e),Q).hide(),t.isAuthorizing()||R(I(e),$).hide(),R(I(e),oe).call(I(e),t),e.emit("session.updated",t)}}),A(I(e),ce,{writable:!0,value:function(t){e.emit("session.ended",t),R(I(e),ie).call(I(e),null)}}),A(I(e),ue,{writable:!0,value:void 0}),N(I(e),"hideSessionControls",(function(){l.SessionStateOverlay.hide()})),A(I(e),se,{writable:!0,value:(0,d.protect)(I(e),"getCapabilities",(function(){return R(I(e),K)}))}),A(I(e),le,{writable:!0,value:(0,n.default)((function(){var t;R(I(e),X).hasPendingUpdates()&&R(I(e),Y)&&!1!==(null===(t=R(I(e),te))||void 0===t?void 0:t.register)&&R(I(e),X).updateRegistration().catch((function(e){console.warn("CobrowseIO: updating customData failed",e)}))}),8e3,{leading:!0,trailing:!0})}),N(I(e),"confirmRemoteControl",k(j().mark((function t(){return j().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",R(I(e),Q).show(b.default.tr("REMOTE_CONTROL_REQUEST_TITLE"),b.default.tr("REMOTE_CONTROL_REQUEST_DESCRIPTION")));case 1:case"end":return t.stop()}}),t)})))),N(I(e),"confirmFullDevice",k(j().mark((function t(){return j().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",R(I(e),Z).show(b.default.tr("FULL_DEVICE_REQUEST_TITLE"),b.default.tr("FULL_DEVICE_REQUEST_DESCRIPTION")));case 1:case"end":return t.stop()}}),t)})))),N(I(e),"confirmSession",k(j().mark((function t(){return j().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",R(I(e),$).show(b.default.tr("SESSION_REQUEST_TITLE"),b.default.tr("SESSION_REQUEST_DESCRIPTION")));case 1:case"end":return t.stop()}}),t)})))),N(I(e),"getSession",function(){var t=k(j().mark((function t(r){var n;return j().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(R(I(e),Y)){t.next=2;break}throw new Error("CobrowseIO not started. Call CobrowseIO.start()");case 2:if(!e.currentSession||e.currentSession.id()!==r&&e.currentSession.code()!==r){t.next=4;break}return t.abrupt("return",e.currentSession.fetch());case 4:return n=new s.Session(I(e)).updateResource({id:r}),R(I(e),ie).call(I(e),n),t.next=8,n.fetch();case 8:return e.emit("session.loaded",n),t.abrupt("return",n);case 10:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),N(I(e),"createSession",k(j().mark((function t(){var r;return j().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(R(I(e),Y)){t.next=2;break}throw new Error("CobrowseIO not started. Call CobrowseIO.start()");case 2:if(!e.currentSession||!e.currentSession.isActive()&&!e.currentSession.isAuthorizing()){t.next=4;break}throw new Error("Already in a session");case 4:return r=new s.Session(I(e)),R(I(e),ie).call(I(e),r),t.next=8,r.update({custom_data:e.customData,device:u.Device.info});case 8:return e.emit("session.loaded",r),t.abrupt("return",r);case 10:case"end":return t.stop()}}),t)})))),N(I(e),"createSessionCode",k(j().mark((function t(){var r;return j().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.createSession();case 2:return r=t.sent,t.abrupt("return",r.code());case 4:case"end":return t.stop()}}),t)})))),N(I(e),"client",k(j().mark((function t(){return j().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",I(e));case 1:case"end":return t.stop()}}),t)})))),A(I(e),fe,{writable:!0,value:function(t){t&&["license","api","customData","showSessionControls","hideSessionControls","confirmSession","confirmRemoteControl","confirmFullDevice","trustedOrigins","redactedViews","unredactedViews","ignoredViews","capabilities"].forEach((function(r){t[r]&&(e[r]=t[r])}))}}),W("interface constructed in",document),D(I(e),q,c),e.api="https://api.cobrowse.io",R(I(e),fe).call(I(e),window&&window.CobrowseIO),D(I(e),U,R(I(e),B).load(I(e))),R(I(e),X).on("register",R(I(e),oe)),R(I(e),X).on("notification",(function(t){var r=t["cobrowseio-code"];r&&e.getSession(r).catch((function(e){console.warn("CobrowseIO: session fetch failed:",e)}))})),e}return t=x,i=[{key:"version",get:function(){return u.Device.info.sdk_version}}],(r=[{key:"deviceId",value:function(){return u.Device.deviceId()}},{key:"currentSession",get:function(){return R(this,G)?R(this,G).session:R(this,U)}},{key:"showSessionControls",get:function(){return R(this,ue)?R(this,ue):l.SessionStateOverlay.show},set:function(e){D(this,ue,e),l.SessionStateOverlay.hide(),this.currentSession&&this.currentSession.isActive()&&R(this,ue).call(this)}},{key:"license",get:function(){return c.RESTResource.getHeader("X-CobrowseLicense")},set:function(e){if(R(this,Y)&&this.license!==e)throw new Error("Cannot change license once Cobrowse is started");c.RESTResource.setHeader("X-CobrowseLicense",e)}},{key:"api",get:function(){return c.RESTResource.api},set:function(e){if(R(this,Y)&&c.RESTResource.api!==e)throw new Error("Cannot change API once Cobrowse is started");c.RESTResource.api=e}},{key:"redactedViews",get:function(){return R(this,J)},set:function(e){if(R(this,Y))throw new Error("Cannot set redacted views after Cobrowse is started");D(this,J,e)}},{key:"unredactedViews",get:function(){return R(this,ee)},set:function(e){if(R(this,Y))throw new Error("Cannot set unredacted views after Cobrowse is started");D(this,ee,e)}},{key:"ignoredViews",get:function(){return R(this,re)},set:function(e){if(R(this,Y))throw new Error("Cannot set ignored views after Cobrowse is started");D(this,re,e),w.default.setIgnoredViews(e)}},{key:"capabilities",get:function(){return R(this,K).toArray()},set:function(e){if(R(this,Y))throw new Error("Cannot set capabilities after Cobrowse is started");if(!Array.isArray(e))throw new Error("Capabilities should be an array");D(this,K,new s.SessionCapabilities(e.filter((function(e){return!!u.Device.info.capabilities.includes(e)||(console.warn("Capability '".concat(e,"' not supported. Ignoring...")),!1)}))))}},{key:"customData",get:function(){return S(S({},R(this,X).customData),R(this,H))},set:function(e){if("object"!==_(e))throw new Error("Custom data must be an object");if(D(this,H,S(S({},R(this,H)),e)),R(this,Y)&&setTimeout(R(this,le),0),this.currentSession&&this.currentSession.isActive()){var t=this.currentSession.resource.custom_data;if(!Object.keys(e).find((function(r){return t[r]!==e[r]})))return void W("no changes to session custom data");this.currentSession.update({custom_data:e}).catch((function(){console.warn("CobrowseIO: failed to update custom data on active session")}))}}},{key:"trustedOrigins",get:function(){return h.default.trustedOrigins},set:function(e){var t=e.map((function(e){try{return new URL(e).origin}catch(t){return console.warn("CobrowseIO: Invalid URL in trustedOrigins:",e),null}})).filter((function(e){return e}));h.default.trustedOrigins=t}},{key:"version",get:function(){return x.version}}])&&T(t.prototype,r),i&&T(t,i),Object.defineProperty(t,"prototype",{writable:!1}),x}(i.EventEmitter);t.CobrowseIO=de,c.RESTResource.setHeader("Content-Type","application/json"),c.RESTResource.setHeader("X-CobrowsePlatform","web"),c.RESTResource.setHeader("X-CobrowseSDKVersion",de.version),c.RESTResource.setHeader("X-CobrowseDevice",u.Device.deviceId()),c.RESTResource.setHeader("X-CobrowseAPIVersion","1.2.0");var pe=new de;t.default=pe},1974:function(e,t,r){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}r(4843),r(444),r(1076),r(5547),r(1624),r(2047),r(8534),r(8496),r(4802),r(2112),r(6353),r(3064),r(3275),r(6941),r(4277),r(6257),t.Z=function(){try{var e=window.CXBus.registerPlugin("CobrowseIOExtension");window.oCobrowseIOExtension=e,e.subscribe("WebChatService.started",(function(t){try{s("CobrowseIOExtension.WebChatService.started",t),function(e){document.getElementsByClassName("cx-menu")[0].innerHTML+='<li role="none"><div class="cx-menu-item cx-cobrowseio cx-icon" role="button" data-icon="cobrowseio" tabindex="0" aria-label="Start Co-browse Opens the Co-browse session" title="Start Co-browse" style="display: block/;"><svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" viewBox="0 0 100 100" focusable="false" role="img" aria-hidden="true" alt="" data-gcb-service-node="true"><g class="cx-svg-icon-tone1" data-gcb-service-node="true"><path d="M11.5000001,3 L85.4166665,3 L87.6666668,3 C90.2624998,3 97,3.75367965 97,8.36940835 L97,30.4776335 L4.16666671,30.4776335 L4.16666671,70.4963922 C4.16666671,78.8021647 9.0333332,80.6810966 11.3333336,80.6810966 L88.6666664,80.6810966 C90.9625002,80.6810966 92.8333333,78.8021647 92.8333333,76.4963922 L92.8333333,41.8470419 L97,41.8470419 L97,79.5093796 C97,84.1251081 93.2624998,84.8787879 91.6666668,84.8787879 L8.3333332,84.8787879 C3.73750015,84.8787879 1,81.1251081 0,75.5093796 L0,8.36940835 C3,3.75367965 2.73750015,3 8.3333332,3 L8.5000001,3 Z M18.0297398,7.03030303 L5.9962825,7.03030303 C5.79033476,7.03030303 3.99999999,8.59607987 3.99999999,10.5175565 L3.999999,26.1125541 L93,26.1125541 L93,10.5175565 C93,8.59607987 91.2056692,7.03030303 89.0037175,7.03030303 L81.9702602,7.03030303 L18.0297398,7.03030303 Z M42.3451929,54.7727663 L42.3451929,68.6904309 L35,68.6904309 L35,47.7138693 C35,44.657411 37.4676761,42.1818182 40.5082059,42.1818182 L61.3971055,42.1818182 L61.3971055,49.5560425 L47.5394308,49.5560425 L66.3971054,67.9373646 L61.202867,73.154089 L42.3451929,54.7727663 Z" id="Fill-1-Copy""></path></g></svg></div></li>',document.getElementsByClassName("cx-cobrowseio")[0].onclick=function(){return function(e){return l.apply(this,arguments)}(e)}}(e),function(e){e.command("WebChatService.updateUserData",{cobrowse_device_id:o.default.deviceId()}).done((function(e){s("CobrowseIOExtension.WebChWebChatService.updateUserData succeeded",e)})).fail((function(e){s("CobrowseIOExtension.WebChWebChatService.updateUserData failed",e)}))}(e);var r={cobrowse_device_id:o.default.deviceId()};t&&t.data&&(t.data.data&&t.data.data.conversationId&&(r.genesys_conversation_id=t.data.data.conversationId),t.data.userId&&"deprecated"!==t.data.userId&&(r.genesys_user_id=t.data.userId),t.data.sessionID&&"deprecated"!==t.data.sessionID&&(r.genesys_session_id=t.data.sessionID)),o.default.customData=r}catch(e){s("Error during CobrowseIOExtension.WebChatService.started",e)}})),e.subscribe("WebChatService.agentConnected",(function(e){s("CobrowseIOExtension.WebChatService.agentConnected",e)})),e.subscribe("WebChatService.clientConnected",(function(e){s("CobrowseIOExtension.WebChatService.clientConnected",e)})),e.subscribe("WebChatService.restored",(function(e){s("CobrowseIOExtension.WebChatService.restored",e)})),e.subscribe("WebChat.started",(function(e){try{if(s("CobrowseIOExtension.WebChat.started",e),e&&e.data&&e.data.form){s("e.data.form",e.data.form);var t=e.data.form||{};t.device_name=e.data.form.firstname?"".concat(e.data.form.firstname,"'s device"):"WebChat User's Device",o.default.customData=t}}catch(e){s("Error during CobrowseIOExtension.WebChat.started",e)}})),e.republish("ready"),e.ready()}catch(e){console.error("Error syncing Cobrowse.io with Genesys, please contact hello@cobrowse.io for help!"),console.warn(e)}},r(1e3),r(3114);var o=i(r(1178));function i(e){return e&&e.__esModule?e:{default:e}}function a(){a=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var i=t&&t.prototype instanceof h?t:h,a=Object.create(i.prototype),c=new k(n||[]);return o(a,"_invoke",{value:O(e,r,c)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=f;var p={};function h(){}function y(){}function v(){}var m={};l(m,c,(function(){return this}));var b=Object.getPrototypeOf,g=b&&b(b(P([])));g&&g!==t&&r.call(g,c)&&(m=g);var w=v.prototype=h.prototype=Object.create(m);function E(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function i(o,a,c,u){var s=d(e[o],e,a);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==n(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){i("next",e,c,u)}),(function(e){i("throw",e,c,u)})):t.resolve(f).then((function(e){l.value=e,c(l)}),(function(e){return i("throw",e,c,u)}))}u(s.arg)}var a;o(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){i(e,r,t,n)}))}return a=a?a.then(n,n):n()}})}function O(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=S(a,r);if(c){if(c===p)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=d(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,S(e,t),"throw"===t.method))return p;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var n=d(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,p;var o=n.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function P(e){if(e){var t=e[c];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:T}}function T(){return{value:void 0,done:!0}}return y.prototype=v,o(w,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,l(e,s,"GeneratorFunction")),e.prototype=Object.create(w),e},e.awrap=function(e){return{__await:e}},E(_.prototype),l(_.prototype,u,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},E(w),l(w,s,"Generator"),l(w,c,(function(){return this})),l(w,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=P,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),x(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:P(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function c(e,t,r,n,o,i,a){try{var c=e[i](a),u=c.value}catch(e){return void r(e)}c.done?t(u):Promise.resolve(u).then(n,o)}function u(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){c(i,n,o,a,u,"next",e)}function u(e){c(i,n,o,a,u,"throw",e)}a(void 0)}))}}var s=(0,i(r(9796)).default)("cbio.Integrations.Genesys");function l(){return(l=u(a().mark((function e(t){var r;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s("Requesting cobrowse"),e.next=3,o.default.createSessionCode();case 3:r=e.sent,s("Generated session code: ".concat(r)),t.command("WebChatService.sendFilteredMessage",{message:"Customer requests Cobrowse session with code: ".concat(r.substr(0,3)," ").concat(r.substr(3)),regex:/Customer requests Cobrowse session with code:.*/}).done((function(e){s("CobrowseIOExtension.WebChatService sent filtered message successfully",e)})).fail((function(e){s("CobrowseIOExtension.WebChatService failed to send filtered message",e)}));case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},1289:function(e,t,r){var n;function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(4843);var i=(0,((n=r(9796))&&n.__esModule?n:{default:n}).default)("cbio.Integrations"),a=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n;return t=e,n=[{key:"watchProperty",value:function(e,t,r){e[t]?(i("".concat(t," already exists")),r()):(i("".concat(t," not set yet... monitoring"),e),Object.defineProperty(e,t,{configurable:!0,set:function(n){i("CobrowseIO detected",t),Object.defineProperty(e,t,{configurable:!0,writable:!0,value:n}),setTimeout(r,0)}}))}},{key:"initialize",value:function(){var e=this;i("Initializing integrations"),this.watchProperty(window,"CXBus",(function(){return r(1974).Z()})),this.watchProperty(window,"Intercom",(function(){return r(4775).Z()})),this.watchProperty(window,"$zopim",(function(){return r(3478).z2()})),this.watchProperty(window,"zE",(function(){"messenger"===window.zE.widget?r(3478).dQ():e.watchProperty(window.zE,"identify",(function(){return r(3478).Bt()}))})),this.watchProperty(window,"embedded_svc",(function(){return e.watchProperty(window.embedded_svc,"liveAgentAPI",(function(){r(8738).Z()}))}))}}],null&&o(t.prototype,null),n&&o(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.default=a},4775:function(e,t,r){r(4843),t.Z=function(){try{if(!window.Intercom||"function"!=typeof window.Intercom)throw new Error("expected window.Intercom to be a function");a("Initializing intercom integration"),c(),window.Intercom("onShow",(0,n.default)(c,12e4,{trailing:!1}))}catch(e){console.error("Error syncing Cobrowse.io with Intercom, please contact hello@cobrowse.io for help!"),console.warn(e)}};var n=i(r(1381)),o=i(r(1178));function i(e){return e&&e.__esModule?e:{default:e}}var a=(0,i(r(9796)).default)("cbio.Integrations.Intercom");function c(){a("Updating intercom integration"),window.intercomSettings||(window.intercomSettings={}),window.intercomSettings.CobrowseID=o.default.deviceId(),window.Intercom("update",{CobrowseID:o.default.deviceId()})}},8738:function(e,t,r){r(4843),t.Z=function(){try{if("object"!==i(window.embedded_svc))throw new Error("expected window.embedded_svc to a be an object");if(window.embedded_svc&&!window.embedded_svc.liveAgentAPI)throw new Error("expected liveAgentAPI on embedded_svc");a("Initializing salesforce integration"),window.embedded_svc.addEventHandler("onChatRequestSuccess",(function(e){e&&e.liveAgentSessionKey&&(n.default.customData={salesforce_liveAgentSessionKey:e.liveAgentSessionKey})})),window.embedded_svc.addEventHandler("onChatEndedByAgent",(function(){n.default.currentSession&&n.default.currentSession.end()})),window.embedded_svc.addEventHandler("onChatEndedByChasitor",(function(){n.default.currentSession&&n.default.currentSession.end()}))}catch(e){console.error("Error syncing Cobrowse.io with Salesforce Chat, please contact hello@cobrowse.io for help!"),console.warn(e)}},r(444),r(1076),r(1e3),r(5547),r(1624),r(2047),r(8534);var n=o(r(1178));function o(e){return e&&e.__esModule?e:{default:e}}function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}var a=(0,o(r(9796)).default)("cbio.Integrations.Salesforce")},3478:function(e,t,r){r(4843),t.Bt=function(){try{!function(){if(!window.zE||!window.zE.identify)throw new Error("missing window.zE or window.zE.identify");s();var e=window.zE.identify;window.zE.identify=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return a("identify",r[0]),e.apply(void 0,r)}}()}catch(e){console.error("Error syncing Cobrowse.io with Zendesk (classic), please contact hello@cobrowse.io for help!"),console.warn(e)}},t.dQ=function(){try{"true"===sessionStorage.getItem("ZD-widgetOpen")?h().then(l):window.zE("messenger:on","open",(function(){h().then(l)}))}catch(e){console.error("Error syncing Cobrowse.io with Zendesk (messenger), please contact hello@cobrowse.io for help!"),console.warn(e)}},t.z2=function(){try{if("function"!=typeof window.$zopim)throw new Error("expected window.$zopim to a be a function");window.$zopim((function(){i("Initializing zendesk integration"),window.$zopim.livechat.addTags("cobrowseio_deviceid_".concat(n.default.deviceId())),n.default.customData={cobrowseio_deviceid:n.default.deviceId()}}))}catch(e){console.error("Error syncing Cobrowse.io with Zendesk Chat, please contact hello@cobrowse.io for help!"),console.warn(e)}},r(6941),r(5128),r(6706),r(1e3),r(3524),r(3317);var n=o(r(1178));function o(e){return e&&e.__esModule?e:{default:e}}var i=(0,o(r(9796)).default)("cbio.Integrations.Zendesk");function a(e,t){var r={};"identify"===e&&t?(t.name&&(r.user_name=t.name),t.email&&(r.user_email=t.email),t.organization&&(r.user_organization=t.organization)):"prefill"===e&&t?(t.name&&t.name.value&&(r.user_name=t.name.value),t.email&&t.email.value&&(r.user_email=t.email.value),t.phone&&t.phone.value&&(r.user_phone=t.phone.value)):"logout"===e&&(r={user_name:null,user_email:null,user_organization:null,user_phone:null}),u(r)}function c(e,t){var r={};"identify"===e&&t?r={zendesk_web_user_id:t.appUserId}:"logoutUser"===e&&(r={user_name:null,user_email:null,user_organization:null,user_phone:null,zendesk_web_user_id:null,zendesk_user_id:null,zendesk_ticket_id:null}),u(r)}function u(e){Object.keys(e).length&&(n.default.customData=e)}function s(){var e=window.zE;for(var t in window.zE=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];console.log(r);var o=r[0],i=r[1],u=r[2];return"webWidget"===o&&a(i,u),"messenger"===o&&c(i,u),e.apply(void 0,r)},e)window.zE[t]=e[t]}function l(){s();var e=f();if(!e)throw new Error("Missing client ID (ZD-buid)");var t=d(e);if(!t)throw new Error("Instance ID could not be found");c("identify",{appUserId:p(t)})}function f(){return localStorage.getItem("ZD-buid")}function d(e){var t,r;return null===(t=Object.keys(localStorage).find((function(t){return t.match(/\w+\.clientId/)&&localStorage[t]===e})))||void 0===t||null===(r=t.split("."))||void 0===r?void 0:r[0]}function p(e){return localStorage.getItem("".concat(e,".appUserId"))}function h(){return new Promise((function e(t,r){var n=p(d(f()));n?t(n):setTimeout(e,2e3,t,r)}))}},5978:function(e,t,r){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}r(4843),r(4277),r(3064),r(9616),r(444),r(1076),r(5547),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(1624),r(1e3),r(2047),r(1157),r(8534);var o=r(1239),i=a(r(1381));function a(e){return e&&e.__esModule?e:{default:e}}function c(e,t){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},c(e,t)}function u(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return s(e)}function s(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function l(e){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},l(e)}function f(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function d(e,t,r){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,r)}function p(e,t){return function(e,t){return t.get?t.get.call(e):t.value}(e,y(e,t,"get"))}function h(e,t,r){return function(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}(e,y(e,t,"set"),r),r}function y(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}var v=(0,a(r(9796)).default)("cbio.ActivityDetection"),m=new WeakMap,b=new WeakMap,g=new WeakMap,w=new WeakMap,E=new WeakMap,_=new WeakMap,O=new WeakMap,S=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&c(e,t)}(a,e);var t,r,n,o=(r=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=l(r);if(n){var o=l(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return u(this,e)});function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),d(s(t=o.call(this)),m,{writable:!0,value:!1}),d(s(t),b,{writable:!0,value:!1}),d(s(t),g,{writable:!0,value:null}),d(s(t),w,{writable:!0,value:9e5}),f(s(t),"start",(function(){p(s(t),m)||(h(s(t),m,!0),v("started"),document.addEventListener("mouseenter",p(s(t),E),{capture:!0,passive:!0}),document.addEventListener("mouseleave",p(s(t),E),{capture:!0,passive:!0}),document.addEventListener("mousemove",p(s(t),E),{capture:!0,passive:!0}),document.addEventListener("touchstart",p(s(t),E),{capture:!0,passive:!0}),document.addEventListener("touchend",p(s(t),E),{capture:!0,passive:!0}),document.addEventListener("touchmove",p(s(t),E),{capture:!0,passive:!0}),document.addEventListener("visibilitychange",p(s(t),E),{capture:!0}),p(s(t),E).call(s(t)))})),f(s(t),"stop",(function(){h(s(t),b,!1),h(s(t),m,!1),v("stopped"),clearTimeout(p(s(t),g)),t.removeAllListeners(),document.removeEventListener("mouseenter",p(s(t),E),{capture:!0,passive:!0}),document.removeEventListener("mouseleave",p(s(t),E),{capture:!0,passive:!0}),document.removeEventListener("mousemove",p(s(t),E),{capture:!0,passive:!0}),document.removeEventListener("touchstart",p(s(t),E),{capture:!0,passive:!0}),document.removeEventListener("touchend",p(s(t),E),{capture:!0,passive:!0}),document.removeEventListener("touchmove",p(s(t),E),{capture:!0,passive:!0}),document.removeEventListener("visibilitychange",p(s(t),E),{capture:!0})})),f(s(t),"isActive",(function(){return p(s(t),b)})),d(s(t),E,{writable:!0,value:(0,i.default)((function(){p(s(t),_).call(s(t)),clearTimeout(p(s(t),g)),h(s(t),g,setTimeout(p(s(t),O),p(s(t),w))),t.emit("activity")}),500,{trailing:!1})}),d(s(t),_,{writable:!0,value:function(){p(s(t),b)||(document.hidden?v("window is hidden, not becoming active"):(h(s(t),b,!0),v("became active"),t.emit("active")))}}),d(s(t),O,{writable:!0,value:function(){p(s(t),b)&&(h(s(t),b,!1),v("became inactive"),t.emit("inactive"))}}),e&&h(s(t),w,e),t}return t=a,Object.defineProperty(t,"prototype",{writable:!1}),t}(o.EventEmitter);t.default=S},2650:function(e,t,r){r(5128),r(444),r(4011),r(1e3),r(5226),r(3275),r(9270),r(6507),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(4843);var n,o=(n=r(1381))&&n.__esModule?n:{default:n};function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach((function(t){s(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function c(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function u(e,t,r){return t&&c(e.prototype,t),r&&c(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function s(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var l=new(u((function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),s(this,"_mousePosition",{x:-1,y:-1}),s(this,"_mouseIsDown",!1),s(this,"_mouseIsIn",!1),s(this,"track",(function(e){e.addEventListener("mousedown",t._onMouseDown,{capture:!0,passive:!0}),e.addEventListener("mouseup",t._onMouseUp,{capture:!0,passive:!0}),e.addEventListener("mouseenter",t._onMouseEnter,{capture:!0,passive:!0}),e.addEventListener("mouseleave",t._onMouseLeave,{capture:!0,passive:!0}),e.addEventListener("mousemove",t._onMouseMove,{capture:!0,passive:!0})})),s(this,"untrack",(function(e){e.removeEventListener("mousedown",t._onMouseDown,{capture:!0,passive:!0}),e.removeEventListener("mouseup",t._onMouseUp,{capture:!0,passive:!0}),e.removeEventListener("mouseenter",t._onMouseEnter,{capture:!0,passive:!0}),e.removeEventListener("mouseleave",t._onMouseLeave,{capture:!0,passive:!0}),e.removeEventListener("mousemove",t._onMouseMove,{capture:!0,passive:!0})})),s(this,"isDown",(function(){return t._mouseIsDown})),s(this,"setDown",(function(e){t._mouseIsDown=e,t.onChange&&t.onChange(t.state())})),s(this,"isIn",(function(){return t._mouseIsIn>0})),s(this,"position",(function(){return t._mousePosition})),s(this,"setPosition",(function(e,r,n){if(n){var o=n.getBoundingClientRect();e+=Math.round(o.left),r+=Math.round(o.top)}t._mousePosition={x:e,y:r},t.onChange&&t.onChange(t.state())})),s(this,"state",(function(){return a(a({},t.position()),{},{down:t.isDown(),in:t.isIn()})})),s(this,"_onMouseDown",(function(e){e.isTrusted&&t.setDown(!0)})),s(this,"_onMouseUp",(function(e){e.isTrusted&&t.setDown(!1)})),s(this,"_onMouseEnter",(function(e){e.isTrusted&&(t._mouseIsIn+=1)})),s(this,"_onMouseLeave",(function(e){e.isTrusted&&e.target===e.currentTarget&&(t._mouseIsIn-=1)})),s(this,"_onMouseMove",(0,o.default)((function(e){if(e.isTrusted){var r=e.clientX,n=e.clientY,o=e.view&&e.view.frameElement;t.setPosition(r,n,o)}}),100))})));t.default=l},1094:function(e,t,r){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}r(4843),r(4277),r(3064),r(9616),r(444),r(1076),r(5547),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(3114),r(1624),r(1e3),r(2047),r(1157),r(8534);var o=r(1239),i=r(5828),a=c(r(5901));function c(e){return e&&e.__esModule?e:{default:e}}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function l(e,t){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},l(e,t)}function f(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return d(e)}function d(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},p(e)}function h(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function y(e,t,r){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,r)}function v(e,t,r){return function(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}(e,b(e,t,"set"),r),r}function m(e,t){return function(e,t){return t.get?t.get.call(e):t.value}(e,b(e,t,"get"))}function b(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}var g=(0,c(r(9796)).default)("cbio.WindowTracking"),w="_cobrowse_window_id",E=new WeakMap,_=new WeakMap,O=new WeakMap,S=new WeakMap,j=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&l(e,t)}(b,e);var t,r,n,o,c=(n=b,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=p(n);if(o){var r=p(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return f(this,e)});function b(){var e;u(this,b);for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return y(d(e=c.call.apply(c,[this].concat(r))),E,{writable:!0,value:(0,i.v4)()}),y(d(e),_,{writable:!0,value:!1}),y(d(e),O,{writable:!0,value:!1}),h(d(e),"start",(function(){m(d(e),O)||(v(d(e),O,!0),g("started"),m(d(e),S).call(d(e)),document.addEventListener("visibilitychange",m(d(e),S),{capture:!0}),document.addEventListener("mouseover",m(d(e),S),{capture:!0}))})),h(d(e),"stop",(function(){g("stopped"),e.removeAllListeners(),v(d(e),O,!1),document.removeEventListener("visibilitychange",m(d(e),S),{capture:!0}),document.removeEventListener("mouseover",m(d(e),S),{capture:!0})})),h(d(e),"isActive",(function(){return(0,a.default)().getItem(w)===e.id})),h(d(e),"setTracksIframes",(function(t){v(d(e),_,t),m(d(e),S).call(d(e))})),h(d(e),"shouldTrack",(function(){return!document.hidden&&(!(window.self!==window.top)||m(d(e),_))})),h(d(e),"makeActive",(function(){e.isActive()||(g("making active",window),(0,a.default)().setItem(w,e.id),e.emit("activate",window))})),h(d(e),"resignActive",(function(){e.isActive()&&(g("resigning active",window),(0,a.default)().setItem(w,null))})),y(d(e),S,{writable:!0,value:function(){e.shouldTrack()&&e.makeActive(),e.emit("updated")}}),e}return t=b,(r=[{key:"id",get:function(){return m(this,E)}}])&&s(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),b}(o.EventEmitter),x=new j;t.default=x},5064:function(e,t,r){r(4843),Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ActivityDetection",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"MouseTracking",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"WindowTracking",{enumerable:!0,get:function(){return i.default}});var n=a(r(5978)),o=a(r(2650)),i=a(r(1094));function a(e){return e&&e.__esModule?e:{default:e}}},7725:function(e,t,r){r(4843),r(4277),r(3064),r(1112),r(5226),r(9616),r(444),r(1076),r(5547),r(8496),r(4802),r(2112),r(6353),r(3275),r(6941),r(6257),Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.RegistrationPath=t.DeviceIdPath=void 0,r(1e3),r(7285),r(1624),r(2047),r(8534),r(6955),r(8927),r(6706),r(5128),r(3114),r(3524),r(1157);var n=r(5828),o=r(8302),i=s(r(2260)),a=s(r(5901)),c=s(r(3440)),u=s(r(9421));function s(e){return e&&e.__esModule?e:{default:e}}function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}function f(){f=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,r){return e[t]=r}}function s(e,t,r,o){var i=t&&t.prototype instanceof h?t:h,a=Object.create(i.prototype),c=new k(o||[]);return n(a,"_invoke",{value:O(e,r,c)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=s;var p={};function h(){}function y(){}function v(){}var m={};u(m,i,(function(){return this}));var b=Object.getPrototypeOf,g=b&&b(b(P([])));g&&g!==t&&r.call(g,i)&&(m=g);var w=v.prototype=h.prototype=Object.create(m);function E(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function o(n,i,a,c){var u=d(e[n],e,i);if("throw"!==u.type){var s=u.arg,f=s.value;return f&&"object"==l(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){o("next",e,a,c)}),(function(e){o("throw",e,a,c)})):t.resolve(f).then((function(e){s.value=e,a(s)}),(function(e){return o("throw",e,a,c)}))}c(u.arg)}var i;n(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){o(e,r,t,n)}))}return i=i?i.then(n,n):n()}})}function O(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=S(a,r);if(c){if(c===p)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=d(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,S(e,t),"throw"===t.method))return p;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var n=d(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,p;var o=n.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function P(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:T}}function T(){return{value:void 0,done:!0}}return y.prototype=v,n(w,"constructor",{value:v,configurable:!0}),n(v,"constructor",{value:y,configurable:!0}),y.displayName=u(v,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,u(e,c,"GeneratorFunction")),e.prototype=Object.create(w),e},e.awrap=function(e){return{__await:e}},E(_.prototype),u(_.prototype,a,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},E(w),u(w,c,"Generator"),u(w,i,(function(){return this})),u(w,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=P,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),x(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:P(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function d(e,t,r,n,o,i,a){try{var c=e[i](a),u=c.value}catch(e){return void r(e)}c.done?t(u):Promise.resolve(u).then(n,o)}function p(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){d(i,n,o,a,c,"next",e)}function c(e){d(i,n,o,a,c,"throw",e)}a(void 0)}))}}function h(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function y(e,t){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},y(e,t)}function v(e,t){if(t&&("object"===l(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return m(e)}function m(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function b(){return b="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=g(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}},b.apply(this,arguments)}function g(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=w(e)););return e}function w(e){return w=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},w(e)}function E(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _(e,t,r){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,r)}function O(e,t){return function(e,t){return t.get?t.get.call(e):t.value}(e,j(e,t,"get"))}function S(e,t,r){return function(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}(e,j(e,t,"set"),r),r}function j(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}var x=(0,s(r(9796)).default)("cbio.Device"),k="_cobrowse_device_id";t.DeviceIdPath=k;var P="_cobrowse_device_registration";t.RegistrationPath=P;var T=new WeakMap,L=new WeakMap,C=new WeakMap,I=new WeakMap,M=new WeakMap,N=new WeakMap,A=new WeakMap,R=new WeakMap,D=new WeakMap,F=new WeakMap,W=new WeakMap,z=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&y(e,t)}(j,e);var t,r,o,s,d,g=(s=j,d=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=w(s);if(d){var r=w(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return v(this,e)});function j(e){var t,r;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,j),_(m(r=g.call(this)),T,{writable:!0,value:void 0}),_(m(r),L,{writable:!0,value:void 0}),_(m(r),C,{writable:!0,value:void 0}),_(m(r),I,{writable:!0,value:!1}),_(m(r),M,{writable:!0,value:void 0}),E(m(r),"url",(function(){return new URL("api/1/devices/".concat(r.id()),j.api).toString()})),E(m(r),"reset",(function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];x("resetting device"),clearTimeout(O(m(r),C)),S(m(r),C,null),e||(0,a.default)().removeItem(P),O(m(r),T)&&(O(m(r),T).close(),S(m(r),T,null))})),E(m(r),"destroy",p(f().mark((function e(){return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return x("destroying device"),r.reset(),e.abrupt("return",b((t=m(r),w(j.prototype)),"destroy",t).call(t));case 3:case"end":return e.stop()}}),e)})))),E(m(r),"hasPendingUpdates",(function(){var e=r.field("custom_data")||{},t=O(m(r),M).customData||{};return!!Object.keys(t).find((function(r){return e[r]!==t[r]}))})),_(m(r),N,{writable:!0,value:function(){if(!O(m(r),M).license)throw new Error("License required to generate storage key");return"".concat(O(m(r),M).license,":").concat(j.api)}}),E(m(r),"_saveRegistration",(function(){var e=r.field("next_registration")||3600,t=(new Date).getTime();"number"!=typeof Date.now()&&console.error("Unexpected type returned for Date.now(), expecting number got ".concat(l(Date.now()))),"number"!=typeof t&&console.error("Unexpected type for getTime() of Date, expecting number got ".concat(l(t)));var n={notification_url:r.field("notification_url"),notification_token:r.field("notification_token"),custom_data:r.field("custom_data"),next_registration_time:t+1e3*e};return r.cache({next_registration_time:n.next_registration_time}),(0,a.default)(O(m(r),N).call(m(r))).setItem(P,n),m(r)})),E(m(r),"_loadRegistration",(function(){if(!O(m(r),I)){S(m(r),I,!0);var e=(0,a.default)(O(m(r),N).call(m(r))).getItem(P);e&&(x("restoring registration",e),r.cache(e))}})),E(m(r),"updateRegistration",function(){var e=p(f().mark((function e(t){return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!O(m(r),L).limit()){e.next=2;break}throw new Error("Cobrowse update rate limit exceeded. Maybe you're updating custom data too often?");case 2:return x("updating registration"),e.next=5,r.update({device:j.info,custom_data:O(m(r),M).customData},t);case 5:return O(m(r),W).call(m(r)),r._saveRegistration(),r.emit("register"),e.abrupt("return",m(r));case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),E(m(r),"runRegistrationLoop",p(f().mark((function e(){return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(x("starting registrations"),r._loadRegistration(),r.reset(!0),!(r.hasPendingUpdates()||r.nextRegistration()<=0)){e.next=6;break}return e.next=6,r.updateRegistration().catch((function(){}));case 6:O(m(r),W).call(m(r)),O(m(r),A).call(m(r));case 8:case"end":return e.stop()}}),e)})))),E(m(r),"pauseRegistrationLoop",p(f().mark((function e(){return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:x("pausing registrations"),r.reset(!0);case 2:case"end":return e.stop()}}),e)})))),E(m(r),"nextRegistration",(function(){return(r.field("next_registration_time")||0)-(new Date).getTime()})),E(m(r),"bannerMessage",(function(){return r.field("banner_message")||!1})),E(m(r),"_nextUpdate",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return Math.max(Math.min(6e4*e,36e5),r.nextRegistration())})),_(m(r),A,{writable:!0,value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(O(m(r),C))console.error("CobrowseIO: tried to schedule registration while already scheduled");else{var t=r._nextUpdate(e);S(m(r),C,setTimeout(p(f().mark((function t(){return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(O(m(r),C)){t.next=2;break}return t.abrupt("return",console.error("Registration loop cancelled"));case 2:return t.prev=2,t.next=5,r.updateRegistration();case 5:return S(m(r),C,!1),t.abrupt("return",O(m(r),A).call(m(r)));case 9:return t.prev=9,t.t0=t.catch(2),console.warn("CobrowseIO: registration failed",t.t0),S(m(r),C,!1),t.abrupt("return",O(m(r),A).call(m(r),e+1));case 14:case"end":return t.stop()}}),t,null,[[2,9]])}))),Math.max(1e3,t)))}}}),_(m(r),R,{writable:!0,value:function(){var e=r.field("notification_url"),t=r.field("notification_token");return(0,c.default)(e,t)}}),_(m(r),D,{writable:!0,value:function(){O(m(r),T)||(S(m(r),T,new i.default({getUrl:O(m(r),R)})),O(m(r),T).setMaxReconnectDelay(6e4),O(m(r),T).on("error",(function(e){e&&console.warn("CobrowseIO notification socket error:",e)})),O(m(r),T).on("event",(function(e,t){"notification"===e?r.emit("notification",t):"probe"===e&&O(m(r),T).send("alive",t)})),O(m(r),T).on("open",(function(){O(m(r),T).send("filter",{events:["probe","notification"]})})))}}),_(m(r),F,{writable:!0,value:function(){O(m(r),T)&&(console.log("CobrowseIO: Closing socket"),O(m(r),T).close(),S(m(r),T,null))}}),_(m(r),W,{writable:!0,value:function(){var e=r.field("notification_url"),t=r.field("notification_token");e&&t?O(m(r),D).call(m(r)):O(m(r),F).call(m(r))}}),x("constructed"),!e)throw new Error("Device delegate is required");return S(m(r),M,e),S(m(r),L,new u.default(10,12e4)),r}return t=j,o=[{key:"deviceCredentials",value:function(){var e=(0,a.default)().getItem(k)||{};return"string"==typeof e&&(e={id:e}),"object"!==l(e)&&(e={}),e.id||(e.id=(0,n.v4)()),e.token||(e.token=(0,n.v4)()),(0,a.default)().setItem(k,e),e}},{key:"deviceId",value:function(){return this.deviceCredentials().id}},{key:"deviceToken",value:function(){return this.deviceCredentials().token}},{key:"info",get:function(){var e=["pointer","scroll","select","keypress","drawing","laser","cursor"];return/Android|webOS|iPhone|iPad|iPod|Opera Mini/i.test(window.navigator.userAgent)||e.push("full_device"),{platform:"web",device:window.navigator.userAgent,device_locale:window.navigator.language,device_timezone:window.Intl.DateTimeFormat().resolvedOptions().timeZone,os_version:window.navigator.platform,app_id:window.location.origin,app_name:window.document.title,app_build_configuration:"release",sdk_version:"2.22.3",capabilities:e}}}],(r=[{key:"id",value:function(){return j.deviceId()}},{key:"customData",get:function(){return this.field("custom_data")||{}}}])&&h(t.prototype,r),o&&h(t,o),Object.defineProperty(t,"prototype",{writable:!1}),j}(o.RESTResource);t.default=z},5161:function(e,t,r){r(4843),Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Device",{enumerable:!0,get:function(){return o.default}});var n,o=(n=r(7725))&&n.__esModule?n:{default:n}},8128:function(e,t,r){r(5128),r(444),r(4011),r(5226),r(9270),r(6507),r(6257),r(6486),r(3524),r(1076),r(5547),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(1e3),r(3275),r(3600),r(6770),r(6941),r(1624),r(8719),r(2047),r(8534),r(4843);var n,o=r(1514),i=r(5064),a=(n=r(8755))&&n.__esModule?n:{default:n};function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u(Object(r),!0).forEach((function(t){d(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function f(e,t,r){return t&&l(e.prototype,t),r&&l(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function d(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var p=f((function e(t){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),d(this,"_init",(function(){r._propertyWatcher||(r._propertyWatcher=new o.PropertyObserver(r._onPropertySet),a.default.on("stylechange",r._onStyleSheetChange),a.default.on("navigate",r._onNavigation))})),d(this,"observe",(function(e){if(!r._observing.has(e)){r._init(),e.addEventListener("scroll",r._onEvent,{capture:!0,passive:!0}),e.addEventListener("focus",r._onFocusChange,{capture:!0,passive:!0}),e.addEventListener("blur",r._onFocusChange,{capture:!0,passive:!0}),e.addEventListener("change",r._onInputEvent,{capture:!0,passive:!0}),e.addEventListener("keydown",r._onInputEvent,{capture:!0,passive:!0}),e.addEventListener("keyup",r._onInputEvent,{capture:!0,passive:!0}),e.addEventListener("keypress",r._onInputEvent,{capture:!0,passive:!0}),e.addEventListener("selectionchange",r._onSelectionEvent,{capture:!0,passive:!0}),e.addEventListener("select",r._onSelectionEvent,{capture:!0,passive:!0}),i.MouseTracking.track(e),r._observing.add(e);var t=(e.ownerDocument||e).defaultView;t&&!r._windows.has(t)&&(r._windows.add(t),a.default.tap(t),r._propertyWatcher.observe(t.HTMLInputElement,"value"),r._propertyWatcher.observe(t.HTMLInputElement,"checked"),r._propertyWatcher.observe(t.HTMLTextAreaElement,"value"),r._propertyWatcher.observe(t.ShadowRoot,"adoptedStyleSheets"),r._propertyWatcher.observe(t.Document,"adoptedStyleSheets"),t.addEventListener&&(t.addEventListener("hashchange",r._onEvent,{capture:!0,passive:!0}),t.addEventListener("resize",r._onEvent,{capture:!0,passive:!0})))}})),d(this,"disconnect",(function(){r._observing.forEach((function(e){e.removeEventListener("scroll",r._onEvent,{capture:!0,passive:!0}),e.removeEventListener("focus",r._onFocusChange,{capture:!0,passive:!0}),e.removeEventListener("blur",r._onFocusChange,{capture:!0,passive:!0}),e.removeEventListener("change",r._onInputEvent,{capture:!0,passive:!0}),e.removeEventListener("keydown",r._onInputEvent,{capture:!0,passive:!0}),e.removeEventListener("keyup",r._onInputEvent,{capture:!0,passive:!0}),e.removeEventListener("keypress",r._onInputEvent,{capture:!0,passive:!0}),e.removeEventListener("selectionchange",r._onSelectionEvent,{capture:!0,passive:!0}),e.removeEventListener("select",r._onSelectionEvent,{capture:!0,passive:!0}),i.MouseTracking.untrack(e)})),r._observing.clear(),r._windows.forEach((function(e){a.default.untap(e),e&&!(0,o.isxdoc)(e)&&e.removeEventListener&&(e.removeEventListener("hashchange",r._onEvent,{capture:!0,passive:!0}),e.removeEventListener("resize",r._onEvent,{capture:!0,passive:!0}))})),r._windows.clear(),r._propertyWatcher&&(r._propertyWatcher.disconnect(),r._propertyWatcher=null,a.default.off("stylechange",r._onStyleSheetChange),a.default.off("navigate",r._onNavigation))})),d(this,"_target",(function(e){return e.target&&e.target.document||e.target})),d(this,"_onEvent",(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r._onModification(r._target(e),s(s({},t),{},{type:e.type}))})),d(this,"_onSelectionEvent",(function(e){var t,n,o=null!==(t=e.target.ownerDocument)&&void 0!==t?t:e.target;o.__last_agent_selection_ts>Date.now()-100||("selectionchange"===e.type&&(["INPUT","TEXTAREA"].includes(null===(n=o.activeElement)||void 0===n?void 0:n.tagName)?(o.activeElement.__cobrowse_user_selection_timestamp=Date.now(),r._onModification(o.activeElement,{type:e.type})):(e.target.__cobrowse_user_selection_timestamp=Date.now(),r._onModification(e.target,{type:e.type}))),"select"===e.type&&(e.target.__cobrowse_user_selection_timestamp=Date.now(),r._onModification(e.target,{type:e.type})))})),d(this,"_onStyleSheetChange",(function(e){e.ownerNode&&r._onModification(e.ownerNode,{type:"stylesheet"});var t,n=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}(r._observing);try{for(n.s();!(t=n.n()).done;){var o,i=t.value;null!==(o=i.adoptedStyleSheets)&&void 0!==o&&o.includes(e)&&r._onModification(i,{type:"adoptedstylesheet"})}}catch(e){n.e(e)}finally{n.f()}})),d(this,"_onNavigation",(function(e){r._onModification(e.document,{type:"navigation"})})),d(this,"_onFocusChange",(function(e){r._onModification(e.target,{type:e.type}),e.target.ownerDocument&&r._onModification(e.target.ownerDocument,{type:e.type})})),d(this,"_onInputEvent",(function(e){"SELECT"===e.target.tagName||"TEXTAREA"===e.target.tagName?r._onModification(r._target(e),{recursive:!0,type:e.type}):"INPUT"===e.target.tagName&&("radio"===e.target.type?(e.target.closest("form")||e.target.ownerDocument).querySelectorAll("input[type=radio][name=".concat(e.target.name,"]")).forEach((function(t){return r._onModification(t,{type:e.type})})):r._onModification(r._target(e),{recursive:!0,type:e.type}))})),d(this,"_onPropertySet",(function(e){r._onModification(e,{type:"property"})})),this._onModification=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return setTimeout((function(){return t.apply(void 0,r)}),0)},this._observing=new Set,this._windows=new Set}));t.default=p},638:function(e,t,r){r(444),r(5226),r(9270),r(6507),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(4011),r(1e3),r(3133),r(5128),r(5562),r(1087),r(3275),r(4843);var n,o=(n=r(2404))&&n.__esModule?n:{default:n},i=r(1514);function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function c(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach((function(t){l(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function s(e,t,r){return t&&u(e.prototype,t),r&&u(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function l(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var f=s((function e(t){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),l(this,"_difference",(function(e,t){return t?Object.keys(e).map((function(r){return!(0,o.default)(e[r],t[r])&&l({},r,e[r])})).filter((function(e){return e})).reduce((function(e,t){return c(c({},e),t)}),{}):c({},e)})),l(this,"compress",(function(){return Object.values(r.modified).map((function(e){var t=r.state.node(e.id),n=r._difference(e,t),o=c({id:e.id},n);return 1!==Object.keys(o).length&&o})).filter((function(e){return e}))})),l(this,"mark",(function(){return r.state.applyPatch(Object.values(r.modified)),r.modified={},r})),l(this,"_flatten",(function(e){return e.childNodes?c(c({},e),{},{childNodes:e.childNodes.map((function(e){return{id:e.id}}))}):e})),l(this,"push",(function(e){return e&&e.modified?(e.modified.filter((function(e){return e})).forEach((function(e){(0,i.depthFirst)(e,(function(e){r.modified[e.id]=c(c({},r.modified[e.id]),r._flatten(e))}))})),r):(console.error("invalid patch",e),r)})),l(this,"reset",(function(e){return r.state=new i.VirtualDOM(r._id),r.modified={},e&&r.push({_t:"reset",modified:[e]}),r})),this._id=t,this.reset()}));t.default=f},3375:function(e,t,r){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}r(4277),r(3064),r(9616),r(5128),r(444),r(5226),r(9270),r(6507),r(1076),r(5547),r(6486),r(6941),r(3524),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(1624),r(1e3),r(8719),r(2047),r(8534),r(3275),r(6257),r(7285),r(3114),r(4011),r(3133),r(4843);var o=r(1239),i=r(1514),a=r(8541),c=r(7743),u=l(r(8128)),s=l(r(9356));function l(e){return e&&e.__esModule?e:{default:e}}function f(e){return function(e){if(Array.isArray(e))return p(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||d(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e,t){if(e){if("string"==typeof e)return p(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?p(e,t):void 0}}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function h(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function y(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?h(Object(r),!0).forEach((function(t){w(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):h(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function v(e,t){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},v(e,t)}function m(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return b(e)}function b(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function g(e){return g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},g(e)}function w(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var E=(0,l(r(9796)).default)("cbio.PatchStream"),_=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&v(e,t)}(l,e);var t,r,n,o=(r=l,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=g(r);if(n){var o=g(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return m(this,e)});function l(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),w(b(t=o.call(this)),"start",(function(){E("starting patch stream for",t._root),t._documents=new Set,t._redacted=new Set,t._iframeBridge.on("iframe_patched",t._onXDocIframeUpdate),t._canvasUpdateInterval=setInterval(t._updateCanvasContent,2e3),t._observe(t._root)})),w(b(t),"forceUpdate",(function(){E("forcing entire state update from",t._root),t.emit("patch",{_t:"pre-force",flush:!0,modified:[y(y({},c.NodeSerializer.serialize(t._root)),{},{scroll:void 0,childNodes:[y(y({},c.NodeSerializer.serialize(t._root.documentElement)),{},{childNodes:[c.NodeTree.depthFirst(t._root.head,c.NodeSerializer.serialize)]})]})]}),t.emit("patch",{_t:"forced",modified:[c.NodeTree.depthFirst(t._root,c.NodeSerializer.serialize)]})})),w(b(t),"stop",(function(){E("stopping patch stream for",t._root),t._mutationObserver.disconnect(),t._eventObserver.disconnect(),t._iframeBridge.removeListener("iframe_patched",t._onXDocIframeUpdate),clearInterval(t._canvasUpdateInterval),t._documents&&t._documents.clear(),t._documents=null})),w(b(t),"destroy",(function(){E("destroying patch stream for",t._root),t.stop(),t.removeAllListeners(),c.NodeTree.depthFirst(t._root,t._untrack),t._mutationObserver=null,t._eventObserver=null,t._iframeBridge=null,t._redacted=null,t._root=null})),w(b(t),"_updateCanvasContent",(function(){t._documents.forEach((function(e){(0,i.isxdoc)(e)||e.nodeType!==window.Node.DOCUMENT_FRAGMENT_NODE&&[].slice.call(e.getElementsByTagName("canvas")).forEach((function(e){t.emit("patch",{_t:"canvas",modified:[c.NodeSerializer.serialize(e)]})}))}))})),w(b(t),"_track",(function(e){if(c.NodeUtils.isDOMNode(e)){c.NodeTracker.track(e);var r=t._redacted.has(e),n=a.NodeRedaction.isNodeRedacted(e);r&&!n?t._redacted.delete(e):!r&&n&&t._redacted.add(e),e.nodeType===window.Node.DOCUMENT_NODE&&t._observe(e),e.nodeType===window.Node.DOCUMENT_FRAGMENT_NODE&&"[object Object]"!==e.toString()&&t._observe(e),"IFRAME"===e.tagName&&((0,i.isxdoc)(e)&&t._iframeBridge.sync(e),e.removeEventListener("load",t._onIframeLoad),e.addEventListener("load",t._onIframeLoad))}})),w(b(t),"_untrack",(function(e){c.NodeTracker.forget(e),t._redacted&&t._redacted.delete(e),c.NodeUtils.isDOMNode(e)&&"IFRAME"===e.tagName&&e.removeEventListener("load",t._onIframeLoad)})),w(b(t),"_observe",(function(e){if(e.nodeType!==window.Node.DOCUMENT_NODE&&e.nodeType!==window.Node.DOCUMENT_FRAGMENT_NODE)throw new Error("CobrowseIO: observed a non-document or fragment node (type=".concat(e.nodeType,")"));if(!t._documents.has(e)){E("starting observation of",e),t._documents.add(e),E("doing initial node tracking on observe for",e),c.NodeTree.depthFirst(e,t._track),t._eventObserver.observe(e);try{t._mutationObserver.observe(e,{attributes:!0,childList:!0,subtree:!0,characterData:!0})}catch(t){console.error("CobrowseIO failed to start mutation observer for",e)}}})),w(b(t),"_onXDocIframeUpdate",(function(e){E("xdoc iframe updated",e),a.NodeRedaction.isRedacted(e)||c.NodeTree.isIgnored(e)||t.emit("patch",{_t:"xdociframeupdate",modified:[c.NodeTree.depthFirst(e,c.NodeSerializer.serialize)]})})),w(b(t),"_onIframeLoad",(function(e){var r=e.target;E("iframe loaded",r),a.NodeRedaction.isRedacted(r)||((0,i.isxdoc)(r)?t._iframeBridge.sync(r):t._observe(r.contentWindow.document),c.NodeTree.isIgnored(r)||t.emit("patch",{_t:"iframeupdate",modified:[c.NodeTree.depthFirst(r,c.NodeSerializer.serialize)]}))})),w(b(t),"_onEventMutation",(function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t._onDOMChange(t._mutationObserver.takeRecords()),"TEXTAREA"===e.tagName&&c.NodeTree.depthFirst(e,t._track),c.NodeTracker.get(e)&&!a.NodeRedaction.isRedacted(e)&&!c.NodeTree.isIgnored(e)){var n=r.recursive?c.NodeTree.depthFirst(e,c.NodeSerializer.serialize):c.NodeSerializer.serialize(e);t.emit("patch",{_t:"eventmutation:".concat(r.type),modified:[n]})}})),w(b(t),"_discoverNodes",(function(e,r,n){for(var o=e.addedNodes?[].slice.call(e.addedNodes):[],i=a.NodeRedaction.notifyChanges([e]),u=0,s=[e.target].concat(f(i.modified));u<s.length;u++){var l=s[u];r.has(l)||(n.add(l),t._redacted.has(l)&&!a.NodeRedaction.isNodeRedacted(l)&&o.push(l))}var p,h=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=d(e))){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){c=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw i}}}}(o);try{for(h.s();!(p=h.n()).done;){var y=p.value;c.NodeTree.depthFirst(y,(function(e){n.add(e),r.delete(e)}))}}catch(e){h.e(e)}finally{h.f()}e.removedNodes&&[].slice.call(e.removedNodes).forEach((function(e){c.NodeTree.depthFirst(e,(function(e){n.delete(e),r.add(e)}))}))})),w(b(t),"_getModifications",(function(e){var r=new Set,n=new Set;return e.forEach((function(e){("characterData"===e.type||n.has(e.target)||c.NodeTracker.get(e.target))&&t._discoverNodes(e,r,n)})),r.forEach((function(e){return t._untrack(e)})),n.forEach((function(e){return t._track(e)})),n})),w(b(t),"_onDOMChange",(function(e){var r=t._getModifications(e);E("DOM changed",r);var n=f(r).map((function(e){return c.NodeSerializer.serialize(e)})).filter((function(e){return e}));E("DOM changes serialized",n),t.emit("patch",{_t:"domchange",modified:n})})),t._root=e,t._mutationObserver=new MutationObserver(t._onDOMChange),t._eventObserver=new u.default(t._onEventMutation),t._iframeBridge=s.default,t}return t=l,Object.defineProperty(t,"prototype",{writable:!1}),t}(o.EventEmitter);t.default=_},5493:function(e,t,r){r(4843),Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"PatchCompressor",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"PatchStream",{enumerable:!0,get:function(){return n.default}});var n=i(r(3375)),o=i(r(638));function i(e){return e&&e.__esModule?e:{default:e}}},6604:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(4843);var n=c(r(1381)),o=r(5493),i=r(7743),a=r(5064);function c(e){return e&&e.__esModule?e:{default:e}}function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function s(e,t,r){return t&&u(e.prototype,t),r&&u(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function l(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var f=(0,c(r(9796)).default)("cbio.DOMFrameSource"),d=s((function e(t){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),l(this,"_throttleCompressAndEmitFrame",(0,n.default)((function(){return r._compressAndEmitFrame()}),110)),l(this,"_compressAndEmitFrame",(function(){if(r._compression&&document&&i.NodeTracker.get(document)){var e=r._compression.compress();e.length&&r._onUpdate({document_id:i.NodeTracker.get(document),patch:e})&&r._compression.mark()}})),l(this,"capturingWillStart",(function(){if(f("capturingWillStart for DOMFrameSource in",document),r._sendInterval)throw new Error("DOMFrameSource already running");r._compression||(r._compression=new o.PatchCompressor(i.NodeTracker.track(document))),r._patchStream||(r._patchStream=new o.PatchStream(document)),a.WindowTracking.on("activate",r.reset),r._patchStream.on("patch",(function(e){r._compression.push(e),e.flush?r._compressAndEmitFrame():r._throttleCompressAndEmitFrame()})),r._sendInterval=setInterval((function(){return r._compressAndEmitFrame()}),500),r._patchStream.start()})),l(this,"capturingWillStop",(function(){f("capturingWillStop for DOMFrameSource in",document),a.WindowTracking.removeListener("activate",r.reset),r._sendInterval&&(clearInterval(r._sendInterval),r._sendInterval=null),r._patchStream&&(r._patchStream.destroy(),r._patchStream=null),r._compression&&(r._compression.reset(),r._compression=null)})),l(this,"reset",(function(){f("resetting DOMFrameSource in",document),r._compression.reset(),r._patchStream.forceUpdate()})),l(this,"destroy",(function(){f("destroying DOMFrameSource in",document),r.capturingWillStop(),r._onUpdate=null})),f("DOMFrameSource constructed in",document),this._onUpdate=t}));t.default=d},4773:function(e,t,r){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}var o;function i(){i=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},c=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var i=t&&t.prototype instanceof h?t:h,a=Object.create(i.prototype),c=new k(n||[]);return o(a,"_invoke",{value:O(e,r,c)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=f;var p={};function h(){}function y(){}function v(){}var m={};l(m,c,(function(){return this}));var b=Object.getPrototypeOf,g=b&&b(b(P([])));g&&g!==t&&r.call(g,c)&&(m=g);var w=v.prototype=h.prototype=Object.create(m);function E(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function i(o,a,c,u){var s=d(e[o],e,a);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==n(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){i("next",e,c,u)}),(function(e){i("throw",e,c,u)})):t.resolve(f).then((function(e){l.value=e,c(l)}),(function(e){return i("throw",e,c,u)}))}u(s.arg)}var a;o(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){i(e,r,t,n)}))}return a=a?a.then(n,n):n()}})}function O(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=S(a,r);if(c){if(c===p)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=d(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,S(e,t),"throw"===t.method))return p;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var n=d(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,p;var o=n.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function P(e){if(e){var t=e[c];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:T}}function T(){return{value:void 0,done:!0}}return y.prototype=v,o(w,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,l(e,s,"GeneratorFunction")),e.prototype=Object.create(w),e},e.awrap=function(e){return{__await:e}},E(_.prototype),l(_.prototype,u,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},E(w),l(w,s,"Generator"),l(w,c,(function(){return this})),l(w,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=P,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),x(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:P(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function a(e,t,r,n,o,i,a){try{var c=e[i](a),u=c.value}catch(e){return void r(e)}c.done?t(u):Promise.resolve(u).then(n,o)}function c(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function c(e){a(i,n,o,c,u,"next",e)}function u(e){a(i,n,o,c,u,"throw",e)}c(void 0)}))}}function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function s(e,t,r){return t&&u(e.prototype,t),r&&u(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function l(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r(1e3),r(444),r(1076),r(5547),r(1624),r(2047),r(8534),r(8496),r(4802),r(2112),r(6353),r(3064),r(3275),r(6941),r(4277),r(6257),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(4843);var f=(0,((o=r(9796))&&o.__esModule?o:{default:o}).default)("cbio.FrameLoop"),d=s((function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),l(this,"isRunning",(function(){return t._running})),l(this,"setSource",function(){var e=c(i().mark((function e(r){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r.constructor!==(t.source&&t.source.constructor)){e.next=3;break}return f("frame source type not changed"),e.abrupt("return");case 3:if(!t.isRunning()){e.next=17;break}return t.source&&t.source.capturingWillStop(),t.source=r,e.prev=6,e.next=9,t.source.capturingWillStart();case 9:t.invalidateFrame(),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(6),console.error(e.t0);case 15:e.next=18;break;case 17:t.source=r;case 18:case"end":return e.stop()}}),e,null,[[6,12]])})));return function(t){return e.apply(this,arguments)}}()),l(this,"getSource",(function(){return t.source})),l(this,"start",c(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:f("starting frame loop in",document),t.isRunning()||(t._running=!0,t.source.capturingWillStart());case 2:case"end":return e.stop()}}),e)})))),l(this,"stop",(function(){t.isRunning()&&(t.source.capturingWillStop(),t._running=!1)})),l(this,"invalidateFrame",(function(){if(!t.isRunning())throw new Error("FrameLoop was destroyed");f("invalidate frame in",document),t.source&&t.source.reset()})),l(this,"destroy",(function(){f("destroying frame loop in",document),t.stop(),t.source&&(t.source.destroy(),t.source=null)})),f("FrameLoop constructed in",document),this._running=!1}));t.default=d},5904:function(e,t,r){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}r(4843),r(444),r(1076),r(5547),r(8496),r(4802),r(2112),r(6353),r(3064),r(6941),r(4277),r(6257),r(6486),r(3524),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(1624),r(1e3),r(2827),r(7639),r(6996),r(1366),r(3558),r(8852),r(8630),r(8858),r(6480),r(7219),r(2160),r(4289),r(8165),r(4613),r(3292),r(3748),r(9157),r(5529),r(4882),r(7233),r(1086),r(8786),r(5544),r(1304),r(3275),r(2047),r(1157),r(8534);var o,i=r(1639);function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function c(){c=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var i=t&&t.prototype instanceof h?t:h,a=Object.create(i.prototype),c=new k(n||[]);return o(a,"_invoke",{value:O(e,r,c)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=f;var p={};function h(){}function y(){}function v(){}var m={};l(m,a,(function(){return this}));var b=Object.getPrototypeOf,g=b&&b(b(P([])));g&&g!==t&&r.call(g,a)&&(m=g);var w=v.prototype=h.prototype=Object.create(m);function E(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function i(o,a,c,u){var s=d(e[o],e,a);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==n(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){i("next",e,c,u)}),(function(e){i("throw",e,c,u)})):t.resolve(f).then((function(e){l.value=e,c(l)}),(function(e){return i("throw",e,c,u)}))}u(s.arg)}var a;o(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){i(e,r,t,n)}))}return a=a?a.then(n,n):n()}})}function O(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=S(a,r);if(c){if(c===p)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=d(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,S(e,t),"throw"===t.method))return p;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var n=d(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,p;var o=n.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function P(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:T}}function T(){return{value:void 0,done:!0}}return y.prototype=v,o(w,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,l(e,s,"GeneratorFunction")),e.prototype=Object.create(w),e},e.awrap=function(e){return{__await:e}},E(_.prototype),l(_.prototype,u,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},E(w),l(w,s,"Generator"),l(w,a,(function(){return this})),l(w,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=P,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),x(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:P(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function u(e,t,r,n,o,i,a){try{var c=e[i](a),u=c.value}catch(e){return void r(e)}c.done?t(u):Promise.resolve(u).then(n,o)}function s(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){u(i,n,o,a,c,"next",e)}function c(e){u(i,n,o,a,c,"throw",e)}a(void 0)}))}}function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function f(e,t,r){return t&&l(e.prototype,t),r&&l(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function d(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function p(e,t,r){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,r)}function h(e,t){return function(e,t){return t.get?t.get.call(e):t.value}(e,v(e,t,"get"))}function y(e,t,r){return function(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}(e,v(e,t,"set"),r),r}function v(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}var m=(0,((o=r(9796))&&o.__esModule?o:{default:o}).default)("cbio.MediaStreamFrameSource"),b=new WeakMap,g=new WeakMap,w=new WeakMap,E=new WeakMap,_=new WeakMap,O=new WeakMap,S=new WeakMap,j=new WeakMap,x=new WeakMap,k=new WeakMap,P=f((function e(t){var r,n,o=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),p(this,b,{writable:!0,value:void 0}),p(this,g,{writable:!0,value:void 0}),p(this,w,{writable:!0,value:void 0}),p(this,E,{writable:!0,value:void 0}),p(this,_,{writable:!0,value:void 0}),p(this,O,{writable:!0,value:void 0}),p(this,S,{writable:!0,value:[]}),p(this,j,{writable:!0,value:function(){var e=h(o,E).scale();h(o,w).width=h(o,g).videoWidth*e,h(o,w).height=h(o,g).videoHeight*e,h(o,w).getContext("2d").drawImage(h(o,g),0,0,h(o,w).width,h(o,w).height);var t="image/jpeg";h(o,w).toBlob(function(){var e=s(c().mark((function e(r){var n;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=Uint8Array,e.next=3,new Response(r).arrayBuffer();case 3:e.t1=e.sent,n=new e.t0(e.t1),h(o,E).handleFrame(n,t,1);case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),t,.5)}}),p(this,x,{writable:!0,value:(r=s(c().mark((function e(t){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return h(o,g).srcObject=t,e.next=3,h(o,g).play();case 3:y(o,_,setInterval(h(o,j),100));case 4:case"end":return e.stop()}}),e)}))),function(e){return r.apply(this,arguments)})}),p(this,k,{writable:!0,value:(n=s(c().mark((function e(t){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i.MediaRecorderDemuxer.isSupported("video/webm;codecs=h264")){e.next=3;break}return m("MediaRecorderDemuxer not supported, falling back to canvas"),e.abrupt("return",h(o,x).call(o,t));case 3:if(y(o,O,(0,i.createMediaRecorderDemuxer)(t)),h(o,O)){e.next=7;break}return m("failed to create MediaRecorderDemuxer, falling back to canvas"),e.abrupt("return",h(o,x).call(o,t));case 7:return m("using MediaRecorderDemuxer"),h(o,O).on("media-packet",(function(e){var t,r=e.data;null!==h(o,O)&&(0===r[0]&&0===r[1]&&0===r[2]&&1===r[3]?t=r[4]:0===r[0]&&0===r[1]&&1===r[2]&&(t=r[3]),7==(31&t)&&y(o,S,[]),h(o,S).push(r),h(o,E).handleFrame(r,"video/avc",1/0))})),e.abrupt("return",h(o,O).start());case 10:case"end":return e.stop()}}),e)}))),function(e){return n.apply(this,arguments)})}),d(this,"capturingWillStart",s(c().mark((function e(){var t,r,n;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(m("capturingWillStart for MediaStreamFrameSource"),!h(o,_)){e.next=3;break}throw new Error("already running");case 3:return e.next=5,h(o,E).requestPermission();case 5:if(e.sent){e.next=7;break}return e.abrupt("return");case 7:return e.prev=7,e.next=10,navigator.mediaDevices.getDisplayMedia({video:{cursor:"always",width:{ideal:1400},height:{ideal:1e3},frameRate:{max:10}},audio:!1});case 10:if(t=e.sent,r=t.getVideoTracks(),s=1,n=function(e){if(Array.isArray(e))return e}(u=r)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i=[],a=!0,c=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){c=!0,o=e}finally{try{a||null==r.return||r.return()}finally{if(c)throw o}}return i}}(u,s)||function(e,t){if(e){if("string"==typeof e)return a(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(e,t):void 0}}(u,s)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),(i=o,c=b,function(e,t){if(t.set)return"__destrObj"in t||(t.__destrObj={set value(r){t.set.call(e,r)}}),t.__destrObj;if(!t.writable)throw new TypeError("attempted to set read only private field");return t}(i,v(i,c,"set"))).value=n[0],h(o,b)){e.next=16;break}throw new Error("failed to get display media track");case 16:h(o,b).onended=function(){m("track ended"),y(o,b,null),h(o,E).captureEnded(),o.destroy()},h(o,k).call(o,t),h(o,E).captureStarted(),e.next=24;break;case 21:e.prev=21,e.t0=e.catch(7),h(o,E).captureEnded(e.t0);case 24:case"end":return e.stop()}var i,c,u,s}),e,null,[[7,21]])})))),d(this,"capturingWillStop",(function(){m("capturingWillStop for MediaStreamFrameSource"),h(o,O)&&(h(o,O).stop(),y(o,O,null)),h(o,b)&&(h(o,b).stop(),y(o,b,null),h(o,E).captureEnded()),h(o,_)&&(clearInterval(h(o,_)),y(o,_,null))})),d(this,"reset",(function(){m("resetting MediaStreamFrameSource"),h(o,S).forEach((function(e){h(o,E).handleFrame(e,"video/avc",1/0)}))})),d(this,"destroy",(function(){m("destroying MediaStreamFrameSource"),o.capturingWillStop(),y(o,E,null),y(o,g,null),y(o,w,null)})),m("MediaStreamFrameSource constructed"),y(this,E,t),y(this,g,document.createElement("video")),y(this,w,document.createElement("canvas"))}));t.default=P},7297:function(e,t,r){r(4843),Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"DOMFrameSource",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"FrameLoop",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"MediaStreamFrameSource",{enumerable:!0,get:function(){return i.default}});var n=a(r(4773)),o=a(r(6604)),i=a(r(5904));function a(e){return e&&e.__esModule?e:{default:e}}},2833:function(e,t,r){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}r(4843),r(4277),r(3064),r(9616),r(444),r(1076),r(5547),r(6486),r(6941),r(3524),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(6706),r(1e3),r(6257),r(3275),r(1624),r(2047),r(1157),r(8534);var o,i=r(1239);function a(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function u(e,t){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},u(e,t)}function s(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return l(e)}function l(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}function d(e,t,r){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,r)}function p(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function h(e,t){return function(e,t){return t.get?t.get.call(e):t.value}(e,y(e,t,"get"))}function y(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}var v=(0,((o=r(9796))&&o.__esModule?o:{default:o}).default)("cbio.IFrameBridge"),m=new WeakMap,b=new WeakMap,g=new WeakMap,w=new WeakMap,E=new WeakMap,_=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&u(e,t)}(i,e);var t,r,n,o=(r=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=f(r);if(n){var o=f(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return s(this,e)});function i(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),p(l(e=o.call(this)),"trustedOrigins",[]),d(l(e),m,{writable:!0,value:void 0}),d(l(e),b,{writable:!0,value:function(e){if(!e.data)return!1;var t=e.data,r=t.cobrowseio,n=t.event;return!!r&&!!n}}),d(l(e),g,{writable:!0,value:function(t){var r=t.origin;return!!a(e.trustedOrigins).find((function(e){return e===r}))}}),d(l(e),w,{writable:!0,value:function(e){return[].slice.call(document.getElementsByTagName("iframe")).find((function(t){return t.contentWindow===e.source}))}}),d(l(e),E,{writable:!0,value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"*";e.postMessage({cobrowseio:!0,event:t,data:r},n)}}),p(l(e),"sendToParent",(function(t,r){return h(l(e),m)?a(e.trustedOrigins).find((function(t){return t===h(l(e),m)}))?void h(l(e),E).call(l(e),window.parent,t,r,h(l(e),m)):v("not sending as parent origin is not trusted",h(l(e),m),e.trustedOrigins):v("not sending as parent origin is unknown")})),p(l(e),"broadcastToChildren",(function(t,r){[].slice.call(document.getElementsByTagName("iframe")).forEach((function(n){h(l(e),E).call(l(e),n.contentWindow,t,r)}))})),p(l(e),"sync",(function(t){v("iframe available",t,"issuing sync"),h(l(e),E).call(l(e),t.contentWindow,"sync")})),v("iframe bridge constructed in",document),window.addEventListener("message",(function(t){if(!h(l(e),b).call(l(e),t))return v("ignoring message, not a cobrowse message",t.data);var r,n,o,i=h(l(e),g).call(l(e),t),a=t.data,c=a.event,u=a.data;i&&t.source===window.parent&&(r=l(e),n=m,o=t.origin,function(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}(r,y(r,n,"set"),o),e.broadcastToChildren(c,u)),e.emit(c,u,{trusted:i,iframe:h(l(e),w).call(l(e),t)})})),e}return t=i,Object.defineProperty(t,"prototype",{writable:!1}),t}(i.EventEmitter);t.default=_},9356:function(e,t,r){r(444),r(1076),r(1e3),r(5547),r(1624),r(2047),r(8534),r(6486),r(6257),r(6941),r(3524),r(4843),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(1514),o=u(r(2833)),i=r(5064),a=r(7297),c=r(1362);function u(e){return e&&e.__esModule?e:{default:e}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var l=(0,u(r(9796)).default)("cbio.iframes"),f=new o.default,d=null;f.on("patch",(function(e,t){var r=t.iframe;if(l("Received patch event in",document),r){var o=e.document_id,i=r.__vdom;i&&i.document.id!==e.document_id&&(i=null),i||(i=new n.VirtualDOM(o)),i.applyPatch(e.patch),r.__vdom=i,f.emit("iframe_patched",r)}})),f.on("mouse",(function(e,t){var r=t.iframe;l("Received mouse event in",document),r&&(i.MouseTracking.setPosition(e.x,e.y,r),i.MouseTracking.setDown(e.down))})),f.on("control",(function(e,t){var r,n=t.trusted;if(l("Received control event in",document),!n)return l("Ignoring untrusted control event");c.ControlEvents.applyEvent.apply(c.ControlEvents,function(e){if(Array.isArray(e))return s(e)}(r=e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||function(e,t){if(e){if("string"==typeof e)return s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())})),f.on("sync",(function(e,t){var r=t.trusted;if(l("Received sync event in",document),!r)return l("Ignoring untrusted sync event");d||(l("Creating new frame loop in",document),(d=new a.FrameLoop).setSource(new a.DOMFrameSource((function(e){return f.sendToParent("patch",e),!0}))),d.start()),l("Invalidating frame in",document),d.invalidateFrame(),i.MouseTracking.onChange=function(e){return f.sendToParent("mouse",e)},i.MouseTracking.track(window)}));var p=f;t.default=p},2175:function(e,t,r){r(6257),r(1e3),r(6941),r(6486),r(2047),r(3524),r(444),r(1076),r(5547),r(1624),r(8534),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(4843);var n=i(r(4496)),o=i(r(2191));function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function c(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var u={en:n.default,fr:o.default},s=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.language=t}var t,r,n;return t=e,n=[{key:"getLocale",value:function(){var t,r=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return a(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,c=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return c=e.done,e},e:function(e){u=!0,i=e},f:function(){try{c||null==r.return||r.return()}finally{if(u)throw i}}}}(navigator.languages);try{for(r.s();!(t=r.n()).done;){var n=t.value;if(u[n])return new e(n)}}catch(e){r.e(e)}finally{r.f()}return new e("en")}},{key:"tr",value:function(e){return this.getLocale().translate(e)}}],(r=[{key:"translate",value:function(e){return u[this.language][e]||u.en[e]||e}}])&&c(t.prototype,r),n&&c(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.default=s},4496:function(e,t,r){r(4843),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default={DENY:"Deny",ALLOW:"Allow",END_SESSION:"End Cobrowse Session",REMOTE_CONTROL_REQUEST_TITLE:"Remote Control Request",REMOTE_CONTROL_REQUEST_DESCRIPTION:"A support agent would like to control this page. Do you want to allow this?",FULL_DEVICE_REQUEST_TITLE:"Screen Capture Request",FULL_DEVICE_REQUEST_DESCRIPTION:"A support agent would like to view your entire screen. Do you want to allow this?",SESSION_REQUEST_TITLE:"Support Request",SESSION_REQUEST_DESCRIPTION:"A support agent would like to temporarily use this web page with you. Do you want to allow this?"}},2191:function(e,t,r){r(4843),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default={DENY:"Refuser",ALLOW:"Autoriser",END_SESSION:"Terminer la session de Cobrowse",REMOTE_CONTROL_REQUEST_TITLE:"Demande de commande à distance",REMOTE_CONTROL_REQUEST_DESCRIPTION:"Un agent du soutien souhaiterait avoir le contrôle de cette page. Donnez-vous votre autorisation ?",FULL_DEVICE_REQUEST_TITLE:"Demande de capture d'écran",FULL_DEVICE_REQUEST_DESCRIPTION:"Un agent de soutien souhaiterait voir l'intégralité de votre écran. Donnez-vous votre autorisation ?",SESSION_REQUEST_TITLE:"Demande de soutien",SESSION_REQUEST_DESCRIPTION:"Un agent de soutien souhaiterait temporairement utiliser cette page Web avec vous. Donnez-vous votre autorisation ?"}},1930:function(e,t,r){r(444),r(1076),r(5547),r(1624),r(8534),r(6941),r(5128),r(4011),r(5226),r(9270),r(6507),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(3524),r(1e3),r(3275),r(6486),r(2047),r(5562),r(3600),r(6257),r(3114),r(6706),r(3133),r(4843);var n=r(1514),o=r(8541),i=s(r(9770)),a=s(r(5667)),c=s(r(3677)),u=s(r(6683));function s(e){return e&&e.__esModule?e:{default:e}}function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function f(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l(Object(r),!0).forEach((function(t){v(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function d(e){return function(e){if(Array.isArray(e))return p(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return p(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?p(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function h(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function y(e,t,r){return t&&h(e.prototype,t),r&&h(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function v(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var m=y((function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),v(this,"isLocalResource",(function(e){return!!(/^https?:\/\/localhost/.test(e)||/^https?:\/\/127.0.0.1/.test(e)||/^file:\/\//.test(e)||/^blob:/.test(e)||/^ionic:/.test(e))})),v(this,"_serializeAttributes",(function(e,t){if(e.nodeType===window.Node.ELEMENT_NODE&&e.attributes){var r={};Array.from(e.attributes||[]).forEach((function(t){"href"===t.nodeName||"src"===t.nodeName?r[t.nodeName]="string"==typeof e[t.nodeName]?e[t.nodeName]:t.nodeValue:r[t.nodeName]=t.nodeValue})),t.attributes=r}})),v(this,"_serializeSelection",(function(e,t){var r,n=null,a=e.getSelection();if(a&&"Range"===a.type&&!a.isCollapsed&&a.rangeCount>0)try{n=d(Array(a.rangeCount)).reduce((function(e,t,r){var n=a.getRangeAt(r),c=n.startOffset,u=n.endOffset,s=o.NodeRedaction.getRedactedBy(n.startContainer),l=o.NodeRedaction.getRedactedBy(n.endContainer),f=i.default.get(null!=s?s:n.startContainer),d=i.default.get(null!=l?l:n.endContainer);return e.push({start:f,end:d,startOffset:s?0:c,endOffset:l?0:u}),e}),[])}catch(e){console.warn("CobrowseIO: Could not serialize text selection",e)}else["INPUT","TEXTAREA"].includes(null===(r=e.activeElement)||void 0===r?void 0:r.tagName)&&e.activeElement.selectionStart!==e.activeElement.selectionEnd&&(n=!1);t.selection=n})),v(this,"_serializeDocument",(function(e,r){var n,o;e.nodeType===window.Node.DOCUMENT_NODE&&(r.url=e.location&&e.location.href,r.size={width:null===(n=e.documentElement)||void 0===n?void 0:n.clientWidth,height:null===(o=e.documentElement)||void 0===o?void 0:o.clientHeight},r.focus=i.default.get(e.activeElement),t._serializeSelection(e,r))})),v(this,"_serializeInput",(function(e,t){if("INPUT"===e.tagName||"TEXTAREA"===e.tagName||"OPTION"===e.tagName){t.value=e.value,"radio"!==e.type&&"checkbox"!==e.type||void 0===e.checked||(t.checked=e.checked),t.selection=null;try{var r=e.selectionStart,n=e.selectionEnd,o=e.selectionDirection;r!==n&&e===e.ownerDocument.activeElement&&(t.selection={start:r,end:n,direction:o})}catch(t){console.warn("Failed to serialise text selection for the input",e)}}})),v(this,"_serializeOption",(function(e,t){"OPTION"===e.tagName&&(t.selected=e.selected)})),v(this,"_serializeCSSSheet",(function(e){try{if(e.media&&e.media.length&&!window.matchMedia(e.media).matches)return""}catch(t){console.warn("CobrowseIO: Media detection for sheet failed:",t,"sheet",e)}return[].slice.call(e.cssRules).reduce((function(e,t){try{return e+t.cssText}catch(t){return e}}),"")})),v(this,"_serializeShadowRoot",(function(e,r){try{if(e.nodeType===window.Node.DOCUMENT_FRAGMENT_NODE){var n=[];d(e.adoptedStyleSheets||[]).forEach((function(e){n=n.concat([].slice.call(e.cssRules))})),r.css=t._serializeCSSSheet({cssRules:n})}}catch(t){console.warn("CobrowseIO: ShadowRoot serialize failed:",t.message,"for",e)}})),v(this,"_serializeCSS",(function(e,r){try{var n;("STYLE"===(null===(n=e.tagName)||void 0===n?void 0:n.toUpperCase())||"LINK"===e.tagName&&"stylesheet"===e.rel&&t.isLocalResource(e.href))&&e.sheet&&(r.css=t._serializeCSSSheet(e.sheet))}catch(t){console.warn("CobrowseIO: CSS serialize failed:",t.message,"for",e)}})),v(this,"_serializeCanvas",(function(e,t){if("CANVAS"===e.tagName&&!o.NodeRedaction.isRedacted(e))try{t.data=u.default.fromCanvas(e)}catch(t){e._cb_serialize_warned||(console.warn("Cobrowse failed to serialize canvas",e,"due to error",t),e._cb_serialize_warned=!0)}})),v(this,"_serializeImage",(function(e,r){if("IMG"===e.tagName&&!o.NodeRedaction.isRedacted(e)&&t.isLocalResource(e.src))try{r.attributes.src=u.default.fromImage(e)}catch(t){console.warn("CobrowseIO: Failed to serialize image",e)}})),v(this,"_serializeScroll",(function(e,t){var r,o;(0,n.isxdoc)(e)||(e.nodeType===window.Node.DOCUMENT_NODE?t.scroll={x:(null===(r=e.defaultView)||void 0===r?void 0:r.pageXOffset)||0,y:(null===(o=e.defaultView)||void 0===o?void 0:o.pageYOffset)||0}:(e.scrollWidth>e.clientWidth||e.scrollHeight>e.clientHeight)&&(t.scroll={x:e.scrollLeft||0,y:e.scrollTop||0}))})),v(this,"_serializeRedaction",(function(e,r,n){if(n.redactionState){delete r.value;var o=t._getSize(e);if(e instanceof Element){var i=window.getComputedStyle(e),a="inline"===i.display&&o.height>0?"inline-block":i.display;r.attributes=r.attributes&&{class:r.attributes.class,style:"".concat(r.attributes.style||"","; display: ").concat(a," !important;flex-basis: unset !important;")}}else 3===e.nodeType&&(r.nodeType=1,r.tagName="SPAN",r.attributes={style:o.height>0?"display: inline-block !important":void 0});r.redaction={height:"".concat(o.height,"px"),width:"".concat(o.width,"px")}}else r.redaction=void 0})),v(this,"_getSize",(function(e){if(e instanceof Element)return e.getBoundingClientRect();if(e instanceof Node){var t=document.createRange();return t.selectNodeContents(e),t.getBoundingClientRect()}return{height:0,width:0}})),v(this,"_serialize",(function(e,r){if(!i.default.get(e))throw console.error("node missing id",e,e.parentNode),new Error("node missing id",e);if(!a.default.isDOMNode(e))return e;if(!e.nodeType)throw new Error("node missing type",e);var n={id:i.default.get(e),nodeType:e.nodeType};return t._serializeShadowRoot(e,n),t._serializeAttributes(e,n),t._serializeImage(e,n),t._serializeDocument(e,n),t._serializeScroll(e,n),t._serializeInput(e,n),t._serializeOption(e,n),t._serializeCSS(e,n),t._serializeCanvas(e,n),t._serializeRedaction(e,n,r),e.tagName&&(n.tagName=e.tagName),e.nodeValue&&(n.content=e.nodeValue),n})),v(this,"serialize",(function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},u=o.NodeRedaction.getRedactionState(e);u&&r([]);var s="indirect"===u||[e].concat(d((0,n.parents)(e))).find((function(e){return c.default.isIgnored(e)}));return s?null:f(f({},t._serialize(e,{redactionState:u})),{},{childNodes:"direct"===u?[]:c.default.children(e).map((function(e){return a.default.isDOMNode(e)?{id:i.default.get(e)}:f({},e)}))})}))})),b=new m;t.default=b},9770:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(1624),r(4391),r(1e3),r(2047),r(8534),r(3114),r(4843);var n=i(r(453)),o=i(r(5667));function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function c(e,t,r){return t&&a(e.prototype,t),r&&a(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function u(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var s=new(c((function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),u(this,"_idMap",new Map),u(this,"_nodeMap",new Map),u(this,"_currentId",0),u(this,"_nextId",(function(){return t._currentId+=1,t._currentId})),u(this,"track",(function(e){if(!e)return null;if(!o.default.isDOMNode(e))return e.id;if(!t.get(e)){var r=e.nodeType===window.Node.DOCUMENT_NODE?(0,n.default)(5):"".concat(t.track(document),"-").concat(t._nextId());t._idMap.set(r,e),t._nodeMap.set(e,r)}return t._nodeMap.get(e)})),u(this,"get",(function(e){return e?o.default.isDOMNode(e)?t._nodeMap.get(e)||null:e.id:null})),u(this,"getById",(function(e){return e&&t._idMap.get(e)||null})),u(this,"forget",(function(e){t._idMap.delete(t.get(e)),t._nodeMap.delete(e)}))})));t.default=s},3677:function(e,t,r){r(4843),r(444),r(1076),r(5547),r(6257),r(3524),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(3600),r(6770),r(4011),r(1e3),r(6941),r(6486),r(2047),r(3114),r(1624),r(1157),r(8534);var n=r(1514),o=i(r(5667));function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function c(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function u(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function s(e,t){return function(e,t){return t.get?t.get.call(e):t.value}(e,l(e,t,"get"))}function l(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}var f=(0,i(r(9796)).default)("cbio.NodeTree"),d=new WeakMap,p=new(function(){function e(){var t,r,i,c=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),i={writable:!0,value:".__cbio_ignored"},function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t=this,r=d),r.set(t,i),u(this,"isIgnored",(function(e){var t;if(e&&e.matches&&e.matches(s(c,d)))return f("ignoring",e,"because child of classes"),!0;if([window.Node.COMMENT_NODE,window.Node.CDATA_SECTION_NODE,window.Node.ENTITY_REFERENCE_NODE,window.Node.ENTITY_NODE,window.Node.PROCESSING_INSTRUCTION_NODE,window.Node.NOTATION_NODE,window.Node.DOCUMENT_TYPE_NODE].includes(e.nodeType))return f("ignoring",e,"because of nodeType"),!0;if("SCRIPT"===e.tagName)return f("ignoring",e,"because of SCRIPT"),!0;var r=e.parentNode||e.defaultView&&e.defaultView.frameElement;return!(!r||"STYLE"!==(null===(t=r.tagName)||void 0===t?void 0:t.toUpperCase())||(f("ignoring",e,"because child of STYLE"),0))})),u(this,"children",(function(e){return o.default.isDOMNode(e)?"IFRAME"===e.tagName&&(0,n.isxdoc)(e)?e.__vdom?[e.__vdom.document]:[]:"IFRAME"!==e.tagName||(0,n.isxdoc)(e)?e.shadowRoot?"ShadowRoot"!==e.shadowRoot.constructor.name?Array.from(e.shadowRoot.childNodes).filter((function(e){return!c.isIgnored(e)})):[e.shadowRoot].concat((t=Array.from(e.childNodes),function(e){if(Array.isArray(e))return a(e)}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return a(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())).filter((function(e){return!c.isIgnored(e)})):Array.from(e.childNodes).filter((function(e){return!c.isIgnored(e)})):[e.contentWindow.document].filter((function(e){return!c.isIgnored(e)})):e.childNodes;var t})),u(this,"depthFirst",(function(e,t){return(0,n.depthFirst)(e,(function(e,r){return r(c.children(e)),t(e,r)}))}))}var t,r;return t=e,(r=[{key:"setIgnoredViews",value:function(e){if(Array.isArray(e))return t=this,r=d,n=".__cbio_ignored,".concat(e),function(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}(t,l(t,r,"set"),n),void f("set ignored view selectors",s(this,d));var t,r,n;f("not updating #ignoredViews due to arg to being an array",e)}}])&&c(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}());t.default=p},5667:function(e,t,r){function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function o(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(4843);var i=new(o((function e(){var t,r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),r=function(e){return!!e&&!(!e.childNodes||"function"!=typeof e.appendChild||void 0===e.nodeType)},(t="isDOMNode")in this?Object.defineProperty(this,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):this[t]=r})));t.default=i},7743:function(e,t,r){r(4843),Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"NodeSerializer",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"NodeTracker",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"NodeTree",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"NodeUtils",{enumerable:!0,get:function(){return o.default}});var n=c(r(9770)),o=c(r(5667)),i=c(r(3677)),a=c(r(1930));function c(e){return e&&e.__esModule?e:{default:e}}},2966:function(e,t,r){r(4843),r(6257),r(6941),r(3524),r(444),r(1076),r(5547),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(887),r(1624),r(1e3),r(8719),r(2047),r(8534),r(6486),r(1157),r(9280),r(6706);var n,o=r(1514);function i(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=a(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,c=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return c=e.done,e},e:function(e){u=!0,i=e},f:function(){try{c||null==r.return||r.return()}finally{if(u)throw i}}}}function a(e,t){if(e){if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function s(e,t){d(e,t),t.add(e)}function l(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function f(e,t,r){d(e,t),t.set(e,r)}function d(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function p(e,t){return function(e,t){return t.get?t.get.call(e):t.value}(e,v(e,t,"get"))}function h(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}function y(e,t,r){return function(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}(e,v(e,t,"set"),r),r}function v(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}var m=(0,((n=r(9796))&&n.__esModule?n:{default:n}).default)("cbio.NodeRedaction"),b=new WeakMap,g=new WeakMap,w=new WeakSet,E=new WeakSet,_=new WeakSet,O=new WeakSet;function S(e){return!!e&&("OBJECT"===e.tagName?(m("redacted",e,"because of OBJECT"),!0):"EMBED"===e.tagName?(m("redacted",e,"because of EMBED"),!0):null)}function j(e){var t,r=this;return(t=(0,o.parents)(e),function(e){if(Array.isArray(e))return c(e)}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||a(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).find((function(e){return h(r,O,x).call(r,e)}))}function x(e){return!!(p(this,g)&&e.matches&&e.matches(p(this,g)))&&(m("redacted",e,"because of selectors"),!0)}var k=new(function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),s(this,O),s(this,_),s(this,E),s(this,w),f(this,b,{writable:!0,value:void 0}),f(this,g,{writable:!0,value:void 0}),l(this,"setIndex",(function(e){y(t,b,e)})),l(this,"setSelectors",(function(e){y(t,g,e.join(","))})),l(this,"getRedactionState",(function(e){var r=t.getRedactedBy(e);return!!r&&(r===e?"direct":"indirect")})),l(this,"getRedactedBy",(function(e){var r=h(t,w,S).call(t,e);if(null!==r)return r?e:null;var n=h(t,_,j).call(t,e);return n||(p(t,b)&&p(t,b).getRedactedBy(e)||(h(t,O,x).call(t,e)?e:null))})),l(this,"isNodeRedacted",(function(e){return"direct"===t.getRedactionState(e)})),l(this,"isRedacted",(function(e){var r=h(t,w,S).call(t,e);return null!==r?r:h(t,O,x).call(t,e)||!!t.getRedactionState(e)}))}var t,r;return t=e,(r=[{key:"notifyChanges",value:function(e){var t,r=new Set,n=i(e);try{for(n.s();!(t=n.n()).done;){var o=t.value,a=this.getRedactedBy(o.target);a&&a!==o.target&&r.add(a)}}catch(e){n.e(e)}finally{n.f()}var c,u=i((p(this,b)&&p(this,b).notifyChanges(e)||{modified:[]}).modified);try{for(u.s();!(c=u.n()).done;){var s=c.value;r.add(s)}}catch(e){u.e(e)}finally{u.f()}return{modified:Array.from(r)}}}])&&u(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}());t.default=k},981:function(e,t,r){r(4843),r(444),r(1076),r(5547),r(6486),r(6257),r(6941),r(3524),Object.defineProperty(t,"__esModule",{value:!0}),t.RedactionIndex=void 0,r(1624),r(1e3),r(8719),r(2047),r(8534),r(3114),r(4011),r(5793),r(1861),r(1157),r(9280),r(6706),r(887);var n,o=(n=r(3677))&&n.__esModule?n:{default:n};function i(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=c(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function a(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||c(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){if(e){if("string"==typeof e)return u(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function f(e,t){p(e,t),t.add(e)}function d(e,t,r){p(e,t),t.set(e,r)}function p(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function h(e,t){return function(e,t){return t.get?t.get.call(e):t.value}(e,m(e,t,"get"))}function y(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}function v(e,t,r){return function(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}(e,m(e,t,"set"),r),r}function m(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}var b=new WeakMap,g=new WeakMap,w=new WeakMap,E=new WeakSet,_=new WeakSet,O=new WeakSet,S=new WeakSet,j=new WeakSet,x=new WeakSet,k=new WeakSet,P=new WeakSet,T=new WeakSet,L=new WeakSet,C=new WeakSet,I=new WeakSet,M=function(){function e(){var t,r,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},u=c.document,l=void 0===u?window.document:u;if(s(this,e),f(this,I),f(this,C),f(this,L),f(this,T),f(this,P),f(this,k),f(this,x),f(this,j),f(this,S),f(this,O),f(this,_),f(this,E),d(this,b,{writable:!0,value:void 0}),d(this,g,{writable:!0,value:void 0}),d(this,w,{writable:!0,value:new Set}),n.length>0&&v(this,b,(t=y(this,I,B)).call.apply(t,[this].concat(a(n)))),o.length>0&&v(this,g,(r=y(this,I,B)).call.apply(r,[this].concat(a(o)))),y(this,_,A).call(this)){var p,m=i(y(this,T,G).call(this,l));try{for(m.s();!(p=m.n()).done;){var M=p.value;h(this,w).add(M)}}catch(e){m.e(e)}finally{m.f()}}}var t,r;return t=e,(r=[{key:"getRedactedBy",value:function(e){if(!y(this,_,A).call(this))return null;if(y(this,S,D).call(this,e)||y(this,P,z).call(this,e))return null;var t=y(this,x,F).call(this,e);return t?y(this,P,z).call(this,e.parentNode)?e:t:y(this,O,R).call(this,e)?e:null}},{key:"notifyChanges",value:function(e){var t=this;if(!y(this,_,A).call(this))return{modified:[]};var r,n=new Set,c=i(e);try{for(c.s();!(r=c.n()).done;){var u=r.value;if(!o.default.isIgnored(u.target)){var s=y(this,T,G).call(this,u.target),l=s.length>0;if("attributes"===u.type){var f,d=i(s);try{for(d.s();!(f=d.n()).done;){var p=f.value;n.add(p)}}catch(e){d.e(e)}finally{d.f()}var v=y(this,S,D).call(this,u.target);h(this,w).has(u.target)!==!!v&&(n.add(u.target.parentNode),v?h(this,w).add(u.target):h(this,w).delete(u.target))}else if("childList"===u.type){var m,b=a(u.addedNodes).filter((function(e){return!o.default.isIgnored(e)})),g=a(u.removedNodes).filter((function(e){return!o.default.isIgnored(e)})),O=b.filter((function(e){return y(t,S,D).call(t,e)})).concat(b.flatMap((function(e){return a(y(t,T,G).call(t,e))}))),j=g.filter((function(e){return y(t,S,D).call(t,e)})).concat(g.flatMap((function(e){return a(y(t,T,G).call(t,e))}))),x=i(O);try{for(x.s();!(m=x.n()).done;){var k=m.value;h(this,w).add(k)}}catch(e){x.e(e)}finally{x.f()}var P,L=i(j);try{for(L.s();!(P=L.n()).done;){var C=P.value;h(this,w).delete(C)}}catch(e){L.e(e)}finally{L.f()}if(!n.has(u.target)){var I=l&&O.length>0,M=!l&&j.length>0;(I||M)&&n.add(u.target)}}}}}catch(e){c.e(e)}finally{c.f()}return{modified:y(this,E,N).call(this,n).filter((function(e){return!o.default.isIgnored(e)}))}}}])&&l(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function N(e){var t=this,r=new Set(a(e).flatMap((function(e){return[e].concat(a(y(t,L,U).call(t,e)))})));return a(r).flatMap((function(e){return a(e.childNodes||[])}))}function A(){return!!h(this,b)}function R(e){return h(this,b)&&e.matches&&e.matches(h(this,b))}function D(e){return h(this,g)&&e.matches&&e.matches(h(this,g))}function F(e){var t=this,r=y(this,k,W).call(this,e);return r?y(this,L,U).call(this,e,r).find((function(e){return y(t,P,z).call(t,e.parentNode)}))||r:null}function W(e){var t=e&&e.parentNode&&e.parentNode.closest&&e.parentNode.closest(y(this,I,B).call(this));return t&&y(this,C,Y).call(this,t,h(this,b))?t:null}function z(e){return h(this,g)&&"HTML"!==e.tagName&&e.querySelector&&e.querySelector(h(this,g))}function G(e){return h(this,g)&&e.querySelectorAll?e.querySelectorAll(h(this,g)):[]}function U(e,t){for(var r=[];e.parentNode&&e.parentNode!==t;)r.push(e.parentNode),e=e.parentNode;return r}function Y(e,t){return e&&e.matches&&e.matches(t)}function B(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0===t.length?[h(this,b),h(this,g)]:t).filter((function(e){return e})).join(",")}t.RedactionIndex=M},8541:function(e,t,r){r(4843),Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"NodeRedaction",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"RedactionIndex",{enumerable:!0,get:function(){return i.RedactionIndex}});var n,o=(n=r(2966))&&n.__esModule?n:{default:n},i=r(981)},2585:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(5226),r(3600),r(6770),r(1e3),r(3275),r(1624),r(8719),r(2047),r(8534),r(4843),r(2449);var n=a(r(1320)),o=r(7743),i=r(8541);function a(e){return e&&e.__esModule?e:{default:e}}function c(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function u(e,t,r){return t&&c(e.prototype,t),r&&c(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function s(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var l=(0,a(r(9796)).default)("cbio.ControlEvents"),f=new(u((function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),s(this,"_applyScroll",(function(e,t){var r=e.defaultView||e;r.scrollTo?r.scrollTo(t.x,t.y):(r.scrollTop=t.y,r.scrollLeft=t.x)})),s(this,"_updateCheckbox",(function(e,t){var r=t.checked;if(void 0!==r&&"INPUT"===e.tagName&&void 0!==e.checked){var n=Object.getOwnPropertyDescriptor(e.constructor.prototype,"checked");n&&n.set.call(e,r)}})),s(this,"_updateInnerHTML",(function(e,t){var r=t.innerHTML;void 0!==r&&(e.innerHTML=n.default.sanitize(r))})),s(this,"_updateValue",(function(e,t){var r=t.value;if(void 0!==r){var n=Object.getOwnPropertyDescriptor(e.constructor.prototype,"value");n&&n.set.call(e,r)}"TEXTAREA"===e.tagName&&o.NodeTracker.track(e.childNodes[0])})),s(this,"_updateTarget",(function(e,r){t._updateValue(e,r.target),t._updateCheckbox(e,r.target),t._updateInnerHTML(e,r.target)})),s(this,"_generateMouse",(function(e,t){return new MouseEvent(t.state,{clientX:t.x*window.innerWidth,clientY:t.y*window.innerHeight,bubbles:!0,cancelable:!0,composed:!0,view:e.ownerDocument&&e.ownerDocument.defaultView||window})})),s(this,"_generatePointer",(function(e,t){return new PointerEvent(t.state,{clientX:t.x*window.innerWidth,clientY:t.y*window.innerHeight,pointerId:t.pointerId,width:t.width,height:t.height,pressure:t.pressure,tangentialPressure:t.tangentialPressure,tiltX:t.tiltX,tiltY:t.tiltY,twist:t.twist,pointerType:t.pointerType,isPrimary:t.isPrimary,bubbles:!0,cancelable:!0,composed:!0,view:e.ownerDocument&&e.ownerDocument.defaultView||window})})),s(this,"_generateKeypress",(function(e,t){return new KeyboardEvent(t.state,{key:t.key,code:t.code,ctrlKey:t.ctrlKey,shiftKey:t.shiftKey,altKey:t.altKey,metaKey:t.metaKey,charCode:t.charCode,keyCode:t.keyCode,which:t.which,bubbles:!0,cancelable:!0,composed:!0,view:e.ownerDocument&&e.ownerDocument.defaultView||window})})),s(this,"_generateFocus",(function(e,t){return new FocusEvent(t.state,{bubbles:!1,cancelable:!1,composed:!0,view:e.ownerDocument&&e.ownerDocument.defaultView||window})})),s(this,"_generateChange",(function(e,t){return new CustomEvent(t.state,{bubbles:!0,cancelable:!1,composed:!0,view:e.ownerDocument&&e.ownerDocument.defaultView||window})})),s(this,"_generateInput",(function(e,t){return new CustomEvent(t.state,{bubbles:!0,cancelable:!1,composed:!0,view:e.ownerDocument&&e.ownerDocument.defaultView||window,inputType:t.inputType,data:t.data})})),s(this,"_generateSelection",(function(e,t){return new CustomEvent("selection",{bubbles:!0,cancelable:!1,composed:!0,view:e.ownerDocument&&e.ownerDocument.defaultView||window,selection:t.selection})})),s(this,"_generateEvent",(function(e,r,n){switch(n.state.includes("move")&&l("generate",n,"on",r),e){case"keypress":return t._generateKeypress(r,n);case"mouse":return t._generateMouse(r,n);case"pointer":return t._generatePointer(r,n);case"change":return t._generateChange(r,n);case"input":return t._generateInput(r,n);case"focus":return t._generateFocus(r,n);case"select":return t._generateSelection(r,n);default:return console.warn("CobrowseIO: unknown event type",e,n),null}})),s(this,"_setSelection",(function(e,t){var r=t.selection;if(!(e.__cobrowse_user_selection_timestamp>Date.now()-100)&&e.getSelection())try{r?(e.__last_agent_selection_ts=Date.now(),e.getSelection().removeAllRanges(),r.forEach((function(t){var r=t.start,n=t.startOffset,i=t.end,a=t.endOffset,c=document.createRange(),u=o.NodeTracker.getById(r),s=o.NodeTracker.getById(i);c.setStart(u,n),c.setEnd(s,a),e.getSelection().addRange(c)}))):e.getSelection().removeAllRanges()}catch(e){console.warn("Failed to apply selection",r,e)}})),s(this,"_setInputSelection",(function(e,t){var r=t.selection;if(!(e.ownerDocument.__cobrowse_user_selection_timestamp>Date.now()-100)&&["text","textarea","search","url"].includes(e.type))try{if(e.ownerDocument.__last_agent_selection_ts=Date.now(),r){var n=r.start,o=r.end,i=r.direction;e.focus(),e.setSelectionRange(n,o,i)}else e.getRootNode({composed:!0}).activeElement===e&&e.setSelectionRange(null,null)}catch(e){console.warn("Failed to select text",e)}})),s(this,"applyEvent",(function(e,r){if(!r.target)return null;var n=o.NodeTracker.getById(r.target.id);if(!n)return null;if(i.NodeRedaction.isRedacted(n))return null;try{var a;if("scroll"===e)return t._applyScroll(n,r);if(null!==(a=n._cobrowse_suppress_events)&&void 0!==a&&a.has(r.state))return n._cobrowse_suppress_events.delete(r.state),0===n._cobrowse_suppress_events.size&&delete n._cobrowse_suppress_events.size,null;var c=t._generateEvent(e,n,r);return c&&(n.dispatchEvent(c)?(["keydown","keypress","input"].includes(r.state)&&t._updateTarget(n,r),["selectionchange"].includes(r.state)&&t._setSelection(n,r),["select"].includes(r.state)&&t._setInputSelection(n,r)):"keydown"===r.state?n._cobrowse_suppress_events=new Set(["keypress","input"]):"keypress"===r.state&&(n._cobrowse_suppress_events=new Set(["input"]))),c}catch(t){return console.warn("Error while injecting event",e,t),null}}))})));t.default=f},1362:function(e,t,r){r(4843),Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ControlEvents",{enumerable:!0,get:function(){return o.default}});var n,o=(n=r(2585))&&n.__esModule?n:{default:n}},7454:function(e,t,r){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}var o;function i(e,t){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},i(e,t)}function a(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function c(e){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},c(e)}r(1e3),r(9616),r(4843),r(444),r(1076),r(5547),r(1624),r(2047),r(8534),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(6941),r(4277),r(3064);var u=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&i(e,t)}(u,e);var t,r,n,o=(r=u,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=c(r);if(n){var o=c(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return a(this,e)});function u(e,t,r){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),(n=o.call(this,t,r)).id=e,n.name="APIError",n}return t=u,Object.defineProperty(t,"prototype",{writable:!1}),t}(((o=r(9822))&&o.__esModule?o:{default:o}).default);t.default=u},9822:function(e,t,r){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function i(e){var t="function"==typeof Map?new Map:void 0;return i=function(e){if(null===e||(r=e,-1===Function.toString.call(r).indexOf("[native code]")))return e;var r;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return a(e,arguments,s(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),u(n,e)},i(e)}function a(e,t,r){return a=c()?Reflect.construct.bind():function(e,t,r){var n=[null];n.push.apply(n,t);var o=new(Function.bind.apply(e,n));return r&&u(o,r.prototype),o},a.apply(null,arguments)}function c(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function u(e,t){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},u(e,t)}function s(e){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(e)}r(3257),r(1e3),r(7285),r(9616),r(1624),r(4391),r(2047),r(8534),r(4843),r(444),r(1076),r(5547),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(6941),r(4277),r(3064);var l=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&u(e,t)}(a,e);var t,r,n,i=(t=a,r=c(),function(){var e,n=s(t);if(r){var i=s(this).constructor;e=Reflect.construct(n,arguments,i)}else e=n.apply(this,arguments);return o(this,e)});function a(e,t){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(r=i.call(this,t)).status=e,r.name="HTTPError",r}return n=a,Object.defineProperty(n,"prototype",{writable:!1}),n}(i(Error));t.default=l},5388:function(e,t,r){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}r(4277),r(3064),r(9616),r(4843),r(444),r(4011),r(5226),r(3275),r(9270),r(6507),r(1076),r(5547),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(1e3),r(7285),r(5128),r(1624),r(2047),r(1157),r(8534),r(9280);var o=r(1239),i=c(r(136)),a=c(r(7454));function c(e){return e&&e.__esModule?e:{default:e}}function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u(Object(r),!0).forEach((function(t){l(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function l(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function f(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d(e,t)}function p(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return h(e)}function h(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},y(e)}function v(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function m(e,t){var r=function(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}(e,t);return function(e,t){return t.get?t.get.call(e):t.value}(e,r)}function b(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}var g=new WeakMap,w=new WeakSet,E=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&d(e,t)}(u,e);var t,r,n,o,a,c=(o=u,a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=y(o);if(a){var r=y(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return p(this,e)});function u(){var e,t,r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),v(t=h(e=c.call(this)),r=w),r.add(t),function(e,t,r){v(e,t),t.set(e,{writable:!0,value:{}})}(h(e),g),e._resource={},e}return t=u,r=[{key:"resource",get:function(){return this._resource}},{key:"url",value:function(){throw new Error("url() must be implemented")}},{key:"id",value:function(){return this.field("id")}},{key:"field",value:function(e){return(this._resource||{})[e]}},{key:"cache",value:function(e){this._resource=s(s({},this._resource),e)}},{key:"fetch",value:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(){var e=this;return fetch(this.url(),{headers:this.headers()}).then(b(this,w,_)).then((function(e){return e.json()})).then((function(t){return e.updateResource(t)}))}))},{key:"update",value:function(e){var t=this;return e&&Object.keys(e)&&(0,i.default)(this._resource,e)?this:fetch(this.url(),{method:this.id()?"PUT":"POST",headers:this.headers(),body:JSON.stringify(e)}).then(b(this,w,_)).then((function(e){return e.json()})).then((function(e){return t.updateResource(e)}))}},{key:"destroy",value:function(){var e=this;return fetch(this.url(),{method:"DELETE",headers:this.headers()}).then(b(this,w,_)).then((function(){return e.updateResource({})}))}},{key:"updateResource",value:function(e){return this._resource=e,this.emit("updated",this),this}},{key:"headers",value:function(){return s(s({},u.headers()),m(this,g))}},{key:"setHeader",value:function(e,t){m(this,g)[e]=t}},{key:"getHeader",value:function(e){return this.headers()[e]}}],n=[{key:"headers",value:function(){return this._globalHeaders}},{key:"setHeader",value:function(e,t){this._globalHeaders||(this._globalHeaders={}),this._globalHeaders[e]=t}},{key:"getHeader",value:function(e){return this._globalHeaders&&this._globalHeaders[e]}},{key:"api",get:function(){return this._api},set:function(e){this._api=e}}],r&&f(t.prototype,r),n&&f(t,n),Object.defineProperty(t,"prototype",{writable:!1}),u}(o.EventEmitter);function _(e){return e.status>=400?e.json().then((function(t){throw new a.default(t.id,e.status,t.message)})):e}t.default=E},8302:function(e,t,r){r(4843),Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"RESTResource",{enumerable:!0,get:function(){return o.default}});var n,o=(n=r(5388))&&n.__esModule?n:{default:n}},4914:function(e,t,r){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}r(4843),r(4277),r(3064),r(1112),r(5226),r(9616),r(5128),r(444),r(4011),r(3275),r(9270),r(6507),r(1076),r(5547),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(1e3),r(3114),r(887),r(6257),r(7285),r(1624),r(2047),r(8534),r(6955),r(8927),r(1157);var o,i=r(5828),a=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var r=s(t);if(r&&r.has(e))return r.get(e);var o={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var c=i?Object.getOwnPropertyDescriptor(e,a):null;c&&(c.get||c.set)?Object.defineProperty(o,a,c):o[a]=e[a]}return o.default=e,r&&r.set(e,o),o}(r(7368)),c=r(8302),u=r(5161);function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(s=function(e){return e?r:t})(e)}function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function f(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l(Object(r),!0).forEach((function(t){g(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function d(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function p(e,t){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},p(e,t)}function h(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return y(e)}function y(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v(){return v="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=m(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}},v.apply(this,arguments)}function m(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=b(e)););return e}function b(e){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},b(e)}function g(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function w(e,t,r){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,r)}function E(e,t){return function(e,t){return t.get?t.get.call(e):t.value}(e,O(e,t,"get"))}function _(e,t,r){return function(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}(e,O(e,t,"set"),r),r}function O(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}var S=(0,((o=r(9796))&&o.__esModule?o:{default:o}).default)("cbio.Session"),j=new WeakMap,x=new WeakMap,k=new WeakMap,P=new WeakMap,T=new WeakMap,L=new WeakMap,C=new WeakMap,I=new WeakMap,M=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}(s,e);var t,r,n,o,c=(n=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=b(n);if(o){var r=b(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return h(this,e)});function s(e){var t,r,n;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),w(y(n=c.call(this)),j,{writable:!0,value:void 0}),w(y(n),x,{writable:!0,value:void 0}),w(y(n),k,{writable:!0,value:function(e){n.setHeader("X-CobrowseDeviceToken",e)}}),w(y(n),P,{writable:!0,value:function(){return n.getHeader("X-CobrowseDeviceToken")}}),g(y(n),"activate",(function(){return S("activate session"),n.update({state:"active",device:u.Device.info,custom_data:E(y(n),j).customData})})),g(y(n),"end",(function(){return S("end session"),n.update({state:"ended"})})),g(y(n),"code",(function(){return n.field("code")})),g(y(n),"state",(function(){return n.field("state")})),g(y(n),"isActive",(function(){return"active"===n.state()})),g(y(n),"isAuthorizing",(function(){return"authorizing"===n.state()})),g(y(n),"isPending",(function(){return"pending"===n.state()})),g(y(n),"isEnded",(function(){return"ended"===n.state()})),g(y(n),"selectors",(function(){var e=n.field("redaction_selectors");return Array.isArray(e)?e:[]})),g(y(n),"agent",(function(){return n.field("agent")||!1})),g(y(n),"requireConsent",(function(){return n.field("require_consent")})),g(y(n),"fullDevice",(function(){return!0===n.field("full_device")||"on"===n.field("full_device")||"requested"===n.field("full_device")})),g(y(n),"setFullDevice",(function(e){return E(y(n),x).toggle(["laser","drawing","pointer","scroll","select","keypress","cursor"],"on"!==e),n.update({full_device:e})})),g(y(n),"update",(function(e){return v((t=y(n),b(s.prototype)),"update",t).call(t,f({capabilities:E(y(n),x).toArray()},e))})),g(y(n),"scale",(function(){return n.field("scale")||.5})),g(y(n),"remoteControl",(function(){return n.field("remote_control")||"on"})),g(y(n),"setRemoteControl",(function(e){return n.update({remote_control:e})})),g(y(n),"allowRemoteControl",(function(){return"on"===n.remoteControl()})),g(y(n),"updateResource",(function(e){var t=n.isEnded();return v((r=y(n),b(s.prototype)),"updateResource",r).call(r,e),n.isEnded()&&!t&&(n.emit("ended",y(n)),n.removeAllListeners()),y(n)})),w(y(n),T,{writable:!0,value:(0,a.protect)(y(n),"serialize",(function(){return f(f({},n.resource),{},{_locals:{token:E(y(n),P).call(y(n))}})}))}),w(y(n),L,{writable:!0,value:(0,a.protect)(y(n),"deserialize",(function(e){var t=e._locals||{};return delete e._locals,E(y(n),k).call(y(n),t.token),n.updateResource(e),y(n)}))}),w(y(n),C,{writable:!0,value:(0,a.protect)(y(n),"compress",(function(){return"".concat(n.resource.id,":").concat(E(y(n),P).call(y(n)))}))}),w(y(n),I,{writable:!0,value:(0,a.protect)(y(n),"decompress",(function(e){var t=e.split(":");return E(y(n),L).call(y(n),{_locals:{token:t[t.length-1]},id:t.slice(0,-1).join(":")}),y(n)}))}),!e)throw new Error("Session delegate is required");_(y(n),j,e),_(y(n),x,e[a.default].getCapabilities());var o=Math.ceil(Date.now()/36e5);return E(y(n),k).call(y(n),(0,i.v5)(o+"",u.Device.deviceToken())),n}return t=s,(r=[{key:"capabilities",get:function(){return E(this,x)}},{key:"url",value:function(){var e=this.id()||this.code();return new URL("api/1/sessions".concat(e?"/".concat(e):""),s.api).toString()}}])&&d(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),s}(c.RESTResource);t.default=M},1826:function(e,t,r){r(4843),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(5220),r(1e3),r(3600),r(6770),r(5562),r(4011),r(5128),r(3275),r(1624),r(2047),r(1157),r(8534);var n=r(3403),o=r(5011);function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function c(e,t){return function(e,t){return t.get?t.get.call(e):t.value}(e,u(e,t,"get"))}function u(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}var s=new WeakMap,l=function(){function e(t){var r,n,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),o={writable:!0,value:{}},function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(r=this,n=s),n.set(r,o),this.fill(t)}var t,r;return t=e,(r=[{key:"allowed",value:function(e){return this.toArray().some((function(t){return Array.isArray(e)?e.includes(t):e===t}))}},{key:"forbidden",value:function(e,t){return!this.allowed(e,t)}},{key:"allowsEvent",value:function(e){var t,r=(i(t={},o.SESSION_EVENT_TYPE_MOUSE,["mousedown","mouseup","click","dblclick","pointerdown","pointerup"].includes(e.state)?n.SESSION_CAPABILITY_TYPE_POINTER:n.SESSION_CAPABILITY_TYPE_CURSOR),i(t,o.SESSION_EVENT_TYPE_TOUCH,n.SESSION_CAPABILITY_TYPE_POINTER),i(t,o.SESSION_EVENT_TYPE_POINTER,n.SESSION_CAPABILITY_TYPE_POINTER),i(t,o.SESSION_EVENT_TYPE_FOCUS,[n.SESSION_CAPABILITY_TYPE_KEYPRESS,n.SESSION_CAPABILITY_TYPE_POINTER]),i(t,o.SESSION_EVENT_TYPE_KEYPRESS,n.SESSION_CAPABILITY_TYPE_KEYPRESS),i(t,o.SESSION_EVENT_TYPE_SCROLL,n.SESSION_CAPABILITY_TYPE_SCROLL),i(t,o.SESSION_EVENT_TYPE_CHANGE,[n.SESSION_CAPABILITY_TYPE_KEYPRESS,n.SESSION_CAPABILITY_TYPE_POINTER]),i(t,o.SESSION_EVENT_TYPE_INPUT,[n.SESSION_CAPABILITY_TYPE_KEYPRESS,n.SESSION_CAPABILITY_TYPE_POINTER]),i(t,o.SESSION_EVENT_TYPE_LASER,n.SESSION_CAPABILITY_TYPE_LASER),i(t,o.SESSION_EVENT_TYPE_DRAWING,n.SESSION_CAPABILITY_TYPE_DRAWING),i(t,o.SESSION_EVENT_TYPE_SELECT,n.SESSION_CAPABILITY_TYPE_SELECT),t)[e.type];return this.allowed(r)}},{key:"fill",value:function(e){return t=this,r=s,n=e.reduce((function(e,t){return e[t]=!0,e}),{}),function(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}(t,u(t,r,"set"),n),this;var t,r,n}},{key:"all",value:function(){return c(this,s)}},{key:"toArray",value:function(){var e=this;return Object.keys(c(this,s)).filter((function(t){return c(e,s)[t]}))}},{key:"toggle",value:function(e,t){var r=this;return Array.isArray(e)||(e=[e]),e.filter((function(e){return e in c(r,s)})).forEach((function(e){c(r,s)[e]=t})),this}},{key:"allow",value:function(e){return this.toggle(e,!0)}},{key:"forbid",value:function(e){return this.toggle(e,!1)}}])&&a(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.default=l},3403:function(e,t,r){r(4843),Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.SESSION_CAPABILITY_TYPE_SELECT=t.SESSION_CAPABILITY_TYPE_SCROLL=t.SESSION_CAPABILITY_TYPE_POINTER=t.SESSION_CAPABILITY_TYPE_LASER=t.SESSION_CAPABILITY_TYPE_KEYPRESS=t.SESSION_CAPABILITY_TYPE_FULL_DEVICE=t.SESSION_CAPABILITY_TYPE_DRAWING=t.SESSION_CAPABILITY_TYPE_CURSOR=void 0;var n="pointer";t.SESSION_CAPABILITY_TYPE_POINTER=n;var o="scroll";t.SESSION_CAPABILITY_TYPE_SCROLL=o;var i="select";t.SESSION_CAPABILITY_TYPE_SELECT=i;var a="keypress";t.SESSION_CAPABILITY_TYPE_KEYPRESS=a;var c="drawing";t.SESSION_CAPABILITY_TYPE_DRAWING=c;var u="laser";t.SESSION_CAPABILITY_TYPE_LASER=u;var s="full_device";t.SESSION_CAPABILITY_TYPE_FULL_DEVICE=s;var l="cursor";t.SESSION_CAPABILITY_TYPE_CURSOR=l;var f=[n,o,i,a,c,u,s,l];t.default=f},2001:function(e,t,r){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}r(4843),r(444),r(1076),r(5547),r(8496),r(4802),r(2112),r(6353),r(3064),r(3275),r(6941),r(4277),r(6257),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(1624),r(1e3),r(2047),r(1157),r(8534);var o=d(r(1713)),i=r(7297),a=r(5064),c=r(3042),u=r(1362),s=r(8541),l=d(r(9796)),f=r(3403);function d(e){return e&&e.__esModule?e:{default:e}}function p(){p=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var i=t&&t.prototype instanceof h?t:h,a=Object.create(i.prototype),c=new k(n||[]);return o(a,"_invoke",{value:O(e,r,c)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var d={};function h(){}function y(){}function v(){}var m={};s(m,a,(function(){return this}));var b=Object.getPrototypeOf,g=b&&b(b(P([])));g&&g!==t&&r.call(g,a)&&(m=g);var w=v.prototype=h.prototype=Object.create(m);function E(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function i(o,a,c,u){var s=f(e[o],e,a);if("throw"!==s.type){var l=s.arg,d=l.value;return d&&"object"==n(d)&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){i("next",e,c,u)}),(function(e){i("throw",e,c,u)})):t.resolve(d).then((function(e){l.value=e,c(l)}),(function(e){return i("throw",e,c,u)}))}u(s.arg)}var a;o(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){i(e,r,t,n)}))}return a=a?a.then(n,n):n()}})}function O(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=S(a,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=f(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,S(e,t),"throw"===t.method))return d;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var n=f(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,d;var o=n.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function P(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:T}}function T(){return{value:void 0,done:!0}}return y.prototype=v,o(w,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=s(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,u,"GeneratorFunction")),e.prototype=Object.create(w),e},e.awrap=function(e){return{__await:e}},E(_.prototype),s(_.prototype,c,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(l(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},E(w),s(w,u,"Generator"),s(w,a,(function(){return this})),s(w,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=P,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),x(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:P(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}function h(e,t,r,n,o,i,a){try{var c=e[i](a),u=c.value}catch(e){return void r(e)}c.done?t(u):Promise.resolve(u).then(n,o)}function y(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){h(i,n,o,a,c,"next",e)}function c(e){h(i,n,o,a,c,"throw",e)}a(void 0)}))}}function v(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function m(e,t,r){return t&&v(e.prototype,t),r&&v(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function b(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function g(e,t,r){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,r)}function w(e,t){return function(e,t){return t.get?t.get.call(e):t.value}(e,_(e,t,"get"))}function E(e,t,r){return function(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}(e,_(e,t,"set"),r),r}function _(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}var O=(0,l.default)("cbio.SessionContext"),S=new WeakMap,j=new WeakMap,x=new WeakMap,k=new WeakMap,P=new WeakMap,T=new WeakMap,L=new WeakMap,C=new WeakMap,I=new WeakMap,M=new WeakMap,N=new WeakMap,A=new WeakMap,R=new WeakMap,D=new WeakMap,F=new WeakMap,W=new WeakMap,z=new WeakMap,G=new WeakMap,U=new WeakMap,Y=new WeakMap,B=new WeakMap,q=new WeakMap,V=new WeakMap,H=new WeakMap,K=new WeakMap,X=new WeakMap,$=m((function e(t,r,n){var l,d,h,v,m,_=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),g(this,S,{writable:!0,value:void 0}),g(this,j,{writable:!0,value:void 0}),g(this,x,{writable:!0,value:new i.FrameLoop}),g(this,k,{writable:!0,value:void 0}),g(this,P,{writable:!0,value:void 0}),g(this,T,{writable:!0,value:void 0}),b(this,"invalidateFrames",(function(){w(_,x).isRunning()&&w(_,x).invalidateFrame()})),b(this,"destroy",(function(){O("destroy session context"),w(_,G).call(_),w(_,S)&&w(_,S).close(),E(_,S,null),w(_,x)&&w(_,x).destroy(),E(_,x,null),a.WindowTracking.off("activate",w(_,B)),window.removeEventListener("focus",w(_,B),{capture:!0,passive:!0}),window.removeEventListener("hashchange",w(_,q),{capture:!0,passive:!0}),a.MouseTracking.onChange===w(_,K)&&(a.MouseTracking.onChange=null),_.session&&(_.session.removeListener("update",w(_,z)),_.session.removeListener("ended",w(_,G)),_.session.removeListener("sync",w(_,L)),_.session.removeListener("drawing",w(_,I)),_.session.removeListener("laser",w(_,C)),_.session.removeListener("control",w(_,M))),document.removeEventListener("DOMContentLoaded",w(_,N),{once:!0}),w(_,U).call(_,null),_.session=null})),g(this,L,{writable:!0,value:function(e){var t=e.id;t&&w(_,k)===t||(E(_,k,t),w(_,x).invalidateFrame())}}),g(this,C,{writable:!0,value:function(e){_.session.capabilities.allowsEvent(e)&&a.WindowTracking.isActive()&&(_.session.fullDevice()||c.LaserOverlay.update(e))}}),g(this,I,{writable:!0,value:function(e){_.session.capabilities.allowsEvent(e)&&(e.image||c.AnnotationOverlay.hide(),a.WindowTracking.isActive()&&(_.session.fullDevice()||c.AnnotationOverlay.update(e)))}}),g(this,M,{writable:!0,value:function(e,t){if("focus"!==e||t.agent||a.WindowTracking.resignActive(),a.WindowTracking.isActive()&&!_.session.fullDevice()&&_.session.allowRemoteControl()){if(!_.session.capabilities.allowsEvent(t))return;c.RemoteCursor.update(e,t),u.ControlEvents.applyEvent(e,t)}}}),g(this,N,{writable:!0,value:function(e){_.session&&(e.isActive()?document.body?_.delegate.showSessionControls(e):document.addEventListener("DOMContentLoaded",w(_,N),{once:!0}):_.delegate.hideSessionControls(e))}}),g(this,A,{writable:!0,value:function(e){s.NodeRedaction.setIndex(new s.RedactionIndex(_.delegate.redactedViews,_.delegate.unredactedViews)),s.NodeRedaction.setSelectors(e.selectors())}}),g(this,R,{writable:!0,value:(l=y(p().mark((function e(t){var r;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.agent()&&!t.isActive()&&!t.isEnded()){e.next=2;break}return e.abrupt("return",null);case 2:if(t.requireConsent()){e.next=4;break}return e.abrupt("return",t.activate());case 4:if(!w(_,P)){e.next=6;break}return e.abrupt("return",null);case 6:return E(_,P,!0),e.prev=7,O("authorizing session"),e.next=11,t.update({state:"authorizing"});case 11:if(_.session){e.next=13;break}return e.abrupt("return",null);case 13:return e.next=15,_.delegate.confirmSession(t);case 15:if(r=e.sent,_.session){e.next=18;break}return e.abrupt("return",null);case 18:if(!1!==r){e.next=23;break}return O("user rejected session request"),e.abrupt("return",t.end());case 23:return O("session accepted"),e.abrupt("return",t.activate());case 25:e.next=33;break;case 27:if(e.prev=27,e.t0=e.catch(7),e.t0&&console.warn("CobrowseIO: error caught during confirmation",e.t0),!_.session){e.next=32;break}return e.abrupt("return",t.end());case 32:return e.abrupt("return",null);case 33:case"end":return e.stop()}}),e,null,[[7,27]])}))),function(e){return l.apply(this,arguments)})}),g(this,D,{writable:!0,value:(d=y(p().mark((function e(t){return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("requested"===t.remoteControl()){e.next=2;break}return e.abrupt("return",null);case 2:return e.prev=2,e.next=5,_.delegate.confirmRemoteControl();case 5:if(e.t0=e.sent,!1!==e.t0){e.next=11;break}return O("user rejeted remote control"),e.abrupt("return",t.update({remote_control:"rejected"}));case 11:return O("user accepted remote control"),e.abrupt("return",t.update({remote_control:"on"}));case 13:e.next=19;break;case 15:return e.prev=15,e.t1=e.catch(2),e.t1&&console.warn("CobrowseIO: error caught during confirmation",e.t1),e.abrupt("return",t.update({remote_control:"rejected"}));case 19:case"end":return e.stop()}}),e,null,[[2,15]])}))),function(e){return d.apply(this,arguments)})}),g(this,F,{writable:!0,value:(h=y(p().mark((function e(){var t;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a.WindowTracking.isActive()){e.next=2;break}return e.abrupt("return",!1);case 2:if(!_.session.capabilities.forbidden(f.SESSION_CAPABILITY_TYPE_FULL_DEVICE)){e.next=4;break}return e.abrupt("return");case 4:return e.prev=4,e.next=7,_.delegate.confirmFullDevice();case 7:if(t=e.sent,O("full device request",t),t){e.next=12;break}return e.next=12,_.session.setFullDevice("rejected");case 12:return e.abrupt("return",t);case 15:return e.prev=15,e.t0=e.catch(4),e.next=19,_.session.setFullDevice("off");case 19:return e.abrupt("return",!1);case 20:case"end":return e.stop()}}),e,null,[[4,15]])}))),function(){return h.apply(this,arguments)})}),g(this,W,{writable:!0,value:(v=y(p().mark((function e(t){var r;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.isEnded()&&w(_,x)){e.next=2;break}return e.abrupt("return",null);case 2:if(r=w(_,x).getSource(),!t.fullDevice()){e.next=10;break}if(!(r instanceof i.MediaStreamFrameSource)){e.next=6;break}return e.abrupt("return",O("already set to MediaStreamFrameSource"));case 6:return e.next=8,w(_,x).setSource(new i.MediaStreamFrameSource({handleFrame:w(_,H),scale:t.scale,captureStarted:function(){return t.setFullDevice("on")},captureEnded:function(e){e&&console.warn("Full device mode failed: ",e),t.setFullDevice(e?"rejected":"off")},requestPermission:w(_,F)}));case 8:e.next=13;break;case 10:if(!(r instanceof i.DOMFrameSource)){e.next=12;break}return e.abrupt("return",O("already set to DOMFrameSource"));case 12:return e.abrupt("return",w(_,x).setSource(new i.DOMFrameSource(w(_,V))));case 13:case"end":return e.stop()}}),e)}))),function(e){return v.apply(this,arguments)})}),g(this,z,{writable:!0,value:function(e){_.session?(w(_,R).call(_,e),w(_,N).call(_,e),w(_,A).call(_,e),w(_,D).call(_,e),w(_,W).call(_,e),w(_,U).call(_,e),e.isActive()&&w(_,X).call(_)):O("onSessionUpdated called after destroy()")}}),g(this,G,{writable:!0,value:function(){c.AnnotationOverlay.hide(),c.RemoteCursor.hide(),c.LaserOverlay.hide(),_.delegate.hideSessionControls(_.session),w(_,U).call(_,null)}}),g(this,U,{writable:!0,value:(m=y(p().mark((function e(t){var r;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,null===(r=w(_,T))||void 0===r?void 0:r.store(t);case 2:case"end":return e.stop()}}),e)}))),function(e){return m.apply(this,arguments)})}),g(this,Y,{writable:!0,value:function(e,t){return!(!_.session||!_.session.isActive()||!_.session.fullDevice()&&!a.WindowTracking.isActive()||!w(_,S)||!w(_,S).stream||!w(_,S).stream.connected||!w(_,S).stream.bufferedAmount>100||(w(_,S).stream.send(e,t),0))}}),g(this,B,{writable:!0,value:function(){return w(_,Y).call(_,"focus",{type:"Focus",timestamp:new Date})}}),g(this,q,{writable:!0,value:function(){return w(_,Y).call(_,"screen",{type:"Screen",timestamp:new Date,url:window.location.href,title:document.title})}}),g(this,V,{writable:!0,value:function(e){return E(_,j,(w(_,j)||0)+1),w(_,Y).call(_,"frame",{type:"Frame",id:w(_,j),data:e,timestamp:new Date,mime_type:"application/x-cbio-vdom-patch"})}}),g(this,H,{writable:!0,value:function(e,t,r){w(_,S).stream.messageLag()>=r?O("dropped frame due to message lag",w(_,S).stream.messageLag()):(E(_,j,(w(_,j)||0)+1),w(_,Y).call(_,"frame",{type:"Frame",id:w(_,j),data:e,timestamp:new Date,mime_type:t}))}}),g(this,K,{writable:!0,value:function(e){var t="mouseout";return e.in&&(t=e.down?"mousedown":"mouseup"),w(_,Y).call(_,"mouse",{type:"Mouse",x:e.x/window.innerWidth,y:e.y/window.innerHeight,state:t,timestamp:new Date})}}),g(this,X,{writable:!0,value:function(){return w(_,x).isRunning()||(O("start frames"),w(_,x).start()),_}}),O("session context constructed"),this.session=t,this.delegate=r,E(this,T,n),E(this,S,new o.default(t)),a.WindowTracking.on("activate",w(this,B)),window.addEventListener("focus",w(this,B),{capture:!0,passive:!0}),window.addEventListener("hashchange",w(this,q),{capture:!0,passive:!0}),a.MouseTracking.onChange=w(this,K),w(this,z).call(this,t),t.on("updated",w(this,z)),t.on("ended",w(this,G)),t.on("sync",w(this,L)),t.on("drawing",w(this,I)),t.on("laser",w(this,C)),t.on("control",w(this,M)),t.once("stream-open",(function(){return w(_,B).call(_)}))}));t.default=$},5011:function(e,t,r){r(4843),Object.defineProperty(t,"__esModule",{value:!0}),t.SESSION_EVENT_TYPE_TOUCH=t.SESSION_EVENT_TYPE_SELECT=t.SESSION_EVENT_TYPE_SCROLL=t.SESSION_EVENT_TYPE_POINTER=t.SESSION_EVENT_TYPE_MOUSE=t.SESSION_EVENT_TYPE_LASER=t.SESSION_EVENT_TYPE_KEYPRESS=t.SESSION_EVENT_TYPE_INPUT=t.SESSION_EVENT_TYPE_FOCUS=t.SESSION_EVENT_TYPE_DRAWING=t.SESSION_EVENT_TYPE_CHANGE=void 0,t.SESSION_EVENT_TYPE_MOUSE="Mouse",t.SESSION_EVENT_TYPE_TOUCH="Touch",t.SESSION_EVENT_TYPE_POINTER="Pointer",t.SESSION_EVENT_TYPE_FOCUS="Focus",t.SESSION_EVENT_TYPE_KEYPRESS="KeyPress",t.SESSION_EVENT_TYPE_SCROLL="Scroll",t.SESSION_EVENT_TYPE_CHANGE="Change",t.SESSION_EVENT_TYPE_INPUT="Input",t.SESSION_EVENT_TYPE_LASER="Laser",t.SESSION_EVENT_TYPE_DRAWING="Drawing",t.SESSION_EVENT_TYPE_SELECT="Select"},1713:function(e,t,r){r(4843),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(3600),r(3114),r(1624),r(1e3),r(2047),r(1157),r(8534);var n=i(r(2260)),o=i(r(3440));function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function c(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function u(e,t,r){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,r)}function s(e,t){return function(e,t){return t.get?t.get.call(e):t.value}(e,f(e,t,"get"))}function l(e,t,r){return function(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}(e,f(e,t,"set"),r),r}function f(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}var d=new WeakMap,p=new WeakMap,h=new WeakMap,y=new WeakMap,v=new WeakMap,m=new WeakMap,b=function(){function e(t){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),u(this,d,{writable:!0,value:void 0}),u(this,p,{writable:!0,value:void 0}),u(this,h,{writable:!0,value:void 0}),c(this,"open",(function(){s(r,d).isEnded()||(s(r,v).call(r),s(r,m).call(r))})),c(this,"close",(function(){window.removeEventListener("visibilitychange",r.onVisibilityChange),s(r,d)&&(s(r,d).removeListener("updated",r.open),l(r,d,null)),s(r,h)&&(s(r,h).close(),l(r,h,null)),s(r,p)&&(s(r,p).close(),l(r,p,null))})),u(this,y,{writable:!0,value:function(e,t){var i=new n.default({getUrl:function(){return(0,o.default)(e,s(r,d).field(t))}});return i.on("error",(function(e){console.warn("CobrowseIO session socket error:",e)})),i}}),u(this,v,{writable:!0,value:function(){var e=s(r,d).field("control_url"),t=s(r,d).field("control_token");e&&t&&!s(r,p)&&(l(r,p,s(r,y).call(r,e,"control_token")),s(r,p).on("open",(function(){s(r,p).send("filter",{events:["session"]}),s(r,d).fetch().catch((function(e){console.warn("CobrowseIO failed fetching session state",e)}))})),s(r,p).on("event",(function(e,t){"session"===e&&s(r,d).updateResource(t)})))}}),u(this,m,{writable:!0,value:function(){var e=s(r,d).field("stream_url"),t=s(r,d).field("stream_token");if(e&&t&&!s(r,h)){l(r,h,s(r,y).call(r,e,"stream_token"));var n=["drawing","laser","url"],o=["touch","mouse","pointer","keypress","scroll","focus","input","change","select"];s(r,h).on("event",(function(e,t){"sync"===e?s(r,d).emit("sync",t):"probe"===e?s(r,h).send("alive",t):n.includes(e)?s(r,d).emit(e,t):o.includes(e)&&s(r,d).emit("control",e,t)})),s(r,h).on("open",(function(){s(r,h).send("filter",{events:[].concat(o,n,["sync","probe"])}),s(r,d).emit("stream-open")}))}}}),l(this,d,t),t.on("updated",this.open),this.open()}var t,r;return t=e,(r=[{key:"stream",get:function(){return s(this,h)}}])&&a(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.default=b},1640:function(e,t,r){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}r(4843),r(6257),r(6486),r(3524),r(444),r(1076),r(5547),r(8496),r(4802),r(2112),r(6353),r(3064),r(3275),r(4277),Object.defineProperty(t,"__esModule",{value:!0}),t.SessionStorage=void 0,r(6941),r(1624),r(1e3),r(8719),r(2047),r(8534),r(4011),r(3114),r(3600),r(6770),r(1157);var o,i=r(7054),a=r(4603);function c(e){return function(e){if(Array.isArray(e))return f(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||l(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(){u=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var i=t&&t.prototype instanceof h?t:h,a=Object.create(i.prototype),c=new k(n||[]);return o(a,"_invoke",{value:O(e,r,c)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=f;var p={};function h(){}function y(){}function v(){}var m={};l(m,a,(function(){return this}));var b=Object.getPrototypeOf,g=b&&b(b(P([])));g&&g!==t&&r.call(g,a)&&(m=g);var w=v.prototype=h.prototype=Object.create(m);function E(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function i(o,a,c,u){var s=d(e[o],e,a);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==n(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){i("next",e,c,u)}),(function(e){i("throw",e,c,u)})):t.resolve(f).then((function(e){l.value=e,c(l)}),(function(e){return i("throw",e,c,u)}))}u(s.arg)}var a;o(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){i(e,r,t,n)}))}return a=a?a.then(n,n):n()}})}function O(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=S(a,r);if(c){if(c===p)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=d(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,S(e,t),"throw"===t.method))return p;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var n=d(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,p;var o=n.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function P(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:T}}function T(){return{value:void 0,done:!0}}return y.prototype=v,o(w,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,l(e,s,"GeneratorFunction")),e.prototype=Object.create(w),e},e.awrap=function(e){return{__await:e}},E(_.prototype),l(_.prototype,c,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},E(w),l(w,s,"Generator"),l(w,a,(function(){return this})),l(w,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=P,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),x(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:P(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function s(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=l(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){c=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw i}}}}function l(e,t){if(e){if("string"==typeof e)return f(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?f(e,t):void 0}}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function d(e,t,r,n,o,i,a){try{var c=e[i](a),u=c.value}catch(e){return void r(e)}c.done?t(u):Promise.resolve(u).then(n,o)}function p(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){d(i,n,o,a,c,"next",e)}function c(e){d(i,n,o,a,c,"throw",e)}a(void 0)}))}}function h(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function y(e,t,r){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,r)}function v(e,t){return function(e,t){return t.get?t.get.call(e):t.value}(e,b(e,t,"get"))}function m(e,t,r){return function(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}(e,b(e,t,"set"),r),r}function b(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}var g=(0,((o=r(9796))&&o.__esModule?o:{default:o}).default)("cbio.sessionStorage"),w=new WeakMap,E=new WeakMap,_=new WeakMap,O=function(){function e(t){var r=t.load,n=void 0===r?[]:r,o=t.store,i=void 0===o?[]:o,a=t.retain,c=void 0===a?[]:a;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),y(this,w,{writable:!0,value:void 0}),y(this,E,{writable:!0,value:void 0}),y(this,_,{writable:!0,value:void 0}),m(this,w,n),m(this,E,i),m(this,_,c)}var t,r,n,o,l;return t=e,r=[{key:"load",value:(l=p(u().mark((function e(t){var r,n,o,i,a;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:g("loading session"),r=s(v(this,w)),e.prev=2,r.s();case 4:if((n=r.n()).done){e.next=21;break}return o=n.value,e.next=8,o.load(t);case 8:return i=e.sent,e.next=11,null==i?void 0:i.fetch();case 11:if(!(a=e.sent)){e.next=19;break}if(!a.isActive()){e.next=17;break}return e.abrupt("return",a);case 17:return e.next=19,o.store(null);case 19:e.next=4;break;case 21:e.next=26;break;case 23:e.prev=23,e.t0=e.catch(2),r.e(e.t0);case 26:return e.prev=26,r.f(),e.finish(26);case 29:return e.abrupt("return",null);case 30:case"end":return e.stop()}}),e,this,[[2,23,26,29]])}))),function(e){return l.apply(this,arguments)})},{key:"store",value:(o=p(u().mark((function e(t){var r,n,o;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:g("storing session"),r=s(v(this,E)),e.prev=2,r.s();case 4:if((n=r.n()).done){e.next=20;break}return o=n.value,e.prev=6,e.next=9,o.store(t);case 9:if(e.t0=e.sent,!0!==e.t0){e.next=13;break}return g("stopping store() chain early due to",o),e.abrupt("break",20);case 13:e.next=18;break;case 15:e.prev=15,e.t1=e.catch(6),console.error("Unexpected error storing session: ".concat(o.constructor.name),e.t1);case 18:e.next=4;break;case 20:e.next=25;break;case 22:e.prev=22,e.t2=e.catch(2),r.e(e.t2);case 25:return e.prev=25,r.f(),e.finish(25);case 28:case"end":return e.stop()}}),e,this,[[2,22,25,28],[6,15]])}))),function(e){return o.apply(this,arguments)})},{key:"destroy",value:function(){var e,t=this,r=s(new Set([].concat(c(v(this,w)),c(v(this,E))).filter((function(e){return!v(t,_).includes(e)}))));try{for(r.s();!(e=r.n()).done;)e.value.destroy()}catch(e){r.e(e)}finally{r.f()}m(this,w,null),m(this,E,null),m(this,_,null)}}],n=[{key:"create",value:function(t,r,n){var o=n.localStorage;if(t.length>1){var c=new i.ForwardingSessionStorage(t),u=new a.IframeSessionStorage(t,r);return new e({load:[c,o,u],store:[o,u,c],retain:[o]})}return new e({load:[o],store:[o],retain:[o]})}}],r&&h(t.prototype,r),n&&h(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.SessionStorage=O},6362:function(e,t,r){r(4843),Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Session",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"SessionCapabilities",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"SessionContext",{enumerable:!0,get:function(){return o.default}});var n=a(r(4914)),o=a(r(2001)),i=a(r(1826));function a(e){return e&&e.__esModule?e:{default:e}}},2767:function(e,t,r){r(4843),Object.defineProperty(t,"__esModule",{value:!0}),t.ActiveSessionPath=void 0,t.ActiveSessionPath="_cobrowse_active_session"},7054:function(e,t,r){r(4843),r(6257),r(6941),r(6486),r(3524),r(444),r(1076),r(5547),Object.defineProperty(t,"__esModule",{value:!0}),t.ForwardingSessionStorage=void 0,t.extractActiveSession=_,r(1624),r(1e3),r(2047),r(8534),r(6955),r(8927),r(1157),r(9280),r(3114),r(7285),r(3257);var n=a(r(7368)),o=a(r(4914)),i=r(2767);function a(e){return e&&e.__esModule?e:{default:e}}function c(e){return function(e){if(Array.isArray(e))return l(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||s(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=s(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){c=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw i}}}}function s(e,t){if(e){if("string"==typeof e)return l(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?l(e,t):void 0}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function p(e,t){y(e,t),t.add(e)}function h(e,t,r){y(e,t),t.set(e,r)}function y(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function v(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}function m(e,t){return function(e,t){return t.get?t.get.call(e):t.value}(e,g(e,t,"get"))}function b(e,t,r){return function(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}(e,g(e,t,"set"),r),r}function g(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}var w=(0,a(r(9796)).default)("cbio.sessionStorage.ForwardingSessionStorage"),E=_();function _(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.window,r=void 0===t?window:t;try{var n=new URL(r.location.href),o=n.searchParams.get(i.ActiveSessionPath);return o?(w("found forwarded session that can be loaded",o),n.searchParams.delete(i.ActiveSessionPath),r.history.replaceState({},"",n)):w("no forwarded session to load",n),o}catch(e){console.warn("Failed to attempt to extract forwarded session",e)}}var O=new WeakMap,S=new WeakMap,j=new WeakMap,x=new WeakMap,k=new WeakMap,P=new WeakMap,T=new WeakMap,L=new WeakMap,C=new WeakSet,I=new WeakSet,M=new WeakSet,N=new WeakSet,A=new WeakSet,R=new WeakSet,D=new WeakSet,F=new WeakSet,W=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.window,o=void 0===n?window:n,i=r.HtmlFormElement,a=void 0===i?HTMLFormElement:i,c=r.activeSessionData,u=void 0===c?E:c;f(this,e),p(this,F),p(this,D),p(this,R),p(this,A),p(this,N),p(this,M),p(this,I),p(this,C),h(this,O,{writable:!0,value:void 0}),h(this,S,{writable:!0,value:void 0}),h(this,j,{writable:!0,value:void 0}),h(this,x,{writable:!0,value:void 0}),h(this,k,{writable:!0,value:void 0}),h(this,P,{writable:!0,value:void 0}),h(this,T,{writable:!0,value:void 0}),h(this,L,{writable:!0,value:void 0}),b(this,O,o),b(this,S,a),b(this,j,t||[]),b(this,x,u)}var t,r;return t=e,(r=[{key:"isSupported",value:function(){return w("isSupported?",!0),!0}},{key:"load",value:function(e){try{if(m(this,x))return w("loading session",m(this,x)),new o.default(e)[n.default].decompress(m(this,x));w("no session to load")}catch(e){w("failed to load forwarded session",e)}return null}},{key:"store",value:function(e){v(this,F,H).call(this,e)?(w("storing active session by binding forwarding hooks"),b(this,k,e),v(this,M,U).call(this)):(w("removing active session by unbinding forwarding hooks"),this.destroy())}},{key:"destroy",value:function(){v(this,N,Y).call(this),b(this,k,void 0)}}])&&d(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function z(){var e=this;m(this,T)||(b(this,T,m(this,O).open),m(this,O).open=function(t){for(var r,n,o=arguments.length,i=new Array(o>1?o-1:0),a=1;a<o;a++)i[a-1]=arguments[a];return(r=m(e,T)).call.apply(r,[m(e,O),null!==(n=v(e,D,V).call(e,t))&&void 0!==n?n:t].concat(i))})}function G(){var e=this;if(!m(this,L)){b(this,L,m(this,S).prototype.submit);var t=function(t){var r,n;t.action=null!==(r=v(e,D,V).call(e,t.action))&&void 0!==r?r:t.action;for(var o=arguments.length,i=new Array(o>1?o-1:0),a=1;a<o;a++)i[a-1]=arguments[a];(n=m(e,L)).call.apply(n,[t].concat(i))};m(this,S).prototype.submit=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];t.apply(void 0,[this].concat(r))}}}function U(){var e=this;if(!m(this,P)){b(this,P,[["click",function(t){return v(e,A,B).call(e,t)}],["submit",function(t){return v(e,R,q).call(e,t)}]]);var t,r=u(m(this,P));try{for(r.s();!(t=r.n()).done;){var n,o=t.value;(n=m(this,O).document).addEventListener.apply(n,c(o))}}catch(e){r.e(e)}finally{r.f()}}v(this,C,z).call(this),v(this,I,G).call(this)}function Y(){if(m(this,P)){var e,t=u(m(this,P));try{for(t.s();!(e=t.n()).done;){var r,n=e.value;(r=m(this,O).document).removeEventListener.apply(r,c(n))}}catch(e){t.e(e)}finally{t.f()}b(this,P,void 0)}m(this,T)&&(m(this,O).open=m(this,T),b(this,T,void 0)),m(this,L)&&(m(this,S).prototype.submit=m(this,L),b(this,L,void 0))}function B(e){var t,r=v(this,D,V).call(this,null==e||null===(t=e.target)||void 0===t?void 0:t.href);r&&(e.target.href=r.toString())}function q(e){var t,r=v(this,D,V).call(this,null==e||null===(t=e.target)||void 0===t?void 0:t.action);r&&(e.target.action=r.toString())}function V(e){if(!e)return w("not rewriting falsey url",e),null;if(!v(this,F,H).call(this))return w("not rewriting url due to non-active session",e),null;try{var t=new URL(e);return t.origin===m(this,O).location.origin?(w("not rewriting url because we are not changing origin",t.toString()),null):-1===m(this,j).indexOf(t.origin)?(w("not rewriting url due to non-trusted origin",t.toString()),null):(t.searchParams.set(i.ActiveSessionPath,m(this,k)[n.default].compress()),w("rewriting trusted url for an active session",{from:e,to:t.toString()}),"string"==typeof e?t.toString():t)}catch(e){return w("failed rewriting url",e),null}}function H(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:m(this,k);return null==e?void 0:e.isActive()}t.ForwardingSessionStorage=W},4603:function(e,t,r){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}r(4843),r(444),r(1076),r(5547),r(8496),r(4802),r(2112),r(6353),r(3064),r(3275),r(6941),r(4277),r(6257),Object.defineProperty(t,"__esModule",{value:!0}),t.IframeSessionStorage=void 0,r(1624),r(1e3),r(2047),r(8534),r(6955),r(8927),r(7285),r(1157);var o=u(r(7368)),i=r(7345),a=u(r(4914)),c=r(2767);function u(e){return e&&e.__esModule?e:{default:e}}function s(){s=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var i=t&&t.prototype instanceof h?t:h,a=Object.create(i.prototype),c=new k(n||[]);return o(a,"_invoke",{value:O(e,r,c)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=f;var p={};function h(){}function y(){}function v(){}var m={};l(m,a,(function(){return this}));var b=Object.getPrototypeOf,g=b&&b(b(P([])));g&&g!==t&&r.call(g,a)&&(m=g);var w=v.prototype=h.prototype=Object.create(m);function E(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function i(o,a,c,u){var s=d(e[o],e,a);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==n(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){i("next",e,c,u)}),(function(e){i("throw",e,c,u)})):t.resolve(f).then((function(e){l.value=e,c(l)}),(function(e){return i("throw",e,c,u)}))}u(s.arg)}var a;o(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){i(e,r,t,n)}))}return a=a?a.then(n,n):n()}})}function O(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=S(a,r);if(c){if(c===p)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=d(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,S(e,t),"throw"===t.method))return p;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var n=d(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,p;var o=n.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function P(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:T}}function T(){return{value:void 0,done:!0}}return y.prototype=v,o(w,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,l(e,u,"GeneratorFunction")),e.prototype=Object.create(w),e},e.awrap=function(e){return{__await:e}},E(_.prototype),l(_.prototype,c,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},E(w),l(w,u,"Generator"),l(w,a,(function(){return this})),l(w,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=P,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),x(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:P(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function l(e,t,r,n,o,i,a){try{var c=e[i](a),u=c.value}catch(e){return void r(e)}c.done?t(u):Promise.resolve(u).then(n,o)}function f(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){l(i,n,o,a,c,"next",e)}function c(e){l(i,n,o,a,c,"throw",e)}a(void 0)}))}}function d(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function p(e,t){return function(e,t){return t.get?t.get.call(e):t.value}(e,y(e,t,"get"))}function h(e,t,r){return function(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}(e,y(e,t,"set"),r),r}function y(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}var v=(0,u(r(9796)).default)("cbio.sessionStorage.IframeSessionStorage"),m=new WeakMap,b=function(){function e(t,r){var n,o,a;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),a={writable:!0,value:void 0},function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(n=this,o=m),o.set(n,a);var c=new URL("apps/iframe_storage/server.html",r);h(this,m,new i.TrustedOriginStorageClient(c.toString(),t))}var t,r,n,u,l;return t=e,r=[{key:"isSupported",value:(l=f(s().mark((function e(){var t;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,p(this,m).ready();case 2:return t=p(this,m)&&p(this,m).isCrossDomainSupported,v("isSupported?",t),e.abrupt("return",t);case 5:case"end":return e.stop()}}),e,this)}))),function(){return l.apply(this,arguments)})},{key:"load",value:(u=f(s().mark((function e(t){var r;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.isSupported();case 2:if(e.sent){e.next=4;break}return e.abrupt("return",null);case 4:return e.next=6,p(this,m).storage.getItem(c.ActiveSessionPath);case 6:if(!(r=e.sent)){e.next=12;break}return v("loading session"),e.abrupt("return",new a.default(t)[o.default].deserialize(JSON.parse(r)));case 12:return v("no session to load"),e.abrupt("return",null);case 14:case"end":return e.stop()}}),e,this)}))),function(e){return u.apply(this,arguments)})},{key:"store",value:(n=f(s().mark((function e(t){var r;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.isSupported();case 2:if(e.sent){e.next=4;break}return e.abrupt("return",null);case 4:if(null==t||!t.isActive()){e.next=12;break}return v("storing active session"),r=JSON.stringify(t[o.default].serialize()),e.next=9,p(this,m).storage.setItem(c.ActiveSessionPath,r);case 9:return e.abrupt("return",!0);case 12:return v("deleting inactive session"),e.next=15,p(this,m).storage.removeItem(c.ActiveSessionPath);case 15:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})},{key:"destroy",value:function(){var e;null===(e=p(this,m))||void 0===e||e.destroy(),h(this,m,void 0)}}],r&&d(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.IframeSessionStorage=b},9426:function(e,t,r){r(4843),Object.defineProperty(t,"__esModule",{value:!0}),t.LocalSessionStorage=void 0,r(1624),r(1e3),r(2047),r(1157),r(8534);var n=c(r(7368)),o=c(r(5901)),i=c(r(4914)),a=r(2767);function c(e){return e&&e.__esModule?e:{default:e}}function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function s(e,t){return function(e,t){return t.get?t.get.call(e):t.value}(e,l(e,t,"get"))}function l(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}var f=(0,c(r(9796)).default)("cbio.sessionStorage.LocalSessionStorage"),d=new WeakMap,p=function(){function e(){var t,r,n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t=this,r=d,n={writable:!0,value:(0,o.default)()},function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,r),r.set(t,n)}var t,r;return t=e,(r=[{key:"isSupported",value:function(){return f("isSupported?",!0),!0}},{key:"load",value:function(e){var t=s(this,d).getItem(a.ActiveSessionPath);return t?(f("loading session"),new i.default(e)[n.default].deserialize(t)):(f("no session to load"),null)}},{key:"store",value:function(e){null!=e&&e.isActive()?(f("storing active session"),s(this,d).setItem(a.ActiveSessionPath,e[n.default].serialize())):(f("removing inactive session"),s(this,d).removeItem(a.ActiveSessionPath))}},{key:"destroy",value:function(){var e,t;t=void 0,function(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}(e=this,l(e,d,"set"),t)}}])&&u(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.LocalSessionStorage=p},5901:function(e,t,r){r(4843),Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o.default}});var n,o=(n=r(59))&&n.__esModule?n:{default:n}},59:function(e,t,r){r(4843),Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return{setItem:function(t,r){c();var n=JSON.stringify({value:r,group:e});a()?window.localStorage.setItem(t,n):o.default.set(t,n),i[t]=n},getItem:function(t){try{var r;(r=a()?window.localStorage&&window.localStorage.getItem(t):o.default.get(t))||(r=i[t]);var n=JSON.parse(r),c=n.value,u=n.group;return e&&e!==u?null:c}catch(e){return null}},removeItem:function(e){a()&&window.localStorage.removeItem(e),o.default.remove(e),i[e]=void 0}}};var n,o=(n=r(6734))&&n.__esModule?n:{default:n},i={};function a(){try{var e="_cobrowse_test_item";return localStorage.setItem(e,e),localStorage.removeItem(e),!0}catch(e){return!1}}function c(){a()||c.done||(c.done=!0,console.warn("Warning: localStorage is not supported. Cobrowse falling back to cookie or in-memory storage and may not function as expected."))}},8487:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(1624),r(1e3),r(2827),r(7639),r(6996),r(1366),r(3558),r(8852),r(8630),r(8858),r(6480),r(7219),r(2160),r(4289),r(8165),r(4613),r(3292),r(3748),r(9157),r(5529),r(4882),r(7233),r(1086),r(8786),r(5544),r(1304),r(3114),r(4843);var n=r(5064);function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function i(e,t,r){return t&&o(e.prototype,t),r&&o(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var c=new(i((function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),a(this,"el",(function(){return t._el||(t._el=document.createElement("img"),t._el.className="cbio_session_overlay",t._el.style.pointerEvents="none",t._el.style.width="10vw",t._el.style.height="100vh",t._el.style.position="fixed",t._el.style.zIndex="2147483647",t._el.style.top="0",t._el.style.left="0"),t._el})),a(this,"_arrayBufferToBase64",(function(e){for(var t="",r=new Uint8Array(e),n=r.byteLength,o=0;o<n;o+=1)t+=String.fromCharCode(r[o]);return window.btoa(t)})),a(this,"update",(function(e){if(n.WindowTracking.isActive())if(e.image){t.el().style.left="".concat(100*e.x,"%"),t.el().style.top="".concat(100*e.y,"%"),t.el().style.height="".concat(100*e.height,"%"),t.el().style.width="".concat(100*e.width,"%");var r="data:".concat(e.mime_type,";base64,").concat(t._arrayBufferToBase64(e.image));t.el().src=r,document.body&&!t.el().parentNode&&document.body.appendChild(t.el())}else t.hide()})),a(this,"hide",(function(){t.el().parentNode&&t.el().parentNode.removeChild(t.el())}))})));t.default=c},881:function(e,t,r){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}r(444),r(1076),r(5547),r(1624),r(2047),r(8534),r(8496),r(4802),r(2112),r(6353),r(3064),r(3275),r(6941),r(4277),r(6257),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(3114),r(1e3),r(4843);var o,i=(o=r(2175))&&o.__esModule?o:{default:o};function a(){a=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var i=t&&t.prototype instanceof h?t:h,a=Object.create(i.prototype),c=new k(n||[]);return o(a,"_invoke",{value:O(e,r,c)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=f;var p={};function h(){}function y(){}function v(){}var m={};l(m,c,(function(){return this}));var b=Object.getPrototypeOf,g=b&&b(b(P([])));g&&g!==t&&r.call(g,c)&&(m=g);var w=v.prototype=h.prototype=Object.create(m);function E(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function i(o,a,c,u){var s=d(e[o],e,a);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==n(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){i("next",e,c,u)}),(function(e){i("throw",e,c,u)})):t.resolve(f).then((function(e){l.value=e,c(l)}),(function(e){return i("throw",e,c,u)}))}u(s.arg)}var a;o(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){i(e,r,t,n)}))}return a=a?a.then(n,n):n()}})}function O(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=S(a,r);if(c){if(c===p)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=d(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,S(e,t),"throw"===t.method))return p;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var n=d(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,p;var o=n.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function P(e){if(e){var t=e[c];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:T}}function T(){return{value:void 0,done:!0}}return y.prototype=v,o(w,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,l(e,s,"GeneratorFunction")),e.prototype=Object.create(w),e},e.awrap=function(e){return{__await:e}},E(_.prototype),l(_.prototype,u,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},E(w),l(w,s,"Generator"),l(w,c,(function(){return this})),l(w,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=P,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),x(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:P(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function c(e,t,r,n,o,i,a){try{var c=e[i](a),u=c.value}catch(e){return void r(e)}c.done?t(u):Promise.resolve(u).then(n,o)}function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function s(e,t,r){return t&&u(e.prototype,t),r&&u(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function l(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var f=s((function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),l(this,"content",(function(e,t){return'\n <div class="cobrowse-dialog" style="color: #333; font-family:sans-serif; line-height:140%; position:fixed; padding:25px; background:white; border-radius:15px; z-index:2147483647; top:50px; left:50%; width:75%; max-width:350px; transform:translateX(-50%); box-shadow:0px 0px 15px #33333322; user-select: none;">\n <div style="text-align:center; margin-top:10px; margin-bottom:20px"><b>'.concat(e,"</b></div>\n <div>").concat(t,'</div>\n <div style=\'float:right; margin-top:40px; color:rgb(0, 122, 255);\'>\n <a class="cobrowse-button cobrowse-deny" style="cursor:pointer; padding:10px;">').concat(i.default.tr("DENY"),'</a>\n <a class="cobrowse-button cobrowse-allow" style="cursor:pointer; padding:10px; font-weight: bold;">').concat(i.default.tr("ALLOW"),"</a>\n </div>\n </div>\n ")})),l(this,"container",(function(){return t._container||(t._container=document.createElement("div"),t._container.style.background="rgba(50, 50, 50, 0.4)",t._container.style.position="fixed",t._container.style.zIndex="2147483647",t._container.style.bottom="0",t._container.style.top="0",t._container.style.left="0",t._container.style.right="0"),t._container})),l(this,"show",function(){var e,r=(e=a().mark((function e(r,n){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e){var o=t.container();t._container.innerHTML=t.content(r,n),o.querySelector(".cobrowse-allow").addEventListener("click",(function(){e(!0),t.hide()})),o.querySelector(".cobrowse-deny").addEventListener("click",(function(){e(!1),t.hide()})),document.body&&document.body.appendChild(o)})));case 1:case"end":return e.stop()}}),e)})),function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){c(i,n,o,a,u,"next",e)}function u(e){c(i,n,o,a,u,"throw",e)}a(void 0)}))});return function(e,t){return r.apply(this,arguments)}}()),l(this,"hide",(function(){t.container().parentNode&&t.container().parentNode.removeChild(t.container())}))}));t.default=f},9486:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(4843);var n=r(5064);function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function i(e,t,r){return t&&o(e.prototype,t),r&&o(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var c=new(i((function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),a(this,"el",(function(){return t._el||(t._el=document.createElement("div"),t._el.className="cbio_session_overlay",t._el.style.border="border: 1px solid white",t._el.style.borderRadius="15px",t._el.style.background="red",t._el.style.position="fixed",t._el.style.zIndex="2147483647",t._el.style.height="15px",t._el.style.width="15px",t._el.style.marginLeft="-7.5px",t._el.style.marginTop="-7.5px"),t._el})),a(this,"update",(function(e){n.WindowTracking.isActive()&&(document.body&&!t.el().parentNode&&document.body.appendChild(t.el()),"touchend"===e.state?t.hide():(t.el().style.left="".concat(100*e.x,"%"),t.el().style.top="".concat(100*e.y,"%")))})),a(this,"hide",(function(){t.el().parentNode&&t.el().parentNode.removeChild(t.el())}))})));t.default=c},9444:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(4843);var n=r(5064),o=r(7743);function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function a(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function c(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var u=new(a((function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),c(this,"el",(function(){return t._el||(t._el=document.createElementNS("http://www.w3.org/2000/svg","svg"),t._el.setAttribute("class","__cbio_ignored"),t._el.setAttribute("viewBox","0 0 320 512"),t._el.style.position="fixed",t._el.style.zIndex="2147483647",t._el.style.height="25px",t._el.style.width="25px",t._el.style.marginLeft="-7px",t._el.style.marginTop="-1px",t._el.style.opacity=.7,t._path=document.createElementNS("http://www.w3.org/2000/svg","path"),t._path.setAttribute("d","M302.189 329.126H196.105l55.831 135.993c3.889 9.428-.555 19.999-9.444 23.999l-49.165 21.427c-9.165 4-19.443-.571-23.332-9.714l-53.053-129.136-86.664 89.138C18.729 472.71 0 463.554 0 447.977V18.299C0 1.899 19.921-6.096 30.277 5.443l284.412 292.542c11.472 11.179 3.007 31.141-12.5 31.141z"),t._path.setAttribute("stroke","white"),t._path.setAttribute("stroke-width","40"),t._path.setAttribute("opacity",1),t._path.setAttribute("fill","blue"),t._el.appendChild(t._path)),t._el})),c(this,"_updatePosition",(function(e){var r,n,i,a,c=e.x,u=e.y;c*=null===(r=window.document)||void 0===r||null===(n=r.documentElement)||void 0===n?void 0:n.clientWidth,u*=null===(i=window.document)||void 0===i||null===(a=i.documentElement)||void 0===a?void 0:a.clientHeight;var s=o.NodeTracker.getById(e.target.id);if(s){var l=s.ownerDocument,f=l&&l.defaultView&&l.defaultView.frameElement;if(f){var d=f.getBoundingClientRect();c+=Math.round(d.left),u+=Math.round(d.top)}t.el().style.top="".concat(u,"px"),t.el().style.left="".concat(c,"px")}})),c(this,"update",(function(e,r){if("mouse"===e&&n.WindowTracking.isActive())switch(document.body&&!t.el().parentNode&&document.body.appendChild(t.el()),r.state){case"mousedown":t.el().style.opacity=1;break;case"mouseup":t.el().style.opacity=.7;break;case"mousemove":t._updatePosition(r)}})),c(this,"hide",(function(){t.el().parentNode&&t.el().parentNode.removeChild(t.el())}))})));t.default=u},1457:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(4843);var n=i(r(1178)),o=i(r(2175));function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function c(e,t,r){return t&&a(e.prototype,t),r&&a(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function u(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var s=new(c((function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),u(this,"el",(function(){return t._el||(t._el=document.createElement("div"),t._el.className="__cbio_ignored cbio_session_controls",t._el.textContent=o.default.tr("END_SESSION"),t._el.style.fontFamily="sans-serif",t._el.style.padding="10px 13px",t._el.style.fontSize="13px",t._el.style.whiteSpace="nowrap",t._el.style.color="white",t._el.style.boxShadow="0px 2px 5px #33333344",t._el.style.cursor="pointer",t._el.style.borderRadius="30px",t._el.style.background="rgb(234, 91, 80)",t._el.style.position="fixed",t._el.style.zIndex="2147483647",t._el.style.bottom="20px",t._el.style.left="50%",t._el.style.transform="translateX(-50%)",t._el.style.userSelect="none",t._el.addEventListener("click",t._onEnd)),t._el})),u(this,"_onEnd",(function(){var e=n.default.currentSession;e&&e.isActive()&&e.end()})),u(this,"show",(function(){document.body&&!t.el().parentNode&&document.body.appendChild(t.el())})),u(this,"hide",(function(){t.el().parentNode&&t.el().parentNode.removeChild(t.el())}))})));t.default=s},3172:function(e,t,r){function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function o(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(4843);var a=new(o((function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),i(this,"content",(function(e){return'\n <div style="color: white; font-family:sans-serif; margin-bottom: 10px; line-height:140%; padding:10px; font-size: 12px; font-weight: bold; background:#292d33; border-radius:5px; width:250px; box-shadow:0px 0px 15px #33333322;">\n '.concat(e,"\n </div>\n ")})),i(this,"container",(function(){var e=document.createElement("div");return e.style.position="fixed",e.style.zIndex="2147483647",e.style.color="#fff",e.style.top="20px",e.style.right="20px",e.style.transition="all 0.3s linear",e.style.opacity=0,e.style.pointerEvents="none",e})),i(this,"show",(function(e){var r=t.container();r.innerHTML=t.content(e),document.body&&document.body.appendChild(r),setTimeout((function(){r.style.opacity=1}),0),setTimeout((function(){r.style.opacity=0,setTimeout((function(){r.parentNode&&r.parentNode.removeChild(r)}),500)}),8e3)})),i(this,"hide",(function(){t.container().parentNode&&t.container().parentNode.removeChild(t.container())}))})));t.default=a},3042:function(e,t,r){r(4843),Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"AnnotationOverlay",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"ConsentDialog",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(t,"LaserOverlay",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"RemoteCursor",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"SessionStateOverlay",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"Toast",{enumerable:!0,get:function(){return u.default}});var n=s(r(8487)),o=s(r(9486)),i=s(r(9444)),a=s(r(1457)),c=s(r(881)),u=s(r(3172));function s(e){return e&&e.__esModule?e:{default:e}}},2260:function(e,t,r){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}r(4843),r(4277),r(3064),r(9616),r(444),r(1076),r(5547),r(8496),r(4802),r(2112),r(6353),r(3275),r(6941),r(6257),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(1624),r(1e3),r(2827),r(7639),r(6996),r(1366),r(3558),r(8852),r(8630),r(8858),r(6480),r(7219),r(2160),r(4289),r(8165),r(4613),r(3292),r(3748),r(9157),r(5529),r(4882),r(7233),r(1086),r(8786),r(5544),r(1304),r(2047),r(1157),r(8534);var o,i=r(3936),a=(o=r(9796))&&o.__esModule?o:{default:o},c=r(1239);function u(){u=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var i=t&&t.prototype instanceof h?t:h,a=Object.create(i.prototype),c=new k(n||[]);return o(a,"_invoke",{value:O(e,r,c)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=f;var p={};function h(){}function y(){}function v(){}var m={};l(m,a,(function(){return this}));var b=Object.getPrototypeOf,g=b&&b(b(P([])));g&&g!==t&&r.call(g,a)&&(m=g);var w=v.prototype=h.prototype=Object.create(m);function E(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function i(o,a,c,u){var s=d(e[o],e,a);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==n(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){i("next",e,c,u)}),(function(e){i("throw",e,c,u)})):t.resolve(f).then((function(e){l.value=e,c(l)}),(function(e){return i("throw",e,c,u)}))}u(s.arg)}var a;o(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){i(e,r,t,n)}))}return a=a?a.then(n,n):n()}})}function O(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=S(a,r);if(c){if(c===p)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=d(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,S(e,t),"throw"===t.method))return p;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var n=d(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,p;var o=n.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function P(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:T}}function T(){return{value:void 0,done:!0}}return y.prototype=v,o(w,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,l(e,s,"GeneratorFunction")),e.prototype=Object.create(w),e},e.awrap=function(e){return{__await:e}},E(_.prototype),l(_.prototype,c,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},E(w),l(w,s,"Generator"),l(w,a,(function(){return this})),l(w,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=P,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),x(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:P(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function s(e,t,r,n,o,i,a){try{var c=e[i](a),u=c.value}catch(e){return void r(e)}c.done?t(u):Promise.resolve(u).then(n,o)}function l(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){s(i,n,o,a,c,"next",e)}function c(e){s(i,n,o,a,c,"throw",e)}a(void 0)}))}}function f(e,t,r){return f=m()?Reflect.construct.bind():function(e,t,r){var n=[null];n.push.apply(n,t);var o=new(Function.bind.apply(e,n));return r&&h(o,r.prototype),o},f.apply(null,arguments)}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function h(e,t){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},h(e,t)}function y(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return v(e)}function v(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function b(e){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},b(e)}function g(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function w(e,t,r){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,r)}function E(e,t){return function(e,t){return t.get?t.get.call(e):t.value}(e,O(e,t,"get"))}function _(e,t,r){return function(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}(e,O(e,t,"set"),r),r}function O(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}var S=(0,a.default)("cbio.CBORSocket"),j=new WeakMap,x=new WeakMap,k=new WeakMap,P=new WeakMap,T=new WeakMap,L=new WeakMap,C=new WeakMap,I=new WeakMap,M=new WeakMap,N=new WeakMap,A=new WeakMap,R=new WeakMap,D=new WeakMap,F=new WeakMap,W=new WeakMap,z=new WeakMap,G=new WeakMap,U=new WeakMap,Y=new WeakMap,B=new WeakMap,q=new WeakMap,V=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&h(e,t)}(c,e);var t,r,n,o,a=(t=c,r=m(),function(){var e,n=b(t);if(r){var o=b(this).constructor;e=Reflect.construct(n,arguments,o)}else e=n.apply(this,arguments);return y(this,e)});function c(e){var t,r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=n.socketFactory,s=void 0===o?function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return f(WebSocket,t)}:o;return d(this,c),w(v(t=a.call(this)),j,{writable:!0,value:void 0}),w(v(t),x,{writable:!0,value:!1}),w(v(t),k,{writable:!0,value:void 0}),w(v(t),P,{writable:!0,value:void 0}),w(v(t),T,{writable:!0,value:0}),w(v(t),L,{writable:!0,value:6e4}),w(v(t),C,{writable:!0,value:1e3+Math.floor(1e3*Math.random())}),w(v(t),I,{writable:!0,value:void 0}),w(v(t),M,{writable:!0,value:void 0}),w(v(t),N,{writable:!0,value:void 0}),w(v(t),A,{writable:!0,value:0}),w(v(t),R,{writable:!0,value:0}),w(v(t),D,{writable:!0,value:(r=l(u().mark((function e(){var r,n;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!E(v(t),P)){e.next=3;break}return console.error("Socket already exists"),e.abrupt("return");case 3:return S("creating ws"),e.next=6,E(v(t),j).getUrl();case 6:if(r=e.sent,!E(v(t),x)){e.next=9;break}return e.abrupt("return");case 9:if(!E(v(t),P)){e.next=11;break}return e.abrupt("return");case 11:(n=E(v(t),k).call(v(t),r)).binaryType="arraybuffer",n.addEventListener("open",E(v(t),F)),n.addEventListener("message",E(v(t),z)),n.addEventListener("close",E(v(t),Y)),n.addEventListener("error",E(v(t),B)),_(v(t),P,n);case 18:case"end":return e.stop()}}),e)}))),function(){return r.apply(this,arguments)})}),w(v(t),F,{writable:!0,value:function(){S("ws opened"),t.emit("open"),clearTimeout(E(v(t),M)),_(v(t),M,setTimeout((function(){S("counting open as success"),_(v(t),T,0)}),5e3))}}),w(v(t),W,{writable:!0,value:function(e){_(v(t),R,e)}}),w(v(t),z,{writable:!0,value:function(e){try{var r=(0,i.decode)(new Uint8Array(e.data)),n=r.event,o=r.data,a=r.ack;return a?E(v(t),W).call(v(t),a):n?t.emit("event",n,o):console.error("Socket received message without event",e)}catch(t){return console.error("Error processing message",e.data,t.stack)}}}),w(v(t),G,{writable:!0,value:function(e){var r=1+.5*Math.random(),n=Math.floor(Math.pow(300*e,1.2)*r);return Math.min(Math.max(E(v(t),C),n),E(v(t),L))}}),w(v(t),U,{writable:!0,value:function(){if(E(v(t),x))S("reconnect skipped as socket was closed");else if(E(v(t),N))S("reconnect skipped as reconnect already scheduled");else{if(!1===navigator.onLine)return S("navigator offline"),void _(v(t),N,setTimeout((function(){_(v(t),N,null),E(v(t),U).call(v(t))}),1e3));var e=E(v(t),G).call(v(t),E(v(t),T));S("reconnecting in",e,"attempts",E(v(t),T)),_(v(t),N,setTimeout(l(u().mark((function e(){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(_(v(t),N,null),!E(v(t),x)){e.next=5;break}console.warn("tried to reconnect after close"),e.next=8;break;case 5:return _(v(t),P,null),e.next=8,E(v(t),D).call(v(t)).catch(E(v(t),B));case 8:case"end":return e.stop()}}),e)}))),e)),_(v(t),T,E(v(t),T)+1)}}}),w(v(t),Y,{writable:!0,value:function(){S("ws closed"),t.emit("close"),S("resetting message acks"),_(v(t),A,0),_(v(t),R,0),E(v(t),x)||E(v(t),U).call(v(t)),clearTimeout(E(v(t),M))}}),w(v(t),B,{writable:!0,value:function(e){t.emit("error",e)}}),w(v(t),q,{writable:!0,value:function(){t.send("ping")}}),g(v(t),"messageLag",(function(){return E(v(t),R)?E(v(t),A)-E(v(t),R):0})),g(v(t),"setMaxReconnectDelay",(function(e){S("set max delay",e),_(v(t),L,e)})),g(v(t),"setMinReconnectDelay",(function(e){S("set min delay",e),_(v(t),C,e)})),g(v(t),"send",(function(e,r){if(!t.connected)return!1;_(v(t),A,E(v(t),A)+1);var n=Date.now(),o=(0,i.encode)(r?{event:e,id:E(v(t),A),data:r}:{event:e});return S("encoded","".concat(o.byteLength," bytes"),"in","".concat(Date.now()-n,"ms")),E(v(t),P).send(o),!0})),g(v(t),"close",(function(){if(S("close"),_(v(t),x,!0),E(v(t),P))try{var e;(e=E(v(t),P)).close.apply(e,arguments)}catch(e){S("error closing socket",e)}_(v(t),P,null),t.removeAllListeners(),clearTimeout(E(v(t),N)),clearInterval(E(v(t),I)),window.removeEventListener("unload",t.close)})),S("created cbor socket"),_(v(t),j,e),_(v(t),k,s),_(v(t),I,setInterval(E(v(t),q),6e4)),window.addEventListener("unload",t.close),t.on("error",(function(e){return S("ws errored",e)})),E(v(t),D).call(v(t)).catch(E(v(t),B)),t}return n=c,(o=[{key:"bufferedAmount",get:function(){return E(this,P)?E(this,P).bufferedAmount:1/0}},{key:"connected",get:function(){return!!E(this,P)&&E(this,P).readyState===E(this,P).OPEN}}])&&p(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),c}(c.EventEmitter);t.default=V},6683:function(e,t,r){function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(4843);var o=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,r;return t=e,r=[{key:"fromImage",value:function(e){var t=document.createElement("canvas");return t.width=e.width,t.height=e.height,t.getContext("2d").drawImage(e,0,0,t.width,t.height),this.fromCanvas(t)}},{key:"fromCanvas",value:function(e){return e.toDataURL?e.toDataURL("image/webp",.3):null}}],null&&n(t.prototype,null),r&&n(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.default=o},9421:function(e,t,r){function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(4011),r(1e3),r(4843);var o=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.rate=t,this.period=r,this._tracked=[]}var t,r;return t=e,(r=[{key:"limit",value:function(){var e=Date.now()-this.period;return this._tracked=this._tracked.filter((function(t){return t>e})),!(this._tracked.length<this.rate&&(this._tracked.push(Date.now()),1))}}])&&n(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.default=o},8755:function(e,t,r){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},o(e,t)}function i(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return a(e)}function a(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function c(e){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},c(e)}function u(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r(4277),r(3064),r(9616),r(444),r(1076),r(5547),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(1624),r(1e3),r(8719),r(2047),r(8534),r(3524),r(9344),r(4843);var s=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&o(e,t)}(l,e);var t,r,n,s=(r=l,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=c(r);if(n){var o=c(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return i(this,e)});function l(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),u(a(e=s.call(this)),"windows",new Set),u(a(e),"tap",(function(t){if(!e.windows.has(t)){e.windows.add(t);var r=a(e),n=t.history.pushState.bind(t.history);t.history.pushState=function(){n.apply(void 0,arguments),r.emit("navigate",t)};var o=t.history.replaceState.bind(t.history);t.history.replaceState=function(){o.apply(void 0,arguments),r.emit("navigate",t)};var i=t.CSSStyleSheet.prototype.insertRule;t.CSSStyleSheet.prototype.insertRule=function(){var e=i.bind(this).apply(void 0,arguments);return r.emit("stylechange",this),e};var c=t.CSSStyleSheet.prototype.deleteRule;t.CSSStyleSheet.prototype.deleteRule=function(){var e=c.bind(this).apply(void 0,arguments);return r.emit("stylechange",this),e};var u=t.CSSStyleSheet.prototype.replace;t.CSSStyleSheet.prototype.replace=function(){var e=u.bind(this).apply(void 0,arguments);return r.emit("stylechange",this),e};var s=t.CSSStyleSheet.prototype.replaceSync;t.CSSStyleSheet.prototype.replaceSync=function(){var e=s.bind(this).apply(void 0,arguments);return r.emit("stylechange",this),e}}})),u(a(e),"untap",(function(){})),e.setMaxListeners(200),e}return t=l,Object.defineProperty(t,"prototype",{writable:!1}),t}(r(1239).EventEmitter),l=new s;t.default=l},1560:function(e,t,r){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}r(4843),r(444),r(1076),r(5547),r(1624),r(2047),r(8534),r(8496),r(4802),r(2112),r(6353),r(3064),r(3275),r(6941),r(4277),r(6257),Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return u.apply(this,arguments)},r(1e3);var o=r(7743);function i(){i=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},c=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var i=t&&t.prototype instanceof h?t:h,a=Object.create(i.prototype),c=new k(n||[]);return o(a,"_invoke",{value:O(e,r,c)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=f;var p={};function h(){}function y(){}function v(){}var m={};l(m,c,(function(){return this}));var b=Object.getPrototypeOf,g=b&&b(b(P([])));g&&g!==t&&r.call(g,c)&&(m=g);var w=v.prototype=h.prototype=Object.create(m);function E(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function i(o,a,c,u){var s=d(e[o],e,a);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==n(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){i("next",e,c,u)}),(function(e){i("throw",e,c,u)})):t.resolve(f).then((function(e){l.value=e,c(l)}),(function(e){return i("throw",e,c,u)}))}u(s.arg)}var a;o(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){i(e,r,t,n)}))}return a=a?a.then(n,n):n()}})}function O(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=S(a,r);if(c){if(c===p)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=d(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,S(e,t),"throw"===t.method))return p;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var n=d(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,p;var o=n.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function P(e){if(e){var t=e[c];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:T}}function T(){return{value:void 0,done:!0}}return y.prototype=v,o(w,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,l(e,s,"GeneratorFunction")),e.prototype=Object.create(w),e},e.awrap=function(e){return{__await:e}},E(_.prototype),l(_.prototype,u,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},E(w),l(w,s,"Generator"),l(w,c,(function(){return this})),l(w,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=P,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),x(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:P(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function a(e,t,r,n,o,i,a){try{var c=e[i](a),u=c.value}catch(e){return void r(e)}c.done?t(u):Promise.resolve(u).then(n,o)}function c(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function c(e){a(i,n,o,c,u,"next",e)}function u(e){a(i,n,o,c,u,"throw",e)}c(void 0)}))}}function u(){return(u=c(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o.NodeSerializer.isLocalResource(window.location.href)&&console.warn("CobrowseIO: This page was loaded from a local address, Cobrowse may not work as expected due to inaccessible resources. We recommend using ngrok for testing development versions.");case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},3440:function(e,t,r){r(4843),Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o.default,n=["X-CobrowseSDKVersion=".concat(r.version),"X-CobrowsePlatform=web","X-CobrowseDevice=".concat(r.deviceId()),"X-CobrowseLicense=".concat(r.license)].join("&"),i=new URL(e,r.api).toString(),a=i.replace("https://","wss://").replace("http://","ws://");return new URL("sockets/1/ws?access_token=".concat(t,"&").concat(n),a).toString()},r(887),r(1e3),r(7285),r(1624),r(2047),r(8534),r(6955),r(8927),r(3524),r(9344),r(3114);var n,o=(n=r(1178))&&n.__esModule?n:{default:n}},7368:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.protect=function(e,t,r){e[n]||Object.defineProperty(e,n,{enumerable:!1,value:{}});var o=e[n][t];return Object.getPrototypeOf(Object.getPrototypeOf(e))[t]=o,Object.defineProperty(e[n],t,{enumerable:!1,value:r,configurable:!0}),r},r(444),r(1076),r(1e3),r(4843),r(3064);var n=Symbol("protected"),o=n;t.default=o},453:function(e,t,r){r(4843),Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o,r="",n=e;n>0;n-=1)r+=t[Math.floor(Math.random()*t.length)];return r},r(3114);var n="abcdefghijklmnopqrstuvwxyz",o="".concat("0123456789").concat(n.toLowerCase()).concat(n.toUpperCase())},3191:function(e,t,r){function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(3600),r(6770),r(4843);var o=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,r;return t=e,r=[{key:"isHeadless",value:function(){return navigator.userAgent.toLowerCase().includes("headless")}}],null&&n(t.prototype,null),r&&n(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.default=o},3936:function(e){e.exports=require("cbor-x")},3114:function(e){e.exports=require("core-js/modules/es.array.concat.js")},5220:function(e){e.exports=require("core-js/modules/es.array.fill.js")},4011:function(e){e.exports=require("core-js/modules/es.array.filter.js")},6706:function(e){e.exports=require("core-js/modules/es.array.find.js")},5793:function(e){e.exports=require("core-js/modules/es.array.flat-map.js")},6486:function(e){e.exports=require("core-js/modules/es.array.from.js")},3600:function(e){e.exports=require("core-js/modules/es.array.includes.js")},3257:function(e){e.exports=require("core-js/modules/es.array.index-of.js")},1624:function(e){e.exports=require("core-js/modules/es.array.iterator.js")},887:function(e){e.exports=require("core-js/modules/es.array.join.js")},3133:function(e){e.exports=require("core-js/modules/es.array.map.js")},5562:function(e){e.exports=require("core-js/modules/es.array.reduce.js")},6257:function(e){e.exports=require("core-js/modules/es.array.slice.js")},1896:function(e){e.exports=require("core-js/modules/es.array.sort.js")},3794:function(e){e.exports=require("core-js/modules/es.array.splice.js")},1861:function(e){e.exports=require("core-js/modules/es.array.unscopables.flat-map.js")},6941:function(e){e.exports=require("core-js/modules/es.function.name.js")},2112:function(e){e.exports=require("core-js/modules/es.json.to-string-tag.js")},4391:function(e){e.exports=require("core-js/modules/es.map.js")},6353:function(e){e.exports=require("core-js/modules/es.math.to-string-tag.js")},5538:function(e){e.exports=require("core-js/modules/es.number.constructor.js")},6369:function(e){e.exports=require("core-js/modules/es.object.assign.js")},6507:function(e){e.exports=require("core-js/modules/es.object.define-properties.js")},4843:function(e){e.exports=require("core-js/modules/es.object.define-property.js")},3260:function(e){e.exports=require("core-js/modules/es.object.freeze.js")},5226:function(e){e.exports=require("core-js/modules/es.object.get-own-property-descriptor.js")},9270:function(e){e.exports=require("core-js/modules/es.object.get-own-property-descriptors.js")},6565:function(e){e.exports=require("core-js/modules/es.object.get-own-property-names.js")},3064:function(e){e.exports=require("core-js/modules/es.object.get-prototype-of.js")},5128:function(e){e.exports=require("core-js/modules/es.object.keys.js")},4277:function(e){e.exports=require("core-js/modules/es.object.set-prototype-of.js")},1e3:function(e){e.exports=require("core-js/modules/es.object.to-string.js")},1087:function(e){e.exports=require("core-js/modules/es.object.values.js")},9497:function(e){e.exports=require("core-js/modules/es.parse-int.js")},9616:function(e){e.exports=require("core-js/modules/es.reflect.construct.js")},1112:function(e){e.exports=require("core-js/modules/es.reflect.get.js")},9806:function(e){e.exports=require("core-js/modules/es.regexp.constructor.js")},3524:function(e){e.exports=require("core-js/modules/es.regexp.exec.js")},7285:function(e){e.exports=require("core-js/modules/es.regexp.to-string.js")},8719:function(e){e.exports=require("core-js/modules/es.set.js")},6770:function(e){e.exports=require("core-js/modules/es.string.includes.js")},2047:function(e){e.exports=require("core-js/modules/es.string.iterator.js")},3317:function(e){e.exports=require("core-js/modules/es.string.match.js")},5393:function(e){e.exports=require("core-js/modules/es.string.pad-start.js")},9344:function(e){e.exports=require("core-js/modules/es.string.replace.js")},685:function(e){e.exports=require("core-js/modules/es.string.split.js")},242:function(e){e.exports=require("core-js/modules/es.string.trim.js")},8496:function(e){e.exports=require("core-js/modules/es.symbol.async-iterator.js")},1076:function(e){e.exports=require("core-js/modules/es.symbol.description.js")},5547:function(e){e.exports=require("core-js/modules/es.symbol.iterator.js")},444:function(e){e.exports=require("core-js/modules/es.symbol.js")},4802:function(e){e.exports=require("core-js/modules/es.symbol.to-string-tag.js")},7639:function(e){e.exports=require("core-js/modules/es.typed-array.copy-within.js")},6996:function(e){e.exports=require("core-js/modules/es.typed-array.every.js")},1366:function(e){e.exports=require("core-js/modules/es.typed-array.fill.js")},3558:function(e){e.exports=require("core-js/modules/es.typed-array.filter.js")},8630:function(e){e.exports=require("core-js/modules/es.typed-array.find-index.js")},8852:function(e){e.exports=require("core-js/modules/es.typed-array.find.js")},8858:function(e){e.exports=require("core-js/modules/es.typed-array.for-each.js")},6480:function(e){e.exports=require("core-js/modules/es.typed-array.includes.js")},7219:function(e){e.exports=require("core-js/modules/es.typed-array.index-of.js")},2160:function(e){e.exports=require("core-js/modules/es.typed-array.iterator.js")},4289:function(e){e.exports=require("core-js/modules/es.typed-array.join.js")},8165:function(e){e.exports=require("core-js/modules/es.typed-array.last-index-of.js")},4613:function(e){e.exports=require("core-js/modules/es.typed-array.map.js")},3748:function(e){e.exports=require("core-js/modules/es.typed-array.reduce-right.js")},3292:function(e){e.exports=require("core-js/modules/es.typed-array.reduce.js")},9157:function(e){e.exports=require("core-js/modules/es.typed-array.reverse.js")},5529:function(e){e.exports=require("core-js/modules/es.typed-array.set.js")},4882:function(e){e.exports=require("core-js/modules/es.typed-array.slice.js")},7233:function(e){e.exports=require("core-js/modules/es.typed-array.some.js")},1086:function(e){e.exports=require("core-js/modules/es.typed-array.sort.js")},8786:function(e){e.exports=require("core-js/modules/es.typed-array.subarray.js")},5544:function(e){e.exports=require("core-js/modules/es.typed-array.to-locale-string.js")},1304:function(e){e.exports=require("core-js/modules/es.typed-array.to-string.js")},9382:function(e){e.exports=require("core-js/modules/es.typed-array.uint16-array.js")},2827:function(e){e.exports=require("core-js/modules/es.typed-array.uint8-array.js")},1157:function(e){e.exports=require("core-js/modules/es.weak-map.js")},9280:function(e){e.exports=require("core-js/modules/es.weak-set.js")},3275:function(e){e.exports=require("core-js/modules/web.dom-collections.for-each.js")},8534:function(e){e.exports=require("core-js/modules/web.dom-collections.iterator.js")},8927:function(e){e.exports=require("core-js/modules/web.url-search-params.js")},6955:function(e){e.exports=require("core-js/modules/web.url.js")},1320:function(e){e.exports=require("dompurify")},1239:function(e){e.exports=require("events")},2449:function(e){e.exports=require("events-polyfill/src/constructors")},2404:function(e){e.exports=require("fast-deep-equal")},6734:function(e){e.exports=require("js-cookie")},136:function(e){e.exports=require("lodash/isMatch")},1381:function(e){e.exports=require("lodash/throttle")},3231:function(e){e.exports=require("ms")},5828:function(e){e.exports=require("uuid")}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}var n={};return function(){var e=n;r(4843),e.default=void 0;var t,o=(t=r(1178))&&t.__esModule?t:{default:t},i=o.default;if(window.__cobrowse_io_loaded)throw o.default=function(){throw new Error('"CobrowseIO" is read-only.')}(),new Error("CobrowseIO already loaded. This usually means you included the snippet multiple times.");window.__cobrowse_io_loaded=!0;var a=i;e.default=a}(),n.default}()}));
2
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.CobrowseIO=t():e.CobrowseIO=t()}(self,(function(){return function(){"use strict";var e={3606:function(e,t,r){function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function o(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}Object.defineProperty(t,"__esModule",{value:!0}),t.EbmlElementId=void 0,t.getEbmlElementIdLength=c,t.getEbmlElementLevel=function(e){switch(e){case a.Ebml:case a.Segment:return 0;case a.Cluster:case a.Cues:case a.DocType:case a.DocTypeReadVersion:case a.DocTypeVersion:case a.EbmlMaxIdLength:case a.EbmlMaxSizeLength:case a.EbmlReadVersion:case a.EbmlVersion:case a.Info:case a.SeekHead:case a.Tracks:return 1;case a.CuePoint:case a.DateUTC:case a.Duration:case a.MuxingApp:case a.Position:case a.SegmentUID:case a.Seek:case a.SimpleBlock:case a.Timestamp:case a.TimestampScale:case a.Title:case a.TrackEntry:case a.WritingApp:return 2;case a.Audio:case a.CodecDecodeAll:case a.CodecID:case a.CodecName:case a.CodecPrivate:case a.CueTime:case a.CueTrackPositions:case a.DefaultDuration:case a.FlagDefault:case a.FlagEnabled:case a.FlagForced:case a.FlagLacing:case a.MaxBlockAdditionID:case a.MinCache:case a.SeekID:case a.SeekPosition:case a.SeekPreRoll:case a.TrackNumber:case a.TrackTimestampScale:case a.TrackType:case a.TrackUID:case a.Video:return 3;case a.Channels:case a.CueBlockNumber:case a.CueClusterPosition:case a.CueTrack:case a.FlagInterlaced:case a.PixelHeight:case a.PixelWidth:case a.SamplingFrequency:case a.Colour:return 4;case a.CueRefTime:return 5;case a.Void:return-1;default:throw Error("cannot determine level of unknown ebml element with id ".concat(e))}},t.getEbmlElementName=function(e){switch(e){case a.Ebml:return"EBML";case a.EbmlVersion:return"EBMLVersion";case a.EbmlReadVersion:return"EBMLReadVersion";case a.EbmlMaxIdLength:return"EBMLMaxIDLength";case a.EbmlMaxSizeLength:return"EBMLMaxSizeLength";case a.DocType:return"DocType";case a.DocTypeVersion:return"DocTypeVersion";case a.DocTypeReadVersion:return"DocTypeReadVersion";case a.Void:return"Void";case a.Segment:return"Segment";case a.SeekHead:return"SeekHead";case a.Seek:return"Seek";case a.SeekID:return"SeekID";case a.SeekPosition:return"SeekPosition";case a.Info:return"Info";case a.TimestampScale:return"TimestampScale";case a.Duration:return"Duration";case a.DateUTC:return"DateUTC";case a.Title:return"Title";case a.MuxingApp:return"MuxingApp";case a.WritingApp:return"WritinApp";case a.Cluster:return"Cluster";case a.Timestamp:return"Timestamp";case a.SimpleBlock:return"SimpleBlock";case a.SegmentUID:return"SegmentUID (unsupported by WebM)";case a.Tracks:return"Tracks";case a.TrackEntry:return"TrackEntry";case a.TrackNumber:return"TrackNumber";case a.TrackUID:return"TrackUID";case a.TrackType:return"TrackType";case a.FlagEnabled:return"FlagEnabled";case a.FlagDefault:return"FlagDefault";case a.FlagForced:return"FlagForced";case a.FlagLacing:return"FlagLacing";case a.MinCache:return"MinCache";case a.MaxBlockAdditionID:return"MaxBlockAdditionID";case a.CodecID:return"CodecID";case a.CodecDecodeAll:return"CodecDecodeAll";case a.SeekPreRoll:return"SeekPreRoll";case a.Video:return"Video";case a.FlagInterlaced:return"FlagInterlaced";case a.PixelWidth:return"PixelWidth";case a.PixelHeight:return"PixelHeight";case a.DefaultDuration:return"DefaultDuration";case a.TrackTimestampScale:return"TrackTimestampScale";case a.CodecName:return"CodecName";case a.CodecPrivate:return"CodecPrivate";case a.Audio:return"Audio";case a.SamplingFrequency:return"SamplingFrequency";case a.Channels:return"Channels";case a.Cues:return"Cues";case a.CuePoint:return"CuePoint";case a.CueTime:return"CueTime";case a.CueTrackPositions:return"CueTrackPositions";case a.CueTrack:return"CueTrack";case a.CueClusterPosition:return"CueClusterPosition";case a.CueRefTime:return"CueRefTime";case a.CueBlockNumber:return"CueBlockNumber";case a.Position:return"Position";case a.Colour:return"Colour";default:return""}},t.readEbmlElementId=function(e,t){var r=c(e.current);if(r>e.bytesAvailable)return!1;for(var n=e.current,o=0;o<r-1;++o)n=n<<8|e.nextUnsafe();return e.nextUnsafe(),e.checkBounds(),t.id=n,t.idLength=r,!0},r(4843);var a=o((function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}));function c(e){for(var t=7;t>3;t--)if(e&1<<t)return 8-t;throw Error("invalid ebml element id")}t.EbmlElementId=a,i(a,"Ebml",440786851),i(a,"EbmlVersion",17030),i(a,"EbmlReadVersion",17143),i(a,"EbmlMaxIdLength",17138),i(a,"EbmlMaxSizeLength",17139),i(a,"DocType",17026),i(a,"DocTypeVersion",17031),i(a,"DocTypeReadVersion",17029),i(a,"Void",236),i(a,"Segment",408125543),i(a,"SeekHead",290298740),i(a,"Seek",19899),i(a,"SeekID",21419),i(a,"SeekPosition",21420),i(a,"Info",357149030),i(a,"TimestampScale",2807729),i(a,"Duration",17545),i(a,"DateUTC",17505),i(a,"Title",31657),i(a,"MuxingApp",19840),i(a,"WritingApp",22337),i(a,"Cluster",524531317),i(a,"Timestamp",231),i(a,"SimpleBlock",163),i(a,"SegmentUID",29604),i(a,"Tracks",374648427),i(a,"TrackEntry",174),i(a,"TrackNumber",215),i(a,"TrackUID",29637),i(a,"TrackType",131),i(a,"FlagEnabled",185),i(a,"FlagDefault",136),i(a,"FlagForced",21930),i(a,"FlagLacing",156),i(a,"MinCache",28135),i(a,"MaxBlockAdditionID",21998),i(a,"CodecID",134),i(a,"CodecDecodeAll",170),i(a,"SeekPreRoll",22203),i(a,"Video",224),i(a,"FlagInterlaced",154),i(a,"PixelWidth",176),i(a,"PixelHeight",186),i(a,"DefaultDuration",2352003),i(a,"TrackTimestampScale",2306383),i(a,"CodecName",2459272),i(a,"CodecPrivate",25506),i(a,"Audio",225),i(a,"SamplingFrequency",181),i(a,"Channels",159),i(a,"Cues",475249515),i(a,"CuePoint",187),i(a,"CueTime",179),i(a,"CueTrackPositions",183),i(a,"CueTrack",247),i(a,"CueClusterPosition",241),i(a,"CueRefTime",150),i(a,"CueBlockNumber",21368),i(a,"Position",167),i(a,"Colour",21936)},3300:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.EbmlElementType=void 0,t.getEbmlElementType=function(e){switch(e){case n.EbmlElementId.Segment:case n.EbmlElementId.Ebml:case n.EbmlElementId.SeekHead:case n.EbmlElementId.Seek:case n.EbmlElementId.Cluster:case n.EbmlElementId.Info:case n.EbmlElementId.Tracks:case n.EbmlElementId.TrackEntry:case n.EbmlElementId.Video:case n.EbmlElementId.Audio:case n.EbmlElementId.Cues:case n.EbmlElementId.CuePoint:case n.EbmlElementId.CueTrackPositions:case n.EbmlElementId.Colour:return c.Master;case n.EbmlElementId.EbmlVersion:case n.EbmlElementId.EbmlReadVersion:case n.EbmlElementId.EbmlMaxIdLength:case n.EbmlElementId.EbmlMaxSizeLength:case n.EbmlElementId.DocTypeVersion:case n.EbmlElementId.DocTypeReadVersion:case n.EbmlElementId.SeekPosition:case n.EbmlElementId.TimestampScale:case n.EbmlElementId.Timestamp:case n.EbmlElementId.TrackNumber:case n.EbmlElementId.TrackUID:case n.EbmlElementId.TrackType:case n.EbmlElementId.FlagEnabled:case n.EbmlElementId.FlagDefault:case n.EbmlElementId.FlagForced:case n.EbmlElementId.FlagLacing:case n.EbmlElementId.MinCache:case n.EbmlElementId.MaxBlockAdditionID:case n.EbmlElementId.CodecDecodeAll:case n.EbmlElementId.SeekPreRoll:case n.EbmlElementId.FlagInterlaced:case n.EbmlElementId.PixelWidth:case n.EbmlElementId.PixelHeight:case n.EbmlElementId.DefaultDuration:case n.EbmlElementId.Channels:case n.EbmlElementId.CueTime:case n.EbmlElementId.CueTrack:case n.EbmlElementId.CueClusterPosition:case n.EbmlElementId.CueRefTime:case n.EbmlElementId.CueBlockNumber:case n.EbmlElementId.Position:return c.UnsignedInteger;case n.EbmlElementId.DocType:case n.EbmlElementId.CodecID:return c.String;case n.EbmlElementId.Void:case n.EbmlElementId.SeekID:case n.EbmlElementId.SimpleBlock:case n.EbmlElementId.SegmentUID:case n.EbmlElementId.CodecPrivate:return c.Binary;case n.EbmlElementId.Duration:case n.EbmlElementId.TrackTimestampScale:case n.EbmlElementId.SamplingFrequency:return c.Float;case n.EbmlElementId.DateUTC:return c.Date;case n.EbmlElementId.Title:case n.EbmlElementId.MuxingApp:case n.EbmlElementId.WritingApp:case n.EbmlElementId.CodecName:return c.Utf8String;default:throw Error("cannot determine type of unknown ebml element with id ".concat(e))}},r(4843);var n=r(3606);function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function i(e,t,r){return t&&o(e.prototype,t),r&&o(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var c=i((function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}));t.EbmlElementType=c,a(c,"Unknown",0),a(c,"Master",1),a(c,"UnsignedInteger",2),a(c,"SignedInteger",3),a(c,"String",4),a(c,"Utf8String",5),a(c,"Binary",6),a(c,"Float",7),a(c,"Date",8)},1981:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.epochTimestampOffset=t.EbmlElement=void 0,t.getEbmlElementSizeLength=s,t.getEbmlElementValue=function(e,t){switch(e){case o.EbmlElementType.UnsignedInteger:case o.EbmlElementType.SignedInteger:return(0,i.readBigEndianNumber)(t);case o.EbmlElementType.String:return String.fromCharCode.apply(null,t);case o.EbmlElementType.Utf8String:case o.EbmlElementType.Float:throw new Error("cannot read value of element with type ".concat(e));case o.EbmlElementType.Date:return c+(0,i.readBigEndianNumber)(t);case o.EbmlElementType.Binary:return t}},t.readEbmlLementSize=function(e,t){var r=s(e.current);if(r>e.bytesAvailable)return!1;for(var n=e.current-(1<<8-r),o=0;o<r-1;++o)n=n<<8|e.nextUnsafe();return e.nextUnsafe(),e.checkBounds(),t.sizeLength=r,t.size=n===1<<8*r-1?-1:n,!0},r(6941),r(4843);var n=r(3606),o=r(3300),i=r(2706);function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var c=978307200;t.epochTimestampOffset=c;var u=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,r;return t=e,(r=[{key:"elementSize",get:function(){return this.idLength+this.sizeLength+this.size}},{key:"id",get:function(){return this._id},set:function(e){this._id=e,this.name=(0,n.getEbmlElementName)(this._id),this.type=(0,o.getEbmlElementType)(this._id)}}])&&a(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function s(e){if(1==e)return 8;for(var t=7;t>0;t--)if(e&1<<t)return 8-t;throw Error("invalid ebml element size")}t.EbmlElement=u},1639:function(e,t,r){r(4843),Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"MediaInfo",{enumerable:!0,get:function(){return c.MediaInfo}}),Object.defineProperty(t,"MediaPacket",{enumerable:!0,get:function(){return a.MediaPacket}}),Object.defineProperty(t,"MediaRecorderDemuxer",{enumerable:!0,get:function(){return n.MediaRecorderDemuxer}}),Object.defineProperty(t,"MediaRecorderDemuxerEvents",{enumerable:!0,get:function(){return o.MediaRecorderDemuxerEvents}}),Object.defineProperty(t,"createMediaRecorderDemuxer",{enumerable:!0,get:function(){return i.createMediaRecorderDemuxer}});var n=r(9285),o=r(2981),i=r(6202),a=r(4151),c=r(5504)},5504:function(e,t,r){function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function o(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}r(4843),Object.defineProperty(t,"__esModule",{value:!0}),t.MediaInfo=void 0;var i=o((function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.videoTrack={},this.audioTrack={}}));t.MediaInfo=i},4151:function(e,t,r){function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function o(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}r(4843),Object.defineProperty(t,"__esModule",{value:!0}),t.MediaPacket=void 0;var i=o((function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.data=t,this.ptsMs=r}));t.MediaPacket=i},2981:function(e,t,r){function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function o(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}Object.defineProperty(t,"__esModule",{value:!0}),t.MediaRecorderDemuxerEvents=void 0,r(4843);var a=o((function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}));t.MediaRecorderDemuxerEvents=a,i(a,"Error","error"),i(a,"MediaInfo","media-info"),i(a,"MediaPacket","media-packet")},6202:function(e,t,r){r(4843),Object.defineProperty(t,"__esModule",{value:!0}),t.createMediaRecorderDemuxer=function(e,t){var r;return"undefined"!=typeof MediaRecorder==0?null:(("function"==typeof MediaRecorder.isTypeSupported==0||MediaRecorder.isTypeSupported("video/webm;codecs=h264"))&&(r=new n.WebmMediaRecorderDemuxer(new MediaRecorder(e,{mimeType:"video/webm;codecs=h264"}),t)),r)};var n=r(5102);r(2981)},9285:function(e,t,r){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}r(1e3),r(9616),r(4843),r(5128),r(444),r(4011),r(5226),r(3275),r(9270),r(6507),r(1076),r(5547),r(1624),r(2047),r(8534),r(8496),r(4802),r(2112),r(6353),r(6941),r(6257),Object.defineProperty(t,"__esModule",{value:!0}),t.defaultMediaRecorderOptions=t.MediaRecorderDemuxer=void 0,r(4277),r(3064);var o=r(5504),i=r(2981);function a(){a=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var i=t&&t.prototype instanceof h?t:h,a=Object.create(i.prototype),c=new k(n||[]);return o(a,"_invoke",{value:O(e,r,c)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=f;var p={};function h(){}function y(){}function v(){}var m={};l(m,c,(function(){return this}));var b=Object.getPrototypeOf,g=b&&b(b(P([])));g&&g!==t&&r.call(g,c)&&(m=g);var w=v.prototype=h.prototype=Object.create(m);function E(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function i(o,a,c,u){var s=d(e[o],e,a);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==n(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){i("next",e,c,u)}),(function(e){i("throw",e,c,u)})):t.resolve(f).then((function(e){l.value=e,c(l)}),(function(e){return i("throw",e,c,u)}))}u(s.arg)}var a;o(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){i(e,r,t,n)}))}return a=a?a.then(n,n):n()}})}function O(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=S(a,r);if(c){if(c===p)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=d(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,S(e,t),"throw"===t.method))return p;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var n=d(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,p;var o=n.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function P(e){if(e){var t=e[c];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:T}}function T(){return{value:void 0,done:!0}}return y.prototype=v,o(w,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,l(e,s,"GeneratorFunction")),e.prototype=Object.create(w),e},e.awrap=function(e){return{__await:e}},E(_.prototype),l(_.prototype,u,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},E(w),l(w,s,"Generator"),l(w,c,(function(){return this})),l(w,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=P,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),x(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:P(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function c(e,t,r,n,o,i,a){try{var c=e[i](a),u=c.value}catch(e){return void r(e)}c.done?t(u):Promise.resolve(u).then(n,o)}function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u(Object(r),!0).forEach((function(t){l(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function l(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function f(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d(e,t)}function p(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}var y=r(1239),v={timerInterval:100,logCallback:null};t.defaultMediaRecorderOptions=v;var m=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&d(e,t)}(m,e);var t,r,n,u,l,y=(u=m,l=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=h(u);if(l){var r=h(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return p(this,e)});function m(e,t){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,m),(r=y.call(this)).options=t?s(s({},v),t):v,r.mediaRecorder=e,r.mediaInfo=new o.MediaInfo,r.mediaRecorder.addEventListener("dataavailable",function(){var e,t=(e=a().mark((function e(t){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r.addBlob(t.data);case 1:case"end":return e.stop()}}),e)})),function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){c(i,n,o,a,u,"next",e)}function u(e){c(i,n,o,a,u,"throw",e)}a(void 0)}))});return function(e){return t.apply(this,arguments)}}()),r.mediaRecorder.addEventListener("error",(function(e){r.emit(i.MediaRecorderDemuxerEvents.Error,e.error)})),r}return t=m,n=[{key:"isSupported",value:function(e){return"undefined"!=typeof MediaRecorder&&"function"==typeof MediaRecorder.prototype.requestData&&"function"==typeof MediaRecorder.isTypeSupported&&MediaRecorder.isTypeSupported(e)}}],(r=[{key:"start",value:function(){var e=this;this.mediaRecorder.start(),"function"==typeof this.mediaRecorder.requestData?this.timer=window.setInterval((function(){e.mediaRecorder.requestData()}),this.options.timerInterval):this.timer=window.setTimeout((function(){e.mediaRecorder.stop()}),this.options.timerInterval)}},{key:"stop",value:function(){"recording"===this.mediaRecorder.state&&this.mediaRecorder.stop(),this.timer&&(clearInterval(this.timer),this.timer=null)}}])&&f(t.prototype,r),n&&f(t,n),Object.defineProperty(t,"prototype",{writable:!1}),m}(y);t.MediaRecorderDemuxer=m},5102:function(e,t,r){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}r(4843),r(4277),r(3064),r(9616),r(444),r(1076),r(5547),r(2047),r(8534),r(8496),r(4802),r(2112),r(6353),r(3275),r(6257),Object.defineProperty(t,"__esModule",{value:!0}),t.webmVideoTrackType=t.webmAudioTrackType=t.WebmMediaRecorderDemuxer=void 0,r(1e3),r(1624),r(2827),r(7639),r(6996),r(1366),r(3558),r(8852),r(8630),r(8858),r(6480),r(7219),r(2160),r(4289),r(8165),r(4613),r(3292),r(3748),r(9157),r(5529),r(4882),r(7233),r(1086),r(8786),r(5544),r(1304),r(3114),r(6941),r(6369),r(242);var o=r(9285),i=r(3606),a=r(1981),c=r(2706),u=r(3300),s=r(2981),l=r(4151);function f(){f=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var i=t&&t.prototype instanceof h?t:h,a=Object.create(i.prototype),c=new k(n||[]);return o(a,"_invoke",{value:O(e,r,c)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var p={};function h(){}function y(){}function v(){}var m={};s(m,a,(function(){return this}));var b=Object.getPrototypeOf,g=b&&b(b(P([])));g&&g!==t&&r.call(g,a)&&(m=g);var w=v.prototype=h.prototype=Object.create(m);function E(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function i(o,a,c,u){var s=d(e[o],e,a);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==n(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){i("next",e,c,u)}),(function(e){i("throw",e,c,u)})):t.resolve(f).then((function(e){l.value=e,c(l)}),(function(e){return i("throw",e,c,u)}))}u(s.arg)}var a;o(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){i(e,r,t,n)}))}return a=a?a.then(n,n):n()}})}function O(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=S(a,r);if(c){if(c===p)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=d(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,S(e,t),"throw"===t.method))return p;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var n=d(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,p;var o=n.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function P(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:T}}function T(){return{value:void 0,done:!0}}return y.prototype=v,o(w,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=s(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,u,"GeneratorFunction")),e.prototype=Object.create(w),e},e.awrap=function(e){return{__await:e}},E(_.prototype),s(_.prototype,c,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(l(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},E(w),s(w,u,"Generator"),s(w,a,(function(){return this})),s(w,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=P,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),x(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:P(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function d(e,t,r,n,o,i,a){try{var c=e[i](a),u=c.value}catch(e){return void r(e)}c.done?t(u):Promise.resolve(u).then(n,o)}function p(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function h(e,t){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},h(e,t)}function y(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function v(e){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},v(e)}function m(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function b(){var e=this;return new Promise((function(t){var r=new FileReader;r.onload=function(){t(r.result)},r.readAsArrayBuffer(e)}))}t.webmVideoTrackType=1,t.webmAudioTrackType=2;var g=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&h(e,t)}(E,e);var t,r,n,o,m,g,w=(m=E,g=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=v(m);if(g){var r=v(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return y(this,e)});function E(e,t){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,E),(r=w.call(this,e,t)).state=E.stateParseElementId,r.currentEbmlElement=new a.EbmlElement,r.uint8ArrayAggregator=new c.Uint8ArrayAggregator,r.clusterTimestamp=0,r.timestampMsScale=1,r.ebmlElementStack=[],Blob.prototype.arrayBuffer=Blob.prototype.arrayBuffer||b,r}return t=E,r=[{key:"addBlob",value:(n=f().mark((function e(t){var r,n,o,d,p,h,y,v,m,b,g,w,_;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.t0=this.uint8ArrayAggregator,e.t1=Uint8Array,e.next=5,t.arrayBuffer();case 5:e.t2=e.sent,e.t3=new e.t1(e.t2),e.t0.addArray.call(e.t0,e.t3);case 8:if(!this.uint8ArrayAggregator.bytesAvailable){e.next=106;break}e.t4=this.state,e.next=e.t4===E.stateParseElementId?12:e.t4===E.stateParseElementLength?19:e.t4===E.stateParseElementValue?27:104;break;case 12:if(!(0,i.readEbmlElementId)(this.uint8ArrayAggregator,this.currentEbmlElement)){e.next=16;break}null==this.options.logCallback||this.options.logCallback("got new current ebml element (id: ".concat(this.currentEbmlElement.id,", name: ").concat(this.currentEbmlElement.name,")")),e.next=17;break;case 16:return e.abrupt("break",104);case 17:return this.state=E.stateParseElementLength,e.abrupt("break",104);case 19:if(!(0,a.readEbmlLementSize)(this.uint8ArrayAggregator,this.currentEbmlElement)){e.next=23;break}null==this.options.logCallback||this.options.logCallback("got size ".concat(this.currentEbmlElement.size," for current ebml element (id: ").concat(this.currentEbmlElement.id,", name: ").concat(this.currentEbmlElement.name,")")),e.next=24;break;case 23:return e.abrupt("break",104);case 24:return this.ebmlElementStack.length&&-1==this.currentEbmlElement.size&&(this.ebmlElementStack=[]),this.state=E.stateParseElementValue,e.abrupt("break",104);case 27:if(r=(0,u.getEbmlElementType)(this.currentEbmlElement.id),n=r!==u.EbmlElementType.Master||this.currentEbmlElement.id===i.EbmlElementId.Colour,r===u.EbmlElementType.Master&&-1!==this.currentEbmlElement.size&&this.ebmlElementStack.push({element:Object.assign(new a.EbmlElement,this.currentEbmlElement),bytesRemaining:this.currentEbmlElement.size}),this.currentEbmlElement.id!==i.EbmlElementId.CodecID){e.next=40;break}if(n=!1,null!=(o=this.uint8ArrayAggregator.extract(this.currentEbmlElement.size))){e.next=35;break}return e.abrupt("break",104);case 35:d=(0,a.getEbmlElementValue)(this.currentEbmlElement.type,o),1===this.currentTrackType?this.mediaInfo.videoTrack.codecName=d:2===this.currentTrackType&&(this.mediaInfo.audioTrack.codecName=d),null==this.options.logCallback||this.options.logCallback("got codec id ".concat(d)),e.next=91;break;case 40:if(this.currentEbmlElement.id!==i.EbmlElementId.CodecPrivate){e.next=47;break}if(n=!1,null!=this.uint8ArrayAggregator.extract(this.currentEbmlElement.size)){e.next=45;break}return e.abrupt("break",104);case 45:e.next=91;break;case 47:if(this.currentEbmlElement.id!==i.EbmlElementId.TimestampScale){e.next=57;break}if(n=!1,null!=(p=this.uint8ArrayAggregator.extract(this.currentEbmlElement.size))){e.next=52;break}return e.abrupt("break",104);case 52:this.mediaInfo.timestampScale=(0,a.getEbmlElementValue)(this.currentEbmlElement.type,p),this.timestampMsScale=this.mediaInfo.timestampScale/1e6,null==this.options.logCallback||this.options.logCallback("got timestamp scale ".concat(this.mediaInfo.timestampScale)),e.next=91;break;case 57:if(this.currentEbmlElement.id!==i.EbmlElementId.Timestamp){e.next=66;break}if(n=!1,null!=(h=this.uint8ArrayAggregator.extract(this.currentEbmlElement.size))){e.next=62;break}return e.abrupt("break",104);case 62:this.clusterTimestamp=(0,a.getEbmlElementValue)(this.currentEbmlElement.type,h),null==this.options.logCallback||this.options.logCallback("got cluser timestamp ".concat(this.clusterTimestamp)),e.next=91;break;case 66:if(this.currentEbmlElement.id!==i.EbmlElementId.TrackType){e.next=75;break}if(n=!1,null!=(y=this.uint8ArrayAggregator.extract(this.currentEbmlElement.size))){e.next=71;break}return e.abrupt("break",104);case 71:this.currentTrackType=(0,a.getEbmlElementValue)(this.currentEbmlElement.type,y),null==this.options.logCallback||this.options.logCallback("got track with type ".concat(this.currentTrackType)),e.next=91;break;case 75:if(this.currentEbmlElement.id!==i.EbmlElementId.SimpleBlock){e.next=91;break}if(n=!1,null!=(v=this.uint8ArrayAggregator.extract(this.currentEbmlElement.size))){e.next=80;break}return e.abrupt("break",104);case 80:(m=new c.Uint8ArrayAggregator).addArray(v),b={},(0,a.readEbmlLementSize)(m,b),g=(0,c.readBigEndianNumber)(m.extract(2)),m.current,m.next(),m.trim(),w=(this.clusterTimestamp+g)*this.timestampMsScale,this.emit(s.MediaRecorderDemuxerEvents.MediaPacket,new l.MediaPacket(m.array,w));case 91:if(n&&this.uint8ArrayAggregator.skip(this.currentEbmlElement.size),r===u.EbmlElementType.Master||!this.ebmlElementStack.length){e.next=102;break}this.ebmlElementStack[this.ebmlElementStack.length-1].bytesRemaining-=this.currentEbmlElement.elementSize;case 94:if(0!==this.ebmlElementStack[this.ebmlElementStack.length-1].bytesRemaining){e.next=100;break}_=this.ebmlElementStack.pop(),this.ebmlElementStack.length&&(this.ebmlElementStack[this.ebmlElementStack.length-1].bytesRemaining-=_.element.elementSize),_.element.id===i.EbmlElementId.Tracks&&this.emit(s.MediaRecorderDemuxerEvents.MediaInfo,this.mediaInfo),e.next=101;break;case 100:return e.abrupt("break",102);case 101:if(this.ebmlElementStack.length){e.next=94;break}case 102:return this.state=E.stateParseElementId,e.abrupt("break",104);case 104:e.next=8;break;case 106:this.uint8ArrayAggregator.trim(),e.next=113;break;case 109:e.prev=109,e.t5=e.catch(0),this.stop(),this.emit(s.MediaRecorderDemuxerEvents.Error,e.t5);case 113:case"end":return e.stop()}}),e,this,[[0,109]])})),o=function(){var e=this,t=arguments;return new Promise((function(r,o){var i=n.apply(e,t);function a(e){d(i,r,o,a,c,"next",e)}function c(e){d(i,r,o,a,c,"throw",e)}a(void 0)}))},function(e){return o.apply(this,arguments)})}],r&&p(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),E}(o.MediaRecorderDemuxer);t.WebmMediaRecorderDemuxer=g,m(g,"stateParseElementId",1),m(g,"stateParseElementLength",2),m(g,"stateParseElementValue",3)},2706:function(e,t,r){function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}r(4843),Object.defineProperty(t,"__esModule",{value:!0}),t.Uint8ArrayAggregator=void 0,t.readBigEndianNumber=function(e){var t=0;return e.forEach((function(e){t=t<<8|e})),t},r(1e3),r(3275),r(6257),r(1624),r(2827),r(7639),r(6996),r(1366),r(3558),r(8852),r(8630),r(8858),r(6480),r(7219),r(2160),r(4289),r(8165),r(4613),r(3292),r(3748),r(9157),r(5529),r(4882),r(7233),r(1086),r(8786),r(5544),r(1304),r(3114);var o=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.array=null,this.current=null,this.offset=0}var t,r;return t=e,(r=[{key:"addArray",value:function(e){if(null!=e&&0!=e.length)if(this.bytesToSkip>=e.length)this.bytesToSkip-=e.length;else{if(this.bytesToSkip&&(e=e.slice(this.bytesToSkip)),this.array){var t=new Uint8Array(this.array.length-this.offset+e.length);t.set(this.offset?this.array.slice(this.offset):this.array,0),t.set(e,this.array.length-this.offset),this.array=t,this.offset=0}else this.array=e;this.current=this.array[0]}}},{key:"checkBounds",value:function(){if(this.offset===this.array.length)this.offset=0,this.current=null,this.array=null;else{if(!(this.offset<this.array.length))throw Error("invalid Uint8ArrayAggregator state, offset (".concat(this.offset,") is larger than bytes in the current array (").concat(this.array.length,")"));this.current=this.array[this.offset]}}},{key:"next",value:function(){return this.array?(this.offset++,this.checkBounds(),this.current):null}},{key:"nextUnsafe",value:function(){return this.offset++,this.current=this.array[this.offset],this.current}},{key:"bytesAvailable",get:function(){return this.array?this.array.length-this.offset:0}},{key:"trim",value:function(){if(this.array)if(this.offset<this.array.length)this.array=this.array.slice(this.offset),this.offset=0,this.current=this.array[0];else{if(this.offset>this.array.length)throw Error("invalid Uint8ArrayAggregator state, offset (".concat(this.offset,") is larger than bytes in the current array (").concat(this.array.length,")"));this.array=null,this.offset=0,this.current=null}}},{key:"extract",value:function(e){if(this.bytesAvailable>=e){var t=this.offset,r=this.array.slice(t,t+e);return this.offset+=e,this.current=this.array[this.offset],this.checkBounds(),r}return null}},{key:"skip",value:function(e){if(this.bytesAvailable>=e)return this.offset+=e,this.current=this.array[this.offset],void this.checkBounds();e-=this.bytesAvailable,this.array=null,this.offset=0,this.current=null,this.bytesToSkip=e}}])&&n(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.Uint8ArrayAggregator=o},9727:function(e,t,r){r(4843),Object.defineProperty(t,"__esModule",{value:!0}),t.GLOBAL_READY_MESSAGE=void 0,t.GLOBAL_READY_MESSAGE="trusted-origin-storage-ready"},3304:function(e,t,r){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach((function(t){f(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function c(){c=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var i=t&&t.prototype instanceof h?t:h,a=Object.create(i.prototype),c=new k(n||[]);return o(a,"_invoke",{value:O(e,r,c)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=f;var p={};function h(){}function y(){}function v(){}var m={};l(m,a,(function(){return this}));var b=Object.getPrototypeOf,g=b&&b(b(P([])));g&&g!==t&&r.call(g,a)&&(m=g);var w=v.prototype=h.prototype=Object.create(m);function E(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function i(o,a,c,u){var s=d(e[o],e,a);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==n(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){i("next",e,c,u)}),(function(e){i("throw",e,c,u)})):t.resolve(f).then((function(e){l.value=e,c(l)}),(function(e){return i("throw",e,c,u)}))}u(s.arg)}var a;o(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){i(e,r,t,n)}))}return a=a?a.then(n,n):n()}})}function O(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=S(a,r);if(c){if(c===p)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=d(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,S(e,t),"throw"===t.method))return p;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var n=d(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,p;var o=n.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function P(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:T}}function T(){return{value:void 0,done:!0}}return y.prototype=v,o(w,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,l(e,s,"GeneratorFunction")),e.prototype=Object.create(w),e},e.awrap=function(e){return{__await:e}},E(_.prototype),l(_.prototype,u,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},E(w),l(w,s,"Generator"),l(w,a,(function(){return this})),l(w,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=P,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),x(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:P(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function u(e,t,r,n,o,i,a){try{var c=e[i](a),u=c.value}catch(e){return void r(e)}c.done?t(u):Promise.resolve(u).then(n,o)}function s(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){u(i,n,o,a,c,"next",e)}function c(e){u(i,n,o,a,c,"throw",e)}a(void 0)}))}}function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function f(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function d(e,t,r){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,r)}function p(e,t){return function(e,t){return t.get?t.get.call(e):t.value}(e,y(e,t,"get"))}function h(e,t,r){return function(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}(e,y(e,t,"set"),r),r}function y(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}r(444),r(1076),r(5547),r(8496),r(4802),r(2112),r(6353),r(3064),r(3275),r(6941),r(4277),r(6257),r(5128),r(4011),r(5226),r(9270),r(6507),r(6486),r(3524),r(4843),r(1896),r(1e3),r(7285),r(887),r(3257),r(3794),r(1624),r(2047),r(1157),r(8534),Object.defineProperty(t,"__esModule",{value:!0});var v=r(3059),m=r(9011),b=r(861),g=r(5625),w=r(1154),E=r(9145),_=(0,r(9796).default)("tos.TrustedOriginStorageClient"),O=new WeakMap,S=new WeakMap,j=new WeakMap,x=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),d(this,O,{writable:!0,value:void 0}),d(this,S,{writable:!0,value:void 0}),d(this,j,{writable:!0,value:void 0}),f(this,"storage",void 0),f(this,"timeout",void 0),window.addEventListener("message",this.listen.bind(this)),h(this,j,r.sort()),h(this,S,new v.default(t)),this.timeout=5e3,h(this,O,[]),Object.defineProperty(this,"storage",{writable:!1,enumerable:!0,configurable:!1,value:(0,m.default)(this.request.bind(this))}),_("Initialized with",p(this,j))}var t,r,n,i;return t=e,r=[{key:"isCrossDomainSupported",get:function(){return p(this,S).isCrossDomainSupported}},{key:"ready",value:(i=s(c().mark((function e(){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,p(this,S).ready();case 2:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})},{key:"destroy",value:function(){p(this,S).destroy()}},{key:"request",value:(n=s(c().mark((function e(t){var r=this;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.ready();case 2:if("string"!=typeof t.method||"string"!=typeof t.path){e.next=6;break}return e.next=5,new Promise((function(e,n){var o=a(a({},t),{},{trustedOrigins:p(r,j),id:(0,E.uuidHash)(Math.random().toString(),p(r,j).join(","))});_("Request:",o),r.addListener(e,n,o),p(r,S).postMessage(JSON.stringify(o))}));case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})},{key:"listen",value:function(e){var t,r=this;_("Message:",e,"from",e.source);var n,i=e.source===(null===(t=p(this,S).iframe)||void 0===t?void 0:t.contentWindow);i?i&&"string"==typeof e.data&&function(){var t=(0,w.default)(e.data);_("Response:",t);var n,i=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,c=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return c=e.done,e},e:function(e){u=!0,a=e},f:function(){try{c||null==r.return||r.return()}finally{if(u)throw a}}}}(p(r,O));try{var a=function(){var e=n.value;new Promise((function(r,n){try{e(t),r()}catch(e){_("Error:",e),n(e)}}))};for(i.s();!(n=i.n()).done;)a()}catch(e){i.e(e)}finally{i.f()}}():_("Untrusted source",e.source,"expecting",null===(n=p(this,S).iframe)||void 0===n?void 0:n.contentWindow)}},{key:"addListener",value:function(e,t,r){var n=this,o=null,i=function i(a){(0,g.default)(a,r)&&(n.removeListener(i),window.clearTimeout(o),(0,b.default)(a.body)?t(a.body):e(a))};p(this,O).push(i),o=window.setTimeout((function(){n.removeListener(i),t(new Error("Timeout: time of "+n.timeout.toString()+"ms exceeded"))}),this.timeout)}},{key:"removeListener",value:function(e){var t=p(this,O).indexOf(e);t>-1&&p(this,O).splice(t,1)}}],r&&l(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.default=x},5453:function(e,t,r){function n(){n=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var i=t&&t.prototype instanceof h?t:h,a=Object.create(i.prototype),c=new k(n||[]);return o(a,"_invoke",{value:O(e,r,c)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=f;var p={};function h(){}function y(){}function v(){}var m={};l(m,c,(function(){return this}));var b=Object.getPrototypeOf,g=b&&b(b(P([])));g&&g!==t&&r.call(g,c)&&(m=g);var w=v.prototype=h.prototype=Object.create(m);function E(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function n(o,i,c,u){var s=d(e[o],e,i);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==a(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,c,u)}),(function(e){n("throw",e,c,u)})):t.resolve(f).then((function(e){l.value=e,c(l)}),(function(e){return n("throw",e,c,u)}))}u(s.arg)}var i;o(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,o){n(e,r,t,o)}))}return i=i?i.then(o,o):o()}})}function O(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=S(a,r);if(c){if(c===p)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=d(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,S(e,t),"throw"===t.method))return p;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var n=d(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,p;var o=n.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function P(e){if(e){var t=e[c];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:T}}function T(){return{value:void 0,done:!0}}return y.prototype=v,o(w,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,l(e,s,"GeneratorFunction")),e.prototype=Object.create(w),e},e.awrap=function(e){return{__await:e}},E(_.prototype),l(_.prototype,u,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},E(w),l(w,s,"Generator"),l(w,c,(function(){return this})),l(w,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=P,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),x(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:P(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function o(e,t,r,n,o,i,a){try{var c=e[i](a),u=c.value}catch(e){return void r(e)}c.done?t(u):Promise.resolve(u).then(n,o)}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function c(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function u(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r(444),r(1076),r(5547),r(1624),r(2047),r(8534),r(6257),r(6941),r(6486),r(3524),r(8496),r(4802),r(2112),r(6353),r(3064),r(3275),r(4277),r(4843),r(1e3),r(6565),Object.defineProperty(t,"__esModule",{value:!0});var s=r(9727),l=r(7983),f=r(2401),d=r(1154),p=r(7005),h=r(5857),y=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),u(this,"storage",void 0),u(this,"operations",void 0),u(this,"listenWrap",void 0),this.storage=t,this.operations=new l.default}var t,r,y,v,m;return t=e,r=[{key:"engage",value:function(){var e=this;this.listenWrap=function(t){return e.listen(t)},this.operation("GET /storage",p.getStorageEntries.bind(this)).operation("GET /storage/:key",p.getStorageItem.bind(this)).operation("PUT /storage/:key",p.putStorageItem.bind(this)).operation("DELETE /storage/:key",p.deleteStorageItem.bind(this)).operation("DELETE /storage",p.deleteStorageEntries.bind(this)),window.addEventListener("message",this.listenWrap),window.parent.postMessage(JSON.stringify({name:s.GLOBAL_READY_MESSAGE,ready:!0,isCrossDomainSupported:this.storage.isCrossDomainSupported}),"*")}},{key:"operation",value:function(e,t){return this.operations.set(e,t),this}},{key:"dismiss",value:function(){this.operations.clear(),window.removeEventListener("message",this.listenWrap),delete this.listenWrap}},{key:"isTrusted",value:function(e,t){return Array.isArray(t)||(t=[]),t.some((function(t){return t===e}))}},{key:"listen",value:function(e){if("string"==typeof e.data){var t=(0,d.default)(e.data);if(this.isTrusted(e.origin,t.trustedOrigins)&&(0,f.default)(t)){var r=t.method+" "+t.path,n=this.operations.get(r),o={id:t.id,body:void 0};if("object"===a(n))try{o.body=n.call(this.storage,{origin:e.origin,params:n.params,request:t})}catch(e){o.body=this.objectifyError(e)}else o.body=this.objectifyError(new Error("Resource '"+r+"' not found."));window.parent.postMessage(JSON.stringify(o),e.origin)}}}},{key:"objectifyError",value:function(e){var t,r={__isCrossDomainError:!0},n=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,c=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return c=e.done,e},e:function(e){u=!0,a=e},f:function(){try{c||null==r.return||r.return()}finally{if(u)throw a}}}}(Object.getOwnPropertyNames(e));try{for(n.s();!(t=n.n()).done;){var o=t.value;r[o]=e[o]}}catch(e){n.e(e)}finally{n.f()}return r}}],y=[{key:"engage",value:(v=n().mark((function t(){var r,o;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,h.default.create();case 2:return r=t.sent,(o=new e(r)).engage(),t.abrupt("return",o);case 6:case"end":return t.stop()}}),t)})),m=function(){var e=this,t=arguments;return new Promise((function(r,n){var i=v.apply(e,t);function a(e){o(i,r,n,a,c,"next",e)}function c(e){o(i,r,n,a,c,"throw",e)}a(void 0)}))},function(){return m.apply(this,arguments)})}],r&&c(t.prototype,r),y&&c(t,y),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.default=y},3059:function(e,t,r){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(){o=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},c=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var o=t&&t.prototype instanceof h?t:h,a=Object.create(o.prototype),c=new k(n||[]);return i(a,"_invoke",{value:O(e,r,c)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=f;var p={};function h(){}function y(){}function v(){}var m={};l(m,c,(function(){return this}));var b=Object.getPrototypeOf,g=b&&b(b(P([])));g&&g!==t&&r.call(g,c)&&(m=g);var w=v.prototype=h.prototype=Object.create(m);function E(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function o(i,a,c,u){var s=d(e[i],e,a);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==n(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){o("next",e,c,u)}),(function(e){o("throw",e,c,u)})):t.resolve(f).then((function(e){l.value=e,c(l)}),(function(e){return o("throw",e,c,u)}))}u(s.arg)}var a;i(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){o(e,r,t,n)}))}return a=a?a.then(n,n):n()}})}function O(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=S(a,r);if(c){if(c===p)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=d(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,S(e,t),"throw"===t.method))return p;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var n=d(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,p;var o=n.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function P(e){if(e){var t=e[c];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:T}}function T(){return{value:void 0,done:!0}}return y.prototype=v,i(w,"constructor",{value:v,configurable:!0}),i(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,l(e,s,"GeneratorFunction")),e.prototype=Object.create(w),e},e.awrap=function(e){return{__await:e}},E(_.prototype),l(_.prototype,u,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},E(w),l(w,s,"Generator"),l(w,c,(function(){return this})),l(w,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=P,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),x(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:P(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function i(e,t,r,n,o,i,a){try{var c=e[i](a),u=c.value}catch(e){return void r(e)}c.done?t(u):Promise.resolve(u).then(n,o)}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function c(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r(444),r(1076),r(5547),r(1624),r(2047),r(8534),r(8496),r(4802),r(2112),r(6353),r(3064),r(3275),r(4277),r(6257),r(4843),r(6941),r(1e3),Object.defineProperty(t,"__esModule",{value:!0});var u=r(9727),s=r(1154),l=r(3632),f=function(){function e(t){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),c(this,"_isCrossDomainSupported",void 0),c(this,"container",void 0),c(this,"iframe",void 0),c(this,"frameReady",void 0),c(this,"neverReady",void 0),this.frameReady=!1,this.neverReady=!1;var n=function e(t){if(t.source===r.iframe.contentWindow&&"string"==typeof t.data){var n=(0,s.default)(t.data);(null==n?void 0:n.name)===u.GLOBAL_READY_MESSAGE&&!0===(null==n?void 0:n.ready)&&(window.removeEventListener("message",e),r._isCrossDomainSupported=n.isCrossDomainSupported,r.frameReady=!0)}};window.addEventListener("message",n),setTimeout((function(){r.frameReady||(window.removeEventListener("message",n),r.neverReady=!0)}),1e4);var o=window.document.createElement("div");this.styler(o),this.container=o,this.makeIFrame(t);var i=function(){window.document.body.appendChild(o),r.container.appendChild(r.iframe)};"interactive"===window.document.readyState||"complete"===window.document.readyState?i():window.document.addEventListener("readystatechange",(function e(){"interactive"!==window.document.readyState&&"complete"!==window.document.readyState||(window.document.removeEventListener("readystatechange",e),i())}))}var t,r,n,f;return t=e,r=[{key:"isCrossDomainSupported",get:function(){return this._isCrossDomainSupported}},{key:"postMessage",value:function(e){void 0!==this.iframe&&this.iframe.contentWindow.postMessage(e,"*")}},{key:"destroy",value:function(){this.container.removeChild(this.iframe),delete this.iframe}},{key:"ready",value:(n=o().mark((function e(){var t,r=this,n=arguments;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=n.length>0&&void 0!==n[0]?n[0]:0,!this.neverReady&&!this.frameReady&&34!==t){e.next=3;break}return e.abrupt("return");case 3:return e.next=5,new Promise((function(e){setTimeout((function(){e(r.ready(t+1))}),300)}));case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e,this)})),f=function(){var e=this,t=arguments;return new Promise((function(r,o){var a=n.apply(e,t);function c(e){i(a,r,o,c,u,"next",e)}function u(e){i(a,r,o,c,u,"throw",e)}c(void 0)}))},function(){return f.apply(this,arguments)})},{key:"styler",value:function(e){var t={display:"none",position:"absolute",top:"-999px",left:"-999px"};for(var r in t)(0,l.default)(t,r)&&(e.style[r]=t[r])}},{key:"makeIFrame",value:function(e){this.iframe=window.document.createElement("iframe"),this.styler(this.iframe),this.iframe.sandbox.add("allow-scripts"),this.iframe.sandbox.add("allow-same-origin"),this.iframe.src=e}}],r&&a(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.default=f},9011:function(e,t,r){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(){o=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},c=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var o=t&&t.prototype instanceof h?t:h,a=Object.create(o.prototype),c=new k(n||[]);return i(a,"_invoke",{value:O(e,r,c)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=f;var p={};function h(){}function y(){}function v(){}var m={};l(m,c,(function(){return this}));var b=Object.getPrototypeOf,g=b&&b(b(P([])));g&&g!==t&&r.call(g,c)&&(m=g);var w=v.prototype=h.prototype=Object.create(m);function E(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function o(i,a,c,u){var s=d(e[i],e,a);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==n(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){o("next",e,c,u)}),(function(e){o("throw",e,c,u)})):t.resolve(f).then((function(e){l.value=e,c(l)}),(function(e){return o("throw",e,c,u)}))}u(s.arg)}var a;i(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){o(e,r,t,n)}))}return a=a?a.then(n,n):n()}})}function O(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=S(a,r);if(c){if(c===p)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=d(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,S(e,t),"throw"===t.method))return p;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var n=d(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,p;var o=n.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function P(e){if(e){var t=e[c];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:T}}function T(){return{value:void 0,done:!0}}return y.prototype=v,i(w,"constructor",{value:v,configurable:!0}),i(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,l(e,s,"GeneratorFunction")),e.prototype=Object.create(w),e},e.awrap=function(e){return{__await:e}},E(_.prototype),l(_.prototype,u,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},E(w),l(w,s,"Generator"),l(w,c,(function(){return this})),l(w,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=P,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),x(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:P(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function i(e,t,r,n,o,i,a){try{var c=e[i](a),u=c.value}catch(e){return void r(e)}c.done?t(u):Promise.resolve(u).then(n,o)}function a(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function c(e){i(a,n,o,c,u,"next",e)}function u(e){i(a,n,o,c,u,"throw",e)}c(void 0)}))}}r(444),r(1076),r(5547),r(2047),r(8496),r(4802),r(2112),r(6353),r(3064),r(3275),r(6941),r(4277),r(6257),r(4843),r(1624),r(1e3),r(8534),Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return{clear:function(){return a(o().mark((function t(){return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e({method:"DELETE",path:"/storage"});case 2:case"end":return t.stop()}}),t)})))()},entries:function(){return a(o().mark((function t(){var r;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e({method:"GET",path:"/storage"});case 2:return r=t.sent,t.abrupt("return",r.body.entries);case 4:case"end":return t.stop()}}),t)})))()},getItem:function(t){return a(o().mark((function r(){var n;return o().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,e({method:"GET",path:"/storage/".concat(t)});case 2:return n=r.sent,r.abrupt("return",n.body.value);case 4:case"end":return r.stop()}}),r)})))()},removeItem:function(t){return a(o().mark((function r(){return o().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,e({method:"DELETE",path:"/storage/".concat(t)});case 2:case"end":return r.stop()}}),r)})))()},setItem:function(t,r){return a(o().mark((function n(){return o().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,e({method:"PUT",path:"/storage/".concat(t),body:{value:r}});case 2:case"end":return n.stop()}}),n)})))()}}}},861:function(e,t,r){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}r(444),r(1076),r(1e3),r(5547),r(1624),r(2047),r(8534),r(4843),Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return null!==e&&"object"===n(e)&&!0===e.__isCrossDomainError}},5625:function(e,t,r){r(4843),Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return"string"==typeof e.id&&"string"==typeof t.id&&e.id===t.id}},7345:function(e,t,r){r(4843),Object.defineProperty(t,"__esModule",{value:!0}),t.TrustedOriginStorageServer=t.TrustedOriginStorageClient=void 0;var n=r(3304);Object.defineProperty(t,"TrustedOriginStorageClient",{enumerable:!0,get:function(){return n.default}});var o=r(5453);Object.defineProperty(t,"TrustedOriginStorageServer",{enumerable:!0,get:function(){return o.default}})},7983:function(e,t,r){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r(444),r(1076),r(1e3),r(5547),r(1624),r(2047),r(8534),r(4843),r(5128),r(9806),r(3524),r(7285),r(3317),r(3114),r(9344),Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),i(this,"operations",void 0),i(this,"routable",void 0),this.operations={},this.routable={}}var t,r;return t=e,(r=[{key:"get",value:function(e){return"function"==typeof this.operations[e]?{call:this.operations[e]}:this.getRoutable(e)}},{key:"set",value:function(e,t){this.operations[e]=t,this.setRoutable(e)}},{key:"clear",value:function(){for(var e=0,t=Object.keys(this.operations);e<t.length;e++){var r=t[e];this.operations[r]=void 0}for(var n=0,o=Object.keys(this.routable);n<o.length;n++){var i=o[n];this.routable[i]=void 0}this.operations={},this.routable={}}},{key:"isRoutable",value:function(e){var t=this.pathToRegExp(e),r=new RegExp(t,"g").exec(e);return(1!==r.length||r[0]!==e)&&t}},{key:"getRoutable",value:function(e){for(var t=Object.keys(this.routable),r=0;r<t.length;r+=1){var o=t[r],i=(0,this.routable[o])(e);if("object"===n(i))return{call:this.operations[o],params:i.params}}}},{key:"setRoutable",value:function(e){var t=this.isRoutable(e);!1!==t&&(this.routable[e]=this.match(t))}},{key:"pathToRegExp",value:function(e){return"^"+(e=e.replace(/\./g,"\\.").replace(/\//g,"/").replace(/\?/g,"\\?").replace(/\/+$/,"").replace(/\*+/g,".*").replace(/:([^\d|^/][a-zA-Z0-9_]*(?=(?:\/|\\.)|$))/g,(function(e,t){return"(?<".concat(t,">[^/]+?)")})).concat("(\\/|$)"))+"(\\?.*){0,1}$"}},{key:"match",value:function(e){return function(t){var r,n=new RegExp(e,"g").exec(t),o=Array.isArray(n);if(o)return{matches:o,params:null!==(r=null==n?void 0:n.groups)&&void 0!==r?r:void 0}}}}])&&o(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.default=a},7005:function(e,t,r){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}r(444),r(1076),r(5547),r(2047),r(4843),r(1624),r(1e3),r(8534),Object.defineProperty(t,"__esModule",{value:!0}),t.deleteStorageEntries=t.deleteStorageItem=t.putStorageItem=t.getStorageItem=t.getStorageEntries=void 0;var o=r(9975);t.getStorageEntries=function(e,t){var r=(0,o.default)(t.request.trustedOrigins);return{entries:e.entries(r)}},t.getStorageItem=function(e,t){if("object"===n(t.params)){var r=(0,o.default)(t.request.trustedOrigins);return{value:e.get(r,t.params.key)}}return{value:null}},t.putStorageItem=function(e,t){if("object"===n(t.params)&&"object"===n(t.request.body)){var r=(0,o.default)(t.request.trustedOrigins);return e.set(r,t.params.key,t.request.body.value),{key:t.params.key,value:t.request.body.value}}return{key:"undefined"}},t.deleteStorageItem=function(e,t){if("object"===n(t.params)){var r=(0,o.default)(t.request.trustedOrigins);e.delete(r,t.params.key)}},t.deleteStorageEntries=function(e,t){var r=(0,o.default)(t.request.trustedOrigins);e.clear(r)}},9975:function(e,t,r){r(4843),r(887),r(1896),Object.defineProperty(t,"__esModule",{value:!0});var n=r(9145);t.default=function(e){return(0,n.uuidHash)(e.sort().join(","),"db0ec212-8371-47d7-b44a-c2d50493194d")}},2401:function(e,t,r){r(4843),r(3600),Object.defineProperty(t,"__esModule",{value:!0});var n=["DELETE","GET","POST","PUT"];t.default=function(e){return"string"==typeof e.id&&"string"==typeof e.method&&n.includes(e.method)&&"string"==typeof e.path&&void 0!==e.trustedOrigins&&Array.isArray(e.trustedOrigins)}},2375:function(e,t,r){function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r(4843),r(5128),Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),o(this,"memory",void 0),o(this,"length",void 0),this.memory={},Object.defineProperty(this,"length",{get:function(){return Object.keys(this.memory).length}})}var t,r;return t=e,(r=[{key:"getItem",value:function(e){var t;return null!==(t=this.memory[e])&&void 0!==t?t:null}},{key:"setItem",value:function(e,t){this.memory[e]=t}},{key:"removeItem",value:function(e){delete this.memory[e]}},{key:"key",value:function(e){return Object.keys(this.memory)[e]}},{key:"clear",value:function(){this.memory={}}}])&&n(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.default=i},5857:function(e,t,r){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(){o=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},c=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var o=t&&t.prototype instanceof h?t:h,a=Object.create(o.prototype),c=new k(n||[]);return i(a,"_invoke",{value:O(e,r,c)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=f;var p={};function h(){}function y(){}function v(){}var m={};l(m,c,(function(){return this}));var b=Object.getPrototypeOf,g=b&&b(b(P([])));g&&g!==t&&r.call(g,c)&&(m=g);var w=v.prototype=h.prototype=Object.create(m);function E(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function o(i,a,c,u){var s=d(e[i],e,a);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==n(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){o("next",e,c,u)}),(function(e){o("throw",e,c,u)})):t.resolve(f).then((function(e){l.value=e,c(l)}),(function(e){return o("throw",e,c,u)}))}u(s.arg)}var a;i(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){o(e,r,t,n)}))}return a=a?a.then(n,n):n()}})}function O(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=S(a,r);if(c){if(c===p)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=d(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,S(e,t),"throw"===t.method))return p;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var n=d(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,p;var o=n.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function P(e){if(e){var t=e[c];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:T}}function T(){return{value:void 0,done:!0}}return y.prototype=v,i(w,"constructor",{value:v,configurable:!0}),i(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,l(e,s,"GeneratorFunction")),e.prototype=Object.create(w),e},e.awrap=function(e){return{__await:e}},E(_.prototype),l(_.prototype,u,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},E(w),l(w,s,"Generator"),l(w,c,(function(){return this})),l(w,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=P,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),x(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:P(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function i(e,t,r,n,o,i,a){try{var c=e[i](a),u=c.value}catch(e){return void r(e)}c.done?t(u):Promise.resolve(u).then(n,o)}function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i=[],a=!0,c=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){c=!0,o=e}finally{try{a||null==r.return||r.return()}finally{if(c)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function s(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r(444),r(1076),r(5547),r(6257),r(6941),r(6486),r(8496),r(4802),r(2112),r(6353),r(3064),r(4277),r(4843),r(3600),r(6770),r(3524),r(685),r(1624),r(1e3),r(8719),r(2047),r(8534),r(3275),Object.defineProperty(t,"__esModule",{value:!0});var l=r(7191),f=r(2375),d=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),s(this,"storage",void 0),s(this,"isCrossDomainSupported",void 0),s(this,"sep",":||:"),s(this,"keyCache",void 0),this.storage=t,this.isCrossDomainSupported=r,this.initKeyCache()}var t,r,n,c,d;return t=e,r=[{key:"initKeyCache",value:function(){this.keyCache={};for(var e=this.storage.length,t=0;t<e;t+=1){var r=this.storage.key(t);if("string"==typeof r&&r.includes(this.sep)){var n=a(r.split(this.sep),2),o=n[0],i=n[1];this.getKeySet(o).add(i)}}}},{key:"compositeKey",value:function(e,t){return e+this.sep+t}},{key:"getKeySet",value:function(e){var t=this.keyCache[e];return void 0===t&&(t=new Set,this.keyCache[e]=t),t}},{key:"get",value:function(e,t){return this.storage.getItem(this.compositeKey(e,t))}},{key:"set",value:function(e,t,r){this.getKeySet(e).add(t),this.storage.setItem(this.compositeKey(e,t),r)}},{key:"delete",value:function(e,t){this.storage.removeItem(this.compositeKey(e,t))}},{key:"clear",value:function(e){var t=this,r=this.getKeySet(e);r.forEach((function(r){t.delete(e,r)})),r.clear()}},{key:"entries",value:function(e){var t=this,r=[];return this.getKeySet(e).forEach((function(n){r.push([n,t.get(e,n)])})),r}}],n=[{key:"create",value:(c=o().mark((function t(){return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,l.default)("localStorage");case 2:if(!t.sent){t.next=6;break}t.t0=new e(window.localStorage,!0),t.next=7;break;case 6:t.t0=new e(new f.default,!1);case 7:return t.abrupt("return",t.t0);case 8:case"end":return t.stop()}}),t)})),d=function(){var e=this,t=arguments;return new Promise((function(r,n){var o=c.apply(e,t);function a(e){i(o,r,n,a,u,"next",e)}function u(e){i(o,r,n,a,u,"throw",e)}a(void 0)}))},function(){return d.apply(this,arguments)})}],r&&u(t.prototype,r),n&&u(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.default=d},3632:function(e,t,r){r(4843),Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},1154:function(e,t,r){r(4843),Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t={};try{var r;return null!==(r=JSON.parse(e))&&void 0!==r?r:t}catch(e){}return t}},7191:function(e,t,r){function n(){n=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},c=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var o=t&&t.prototype instanceof h?t:h,a=Object.create(o.prototype),c=new k(n||[]);return i(a,"_invoke",{value:O(e,r,c)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=f;var p={};function h(){}function y(){}function v(){}var m={};l(m,c,(function(){return this}));var b=Object.getPrototypeOf,g=b&&b(b(P([])));g&&g!==t&&r.call(g,c)&&(m=g);var w=v.prototype=h.prototype=Object.create(m);function E(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function n(i,a,c,u){var s=d(e[i],e,a);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==o(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,c,u)}),(function(e){n("throw",e,c,u)})):t.resolve(f).then((function(e){l.value=e,c(l)}),(function(e){return n("throw",e,c,u)}))}u(s.arg)}var a;i(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,o){n(e,r,t,o)}))}return a=a?a.then(o,o):o()}})}function O(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=S(a,r);if(c){if(c===p)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=d(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,S(e,t),"throw"===t.method))return p;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var n=d(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,p;var o=n.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function P(e){if(e){var t=e[c];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:T}}function T(){return{value:void 0,done:!0}}return y.prototype=v,i(w,"constructor",{value:v,configurable:!0}),i(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,l(e,s,"GeneratorFunction")),e.prototype=Object.create(w),e},e.awrap=function(e){return{__await:e}},E(_.prototype),l(_.prototype,u,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},E(w),l(w,s,"Generator"),l(w,c,(function(){return this})),l(w,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=P,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),x(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:P(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function i(e,t,r,n,o,i,a){try{var c=e[i](a),u=c.value}catch(e){return void r(e)}c.done?t(u):Promise.resolve(u).then(n,o)}function a(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function c(e){i(a,n,o,c,u,"next",e)}function u(e){i(a,n,o,c,u,"throw",e)}c(void 0)}))}}function c(){return(c=a(n().mark((function e(t){var r,i,a;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("function"!=typeof document.hasStorageAccess){e.next=6;break}return e.next=3,document.hasStorageAccess();case 3:e.t0=e.sent,e.next=7;break;case 6:e.t0=void 0;case 7:if(void 0===(i=e.t0)){e.next=10;break}return e.abrupt("return",i);case 10:return e.prev=10,r="string"==typeof t?window[t]:t,a="__storage_test__",r.setItem(a,a),r.removeItem(a),e.abrupt("return",!0);case 18:return e.prev=18,e.t1=e.catch(10),e.abrupt("return",e.t1 instanceof DOMException&&(22===e.t1.code||1014===e.t1.code||"QuotaExceededError"===e.t1.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.t1.name)&&"object"===o(r)&&0!==r.length);case 21:case"end":return e.stop()}}),e,null,[[10,18]])})))).apply(this,arguments)}r(1e3),r(444),r(1076),r(5547),r(1624),r(2047),r(8534),r(8496),r(4802),r(2112),r(6353),r(3064),r(3275),r(4277),r(6257),r(4843),r(6941),Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return c.apply(this,arguments)}},9145:function(e,t,r){function n(e,t){var r=(4194303&e)*(t|=0);return 0!=(4290772992&e)&&(r+=(4290772992&e)*t|0),0|r}r(4843),r(5393),r(1e3),r(7285),r(1624),r(9382),r(7639),r(6996),r(1366),r(3558),r(8852),r(8630),r(8858),r(6480),r(7219),r(2160),r(4289),r(8165),r(4613),r(3292),r(3748),r(9157),r(5529),r(4882),r(7233),r(1086),r(8786),r(5544),r(1304),r(9497),r(3524),r(9344),r(887),Object.defineProperty(t,"__esModule",{value:!0}),t.uuidHash=void 0,t.uuidHash=function(e,t){var r=function(e){for(var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=3735928559^r,i=1103547991^r,a=2207095982^r,c=1867964279^r,u=0;u<e.length;u++)o=n(o^(t=e.charCodeAt(u)),2654435761),i=n(i^t,1597334677),a=n(a^t,2654435761),c=n(c^t,1597334677);function s(e){return(e>>>0).toString(16).padStart(8,"0")}function l(e){for(var t=new Uint16Array(e.length),r=0;r<e.length;r++)t[r]=parseInt(e.charAt(r),16);return t}return o=n(o^o>>>16,2246822507)^n(i^i>>>13,3266489909),i=n(i^i>>>16,2246822507)^n(o^o>>>13,3266489909),a=n(a^a>>>16,2246822507)^n(c^c>>>13,3266489909),c=n(c^c>>>16,2246822507)^n(a^a>>>13,3266489909),l(s(i)+s(o)+s(c)+s(a))}(t+e),o=0;return[1e7,1e3,1e3,1e3,1e11].join("-").replace(/[01]/g,(function(e){var t=r[o].toString(16);return o+=1,t}))}},1043:function(e,t,r){function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(4843);var o=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._message=t,this._node=r}var t,r;return t=e,(r=[{key:"message",get:function(){return this._message}},{key:"node",get:function(){return this._node}}])&&n(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.default=o},9290:function(e,t,r){function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(1624),r(1e3),r(8719),r(2047),r(8534),r(5226),r(3275),r(4843);var o=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.onPropertySet=t,this._klasses=new Set}var t,r;return t=e,(r=[{key:"_trackObserver",value:function(e){e.__cbio_observers||(e.__cbio_observers=new Set),e.__cbio_observers.add(this)}},{key:"_untrackObserver",value:function(e){e.__cbio_observers&&e.__cbio_observers.delete(this)}},{key:"_tap",value:function(e,t){if(!e["__cbio_override_".concat(t)]){var r=Object.getOwnPropertyDescriptor(e.prototype,t);if(r){e["__cbio_override_".concat(t)]=!0;var n=r.set;r.set=function(r){var o=this;n.call(this,r),e.__cbio_observers&&e.__cbio_observers.forEach((function(e){e.onPropertySet(o,t,r)}))},Object.defineProperty(e.prototype,t,r)}}}},{key:"observe",value:function(e,t){this._klasses.add(e),this._trackObserver(e),this._tap(e,t)}},{key:"disconnect",value:function(){var e=this;this._klasses.forEach((function(t){return e._untrackObserver(t)})),this._klasses.clear()}}])&&n(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.default=o},1213:function(e,t,r){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}r(5128),r(444),r(4011),r(5226),r(9270),r(6507),r(1624),r(2047),r(1157),r(8534),r(1076),r(5547),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(1e3),r(3275),r(1087),r(3133),r(5562),r(4843);var o,i=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var r=c(t);if(r&&r.has(e))return r.get(e);var o={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var u=i?Object.getOwnPropertyDescriptor(e,a):null;u&&(u.get||u.set)?Object.defineProperty(o,a,u):o[a]=e[a]}return o.default=e,r&&r.set(e,o),o}(r(3682)),a=(o=r(1043))&&o.__esModule?o:{default:o};function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(c=function(e){return e?r:t})(e)}function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u(Object(r),!0).forEach((function(t){l(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function l(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function f(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var d=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._id=t,this._dom={id:t,childNodes:[]},this._mapping={}}var t,r,n;return t=e,n=[{key:"createMapping",value:function(e){var t={};return(0,i.default)(e,(function(e){e.id?t[e.id]=e:console.warn("node missing id",e)})),t}},{key:"applyPatch",value:function(e,t){var r=this.createMapping(e),n={};t.forEach((function(e){if(e.id){var t=r[e.id]||{};r[e.id]=s(s({},t),e),n[e.id]=!0}else console.warn("diff missing id",e)})),Object.values(r).forEach((function(e){e.childNodes=(e.childNodes||[]).map((function(t){var n=t.id||t,o=r[n];if(!o)throw new a.default("denormalisation failed for child ".concat(n),e);return o}))}));var o=r[e.id],c=(0,i.depthFirstPostOrder)(o,(function(e,t){if(e.childNodes=t,t.map((function(e){return n[e.id]})).reduce((function(e,t){return e||t}),!1)){n[e.id]=!0;var o=s({},e);return r[e.id]=o,o}return e}));return{dom:c,mapping:this.createMapping(c)}}}],(r=[{key:"id",get:function(){return this._id}},{key:"document",get:function(){return this._dom}},{key:"node",value:function(e){return this._mapping[e]}},{key:"applyPatch",value:function(t){var r=e.applyPatch(this._dom,t),n=r.dom,o=r.mapping;return this._dom=n,this._mapping=o,this}}])&&f(t.prototype,r),n&&f(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.default=d},3682:function(e,t,r){function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach((function(t){i(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r(5128),r(444),r(4011),r(1e3),r(5226),r(3275),r(9270),r(6507),Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t,r){var n=t.childNodes,i=r(t,(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];n=e}));return n&&n.length?o(o({},i),{},{childNodes:Array.from(n).map((function(t){return e(t,r)}))}):i},t.depthFirstPostOrder=function e(t,r){var n=Array.from(t.childNodes||[]).map((function(t){return e(t,r)}));return r(t,n)},r(3133),r(6486),r(2047),r(4843)},1514:function(e,t,r){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}r(1624),r(1e3),r(2047),r(1157),r(8534),r(4843),r(5226),r(444),r(1076),r(5547),Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"CompressionError",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"PropertyObserver",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"VirtualDOM",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"depthFirst",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"depthFirstPostOrder",{enumerable:!0,get:function(){return a.depthFirstPostOrder}}),Object.defineProperty(t,"isxdoc",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(t,"parents",{enumerable:!0,get:function(){return u.default}});var o=f(r(1043)),i=f(r(1213)),a=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var r=l(t);if(r&&r.has(e))return r.get(e);var o={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var c=i?Object.getOwnPropertyDescriptor(e,a):null;c&&(c.get||c.set)?Object.defineProperty(o,a,c):o[a]=e[a]}return o.default=e,r&&r.set(e,o),o}(r(3682)),c=f(r(9122)),u=f(r(1725)),s=f(r(9290));function l(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(l=function(e){return e?r:t})(e)}function f(e){return e&&e.__esModule?e:{default:e}}},9122:function(e,t,r){function n(e){try{return!e.document&&!1}catch(e){return!0}}r(4843),Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return!!n(e)||!("IFRAME"!==e.tagName||!n(e.contentWindow))}},1725:function(e,t,r){function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}r(444),r(1076),r(1e3),r(5547),r(1624),r(2047),r(8534),r(6486),r(6257),r(6941),r(3524),r(4843),Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t,r){for(var o=[],i=t;i.parentNode&&i.parentNode!==r;)o.push(i.parentNode),i=i.parentNode;var a,c=i.defaultView&&i.defaultView.frameElement;return c?[].concat(o,[c],function(e){if(Array.isArray(e))return n(e)}(a=e(c))||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(a)||function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}(a)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()):o},r(3114)},9796:function(e,t,r){var n;r(3524),r(3317),r(9497),r(9806),r(7285),r(3794),r(9344),t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),this.useColors){var r="color: "+this.color;t.splice(1,0,r,"color: inherit");var n=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(n++,"%c"===e&&(o=n))})),t.splice(o,0,r)}},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){var e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},t.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(n=!1,function(){n||(n=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||function(){},e.exports=r(4701)(t),e.exports.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},4701:function(e,t,r){function n(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}r(444),r(1076),r(5547),r(1624),r(2047),r(8534),r(6486),r(6941),r(1e3),r(3275),r(5128),r(5538),r(3524),r(9344),r(3794),r(4843),r(685),r(9806),r(7285),r(6257),r(887),r(3114),r(3133),e.exports=function(e){function t(e){var r,n,i,a=null;function c(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];if(c.enabled){var i=c,a=Number(new Date),u=a-(r||a);i.diff=u,i.prev=r,i.curr=a,r=a,n[0]=t.coerce(n[0]),"string"!=typeof n[0]&&n.unshift("%O");var s=0;n[0]=n[0].replace(/%([a-zA-Z%])/g,(function(e,r){if("%%"===e)return"%";s++;var o=t.formatters[r];if("function"==typeof o){var a=n[s];e=o.call(i,a),n.splice(s,1),s--}return e})),t.formatArgs.call(i,n);var l=i.log||t.log;l.apply(i,n)}}return c.namespace=e,c.useColors=t.useColors(),c.color=t.selectColor(e),c.extend=o,c.destroy=t.destroy,Object.defineProperty(c,"enabled",{enumerable:!0,configurable:!1,get:function(){return null!==a?a:(n!==t.namespaces&&(n=t.namespaces,i=t.enabled(e)),i)},set:function(e){a=e}}),"function"==typeof t.init&&t.init(c),c}function o(e,r){var n=t(this.namespace+(void 0===r?":":r)+e);return n.log=this.log,n}function i(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){var e=[].concat(n(t.names.map(i)),n(t.skips.map(i).map((function(e){return"-"+e})))).join(",");return t.enable(""),e},t.enable=function(e){var r;t.save(e),t.namespaces=e,t.names=[],t.skips=[];var n=("string"==typeof e?e:"").split(/[\s,]+/),o=n.length;for(r=0;r<o;r++)n[r]&&("-"===(e=n[r].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;var r,n;for(r=0,n=t.skips.length;r<n;r++)if(t.skips[r].test(e))return!1;for(r=0,n=t.names.length;r<n;r++)if(t.names[r].test(e))return!0;return!1},t.humanize=r(3231),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((function(r){t[r]=e[r]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){for(var r=0,n=0;n<e.length;n++)r=(r<<5)-r+e.charCodeAt(n),r|=0;return t.colors[Math.abs(r)%t.colors.length]},t.enable(t.load()),t}},1178:function(e,t,r){r(4843),r(4277),r(3064),r(9616),r(444),r(1076),r(5547),r(8496),r(4802),r(2112),r(6353),r(3275),r(6941),r(6257),r(5226),r(9270),r(6507),Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.CobrowseIO=void 0,r(1e3),r(4011),r(3600),r(6770),r(6706),r(5128),r(3133),r(1624),r(2047),r(8534),r(6955),r(8927),r(1157);var n=E(r(1381)),o=r(1514),i=r(1239),a=r(5064),c=r(8302),u=r(5161),s=r(6362),l=r(3042),f=E(r(1289)),d=r(7368),p=E(r(1560)),h=E(r(9356)),y=E(r(3191)),v=r(1640),m=r(9426),b=E(r(2175)),g=E(r(9796)),w=E(r(3677));function E(e){return e&&e.__esModule?e:{default:e}}function _(e){return _="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_(e)}function O(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function S(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?O(Object(r),!0).forEach((function(t){N(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):O(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function j(){j=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,r){return e[t]=r}}function s(e,t,r,o){var i=t&&t.prototype instanceof d?t:d,a=Object.create(i.prototype),c=new k(o||[]);return n(a,"_invoke",{value:E(e,r,c)}),a}function l(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=s;var f={};function d(){}function p(){}function h(){}var y={};u(y,i,(function(){return this}));var v=Object.getPrototypeOf,m=v&&v(v(P([])));m&&m!==t&&r.call(m,i)&&(y=m);var b=h.prototype=d.prototype=Object.create(y);function g(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){function o(n,i,a,c){var u=l(e[n],e,i);if("throw"!==u.type){var s=u.arg,f=s.value;return f&&"object"==_(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){o("next",e,a,c)}),(function(e){o("throw",e,a,c)})):t.resolve(f).then((function(e){s.value=e,a(s)}),(function(e){return o("throw",e,a,c)}))}c(u.arg)}var i;n(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){o(e,r,t,n)}))}return i=i?i.then(n,n):n()}})}function E(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=O(a,r);if(c){if(c===f)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=l(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function O(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method))return f;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var n=l(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,f;var o=n.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function P(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:T}}function T(){return{value:void 0,done:!0}}return p.prototype=h,n(b,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:p,configurable:!0}),p.displayName=u(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,u(e,c,"GeneratorFunction")),e.prototype=Object.create(b),e},e.awrap=function(e){return{__await:e}},g(w.prototype),u(w.prototype,a,(function(){return this})),e.AsyncIterator=w,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new w(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},g(b),u(b,c,"Generator"),u(b,i,(function(){return this})),u(b,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=P,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),f},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),x(r),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:P(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},e}function x(e,t,r,n,o,i,a){try{var c=e[i](a),u=c.value}catch(e){return void r(e)}c.done?t(u):Promise.resolve(u).then(n,o)}function k(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){x(i,n,o,a,c,"next",e)}function c(e){x(i,n,o,a,c,"throw",e)}a(void 0)}))}}function P(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function T(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function L(e,t){return L=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},L(e,t)}function C(e,t){if(t&&("object"===_(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return I(e)}function I(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function M(e){return M=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},M(e)}function N(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function A(e,t,r){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,r)}function R(e,t){return function(e,t){return t.get?t.get.call(e):t.value}(e,F(e,t,"get"))}function D(e,t,r){return function(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}(e,F(e,t,"set"),r),r}function F(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}var W=(0,g.default)("cbio.CobrowseIO"),z=new WeakMap,G=new WeakMap,U=new WeakMap,Y=new WeakMap,B=new WeakMap,q=new WeakMap,V=new WeakMap,H=new WeakMap,K=new WeakMap,X=new WeakMap,$=new WeakMap,Q=new WeakMap,Z=new WeakMap,J=new WeakMap,ee=new WeakMap,te=new WeakMap,re=new WeakMap,ne=new WeakMap,oe=new WeakMap,ie=new WeakMap,ae=new WeakMap,ce=new WeakMap,ue=new WeakMap,se=new WeakMap,le=new WeakMap,fe=new WeakMap,de=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&L(e,t)}(x,e);var t,r,i,g,E,O=(g=x,E=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=M(g);if(E){var r=M(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return C(this,e)});function x(){var e,t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=r.sessionStorageFactory,c=void 0===i?function(e,t,r){var n=r.localStorage;return v.SessionStorage.create(e,t,{localStorage:n})}:i;return P(this,x),A(I(e=O.call(this)),z,{writable:!0,value:new a.ActivityDetection}),A(I(e),G,{writable:!0,value:void 0}),A(I(e),U,{writable:!0,value:void 0}),A(I(e),Y,{writable:!0,value:void 0}),A(I(e),B,{writable:!0,value:new m.LocalSessionStorage}),A(I(e),q,{writable:!0,value:void 0}),A(I(e),V,{writable:!0,value:void 0}),A(I(e),H,{writable:!0,value:{}}),A(I(e),K,{writable:!0,value:new s.SessionCapabilities(u.Device.info.capabilities)}),A(I(e),X,{writable:!0,value:new u.Device(I(e))}),A(I(e),$,{writable:!0,value:new l.ConsentDialog}),A(I(e),Q,{writable:!0,value:new l.ConsentDialog}),A(I(e),Z,{writable:!0,value:new l.ConsentDialog}),A(I(e),J,{writable:!0,value:void 0}),A(I(e),ee,{writable:!0,value:void 0}),A(I(e),te,{writable:!0,value:{}}),A(I(e),re,{writable:!0,value:void 0}),N(I(e),"start",k(j().mark((function t(){var r,n,i=arguments;return j().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=i.length>0&&void 0!==i[0]?i[0]:{},W("start()",r,"in",document),D(I(e),te,r),!y.default.isHeadless()||r.allowHeadless){t.next=6;break}return console.warn("CobrowseIO: Not starting Cobrowse in a headless browser"),t.abrupt("return");case 6:if(window.self===window.top){t.next=18;break}if(!r.allowIFrameStart){t.next=11;break}a.WindowTracking.setTracksIframes(!0),t.next=18;break;case 11:if(!(0,o.isxdoc)(window.parent)){t.next=16;break}return W("Starting Cobrowse in Iframe bridge mode with trusted origins:",h.default.trustedOrigins,"for",document),t.abrupt("return");case 16:return W("Not starting Cobrowse for same-origin iframe",document),t.abrupt("return");case 18:if(e.license){t.next=21;break}return console.error("CobrowseIO.license must be set before calling start"),t.abrupt("return");case 21:if(R(I(e),Y)){t.next=36;break}return f.default.initialize(),a.WindowTracking.start(),(0,p.default)(x.version).catch((function(){})),D(I(e),V,R(I(e),q).call(I(e),e.trustedOrigins,e.api,{localStorage:R(I(e),B)})),console.log("CobrowseIO started",x.version),D(I(e),Y,!0),!1!==r.register&&(R(I(e),z).on("active",(function(){return R(I(e),X).runRegistrationLoop()})),R(I(e),z).on("inactive",(function(){return R(I(e),X).pauseRegistrationLoop()}))),R(I(e),z).start(),W("attempting to restore session after start"),t.next=33,R(I(e),ne).call(I(e));case 33:D(I(e),U,null),null!==(n=e.currentSession)&&void 0!==n&&n.isActive()||e.hideSessionControls(),window.addEventListener("focus",R(I(e),ne),{capture:!0});case 36:case"end":return t.stop()}}),t)})))),N(I(e),"stop",k(j().mark((function t(){return j().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.currentSession||e.currentSession.isEnded()){t.next=3;break}return t.next=3,e.currentSession.end().catch((function(e){console.warn("CobrowseIO: Failed to end session on stop",e)}));case 3:return window.removeEventListener("focus",R(I(e),ne),{capture:!0}),R(I(e),ie).call(I(e),null),a.WindowTracking.stop(),R(I(e),z).stop(),t.next=9,R(I(e),X).destroy();case 9:return t.next=11,R(I(e),V)&&R(I(e),V).destroy();case 11:return D(I(e),V,void 0),D(I(e),Y,!1),t.abrupt("return",I(e));case 14:case"end":return t.stop()}}),t)})))),A(I(e),ne,{writable:!0,value:(t=k(j().mark((function t(){var r;return j().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,R(I(e),V).load(I(e));case 2:if(!(r=t.sent)){t.next=14;break}if(t.prev=4,r.state()){t.next=8;break}return t.next=8,r.fetch();case 8:R(I(e),ie).call(I(e),r,{invalidateFrames:!0}),t.next=14;break;case 11:t.prev=11,t.t0=t.catch(4),console.warn("CobrowseIO: Failed to fetch restored session",t.t0);case 14:return t.abrupt("return",null);case 15:case"end":return t.stop()}}),t,null,[[4,11]])}))),function(){return t.apply(this,arguments)})}),A(I(e),oe,{writable:!0,value:function(){R(I(e),X).bannerMessage()&&l.Toast.show(R(I(e),X).bannerMessage())}}),A(I(e),ie,{writable:!0,value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.invalidateFrames,o=void 0!==n&&n;if(W("setting current session",t),t&&R(I(e),G)){var i=R(I(e),G).session;if(i.id()===t.id())return}R(I(e),$).hide(),R(I(e),Q).hide(),R(I(e),Z).hide();var a=function(e,t){return h.default.broadcastToChildren("control",[e,t])};R(I(e),G)&&(R(I(e),G).session.off("updated",R(I(e),ae)),R(I(e),G).session.off("ended",R(I(e),ce)),R(I(e),G).session.off("control",a),R(I(e),G).destroy(),D(I(e),G,null)),t&&(D(I(e),G,new s.SessionContext(t,I(e),R(I(e),V))),t.state()&&R(I(e),ae).call(I(e),t),t.on("updated",R(I(e),ae)),t.once("ended",R(I(e),ce)),t.on("control",a),o&&R(I(e),G).invalidateFrames())}}),A(I(e),ae,{writable:!0,value:function(t){t.fullDevice()||R(I(e),Z).hide(),"requested"!==t.remoteControl()&&R(I(e),Q).hide(),t.isAuthorizing()||R(I(e),$).hide(),R(I(e),oe).call(I(e),t),e.emit("session.updated",t)}}),A(I(e),ce,{writable:!0,value:function(t){e.emit("session.ended",t),R(I(e),ie).call(I(e),null)}}),A(I(e),ue,{writable:!0,value:void 0}),N(I(e),"hideSessionControls",(function(){l.SessionStateOverlay.hide()})),A(I(e),se,{writable:!0,value:(0,d.protect)(I(e),"getCapabilities",(function(){return R(I(e),K)}))}),A(I(e),le,{writable:!0,value:(0,n.default)((function(){var t;R(I(e),X).hasPendingUpdates()&&R(I(e),Y)&&!1!==(null===(t=R(I(e),te))||void 0===t?void 0:t.register)&&R(I(e),X).updateRegistration().catch((function(e){console.warn("CobrowseIO: updating customData failed",e)}))}),8e3,{leading:!0,trailing:!0})}),N(I(e),"confirmRemoteControl",k(j().mark((function t(){return j().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",R(I(e),Q).show(b.default.tr("REMOTE_CONTROL_REQUEST_TITLE"),b.default.tr("REMOTE_CONTROL_REQUEST_DESCRIPTION")));case 1:case"end":return t.stop()}}),t)})))),N(I(e),"confirmFullDevice",k(j().mark((function t(){return j().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",R(I(e),Z).show(b.default.tr("FULL_DEVICE_REQUEST_TITLE"),b.default.tr("FULL_DEVICE_REQUEST_DESCRIPTION")));case 1:case"end":return t.stop()}}),t)})))),N(I(e),"confirmSession",k(j().mark((function t(){return j().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",R(I(e),$).show(b.default.tr("SESSION_REQUEST_TITLE"),b.default.tr("SESSION_REQUEST_DESCRIPTION")));case 1:case"end":return t.stop()}}),t)})))),N(I(e),"getSession",function(){var t=k(j().mark((function t(r){var n;return j().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(R(I(e),Y)){t.next=2;break}throw new Error("CobrowseIO not started. Call CobrowseIO.start()");case 2:if(!e.currentSession||e.currentSession.id()!==r&&e.currentSession.code()!==r){t.next=4;break}return t.abrupt("return",e.currentSession.fetch());case 4:return n=new s.Session(I(e)).updateResource({id:r}),R(I(e),ie).call(I(e),n),t.next=8,n.fetch();case 8:return e.emit("session.loaded",n),t.abrupt("return",n);case 10:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),N(I(e),"createSession",k(j().mark((function t(){var r;return j().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(R(I(e),Y)){t.next=2;break}throw new Error("CobrowseIO not started. Call CobrowseIO.start()");case 2:if(!e.currentSession||!e.currentSession.isActive()&&!e.currentSession.isAuthorizing()){t.next=4;break}throw new Error("Already in a session");case 4:return r=new s.Session(I(e)),R(I(e),ie).call(I(e),r),t.next=8,r.update({custom_data:e.customData,device:u.Device.info});case 8:return e.emit("session.loaded",r),t.abrupt("return",r);case 10:case"end":return t.stop()}}),t)})))),N(I(e),"createSessionCode",k(j().mark((function t(){var r;return j().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.createSession();case 2:return r=t.sent,t.abrupt("return",r.code());case 4:case"end":return t.stop()}}),t)})))),N(I(e),"client",k(j().mark((function t(){return j().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",I(e));case 1:case"end":return t.stop()}}),t)})))),A(I(e),fe,{writable:!0,value:function(t){t&&["license","api","customData","showSessionControls","hideSessionControls","confirmSession","confirmRemoteControl","confirmFullDevice","trustedOrigins","redactedViews","unredactedViews","ignoredViews","capabilities"].forEach((function(r){t[r]&&(e[r]=t[r])}))}}),W("interface constructed in",document),D(I(e),q,c),e.api="https://api.cobrowse.io",R(I(e),fe).call(I(e),window&&window.CobrowseIO),D(I(e),U,R(I(e),B).load(I(e))),R(I(e),X).on("register",R(I(e),oe)),R(I(e),X).on("notification",(function(t){var r=t["cobrowseio-code"];r&&e.getSession(r).catch((function(e){console.warn("CobrowseIO: session fetch failed:",e)}))})),e}return t=x,i=[{key:"version",get:function(){return u.Device.info.sdk_version}}],(r=[{key:"deviceId",value:function(){return u.Device.deviceId()}},{key:"currentSession",get:function(){return R(this,G)?R(this,G).session:R(this,U)}},{key:"showSessionControls",get:function(){return R(this,ue)?R(this,ue):l.SessionStateOverlay.show},set:function(e){D(this,ue,e),l.SessionStateOverlay.hide(),this.currentSession&&this.currentSession.isActive()&&R(this,ue).call(this)}},{key:"license",get:function(){return c.RESTResource.getHeader("X-CobrowseLicense")},set:function(e){if(R(this,Y)&&this.license!==e)throw new Error("Cannot change license once Cobrowse is started");c.RESTResource.setHeader("X-CobrowseLicense",e)}},{key:"api",get:function(){return c.RESTResource.api},set:function(e){if(R(this,Y)&&c.RESTResource.api!==e)throw new Error("Cannot change API once Cobrowse is started");c.RESTResource.api=e}},{key:"redactedViews",get:function(){return R(this,J)},set:function(e){if(R(this,Y))throw new Error("Cannot set redacted views after Cobrowse is started");D(this,J,e)}},{key:"unredactedViews",get:function(){return R(this,ee)},set:function(e){if(R(this,Y))throw new Error("Cannot set unredacted views after Cobrowse is started");D(this,ee,e)}},{key:"ignoredViews",get:function(){return R(this,re)},set:function(e){if(R(this,Y))throw new Error("Cannot set ignored views after Cobrowse is started");D(this,re,e),w.default.setIgnoredViews(e)}},{key:"capabilities",get:function(){return R(this,K).toArray()},set:function(e){if(R(this,Y))throw new Error("Cannot set capabilities after Cobrowse is started");if(!Array.isArray(e))throw new Error("Capabilities should be an array");D(this,K,new s.SessionCapabilities(e.filter((function(e){return!!u.Device.info.capabilities.includes(e)||(console.warn("Capability '".concat(e,"' not supported. Ignoring...")),!1)}))))}},{key:"customData",get:function(){return S(S({},R(this,X).customData),R(this,H))},set:function(e){if("object"!==_(e))throw new Error("Custom data must be an object");if(D(this,H,S(S({},R(this,H)),e)),R(this,Y)&&setTimeout(R(this,le),0),this.currentSession&&this.currentSession.isActive()){var t=this.currentSession.resource.custom_data;if(!Object.keys(e).find((function(r){return t[r]!==e[r]})))return void W("no changes to session custom data");this.currentSession.update({custom_data:e}).catch((function(){console.warn("CobrowseIO: failed to update custom data on active session")}))}}},{key:"trustedOrigins",get:function(){return h.default.trustedOrigins},set:function(e){var t=e.map((function(e){try{return new URL(e).origin}catch(t){return console.warn("CobrowseIO: Invalid URL in trustedOrigins:",e),null}})).filter((function(e){return e}));h.default.trustedOrigins=t}},{key:"version",get:function(){return x.version}}])&&T(t.prototype,r),i&&T(t,i),Object.defineProperty(t,"prototype",{writable:!1}),x}(i.EventEmitter);t.CobrowseIO=de,c.RESTResource.setHeader("Content-Type","application/json"),c.RESTResource.setHeader("X-CobrowsePlatform","web"),c.RESTResource.setHeader("X-CobrowseSDKVersion",de.version),c.RESTResource.setHeader("X-CobrowseDevice",u.Device.deviceId()),c.RESTResource.setHeader("X-CobrowseAPIVersion","1.2.0");var pe=new de;t.default=pe},1974:function(e,t,r){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}r(4843),r(444),r(1076),r(5547),r(1624),r(2047),r(8534),r(8496),r(4802),r(2112),r(6353),r(3064),r(3275),r(6941),r(4277),r(6257),t.Z=function(){try{var e=window.CXBus.registerPlugin("CobrowseIOExtension");window.oCobrowseIOExtension=e,e.subscribe("WebChatService.started",(function(t){try{s("CobrowseIOExtension.WebChatService.started",t),function(e){document.getElementsByClassName("cx-menu")[0].innerHTML+='<li role="none"><div class="cx-menu-item cx-cobrowseio cx-icon" role="button" data-icon="cobrowseio" tabindex="0" aria-label="Start Co-browse Opens the Co-browse session" title="Start Co-browse" style="display: block/;"><svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" viewBox="0 0 100 100" focusable="false" role="img" aria-hidden="true" alt="" data-gcb-service-node="true"><g class="cx-svg-icon-tone1" data-gcb-service-node="true"><path d="M11.5000001,3 L85.4166665,3 L87.6666668,3 C90.2624998,3 97,3.75367965 97,8.36940835 L97,30.4776335 L4.16666671,30.4776335 L4.16666671,70.4963922 C4.16666671,78.8021647 9.0333332,80.6810966 11.3333336,80.6810966 L88.6666664,80.6810966 C90.9625002,80.6810966 92.8333333,78.8021647 92.8333333,76.4963922 L92.8333333,41.8470419 L97,41.8470419 L97,79.5093796 C97,84.1251081 93.2624998,84.8787879 91.6666668,84.8787879 L8.3333332,84.8787879 C3.73750015,84.8787879 1,81.1251081 0,75.5093796 L0,8.36940835 C3,3.75367965 2.73750015,3 8.3333332,3 L8.5000001,3 Z M18.0297398,7.03030303 L5.9962825,7.03030303 C5.79033476,7.03030303 3.99999999,8.59607987 3.99999999,10.5175565 L3.999999,26.1125541 L93,26.1125541 L93,10.5175565 C93,8.59607987 91.2056692,7.03030303 89.0037175,7.03030303 L81.9702602,7.03030303 L18.0297398,7.03030303 Z M42.3451929,54.7727663 L42.3451929,68.6904309 L35,68.6904309 L35,47.7138693 C35,44.657411 37.4676761,42.1818182 40.5082059,42.1818182 L61.3971055,42.1818182 L61.3971055,49.5560425 L47.5394308,49.5560425 L66.3971054,67.9373646 L61.202867,73.154089 L42.3451929,54.7727663 Z" id="Fill-1-Copy""></path></g></svg></div></li>',document.getElementsByClassName("cx-cobrowseio")[0].onclick=function(){return function(e){return l.apply(this,arguments)}(e)}}(e),function(e){e.command("WebChatService.updateUserData",{cobrowse_device_id:o.default.deviceId()}).done((function(e){s("CobrowseIOExtension.WebChWebChatService.updateUserData succeeded",e)})).fail((function(e){s("CobrowseIOExtension.WebChWebChatService.updateUserData failed",e)}))}(e);var r={cobrowse_device_id:o.default.deviceId()};t&&t.data&&(t.data.data&&t.data.data.conversationId&&(r.genesys_conversation_id=t.data.data.conversationId),t.data.userId&&"deprecated"!==t.data.userId&&(r.genesys_user_id=t.data.userId),t.data.sessionID&&"deprecated"!==t.data.sessionID&&(r.genesys_session_id=t.data.sessionID)),o.default.customData=r}catch(e){s("Error during CobrowseIOExtension.WebChatService.started",e)}})),e.subscribe("WebChatService.agentConnected",(function(e){s("CobrowseIOExtension.WebChatService.agentConnected",e)})),e.subscribe("WebChatService.clientConnected",(function(e){s("CobrowseIOExtension.WebChatService.clientConnected",e)})),e.subscribe("WebChatService.restored",(function(e){s("CobrowseIOExtension.WebChatService.restored",e)})),e.subscribe("WebChat.started",(function(e){try{if(s("CobrowseIOExtension.WebChat.started",e),e&&e.data&&e.data.form){s("e.data.form",e.data.form);var t=e.data.form||{};t.device_name=e.data.form.firstname?"".concat(e.data.form.firstname,"'s device"):"WebChat User's Device",o.default.customData=t}}catch(e){s("Error during CobrowseIOExtension.WebChat.started",e)}})),e.republish("ready"),e.ready()}catch(e){console.error("Error syncing Cobrowse.io with Genesys, please contact hello@cobrowse.io for help!"),console.warn(e)}},r(1e3),r(3114);var o=i(r(1178));function i(e){return e&&e.__esModule?e:{default:e}}function a(){a=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var i=t&&t.prototype instanceof h?t:h,a=Object.create(i.prototype),c=new k(n||[]);return o(a,"_invoke",{value:O(e,r,c)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=f;var p={};function h(){}function y(){}function v(){}var m={};l(m,c,(function(){return this}));var b=Object.getPrototypeOf,g=b&&b(b(P([])));g&&g!==t&&r.call(g,c)&&(m=g);var w=v.prototype=h.prototype=Object.create(m);function E(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function i(o,a,c,u){var s=d(e[o],e,a);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==n(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){i("next",e,c,u)}),(function(e){i("throw",e,c,u)})):t.resolve(f).then((function(e){l.value=e,c(l)}),(function(e){return i("throw",e,c,u)}))}u(s.arg)}var a;o(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){i(e,r,t,n)}))}return a=a?a.then(n,n):n()}})}function O(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=S(a,r);if(c){if(c===p)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=d(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,S(e,t),"throw"===t.method))return p;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var n=d(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,p;var o=n.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function P(e){if(e){var t=e[c];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:T}}function T(){return{value:void 0,done:!0}}return y.prototype=v,o(w,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,l(e,s,"GeneratorFunction")),e.prototype=Object.create(w),e},e.awrap=function(e){return{__await:e}},E(_.prototype),l(_.prototype,u,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},E(w),l(w,s,"Generator"),l(w,c,(function(){return this})),l(w,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=P,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),x(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:P(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function c(e,t,r,n,o,i,a){try{var c=e[i](a),u=c.value}catch(e){return void r(e)}c.done?t(u):Promise.resolve(u).then(n,o)}function u(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){c(i,n,o,a,u,"next",e)}function u(e){c(i,n,o,a,u,"throw",e)}a(void 0)}))}}var s=(0,i(r(9796)).default)("cbio.Integrations.Genesys");function l(){return(l=u(a().mark((function e(t){var r;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s("Requesting cobrowse"),e.next=3,o.default.createSessionCode();case 3:r=e.sent,s("Generated session code: ".concat(r)),t.command("WebChatService.sendFilteredMessage",{message:"Customer requests Cobrowse session with code: ".concat(r.substr(0,3)," ").concat(r.substr(3)),regex:/Customer requests Cobrowse session with code:.*/}).done((function(e){s("CobrowseIOExtension.WebChatService sent filtered message successfully",e)})).fail((function(e){s("CobrowseIOExtension.WebChatService failed to send filtered message",e)}));case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},1289:function(e,t,r){var n;function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(4843);var i=(0,((n=r(9796))&&n.__esModule?n:{default:n}).default)("cbio.Integrations"),a=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n;return t=e,n=[{key:"watchProperty",value:function(e,t,r){e[t]?(i("".concat(t," already exists")),r()):(i("".concat(t," not set yet... monitoring"),e),Object.defineProperty(e,t,{configurable:!0,set:function(n){i("CobrowseIO detected",t),Object.defineProperty(e,t,{configurable:!0,writable:!0,value:n}),setTimeout(r,0)}}))}},{key:"initialize",value:function(){var e=this;i("Initializing integrations"),this.watchProperty(window,"CXBus",(function(){return r(1974).Z()})),this.watchProperty(window,"Intercom",(function(){return r(4775).Z()})),this.watchProperty(window,"$zopim",(function(){return r(3478).z2()})),this.watchProperty(window,"zE",(function(){"messenger"===window.zE.widget?r(3478).dQ():e.watchProperty(window.zE,"identify",(function(){return r(3478).Bt()}))})),this.watchProperty(window,"embedded_svc",(function(){return e.watchProperty(window.embedded_svc,"liveAgentAPI",(function(){r(8738).Z()}))}))}}],null&&o(t.prototype,null),n&&o(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.default=a},4775:function(e,t,r){r(4843),t.Z=function(){try{if(!window.Intercom||"function"!=typeof window.Intercom)throw new Error("expected window.Intercom to be a function");a("Initializing intercom integration"),c(),window.Intercom("onShow",(0,n.default)(c,12e4,{trailing:!1}))}catch(e){console.error("Error syncing Cobrowse.io with Intercom, please contact hello@cobrowse.io for help!"),console.warn(e)}};var n=i(r(1381)),o=i(r(1178));function i(e){return e&&e.__esModule?e:{default:e}}var a=(0,i(r(9796)).default)("cbio.Integrations.Intercom");function c(){a("Updating intercom integration"),window.intercomSettings||(window.intercomSettings={}),window.intercomSettings.CobrowseID=o.default.deviceId(),window.Intercom("update",{CobrowseID:o.default.deviceId()})}},8738:function(e,t,r){r(4843),t.Z=function(){try{if("object"!==i(window.embedded_svc))throw new Error("expected window.embedded_svc to a be an object");if(window.embedded_svc&&!window.embedded_svc.liveAgentAPI)throw new Error("expected liveAgentAPI on embedded_svc");a("Initializing salesforce integration"),window.embedded_svc.addEventHandler("onChatRequestSuccess",(function(e){e&&e.liveAgentSessionKey&&(n.default.customData={salesforce_liveAgentSessionKey:e.liveAgentSessionKey})})),window.embedded_svc.addEventHandler("onChatEndedByAgent",(function(){n.default.currentSession&&n.default.currentSession.end()})),window.embedded_svc.addEventHandler("onChatEndedByChasitor",(function(){n.default.currentSession&&n.default.currentSession.end()}))}catch(e){console.error("Error syncing Cobrowse.io with Salesforce Chat, please contact hello@cobrowse.io for help!"),console.warn(e)}},r(444),r(1076),r(1e3),r(5547),r(1624),r(2047),r(8534);var n=o(r(1178));function o(e){return e&&e.__esModule?e:{default:e}}function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}var a=(0,o(r(9796)).default)("cbio.Integrations.Salesforce")},3478:function(e,t,r){r(4843),t.Bt=function(){try{!function(){if(!window.zE||!window.zE.identify)throw new Error("missing window.zE or window.zE.identify");s();var e=window.zE.identify;window.zE.identify=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return a("identify",r[0]),e.apply(void 0,r)}}()}catch(e){console.error("Error syncing Cobrowse.io with Zendesk (classic), please contact hello@cobrowse.io for help!"),console.warn(e)}},t.dQ=function(){try{"true"===sessionStorage.getItem("ZD-widgetOpen")?h().then(l):window.zE("messenger:on","open",(function(){h().then(l)}))}catch(e){console.error("Error syncing Cobrowse.io with Zendesk (messenger), please contact hello@cobrowse.io for help!"),console.warn(e)}},t.z2=function(){try{if("function"!=typeof window.$zopim)throw new Error("expected window.$zopim to a be a function");window.$zopim((function(){i("Initializing zendesk integration"),window.$zopim.livechat.addTags("cobrowseio_deviceid_".concat(n.default.deviceId())),n.default.customData={cobrowseio_deviceid:n.default.deviceId()}}))}catch(e){console.error("Error syncing Cobrowse.io with Zendesk Chat, please contact hello@cobrowse.io for help!"),console.warn(e)}},r(6941),r(5128),r(6706),r(1e3),r(3524),r(3317);var n=o(r(1178));function o(e){return e&&e.__esModule?e:{default:e}}var i=(0,o(r(9796)).default)("cbio.Integrations.Zendesk");function a(e,t){var r={};"identify"===e&&t?(t.name&&(r.user_name=t.name),t.email&&(r.user_email=t.email),t.organization&&(r.user_organization=t.organization)):"prefill"===e&&t?(t.name&&t.name.value&&(r.user_name=t.name.value),t.email&&t.email.value&&(r.user_email=t.email.value),t.phone&&t.phone.value&&(r.user_phone=t.phone.value)):"logout"===e&&(r={user_name:null,user_email:null,user_organization:null,user_phone:null}),u(r)}function c(e,t){var r={};"identify"===e&&t?r={zendesk_web_user_id:t.appUserId}:"logoutUser"===e&&(r={user_name:null,user_email:null,user_organization:null,user_phone:null,zendesk_web_user_id:null,zendesk_user_id:null,zendesk_ticket_id:null}),u(r)}function u(e){Object.keys(e).length&&(n.default.customData=e)}function s(){var e=window.zE;for(var t in window.zE=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];console.log(r);var o=r[0],i=r[1],u=r[2];return"webWidget"===o&&a(i,u),"messenger"===o&&c(i,u),e.apply(void 0,r)},e)window.zE[t]=e[t]}function l(){s();var e=f();if(!e)throw new Error("Missing client ID (ZD-buid)");var t=d(e);if(!t)throw new Error("Instance ID could not be found");c("identify",{appUserId:p(t)})}function f(){return localStorage.getItem("ZD-buid")}function d(e){var t,r;return null===(t=Object.keys(localStorage).find((function(t){return t.match(/\w+\.clientId/)&&localStorage[t]===e})))||void 0===t||null===(r=t.split("."))||void 0===r?void 0:r[0]}function p(e){return localStorage.getItem("".concat(e,".appUserId"))}function h(){return new Promise((function e(t,r){var n=p(d(f()));n?t(n):setTimeout(e,2e3,t,r)}))}},5978:function(e,t,r){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}r(4843),r(4277),r(3064),r(9616),r(444),r(1076),r(5547),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(1624),r(1e3),r(2047),r(1157),r(8534);var o=r(1239),i=a(r(1381));function a(e){return e&&e.__esModule?e:{default:e}}function c(e,t){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},c(e,t)}function u(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return s(e)}function s(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function l(e){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},l(e)}function f(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function d(e,t,r){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,r)}function p(e,t){return function(e,t){return t.get?t.get.call(e):t.value}(e,y(e,t,"get"))}function h(e,t,r){return function(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}(e,y(e,t,"set"),r),r}function y(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}var v=(0,a(r(9796)).default)("cbio.ActivityDetection"),m=new WeakMap,b=new WeakMap,g=new WeakMap,w=new WeakMap,E=new WeakMap,_=new WeakMap,O=new WeakMap,S=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&c(e,t)}(a,e);var t,r,n,o=(r=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=l(r);if(n){var o=l(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return u(this,e)});function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),d(s(t=o.call(this)),m,{writable:!0,value:!1}),d(s(t),b,{writable:!0,value:!1}),d(s(t),g,{writable:!0,value:null}),d(s(t),w,{writable:!0,value:9e5}),f(s(t),"start",(function(){p(s(t),m)||(h(s(t),m,!0),v("started"),document.addEventListener("mouseenter",p(s(t),E),{capture:!0,passive:!0}),document.addEventListener("mouseleave",p(s(t),E),{capture:!0,passive:!0}),document.addEventListener("mousemove",p(s(t),E),{capture:!0,passive:!0}),document.addEventListener("touchstart",p(s(t),E),{capture:!0,passive:!0}),document.addEventListener("touchend",p(s(t),E),{capture:!0,passive:!0}),document.addEventListener("touchmove",p(s(t),E),{capture:!0,passive:!0}),document.addEventListener("visibilitychange",p(s(t),E),{capture:!0}),p(s(t),E).call(s(t)))})),f(s(t),"stop",(function(){h(s(t),b,!1),h(s(t),m,!1),v("stopped"),clearTimeout(p(s(t),g)),t.removeAllListeners(),document.removeEventListener("mouseenter",p(s(t),E),{capture:!0,passive:!0}),document.removeEventListener("mouseleave",p(s(t),E),{capture:!0,passive:!0}),document.removeEventListener("mousemove",p(s(t),E),{capture:!0,passive:!0}),document.removeEventListener("touchstart",p(s(t),E),{capture:!0,passive:!0}),document.removeEventListener("touchend",p(s(t),E),{capture:!0,passive:!0}),document.removeEventListener("touchmove",p(s(t),E),{capture:!0,passive:!0}),document.removeEventListener("visibilitychange",p(s(t),E),{capture:!0})})),f(s(t),"isActive",(function(){return p(s(t),b)})),d(s(t),E,{writable:!0,value:(0,i.default)((function(){p(s(t),_).call(s(t)),clearTimeout(p(s(t),g)),h(s(t),g,setTimeout(p(s(t),O),p(s(t),w))),t.emit("activity")}),500,{trailing:!1})}),d(s(t),_,{writable:!0,value:function(){p(s(t),b)||(document.hidden?v("window is hidden, not becoming active"):(h(s(t),b,!0),v("became active"),t.emit("active")))}}),d(s(t),O,{writable:!0,value:function(){p(s(t),b)&&(h(s(t),b,!1),v("became inactive"),t.emit("inactive"))}}),e&&h(s(t),w,e),t}return t=a,Object.defineProperty(t,"prototype",{writable:!1}),t}(o.EventEmitter);t.default=S},2650:function(e,t,r){r(5128),r(444),r(4011),r(1e3),r(5226),r(3275),r(9270),r(6507),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(4843);var n,o=(n=r(1381))&&n.__esModule?n:{default:n};function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach((function(t){s(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function c(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function u(e,t,r){return t&&c(e.prototype,t),r&&c(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function s(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var l=new(u((function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),s(this,"_mousePosition",{x:-1,y:-1}),s(this,"_mouseIsDown",!1),s(this,"_mouseIsIn",!1),s(this,"track",(function(e){e.addEventListener("mousedown",t._onMouseDown,{capture:!0,passive:!0}),e.addEventListener("mouseup",t._onMouseUp,{capture:!0,passive:!0}),e.addEventListener("mouseenter",t._onMouseEnter,{capture:!0,passive:!0}),e.addEventListener("mouseleave",t._onMouseLeave,{capture:!0,passive:!0}),e.addEventListener("mousemove",t._onMouseMove,{capture:!0,passive:!0})})),s(this,"untrack",(function(e){e.removeEventListener("mousedown",t._onMouseDown,{capture:!0,passive:!0}),e.removeEventListener("mouseup",t._onMouseUp,{capture:!0,passive:!0}),e.removeEventListener("mouseenter",t._onMouseEnter,{capture:!0,passive:!0}),e.removeEventListener("mouseleave",t._onMouseLeave,{capture:!0,passive:!0}),e.removeEventListener("mousemove",t._onMouseMove,{capture:!0,passive:!0})})),s(this,"isDown",(function(){return t._mouseIsDown})),s(this,"setDown",(function(e){t._mouseIsDown=e,t.onChange&&t.onChange(t.state())})),s(this,"isIn",(function(){return t._mouseIsIn>0})),s(this,"position",(function(){return t._mousePosition})),s(this,"setPosition",(function(e,r,n){if(n){var o=n.getBoundingClientRect();e+=Math.round(o.left),r+=Math.round(o.top)}t._mousePosition={x:e,y:r},t.onChange&&t.onChange(t.state())})),s(this,"state",(function(){return a(a({},t.position()),{},{down:t.isDown(),in:t.isIn()})})),s(this,"_onMouseDown",(function(e){e.isTrusted&&t.setDown(!0)})),s(this,"_onMouseUp",(function(e){e.isTrusted&&t.setDown(!1)})),s(this,"_onMouseEnter",(function(e){e.isTrusted&&(t._mouseIsIn+=1)})),s(this,"_onMouseLeave",(function(e){e.isTrusted&&e.target===e.currentTarget&&(t._mouseIsIn-=1)})),s(this,"_onMouseMove",(0,o.default)((function(e){if(e.isTrusted){var r=e.clientX,n=e.clientY,o=e.view&&e.view.frameElement;t.setPosition(r,n,o)}}),100))})));t.default=l},1094:function(e,t,r){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}r(4843),r(4277),r(3064),r(9616),r(444),r(1076),r(5547),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(3114),r(1624),r(1e3),r(2047),r(1157),r(8534);var o=r(1239),i=r(5828),a=c(r(5901));function c(e){return e&&e.__esModule?e:{default:e}}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function l(e,t){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},l(e,t)}function f(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return d(e)}function d(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},p(e)}function h(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function y(e,t,r){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,r)}function v(e,t,r){return function(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}(e,b(e,t,"set"),r),r}function m(e,t){return function(e,t){return t.get?t.get.call(e):t.value}(e,b(e,t,"get"))}function b(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}var g=(0,c(r(9796)).default)("cbio.WindowTracking"),w="_cobrowse_window_id",E=new WeakMap,_=new WeakMap,O=new WeakMap,S=new WeakMap,j=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&l(e,t)}(b,e);var t,r,n,o,c=(n=b,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=p(n);if(o){var r=p(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return f(this,e)});function b(){var e;u(this,b);for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return y(d(e=c.call.apply(c,[this].concat(r))),E,{writable:!0,value:(0,i.v4)()}),y(d(e),_,{writable:!0,value:!1}),y(d(e),O,{writable:!0,value:!1}),h(d(e),"start",(function(){m(d(e),O)||(v(d(e),O,!0),g("started"),m(d(e),S).call(d(e)),document.addEventListener("visibilitychange",m(d(e),S),{capture:!0}),document.addEventListener("mouseover",m(d(e),S),{capture:!0}))})),h(d(e),"stop",(function(){g("stopped"),e.removeAllListeners(),v(d(e),O,!1),document.removeEventListener("visibilitychange",m(d(e),S),{capture:!0}),document.removeEventListener("mouseover",m(d(e),S),{capture:!0})})),h(d(e),"isActive",(function(){return(0,a.default)().getItem(w)===e.id})),h(d(e),"setTracksIframes",(function(t){v(d(e),_,t),m(d(e),S).call(d(e))})),h(d(e),"shouldTrack",(function(){return!document.hidden&&(!(window.self!==window.top)||m(d(e),_))})),h(d(e),"makeActive",(function(){e.isActive()||(g("making active",window),(0,a.default)().setItem(w,e.id),e.emit("activate",window))})),h(d(e),"resignActive",(function(){e.isActive()&&(g("resigning active",window),(0,a.default)().setItem(w,null))})),y(d(e),S,{writable:!0,value:function(){e.shouldTrack()&&e.makeActive(),e.emit("updated")}}),e}return t=b,(r=[{key:"id",get:function(){return m(this,E)}}])&&s(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),b}(o.EventEmitter),x=new j;t.default=x},5064:function(e,t,r){r(4843),Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ActivityDetection",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"MouseTracking",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"WindowTracking",{enumerable:!0,get:function(){return i.default}});var n=a(r(5978)),o=a(r(2650)),i=a(r(1094));function a(e){return e&&e.__esModule?e:{default:e}}},7725:function(e,t,r){r(4843),r(4277),r(3064),r(1112),r(5226),r(9616),r(444),r(1076),r(5547),r(8496),r(4802),r(2112),r(6353),r(3275),r(6941),r(6257),Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.RegistrationPath=t.DeviceIdPath=void 0,r(1e3),r(7285),r(1624),r(2047),r(8534),r(6955),r(8927),r(6706),r(5128),r(3114),r(3524),r(1157);var n=r(5828),o=r(8302),i=s(r(2260)),a=s(r(5901)),c=s(r(3440)),u=s(r(9421));function s(e){return e&&e.__esModule?e:{default:e}}function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}function f(){f=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,r){return e[t]=r}}function s(e,t,r,o){var i=t&&t.prototype instanceof h?t:h,a=Object.create(i.prototype),c=new k(o||[]);return n(a,"_invoke",{value:O(e,r,c)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=s;var p={};function h(){}function y(){}function v(){}var m={};u(m,i,(function(){return this}));var b=Object.getPrototypeOf,g=b&&b(b(P([])));g&&g!==t&&r.call(g,i)&&(m=g);var w=v.prototype=h.prototype=Object.create(m);function E(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function o(n,i,a,c){var u=d(e[n],e,i);if("throw"!==u.type){var s=u.arg,f=s.value;return f&&"object"==l(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){o("next",e,a,c)}),(function(e){o("throw",e,a,c)})):t.resolve(f).then((function(e){s.value=e,a(s)}),(function(e){return o("throw",e,a,c)}))}c(u.arg)}var i;n(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){o(e,r,t,n)}))}return i=i?i.then(n,n):n()}})}function O(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=S(a,r);if(c){if(c===p)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=d(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,S(e,t),"throw"===t.method))return p;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var n=d(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,p;var o=n.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function P(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:T}}function T(){return{value:void 0,done:!0}}return y.prototype=v,n(w,"constructor",{value:v,configurable:!0}),n(v,"constructor",{value:y,configurable:!0}),y.displayName=u(v,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,u(e,c,"GeneratorFunction")),e.prototype=Object.create(w),e},e.awrap=function(e){return{__await:e}},E(_.prototype),u(_.prototype,a,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},E(w),u(w,c,"Generator"),u(w,i,(function(){return this})),u(w,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=P,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),x(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:P(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function d(e,t,r,n,o,i,a){try{var c=e[i](a),u=c.value}catch(e){return void r(e)}c.done?t(u):Promise.resolve(u).then(n,o)}function p(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){d(i,n,o,a,c,"next",e)}function c(e){d(i,n,o,a,c,"throw",e)}a(void 0)}))}}function h(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function y(e,t){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},y(e,t)}function v(e,t){if(t&&("object"===l(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return m(e)}function m(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function b(){return b="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=g(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}},b.apply(this,arguments)}function g(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=w(e)););return e}function w(e){return w=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},w(e)}function E(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _(e,t,r){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,r)}function O(e,t){return function(e,t){return t.get?t.get.call(e):t.value}(e,j(e,t,"get"))}function S(e,t,r){return function(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}(e,j(e,t,"set"),r),r}function j(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}var x=(0,s(r(9796)).default)("cbio.Device"),k="_cobrowse_device_id";t.DeviceIdPath=k;var P="_cobrowse_device_registration";t.RegistrationPath=P;var T=new WeakMap,L=new WeakMap,C=new WeakMap,I=new WeakMap,M=new WeakMap,N=new WeakMap,A=new WeakMap,R=new WeakMap,D=new WeakMap,F=new WeakMap,W=new WeakMap,z=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&y(e,t)}(j,e);var t,r,o,s,d,g=(s=j,d=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=w(s);if(d){var r=w(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return v(this,e)});function j(e){var t,r;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,j),_(m(r=g.call(this)),T,{writable:!0,value:void 0}),_(m(r),L,{writable:!0,value:void 0}),_(m(r),C,{writable:!0,value:void 0}),_(m(r),I,{writable:!0,value:!1}),_(m(r),M,{writable:!0,value:void 0}),E(m(r),"url",(function(){return new URL("api/1/devices/".concat(r.id()),j.api).toString()})),E(m(r),"reset",(function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];x("resetting device"),clearTimeout(O(m(r),C)),S(m(r),C,null),e||(0,a.default)().removeItem(P),O(m(r),T)&&(O(m(r),T).close(),S(m(r),T,null))})),E(m(r),"destroy",p(f().mark((function e(){return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return x("destroying device"),r.reset(),e.abrupt("return",b((t=m(r),w(j.prototype)),"destroy",t).call(t));case 3:case"end":return e.stop()}}),e)})))),E(m(r),"hasPendingUpdates",(function(){var e=r.field("custom_data")||{},t=O(m(r),M).customData||{};return!!Object.keys(t).find((function(r){return e[r]!==t[r]}))})),_(m(r),N,{writable:!0,value:function(){if(!O(m(r),M).license)throw new Error("License required to generate storage key");return"".concat(O(m(r),M).license,":").concat(j.api)}}),E(m(r),"_saveRegistration",(function(){var e=r.field("next_registration")||3600,t=(new Date).getTime();"number"!=typeof Date.now()&&console.error("Unexpected type returned for Date.now(), expecting number got ".concat(l(Date.now()))),"number"!=typeof t&&console.error("Unexpected type for getTime() of Date, expecting number got ".concat(l(t)));var n={notification_url:r.field("notification_url"),notification_token:r.field("notification_token"),custom_data:r.field("custom_data"),next_registration_time:t+1e3*e};return r.cache({next_registration_time:n.next_registration_time}),(0,a.default)(O(m(r),N).call(m(r))).setItem(P,n),m(r)})),E(m(r),"_loadRegistration",(function(){if(!O(m(r),I)){S(m(r),I,!0);var e=(0,a.default)(O(m(r),N).call(m(r))).getItem(P);e&&(x("restoring registration",e),r.cache(e))}})),E(m(r),"updateRegistration",function(){var e=p(f().mark((function e(t){return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!O(m(r),L).limit()){e.next=2;break}throw new Error("Cobrowse update rate limit exceeded. Maybe you're updating custom data too often?");case 2:return x("updating registration"),e.next=5,r.update({device:j.info,custom_data:O(m(r),M).customData},t);case 5:return O(m(r),W).call(m(r)),r._saveRegistration(),r.emit("register"),e.abrupt("return",m(r));case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),E(m(r),"runRegistrationLoop",p(f().mark((function e(){return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(x("starting registrations"),r._loadRegistration(),r.reset(!0),!(r.hasPendingUpdates()||r.nextRegistration()<=0)){e.next=6;break}return e.next=6,r.updateRegistration().catch((function(){}));case 6:O(m(r),W).call(m(r)),O(m(r),A).call(m(r));case 8:case"end":return e.stop()}}),e)})))),E(m(r),"pauseRegistrationLoop",p(f().mark((function e(){return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:x("pausing registrations"),r.reset(!0);case 2:case"end":return e.stop()}}),e)})))),E(m(r),"nextRegistration",(function(){return(r.field("next_registration_time")||0)-(new Date).getTime()})),E(m(r),"bannerMessage",(function(){return r.field("banner_message")||!1})),E(m(r),"_nextUpdate",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return Math.max(Math.min(6e4*e,36e5),r.nextRegistration())})),_(m(r),A,{writable:!0,value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(O(m(r),C))console.error("CobrowseIO: tried to schedule registration while already scheduled");else{var t=r._nextUpdate(e);S(m(r),C,setTimeout(p(f().mark((function t(){return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(O(m(r),C)){t.next=2;break}return t.abrupt("return",console.error("Registration loop cancelled"));case 2:return t.prev=2,t.next=5,r.updateRegistration();case 5:return S(m(r),C,!1),t.abrupt("return",O(m(r),A).call(m(r)));case 9:return t.prev=9,t.t0=t.catch(2),console.warn("CobrowseIO: registration failed",t.t0),S(m(r),C,!1),t.abrupt("return",O(m(r),A).call(m(r),e+1));case 14:case"end":return t.stop()}}),t,null,[[2,9]])}))),Math.max(1e3,t)))}}}),_(m(r),R,{writable:!0,value:function(){var e=r.field("notification_url"),t=r.field("notification_token");return(0,c.default)(e,t)}}),_(m(r),D,{writable:!0,value:function(){O(m(r),T)||(S(m(r),T,new i.default({getUrl:O(m(r),R)})),O(m(r),T).setMaxReconnectDelay(6e4),O(m(r),T).on("error",(function(e){e&&console.warn("CobrowseIO notification socket error:",e)})),O(m(r),T).on("event",(function(e,t){"notification"===e?r.emit("notification",t):"probe"===e&&O(m(r),T).send("alive",t)})),O(m(r),T).on("open",(function(){O(m(r),T).send("filter",{events:["probe","notification"]})})))}}),_(m(r),F,{writable:!0,value:function(){O(m(r),T)&&(console.log("CobrowseIO: Closing socket"),O(m(r),T).close(),S(m(r),T,null))}}),_(m(r),W,{writable:!0,value:function(){var e=r.field("notification_url"),t=r.field("notification_token");e&&t?O(m(r),D).call(m(r)):O(m(r),F).call(m(r))}}),x("constructed"),!e)throw new Error("Device delegate is required");return S(m(r),M,e),S(m(r),L,new u.default(10,12e4)),r}return t=j,o=[{key:"deviceCredentials",value:function(){var e=(0,a.default)().getItem(k)||{};return"string"==typeof e&&(e={id:e}),"object"!==l(e)&&(e={}),e.id||(e.id=(0,n.v4)()),e.token||(e.token=(0,n.v4)()),(0,a.default)().setItem(k,e),e}},{key:"deviceId",value:function(){return this.deviceCredentials().id}},{key:"deviceToken",value:function(){return this.deviceCredentials().token}},{key:"info",get:function(){var e=["pointer","scroll","select","keypress","drawing","laser","cursor"];return/Android|webOS|iPhone|iPad|iPod|Opera Mini/i.test(window.navigator.userAgent)||e.push("full_device"),{platform:"web",device:window.navigator.userAgent,device_locale:window.navigator.language,device_timezone:window.Intl.DateTimeFormat().resolvedOptions().timeZone,os_version:window.navigator.platform,app_id:window.location.origin,app_name:window.document.title,app_build_configuration:"release",sdk_version:"2.22.4",capabilities:e}}}],(r=[{key:"id",value:function(){return j.deviceId()}},{key:"customData",get:function(){return this.field("custom_data")||{}}}])&&h(t.prototype,r),o&&h(t,o),Object.defineProperty(t,"prototype",{writable:!1}),j}(o.RESTResource);t.default=z},5161:function(e,t,r){r(4843),Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Device",{enumerable:!0,get:function(){return o.default}});var n,o=(n=r(7725))&&n.__esModule?n:{default:n}},8128:function(e,t,r){r(5128),r(444),r(4011),r(5226),r(9270),r(6507),r(6257),r(6486),r(3524),r(1076),r(5547),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(1e3),r(3275),r(3600),r(6770),r(6941),r(1624),r(8719),r(2047),r(8534),r(4843);var n,o=r(1514),i=r(5064),a=(n=r(8755))&&n.__esModule?n:{default:n};function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u(Object(r),!0).forEach((function(t){d(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function f(e,t,r){return t&&l(e.prototype,t),r&&l(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function d(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var p=f((function e(t){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),d(this,"_init",(function(){r._propertyWatcher||(r._propertyWatcher=new o.PropertyObserver(r._onPropertySet),a.default.on("stylechange",r._onStyleSheetChange),a.default.on("navigate",r._onNavigation))})),d(this,"observe",(function(e){if(!r._observing.has(e)){r._init(),e.addEventListener("scroll",r._onEvent,{capture:!0,passive:!0}),e.addEventListener("focus",r._onFocusChange,{capture:!0,passive:!0}),e.addEventListener("blur",r._onFocusChange,{capture:!0,passive:!0}),e.addEventListener("change",r._onInputEvent,{capture:!0,passive:!0}),e.addEventListener("keydown",r._onInputEvent,{capture:!0,passive:!0}),e.addEventListener("keyup",r._onInputEvent,{capture:!0,passive:!0}),e.addEventListener("keypress",r._onInputEvent,{capture:!0,passive:!0}),e.addEventListener("selectionchange",r._onSelectionEvent,{capture:!0,passive:!0}),e.addEventListener("select",r._onSelectionEvent,{capture:!0,passive:!0}),i.MouseTracking.track(e),r._observing.add(e);var t=(e.ownerDocument||e).defaultView;t&&!r._windows.has(t)&&(r._windows.add(t),a.default.tap(t),r._propertyWatcher.observe(t.HTMLInputElement,"value"),r._propertyWatcher.observe(t.HTMLInputElement,"checked"),r._propertyWatcher.observe(t.HTMLTextAreaElement,"value"),r._propertyWatcher.observe(t.ShadowRoot,"adoptedStyleSheets"),r._propertyWatcher.observe(t.Document,"adoptedStyleSheets"),t.addEventListener&&(t.addEventListener("hashchange",r._onEvent,{capture:!0,passive:!0}),t.addEventListener("resize",r._onEvent,{capture:!0,passive:!0})))}})),d(this,"disconnect",(function(){r._observing.forEach((function(e){e.removeEventListener("scroll",r._onEvent,{capture:!0,passive:!0}),e.removeEventListener("focus",r._onFocusChange,{capture:!0,passive:!0}),e.removeEventListener("blur",r._onFocusChange,{capture:!0,passive:!0}),e.removeEventListener("change",r._onInputEvent,{capture:!0,passive:!0}),e.removeEventListener("keydown",r._onInputEvent,{capture:!0,passive:!0}),e.removeEventListener("keyup",r._onInputEvent,{capture:!0,passive:!0}),e.removeEventListener("keypress",r._onInputEvent,{capture:!0,passive:!0}),e.removeEventListener("selectionchange",r._onSelectionEvent,{capture:!0,passive:!0}),e.removeEventListener("select",r._onSelectionEvent,{capture:!0,passive:!0}),i.MouseTracking.untrack(e)})),r._observing.clear(),r._windows.forEach((function(e){a.default.untap(e),e&&!(0,o.isxdoc)(e)&&e.removeEventListener&&(e.removeEventListener("hashchange",r._onEvent,{capture:!0,passive:!0}),e.removeEventListener("resize",r._onEvent,{capture:!0,passive:!0}))})),r._windows.clear(),r._propertyWatcher&&(r._propertyWatcher.disconnect(),r._propertyWatcher=null,a.default.off("stylechange",r._onStyleSheetChange),a.default.off("navigate",r._onNavigation))})),d(this,"_target",(function(e){return e.target&&e.target.document||e.target})),d(this,"_onEvent",(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r._onModification(r._target(e),s(s({},t),{},{type:e.type}))})),d(this,"_onSelectionEvent",(function(e){var t,n,o=null!==(t=e.target.ownerDocument)&&void 0!==t?t:e.target;o.__last_agent_selection_ts>Date.now()-100||("selectionchange"===e.type&&(["INPUT","TEXTAREA"].includes(null===(n=o.activeElement)||void 0===n?void 0:n.tagName)?(o.activeElement.__cobrowse_user_selection_timestamp=Date.now(),r._onModification(o.activeElement,{type:e.type})):(e.target.__cobrowse_user_selection_timestamp=Date.now(),r._onModification(e.target,{type:e.type}))),"select"===e.type&&(e.target.__cobrowse_user_selection_timestamp=Date.now(),r._onModification(e.target,{type:e.type})))})),d(this,"_onStyleSheetChange",(function(e){e.ownerNode&&r._onModification(e.ownerNode,{type:"stylesheet"});var t,n=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}(r._observing);try{for(n.s();!(t=n.n()).done;){var o,i=t.value;null!==(o=i.adoptedStyleSheets)&&void 0!==o&&o.includes(e)&&r._onModification(i,{type:"adoptedstylesheet"})}}catch(e){n.e(e)}finally{n.f()}})),d(this,"_onNavigation",(function(e){r._onModification(e.document,{type:"navigation"})})),d(this,"_onFocusChange",(function(e){r._onModification(e.target,{type:e.type}),e.target.ownerDocument&&r._onModification(e.target.ownerDocument,{type:e.type})})),d(this,"_onInputEvent",(function(e){"SELECT"===e.target.tagName||"TEXTAREA"===e.target.tagName?r._onModification(r._target(e),{recursive:!0,type:e.type}):"INPUT"===e.target.tagName&&("radio"===e.target.type?(e.target.closest("form")||e.target.ownerDocument).querySelectorAll("input[type=radio][name=".concat(e.target.name,"]")).forEach((function(t){return r._onModification(t,{type:e.type})})):r._onModification(r._target(e),{recursive:!0,type:e.type}))})),d(this,"_onPropertySet",(function(e){r._onModification(e,{type:"property"})})),this._onModification=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return setTimeout((function(){return t.apply(void 0,r)}),0)},this._observing=new Set,this._windows=new Set}));t.default=p},638:function(e,t,r){r(444),r(5226),r(9270),r(6507),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(4011),r(1e3),r(3133),r(5128),r(5562),r(1087),r(3275),r(4843);var n,o=(n=r(2404))&&n.__esModule?n:{default:n},i=r(1514);function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function c(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach((function(t){l(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function s(e,t,r){return t&&u(e.prototype,t),r&&u(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function l(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var f=s((function e(t){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),l(this,"_difference",(function(e,t){return t?Object.keys(e).map((function(r){return!(0,o.default)(e[r],t[r])&&l({},r,e[r])})).filter((function(e){return e})).reduce((function(e,t){return c(c({},e),t)}),{}):c({},e)})),l(this,"compress",(function(){return Object.values(r.modified).map((function(e){var t=r.state.node(e.id),n=r._difference(e,t),o=c({id:e.id},n);return 1!==Object.keys(o).length&&o})).filter((function(e){return e}))})),l(this,"mark",(function(){return r.state.applyPatch(Object.values(r.modified)),r.modified={},r})),l(this,"_flatten",(function(e){return e.childNodes?c(c({},e),{},{childNodes:e.childNodes.map((function(e){return{id:e.id}}))}):e})),l(this,"push",(function(e){return e&&e.modified?(e.modified.filter((function(e){return e})).forEach((function(e){(0,i.depthFirst)(e,(function(e){r.modified[e.id]=c(c({},r.modified[e.id]),r._flatten(e))}))})),r):(console.error("invalid patch",e),r)})),l(this,"reset",(function(e){return r.state=new i.VirtualDOM(r._id),r.modified={},e&&r.push({_t:"reset",modified:[e]}),r})),this._id=t,this.reset()}));t.default=f},3375:function(e,t,r){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}r(4277),r(3064),r(9616),r(5128),r(444),r(5226),r(9270),r(6507),r(1076),r(5547),r(6486),r(6941),r(3524),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(1624),r(1e3),r(8719),r(2047),r(8534),r(3275),r(6257),r(7285),r(3114),r(4011),r(3133),r(4843);var o=r(1239),i=r(1514),a=r(8541),c=r(7743),u=l(r(8128)),s=l(r(9356));function l(e){return e&&e.__esModule?e:{default:e}}function f(e){return function(e){if(Array.isArray(e))return p(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||d(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e,t){if(e){if("string"==typeof e)return p(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?p(e,t):void 0}}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function h(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function y(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?h(Object(r),!0).forEach((function(t){w(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):h(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function v(e,t){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},v(e,t)}function m(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return b(e)}function b(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function g(e){return g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},g(e)}function w(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var E=(0,l(r(9796)).default)("cbio.PatchStream"),_=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&v(e,t)}(l,e);var t,r,n,o=(r=l,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=g(r);if(n){var o=g(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return m(this,e)});function l(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),w(b(t=o.call(this)),"start",(function(){E("starting patch stream for",t._root),t._documents=new Set,t._redacted=new Set,t._iframeBridge.on("iframe_patched",t._onXDocIframeUpdate),t._canvasUpdateInterval=setInterval(t._updateCanvasContent,2e3),t._observe(t._root)})),w(b(t),"forceUpdate",(function(){E("forcing entire state update from",t._root),t.emit("patch",{_t:"pre-force",flush:!0,modified:[y(y({},c.NodeSerializer.serialize(t._root)),{},{scroll:void 0,childNodes:[y(y({},c.NodeSerializer.serialize(t._root.documentElement)),{},{childNodes:[c.NodeTree.depthFirst(t._root.head,c.NodeSerializer.serialize)]})]})]}),t.emit("patch",{_t:"forced",modified:[c.NodeTree.depthFirst(t._root,c.NodeSerializer.serialize)]})})),w(b(t),"stop",(function(){E("stopping patch stream for",t._root),t._mutationObserver.disconnect(),t._eventObserver.disconnect(),t._iframeBridge.removeListener("iframe_patched",t._onXDocIframeUpdate),clearInterval(t._canvasUpdateInterval),t._documents&&t._documents.clear(),t._documents=null})),w(b(t),"destroy",(function(){E("destroying patch stream for",t._root),t.stop(),t.removeAllListeners(),c.NodeTree.depthFirst(t._root,t._untrack),t._mutationObserver=null,t._eventObserver=null,t._iframeBridge=null,t._redacted=null,t._root=null})),w(b(t),"_updateCanvasContent",(function(){t._documents.forEach((function(e){(0,i.isxdoc)(e)||e.nodeType!==window.Node.DOCUMENT_FRAGMENT_NODE&&[].slice.call(e.getElementsByTagName("canvas")).forEach((function(e){t.emit("patch",{_t:"canvas",modified:[c.NodeSerializer.serialize(e)]})}))}))})),w(b(t),"_track",(function(e){if(c.NodeUtils.isDOMNode(e)){c.NodeTracker.track(e);var r=t._redacted.has(e),n=a.NodeRedaction.isNodeRedacted(e);r&&!n?t._redacted.delete(e):!r&&n&&t._redacted.add(e),e.nodeType===window.Node.DOCUMENT_NODE&&t._observe(e),e.nodeType===window.Node.DOCUMENT_FRAGMENT_NODE&&"[object Object]"!==e.toString()&&t._observe(e),"IFRAME"===e.tagName&&((0,i.isxdoc)(e)&&t._iframeBridge.sync(e),e.removeEventListener("load",t._onIframeLoad),e.addEventListener("load",t._onIframeLoad))}})),w(b(t),"_untrack",(function(e){c.NodeTracker.forget(e),t._redacted&&t._redacted.delete(e),c.NodeUtils.isDOMNode(e)&&"IFRAME"===e.tagName&&e.removeEventListener("load",t._onIframeLoad)})),w(b(t),"_observe",(function(e){if(e.nodeType!==window.Node.DOCUMENT_NODE&&e.nodeType!==window.Node.DOCUMENT_FRAGMENT_NODE)throw new Error("CobrowseIO: observed a non-document or fragment node (type=".concat(e.nodeType,")"));if(!t._documents.has(e)){E("starting observation of",e),t._documents.add(e),E("doing initial node tracking on observe for",e),c.NodeTree.depthFirst(e,t._track),t._eventObserver.observe(e);try{t._mutationObserver.observe(e,{attributes:!0,childList:!0,subtree:!0,characterData:!0})}catch(t){console.error("CobrowseIO failed to start mutation observer for",e)}}})),w(b(t),"_onXDocIframeUpdate",(function(e){E("xdoc iframe updated",e),a.NodeRedaction.isRedacted(e)||c.NodeTree.isIgnored(e)||t.emit("patch",{_t:"xdociframeupdate",modified:[c.NodeTree.depthFirst(e,c.NodeSerializer.serialize)]})})),w(b(t),"_onIframeLoad",(function(e){var r=e.target;E("iframe loaded",r),a.NodeRedaction.isRedacted(r)||((0,i.isxdoc)(r)?t._iframeBridge.sync(r):t._observe(r.contentWindow.document),c.NodeTree.isIgnored(r)||t.emit("patch",{_t:"iframeupdate",modified:[c.NodeTree.depthFirst(r,c.NodeSerializer.serialize)]}))})),w(b(t),"_onEventMutation",(function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t._onDOMChange(t._mutationObserver.takeRecords()),"TEXTAREA"===e.tagName&&c.NodeTree.depthFirst(e,t._track),c.NodeTracker.get(e)&&!a.NodeRedaction.isRedacted(e)&&!c.NodeTree.isIgnored(e)){var n=r.recursive?c.NodeTree.depthFirst(e,c.NodeSerializer.serialize):c.NodeSerializer.serialize(e);t.emit("patch",{_t:"eventmutation:".concat(r.type),modified:[n]})}})),w(b(t),"_discoverNodes",(function(e,r,n){for(var o=e.addedNodes?[].slice.call(e.addedNodes):[],i=a.NodeRedaction.notifyChanges([e]),u=0,s=[e.target].concat(f(i.modified));u<s.length;u++){var l=s[u];r.has(l)||(n.add(l),t._redacted.has(l)&&!a.NodeRedaction.isNodeRedacted(l)&&o.push(l))}var p,h=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=d(e))){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){c=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw i}}}}(o);try{for(h.s();!(p=h.n()).done;){var y=p.value;c.NodeTree.depthFirst(y,(function(e){n.add(e),r.delete(e)}))}}catch(e){h.e(e)}finally{h.f()}e.removedNodes&&[].slice.call(e.removedNodes).forEach((function(e){c.NodeTree.depthFirst(e,(function(e){n.delete(e),r.add(e)}))}))})),w(b(t),"_getModifications",(function(e){var r=new Set,n=new Set;return e.forEach((function(e){("characterData"===e.type||n.has(e.target)||c.NodeTracker.get(e.target))&&t._discoverNodes(e,r,n)})),r.forEach((function(e){return t._untrack(e)})),n.forEach((function(e){return t._track(e)})),n})),w(b(t),"_onDOMChange",(function(e){var r=t._getModifications(e);E("DOM changed",r);var n=f(r).map((function(e){return c.NodeSerializer.serialize(e)})).filter((function(e){return e}));E("DOM changes serialized",n),t.emit("patch",{_t:"domchange",modified:n})})),t._root=e,t._mutationObserver=new MutationObserver(t._onDOMChange),t._eventObserver=new u.default(t._onEventMutation),t._iframeBridge=s.default,t}return t=l,Object.defineProperty(t,"prototype",{writable:!1}),t}(o.EventEmitter);t.default=_},5493:function(e,t,r){r(4843),Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"PatchCompressor",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"PatchStream",{enumerable:!0,get:function(){return n.default}});var n=i(r(3375)),o=i(r(638));function i(e){return e&&e.__esModule?e:{default:e}}},6604:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(4843);var n=c(r(1381)),o=r(5493),i=r(7743),a=r(5064);function c(e){return e&&e.__esModule?e:{default:e}}function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function s(e,t,r){return t&&u(e.prototype,t),r&&u(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function l(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var f=(0,c(r(9796)).default)("cbio.DOMFrameSource"),d=s((function e(t){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),l(this,"_throttleCompressAndEmitFrame",(0,n.default)((function(){return r._compressAndEmitFrame()}),110)),l(this,"_compressAndEmitFrame",(function(){if(r._compression&&document&&i.NodeTracker.get(document)){var e=r._compression.compress();e.length&&r._onUpdate({document_id:i.NodeTracker.get(document),patch:e})&&r._compression.mark()}})),l(this,"capturingWillStart",(function(){if(f("capturingWillStart for DOMFrameSource in",document),r._sendInterval)throw new Error("DOMFrameSource already running");r._compression||(r._compression=new o.PatchCompressor(i.NodeTracker.track(document))),r._patchStream||(r._patchStream=new o.PatchStream(document)),a.WindowTracking.on("activate",r.reset),r._patchStream.on("patch",(function(e){r._compression.push(e),e.flush?r._compressAndEmitFrame():r._throttleCompressAndEmitFrame()})),r._sendInterval=setInterval((function(){return r._compressAndEmitFrame()}),500),r._patchStream.start()})),l(this,"capturingWillStop",(function(){f("capturingWillStop for DOMFrameSource in",document),a.WindowTracking.removeListener("activate",r.reset),r._sendInterval&&(clearInterval(r._sendInterval),r._sendInterval=null),r._patchStream&&(r._patchStream.destroy(),r._patchStream=null),r._compression&&(r._compression.reset(),r._compression=null)})),l(this,"reset",(function(){f("resetting DOMFrameSource in",document),r._compression.reset(),r._patchStream.forceUpdate()})),l(this,"destroy",(function(){f("destroying DOMFrameSource in",document),r.capturingWillStop(),r._onUpdate=null})),f("DOMFrameSource constructed in",document),this._onUpdate=t}));t.default=d},4773:function(e,t,r){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}var o;function i(){i=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},c=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var i=t&&t.prototype instanceof h?t:h,a=Object.create(i.prototype),c=new k(n||[]);return o(a,"_invoke",{value:O(e,r,c)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=f;var p={};function h(){}function y(){}function v(){}var m={};l(m,c,(function(){return this}));var b=Object.getPrototypeOf,g=b&&b(b(P([])));g&&g!==t&&r.call(g,c)&&(m=g);var w=v.prototype=h.prototype=Object.create(m);function E(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function i(o,a,c,u){var s=d(e[o],e,a);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==n(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){i("next",e,c,u)}),(function(e){i("throw",e,c,u)})):t.resolve(f).then((function(e){l.value=e,c(l)}),(function(e){return i("throw",e,c,u)}))}u(s.arg)}var a;o(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){i(e,r,t,n)}))}return a=a?a.then(n,n):n()}})}function O(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=S(a,r);if(c){if(c===p)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=d(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,S(e,t),"throw"===t.method))return p;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var n=d(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,p;var o=n.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function P(e){if(e){var t=e[c];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:T}}function T(){return{value:void 0,done:!0}}return y.prototype=v,o(w,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,l(e,s,"GeneratorFunction")),e.prototype=Object.create(w),e},e.awrap=function(e){return{__await:e}},E(_.prototype),l(_.prototype,u,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},E(w),l(w,s,"Generator"),l(w,c,(function(){return this})),l(w,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=P,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),x(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:P(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function a(e,t,r,n,o,i,a){try{var c=e[i](a),u=c.value}catch(e){return void r(e)}c.done?t(u):Promise.resolve(u).then(n,o)}function c(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function c(e){a(i,n,o,c,u,"next",e)}function u(e){a(i,n,o,c,u,"throw",e)}c(void 0)}))}}function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function s(e,t,r){return t&&u(e.prototype,t),r&&u(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function l(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r(1e3),r(444),r(1076),r(5547),r(1624),r(2047),r(8534),r(8496),r(4802),r(2112),r(6353),r(3064),r(3275),r(6941),r(4277),r(6257),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(4843);var f=(0,((o=r(9796))&&o.__esModule?o:{default:o}).default)("cbio.FrameLoop"),d=s((function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),l(this,"isRunning",(function(){return t._running})),l(this,"setSource",function(){var e=c(i().mark((function e(r){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r.constructor!==(t.source&&t.source.constructor)){e.next=3;break}return f("frame source type not changed"),e.abrupt("return");case 3:if(!t.isRunning()){e.next=17;break}return t.source&&t.source.capturingWillStop(),t.source=r,e.prev=6,e.next=9,t.source.capturingWillStart();case 9:t.invalidateFrame(),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(6),console.error(e.t0);case 15:e.next=18;break;case 17:t.source=r;case 18:case"end":return e.stop()}}),e,null,[[6,12]])})));return function(t){return e.apply(this,arguments)}}()),l(this,"getSource",(function(){return t.source})),l(this,"start",c(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:f("starting frame loop in",document),t.isRunning()||(t._running=!0,t.source.capturingWillStart());case 2:case"end":return e.stop()}}),e)})))),l(this,"stop",(function(){t.isRunning()&&(t.source.capturingWillStop(),t._running=!1)})),l(this,"invalidateFrame",(function(){if(!t.isRunning())throw new Error("FrameLoop was destroyed");f("invalidate frame in",document),t.source&&t.source.reset()})),l(this,"destroy",(function(){f("destroying frame loop in",document),t.stop(),t.source&&(t.source.destroy(),t.source=null)})),f("FrameLoop constructed in",document),this._running=!1}));t.default=d},5904:function(e,t,r){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}r(4843),r(444),r(1076),r(5547),r(8496),r(4802),r(2112),r(6353),r(3064),r(6941),r(4277),r(6257),r(6486),r(3524),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(1624),r(1e3),r(2827),r(7639),r(6996),r(1366),r(3558),r(8852),r(8630),r(8858),r(6480),r(7219),r(2160),r(4289),r(8165),r(4613),r(3292),r(3748),r(9157),r(5529),r(4882),r(7233),r(1086),r(8786),r(5544),r(1304),r(3275),r(2047),r(1157),r(8534);var o,i=r(1639);function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function c(){c=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var i=t&&t.prototype instanceof h?t:h,a=Object.create(i.prototype),c=new k(n||[]);return o(a,"_invoke",{value:O(e,r,c)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=f;var p={};function h(){}function y(){}function v(){}var m={};l(m,a,(function(){return this}));var b=Object.getPrototypeOf,g=b&&b(b(P([])));g&&g!==t&&r.call(g,a)&&(m=g);var w=v.prototype=h.prototype=Object.create(m);function E(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function i(o,a,c,u){var s=d(e[o],e,a);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==n(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){i("next",e,c,u)}),(function(e){i("throw",e,c,u)})):t.resolve(f).then((function(e){l.value=e,c(l)}),(function(e){return i("throw",e,c,u)}))}u(s.arg)}var a;o(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){i(e,r,t,n)}))}return a=a?a.then(n,n):n()}})}function O(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=S(a,r);if(c){if(c===p)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=d(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,S(e,t),"throw"===t.method))return p;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var n=d(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,p;var o=n.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function P(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:T}}function T(){return{value:void 0,done:!0}}return y.prototype=v,o(w,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,l(e,s,"GeneratorFunction")),e.prototype=Object.create(w),e},e.awrap=function(e){return{__await:e}},E(_.prototype),l(_.prototype,u,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},E(w),l(w,s,"Generator"),l(w,a,(function(){return this})),l(w,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=P,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),x(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:P(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function u(e,t,r,n,o,i,a){try{var c=e[i](a),u=c.value}catch(e){return void r(e)}c.done?t(u):Promise.resolve(u).then(n,o)}function s(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){u(i,n,o,a,c,"next",e)}function c(e){u(i,n,o,a,c,"throw",e)}a(void 0)}))}}function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function f(e,t,r){return t&&l(e.prototype,t),r&&l(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function d(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function p(e,t,r){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,r)}function h(e,t){return function(e,t){return t.get?t.get.call(e):t.value}(e,v(e,t,"get"))}function y(e,t,r){return function(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}(e,v(e,t,"set"),r),r}function v(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}var m=(0,((o=r(9796))&&o.__esModule?o:{default:o}).default)("cbio.MediaStreamFrameSource"),b=new WeakMap,g=new WeakMap,w=new WeakMap,E=new WeakMap,_=new WeakMap,O=new WeakMap,S=new WeakMap,j=new WeakMap,x=new WeakMap,k=new WeakMap,P=f((function e(t){var r,n,o=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),p(this,b,{writable:!0,value:void 0}),p(this,g,{writable:!0,value:void 0}),p(this,w,{writable:!0,value:void 0}),p(this,E,{writable:!0,value:void 0}),p(this,_,{writable:!0,value:void 0}),p(this,O,{writable:!0,value:void 0}),p(this,S,{writable:!0,value:[]}),p(this,j,{writable:!0,value:function(){var e=h(o,E).scale();h(o,w).width=h(o,g).videoWidth*e,h(o,w).height=h(o,g).videoHeight*e,h(o,w).getContext("2d").drawImage(h(o,g),0,0,h(o,w).width,h(o,w).height);var t="image/jpeg";h(o,w).toBlob(function(){var e=s(c().mark((function e(r){var n;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=Uint8Array,e.next=3,new Response(r).arrayBuffer();case 3:e.t1=e.sent,n=new e.t0(e.t1),h(o,E).handleFrame(n,t,1);case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),t,.5)}}),p(this,x,{writable:!0,value:(r=s(c().mark((function e(t){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return h(o,g).srcObject=t,e.next=3,h(o,g).play();case 3:y(o,_,setInterval(h(o,j),100));case 4:case"end":return e.stop()}}),e)}))),function(e){return r.apply(this,arguments)})}),p(this,k,{writable:!0,value:(n=s(c().mark((function e(t){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i.MediaRecorderDemuxer.isSupported("video/webm;codecs=h264")){e.next=3;break}return m("MediaRecorderDemuxer not supported, falling back to canvas"),e.abrupt("return",h(o,x).call(o,t));case 3:if(y(o,O,(0,i.createMediaRecorderDemuxer)(t)),h(o,O)){e.next=7;break}return m("failed to create MediaRecorderDemuxer, falling back to canvas"),e.abrupt("return",h(o,x).call(o,t));case 7:return m("using MediaRecorderDemuxer"),h(o,O).on("media-packet",(function(e){var t,r=e.data;null!==h(o,O)&&(0===r[0]&&0===r[1]&&0===r[2]&&1===r[3]?t=r[4]:0===r[0]&&0===r[1]&&1===r[2]&&(t=r[3]),7==(31&t)&&y(o,S,[]),h(o,S).push(r),h(o,E).handleFrame(r,"video/avc",1/0))})),e.abrupt("return",h(o,O).start());case 10:case"end":return e.stop()}}),e)}))),function(e){return n.apply(this,arguments)})}),d(this,"capturingWillStart",s(c().mark((function e(){var t,r,n;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(m("capturingWillStart for MediaStreamFrameSource"),!h(o,_)){e.next=3;break}throw new Error("already running");case 3:return e.next=5,h(o,E).requestPermission();case 5:if(e.sent){e.next=7;break}return e.abrupt("return");case 7:return e.prev=7,e.next=10,navigator.mediaDevices.getDisplayMedia({video:{cursor:"always",width:{ideal:1400},height:{ideal:1e3},frameRate:{max:10}},audio:!1});case 10:if(t=e.sent,r=t.getVideoTracks(),s=1,n=function(e){if(Array.isArray(e))return e}(u=r)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i=[],a=!0,c=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){c=!0,o=e}finally{try{a||null==r.return||r.return()}finally{if(c)throw o}}return i}}(u,s)||function(e,t){if(e){if("string"==typeof e)return a(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(e,t):void 0}}(u,s)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),(i=o,c=b,function(e,t){if(t.set)return"__destrObj"in t||(t.__destrObj={set value(r){t.set.call(e,r)}}),t.__destrObj;if(!t.writable)throw new TypeError("attempted to set read only private field");return t}(i,v(i,c,"set"))).value=n[0],h(o,b)){e.next=16;break}throw new Error("failed to get display media track");case 16:h(o,b).onended=function(){m("track ended"),y(o,b,null),h(o,E).captureEnded(),o.destroy()},h(o,k).call(o,t),h(o,E).captureStarted(),e.next=24;break;case 21:e.prev=21,e.t0=e.catch(7),h(o,E).captureEnded(e.t0);case 24:case"end":return e.stop()}var i,c,u,s}),e,null,[[7,21]])})))),d(this,"capturingWillStop",(function(){m("capturingWillStop for MediaStreamFrameSource"),h(o,O)&&(h(o,O).stop(),y(o,O,null)),h(o,b)&&(h(o,b).stop(),y(o,b,null),h(o,E).captureEnded()),h(o,_)&&(clearInterval(h(o,_)),y(o,_,null))})),d(this,"reset",(function(){m("resetting MediaStreamFrameSource"),h(o,S).forEach((function(e){h(o,E).handleFrame(e,"video/avc",1/0)}))})),d(this,"destroy",(function(){m("destroying MediaStreamFrameSource"),o.capturingWillStop(),y(o,E,null),y(o,g,null),y(o,w,null)})),m("MediaStreamFrameSource constructed"),y(this,E,t),y(this,g,document.createElement("video")),y(this,w,document.createElement("canvas"))}));t.default=P},7297:function(e,t,r){r(4843),Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"DOMFrameSource",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"FrameLoop",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"MediaStreamFrameSource",{enumerable:!0,get:function(){return i.default}});var n=a(r(4773)),o=a(r(6604)),i=a(r(5904));function a(e){return e&&e.__esModule?e:{default:e}}},2833:function(e,t,r){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}r(4843),r(4277),r(3064),r(9616),r(444),r(1076),r(5547),r(6486),r(6941),r(3524),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(6706),r(1e3),r(6257),r(3275),r(1624),r(2047),r(1157),r(8534);var o,i=r(1239);function a(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function u(e,t){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},u(e,t)}function s(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return l(e)}function l(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}function d(e,t,r){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,r)}function p(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function h(e,t){return function(e,t){return t.get?t.get.call(e):t.value}(e,y(e,t,"get"))}function y(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}var v=(0,((o=r(9796))&&o.__esModule?o:{default:o}).default)("cbio.IFrameBridge"),m=new WeakMap,b=new WeakMap,g=new WeakMap,w=new WeakMap,E=new WeakMap,_=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&u(e,t)}(i,e);var t,r,n,o=(r=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=f(r);if(n){var o=f(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return s(this,e)});function i(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),p(l(e=o.call(this)),"trustedOrigins",[]),d(l(e),m,{writable:!0,value:void 0}),d(l(e),b,{writable:!0,value:function(e){if(!e.data)return!1;var t=e.data,r=t.cobrowseio,n=t.event;return!!r&&!!n}}),d(l(e),g,{writable:!0,value:function(t){var r=t.origin;return!!a(e.trustedOrigins).find((function(e){return e===r}))}}),d(l(e),w,{writable:!0,value:function(e){return[].slice.call(document.getElementsByTagName("iframe")).find((function(t){return t.contentWindow===e.source}))}}),d(l(e),E,{writable:!0,value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"*";e.postMessage({cobrowseio:!0,event:t,data:r},n)}}),p(l(e),"sendToParent",(function(t,r){return h(l(e),m)?a(e.trustedOrigins).find((function(t){return t===h(l(e),m)}))?void h(l(e),E).call(l(e),window.parent,t,r,h(l(e),m)):v("not sending as parent origin is not trusted",h(l(e),m),e.trustedOrigins):v("not sending as parent origin is unknown")})),p(l(e),"broadcastToChildren",(function(t,r){[].slice.call(document.getElementsByTagName("iframe")).forEach((function(n){h(l(e),E).call(l(e),n.contentWindow,t,r)}))})),p(l(e),"sync",(function(t){v("iframe available",t,"issuing sync"),h(l(e),E).call(l(e),t.contentWindow,"sync")})),v("iframe bridge constructed in",document),window.addEventListener("message",(function(t){if(!h(l(e),b).call(l(e),t))return v("ignoring message, not a cobrowse message",t.data);var r,n,o,i=h(l(e),g).call(l(e),t),a=t.data,c=a.event,u=a.data;i&&t.source===window.parent&&(r=l(e),n=m,o=t.origin,function(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}(r,y(r,n,"set"),o),e.broadcastToChildren(c,u)),e.emit(c,u,{trusted:i,iframe:h(l(e),w).call(l(e),t)})})),e}return t=i,Object.defineProperty(t,"prototype",{writable:!1}),t}(i.EventEmitter);t.default=_},9356:function(e,t,r){r(444),r(1076),r(1e3),r(5547),r(1624),r(2047),r(8534),r(6486),r(6257),r(6941),r(3524),r(4843),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(1514),o=u(r(2833)),i=r(5064),a=r(7297),c=r(1362);function u(e){return e&&e.__esModule?e:{default:e}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var l=(0,u(r(9796)).default)("cbio.iframes"),f=new o.default,d=null;f.on("patch",(function(e,t){var r=t.iframe;if(l("Received patch event in",document),r){var o=e.document_id,i=r.__vdom;i&&i.document.id!==e.document_id&&(i=null),i||(i=new n.VirtualDOM(o)),i.applyPatch(e.patch),r.__vdom=i,f.emit("iframe_patched",r)}})),f.on("mouse",(function(e,t){var r=t.iframe;l("Received mouse event in",document),r&&(i.MouseTracking.setPosition(e.x,e.y,r),i.MouseTracking.setDown(e.down))})),f.on("control",(function(e,t){var r,n=t.trusted;if(l("Received control event in",document),!n)return l("Ignoring untrusted control event");c.ControlEvents.applyEvent.apply(c.ControlEvents,function(e){if(Array.isArray(e))return s(e)}(r=e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||function(e,t){if(e){if("string"==typeof e)return s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())})),f.on("sync",(function(e,t){var r=t.trusted;if(l("Received sync event in",document),!r)return l("Ignoring untrusted sync event");d||(l("Creating new frame loop in",document),(d=new a.FrameLoop).setSource(new a.DOMFrameSource((function(e){return f.sendToParent("patch",e),!0}))),d.start()),l("Invalidating frame in",document),d.invalidateFrame(),i.MouseTracking.onChange=function(e){return f.sendToParent("mouse",e)},i.MouseTracking.track(window)}));var p=f;t.default=p},2175:function(e,t,r){r(6257),r(1e3),r(6941),r(6486),r(2047),r(3524),r(444),r(1076),r(5547),r(1624),r(8534),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(4843);var n=i(r(4496)),o=i(r(2191));function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function c(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var u={en:n.default,fr:o.default},s=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.language=t}var t,r,n;return t=e,n=[{key:"getLocale",value:function(){var t,r=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return a(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,c=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return c=e.done,e},e:function(e){u=!0,i=e},f:function(){try{c||null==r.return||r.return()}finally{if(u)throw i}}}}(navigator.languages);try{for(r.s();!(t=r.n()).done;){var n=t.value;if(u[n])return new e(n)}}catch(e){r.e(e)}finally{r.f()}return new e("en")}},{key:"tr",value:function(e){return this.getLocale().translate(e)}}],(r=[{key:"translate",value:function(e){return u[this.language][e]||u.en[e]||e}}])&&c(t.prototype,r),n&&c(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.default=s},4496:function(e,t,r){r(4843),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default={DENY:"Deny",ALLOW:"Allow",END_SESSION:"End Cobrowse Session",REMOTE_CONTROL_REQUEST_TITLE:"Remote Control Request",REMOTE_CONTROL_REQUEST_DESCRIPTION:"A support agent would like to control this page. Do you want to allow this?",FULL_DEVICE_REQUEST_TITLE:"Screen Capture Request",FULL_DEVICE_REQUEST_DESCRIPTION:"A support agent would like to view your entire screen. Do you want to allow this?",SESSION_REQUEST_TITLE:"Support Request",SESSION_REQUEST_DESCRIPTION:"A support agent would like to temporarily use this web page with you. Do you want to allow this?"}},2191:function(e,t,r){r(4843),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default={DENY:"Refuser",ALLOW:"Autoriser",END_SESSION:"Terminer la session de Cobrowse",REMOTE_CONTROL_REQUEST_TITLE:"Demande de commande à distance",REMOTE_CONTROL_REQUEST_DESCRIPTION:"Un agent du soutien souhaiterait avoir le contrôle de cette page. Donnez-vous votre autorisation ?",FULL_DEVICE_REQUEST_TITLE:"Demande de capture d'écran",FULL_DEVICE_REQUEST_DESCRIPTION:"Un agent de soutien souhaiterait voir l'intégralité de votre écran. Donnez-vous votre autorisation ?",SESSION_REQUEST_TITLE:"Demande de soutien",SESSION_REQUEST_DESCRIPTION:"Un agent de soutien souhaiterait temporairement utiliser cette page Web avec vous. Donnez-vous votre autorisation ?"}},1930:function(e,t,r){r(444),r(1076),r(5547),r(1624),r(8534),r(6941),r(5128),r(4011),r(5226),r(9270),r(6507),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(3524),r(1e3),r(3275),r(6486),r(2047),r(5562),r(3600),r(6257),r(3114),r(6706),r(3133),r(4843);var n=r(1514),o=r(8541),i=s(r(9770)),a=s(r(5667)),c=s(r(3677)),u=s(r(6683));function s(e){return e&&e.__esModule?e:{default:e}}function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function f(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l(Object(r),!0).forEach((function(t){v(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function d(e){return function(e){if(Array.isArray(e))return p(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return p(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?p(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function h(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function y(e,t,r){return t&&h(e.prototype,t),r&&h(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function v(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var m=y((function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),v(this,"isLocalResource",(function(e){return!!(/^https?:\/\/localhost/.test(e)||/^https?:\/\/127.0.0.1/.test(e)||/^file:\/\//.test(e)||/^blob:/.test(e)||/^ionic:/.test(e))})),v(this,"_serializeAttributes",(function(e,t){if(e.nodeType===window.Node.ELEMENT_NODE&&e.attributes){var r={};Array.from(e.attributes||[]).forEach((function(t){"href"===t.nodeName||"src"===t.nodeName?r[t.nodeName]="string"==typeof e[t.nodeName]?e[t.nodeName]:t.nodeValue:r[t.nodeName]=t.nodeValue})),t.attributes=r}})),v(this,"_serializeSelection",(function(e,t){var r,n=null,a=e.getSelection();if(a&&"Range"===a.type&&!a.isCollapsed&&a.rangeCount>0)try{n=d(Array(a.rangeCount)).reduce((function(e,t,r){var n=a.getRangeAt(r),c=n.startOffset,u=n.endOffset,s=o.NodeRedaction.getRedactedBy(n.startContainer),l=o.NodeRedaction.getRedactedBy(n.endContainer),f=i.default.get(null!=s?s:n.startContainer),d=i.default.get(null!=l?l:n.endContainer);return e.push({start:f,end:d,startOffset:s?0:c,endOffset:l?0:u}),e}),[])}catch(e){console.warn("CobrowseIO: Could not serialize text selection",e)}else["INPUT","TEXTAREA"].includes(null===(r=e.activeElement)||void 0===r?void 0:r.tagName)&&e.activeElement.selectionStart!==e.activeElement.selectionEnd&&(n=!1);t.selection=n})),v(this,"_serializeDocument",(function(e,r){var n,o;e.nodeType===window.Node.DOCUMENT_NODE&&(r.url=e.location&&e.location.href,r.size={width:null===(n=e.documentElement)||void 0===n?void 0:n.clientWidth,height:null===(o=e.documentElement)||void 0===o?void 0:o.clientHeight},r.focus=i.default.get(e.activeElement),t._serializeSelection(e,r))})),v(this,"_serializeInput",(function(e,t){if("INPUT"===e.tagName||"TEXTAREA"===e.tagName||"OPTION"===e.tagName){t.value=e.value,"radio"!==e.type&&"checkbox"!==e.type||void 0===e.checked||(t.checked=e.checked),t.selection=null;try{var r=e.selectionStart,n=e.selectionEnd,o=e.selectionDirection;r!==n&&e===e.ownerDocument.activeElement&&(t.selection={start:r,end:n,direction:o})}catch(t){console.warn("Failed to serialise text selection for the input",e)}}})),v(this,"_serializeOption",(function(e,t){"OPTION"===e.tagName&&(t.selected=e.selected)})),v(this,"_serializeCSSSheet",(function(e){try{if(e.media&&e.media.length&&!window.matchMedia(e.media).matches)return""}catch(t){console.warn("CobrowseIO: Media detection for sheet failed:",t,"sheet",e)}return[].slice.call(e.cssRules).reduce((function(e,t){try{return e+t.cssText}catch(t){return e}}),"")})),v(this,"_serializeShadowRoot",(function(e,r){try{if(e.nodeType===window.Node.DOCUMENT_FRAGMENT_NODE){var n=[];d(e.adoptedStyleSheets||[]).forEach((function(e){n=n.concat([].slice.call(e.cssRules))})),r.css=t._serializeCSSSheet({cssRules:n})}}catch(t){console.warn("CobrowseIO: ShadowRoot serialize failed:",t.message,"for",e)}})),v(this,"_serializeCSS",(function(e,r){try{var n;("STYLE"===(null===(n=e.tagName)||void 0===n?void 0:n.toUpperCase())||"LINK"===e.tagName&&"stylesheet"===e.rel&&t.isLocalResource(e.href))&&e.sheet&&(r.css=t._serializeCSSSheet(e.sheet))}catch(t){console.warn("CobrowseIO: CSS serialize failed:",t.message,"for",e)}})),v(this,"_serializeCanvas",(function(e,t){if("CANVAS"===e.tagName&&!o.NodeRedaction.isRedacted(e))try{t.data=u.default.fromCanvas(e)}catch(t){e._cb_serialize_warned||(console.warn("Cobrowse failed to serialize canvas",e,"due to error",t),e._cb_serialize_warned=!0)}})),v(this,"_serializeImage",(function(e,r){if("IMG"===e.tagName&&!o.NodeRedaction.isRedacted(e)&&t.isLocalResource(e.src))try{r.attributes.src=u.default.fromImage(e)}catch(t){console.warn("CobrowseIO: Failed to serialize image",e)}})),v(this,"_serializeScroll",(function(e,t){var r,o;(0,n.isxdoc)(e)||(e.nodeType===window.Node.DOCUMENT_NODE?t.scroll={x:(null===(r=e.defaultView)||void 0===r?void 0:r.pageXOffset)||0,y:(null===(o=e.defaultView)||void 0===o?void 0:o.pageYOffset)||0}:(e.scrollWidth>e.clientWidth||e.scrollHeight>e.clientHeight)&&(t.scroll={x:e.scrollLeft||0,y:e.scrollTop||0}))})),v(this,"_serializeRedaction",(function(e,r,n){if(n.redactionState){delete r.value;var o=t._getSize(e);if(e instanceof Element){var i=window.getComputedStyle(e),a="inline"===i.display&&o.height>0?"inline-block":i.display;r.attributes=r.attributes&&{class:r.attributes.class,style:"".concat(r.attributes.style||"","; display: ").concat(a," !important;flex-basis: unset !important;")}}else 3===e.nodeType&&(r.nodeType=1,r.tagName="SPAN",r.attributes={style:o.height>0?"display: inline-block !important":void 0});r.redaction={height:"".concat(o.height,"px"),width:"".concat(o.width,"px")}}else r.redaction=void 0})),v(this,"_getSize",(function(e){if(e instanceof Element)return e.getBoundingClientRect();if(e instanceof Node){var t=document.createRange();return t.selectNodeContents(e),t.getBoundingClientRect()}return{height:0,width:0}})),v(this,"_serialize",(function(e,r){if(!i.default.get(e))throw console.error("node missing id",e,e.parentNode),new Error("node missing id",e);if(!a.default.isDOMNode(e))return e;if(!e.nodeType)throw new Error("node missing type",e);var n={id:i.default.get(e),nodeType:e.nodeType};return t._serializeShadowRoot(e,n),t._serializeAttributes(e,n),t._serializeImage(e,n),t._serializeDocument(e,n),t._serializeScroll(e,n),t._serializeInput(e,n),t._serializeOption(e,n),t._serializeCSS(e,n),t._serializeCanvas(e,n),t._serializeRedaction(e,n,r),e.tagName&&(n.tagName=e.tagName),e.nodeValue&&(n.content=e.nodeValue),n})),v(this,"serialize",(function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},u=o.NodeRedaction.getRedactionState(e);u&&r([]);var s="indirect"===u||[e].concat(d((0,n.parents)(e))).find((function(e){return c.default.isIgnored(e)}));return s?null:f(f({},t._serialize(e,{redactionState:u})),{},{childNodes:"direct"===u?[]:c.default.children(e).map((function(e){return a.default.isDOMNode(e)?{id:i.default.get(e)}:f({},e)}))})}))})),b=new m;t.default=b},9770:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(1624),r(4391),r(1e3),r(2047),r(8534),r(3114),r(4843);var n=i(r(453)),o=i(r(5667));function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function c(e,t,r){return t&&a(e.prototype,t),r&&a(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function u(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var s=new(c((function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),u(this,"_idMap",new Map),u(this,"_nodeMap",new Map),u(this,"_currentId",0),u(this,"_nextId",(function(){return t._currentId+=1,t._currentId})),u(this,"track",(function(e){if(!e)return null;if(!o.default.isDOMNode(e))return e.id;if(!t.get(e)){var r=e.nodeType===window.Node.DOCUMENT_NODE?(0,n.default)(5):"".concat(t.track(document),"-").concat(t._nextId());t._idMap.set(r,e),t._nodeMap.set(e,r)}return t._nodeMap.get(e)})),u(this,"get",(function(e){return e?o.default.isDOMNode(e)?t._nodeMap.get(e)||null:e.id:null})),u(this,"getById",(function(e){return e&&t._idMap.get(e)||null})),u(this,"forget",(function(e){t._idMap.delete(t.get(e)),t._nodeMap.delete(e)}))})));t.default=s},3677:function(e,t,r){r(4843),r(444),r(1076),r(5547),r(6257),r(3524),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(3600),r(6770),r(4011),r(1e3),r(6941),r(6486),r(2047),r(3114),r(1624),r(1157),r(8534);var n=r(1514),o=i(r(5667));function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function c(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function u(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function s(e,t){return function(e,t){return t.get?t.get.call(e):t.value}(e,l(e,t,"get"))}function l(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}var f=(0,i(r(9796)).default)("cbio.NodeTree"),d=new WeakMap,p=new(function(){function e(){var t,r,i,c=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),i={writable:!0,value:".__cbio_ignored"},function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t=this,r=d),r.set(t,i),u(this,"isIgnored",(function(e){var t;if(e&&e.matches&&e.matches(s(c,d)))return f("ignoring",e,"because child of classes"),!0;if([window.Node.COMMENT_NODE,window.Node.CDATA_SECTION_NODE,window.Node.ENTITY_REFERENCE_NODE,window.Node.ENTITY_NODE,window.Node.PROCESSING_INSTRUCTION_NODE,window.Node.NOTATION_NODE,window.Node.DOCUMENT_TYPE_NODE].includes(e.nodeType))return f("ignoring",e,"because of nodeType"),!0;if("SCRIPT"===e.tagName)return f("ignoring",e,"because of SCRIPT"),!0;var r=e.parentNode||e.defaultView&&e.defaultView.frameElement;return!(!r||"STYLE"!==(null===(t=r.tagName)||void 0===t?void 0:t.toUpperCase())||(f("ignoring",e,"because child of STYLE"),0))})),u(this,"children",(function(e){return o.default.isDOMNode(e)?"IFRAME"===e.tagName&&(0,n.isxdoc)(e)?e.__vdom?[e.__vdom.document]:[]:"IFRAME"!==e.tagName||(0,n.isxdoc)(e)?e.shadowRoot?"ShadowRoot"!==e.shadowRoot.constructor.name?Array.from(e.shadowRoot.childNodes).filter((function(e){return!c.isIgnored(e)})):[e.shadowRoot].concat((t=Array.from(e.childNodes),function(e){if(Array.isArray(e))return a(e)}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return a(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())).filter((function(e){return!c.isIgnored(e)})):Array.from(e.childNodes).filter((function(e){return!c.isIgnored(e)})):[e.contentWindow.document].filter((function(e){return!c.isIgnored(e)})):e.childNodes;var t})),u(this,"depthFirst",(function(e,t){return(0,n.depthFirst)(e,(function(e,r){return r(c.children(e)),t(e,r)}))}))}var t,r;return t=e,(r=[{key:"setIgnoredViews",value:function(e){if(Array.isArray(e))return t=this,r=d,n=".__cbio_ignored,".concat(e),function(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}(t,l(t,r,"set"),n),void f("set ignored view selectors",s(this,d));var t,r,n;f("not updating #ignoredViews due to arg to being an array",e)}}])&&c(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}());t.default=p},5667:function(e,t,r){function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function o(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(4843);var i=new(o((function e(){var t,r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),r=function(e){return!!e&&!(!e.childNodes||"function"!=typeof e.appendChild||void 0===e.nodeType)},(t="isDOMNode")in this?Object.defineProperty(this,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):this[t]=r})));t.default=i},7743:function(e,t,r){r(4843),Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"NodeSerializer",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"NodeTracker",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"NodeTree",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"NodeUtils",{enumerable:!0,get:function(){return o.default}});var n=c(r(9770)),o=c(r(5667)),i=c(r(3677)),a=c(r(1930));function c(e){return e&&e.__esModule?e:{default:e}}},2966:function(e,t,r){r(4843),r(6257),r(6941),r(3524),r(444),r(1076),r(5547),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(887),r(1624),r(1e3),r(8719),r(2047),r(8534),r(6486),r(1157),r(9280),r(6706);var n,o=r(1514);function i(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=a(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,c=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return c=e.done,e},e:function(e){u=!0,i=e},f:function(){try{c||null==r.return||r.return()}finally{if(u)throw i}}}}function a(e,t){if(e){if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function s(e,t){d(e,t),t.add(e)}function l(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function f(e,t,r){d(e,t),t.set(e,r)}function d(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function p(e,t){return function(e,t){return t.get?t.get.call(e):t.value}(e,v(e,t,"get"))}function h(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}function y(e,t,r){return function(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}(e,v(e,t,"set"),r),r}function v(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}var m=(0,((n=r(9796))&&n.__esModule?n:{default:n}).default)("cbio.NodeRedaction"),b=new WeakMap,g=new WeakMap,w=new WeakSet,E=new WeakSet,_=new WeakSet,O=new WeakSet;function S(e){return!!e&&("OBJECT"===e.tagName?(m("redacted",e,"because of OBJECT"),!0):"EMBED"===e.tagName?(m("redacted",e,"because of EMBED"),!0):null)}function j(e){var t,r=this;return(t=(0,o.parents)(e),function(e){if(Array.isArray(e))return c(e)}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||a(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).find((function(e){return h(r,O,x).call(r,e)}))}function x(e){return!!(p(this,g)&&e.matches&&e.matches(p(this,g)))&&(m("redacted",e,"because of selectors"),!0)}var k=new(function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),s(this,O),s(this,_),s(this,E),s(this,w),f(this,b,{writable:!0,value:void 0}),f(this,g,{writable:!0,value:void 0}),l(this,"setIndex",(function(e){y(t,b,e)})),l(this,"setSelectors",(function(e){y(t,g,e.join(","))})),l(this,"getRedactionState",(function(e){var r=t.getRedactedBy(e);return!!r&&(r===e?"direct":"indirect")})),l(this,"getRedactedBy",(function(e){var r=h(t,w,S).call(t,e);if(null!==r)return r?e:null;var n=h(t,_,j).call(t,e);return n||(p(t,b)&&p(t,b).getRedactedBy(e)||(h(t,O,x).call(t,e)?e:null))})),l(this,"isNodeRedacted",(function(e){return"direct"===t.getRedactionState(e)})),l(this,"isRedacted",(function(e){var r=h(t,w,S).call(t,e);return null!==r?r:h(t,O,x).call(t,e)||!!t.getRedactionState(e)}))}var t,r;return t=e,(r=[{key:"notifyChanges",value:function(e){var t,r=new Set,n=i(e);try{for(n.s();!(t=n.n()).done;){var o=t.value,a=this.getRedactedBy(o.target);a&&a!==o.target&&r.add(a)}}catch(e){n.e(e)}finally{n.f()}var c,u=i((p(this,b)&&p(this,b).notifyChanges(e)||{modified:[]}).modified);try{for(u.s();!(c=u.n()).done;){var s=c.value;r.add(s)}}catch(e){u.e(e)}finally{u.f()}return{modified:Array.from(r)}}}])&&u(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}());t.default=k},981:function(e,t,r){r(4843),r(444),r(1076),r(5547),r(6486),r(6257),r(6941),r(3524),Object.defineProperty(t,"__esModule",{value:!0}),t.RedactionIndex=void 0,r(1624),r(1e3),r(8719),r(2047),r(8534),r(3114),r(4011),r(5793),r(1861),r(1157),r(9280),r(6706),r(887);var n,o=(n=r(3677))&&n.__esModule?n:{default:n};function i(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=c(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function a(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||c(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){if(e){if("string"==typeof e)return u(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function f(e,t){p(e,t),t.add(e)}function d(e,t,r){p(e,t),t.set(e,r)}function p(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function h(e,t){return function(e,t){return t.get?t.get.call(e):t.value}(e,m(e,t,"get"))}function y(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}function v(e,t,r){return function(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}(e,m(e,t,"set"),r),r}function m(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}var b=new WeakMap,g=new WeakMap,w=new WeakMap,E=new WeakSet,_=new WeakSet,O=new WeakSet,S=new WeakSet,j=new WeakSet,x=new WeakSet,k=new WeakSet,P=new WeakSet,T=new WeakSet,L=new WeakSet,C=new WeakSet,I=new WeakSet,M=function(){function e(){var t,r,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},u=c.document,l=void 0===u?window.document:u;if(s(this,e),f(this,I),f(this,C),f(this,L),f(this,T),f(this,P),f(this,k),f(this,x),f(this,j),f(this,S),f(this,O),f(this,_),f(this,E),d(this,b,{writable:!0,value:void 0}),d(this,g,{writable:!0,value:void 0}),d(this,w,{writable:!0,value:new Set}),n.length>0&&v(this,b,(t=y(this,I,B)).call.apply(t,[this].concat(a(n)))),o.length>0&&v(this,g,(r=y(this,I,B)).call.apply(r,[this].concat(a(o)))),y(this,_,A).call(this)){var p,m=i(y(this,T,G).call(this,l));try{for(m.s();!(p=m.n()).done;){var M=p.value;h(this,w).add(M)}}catch(e){m.e(e)}finally{m.f()}}}var t,r;return t=e,(r=[{key:"getRedactedBy",value:function(e){if(!y(this,_,A).call(this))return null;if(y(this,S,D).call(this,e)||y(this,P,z).call(this,e))return null;var t=y(this,x,F).call(this,e);return t?y(this,P,z).call(this,e.parentNode)?e:t:y(this,O,R).call(this,e)?e:null}},{key:"notifyChanges",value:function(e){var t=this;if(!y(this,_,A).call(this))return{modified:[]};var r,n=new Set,c=i(e);try{for(c.s();!(r=c.n()).done;){var u=r.value;if(!o.default.isIgnored(u.target)){var s=y(this,T,G).call(this,u.target),l=s.length>0;if("attributes"===u.type){var f,d=i(s);try{for(d.s();!(f=d.n()).done;){var p=f.value;n.add(p)}}catch(e){d.e(e)}finally{d.f()}var v=y(this,S,D).call(this,u.target);h(this,w).has(u.target)!==!!v&&(n.add(u.target.parentNode),v?h(this,w).add(u.target):h(this,w).delete(u.target))}else if("childList"===u.type){var m,b=a(u.addedNodes).filter((function(e){return!o.default.isIgnored(e)})),g=a(u.removedNodes).filter((function(e){return!o.default.isIgnored(e)})),O=b.filter((function(e){return y(t,S,D).call(t,e)})).concat(b.flatMap((function(e){return a(y(t,T,G).call(t,e))}))),j=g.filter((function(e){return y(t,S,D).call(t,e)})).concat(g.flatMap((function(e){return a(y(t,T,G).call(t,e))}))),x=i(O);try{for(x.s();!(m=x.n()).done;){var k=m.value;h(this,w).add(k)}}catch(e){x.e(e)}finally{x.f()}var P,L=i(j);try{for(L.s();!(P=L.n()).done;){var C=P.value;h(this,w).delete(C)}}catch(e){L.e(e)}finally{L.f()}if(!n.has(u.target)){var I=l&&O.length>0,M=!l&&j.length>0;(I||M)&&n.add(u.target)}}}}}catch(e){c.e(e)}finally{c.f()}return{modified:y(this,E,N).call(this,n).filter((function(e){return!o.default.isIgnored(e)}))}}}])&&l(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function N(e){var t=this,r=new Set(a(e).flatMap((function(e){return[e].concat(a(y(t,L,U).call(t,e)))})));return a(r).flatMap((function(e){return a(e.childNodes||[])}))}function A(){return!!h(this,b)}function R(e){return h(this,b)&&e.matches&&e.matches(h(this,b))}function D(e){return h(this,g)&&e.matches&&e.matches(h(this,g))}function F(e){var t=this,r=y(this,k,W).call(this,e);return r?y(this,L,U).call(this,e,r).find((function(e){return y(t,P,z).call(t,e.parentNode)}))||r:null}function W(e){var t=e&&e.parentNode&&e.parentNode.closest&&e.parentNode.closest(y(this,I,B).call(this));return t&&y(this,C,Y).call(this,t,h(this,b))?t:null}function z(e){return h(this,g)&&"HTML"!==e.tagName&&e.querySelector&&e.querySelector(h(this,g))}function G(e){return h(this,g)&&e.querySelectorAll?e.querySelectorAll(h(this,g)):[]}function U(e,t){for(var r=[];e.parentNode&&e.parentNode!==t;)r.push(e.parentNode),e=e.parentNode;return r}function Y(e,t){return e&&e.matches&&e.matches(t)}function B(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0===t.length?[h(this,b),h(this,g)]:t).filter((function(e){return e})).join(",")}t.RedactionIndex=M},8541:function(e,t,r){r(4843),Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"NodeRedaction",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"RedactionIndex",{enumerable:!0,get:function(){return i.RedactionIndex}});var n,o=(n=r(2966))&&n.__esModule?n:{default:n},i=r(981)},2585:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(5226),r(3600),r(6770),r(1e3),r(3275),r(1624),r(8719),r(2047),r(8534),r(4843),r(2449);var n=a(r(1320)),o=r(7743),i=r(8541);function a(e){return e&&e.__esModule?e:{default:e}}function c(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function u(e,t,r){return t&&c(e.prototype,t),r&&c(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function s(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var l=(0,a(r(9796)).default)("cbio.ControlEvents"),f=new(u((function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),s(this,"_applyScroll",(function(e,t){var r=e.defaultView||e;r.scrollTo?r.scrollTo(t.x,t.y):(r.scrollTop=t.y,r.scrollLeft=t.x)})),s(this,"_updateCheckbox",(function(e,t){var r=t.checked;if(void 0!==r&&"INPUT"===e.tagName&&void 0!==e.checked){var n=Object.getOwnPropertyDescriptor(e.constructor.prototype,"checked");n&&n.set.call(e,r)}})),s(this,"_updateInnerHTML",(function(e,t){var r=t.innerHTML;void 0!==r&&(e.innerHTML=n.default.sanitize(r))})),s(this,"_updateValue",(function(e,t){var r=t.value;if(void 0!==r){var n=Object.getOwnPropertyDescriptor(e.constructor.prototype,"value");n&&n.set.call(e,r)}"TEXTAREA"===e.tagName&&o.NodeTracker.track(e.childNodes[0])})),s(this,"_updateTarget",(function(e,r){t._updateValue(e,r.target),t._updateCheckbox(e,r.target),t._updateInnerHTML(e,r.target)})),s(this,"_generateMouse",(function(e,t){return new MouseEvent(t.state,{clientX:t.x*window.innerWidth,clientY:t.y*window.innerHeight,bubbles:!0,cancelable:!0,composed:!0,view:e.ownerDocument&&e.ownerDocument.defaultView||window})})),s(this,"_generatePointer",(function(e,t){return new PointerEvent(t.state,{clientX:t.x*window.innerWidth,clientY:t.y*window.innerHeight,pointerId:t.pointerId,width:t.width,height:t.height,pressure:t.pressure,tangentialPressure:t.tangentialPressure,tiltX:t.tiltX,tiltY:t.tiltY,twist:t.twist,pointerType:t.pointerType,isPrimary:t.isPrimary,bubbles:!0,cancelable:!0,composed:!0,view:e.ownerDocument&&e.ownerDocument.defaultView||window})})),s(this,"_generateKeypress",(function(e,t){return new KeyboardEvent(t.state,{key:t.key,code:t.code,ctrlKey:t.ctrlKey,shiftKey:t.shiftKey,altKey:t.altKey,metaKey:t.metaKey,charCode:t.charCode,keyCode:t.keyCode,which:t.which,bubbles:!0,cancelable:!0,composed:!0,view:e.ownerDocument&&e.ownerDocument.defaultView||window})})),s(this,"_generateFocus",(function(e,t){return new FocusEvent(t.state,{bubbles:!1,cancelable:!1,composed:!0,view:e.ownerDocument&&e.ownerDocument.defaultView||window})})),s(this,"_generateChange",(function(e,t){return new CustomEvent(t.state,{bubbles:!0,cancelable:!1,composed:!0,view:e.ownerDocument&&e.ownerDocument.defaultView||window})})),s(this,"_generateInput",(function(e,t){return new CustomEvent(t.state,{bubbles:!0,cancelable:!1,composed:!0,view:e.ownerDocument&&e.ownerDocument.defaultView||window,inputType:t.inputType,data:t.data})})),s(this,"_generateSelection",(function(e,t){return new CustomEvent("selection",{bubbles:!0,cancelable:!1,composed:!0,view:e.ownerDocument&&e.ownerDocument.defaultView||window,selection:t.selection})})),s(this,"_generateEvent",(function(e,r,n){switch(n.state.includes("move")&&l("generate",n,"on",r),e){case"keypress":return t._generateKeypress(r,n);case"mouse":return t._generateMouse(r,n);case"pointer":return t._generatePointer(r,n);case"change":return t._generateChange(r,n);case"input":return t._generateInput(r,n);case"focus":return t._generateFocus(r,n);case"select":return t._generateSelection(r,n);default:return console.warn("CobrowseIO: unknown event type",e,n),null}})),s(this,"_setSelection",(function(e,t){var r=t.selection;if(!(e.__cobrowse_user_selection_timestamp>Date.now()-100)&&e.getSelection())try{r?(e.__last_agent_selection_ts=Date.now(),e.getSelection().removeAllRanges(),r.forEach((function(t){var r=t.start,n=t.startOffset,i=t.end,a=t.endOffset,c=document.createRange(),u=o.NodeTracker.getById(r),s=o.NodeTracker.getById(i);c.setStart(u,n),c.setEnd(s,a),e.getSelection().addRange(c)}))):e.getSelection().removeAllRanges()}catch(e){console.warn("Failed to apply selection",r,e)}})),s(this,"_setInputSelection",(function(e,t){var r=t.selection;if(!(e.ownerDocument.__cobrowse_user_selection_timestamp>Date.now()-100)&&["text","textarea","search","url"].includes(e.type))try{if(e.ownerDocument.__last_agent_selection_ts=Date.now(),r){var n=r.start,o=r.end,i=r.direction;e.focus(),e.setSelectionRange(n,o,i)}else e.getRootNode({composed:!0}).activeElement===e&&e.setSelectionRange(null,null)}catch(e){console.warn("Failed to select text",e)}})),s(this,"applyEvent",(function(e,r){if(!r.target)return null;var n=o.NodeTracker.getById(r.target.id);if(!n)return null;if(i.NodeRedaction.isRedacted(n))return null;try{var a;if("scroll"===e)return t._applyScroll(n,r);if(null!==(a=n._cobrowse_suppress_events)&&void 0!==a&&a.has(r.state))return n._cobrowse_suppress_events.delete(r.state),0===n._cobrowse_suppress_events.size&&delete n._cobrowse_suppress_events.size,null;var c=t._generateEvent(e,n,r);return c&&(n.dispatchEvent(c)?(["keydown","keypress","input"].includes(r.state)&&t._updateTarget(n,r),["selectionchange"].includes(r.state)&&t._setSelection(n,r),["select"].includes(r.state)&&t._setInputSelection(n,r)):"keydown"===r.state?n._cobrowse_suppress_events=new Set(["keypress","input"]):"keypress"===r.state&&(n._cobrowse_suppress_events=new Set(["input"]))),c}catch(t){return console.warn("Error while injecting event",e,t),null}}))})));t.default=f},1362:function(e,t,r){r(4843),Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ControlEvents",{enumerable:!0,get:function(){return o.default}});var n,o=(n=r(2585))&&n.__esModule?n:{default:n}},7454:function(e,t,r){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}var o;function i(e,t){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},i(e,t)}function a(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function c(e){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},c(e)}r(1e3),r(9616),r(4843),r(444),r(1076),r(5547),r(1624),r(2047),r(8534),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(6941),r(4277),r(3064);var u=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&i(e,t)}(u,e);var t,r,n,o=(r=u,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=c(r);if(n){var o=c(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return a(this,e)});function u(e,t,r){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),(n=o.call(this,t,r)).id=e,n.name="APIError",n}return t=u,Object.defineProperty(t,"prototype",{writable:!1}),t}(((o=r(9822))&&o.__esModule?o:{default:o}).default);t.default=u},9822:function(e,t,r){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function i(e){var t="function"==typeof Map?new Map:void 0;return i=function(e){if(null===e||(r=e,-1===Function.toString.call(r).indexOf("[native code]")))return e;var r;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return a(e,arguments,s(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),u(n,e)},i(e)}function a(e,t,r){return a=c()?Reflect.construct.bind():function(e,t,r){var n=[null];n.push.apply(n,t);var o=new(Function.bind.apply(e,n));return r&&u(o,r.prototype),o},a.apply(null,arguments)}function c(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function u(e,t){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},u(e,t)}function s(e){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(e)}r(3257),r(1e3),r(7285),r(9616),r(1624),r(4391),r(2047),r(8534),r(4843),r(444),r(1076),r(5547),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(6941),r(4277),r(3064);var l=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&u(e,t)}(a,e);var t,r,n,i=(t=a,r=c(),function(){var e,n=s(t);if(r){var i=s(this).constructor;e=Reflect.construct(n,arguments,i)}else e=n.apply(this,arguments);return o(this,e)});function a(e,t){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(r=i.call(this,t)).status=e,r.name="HTTPError",r}return n=a,Object.defineProperty(n,"prototype",{writable:!1}),n}(i(Error));t.default=l},5388:function(e,t,r){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}r(4277),r(3064),r(9616),r(4843),r(444),r(4011),r(5226),r(3275),r(9270),r(6507),r(1076),r(5547),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(1e3),r(7285),r(5128),r(1624),r(2047),r(1157),r(8534),r(9280);var o=r(1239),i=c(r(136)),a=c(r(7454));function c(e){return e&&e.__esModule?e:{default:e}}function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u(Object(r),!0).forEach((function(t){l(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function l(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function f(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d(e,t)}function p(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return h(e)}function h(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},y(e)}function v(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function m(e,t){var r=function(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}(e,t);return function(e,t){return t.get?t.get.call(e):t.value}(e,r)}function b(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}var g=new WeakMap,w=new WeakSet,E=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&d(e,t)}(u,e);var t,r,n,o,a,c=(o=u,a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=y(o);if(a){var r=y(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return p(this,e)});function u(){var e,t,r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),v(t=h(e=c.call(this)),r=w),r.add(t),function(e,t,r){v(e,t),t.set(e,{writable:!0,value:{}})}(h(e),g),e._resource={},e}return t=u,r=[{key:"resource",get:function(){return this._resource}},{key:"url",value:function(){throw new Error("url() must be implemented")}},{key:"id",value:function(){return this.field("id")}},{key:"field",value:function(e){return(this._resource||{})[e]}},{key:"cache",value:function(e){this._resource=s(s({},this._resource),e)}},{key:"fetch",value:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(){var e=this;return fetch(this.url(),{headers:this.headers()}).then(b(this,w,_)).then((function(e){return e.json()})).then((function(t){return e.updateResource(t)}))}))},{key:"update",value:function(e){var t=this;return e&&Object.keys(e)&&(0,i.default)(this._resource,e)?this:fetch(this.url(),{method:this.id()?"PUT":"POST",headers:this.headers(),body:JSON.stringify(e)}).then(b(this,w,_)).then((function(e){return e.json()})).then((function(e){return t.updateResource(e)}))}},{key:"destroy",value:function(){var e=this;return fetch(this.url(),{method:"DELETE",headers:this.headers()}).then(b(this,w,_)).then((function(){return e.updateResource({})}))}},{key:"updateResource",value:function(e){return this._resource=e,this.emit("updated",this),this}},{key:"headers",value:function(){return s(s({},u.headers()),m(this,g))}},{key:"setHeader",value:function(e,t){m(this,g)[e]=t}},{key:"getHeader",value:function(e){return this.headers()[e]}}],n=[{key:"headers",value:function(){return this._globalHeaders}},{key:"setHeader",value:function(e,t){this._globalHeaders||(this._globalHeaders={}),this._globalHeaders[e]=t}},{key:"getHeader",value:function(e){return this._globalHeaders&&this._globalHeaders[e]}},{key:"api",get:function(){return this._api},set:function(e){this._api=e}}],r&&f(t.prototype,r),n&&f(t,n),Object.defineProperty(t,"prototype",{writable:!1}),u}(o.EventEmitter);function _(e){return e.status>=400?e.json().then((function(t){throw new a.default(t.id,e.status,t.message)})):e}t.default=E},8302:function(e,t,r){r(4843),Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"RESTResource",{enumerable:!0,get:function(){return o.default}});var n,o=(n=r(5388))&&n.__esModule?n:{default:n}},4914:function(e,t,r){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}r(4843),r(4277),r(3064),r(1112),r(5226),r(9616),r(5128),r(444),r(4011),r(3275),r(9270),r(6507),r(1076),r(5547),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(1e3),r(3114),r(887),r(6257),r(7285),r(1624),r(2047),r(8534),r(6955),r(8927),r(1157);var o,i=r(5828),a=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var r=s(t);if(r&&r.has(e))return r.get(e);var o={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var c=i?Object.getOwnPropertyDescriptor(e,a):null;c&&(c.get||c.set)?Object.defineProperty(o,a,c):o[a]=e[a]}return o.default=e,r&&r.set(e,o),o}(r(7368)),c=r(8302),u=r(5161);function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(s=function(e){return e?r:t})(e)}function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function f(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l(Object(r),!0).forEach((function(t){g(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function d(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function p(e,t){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},p(e,t)}function h(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return y(e)}function y(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v(){return v="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=m(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}},v.apply(this,arguments)}function m(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=b(e)););return e}function b(e){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},b(e)}function g(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function w(e,t,r){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,r)}function E(e,t){return function(e,t){return t.get?t.get.call(e):t.value}(e,O(e,t,"get"))}function _(e,t,r){return function(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}(e,O(e,t,"set"),r),r}function O(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}var S=(0,((o=r(9796))&&o.__esModule?o:{default:o}).default)("cbio.Session"),j=new WeakMap,x=new WeakMap,k=new WeakMap,P=new WeakMap,T=new WeakMap,L=new WeakMap,C=new WeakMap,I=new WeakMap,M=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}(s,e);var t,r,n,o,c=(n=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=b(n);if(o){var r=b(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return h(this,e)});function s(e){var t,r,n;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),w(y(n=c.call(this)),j,{writable:!0,value:void 0}),w(y(n),x,{writable:!0,value:void 0}),w(y(n),k,{writable:!0,value:function(e){n.setHeader("X-CobrowseDeviceToken",e)}}),w(y(n),P,{writable:!0,value:function(){return n.getHeader("X-CobrowseDeviceToken")}}),g(y(n),"activate",(function(){return S("activate session"),n.update({state:"active",device:u.Device.info,custom_data:E(y(n),j).customData})})),g(y(n),"end",(function(){return S("end session"),n.update({state:"ended"})})),g(y(n),"code",(function(){return n.field("code")})),g(y(n),"state",(function(){return n.field("state")})),g(y(n),"isActive",(function(){return"active"===n.state()})),g(y(n),"isAuthorizing",(function(){return"authorizing"===n.state()})),g(y(n),"isPending",(function(){return"pending"===n.state()})),g(y(n),"isEnded",(function(){return"ended"===n.state()})),g(y(n),"selectors",(function(){var e=n.field("redaction_selectors");return Array.isArray(e)?e:[]})),g(y(n),"agent",(function(){return n.field("agent")||!1})),g(y(n),"requireConsent",(function(){return n.field("require_consent")})),g(y(n),"fullDevice",(function(){return!0===n.field("full_device")||"on"===n.field("full_device")||"requested"===n.field("full_device")})),g(y(n),"setFullDevice",(function(e){return E(y(n),x).toggle(["laser","drawing","pointer","scroll","select","keypress","cursor"],"on"!==e),n.update({full_device:e})})),g(y(n),"update",(function(e){return v((t=y(n),b(s.prototype)),"update",t).call(t,f({capabilities:E(y(n),x).toArray()},e))})),g(y(n),"scale",(function(){return n.field("scale")||.5})),g(y(n),"remoteControl",(function(){return n.field("remote_control")||"on"})),g(y(n),"setRemoteControl",(function(e){return n.update({remote_control:e})})),g(y(n),"allowRemoteControl",(function(){return"on"===n.remoteControl()})),g(y(n),"updateResource",(function(e){var t=n.isEnded();return v((r=y(n),b(s.prototype)),"updateResource",r).call(r,e),n.isEnded()&&!t&&(n.emit("ended",y(n)),n.removeAllListeners()),y(n)})),w(y(n),T,{writable:!0,value:(0,a.protect)(y(n),"serialize",(function(){return f(f({},n.resource),{},{_locals:{token:E(y(n),P).call(y(n))}})}))}),w(y(n),L,{writable:!0,value:(0,a.protect)(y(n),"deserialize",(function(e){var t=e._locals||{};return delete e._locals,E(y(n),k).call(y(n),t.token),n.updateResource(e),y(n)}))}),w(y(n),C,{writable:!0,value:(0,a.protect)(y(n),"compress",(function(){return"".concat(n.resource.id,":").concat(E(y(n),P).call(y(n)))}))}),w(y(n),I,{writable:!0,value:(0,a.protect)(y(n),"decompress",(function(e){var t=e.split(":");return E(y(n),L).call(y(n),{_locals:{token:t[t.length-1]},id:t.slice(0,-1).join(":")}),y(n)}))}),!e)throw new Error("Session delegate is required");_(y(n),j,e),_(y(n),x,e[a.default].getCapabilities());var o=Math.ceil(Date.now()/36e5);return E(y(n),k).call(y(n),(0,i.v5)(o+"",u.Device.deviceToken())),n}return t=s,(r=[{key:"capabilities",get:function(){return E(this,x)}},{key:"url",value:function(){var e=this.id()||this.code();return new URL("api/1/sessions".concat(e?"/".concat(e):""),s.api).toString()}}])&&d(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),s}(c.RESTResource);t.default=M},1826:function(e,t,r){r(4843),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(5220),r(1e3),r(3600),r(6770),r(5562),r(4011),r(5128),r(3275),r(1624),r(2047),r(1157),r(8534);var n=r(3403),o=r(5011);function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function c(e,t){return function(e,t){return t.get?t.get.call(e):t.value}(e,u(e,t,"get"))}function u(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}var s=new WeakMap,l=function(){function e(t){var r,n,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),o={writable:!0,value:{}},function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(r=this,n=s),n.set(r,o),this.fill(t)}var t,r;return t=e,(r=[{key:"allowed",value:function(e){return this.toArray().some((function(t){return Array.isArray(e)?e.includes(t):e===t}))}},{key:"forbidden",value:function(e,t){return!this.allowed(e,t)}},{key:"allowsEvent",value:function(e){var t,r=(i(t={},o.SESSION_EVENT_TYPE_MOUSE,n.SESSION_CAPABILITY_TYPE_POINTER),i(t,o.SESSION_EVENT_TYPE_TOUCH,n.SESSION_CAPABILITY_TYPE_POINTER),i(t,o.SESSION_EVENT_TYPE_POINTER,n.SESSION_CAPABILITY_TYPE_POINTER),i(t,o.SESSION_EVENT_TYPE_FOCUS,[n.SESSION_CAPABILITY_TYPE_KEYPRESS,n.SESSION_CAPABILITY_TYPE_POINTER]),i(t,o.SESSION_EVENT_TYPE_KEYPRESS,n.SESSION_CAPABILITY_TYPE_KEYPRESS),i(t,o.SESSION_EVENT_TYPE_SCROLL,n.SESSION_CAPABILITY_TYPE_SCROLL),i(t,o.SESSION_EVENT_TYPE_CHANGE,[n.SESSION_CAPABILITY_TYPE_KEYPRESS,n.SESSION_CAPABILITY_TYPE_POINTER]),i(t,o.SESSION_EVENT_TYPE_INPUT,[n.SESSION_CAPABILITY_TYPE_KEYPRESS,n.SESSION_CAPABILITY_TYPE_POINTER]),i(t,o.SESSION_EVENT_TYPE_LASER,n.SESSION_CAPABILITY_TYPE_LASER),i(t,o.SESSION_EVENT_TYPE_DRAWING,n.SESSION_CAPABILITY_TYPE_DRAWING),i(t,o.SESSION_EVENT_TYPE_SELECT,n.SESSION_CAPABILITY_TYPE_SELECT),t)[e.type];return this.allowed(r)}},{key:"fill",value:function(e){return t=this,r=s,n=e.reduce((function(e,t){return e[t]=!0,e}),{}),function(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}(t,u(t,r,"set"),n),this;var t,r,n}},{key:"all",value:function(){return c(this,s)}},{key:"toArray",value:function(){var e=this;return Object.keys(c(this,s)).filter((function(t){return c(e,s)[t]}))}},{key:"toggle",value:function(e,t){var r=this;return Array.isArray(e)||(e=[e]),e.filter((function(e){return e in c(r,s)})).forEach((function(e){c(r,s)[e]=t})),this}},{key:"allow",value:function(e){return this.toggle(e,!0)}},{key:"forbid",value:function(e){return this.toggle(e,!1)}}])&&a(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.default=l},3403:function(e,t,r){r(4843),Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.SESSION_CAPABILITY_TYPE_SELECT=t.SESSION_CAPABILITY_TYPE_SCROLL=t.SESSION_CAPABILITY_TYPE_POINTER=t.SESSION_CAPABILITY_TYPE_LASER=t.SESSION_CAPABILITY_TYPE_KEYPRESS=t.SESSION_CAPABILITY_TYPE_FULL_DEVICE=t.SESSION_CAPABILITY_TYPE_DRAWING=t.SESSION_CAPABILITY_TYPE_CURSOR=void 0;var n="pointer";t.SESSION_CAPABILITY_TYPE_POINTER=n;var o="scroll";t.SESSION_CAPABILITY_TYPE_SCROLL=o;var i="select";t.SESSION_CAPABILITY_TYPE_SELECT=i;var a="keypress";t.SESSION_CAPABILITY_TYPE_KEYPRESS=a;var c="drawing";t.SESSION_CAPABILITY_TYPE_DRAWING=c;var u="laser";t.SESSION_CAPABILITY_TYPE_LASER=u;var s="full_device";t.SESSION_CAPABILITY_TYPE_FULL_DEVICE=s;var l="cursor";t.SESSION_CAPABILITY_TYPE_CURSOR=l;var f=[n,o,i,a,c,u,s,l];t.default=f},2001:function(e,t,r){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}r(4843),r(444),r(1076),r(5547),r(8496),r(4802),r(2112),r(6353),r(3064),r(3275),r(6941),r(4277),r(6257),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(1624),r(1e3),r(2047),r(1157),r(8534);var o=d(r(1713)),i=r(7297),a=r(5064),c=r(3042),u=r(1362),s=r(8541),l=d(r(9796)),f=r(3403);function d(e){return e&&e.__esModule?e:{default:e}}function p(){p=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var i=t&&t.prototype instanceof h?t:h,a=Object.create(i.prototype),c=new k(n||[]);return o(a,"_invoke",{value:O(e,r,c)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var d={};function h(){}function y(){}function v(){}var m={};s(m,a,(function(){return this}));var b=Object.getPrototypeOf,g=b&&b(b(P([])));g&&g!==t&&r.call(g,a)&&(m=g);var w=v.prototype=h.prototype=Object.create(m);function E(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function i(o,a,c,u){var s=f(e[o],e,a);if("throw"!==s.type){var l=s.arg,d=l.value;return d&&"object"==n(d)&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){i("next",e,c,u)}),(function(e){i("throw",e,c,u)})):t.resolve(d).then((function(e){l.value=e,c(l)}),(function(e){return i("throw",e,c,u)}))}u(s.arg)}var a;o(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){i(e,r,t,n)}))}return a=a?a.then(n,n):n()}})}function O(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=S(a,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=f(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,S(e,t),"throw"===t.method))return d;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var n=f(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,d;var o=n.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function P(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:T}}function T(){return{value:void 0,done:!0}}return y.prototype=v,o(w,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=s(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,u,"GeneratorFunction")),e.prototype=Object.create(w),e},e.awrap=function(e){return{__await:e}},E(_.prototype),s(_.prototype,c,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(l(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},E(w),s(w,u,"Generator"),s(w,a,(function(){return this})),s(w,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=P,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),x(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:P(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}function h(e,t,r,n,o,i,a){try{var c=e[i](a),u=c.value}catch(e){return void r(e)}c.done?t(u):Promise.resolve(u).then(n,o)}function y(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){h(i,n,o,a,c,"next",e)}function c(e){h(i,n,o,a,c,"throw",e)}a(void 0)}))}}function v(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function m(e,t,r){return t&&v(e.prototype,t),r&&v(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function b(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function g(e,t,r){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,r)}function w(e,t){return function(e,t){return t.get?t.get.call(e):t.value}(e,_(e,t,"get"))}function E(e,t,r){return function(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}(e,_(e,t,"set"),r),r}function _(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}var O=(0,l.default)("cbio.SessionContext"),S=new WeakMap,j=new WeakMap,x=new WeakMap,k=new WeakMap,P=new WeakMap,T=new WeakMap,L=new WeakMap,C=new WeakMap,I=new WeakMap,M=new WeakMap,N=new WeakMap,A=new WeakMap,R=new WeakMap,D=new WeakMap,F=new WeakMap,W=new WeakMap,z=new WeakMap,G=new WeakMap,U=new WeakMap,Y=new WeakMap,B=new WeakMap,q=new WeakMap,V=new WeakMap,H=new WeakMap,K=new WeakMap,X=new WeakMap,$=m((function e(t,r,n){var l,d,h,v,m,_=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),g(this,S,{writable:!0,value:void 0}),g(this,j,{writable:!0,value:void 0}),g(this,x,{writable:!0,value:new i.FrameLoop}),g(this,k,{writable:!0,value:void 0}),g(this,P,{writable:!0,value:void 0}),g(this,T,{writable:!0,value:void 0}),b(this,"invalidateFrames",(function(){w(_,x).isRunning()&&w(_,x).invalidateFrame()})),b(this,"destroy",(function(){O("destroy session context"),w(_,G).call(_),w(_,S)&&w(_,S).close(),E(_,S,null),w(_,x)&&w(_,x).destroy(),E(_,x,null),a.WindowTracking.off("activate",w(_,B)),window.removeEventListener("focus",w(_,B),{capture:!0,passive:!0}),window.removeEventListener("hashchange",w(_,q),{capture:!0,passive:!0}),a.MouseTracking.onChange===w(_,K)&&(a.MouseTracking.onChange=null),_.session&&(_.session.removeListener("update",w(_,z)),_.session.removeListener("ended",w(_,G)),_.session.removeListener("sync",w(_,L)),_.session.removeListener("drawing",w(_,I)),_.session.removeListener("laser",w(_,C)),_.session.removeListener("control",w(_,M))),document.removeEventListener("DOMContentLoaded",w(_,N),{once:!0}),w(_,U).call(_,null),_.session=null})),g(this,L,{writable:!0,value:function(e){var t=e.id;t&&w(_,k)===t||(E(_,k,t),w(_,x).invalidateFrame())}}),g(this,C,{writable:!0,value:function(e){_.session.capabilities.allowsEvent(e)&&a.WindowTracking.isActive()&&(_.session.fullDevice()||c.LaserOverlay.update(e))}}),g(this,I,{writable:!0,value:function(e){_.session.capabilities.allowsEvent(e)&&(e.image||c.AnnotationOverlay.hide(),a.WindowTracking.isActive()&&(_.session.fullDevice()||c.AnnotationOverlay.update(e)))}}),g(this,M,{writable:!0,value:function(e,t){"focus"!==e||t.agent||a.WindowTracking.resignActive(),a.WindowTracking.isActive()&&(_.session.fullDevice()||_.session.allowRemoteControl()&&(_.session.capabilities.allowed(f.SESSION_CAPABILITY_TYPE_CURSOR)&&c.RemoteCursor.update(e,t),_.session.capabilities.allowsEvent(t)&&u.ControlEvents.applyEvent(e,t)))}}),g(this,N,{writable:!0,value:function(e){_.session&&(e.isActive()?document.body?_.delegate.showSessionControls(e):document.addEventListener("DOMContentLoaded",w(_,N),{once:!0}):_.delegate.hideSessionControls(e))}}),g(this,A,{writable:!0,value:function(e){s.NodeRedaction.setIndex(new s.RedactionIndex(_.delegate.redactedViews,_.delegate.unredactedViews)),s.NodeRedaction.setSelectors(e.selectors())}}),g(this,R,{writable:!0,value:(l=y(p().mark((function e(t){var r;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.agent()&&!t.isActive()&&!t.isEnded()){e.next=2;break}return e.abrupt("return",null);case 2:if(t.requireConsent()){e.next=4;break}return e.abrupt("return",t.activate());case 4:if(!w(_,P)){e.next=6;break}return e.abrupt("return",null);case 6:return E(_,P,!0),e.prev=7,O("authorizing session"),e.next=11,t.update({state:"authorizing"});case 11:if(_.session){e.next=13;break}return e.abrupt("return",null);case 13:return e.next=15,_.delegate.confirmSession(t);case 15:if(r=e.sent,_.session){e.next=18;break}return e.abrupt("return",null);case 18:if(!1!==r){e.next=23;break}return O("user rejected session request"),e.abrupt("return",t.end());case 23:return O("session accepted"),e.abrupt("return",t.activate());case 25:e.next=33;break;case 27:if(e.prev=27,e.t0=e.catch(7),e.t0&&console.warn("CobrowseIO: error caught during confirmation",e.t0),!_.session){e.next=32;break}return e.abrupt("return",t.end());case 32:return e.abrupt("return",null);case 33:case"end":return e.stop()}}),e,null,[[7,27]])}))),function(e){return l.apply(this,arguments)})}),g(this,D,{writable:!0,value:(d=y(p().mark((function e(t){return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("requested"===t.remoteControl()){e.next=2;break}return e.abrupt("return",null);case 2:return e.prev=2,e.next=5,_.delegate.confirmRemoteControl();case 5:if(e.t0=e.sent,!1!==e.t0){e.next=11;break}return O("user rejeted remote control"),e.abrupt("return",t.update({remote_control:"rejected"}));case 11:return O("user accepted remote control"),e.abrupt("return",t.update({remote_control:"on"}));case 13:e.next=19;break;case 15:return e.prev=15,e.t1=e.catch(2),e.t1&&console.warn("CobrowseIO: error caught during confirmation",e.t1),e.abrupt("return",t.update({remote_control:"rejected"}));case 19:case"end":return e.stop()}}),e,null,[[2,15]])}))),function(e){return d.apply(this,arguments)})}),g(this,F,{writable:!0,value:(h=y(p().mark((function e(){var t;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a.WindowTracking.isActive()){e.next=2;break}return e.abrupt("return",!1);case 2:if(!_.session.capabilities.forbidden(f.SESSION_CAPABILITY_TYPE_FULL_DEVICE)){e.next=4;break}return e.abrupt("return");case 4:return e.prev=4,e.next=7,_.delegate.confirmFullDevice();case 7:if(t=e.sent,O("full device request",t),t){e.next=12;break}return e.next=12,_.session.setFullDevice("rejected");case 12:return e.abrupt("return",t);case 15:return e.prev=15,e.t0=e.catch(4),e.next=19,_.session.setFullDevice("off");case 19:return e.abrupt("return",!1);case 20:case"end":return e.stop()}}),e,null,[[4,15]])}))),function(){return h.apply(this,arguments)})}),g(this,W,{writable:!0,value:(v=y(p().mark((function e(t){var r;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.isEnded()&&w(_,x)){e.next=2;break}return e.abrupt("return",null);case 2:if(r=w(_,x).getSource(),!t.fullDevice()){e.next=10;break}if(!(r instanceof i.MediaStreamFrameSource)){e.next=6;break}return e.abrupt("return",O("already set to MediaStreamFrameSource"));case 6:return e.next=8,w(_,x).setSource(new i.MediaStreamFrameSource({handleFrame:w(_,H),scale:t.scale,captureStarted:function(){return t.setFullDevice("on")},captureEnded:function(e){e&&console.warn("Full device mode failed: ",e),t.setFullDevice(e?"rejected":"off")},requestPermission:w(_,F)}));case 8:e.next=13;break;case 10:if(!(r instanceof i.DOMFrameSource)){e.next=12;break}return e.abrupt("return",O("already set to DOMFrameSource"));case 12:return e.abrupt("return",w(_,x).setSource(new i.DOMFrameSource(w(_,V))));case 13:case"end":return e.stop()}}),e)}))),function(e){return v.apply(this,arguments)})}),g(this,z,{writable:!0,value:function(e){_.session?(w(_,R).call(_,e),w(_,N).call(_,e),w(_,A).call(_,e),w(_,D).call(_,e),w(_,W).call(_,e),w(_,U).call(_,e),e.isActive()&&w(_,X).call(_)):O("onSessionUpdated called after destroy()")}}),g(this,G,{writable:!0,value:function(){c.AnnotationOverlay.hide(),c.RemoteCursor.hide(),c.LaserOverlay.hide(),_.delegate.hideSessionControls(_.session),w(_,U).call(_,null)}}),g(this,U,{writable:!0,value:(m=y(p().mark((function e(t){var r;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,null===(r=w(_,T))||void 0===r?void 0:r.store(t);case 2:case"end":return e.stop()}}),e)}))),function(e){return m.apply(this,arguments)})}),g(this,Y,{writable:!0,value:function(e,t){return!(!_.session||!_.session.isActive()||!_.session.fullDevice()&&!a.WindowTracking.isActive()||!w(_,S)||!w(_,S).stream||!w(_,S).stream.connected||!w(_,S).stream.bufferedAmount>100||(w(_,S).stream.send(e,t),0))}}),g(this,B,{writable:!0,value:function(){return w(_,Y).call(_,"focus",{type:"Focus",timestamp:new Date})}}),g(this,q,{writable:!0,value:function(){return w(_,Y).call(_,"screen",{type:"Screen",timestamp:new Date,url:window.location.href,title:document.title})}}),g(this,V,{writable:!0,value:function(e){return E(_,j,(w(_,j)||0)+1),w(_,Y).call(_,"frame",{type:"Frame",id:w(_,j),data:e,timestamp:new Date,mime_type:"application/x-cbio-vdom-patch"})}}),g(this,H,{writable:!0,value:function(e,t,r){w(_,S).stream.messageLag()>=r?O("dropped frame due to message lag",w(_,S).stream.messageLag()):(E(_,j,(w(_,j)||0)+1),w(_,Y).call(_,"frame",{type:"Frame",id:w(_,j),data:e,timestamp:new Date,mime_type:t}))}}),g(this,K,{writable:!0,value:function(e){var t="mouseout";return e.in&&(t=e.down?"mousedown":"mouseup"),w(_,Y).call(_,"mouse",{type:"Mouse",x:e.x/window.innerWidth,y:e.y/window.innerHeight,state:t,timestamp:new Date})}}),g(this,X,{writable:!0,value:function(){return w(_,x).isRunning()||(O("start frames"),w(_,x).start()),_}}),O("session context constructed"),this.session=t,this.delegate=r,E(this,T,n),E(this,S,new o.default(t)),a.WindowTracking.on("activate",w(this,B)),window.addEventListener("focus",w(this,B),{capture:!0,passive:!0}),window.addEventListener("hashchange",w(this,q),{capture:!0,passive:!0}),a.MouseTracking.onChange=w(this,K),w(this,z).call(this,t),t.on("updated",w(this,z)),t.on("ended",w(this,G)),t.on("sync",w(this,L)),t.on("drawing",w(this,I)),t.on("laser",w(this,C)),t.on("control",w(this,M)),t.once("stream-open",(function(){return w(_,B).call(_)}))}));t.default=$},5011:function(e,t,r){r(4843),Object.defineProperty(t,"__esModule",{value:!0}),t.SESSION_EVENT_TYPE_TOUCH=t.SESSION_EVENT_TYPE_SELECT=t.SESSION_EVENT_TYPE_SCROLL=t.SESSION_EVENT_TYPE_POINTER=t.SESSION_EVENT_TYPE_MOUSE=t.SESSION_EVENT_TYPE_LASER=t.SESSION_EVENT_TYPE_KEYPRESS=t.SESSION_EVENT_TYPE_INPUT=t.SESSION_EVENT_TYPE_FOCUS=t.SESSION_EVENT_TYPE_DRAWING=t.SESSION_EVENT_TYPE_CHANGE=void 0,t.SESSION_EVENT_TYPE_MOUSE="Mouse",t.SESSION_EVENT_TYPE_TOUCH="Touch",t.SESSION_EVENT_TYPE_POINTER="Pointer",t.SESSION_EVENT_TYPE_FOCUS="Focus",t.SESSION_EVENT_TYPE_KEYPRESS="KeyPress",t.SESSION_EVENT_TYPE_SCROLL="Scroll",t.SESSION_EVENT_TYPE_CHANGE="Change",t.SESSION_EVENT_TYPE_INPUT="Input",t.SESSION_EVENT_TYPE_LASER="Laser",t.SESSION_EVENT_TYPE_DRAWING="Drawing",t.SESSION_EVENT_TYPE_SELECT="Select"},1713:function(e,t,r){r(4843),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(3600),r(3114),r(1624),r(1e3),r(2047),r(1157),r(8534);var n=i(r(2260)),o=i(r(3440));function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function c(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function u(e,t,r){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,r)}function s(e,t){return function(e,t){return t.get?t.get.call(e):t.value}(e,f(e,t,"get"))}function l(e,t,r){return function(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}(e,f(e,t,"set"),r),r}function f(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}var d=new WeakMap,p=new WeakMap,h=new WeakMap,y=new WeakMap,v=new WeakMap,m=new WeakMap,b=function(){function e(t){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),u(this,d,{writable:!0,value:void 0}),u(this,p,{writable:!0,value:void 0}),u(this,h,{writable:!0,value:void 0}),c(this,"open",(function(){s(r,d).isEnded()||(s(r,v).call(r),s(r,m).call(r))})),c(this,"close",(function(){window.removeEventListener("visibilitychange",r.onVisibilityChange),s(r,d)&&(s(r,d).removeListener("updated",r.open),l(r,d,null)),s(r,h)&&(s(r,h).close(),l(r,h,null)),s(r,p)&&(s(r,p).close(),l(r,p,null))})),u(this,y,{writable:!0,value:function(e,t){var i=new n.default({getUrl:function(){return(0,o.default)(e,s(r,d).field(t))}});return i.on("error",(function(e){console.warn("CobrowseIO session socket error:",e)})),i}}),u(this,v,{writable:!0,value:function(){var e=s(r,d).field("control_url"),t=s(r,d).field("control_token");e&&t&&!s(r,p)&&(l(r,p,s(r,y).call(r,e,"control_token")),s(r,p).on("open",(function(){s(r,p).send("filter",{events:["session"]}),s(r,d).fetch().catch((function(e){console.warn("CobrowseIO failed fetching session state",e)}))})),s(r,p).on("event",(function(e,t){"session"===e&&s(r,d).updateResource(t)})))}}),u(this,m,{writable:!0,value:function(){var e=s(r,d).field("stream_url"),t=s(r,d).field("stream_token");if(e&&t&&!s(r,h)){l(r,h,s(r,y).call(r,e,"stream_token"));var n=["drawing","laser","url"],o=["touch","mouse","pointer","keypress","scroll","focus","input","change","select"];s(r,h).on("event",(function(e,t){"sync"===e?s(r,d).emit("sync",t):"probe"===e?s(r,h).send("alive",t):n.includes(e)?s(r,d).emit(e,t):o.includes(e)&&s(r,d).emit("control",e,t)})),s(r,h).on("open",(function(){s(r,h).send("filter",{events:[].concat(o,n,["sync","probe"])}),s(r,d).emit("stream-open")}))}}}),l(this,d,t),t.on("updated",this.open),this.open()}var t,r;return t=e,(r=[{key:"stream",get:function(){return s(this,h)}}])&&a(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.default=b},1640:function(e,t,r){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}r(4843),r(6257),r(6486),r(3524),r(444),r(1076),r(5547),r(8496),r(4802),r(2112),r(6353),r(3064),r(3275),r(4277),Object.defineProperty(t,"__esModule",{value:!0}),t.SessionStorage=void 0,r(6941),r(1624),r(1e3),r(8719),r(2047),r(8534),r(4011),r(3114),r(3600),r(6770),r(1157);var o,i=r(7054),a=r(4603);function c(e){return function(e){if(Array.isArray(e))return f(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||l(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(){u=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var i=t&&t.prototype instanceof h?t:h,a=Object.create(i.prototype),c=new k(n||[]);return o(a,"_invoke",{value:O(e,r,c)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=f;var p={};function h(){}function y(){}function v(){}var m={};l(m,a,(function(){return this}));var b=Object.getPrototypeOf,g=b&&b(b(P([])));g&&g!==t&&r.call(g,a)&&(m=g);var w=v.prototype=h.prototype=Object.create(m);function E(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function i(o,a,c,u){var s=d(e[o],e,a);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==n(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){i("next",e,c,u)}),(function(e){i("throw",e,c,u)})):t.resolve(f).then((function(e){l.value=e,c(l)}),(function(e){return i("throw",e,c,u)}))}u(s.arg)}var a;o(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){i(e,r,t,n)}))}return a=a?a.then(n,n):n()}})}function O(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=S(a,r);if(c){if(c===p)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=d(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,S(e,t),"throw"===t.method))return p;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var n=d(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,p;var o=n.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function P(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:T}}function T(){return{value:void 0,done:!0}}return y.prototype=v,o(w,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,l(e,s,"GeneratorFunction")),e.prototype=Object.create(w),e},e.awrap=function(e){return{__await:e}},E(_.prototype),l(_.prototype,c,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},E(w),l(w,s,"Generator"),l(w,a,(function(){return this})),l(w,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=P,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),x(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:P(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function s(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=l(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){c=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw i}}}}function l(e,t){if(e){if("string"==typeof e)return f(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?f(e,t):void 0}}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function d(e,t,r,n,o,i,a){try{var c=e[i](a),u=c.value}catch(e){return void r(e)}c.done?t(u):Promise.resolve(u).then(n,o)}function p(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){d(i,n,o,a,c,"next",e)}function c(e){d(i,n,o,a,c,"throw",e)}a(void 0)}))}}function h(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function y(e,t,r){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,r)}function v(e,t){return function(e,t){return t.get?t.get.call(e):t.value}(e,b(e,t,"get"))}function m(e,t,r){return function(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}(e,b(e,t,"set"),r),r}function b(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}var g=(0,((o=r(9796))&&o.__esModule?o:{default:o}).default)("cbio.sessionStorage"),w=new WeakMap,E=new WeakMap,_=new WeakMap,O=function(){function e(t){var r=t.load,n=void 0===r?[]:r,o=t.store,i=void 0===o?[]:o,a=t.retain,c=void 0===a?[]:a;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),y(this,w,{writable:!0,value:void 0}),y(this,E,{writable:!0,value:void 0}),y(this,_,{writable:!0,value:void 0}),m(this,w,n),m(this,E,i),m(this,_,c)}var t,r,n,o,l;return t=e,r=[{key:"load",value:(l=p(u().mark((function e(t){var r,n,o,i,a;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:g("loading session"),r=s(v(this,w)),e.prev=2,r.s();case 4:if((n=r.n()).done){e.next=21;break}return o=n.value,e.next=8,o.load(t);case 8:return i=e.sent,e.next=11,null==i?void 0:i.fetch();case 11:if(!(a=e.sent)){e.next=19;break}if(!a.isActive()){e.next=17;break}return e.abrupt("return",a);case 17:return e.next=19,o.store(null);case 19:e.next=4;break;case 21:e.next=26;break;case 23:e.prev=23,e.t0=e.catch(2),r.e(e.t0);case 26:return e.prev=26,r.f(),e.finish(26);case 29:return e.abrupt("return",null);case 30:case"end":return e.stop()}}),e,this,[[2,23,26,29]])}))),function(e){return l.apply(this,arguments)})},{key:"store",value:(o=p(u().mark((function e(t){var r,n,o;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:g("storing session"),r=s(v(this,E)),e.prev=2,r.s();case 4:if((n=r.n()).done){e.next=20;break}return o=n.value,e.prev=6,e.next=9,o.store(t);case 9:if(e.t0=e.sent,!0!==e.t0){e.next=13;break}return g("stopping store() chain early due to",o),e.abrupt("break",20);case 13:e.next=18;break;case 15:e.prev=15,e.t1=e.catch(6),console.error("Unexpected error storing session: ".concat(o.constructor.name),e.t1);case 18:e.next=4;break;case 20:e.next=25;break;case 22:e.prev=22,e.t2=e.catch(2),r.e(e.t2);case 25:return e.prev=25,r.f(),e.finish(25);case 28:case"end":return e.stop()}}),e,this,[[2,22,25,28],[6,15]])}))),function(e){return o.apply(this,arguments)})},{key:"destroy",value:function(){var e,t=this,r=s(new Set([].concat(c(v(this,w)),c(v(this,E))).filter((function(e){return!v(t,_).includes(e)}))));try{for(r.s();!(e=r.n()).done;)e.value.destroy()}catch(e){r.e(e)}finally{r.f()}m(this,w,null),m(this,E,null),m(this,_,null)}}],n=[{key:"create",value:function(t,r,n){var o=n.localStorage;if(t.length>1){var c=new i.ForwardingSessionStorage(t),u=new a.IframeSessionStorage(t,r);return new e({load:[c,o,u],store:[o,u,c],retain:[o]})}return new e({load:[o],store:[o],retain:[o]})}}],r&&h(t.prototype,r),n&&h(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.SessionStorage=O},6362:function(e,t,r){r(4843),Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Session",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"SessionCapabilities",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"SessionContext",{enumerable:!0,get:function(){return o.default}});var n=a(r(4914)),o=a(r(2001)),i=a(r(1826));function a(e){return e&&e.__esModule?e:{default:e}}},2767:function(e,t,r){r(4843),Object.defineProperty(t,"__esModule",{value:!0}),t.ActiveSessionPath=void 0,t.ActiveSessionPath="_cobrowse_active_session"},7054:function(e,t,r){r(4843),r(6257),r(6941),r(6486),r(3524),r(444),r(1076),r(5547),Object.defineProperty(t,"__esModule",{value:!0}),t.ForwardingSessionStorage=void 0,t.extractActiveSession=_,r(1624),r(1e3),r(2047),r(8534),r(6955),r(8927),r(1157),r(9280),r(3114),r(7285),r(3257);var n=a(r(7368)),o=a(r(4914)),i=r(2767);function a(e){return e&&e.__esModule?e:{default:e}}function c(e){return function(e){if(Array.isArray(e))return l(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||s(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=s(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){c=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw i}}}}function s(e,t){if(e){if("string"==typeof e)return l(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?l(e,t):void 0}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function p(e,t){y(e,t),t.add(e)}function h(e,t,r){y(e,t),t.set(e,r)}function y(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function v(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}function m(e,t){return function(e,t){return t.get?t.get.call(e):t.value}(e,g(e,t,"get"))}function b(e,t,r){return function(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}(e,g(e,t,"set"),r),r}function g(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}var w=(0,a(r(9796)).default)("cbio.sessionStorage.ForwardingSessionStorage"),E=_();function _(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.window,r=void 0===t?window:t;try{var n=new URL(r.location.href),o=n.searchParams.get(i.ActiveSessionPath);return o?(w("found forwarded session that can be loaded",o),n.searchParams.delete(i.ActiveSessionPath),r.history.replaceState({},"",n)):w("no forwarded session to load",n),o}catch(e){console.warn("Failed to attempt to extract forwarded session",e)}}var O=new WeakMap,S=new WeakMap,j=new WeakMap,x=new WeakMap,k=new WeakMap,P=new WeakMap,T=new WeakMap,L=new WeakMap,C=new WeakSet,I=new WeakSet,M=new WeakSet,N=new WeakSet,A=new WeakSet,R=new WeakSet,D=new WeakSet,F=new WeakSet,W=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.window,o=void 0===n?window:n,i=r.HtmlFormElement,a=void 0===i?HTMLFormElement:i,c=r.activeSessionData,u=void 0===c?E:c;f(this,e),p(this,F),p(this,D),p(this,R),p(this,A),p(this,N),p(this,M),p(this,I),p(this,C),h(this,O,{writable:!0,value:void 0}),h(this,S,{writable:!0,value:void 0}),h(this,j,{writable:!0,value:void 0}),h(this,x,{writable:!0,value:void 0}),h(this,k,{writable:!0,value:void 0}),h(this,P,{writable:!0,value:void 0}),h(this,T,{writable:!0,value:void 0}),h(this,L,{writable:!0,value:void 0}),b(this,O,o),b(this,S,a),b(this,j,t||[]),b(this,x,u)}var t,r;return t=e,(r=[{key:"isSupported",value:function(){return w("isSupported?",!0),!0}},{key:"load",value:function(e){try{if(m(this,x))return w("loading session",m(this,x)),new o.default(e)[n.default].decompress(m(this,x));w("no session to load")}catch(e){w("failed to load forwarded session",e)}return null}},{key:"store",value:function(e){v(this,F,H).call(this,e)?(w("storing active session by binding forwarding hooks"),b(this,k,e),v(this,M,U).call(this)):(w("removing active session by unbinding forwarding hooks"),this.destroy())}},{key:"destroy",value:function(){v(this,N,Y).call(this),b(this,k,void 0)}}])&&d(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function z(){var e=this;m(this,T)||(b(this,T,m(this,O).open),m(this,O).open=function(t){for(var r,n,o=arguments.length,i=new Array(o>1?o-1:0),a=1;a<o;a++)i[a-1]=arguments[a];return(r=m(e,T)).call.apply(r,[m(e,O),null!==(n=v(e,D,V).call(e,t))&&void 0!==n?n:t].concat(i))})}function G(){var e=this;if(!m(this,L)){b(this,L,m(this,S).prototype.submit);var t=function(t){var r,n;t.action=null!==(r=v(e,D,V).call(e,t.action))&&void 0!==r?r:t.action;for(var o=arguments.length,i=new Array(o>1?o-1:0),a=1;a<o;a++)i[a-1]=arguments[a];(n=m(e,L)).call.apply(n,[t].concat(i))};m(this,S).prototype.submit=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];t.apply(void 0,[this].concat(r))}}}function U(){var e=this;if(!m(this,P)){b(this,P,[["click",function(t){return v(e,A,B).call(e,t)}],["submit",function(t){return v(e,R,q).call(e,t)}]]);var t,r=u(m(this,P));try{for(r.s();!(t=r.n()).done;){var n,o=t.value;(n=m(this,O).document).addEventListener.apply(n,c(o))}}catch(e){r.e(e)}finally{r.f()}}v(this,C,z).call(this),v(this,I,G).call(this)}function Y(){if(m(this,P)){var e,t=u(m(this,P));try{for(t.s();!(e=t.n()).done;){var r,n=e.value;(r=m(this,O).document).removeEventListener.apply(r,c(n))}}catch(e){t.e(e)}finally{t.f()}b(this,P,void 0)}m(this,T)&&(m(this,O).open=m(this,T),b(this,T,void 0)),m(this,L)&&(m(this,S).prototype.submit=m(this,L),b(this,L,void 0))}function B(e){var t,r=v(this,D,V).call(this,null==e||null===(t=e.target)||void 0===t?void 0:t.href);r&&(e.target.href=r.toString())}function q(e){var t,r=v(this,D,V).call(this,null==e||null===(t=e.target)||void 0===t?void 0:t.action);r&&(e.target.action=r.toString())}function V(e){if(!e)return w("not rewriting falsey url",e),null;if(!v(this,F,H).call(this))return w("not rewriting url due to non-active session",e),null;try{var t=new URL(e);return t.origin===m(this,O).location.origin?(w("not rewriting url because we are not changing origin",t.toString()),null):-1===m(this,j).indexOf(t.origin)?(w("not rewriting url due to non-trusted origin",t.toString()),null):(t.searchParams.set(i.ActiveSessionPath,m(this,k)[n.default].compress()),w("rewriting trusted url for an active session",{from:e,to:t.toString()}),"string"==typeof e?t.toString():t)}catch(e){return w("failed rewriting url",e),null}}function H(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:m(this,k);return null==e?void 0:e.isActive()}t.ForwardingSessionStorage=W},4603:function(e,t,r){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}r(4843),r(444),r(1076),r(5547),r(8496),r(4802),r(2112),r(6353),r(3064),r(3275),r(6941),r(4277),r(6257),Object.defineProperty(t,"__esModule",{value:!0}),t.IframeSessionStorage=void 0,r(1624),r(1e3),r(2047),r(8534),r(6955),r(8927),r(7285),r(1157);var o=u(r(7368)),i=r(7345),a=u(r(4914)),c=r(2767);function u(e){return e&&e.__esModule?e:{default:e}}function s(){s=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var i=t&&t.prototype instanceof h?t:h,a=Object.create(i.prototype),c=new k(n||[]);return o(a,"_invoke",{value:O(e,r,c)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=f;var p={};function h(){}function y(){}function v(){}var m={};l(m,a,(function(){return this}));var b=Object.getPrototypeOf,g=b&&b(b(P([])));g&&g!==t&&r.call(g,a)&&(m=g);var w=v.prototype=h.prototype=Object.create(m);function E(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function i(o,a,c,u){var s=d(e[o],e,a);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==n(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){i("next",e,c,u)}),(function(e){i("throw",e,c,u)})):t.resolve(f).then((function(e){l.value=e,c(l)}),(function(e){return i("throw",e,c,u)}))}u(s.arg)}var a;o(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){i(e,r,t,n)}))}return a=a?a.then(n,n):n()}})}function O(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=S(a,r);if(c){if(c===p)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=d(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,S(e,t),"throw"===t.method))return p;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var n=d(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,p;var o=n.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function P(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:T}}function T(){return{value:void 0,done:!0}}return y.prototype=v,o(w,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,l(e,u,"GeneratorFunction")),e.prototype=Object.create(w),e},e.awrap=function(e){return{__await:e}},E(_.prototype),l(_.prototype,c,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},E(w),l(w,u,"Generator"),l(w,a,(function(){return this})),l(w,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=P,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),x(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:P(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function l(e,t,r,n,o,i,a){try{var c=e[i](a),u=c.value}catch(e){return void r(e)}c.done?t(u):Promise.resolve(u).then(n,o)}function f(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){l(i,n,o,a,c,"next",e)}function c(e){l(i,n,o,a,c,"throw",e)}a(void 0)}))}}function d(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function p(e,t){return function(e,t){return t.get?t.get.call(e):t.value}(e,y(e,t,"get"))}function h(e,t,r){return function(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}(e,y(e,t,"set"),r),r}function y(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}var v=(0,u(r(9796)).default)("cbio.sessionStorage.IframeSessionStorage"),m=new WeakMap,b=function(){function e(t,r){var n,o,a;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),a={writable:!0,value:void 0},function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(n=this,o=m),o.set(n,a);var c=new URL("apps/iframe_storage/server.html",r);h(this,m,new i.TrustedOriginStorageClient(c.toString(),t))}var t,r,n,u,l;return t=e,r=[{key:"isSupported",value:(l=f(s().mark((function e(){var t;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,p(this,m).ready();case 2:return t=p(this,m)&&p(this,m).isCrossDomainSupported,v("isSupported?",t),e.abrupt("return",t);case 5:case"end":return e.stop()}}),e,this)}))),function(){return l.apply(this,arguments)})},{key:"load",value:(u=f(s().mark((function e(t){var r;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.isSupported();case 2:if(e.sent){e.next=4;break}return e.abrupt("return",null);case 4:return e.next=6,p(this,m).storage.getItem(c.ActiveSessionPath);case 6:if(!(r=e.sent)){e.next=12;break}return v("loading session"),e.abrupt("return",new a.default(t)[o.default].deserialize(JSON.parse(r)));case 12:return v("no session to load"),e.abrupt("return",null);case 14:case"end":return e.stop()}}),e,this)}))),function(e){return u.apply(this,arguments)})},{key:"store",value:(n=f(s().mark((function e(t){var r;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.isSupported();case 2:if(e.sent){e.next=4;break}return e.abrupt("return",null);case 4:if(null==t||!t.isActive()){e.next=12;break}return v("storing active session"),r=JSON.stringify(t[o.default].serialize()),e.next=9,p(this,m).storage.setItem(c.ActiveSessionPath,r);case 9:return e.abrupt("return",!0);case 12:return v("deleting inactive session"),e.next=15,p(this,m).storage.removeItem(c.ActiveSessionPath);case 15:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})},{key:"destroy",value:function(){var e;null===(e=p(this,m))||void 0===e||e.destroy(),h(this,m,void 0)}}],r&&d(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.IframeSessionStorage=b},9426:function(e,t,r){r(4843),Object.defineProperty(t,"__esModule",{value:!0}),t.LocalSessionStorage=void 0,r(1624),r(1e3),r(2047),r(1157),r(8534);var n=c(r(7368)),o=c(r(5901)),i=c(r(4914)),a=r(2767);function c(e){return e&&e.__esModule?e:{default:e}}function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function s(e,t){return function(e,t){return t.get?t.get.call(e):t.value}(e,l(e,t,"get"))}function l(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}var f=(0,c(r(9796)).default)("cbio.sessionStorage.LocalSessionStorage"),d=new WeakMap,p=function(){function e(){var t,r,n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t=this,r=d,n={writable:!0,value:(0,o.default)()},function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,r),r.set(t,n)}var t,r;return t=e,(r=[{key:"isSupported",value:function(){return f("isSupported?",!0),!0}},{key:"load",value:function(e){var t=s(this,d).getItem(a.ActiveSessionPath);return t?(f("loading session"),new i.default(e)[n.default].deserialize(t)):(f("no session to load"),null)}},{key:"store",value:function(e){null!=e&&e.isActive()?(f("storing active session"),s(this,d).setItem(a.ActiveSessionPath,e[n.default].serialize())):(f("removing inactive session"),s(this,d).removeItem(a.ActiveSessionPath))}},{key:"destroy",value:function(){var e,t;t=void 0,function(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}(e=this,l(e,d,"set"),t)}}])&&u(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.LocalSessionStorage=p},5901:function(e,t,r){r(4843),Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o.default}});var n,o=(n=r(59))&&n.__esModule?n:{default:n}},59:function(e,t,r){r(4843),Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return{setItem:function(t,r){c();var n=JSON.stringify({value:r,group:e});a()?window.localStorage.setItem(t,n):o.default.set(t,n),i[t]=n},getItem:function(t){try{var r;(r=a()?window.localStorage&&window.localStorage.getItem(t):o.default.get(t))||(r=i[t]);var n=JSON.parse(r),c=n.value,u=n.group;return e&&e!==u?null:c}catch(e){return null}},removeItem:function(e){a()&&window.localStorage.removeItem(e),o.default.remove(e),i[e]=void 0}}};var n,o=(n=r(6734))&&n.__esModule?n:{default:n},i={};function a(){try{var e="_cobrowse_test_item";return localStorage.setItem(e,e),localStorage.removeItem(e),!0}catch(e){return!1}}function c(){a()||c.done||(c.done=!0,console.warn("Warning: localStorage is not supported. Cobrowse falling back to cookie or in-memory storage and may not function as expected."))}},8487:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(1624),r(1e3),r(2827),r(7639),r(6996),r(1366),r(3558),r(8852),r(8630),r(8858),r(6480),r(7219),r(2160),r(4289),r(8165),r(4613),r(3292),r(3748),r(9157),r(5529),r(4882),r(7233),r(1086),r(8786),r(5544),r(1304),r(3114),r(4843);var n=r(5064);function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function i(e,t,r){return t&&o(e.prototype,t),r&&o(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var c=new(i((function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),a(this,"el",(function(){return t._el||(t._el=document.createElement("img"),t._el.className="cbio_session_overlay",t._el.style.pointerEvents="none",t._el.style.width="10vw",t._el.style.height="100vh",t._el.style.position="fixed",t._el.style.zIndex="2147483647",t._el.style.top="0",t._el.style.left="0"),t._el})),a(this,"_arrayBufferToBase64",(function(e){for(var t="",r=new Uint8Array(e),n=r.byteLength,o=0;o<n;o+=1)t+=String.fromCharCode(r[o]);return window.btoa(t)})),a(this,"update",(function(e){if(n.WindowTracking.isActive())if(e.image){t.el().style.left="".concat(100*e.x,"%"),t.el().style.top="".concat(100*e.y,"%"),t.el().style.height="".concat(100*e.height,"%"),t.el().style.width="".concat(100*e.width,"%");var r="data:".concat(e.mime_type,";base64,").concat(t._arrayBufferToBase64(e.image));t.el().src=r,document.body&&!t.el().parentNode&&document.body.appendChild(t.el())}else t.hide()})),a(this,"hide",(function(){t.el().parentNode&&t.el().parentNode.removeChild(t.el())}))})));t.default=c},881:function(e,t,r){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}r(444),r(1076),r(5547),r(1624),r(2047),r(8534),r(8496),r(4802),r(2112),r(6353),r(3064),r(3275),r(6941),r(4277),r(6257),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(3114),r(1e3),r(4843);var o,i=(o=r(2175))&&o.__esModule?o:{default:o};function a(){a=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var i=t&&t.prototype instanceof h?t:h,a=Object.create(i.prototype),c=new k(n||[]);return o(a,"_invoke",{value:O(e,r,c)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=f;var p={};function h(){}function y(){}function v(){}var m={};l(m,c,(function(){return this}));var b=Object.getPrototypeOf,g=b&&b(b(P([])));g&&g!==t&&r.call(g,c)&&(m=g);var w=v.prototype=h.prototype=Object.create(m);function E(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function i(o,a,c,u){var s=d(e[o],e,a);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==n(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){i("next",e,c,u)}),(function(e){i("throw",e,c,u)})):t.resolve(f).then((function(e){l.value=e,c(l)}),(function(e){return i("throw",e,c,u)}))}u(s.arg)}var a;o(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){i(e,r,t,n)}))}return a=a?a.then(n,n):n()}})}function O(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=S(a,r);if(c){if(c===p)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=d(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,S(e,t),"throw"===t.method))return p;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var n=d(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,p;var o=n.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function P(e){if(e){var t=e[c];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:T}}function T(){return{value:void 0,done:!0}}return y.prototype=v,o(w,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,l(e,s,"GeneratorFunction")),e.prototype=Object.create(w),e},e.awrap=function(e){return{__await:e}},E(_.prototype),l(_.prototype,u,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},E(w),l(w,s,"Generator"),l(w,c,(function(){return this})),l(w,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=P,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),x(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:P(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function c(e,t,r,n,o,i,a){try{var c=e[i](a),u=c.value}catch(e){return void r(e)}c.done?t(u):Promise.resolve(u).then(n,o)}function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function s(e,t,r){return t&&u(e.prototype,t),r&&u(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function l(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var f=s((function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),l(this,"content",(function(e,t){return'\n <div class="cobrowse-dialog" style="color: #333; font-family:sans-serif; line-height:140%; position:fixed; padding:25px; background:white; border-radius:15px; z-index:2147483647; top:50px; left:50%; width:75%; max-width:350px; transform:translateX(-50%); box-shadow:0px 0px 15px #33333322; user-select: none;">\n <div style="text-align:center; margin-top:10px; margin-bottom:20px"><b>'.concat(e,"</b></div>\n <div>").concat(t,'</div>\n <div style=\'float:right; margin-top:40px; color:rgb(0, 122, 255);\'>\n <a class="cobrowse-button cobrowse-deny" style="cursor:pointer; padding:10px;">').concat(i.default.tr("DENY"),'</a>\n <a class="cobrowse-button cobrowse-allow" style="cursor:pointer; padding:10px; font-weight: bold;">').concat(i.default.tr("ALLOW"),"</a>\n </div>\n </div>\n ")})),l(this,"container",(function(){return t._container||(t._container=document.createElement("div"),t._container.style.background="rgba(50, 50, 50, 0.4)",t._container.style.position="fixed",t._container.style.zIndex="2147483647",t._container.style.bottom="0",t._container.style.top="0",t._container.style.left="0",t._container.style.right="0"),t._container})),l(this,"show",function(){var e,r=(e=a().mark((function e(r,n){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e){var o=t.container();t._container.innerHTML=t.content(r,n),o.querySelector(".cobrowse-allow").addEventListener("click",(function(){e(!0),t.hide()})),o.querySelector(".cobrowse-deny").addEventListener("click",(function(){e(!1),t.hide()})),document.body&&document.body.appendChild(o)})));case 1:case"end":return e.stop()}}),e)})),function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){c(i,n,o,a,u,"next",e)}function u(e){c(i,n,o,a,u,"throw",e)}a(void 0)}))});return function(e,t){return r.apply(this,arguments)}}()),l(this,"hide",(function(){t.container().parentNode&&t.container().parentNode.removeChild(t.container())}))}));t.default=f},9486:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(4843);var n=r(5064);function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function i(e,t,r){return t&&o(e.prototype,t),r&&o(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var c=new(i((function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),a(this,"el",(function(){return t._el||(t._el=document.createElement("div"),t._el.className="cbio_session_overlay",t._el.style.border="border: 1px solid white",t._el.style.borderRadius="15px",t._el.style.background="red",t._el.style.position="fixed",t._el.style.zIndex="2147483647",t._el.style.height="15px",t._el.style.width="15px",t._el.style.marginLeft="-7.5px",t._el.style.marginTop="-7.5px"),t._el})),a(this,"update",(function(e){n.WindowTracking.isActive()&&(document.body&&!t.el().parentNode&&document.body.appendChild(t.el()),"touchend"===e.state?t.hide():(t.el().style.left="".concat(100*e.x,"%"),t.el().style.top="".concat(100*e.y,"%")))})),a(this,"hide",(function(){t.el().parentNode&&t.el().parentNode.removeChild(t.el())}))})));t.default=c},9444:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(4843);var n=r(5064),o=r(7743);function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function a(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function c(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var u=new(a((function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),c(this,"el",(function(){return t._el||(t._el=document.createElementNS("http://www.w3.org/2000/svg","svg"),t._el.setAttribute("class","__cbio_ignored"),t._el.setAttribute("viewBox","0 0 320 512"),t._el.style.position="fixed",t._el.style.zIndex="2147483647",t._el.style.height="25px",t._el.style.width="25px",t._el.style.marginLeft="-7px",t._el.style.marginTop="-1px",t._el.style.opacity=.7,t._path=document.createElementNS("http://www.w3.org/2000/svg","path"),t._path.setAttribute("d","M302.189 329.126H196.105l55.831 135.993c3.889 9.428-.555 19.999-9.444 23.999l-49.165 21.427c-9.165 4-19.443-.571-23.332-9.714l-53.053-129.136-86.664 89.138C18.729 472.71 0 463.554 0 447.977V18.299C0 1.899 19.921-6.096 30.277 5.443l284.412 292.542c11.472 11.179 3.007 31.141-12.5 31.141z"),t._path.setAttribute("stroke","white"),t._path.setAttribute("stroke-width","40"),t._path.setAttribute("opacity",1),t._path.setAttribute("fill","blue"),t._el.appendChild(t._path)),t._el})),c(this,"_updatePosition",(function(e){var r,n,i,a,c=e.x,u=e.y;c*=null===(r=window.document)||void 0===r||null===(n=r.documentElement)||void 0===n?void 0:n.clientWidth,u*=null===(i=window.document)||void 0===i||null===(a=i.documentElement)||void 0===a?void 0:a.clientHeight;var s=o.NodeTracker.getById(e.target.id);if(s){var l=s.ownerDocument,f=l&&l.defaultView&&l.defaultView.frameElement;if(f){var d=f.getBoundingClientRect();c+=Math.round(d.left),u+=Math.round(d.top)}t.el().style.top="".concat(u,"px"),t.el().style.left="".concat(c,"px")}})),c(this,"update",(function(e,r){if("mouse"===e&&n.WindowTracking.isActive())switch(document.body&&!t.el().parentNode&&document.body.appendChild(t.el()),r.state){case"mousedown":t.el().style.opacity=1;break;case"mouseup":t.el().style.opacity=.7;break;case"mousemove":t._updatePosition(r)}})),c(this,"hide",(function(){t.el().parentNode&&t.el().parentNode.removeChild(t.el())}))})));t.default=u},1457:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(4843);var n=i(r(1178)),o=i(r(2175));function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function c(e,t,r){return t&&a(e.prototype,t),r&&a(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function u(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var s=new(c((function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),u(this,"el",(function(){return t._el||(t._el=document.createElement("div"),t._el.className="__cbio_ignored cbio_session_controls",t._el.textContent=o.default.tr("END_SESSION"),t._el.style.fontFamily="sans-serif",t._el.style.padding="10px 13px",t._el.style.fontSize="13px",t._el.style.whiteSpace="nowrap",t._el.style.color="white",t._el.style.boxShadow="0px 2px 5px #33333344",t._el.style.cursor="pointer",t._el.style.borderRadius="30px",t._el.style.background="rgb(234, 91, 80)",t._el.style.position="fixed",t._el.style.zIndex="2147483647",t._el.style.bottom="20px",t._el.style.left="50%",t._el.style.transform="translateX(-50%)",t._el.style.userSelect="none",t._el.addEventListener("click",t._onEnd)),t._el})),u(this,"_onEnd",(function(){var e=n.default.currentSession;e&&e.isActive()&&e.end()})),u(this,"show",(function(){document.body&&!t.el().parentNode&&document.body.appendChild(t.el())})),u(this,"hide",(function(){t.el().parentNode&&t.el().parentNode.removeChild(t.el())}))})));t.default=s},3172:function(e,t,r){function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function o(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(4843);var a=new(o((function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),i(this,"content",(function(e){return'\n <div style="color: white; font-family:sans-serif; margin-bottom: 10px; line-height:140%; padding:10px; font-size: 12px; font-weight: bold; background:#292d33; border-radius:5px; width:250px; box-shadow:0px 0px 15px #33333322;">\n '.concat(e,"\n </div>\n ")})),i(this,"container",(function(){var e=document.createElement("div");return e.style.position="fixed",e.style.zIndex="2147483647",e.style.color="#fff",e.style.top="20px",e.style.right="20px",e.style.transition="all 0.3s linear",e.style.opacity=0,e.style.pointerEvents="none",e})),i(this,"show",(function(e){var r=t.container();r.innerHTML=t.content(e),document.body&&document.body.appendChild(r),setTimeout((function(){r.style.opacity=1}),0),setTimeout((function(){r.style.opacity=0,setTimeout((function(){r.parentNode&&r.parentNode.removeChild(r)}),500)}),8e3)})),i(this,"hide",(function(){t.container().parentNode&&t.container().parentNode.removeChild(t.container())}))})));t.default=a},3042:function(e,t,r){r(4843),Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"AnnotationOverlay",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"ConsentDialog",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(t,"LaserOverlay",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"RemoteCursor",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"SessionStateOverlay",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"Toast",{enumerable:!0,get:function(){return u.default}});var n=s(r(8487)),o=s(r(9486)),i=s(r(9444)),a=s(r(1457)),c=s(r(881)),u=s(r(3172));function s(e){return e&&e.__esModule?e:{default:e}}},2260:function(e,t,r){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}r(4843),r(4277),r(3064),r(9616),r(444),r(1076),r(5547),r(8496),r(4802),r(2112),r(6353),r(3275),r(6941),r(6257),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(1624),r(1e3),r(2827),r(7639),r(6996),r(1366),r(3558),r(8852),r(8630),r(8858),r(6480),r(7219),r(2160),r(4289),r(8165),r(4613),r(3292),r(3748),r(9157),r(5529),r(4882),r(7233),r(1086),r(8786),r(5544),r(1304),r(2047),r(1157),r(8534);var o,i=r(3936),a=(o=r(9796))&&o.__esModule?o:{default:o},c=r(1239);function u(){u=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var i=t&&t.prototype instanceof h?t:h,a=Object.create(i.prototype),c=new k(n||[]);return o(a,"_invoke",{value:O(e,r,c)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=f;var p={};function h(){}function y(){}function v(){}var m={};l(m,a,(function(){return this}));var b=Object.getPrototypeOf,g=b&&b(b(P([])));g&&g!==t&&r.call(g,a)&&(m=g);var w=v.prototype=h.prototype=Object.create(m);function E(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function i(o,a,c,u){var s=d(e[o],e,a);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==n(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){i("next",e,c,u)}),(function(e){i("throw",e,c,u)})):t.resolve(f).then((function(e){l.value=e,c(l)}),(function(e){return i("throw",e,c,u)}))}u(s.arg)}var a;o(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){i(e,r,t,n)}))}return a=a?a.then(n,n):n()}})}function O(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=S(a,r);if(c){if(c===p)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=d(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,S(e,t),"throw"===t.method))return p;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var n=d(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,p;var o=n.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function P(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:T}}function T(){return{value:void 0,done:!0}}return y.prototype=v,o(w,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,l(e,s,"GeneratorFunction")),e.prototype=Object.create(w),e},e.awrap=function(e){return{__await:e}},E(_.prototype),l(_.prototype,c,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},E(w),l(w,s,"Generator"),l(w,a,(function(){return this})),l(w,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=P,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),x(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:P(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function s(e,t,r,n,o,i,a){try{var c=e[i](a),u=c.value}catch(e){return void r(e)}c.done?t(u):Promise.resolve(u).then(n,o)}function l(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){s(i,n,o,a,c,"next",e)}function c(e){s(i,n,o,a,c,"throw",e)}a(void 0)}))}}function f(e,t,r){return f=m()?Reflect.construct.bind():function(e,t,r){var n=[null];n.push.apply(n,t);var o=new(Function.bind.apply(e,n));return r&&h(o,r.prototype),o},f.apply(null,arguments)}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function h(e,t){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},h(e,t)}function y(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return v(e)}function v(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function b(e){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},b(e)}function g(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function w(e,t,r){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,r)}function E(e,t){return function(e,t){return t.get?t.get.call(e):t.value}(e,O(e,t,"get"))}function _(e,t,r){return function(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}(e,O(e,t,"set"),r),r}function O(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}var S=(0,a.default)("cbio.CBORSocket"),j=new WeakMap,x=new WeakMap,k=new WeakMap,P=new WeakMap,T=new WeakMap,L=new WeakMap,C=new WeakMap,I=new WeakMap,M=new WeakMap,N=new WeakMap,A=new WeakMap,R=new WeakMap,D=new WeakMap,F=new WeakMap,W=new WeakMap,z=new WeakMap,G=new WeakMap,U=new WeakMap,Y=new WeakMap,B=new WeakMap,q=new WeakMap,V=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&h(e,t)}(c,e);var t,r,n,o,a=(t=c,r=m(),function(){var e,n=b(t);if(r){var o=b(this).constructor;e=Reflect.construct(n,arguments,o)}else e=n.apply(this,arguments);return y(this,e)});function c(e){var t,r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=n.socketFactory,s=void 0===o?function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return f(WebSocket,t)}:o;return d(this,c),w(v(t=a.call(this)),j,{writable:!0,value:void 0}),w(v(t),x,{writable:!0,value:!1}),w(v(t),k,{writable:!0,value:void 0}),w(v(t),P,{writable:!0,value:void 0}),w(v(t),T,{writable:!0,value:0}),w(v(t),L,{writable:!0,value:6e4}),w(v(t),C,{writable:!0,value:1e3+Math.floor(1e3*Math.random())}),w(v(t),I,{writable:!0,value:void 0}),w(v(t),M,{writable:!0,value:void 0}),w(v(t),N,{writable:!0,value:void 0}),w(v(t),A,{writable:!0,value:0}),w(v(t),R,{writable:!0,value:0}),w(v(t),D,{writable:!0,value:(r=l(u().mark((function e(){var r,n;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!E(v(t),P)){e.next=3;break}return console.error("Socket already exists"),e.abrupt("return");case 3:return S("creating ws"),e.next=6,E(v(t),j).getUrl();case 6:if(r=e.sent,!E(v(t),x)){e.next=9;break}return e.abrupt("return");case 9:if(!E(v(t),P)){e.next=11;break}return e.abrupt("return");case 11:(n=E(v(t),k).call(v(t),r)).binaryType="arraybuffer",n.addEventListener("open",E(v(t),F)),n.addEventListener("message",E(v(t),z)),n.addEventListener("close",E(v(t),Y)),n.addEventListener("error",E(v(t),B)),_(v(t),P,n);case 18:case"end":return e.stop()}}),e)}))),function(){return r.apply(this,arguments)})}),w(v(t),F,{writable:!0,value:function(){S("ws opened"),t.emit("open"),clearTimeout(E(v(t),M)),_(v(t),M,setTimeout((function(){S("counting open as success"),_(v(t),T,0)}),5e3))}}),w(v(t),W,{writable:!0,value:function(e){_(v(t),R,e)}}),w(v(t),z,{writable:!0,value:function(e){try{var r=(0,i.decode)(new Uint8Array(e.data)),n=r.event,o=r.data,a=r.ack;return a?E(v(t),W).call(v(t),a):n?t.emit("event",n,o):console.error("Socket received message without event",e)}catch(t){return console.error("Error processing message",e.data,t.stack)}}}),w(v(t),G,{writable:!0,value:function(e){var r=1+.5*Math.random(),n=Math.floor(Math.pow(300*e,1.2)*r);return Math.min(Math.max(E(v(t),C),n),E(v(t),L))}}),w(v(t),U,{writable:!0,value:function(){if(E(v(t),x))S("reconnect skipped as socket was closed");else if(E(v(t),N))S("reconnect skipped as reconnect already scheduled");else{if(!1===navigator.onLine)return S("navigator offline"),void _(v(t),N,setTimeout((function(){_(v(t),N,null),E(v(t),U).call(v(t))}),1e3));var e=E(v(t),G).call(v(t),E(v(t),T));S("reconnecting in",e,"attempts",E(v(t),T)),_(v(t),N,setTimeout(l(u().mark((function e(){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(_(v(t),N,null),!E(v(t),x)){e.next=5;break}console.warn("tried to reconnect after close"),e.next=8;break;case 5:return _(v(t),P,null),e.next=8,E(v(t),D).call(v(t)).catch(E(v(t),B));case 8:case"end":return e.stop()}}),e)}))),e)),_(v(t),T,E(v(t),T)+1)}}}),w(v(t),Y,{writable:!0,value:function(){S("ws closed"),t.emit("close"),S("resetting message acks"),_(v(t),A,0),_(v(t),R,0),E(v(t),x)||E(v(t),U).call(v(t)),clearTimeout(E(v(t),M))}}),w(v(t),B,{writable:!0,value:function(e){t.emit("error",e)}}),w(v(t),q,{writable:!0,value:function(){t.send("ping")}}),g(v(t),"messageLag",(function(){return E(v(t),R)?E(v(t),A)-E(v(t),R):0})),g(v(t),"setMaxReconnectDelay",(function(e){S("set max delay",e),_(v(t),L,e)})),g(v(t),"setMinReconnectDelay",(function(e){S("set min delay",e),_(v(t),C,e)})),g(v(t),"send",(function(e,r){if(!t.connected)return!1;_(v(t),A,E(v(t),A)+1);var n=Date.now(),o=(0,i.encode)(r?{event:e,id:E(v(t),A),data:r}:{event:e});return S("encoded","".concat(o.byteLength," bytes"),"in","".concat(Date.now()-n,"ms")),E(v(t),P).send(o),!0})),g(v(t),"close",(function(){if(S("close"),_(v(t),x,!0),E(v(t),P))try{var e;(e=E(v(t),P)).close.apply(e,arguments)}catch(e){S("error closing socket",e)}_(v(t),P,null),t.removeAllListeners(),clearTimeout(E(v(t),N)),clearInterval(E(v(t),I)),window.removeEventListener("unload",t.close)})),S("created cbor socket"),_(v(t),j,e),_(v(t),k,s),_(v(t),I,setInterval(E(v(t),q),6e4)),window.addEventListener("unload",t.close),t.on("error",(function(e){return S("ws errored",e)})),E(v(t),D).call(v(t)).catch(E(v(t),B)),t}return n=c,(o=[{key:"bufferedAmount",get:function(){return E(this,P)?E(this,P).bufferedAmount:1/0}},{key:"connected",get:function(){return!!E(this,P)&&E(this,P).readyState===E(this,P).OPEN}}])&&p(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),c}(c.EventEmitter);t.default=V},6683:function(e,t,r){function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(4843);var o=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,r;return t=e,r=[{key:"fromImage",value:function(e){var t=document.createElement("canvas");return t.width=e.width,t.height=e.height,t.getContext("2d").drawImage(e,0,0,t.width,t.height),this.fromCanvas(t)}},{key:"fromCanvas",value:function(e){return e.toDataURL?e.toDataURL("image/webp",.3):null}}],null&&n(t.prototype,null),r&&n(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.default=o},9421:function(e,t,r){function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(4011),r(1e3),r(4843);var o=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.rate=t,this.period=r,this._tracked=[]}var t,r;return t=e,(r=[{key:"limit",value:function(){var e=Date.now()-this.period;return this._tracked=this._tracked.filter((function(t){return t>e})),!(this._tracked.length<this.rate&&(this._tracked.push(Date.now()),1))}}])&&n(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.default=o},8755:function(e,t,r){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},o(e,t)}function i(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return a(e)}function a(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function c(e){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},c(e)}function u(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r(4277),r(3064),r(9616),r(444),r(1076),r(5547),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(1624),r(1e3),r(8719),r(2047),r(8534),r(3524),r(9344),r(4843);var s=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&o(e,t)}(l,e);var t,r,n,s=(r=l,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=c(r);if(n){var o=c(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return i(this,e)});function l(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),u(a(e=s.call(this)),"windows",new Set),u(a(e),"tap",(function(t){if(!e.windows.has(t)){e.windows.add(t);var r=a(e),n=t.history.pushState.bind(t.history);t.history.pushState=function(){n.apply(void 0,arguments),r.emit("navigate",t)};var o=t.history.replaceState.bind(t.history);t.history.replaceState=function(){o.apply(void 0,arguments),r.emit("navigate",t)};var i=t.CSSStyleSheet.prototype.insertRule;t.CSSStyleSheet.prototype.insertRule=function(){var e=i.bind(this).apply(void 0,arguments);return r.emit("stylechange",this),e};var c=t.CSSStyleSheet.prototype.deleteRule;t.CSSStyleSheet.prototype.deleteRule=function(){var e=c.bind(this).apply(void 0,arguments);return r.emit("stylechange",this),e};var u=t.CSSStyleSheet.prototype.replace;t.CSSStyleSheet.prototype.replace=function(){var e=u.bind(this).apply(void 0,arguments);return r.emit("stylechange",this),e};var s=t.CSSStyleSheet.prototype.replaceSync;t.CSSStyleSheet.prototype.replaceSync=function(){var e=s.bind(this).apply(void 0,arguments);return r.emit("stylechange",this),e}}})),u(a(e),"untap",(function(){})),e.setMaxListeners(200),e}return t=l,Object.defineProperty(t,"prototype",{writable:!1}),t}(r(1239).EventEmitter),l=new s;t.default=l},1560:function(e,t,r){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}r(4843),r(444),r(1076),r(5547),r(1624),r(2047),r(8534),r(8496),r(4802),r(2112),r(6353),r(3064),r(3275),r(6941),r(4277),r(6257),Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return u.apply(this,arguments)},r(1e3);var o=r(7743);function i(){i=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},c=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var i=t&&t.prototype instanceof h?t:h,a=Object.create(i.prototype),c=new k(n||[]);return o(a,"_invoke",{value:O(e,r,c)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=f;var p={};function h(){}function y(){}function v(){}var m={};l(m,c,(function(){return this}));var b=Object.getPrototypeOf,g=b&&b(b(P([])));g&&g!==t&&r.call(g,c)&&(m=g);var w=v.prototype=h.prototype=Object.create(m);function E(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function i(o,a,c,u){var s=d(e[o],e,a);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==n(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){i("next",e,c,u)}),(function(e){i("throw",e,c,u)})):t.resolve(f).then((function(e){l.value=e,c(l)}),(function(e){return i("throw",e,c,u)}))}u(s.arg)}var a;o(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){i(e,r,t,n)}))}return a=a?a.then(n,n):n()}})}function O(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=S(a,r);if(c){if(c===p)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=d(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,S(e,t),"throw"===t.method))return p;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var n=d(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,p;var o=n.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function P(e){if(e){var t=e[c];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:T}}function T(){return{value:void 0,done:!0}}return y.prototype=v,o(w,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,l(e,s,"GeneratorFunction")),e.prototype=Object.create(w),e},e.awrap=function(e){return{__await:e}},E(_.prototype),l(_.prototype,u,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},E(w),l(w,s,"Generator"),l(w,c,(function(){return this})),l(w,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=P,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),x(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:P(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function a(e,t,r,n,o,i,a){try{var c=e[i](a),u=c.value}catch(e){return void r(e)}c.done?t(u):Promise.resolve(u).then(n,o)}function c(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function c(e){a(i,n,o,c,u,"next",e)}function u(e){a(i,n,o,c,u,"throw",e)}c(void 0)}))}}function u(){return(u=c(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o.NodeSerializer.isLocalResource(window.location.href)&&console.warn("CobrowseIO: This page was loaded from a local address, Cobrowse may not work as expected due to inaccessible resources. We recommend using ngrok for testing development versions.");case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},3440:function(e,t,r){r(4843),Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o.default,n=["X-CobrowseSDKVersion=".concat(r.version),"X-CobrowsePlatform=web","X-CobrowseDevice=".concat(r.deviceId()),"X-CobrowseLicense=".concat(r.license)].join("&"),i=new URL(e,r.api).toString(),a=i.replace("https://","wss://").replace("http://","ws://");return new URL("sockets/1/ws?access_token=".concat(t,"&").concat(n),a).toString()},r(887),r(1e3),r(7285),r(1624),r(2047),r(8534),r(6955),r(8927),r(3524),r(9344),r(3114);var n,o=(n=r(1178))&&n.__esModule?n:{default:n}},7368:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.protect=function(e,t,r){e[n]||Object.defineProperty(e,n,{enumerable:!1,value:{}});var o=e[n][t];return Object.getPrototypeOf(Object.getPrototypeOf(e))[t]=o,Object.defineProperty(e[n],t,{enumerable:!1,value:r,configurable:!0}),r},r(444),r(1076),r(1e3),r(4843),r(3064);var n=Symbol("protected"),o=n;t.default=o},453:function(e,t,r){r(4843),Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o,r="",n=e;n>0;n-=1)r+=t[Math.floor(Math.random()*t.length)];return r},r(3114);var n="abcdefghijklmnopqrstuvwxyz",o="".concat("0123456789").concat(n.toLowerCase()).concat(n.toUpperCase())},3191:function(e,t,r){function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(3600),r(6770),r(4843);var o=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,r;return t=e,r=[{key:"isHeadless",value:function(){return navigator.userAgent.toLowerCase().includes("headless")}}],null&&n(t.prototype,null),r&&n(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.default=o},3936:function(e){e.exports=require("cbor-x")},3114:function(e){e.exports=require("core-js/modules/es.array.concat.js")},5220:function(e){e.exports=require("core-js/modules/es.array.fill.js")},4011:function(e){e.exports=require("core-js/modules/es.array.filter.js")},6706:function(e){e.exports=require("core-js/modules/es.array.find.js")},5793:function(e){e.exports=require("core-js/modules/es.array.flat-map.js")},6486:function(e){e.exports=require("core-js/modules/es.array.from.js")},3600:function(e){e.exports=require("core-js/modules/es.array.includes.js")},3257:function(e){e.exports=require("core-js/modules/es.array.index-of.js")},1624:function(e){e.exports=require("core-js/modules/es.array.iterator.js")},887:function(e){e.exports=require("core-js/modules/es.array.join.js")},3133:function(e){e.exports=require("core-js/modules/es.array.map.js")},5562:function(e){e.exports=require("core-js/modules/es.array.reduce.js")},6257:function(e){e.exports=require("core-js/modules/es.array.slice.js")},1896:function(e){e.exports=require("core-js/modules/es.array.sort.js")},3794:function(e){e.exports=require("core-js/modules/es.array.splice.js")},1861:function(e){e.exports=require("core-js/modules/es.array.unscopables.flat-map.js")},6941:function(e){e.exports=require("core-js/modules/es.function.name.js")},2112:function(e){e.exports=require("core-js/modules/es.json.to-string-tag.js")},4391:function(e){e.exports=require("core-js/modules/es.map.js")},6353:function(e){e.exports=require("core-js/modules/es.math.to-string-tag.js")},5538:function(e){e.exports=require("core-js/modules/es.number.constructor.js")},6369:function(e){e.exports=require("core-js/modules/es.object.assign.js")},6507:function(e){e.exports=require("core-js/modules/es.object.define-properties.js")},4843:function(e){e.exports=require("core-js/modules/es.object.define-property.js")},5226:function(e){e.exports=require("core-js/modules/es.object.get-own-property-descriptor.js")},9270:function(e){e.exports=require("core-js/modules/es.object.get-own-property-descriptors.js")},6565:function(e){e.exports=require("core-js/modules/es.object.get-own-property-names.js")},3064:function(e){e.exports=require("core-js/modules/es.object.get-prototype-of.js")},5128:function(e){e.exports=require("core-js/modules/es.object.keys.js")},4277:function(e){e.exports=require("core-js/modules/es.object.set-prototype-of.js")},1e3:function(e){e.exports=require("core-js/modules/es.object.to-string.js")},1087:function(e){e.exports=require("core-js/modules/es.object.values.js")},9497:function(e){e.exports=require("core-js/modules/es.parse-int.js")},9616:function(e){e.exports=require("core-js/modules/es.reflect.construct.js")},1112:function(e){e.exports=require("core-js/modules/es.reflect.get.js")},9806:function(e){e.exports=require("core-js/modules/es.regexp.constructor.js")},3524:function(e){e.exports=require("core-js/modules/es.regexp.exec.js")},7285:function(e){e.exports=require("core-js/modules/es.regexp.to-string.js")},8719:function(e){e.exports=require("core-js/modules/es.set.js")},6770:function(e){e.exports=require("core-js/modules/es.string.includes.js")},2047:function(e){e.exports=require("core-js/modules/es.string.iterator.js")},3317:function(e){e.exports=require("core-js/modules/es.string.match.js")},5393:function(e){e.exports=require("core-js/modules/es.string.pad-start.js")},9344:function(e){e.exports=require("core-js/modules/es.string.replace.js")},685:function(e){e.exports=require("core-js/modules/es.string.split.js")},242:function(e){e.exports=require("core-js/modules/es.string.trim.js")},8496:function(e){e.exports=require("core-js/modules/es.symbol.async-iterator.js")},1076:function(e){e.exports=require("core-js/modules/es.symbol.description.js")},5547:function(e){e.exports=require("core-js/modules/es.symbol.iterator.js")},444:function(e){e.exports=require("core-js/modules/es.symbol.js")},4802:function(e){e.exports=require("core-js/modules/es.symbol.to-string-tag.js")},7639:function(e){e.exports=require("core-js/modules/es.typed-array.copy-within.js")},6996:function(e){e.exports=require("core-js/modules/es.typed-array.every.js")},1366:function(e){e.exports=require("core-js/modules/es.typed-array.fill.js")},3558:function(e){e.exports=require("core-js/modules/es.typed-array.filter.js")},8630:function(e){e.exports=require("core-js/modules/es.typed-array.find-index.js")},8852:function(e){e.exports=require("core-js/modules/es.typed-array.find.js")},8858:function(e){e.exports=require("core-js/modules/es.typed-array.for-each.js")},6480:function(e){e.exports=require("core-js/modules/es.typed-array.includes.js")},7219:function(e){e.exports=require("core-js/modules/es.typed-array.index-of.js")},2160:function(e){e.exports=require("core-js/modules/es.typed-array.iterator.js")},4289:function(e){e.exports=require("core-js/modules/es.typed-array.join.js")},8165:function(e){e.exports=require("core-js/modules/es.typed-array.last-index-of.js")},4613:function(e){e.exports=require("core-js/modules/es.typed-array.map.js")},3748:function(e){e.exports=require("core-js/modules/es.typed-array.reduce-right.js")},3292:function(e){e.exports=require("core-js/modules/es.typed-array.reduce.js")},9157:function(e){e.exports=require("core-js/modules/es.typed-array.reverse.js")},5529:function(e){e.exports=require("core-js/modules/es.typed-array.set.js")},4882:function(e){e.exports=require("core-js/modules/es.typed-array.slice.js")},7233:function(e){e.exports=require("core-js/modules/es.typed-array.some.js")},1086:function(e){e.exports=require("core-js/modules/es.typed-array.sort.js")},8786:function(e){e.exports=require("core-js/modules/es.typed-array.subarray.js")},5544:function(e){e.exports=require("core-js/modules/es.typed-array.to-locale-string.js")},1304:function(e){e.exports=require("core-js/modules/es.typed-array.to-string.js")},9382:function(e){e.exports=require("core-js/modules/es.typed-array.uint16-array.js")},2827:function(e){e.exports=require("core-js/modules/es.typed-array.uint8-array.js")},1157:function(e){e.exports=require("core-js/modules/es.weak-map.js")},9280:function(e){e.exports=require("core-js/modules/es.weak-set.js")},3275:function(e){e.exports=require("core-js/modules/web.dom-collections.for-each.js")},8534:function(e){e.exports=require("core-js/modules/web.dom-collections.iterator.js")},8927:function(e){e.exports=require("core-js/modules/web.url-search-params.js")},6955:function(e){e.exports=require("core-js/modules/web.url.js")},1320:function(e){e.exports=require("dompurify")},1239:function(e){e.exports=require("events")},2449:function(e){e.exports=require("events-polyfill/src/constructors")},2404:function(e){e.exports=require("fast-deep-equal")},6734:function(e){e.exports=require("js-cookie")},136:function(e){e.exports=require("lodash/isMatch")},1381:function(e){e.exports=require("lodash/throttle")},3231:function(e){e.exports=require("ms")},5828:function(e){e.exports=require("uuid")}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}var n={};return function(){var e=n;r(4843),e.default=void 0;var t,o=(t=r(1178))&&t.__esModule?t:{default:t},i=o.default;if(window.__cobrowse_io_loaded)throw o.default=function(){throw new Error('"CobrowseIO" is read-only.')}(),new Error("CobrowseIO already loaded. This usually means you included the snippet multiple times.");window.__cobrowse_io_loaded=!0;var a=i;e.default=a}(),n.default}()}));