1;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="1167564e-12d3-c444-3f9e-693e6cc67a7b")}catch(e){}}(); 2(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,78614,503630,e=>{"use strict";let t={serializeDeviceList:e=>Array.isArray(e)?e.map((e,t)=>({value:e.deviceId,groupId:e.groupId,kind:e.kind,label:""===e.label?"Microphone ".concat(t+1):e.label})):[]};e.s(["microphoneService",0,t],503630);var i=e.i(118896),r=e.i(619012);e.s(["default",0,(e,a)=>{if(e)return{type:r.UPDATE_MICROPHONE,payload:e,error:!0};if(!Array.isArray(a))return{type:r.UPDATE_MICROPHONE,payload:Error(i.NO_ARRAY),error:!0};let n=t.serializeDeviceList(a);return{type:r.UPDATE_MICROPHONE,payload:{microphones:n}}}],78614)},453793,409283,767734,494344,e=>{"use strict";e.s(["default",()=>b],453793);var t=e.i(120786),i=e.i(92808),r=e.i(177628),a=e.i(619012),n=e.i(118896),s=e.i(781706),l=e.i(908652),o=e.i(928299),d=e.i(188802),u=e.i(857303);let c=(e,t)=>(i,r)=>{if(e)return i({type:a.ADD_CAM,payload:e,error:!0,meta:{stamp:(0,o.uuid)()}});let n=r().streaming;(0,s.muteMicrophone)(t,n.mute);let c=u.default.setStream(t);if(!c)return console.error("Failed to set stream in mediaStreamService"),i({type:a.ADD_CAM,payload:(0,d.createSerializableError)("Failed to set stream","FAILED_TO_SET_STREAM"),error:!0,meta:{stamp:(0,o.uuid)()}});i((0,l.default)({id:"SYSTEM_MESSAGE_WELCOME"})),i({type:a.ADD_CAM,payload:{streamMetadata:c}})},h=(e,t,i)=>({type:a.CHANGE_CAM,payload:{value:e,label:t,possibleResolutions:i}});e.s(["default",0,h],409283);var p=e.i(78614);let v=e=>({deviceId:e.deviceId,groupId:e.groupId,kind:e.kind,label:e.label||""}),f=(e,t)=>{if(e)return{type:a.UPDATE_CAM,payload:e,error:!0};if(!Array.isArray(t))return{type:a.UPDATE_CAM,payload:Error(n.NO_ARRAY),error:!0};let i=t.map(v);return{type:a.UPDATE_CAM,payload:{cams:i}}},m=(e,t)=>i=>{e?(i(f(e)),i((0,p.default)(e))):(i(f(null,t.filter(e=>"videoinput"===e.kind))),i((0,p.default)(null,t.filter(e=>"audioinput"===e.kind))))};e.s(["default",0,m],767734),e.i(132919);var _=e.i(762740);let y=()=>e=>{_.mediaStreamService.removeStream(),e({type:a.CAM_STOP})};e.s(["default",0,y],494344);let E=(e,t)=>{if(!e||!e.value&&(!e.label||"STREAMING_OPTIONS_NO_MIC"===e.label))return!1;let i=t.filter(e=>"audioinput"===e.kind),r=i.find(t=>t.deviceId===e.value||t.label&&t.label===e.label);if(!r&&/Microphone \d/gi.test(e.label)&&i.length>0){let t=parseInt(e.label.split(" ").pop(),10)-1;Number.isNaN(t)||"object"!=typeof i[t]||(r=i[t])}return!!r&&r.deviceId},g=e=>{var t;null==e||null==(t=e.getTracks)||t.call(e).forEach(e=>e.stop())},b=()=>async(e,l)=>{let{cam:o}=l();if(console.log("choose Cam started"),!o.selectedCam.label)return e(c(Error(n.NO_DEVICE)));e(y());try{var d,u;let n,p,v=await navigator.mediaDevices.enumerateDevices(),f=E(o.selectedMicrophone,v);if(n=o,!v.some(e=>"videoinput"===e.kind&&(e.deviceId===n.selectedCam.value||e.label&&e.label===n.selectedCam.label))||o.selectedMicrophone.value&&!f){let t=await (0,s.getCam)({video:!0,audio:!1},e);g(t),v=await navigator.mediaDevices.enumerateDevices(),o=l().cam,f=E(o.selectedMicrophone,v)}let _="STREAMING_OPTIONS_NO_MIC"!==o.selectedMicrophone.label?await (null==(u=navigator)||null==(d=u.permissions)?void 0:d.query({name:"microphone"})):null;if((null==_?void 0:_.state)==="prompt")try{let e=await navigator.mediaDevices.getUserMedia({video:!1,audio:!0});g(e),v=await navigator.mediaDevices.enumerateDevices(),o=l().cam,f=E(o.selectedMicrophone,v)}catch(e){}let y=(0,i._)((0,t._)({},o),{selectedMicrophone:(0,i._)((0,t._)({},o.selectedMicrophone),{value:f})}),b=(0,s.getConstraint)(y,v),M=await (0,s.getCam)(b,e),O=(v=await navigator.mediaDevices.enumerateDevices()).find(e=>e.deviceId===o.selectedCam.value||e.label===o.selectedCam.label);O&&(o.selectedCam.value!==O.deviceId||o.selectedCam.label!==O.label)&&e(h(O.deviceId,O.label));let A=v.find(e=>e.deviceId===o.selectedMicrophone.value||e.label===o.selectedMicrophone.label);A&&o.selectedMicrophone.value!==A.deviceId&&e((0,r.default)(A.deviceId,A.label,!1)),A&&o.selectedMicrophone.label!==A.label&&e((p=A.label,{type:a.CHANGE_LABEL_MICROPHONE,payload:p})),e(m(null,v)),e(c(null,M))}catch(t){"NotAllowedError"!==t.name&&e(c(t))}}},177628,e=>{"use strict";e.s(["default",()=>r]);var t=e.i(453793),i=e.i(619012);let r=function(e,r){let a=!(arguments.length>2)||void 0===arguments[2]||arguments[2];return(n,s)=>{let{cam:{selectedCam:{value:l}}}=s();if(n({type:i.CHANGE_MICROPHONE,payload:{value:"false"!==e&&e,label:r}}),"0"!==l&&a)return n((0,t.default)())}}},217776,560904,455449,e=>{"use strict";e.i(132919);var t=e.i(762740),i=e.i(928299),r=e.i(619012);e.s(["default",0,e=>(t.mediaStreamService.removeStream(),{type:r.RESET_CAM,payload:e,meta:{stamp:(0,i.uuid)()}})],217776),e.s(["default",0,()=>({type:r.CAM_CONSUMER_ADD})],560904),e.s(["default",0,()=>({type:r.CAM_CONSUMER_REMOVE})],455449)},797028,e=>{"use strict";var t=e.i(619012);e.s(["default",0,e=>({type:t.CAM_OVERLAYHEIGHT_CHANGE,payload:e})])},970583,e=>{"use strict";var t=e.i(619012);e.s(["default",0,()=>({type:t.VIEW_CAM_TOGGLE})])},734913,282830,e=>{"use strict";var t=function(){if("u">typeof Map)return Map;function e(e,t){var i=-1;return e.some(function(e,r){return e[0]===t&&(i=r,!0)}),i}function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var i=e(this.__entries__,t),r=this.__entries__[i];return r&&r[1]},t.prototype.set=function(t,i){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=i:this.__entries__.push([t,i])},t.prototype.delete=function(t){var i=this.__entries__,r=e(i,t);~r&&i.splice(r,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var i=0,r=this.__entries__;i<r.length;i++){var a=r[i];e.call(t,a[1],a[0])}},t}(),i="u">typeof window&&"u">typeof document&&window.document===document,r=e.g.Math===Math?e.g:"u">typeof self&&self.Math===Math?self:"u">typeof window&&window.Math===Math?window:Function("return this")(),a="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(r):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)},n=["top","right","bottom","left","width","height","size","weight"],s="u">typeof MutationObserver,l=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(e){var t=!1,i=!1,r=0;function n(){t&&(t=!1,e()),i&&l()}function s(){a(n)}function l(){var e=Date.now();if(t){if(e-r<2)return;i=!0}else t=!0,i=!1,setTimeout(s,20);r=e}return l}(this.refresh.bind(this))}return e.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},e.prototype.removeObserver=function(e){var t=this.observers_,i=t.indexOf(e);~i&&t.splice(i,1),!t.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},e.prototype.updateObservers_=function(){var e=this.observers_.filter(function(e){return e.gatherActive(),e.hasActive()});return e.forEach(function(e){return e.broadcastActive()}),e.length>0},e.prototype.connect_=function(){i&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),s?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){i&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,i=void 0===t?"":t;n.some(function(e){return!!~i.indexOf(e)})&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=ne
2w e),this.instance_},e.instance_=null,e}(),o=function(e,t){for(var i=0,r=Object.keys(t);i<r.length;i++){var a=r[i];Object.defineProperty(e,a,{value:t[a],enumerable:!1,writable:!1,configurable:!0})}return e},d=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||r},u=v(0,0,0,0);function c(e){return parseFloat(e)||0}function h(e){for(var t=[],i=1;i<arguments.length;i++)t[i-1]=arguments[i];return t.reduce(function(t,i){return t+c(e["border-"+i+"-width"])},0)}var p="u">typeof SVGGraphicsElement?function(e){return e instanceof d(e).SVGGraphicsElement}:function(e){return e instanceof d(e).SVGElement&&"function"==typeof e.getBBox};function v(e,t,i,r){return{x:e,y:t,width:i,height:r}}var f=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=v(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=function(e){if(!i)return u;if(p(e)){var t;return v(0,0,(t=e.getBBox()).width,t.height)}return function(e){var t,i=e.clientWidth,r=e.clientHeight;if(!i&&!r)return u;var a=d(e).getComputedStyle(e),n=function(e){for(var t={},i=0,r=["top","right","bottom","left"];i<r.length;i++){var a=r[i],n=e["padding-"+a];t[a]=c(n)}return t}(a),s=n.left+n.right,l=n.top+n.bottom,o=c(a.width),p=c(a.height);if("border-box"===a.boxSizing&&(Math.round(o+s)!==i&&(o-=h(a,"left","right")+s),Math.round(p+l)!==r&&(p-=h(a,"top","bottom")+l)),(t=e)!==d(t).document.documentElement){var f=Math.round(o+s)-i,m=Math.round(p+l)-r;1!==Math.abs(f)&&(o-=f),1!==Math.abs(m)&&(p-=m)}return v(n.left,n.top,o,p)}(e)}(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},e}(),m=function(e,t){var i,r,a,n,s,l=(i=t.x,r=t.y,a=t.width,n=t.height,o(s=Object.create(("u">typeof DOMRectReadOnly?DOMRectReadOnly:Object).prototype),{x:i,y:r,width:a,height:n,top:r,right:i+a,bottom:n+r,left:i}),s);o(this,{target:e,contentRect:l})},_=function(){function e(e,i,r){if(this.activeObservations_=[],this.observations_=new t,"function"!=typeof e)throw TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=i,this.callbackCtx_=r}return e.prototype.observe=function(e){if(!arguments.length)throw TypeError("1 argument required, but only 0 present.");if(!("u"<typeof Element)&&Element instanceof Object){if(!(e instanceof d(e).Element))throw TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new f(e)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(e){if(!arguments.length)throw TypeError("1 argument required, but only 0 present.");if(!("u"<typeof Element)&&Element instanceof Object){if(!(e instanceof d(e).Element))throw TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach(function(t){t.isActive()&&e.activeObservations_.push(t)})},e.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map(function(e){return new m(e.target,e.broadcastRect())});this.callback_.call(e,t,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),y="u">typeof WeakMap?new WeakMap:new t,E=function e(t){if(!(this instanceof e))throw TypeError("Cannot call a class as a function.");if(!arguments.length)throw TypeError("1 argument required, but only 0 present.");var i=new _(t,l.getInstance(),this);y.set(this,i)};["observe","unobserve","disconnect"].forEach(function(e){E.prototype[e]=function(){var t;return(t=y.get(this))[e].apply(t,arguments)}});var g=void 0!==r.ResizeObserver?r.ResizeObserver:E;e.s(["default",0,g],734913),e.i(132919);var b=e.i(762740),M=e.i(546053),O=e.i(619012),A=e.i(122310),S=e.i(591489);e.s(["default",0,e=>(t,i)=>(b.mediaStreamService.muteMicrophone(e),i().streaming.managementStep===M.MANAGEMENT_LOGGED_IN&&t(e?()=>{A.management.emit("microphoneDisabled",{})}:()=>{S.default.emit("microphoneEnabled",{})}),t({type:O.MICROPHONE_MUTE,payload:{mute:e}}))],282830)},343173,e=>{"use strict";let t={src:e.i(979163).default,width:24,height:24,blurWidth:0,blurHeight:0};e.s(["default",0,t])},176386,936349,e=>{"use strict";var t=e.i(120786),i=e.i(92808),r=e.i(560904),a=e.i(455449),n=e.i(797028),s=e.i(217776),l=e.i(970583),o=e.i(54408),d=e.i(155487),u=e.i(308158),c=e.i(843476),h=e.i(857303),p=e.i(271645),v=e.i(734913),f=e.i(781706),m=e.i(619415),_=e.i(834302),y=e.i(394048),E=e.i(114587),g=e.i(11),b=e.i(282830),M=e.i(82334),O=e.i(343173);let A={src:e.i(644220).default,width:24,height:24,blurWidth:0,blurHeight:0};var S=e.i(343794);let I={muteMicrophone:b.default},T=(0,d.connect)((e,r)=>(0,i._)((0,t._)({},r),{microphoneMuted:e.streaming.mute,microphoneEnabled:!1!==e.cam.selectedMicrophone.value}),I)(function(e){let{muteMicrophone:t,microphoneEnabled:i,microphoneMuted:r,muteRef:a}=e,n=r?O.default:A,s=(0,g.useIntl)(),l=r?s.formatMessage({id:"MUTED"}):s.formatMessage({id:"MUTE"}),o=(0,S.default)("btn-mute",{"is-muted":r});return i?(0,c.jsx)(M.default,{innerRef:a,icon:n,onClick:()=>t(!r),intlTranslate:!1,variant:"icon-only",className:o,title:l}):null});e.s(["default",0,T],936349);let N=(0,d.connect)((e,r)=>{let{camUser:{camUsers:a},dialog:{dialogs:n},cam:{overlayHeight:s=0,resizing:l},sender:{roomTypes:o}
2,cam:d}=e,u=Math.ceil(s*(0,f.getRatio)(d)),c=0,h=0,p=e.view.isSizeM;if(m.default.isEvent(o))return(0,i._)((0,t._)({},r),{width:u,height:s,verticalBorder:Math.ceil(.33*u),horizontalBorder:h});let v=_.default.activeUser([...a,...n]);return v&&v.dimensions&&(v.dimensions.percentHeight<1&&(h=Math.ceil(s*(1-v.dimensions.percentHeight)/2)),v.dimensions.percentWidth<1&&(c=Math.ceil(u*(1-v.dimensions.percentWidth)/2))),(0,i._)((0,t._)({},r),{width:u,height:s,verticalBorder:c,horizontalBorder:h,resizing:l,isSizeM:p})})(e=>{let{width:t,height:i,verticalBorder:r,horizontalBorder:a,overlayRef:n,resizing:s,isSizeM:l}=e,o=(0,g.useIntl)(),u=(0,d.useSelector)(y.selectFpsStatus);return s?null:(0,c.jsxs)("div",{className:"cam-overlay",style:{width:t,height:i},ref:n,children:[(0,c.jsx)("div",{className:"cam-overlay-window",style:{borderTopWidth:a,borderBottomWidth:a,borderLeftWidth:r,borderRightWidth:r,borderStyle:"solid",borderColor:"#d0d0d0"}}),l&&(0,c.jsxs)(c.Fragment,{children:[u===y.FPS_STATUS.LOW||u===y.FPS_STATUS.MEDIUM?(0,c.jsx)(E.default,{icon:!1,tooltip:o.formatMessage({id:"CAM_CONNECTION_WARNING"}),label:"LOW FPS",intlTranslate:!1,position:"left",btnClassName:"tiny btn-fps fps-".concat(u),variant:"primary",className:"fps"}):null,(0,c.jsx)(T,{})]})]})});class C extends p.default.Component{checkVideoHealth(){var e,t,i;if(null==(e=this.video)?void 0:e.current){if(!(this.video.current.readyState>=2&&this.video.current.videoWidth>0&&this.video.current.videoHeight>0)){this.state.missingPreview||this.setState({missingPreview:!0}),this.previewFailureHandled||(this.previewFailureHandled=!0,this.props.cam&&this.props.toggleCamView(),this.props.handleMissingPreview(null==(t=this.props.selectedCam)?void 0:t.label,null==(i=this.props.selectedResolution)?void 0:i.value));return}this.state.missingPreview&&this.setState({missingPreview:!1}),this.previewFailureHandled=!1}}shouldComponentUpdate(e,t){var i,r,a,n;return this.props.selectedCam.value!==e.selectedCam.value||this.props.camInitialized!==e.camInitialized||this.props.cams.length!==e.cams.length||this.props.selectedResolution.value!==e.selectedResolution.value||this.props.change!==e.change||this.props.motto!==e.motto||(null==(i=this.props.streamMetadata)?void 0:i.id)!==(null==(r=e.streamMetadata)?void 0:r.id)||(null==(a=this.props.streamMetadata)?void 0:a.active)!==(null==(n=e.streamMetadata)?void 0:n.active)||this.props.children!==e.children||this.state.missingPreview!==t.missingPreview}checkVideo(){var e,t,i;if(!(null==(e=this.video)?void 0:e.current))return;this.resizeObserver||(this.resizeObserver=new v.default(()=>{clearTimeout(this.timer),this.timer=null,this.timer=setTimeout(()=>{var e,t,i;if((null==(e=this.video)?void 0:e.current)&&(null==(t=this.camContainer)?void 0:t.current)&&"0"!==r.value&&a&&(null==l?void 0:l.id)&&n){if(!(null==(i=this.video)?void 0:i.current))return;s(Math.ceil(this.video.current.getBoundingClientRect().height))}},100)}),this.resizeObserver.observe(this.video.current));let{selectedCam:r,camInitialized:a,enableOverlay:n=!1,changeOverlayheightCam:s,streamMetadata:l}=this.props;if((null==(t=this.video)?void 0:t.current)&&(null==(i=this.camContainer)?void 0:i.current)&&"0"!==r.value&&a&&(null==l?void 0:l.id)){let e=h.mediaStreamService.getStream();if(this.video.current.srcObject!==e&&(this.video.current.srcObject=e),this.video.current.play().catch(e=>{console.log("Error playing video:",e)}),clearTimeout(this.videoHealthTimer),this.videoHealthTimer=setTimeout(()=>{this.checkVideoHealth()},1200),!n)return;setTimeout(()=>{this.video.current&&(s(Math.ceil(this.video.current.getBoundingClientRect().height)),this.onVideoLoaded())},100)}}componentWillUnmount(){if(clearTimeout(this.timer),clearTimeout(this.videoHealthTimer),this.resizeObserver){var e;null==(e=this.resizeObserver)||e.disconnect(),this.resizeObserver=null}this.props.removeCamConsumer()}componentDidMount(){this.props.addCamConsumer(),this.checkVideo()}componentDidUpdate(){this.checkVideo()}render(){let{cams:e,selectedCam:t,camInitialized:i,enableOverlay:r,children:a,intl:n,motto:s,showMotto:l=!0}=this.props,o=e.length>1,d="0"===t.value&&o?"STREAMING_OPTIONS_SELECT_CAM":"CAM_NO_CAM";return"0"!==t.value&&i?(0,c.jsxs)("div",{className:"cam",ref:this.camContainer,children:[""!==s&&l?(0,c.jsx)("div",{className:"show-motto",children:s}):null,(0,c.jsx)("video",{id:"video",autoPlay:!0,muted:!0,ref:this.video}),r&&(0,c.jsx)(N,{overlayRef:this.overlayRef}),a]}):(0,c.jsx)("div",{className:"cam no-cam",children:n.formatMessage({id:d})})}constructor(e){super(e),this.checkVideo=this.checkVideo.bind(this),this.camContainer=p.default.createRef(),e.videoRef?this.video=e.videoRef:this.video=p.default.createRef(),this.overlayRef=p.default.createRef(),this.timer=null,this.videoHealthTimer=null,this.resizeObserver=null,this.state={missingPreview:!1},this.previewFailureHandled=!1,this.onVideoLoaded=e.onVideoLoaded||(()=>{})}}let R=(0,o.injectIntl)((0,d.connect)((e,r)=>(0,i._)((0,t._)({},e.cam,e.streaming,r),{cam:e.view.cam,change:e.view.resize,motto:e.motto.text,streamMetadata:e.streaming.streamMetadata}),e=>(0,i._)((0,t._)({},(0,u.bindActionCreators)({addCamConsumer:r.default,changeOverlayheightCam:n.default,removeCamConsumer:a.default,toggleCamView:l.default},e)),{handleMissingPreview:()=>{e((0,s.default)({showAlert:!0,alertId:"ALERT_CAM_RESET_RESOLUTION_NOT_WORKING"}))}}))(C));e.s(["default",0,R],176386)},146135,e=>{"use strict";var t=e.i(619012);e.s(["default",0,()=>({type:t.CAM_LOADING_ABORT})])},759573,e=>{"use strict";var t=e.i(619012);e.s(["default",0,function(e){return{type:t.DIALOG_REMOVE,payload:{dialogId:e}}}])},576642,460852,959869,661990,644612,607678,356190,e=>{"use strict";var t=e.i(476104),i=e.i(619415),r=e.i(834302),a=e.i(619012),n=e.i(376643);let s=()=>(e,t)=>{let i=t().preferences.sounds;i.leaveShow.active&&e((0,n.default)(i.leaveShow.type))};e.s(["default",0,s],460852);var l=e.i(796205),o=e.i(759573),d=e.i(600376),u=e.i(908652),c=e.i(546053),h=e.i(177593),p=e.i(736073),v=e.i(928299),f=e.i(591489),m=e.i(491126);let _=(e,t)=>
2(i,r)=>{f.default.emit("switchOrigins",p.default.getLoginData(e,t),n=>{if(n)return i((0,m.default)({},7)),i({type:a.MANAGEMENT_ORIGINS_SWITCH,payload:n,error:!0,meta:{stamp:(0,v.uuid)()}});i({type:a.MANAGEMENT_ORIGINS_SWITCH,payload:{logins:e,roomTypes:t},meta:{start:!0}}),setTimeout(()=>{let{sender:{switchoriginbuttonlock:e}}=r();e&&i({type:a.MANAGEMENT_ORIGINS_SWITCH,meta:{end:!0}})},1e3)})};e.s(["default",0,_],959869);var y=e.i(118896);let E=function(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1];return(r,n)=>{let s,l,o=JSON.parse(JSON.stringify(n().sender)),d=o.roomTypes;if(e){if(!(l=p.default.activateOriginsForExclusive(o)))return r({type:a.ROOM_TYPES_CHANGE,error:!0,meta:{stamp:(0,v.uuid)()},payload:Error(y.NO_ORIGIN_EXCLUSIVE)});s=i.default.activateExclusive(d)}else s=i.default.activateNormal(d),l=o.logins;n().streaming.managementStep!==c.MANAGEMENT_LOGGED_OUT&&t||r({type:a.ROOM_TYPES_CHANGE,payload:{roomTypes:s,logins:l}}),t&&r(_(l,s))}};e.s(["default",0,E],661990);let g=function(e){let{logins:t=[],roomTypes:i=[]}=e,r=!(arguments.length>1)||void 0===arguments[1]||arguments[1];return{type:a.UPGRADE_SAVE,payload:{logins:t,roomTypes:i},meta:{add:r}}};e.s(["default",0,g],644612);let b=function(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0],t=!(arguments.length>1)||void 0===arguments[1]||arguments[1];return(r,n)=>{let{sender:{roomTypes:s,logins:l,saved:{logins:o,roomTypes:d}},streaming:{managementStep:u}}=h.default.clone(n());return(e&&r(g({},!1)),i.default.isExclusive(s)&&d.length>0&&!p.default.hasMultipleOrigins(l))?r(E(!1,t)):0===o.length?void 0:void(p.default.hasMultipleOrigins(l)&&(r({type:a.ROOM_TYPES_CHANGE,payload:{roomTypes:d,logins:o}}),u===c.MANAGEMENT_LOGGED_IN&&t&&r(_(o,d))))}};e.s(["default",0,b],607678);var M=e.i(416628);let O=e=>({type:a.UPGRADETIMER_STOP,payload:e});e.s(["default",0,O],356190);var A=e.i(538899),S=e.i(319926);e.s(["default",0,e=>async(n,c)=>{var h,p,v;let{camUser:{camUsers:f},dialog:{dialogs:m},streaming:{permanentCam2CamStream:_},camUserFilter:y,sender:{roomTypes:E,feature:{powersender:g}}}=c(),I=r.default.get(f,e.userId);n(O({userId:e.userId})),I&&(null==I?void 0:I.noDialogPortal)&&n((0,o.default)("".concat(null==I?void 0:I.clientProductId,"@").concat(null==I?void 0:I.clientCustomerId)));let{action:T,nextUserHasCam2Cam:N}=r.default.createStopEventAction(f,m,a.MANAGEMENT_EVENTS_USER_REMOVE,e,g,y);I&&I.visible&&!r.default.isVoyeur(I)&&!i.default.isEvent(E)&&(I.cam2camActive&&n((0,S.default)(I.id)),N&&!_&&n((0,A.default)(T.meta.nextActiveUser.id)),n((0,u.default)({id:"SYSTEM_MESSAGE_USER_LEFT",values:{user:I.name}})),n(s()),n(b()));let C=null==T||null==(h=T.meta)?void 0:h.nextActiveUser;if(C&&(null==C?void 0:C.id)&&(null==C?void 0:C.id.includes("@"))&&(null==C?void 0:C.flags)&&(null==C?void 0:C.flags.includes("noRemoteDialog"))&&(null==C?void 0:C.flags.includes("answered"))||f.find(e=>e.partner===(null==C?void 0:C.id)&&e.hasText))await n((0,l.default)({id:C.id}));else if(!C&&(null==I?void 0:I.name)){let t=f.find(t=>{var i;return t.userId===e.userId&&(t.hasText||(null==(i=t.flags)?void 0:i.includes("answered")))});if(t&&t.partner){let e=m.find(e=>e.partner&&e.partner===t.partner),i=(null==e?void 0:e.flags)||[];(!e||i.includes("noRemoteDialog"))&&await n((0,l.default)({id:t.partner}))}}(null==T||null==(v=T.meta)||null==(p=v.nextActiveUser)?void 0:p.userId)&&"system"!==T.meta.nextActiveUser.userId&&n((0,t.default)(T.meta.nextActiveUser.userId,!1)),n(T),n((0,M.default)());let R=c().chat.chatMenuOpen,w=[...c().camUser.camUsers,...c().dialog.dialogs];!(r.default.visibleUser(w).length>0)&&R&&(0,d.default)()}],576642)},461156,693552,174937,534747,e=>{"use strict";var t=e.i(120786),i=e.i(92808),r=e.i(6282),a=e.i(71370),n=e.i(834302),s=e.i(591489),l=e.i(619012),o=e.i(619415);let d=function(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return(r,a)=>{let{camUser:{camUsers:d},dialog:{dialogs:u},sender:{roomTypes:c}}=a();if(o.default.isEvent(c))return r({type:l.SENDER_TYPING,payload:{event:!0,text:t,cursorPosition:i}});let h=n.default.get([...d,...u],e);
2if(!h)return;let p=t.length>0;n.default.isVisibleLivecamUser(h)&&r(e=>{let t=h.userId;h.notifiedTyping!==p&&(s.default.emit("isTyping",{userId:t,status:p}),e({type:l.MANAGEMENT_SENDER_TYPING,payload:{userId:t,status:p}}))}),r({type:l.SENDER_TYPING,payload:{event:!1,userId:e,text:t,cursorPosition:i}})}};e.s(["default",0,d],693552);var u=e.i(576642);let c=(e,t)=>(i,r)=>{let o,{sender:c,camUser:{camUsers:h},dialog:{dialogs:p}}=r(),v=[...h,...p],f=t?n.default.get(v,t):n.default.activeUser(v);if(!f)return;let m=(0,a.livecamMessagePlaceholder)(e,f);if(""===m)return;let _=(0,a.getSenderNameForUser)(f,c.logins),y={userId:f.userId,isAdmin:n.default.isAdmin(f),message:m};s.default.emit("livecamChatMessage",y,(o=s.default,e=>{if(e&&42===e.errorStatus)return o.log.debug("Userlist: UserID: ".concat(f.userId)),i((0,u.default)(f))})),i({type:l.MANAGEMENT_MESSAGE_SENDER_SEND,payload:{message:m,user:f,senderName:_}}),i(d(f.userId,""))};e.s(["default",0,c],174937);var h=e.i(546053),p=e.i(616488),v=e.i(928299),f=e.i(188802),m=e.i(662537),_=e.i(75333),y=e.i(231957),E=e.i(433109),g=e.i(600376);function b(e){return{type:l.VOICEMESSAGE_LOADING,payload:e}}e.s(["default",0,b],534747),e.s(["default",0,function(e,a,s){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,u=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;return async(M,O)=>{let A;if("string"!=typeof e&&"object"!=typeof e)return;let S="object"==typeof e&&e.id,I="object"!=typeof e&&e.trim(),T={};if(""===I&&!s&&!o&&!u&&"object"!=typeof e)return;let{user:{account:{nickname:N,messagingId:C}},dialog:{dialogs:R},camUser:{camUsers:w},chat:{selectedUser:D,chatMenuOpen:G,dialogmessages:P},attachments:{files:U,selectedAttachment:H},payttachments:{files:x}}=O();G&&M((0,g.default)());let L=async function(a,c,p,g){var I,T,N,R,D,G,H,L,j,z,W,F,Y,B,X,q,J,K,Q,Z,$,ee;let et=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},ei=(0,t._)({},c);if(k&&!ei.color){let e=w.find(e=>e.userId===g);!ei.partner&&n.default.hasPartner(e)&&(ei=(0,i._)((0,t._)({},ei),{partner:n.default.getPartner(e)})),ei=(0,i._)((0,t._)({},ei),{color:null==e?void 0:e.color})}try{g&&M(d(g,"")),A=JSON.parse(JSON.stringify(a)),P.length>0?A.id=P[P.length-1].id+.01:A.id=.01;let r=new Date;if(A.time=(0,v.getUnixTimestamp)(r),A.payload.resendId=S,o&&(A.payload.voiceData=o),(null==(I=A.payload)?void 0:I.type)==="payttachment"){let r=x.find(t=>t.id===s||!s&&t.id===e.payttachment_id);A.payload=(0,i._)((0,t._)({},A.payload),{payttachment:(0,t._)({},r)})}M({type:l.MESSAGE_CHAT_SEND,payload:(0,i._)((0,t._)({},A),{sender:C}),meta:{loading:!0,user:ei,senderName:p,selectedCamUserId:g}}),a.payload=(0,i._)((0,t._)({},a.payload),{temp_id:A.id});let n=await y.default.post("/message",a,{headers:et});if(a.id=null==n||null==(T=n.data[ei.partner])?void 0:T.id,a.time=null==n||null==(N=n.data[ei.partner])?void 0:N.time,a.sender=null==n||null==(R=n.data[ei.partner])?void 0:R.sender,(null==n||null==(D=n.data[V])?void 0:D.attachment)&&(a.attachment=null==n||null==(L=n.data[V])?void 0:L.attachment),(null==n||null==(H=n.data[V])||null==(G=H.payload)?void 0:G.type)==="payttachment"){let r=x.find(t=>t.id===s||!s&&t.id===e.payttachment_id);a.payload=(0,i._)((0,t._)({},a.payload),{payttachment:(0,t._)({},r)})}(null==o?void 0:o.id)&&(a.payload=(0,i._)((0,t._)({},a.payload),{voiceData:o})),a.payload=(0,i._)((0,t._)({},a.payload),{tempId:A.id}),M({type:l.MESSAGE_CHAT_SEND,payload:(0,i._)((0,t._)({},a),{sender:C}),meta:{user:ei,senderName:p,selectedCamUserId:g}}),M(b(!1))}catch(n){g&&M(d(g,""));let e=(0,f.createSerializableError)((null==n?void 0:n.message)||"Unknown error","CHAT_MESSAGE_ERROR",{originalError:null==n?void 0:n.toString()});if((null==n||null==(z=n.response)||null==(j=z.data)?void 0:j.xxx)&&(e=(0,f.createSerializableError)(null==(K=n.response.data.xxx[ei.userId])?void 0:K.error,"XXX_ERROR",{userId:ei.userId})),(null==n||null==(F=n.response)||null==(W=F.data[ei.userId])?void 0:W.error)&&(e=(0,f.createSerializableError)(null==(Q=n.response.data[ei.userId])?void 0:Q.error,"USER_ERROR",{userId:ei.userId})),(null==n||null==(B=n.response)||null==(Y=B.data)?void 0:Y.errors)&&(null==n||null==(q=n.response)||null==(X=q.data)?void 0:X.errors[0])&&(e=(0,f.createSeri
2alizableError)(null==n||null==($=n.response)||null==(Z=$.data)?void 0:Z.errors[0],"API_ERROR")),e.message===h.NO_EXISTING_CONVERSATION){let t=JSON.parse(JSON.stringify(k?O().chat.messages:O().chat.dialogmessages)),i=t.pop();(null==i||null==(ee=i.payload)?void 0:ee.type)!=="game.invitationTimeout"||t.find(e=>!e.payload.ibid)||(e={code:"GAME_TIMEOUT",message:h.NO_EXISTING_CONVERSATION_GAME_TIMEOUT})}if(A.attachment_id){let e=U.find(e=>e.id===A.attachment_id);e&&(A.attachment=(0,i._)((0,t._)({},e),{url:e.file}))}else A.payttachment_id&&(A.payload.payttachment=x.find(e=>e.id===A.payload.payttachment.id));u&&(A.payload=(0,i._)((0,t._)({},A.payload),{voiceMessageBlobStamp:u}));let a=e.message||e.code||"Unknown error";M({type:l.MESSAGE_CHAT_SEND,error:!0,id:A.id,message:A,payload:a,meta:{user:ei,senderName:p,stamp:(0,v.uuid)()}}),M(b(!1)),(null==n||null==(J=n.response)?void 0:J.status)===410&&E.default.dispatch((0,_.default)()),m.captureException(n),M((0,r.default)({location:"chatMessage",error:n})),console.log({postMessageError:n})}},V=D,k=!D.match(/@/g);if(a&&k){let e=n.default.visibleUser(w);for(let r=0;r<e.length;r++){let a=e[r];if([p.TYPE_AC_EU,p.TYPE_ACNG].includes(a.type)&&n.default.hasPartner(a)){let e=n.default.getPartner(a);L({recipients:[e],body:I,payload:{type:"message",lc_id:!0}},a=(0,i._)((0,t._)({},a),{partner:e}),N,a.userId)}else n.default.isDatingUser(a)&&M(c(I,a.userId))}return}if(k){let e=w.find(e=>e.userId===D);if(!e||!n.default.hasPartner(e))return;V=n.default.getPartner(e)}let j=R.find(e=>e.userId===V)||{},z=(null==e?void 0:e.recipients)?e:{recipients:[V],body:I,payload:{type:"message"}};if(u&&(z.payload=(0,i._)((0,t._)({},z.payload),{type:"voice"})),null==o?void 0:o.id){var W,F;z=(0,i._)((0,t._)({},z),{payload:(0,i._)((0,t._)({},z.payload),{type:"voice",id:o.id})});let e=null==(F=O().user)||null==(W=F.sonusToken)?void 0:W.token;e&&(T={"X-Token":e})}k&&(z=(0,i._)((0,t._)({},z),{lc_id:!0})),s?z=(0,i._)((0,t._)({},z),{payttachment_id:s,payload:(0,i._)((0,t._)({},z.payload),{type:"payttachment"})}):isNaN(H)||"object"==typeof e||(z=(0,i._)((0,t._)({},z),{attachment_id:parseInt(H,10)})),z.time&&(z=(0,i._)((0,t._)({},z),{time:null})),L(z,j,N,D,T)}}],461156)},493079,982599,e=>{"use strict";var t=e.i(503630),i=e.i(118896),r=e.i(619012);e.s(["default",0,(e,a)=>{if(e)return{type:r.MICROPHONE_VOICEMESSAGE_INIT,payload:{message:e.message,code:e.code},error:!0};if(!Array.isArray(a))return{type:r.MICROPHONE_VOICEMESSAGE_INIT,payload:Error(i.NO_ARRAY),error:!0};let n=t.microphoneService.serializeDeviceList(a);return{type:r.MICROPHONE_VOICEMESSAGE_INIT,payload:{microphones:n}}}],493079);var a=e.i(419769),n=e.i(388198);e.s(["default",0,()=>e=>{let t="".concat(n.default.secretHash(),":mics"),i=a.lStorage.getItem(t),s=null;i&&(s=n.default.run(i)),e({type:r.MICROPHONE_VOICEMESSAGE_UPDATE,payload:s})}],982599)},742077,e=>{"use strict";var t=e.i(928299),i=e.i(619012);e.s(["default",0,function(e){let r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return{type:i.PREFERENCES_ADD,payload:e,error:r,meta:r?{stamp:(0,t.uuid)()}:void 0}}])},103274,e=>{"use strict";var t=e.i(619012);e.s(["default",0,()=>({type:t.RESET_MICROPHONE})])}]); 3 4//# debugId=1167564e-12d3-c444-3f9e-693e6cc67a7b
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.