(self.webpackChunk_npwd_nui=self.webpackChunk_npwd_nui||[]).push([[1060],{384:function(e,t,n){var r={"./material/app/BANK":[52764,2764],"./material/app/BANK.tsx":[52764,2764],"./material/app/BROWSER":[54525,859],"./material/app/BROWSER.tsx":[54525,859],"./material/app/CALCULATOR":[73183,3183],"./material/app/CALCULATOR.tsx":[73183,3183],"./material/app/CAMERA":[99128,9128],"./material/app/CAMERA.tsx":[99128,9128],"./material/app/CONTACTS":[87440,7440],"./material/app/CONTACTS.tsx":[87440,7440],"./material/app/DARKCHAT":[77032,7032],"./material/app/DARKCHAT.tsx":[77032,7032],"./material/app/DIALER":[95938,5938],"./material/app/DIALER.tsx":[95938,5938],"./material/app/EMAIL":[88165,8165],"./material/app/EMAIL.tsx":[88165,8165],"./material/app/EXAMPLE":[27977,7977],"./material/app/EXAMPLE.tsx":[27977,7977],"./material/app/LOCATION":[32941,2941],"./material/app/LOCATION.tsx":[32941,2941],"./material/app/MARKETPLACE":[69241,9241],"./material/app/MARKETPLACE.tsx":[69241,9241],"./material/app/MATCH":[96554,6554],"./material/app/MATCH.tsx":[96554,6554],"./material/app/MESSAGES":[70659,659],"./material/app/MESSAGES.tsx":[70659,659],"./material/app/NOTES":[38267,8267],"./material/app/NOTES.tsx":[38267,8267],"./material/app/SETTINGS":[68269,8269],"./material/app/SETTINGS.tsx":[68269,8269],"./material/app/TWITTER":[18261,8261],"./material/app/TWITTER.tsx":[18261,8261],"./material/misc/StickyNote":[56898,6898],"./material/misc/StickyNote.tsx":[56898,6898],"./material/svg/BANK":[57569,7569],"./material/svg/BANK.tsx":[57569,7569],"./material/svg/BROWSER":[34460,4460],"./material/svg/BROWSER.tsx":[34460,4460],"./material/svg/CALCULATOR":[4194,4194],"./material/svg/CALCULATOR.tsx":[4194,4194],"./material/svg/CAMERA":[35693,5693],"./material/svg/CAMERA.tsx":[35693,5693],"./material/svg/CONTACTS":[82014,2014],"./material/svg/CONTACTS.tsx":[82014,2014],"./material/svg/DARKCHAT":[21909,1909],"./material/svg/DARKCHAT.tsx":[21909,1909],"./material/svg/DIALER":[4389,4389],"./material/svg/DIALER.tsx":[4389,4389],"./material/svg/EMAIL":[63446,3446],"./material/svg/EMAIL.tsx":[63446,3446],"./material/svg/EXAMPLE":[84088,4088],"./material/svg/EXAMPLE.tsx":[84088,4088],"./material/svg/LOCATION":[76662,6662],"./material/svg/LOCATION.tsx":[76662,6662],"./material/svg/MARKETPLACE":[51967,1967],"./material/svg/MARKETPLACE.tsx":[51967,1967],"./material/svg/MATCH":[28174,8174],"./material/svg/MATCH.tsx":[28174,8174],"./material/svg/MESSAGES":[74299,4299],"./material/svg/MESSAGES.tsx":[74299,4299],"./material/svg/NOTES":[23079,3079],"./material/svg/NOTES.tsx":[23079,3079],"./material/svg/SETTINGS":[48535,8535],"./material/svg/SETTINGS.tsx":[48535,8535],"./material/svg/TWITTER":[69264,9264],"./material/svg/TWITTER.tsx":[69264,9264],"./npwd_icons/app/BANK":[39365,9365],"./npwd_icons/app/BANK.tsx":[39365,9365],"./npwd_icons/app/BROWSER":[18691,8691],"./npwd_icons/app/BROWSER.tsx":[18691,8691],"./npwd_icons/app/CALCULATOR":[36401,6401],"./npwd_icons/app/CALCULATOR.tsx":[36401,6401],"./npwd_icons/app/CAMERA":[84985,4985],"./npwd_icons/app/CAMERA.tsx":[84985,4985],"./npwd_icons/app/CONTACTS":[61429,1429],"./npwd_icons/app/CONTACTS.tsx":[61429,1429],"./npwd_icons/app/DARKCHAT":[53197,3051],"./npwd_icons/app/DARKCHAT.tsx":[53197,3051],"./npwd_icons/app/DIALER":[60038,38],"./npwd_icons/app/DIALER.tsx":[60038,38],"./npwd_icons/app/EMAIL":[61247,1247],"./npwd_icons/app/EMAIL.tsx":[61247,1247],"./npwd_icons/app/EXAMPLE":[75047,5047],"./npwd_icons/app/EXAMPLE.tsx":[75047,5047],"./npwd_icons/app/LOCATION":[24670,4670],"./npwd_icons/app/LOCATION.tsx":[24670,4670],"./npwd_icons/app/MARKETPLACE":[68881,8881],"./npwd_icons/app/MARKETPLACE.tsx":[68881,8881],"./npwd_icons/app/MATCH":[52612,2612],"./npwd_icons/app/MATCH.tsx":[52612,2612],"./npwd_icons/app/MESSAGES":[78706,8706],"./npwd_icons/app/MESSAGES.tsx":[78706,8706],"./npwd_icons/app/NOTES":[96960,6960],"./npwd_icons/app/NOTES.tsx":[96960,6960],"./npwd_icons/app/SETTINGS":[4401,4401],"./npwd_icons/app/SETTINGS.tsx":[4401,4401],"./npwd_icons/app/TWITTER":[18,18],"./npwd_icons/app/TWITTER.tsx":[18,18],"./npwd_icons/svg/BANK":[86643,6643],"./npwd_icons/svg/BANK.tsx":[86643,6643],"./npwd_icons/svg/BROWSER":[38357,8357],"./npwd_icons/svg/BROWSER.tsx":[38357,8357],"./npwd_icons/svg/CALCULATOR":[53488,3098],"./npwd_icons/svg/CALCULATOR.tsx":[53488,3098],"./npwd_icons/svg/CAMERA":[97865,7865],"./npwd_icons/svg/CAMERA.tsx":[97865,7865],"./npwd_icons/svg/CONTACTS":[60208,208],"./npwd_icons/svg/CONTACTS.tsx":[60208,208],"./npwd_icons/svg/DIALER":[76717,6717],"./npwd_icons/svg/DIALER.tsx":[76717,6717],"./npwd_icons/svg/EMAIL":[18155,8155],"./npwd_icons/svg/EMAIL.tsx":[18155,8155],"./npwd_icons/svg/EXAMPLE":[89535,9535],"./npwd_icons/svg/EXAMPLE.tsx":[89535,9535],"./npwd_icons/svg/LOCATION":[38744,8744],"./npwd_icons/svg/LOCATION.tsx":[38744,8744],"./npwd_icons/svg/MATCH":[13821,3821],"./npwd_icons/svg/MATCH.tsx":[13821,3821],"./npwd_icons/svg/MESSAGES":[35495,5495],"./npwd_icons/svg/MESSAGES.tsx":[35495,5495],"./npwd_icons/svg/NOTES":[27929,7929],"./npwd_icons/svg/NOTES.tsx":[27929,7929],"./npwd_icons/svg/SELLOUT":[78788,8788],"./npwd_icons/svg/SELLOUT.tsx":[78788,8788],"./npwd_icons/svg/SETTINGS":[71982,1982],"./npwd_icons/svg/SETTINGS.tsx":[71982,1982],"./npwd_icons/svg/TWITTER":[16132,6132],"./npwd_icons/svg/TWITTER.tsx":[16132,6132]};function a(e){if(!n.o(r,e))return Promise.resolve().then((function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=r[e],a=t[0];return n.e(t[1]).then((function(){return n(a)}))}a.keys=function(){return Object.keys(r)},a.id=384,e.exports=a},93080:function(e,t,n){"use strict";var r=n(73344),a=n.n(r),o=n(81795),i=n.n(o)()(a());i.push([e.id,".PhoneWrapper {\n width: 100vw;\n height: 100vh;\n position: relative;\n}\n\n.Phone {\n position: absolute;\n right: 0;\n width: 500px;\n height: 1000px;\n background-size: cover;\n}\n\n.PhoneFrame {\n position: absolute;\n z-index: 999;\n width: 500px;\n height: 1000px;\n pointer-events: none;\n}\n\n.PhoneScreen {\n overflow: hidden;\n position: absolute;\n background-color: black;\n bottom: 100px;\n left: 50px;\n right: 50px;\n top: 100px;\n display: flex;\n flex-direction: column;\n background-position: center;\n background-size: cover;\n background-repeat: no-repeat;\n border-radius: 20px;\n}\n\n.PhoneAppContainer {\n height: 90%;\n width: 100%;\n display: flex;\n flex-direction: column;\n position: relative;\n}\n\n* {\n box-sizing: border-box;\n}\n*::-webkit-scrollbar-track {\n box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);\n background-color: #666;\n}\n*::-webkit-scrollbar {\n width: 3px;\n background-color: transparent;\n}\n*::-webkit-scrollbar-thumb {\n background-color: #f5f5f5;\n}\n\n.notistack-SnackbarContainer {\n position: absolute !important;\n top: 0 !important;\n}\n",""]),t.Z=i},24346:function(e,t,n){"use strict";var r=n(73344),a=n.n(r),o=n(81795),i=n.n(o)()(a());i.push([e.id,'/* 00acee is "twitter blue" and we want to use that to override\nsome of the Material UI primary theme settings */\n\n/* override buttons on the tweet modal */\n#twitter-app .MuiButton-containedPrimary {\n background: #00acee !important;\n}\n\n/* override the bottom navigation active color */\n#twitter-app .Mui-selected {\n color: #00acee !important;\n}\n/* override the FAB (action buttons) background when selected */\n#twitter-app .MuiFab-primary {\n background: #00acee !important;\n}\n\n/* override the labels on text fields */\n#twitter-app .MuiInputLabel-formControl.Mui-focused {\n color: #00acee !important;\n}\n\n/* override the underlines of text fields */\n#twitter-app .Mui-focused:after {\n border-bottom-color: #00acee !important;\n}\n\n/* override circular progress on the likes button */\n#twitter-app .MuiCircularProgress-colorPrimary {\n color: #00acee !important;\n}\n\n/* override circular progress on the report button */\n#twitter-report-progress {\n color: #00acee !important;\n}\n\n/*\noverride position of the snackbar so that it appears\nwithin the phone rather than on the game UI */\n#twitter-app .MuiSnackbar-root {\n position: absolute;\n}\n\n.emoji-mart {\n margin: 0px 15px 8px 15px !important;\n width: calc(100% - 30px) !important;\n}\n\n.emoji-mart-bar {\n display: none;\n}\n',""]),t.Z=i},72551:function(e,t,n){"use strict";var r=n(73344),a=n.n(r),o=n(81795),i=n.n(o)()(a());i.push([e.id,"@import url(https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap);"]),i.push([e.id,'/*\n! tailwindcss v3.2.7 | MIT License | https://tailwindcss.com\n*/\n\n/*\n1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)\n2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)\n*/\n\n*,\n::before,\n::after {\n box-sizing: border-box; /* 1 */\n border-width: 0; /* 2 */\n border-style: solid; /* 2 */\n border-color: #e5e7eb; /* 2 */\n}\n\n::before,\n::after {\n --tw-content: \'\';\n}\n\n/*\n1. Use a consistent sensible line-height in all browsers.\n2. Prevent adjustments of font size after orientation changes in iOS.\n3. Use a more readable tab size.\n4. Use the user\'s configured `sans` font-family by default.\n5. Use the user\'s configured `sans` font-feature-settings by default.\n*/\n\nhtml {\n line-height: 1.5; /* 1 */\n -webkit-text-size-adjust: 100%; /* 2 */ /* 3 */\n tab-size: 4; /* 3 */\n font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; /* 4 */\n -webkit-font-feature-settings: normal;\n font-feature-settings: normal; /* 5 */\n}\n\n/*\n1. Remove the margin in all browsers.\n2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.\n*/\n\nbody {\n margin: 0; /* 1 */\n line-height: inherit; /* 2 */\n}\n\n/*\n1. Add the correct height in Firefox.\n2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)\n3. Ensure horizontal rules are visible by default.\n*/\n\nhr {\n height: 0; /* 1 */\n color: inherit; /* 2 */\n border-top-width: 1px; /* 3 */\n}\n\n/*\nAdd the correct text decoration in Chrome, Edge, and Safari.\n*/\n\nabbr:where([title]) {\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n}\n\n/*\nRemove the default font size and weight for headings.\n*/\n\nh1,\nh2,\nh3,\nh4,\nh5,\nh6 {\n font-size: inherit;\n font-weight: inherit;\n}\n\n/*\nReset links to optimize for opt-in styling instead of opt-out.\n*/\n\na {\n color: inherit;\n text-decoration: inherit;\n}\n\n/*\nAdd the correct font weight in Edge and Safari.\n*/\n\nb,\nstrong {\n font-weight: bolder;\n}\n\n/*\n1. Use the user\'s configured `mono` font family by default.\n2. Correct the odd `em` font sizing in all browsers.\n*/\n\ncode,\nkbd,\nsamp,\npre {\n font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/*\nAdd the correct font size in all browsers.\n*/\n\nsmall {\n font-size: 80%;\n}\n\n/*\nPrevent `sub` and `sup` elements from affecting the line height in all browsers.\n*/\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsub {\n bottom: -0.25em;\n}\n\nsup {\n top: -0.5em;\n}\n\n/*\n1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)\n2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)\n3. Remove gaps between table borders by default.\n*/\n\ntable {\n text-indent: 0; /* 1 */\n border-color: inherit; /* 2 */\n border-collapse: collapse; /* 3 */\n}\n\n/*\n1. Change the font styles in all browsers.\n2. Remove the margin in Firefox and Safari.\n3. Remove default padding in all browsers.\n*/\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n font-family: inherit; /* 1 */\n font-size: 100%; /* 1 */\n font-weight: inherit; /* 1 */\n line-height: inherit; /* 1 */\n color: inherit; /* 1 */\n margin: 0; /* 2 */\n padding: 0; /* 3 */\n}\n\n/*\nRemove the inheritance of text transform in Edge and Firefox.\n*/\n\nbutton,\nselect {\n text-transform: none;\n}\n\n/*\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Remove default button styles.\n*/\n\nbutton,\n[type=\'button\'],\n[type=\'reset\'],\n[type=\'submit\'] {\n -webkit-appearance: button; /* 1 */\n background-color: transparent; /* 2 */\n background-image: none; /* 2 */\n}\n\n/*\nUse the modern Firefox focus style for all focusable elements.\n*/\n\n:-moz-focusring {\n outline: auto;\n}\n\n/*\nRemove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)\n*/\n\n:-moz-ui-invalid {\n box-shadow: none;\n}\n\n/*\nAdd the correct vertical alignment in Chrome and Firefox.\n*/\n\nprogress {\n vertical-align: baseline;\n}\n\n/*\nCorrect the cursor style of increment and decrement buttons in Safari.\n*/\n\n::-webkit-inner-spin-button,\n::-webkit-outer-spin-button {\n height: auto;\n}\n\n/*\n1. Correct the odd appearance in Chrome and Safari.\n2. Correct the outline style in Safari.\n*/\n\n[type=\'search\'] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n\n/*\nRemove the inner padding in Chrome and Safari on macOS.\n*/\n\n::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n/*\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Change font properties to `inherit` in Safari.\n*/\n\n::-webkit-file-upload-button {\n -webkit-appearance: button; /* 1 */\n font: inherit; /* 2 */\n}\n\n/*\nAdd the correct display in Chrome and Safari.\n*/\n\nsummary {\n display: list-item;\n}\n\n/*\nRemoves the default spacing and border for appropriate elements.\n*/\n\nblockquote,\ndl,\ndd,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\nhr,\nfigure,\np,\npre {\n margin: 0;\n}\n\nfieldset {\n margin: 0;\n padding: 0;\n}\n\nlegend {\n padding: 0;\n}\n\nol,\nul,\nmenu {\n list-style: none;\n margin: 0;\n padding: 0;\n}\n\n/*\nPrevent resizing textareas horizontally by default.\n*/\n\ntextarea {\n resize: vertical;\n}\n\n/*\n1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)\n2. Set the default placeholder color to the user\'s configured gray 400 color.\n*/\n\ninput::-webkit-input-placeholder, textarea::-webkit-input-placeholder {\n opacity: 1; /* 1 */\n color: #9ca3af; /* 2 */\n}\n\ninput::placeholder,\ntextarea::placeholder {\n opacity: 1; /* 1 */\n color: #9ca3af; /* 2 */\n}\n\n/*\nSet the default cursor for buttons.\n*/\n\nbutton,\n[role="button"] {\n cursor: pointer;\n}\n\n/*\nMake sure disabled buttons don\'t get the pointer cursor.\n*/\n\n:disabled {\n cursor: default;\n}\n\n/*\n1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)\n2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)\n This can trigger a poorly considered lint error in some tools but is included by design.\n*/\n\nimg,\nsvg,\nvideo,\ncanvas,\naudio,\niframe,\nembed,\nobject {\n display: block; /* 1 */\n vertical-align: middle; /* 2 */\n}\n\n/*\nConstrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)\n*/\n\nimg,\nvideo {\n max-width: 100%;\n height: auto;\n}\n\n/* Make elements with the HTML hidden attribute stay hidden by default */\n\n[hidden] {\n display: none;\n}\n\n*, ::before, ::after{\n --tw-border-spacing-x: 0;\n --tw-border-spacing-y: 0;\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgb(59 130 246 / 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n}\n\n::-webkit-backdrop{\n --tw-border-spacing-x: 0;\n --tw-border-spacing-y: 0;\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgb(59 130 246 / 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n}\n\n::backdrop{\n --tw-border-spacing-x: 0;\n --tw-border-spacing-y: 0;\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgb(59 130 246 / 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n}\n.container{\n width: 100%;\n}\n@media (min-width: 640px){\n\n .container{\n max-width: 640px;\n }\n}\n@media (min-width: 768px){\n\n .container{\n max-width: 768px;\n }\n}\n@media (min-width: 1024px){\n\n .container{\n max-width: 1024px;\n }\n}\n@media (min-width: 1280px){\n\n .container{\n max-width: 1280px;\n }\n}\n@media (min-width: 1536px){\n\n .container{\n max-width: 1536px;\n }\n}\n.\\!visible{\n visibility: visible !important;\n}\n.visible{\n visibility: visible;\n}\n.invisible{\n visibility: hidden;\n}\n.static{\n position: static;\n}\n.fixed{\n position: fixed;\n}\n.absolute{\n position: absolute;\n}\n.relative{\n position: relative;\n}\n.sticky{\n position: -webkit-sticky;\n position: sticky;\n}\n.inset-0{\n top: 0px;\n right: 0px;\n bottom: 0px;\n left: 0px;\n}\n.right-5{\n right: 1.25rem;\n}\n.top-0{\n top: 0px;\n}\n.top-5{\n top: 1.25rem;\n}\n.z-0{\n z-index: 0;\n}\n.z-10{\n z-index: 10;\n}\n.mx-auto{\n margin-left: auto;\n margin-right: auto;\n}\n.ml-4{\n margin-left: 1rem;\n}\n.mt-4{\n margin-top: 1rem;\n}\n.mt-6{\n margin-top: 1.5rem;\n}\n.mt-8{\n margin-top: 2rem;\n}\n.block{\n display: block;\n}\n.inline-block{\n display: inline-block;\n}\n.inline{\n display: inline;\n}\n.flex{\n display: flex;\n}\n.grid{\n display: grid;\n}\n.\\!contents{\n display: contents !important;\n}\n.contents{\n display: contents;\n}\n.hidden{\n display: none;\n}\n.h-14{\n height: 3.5rem;\n}\n.h-24{\n height: 6rem;\n}\n.h-5{\n height: 1.25rem;\n}\n.h-6{\n height: 1.5rem;\n}\n.h-full{\n height: 100%;\n}\n.w-24{\n width: 6rem;\n}\n.w-5{\n width: 1.25rem;\n}\n.w-6{\n width: 1.5rem;\n}\n.w-9\\/12{\n width: 75%;\n}\n.w-full{\n width: 100%;\n}\n.min-w-0{\n min-width: 0px;\n}\n.flex-1{\n flex: 1 1 0%;\n}\n.flex-auto{\n flex: 1 1 auto;\n}\n.shrink{\n flex-shrink: 1;\n}\n.grow{\n flex-grow: 1;\n}\n.transform{\n -webkit-transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.grid-cols-4{\n grid-template-columns: repeat(4, minmax(0, 1fr));\n}\n.flex-col{\n flex-direction: column;\n}\n.items-center{\n align-items: center;\n}\n.justify-start{\n justify-content: flex-start;\n}\n.justify-center{\n justify-content: center;\n}\n.justify-between{\n justify-content: space-between;\n}\n.gap-x-4{\n -webkit-column-gap: 1rem;\n column-gap: 1rem;\n}\n.space-x-2 > :not([hidden]) ~ :not([hidden]){\n --tw-space-x-reverse: 0;\n margin-right: calc(0.5rem * var(--tw-space-x-reverse));\n margin-left: calc(0.5rem * calc(1 - var(--tw-space-x-reverse)));\n}\n.space-x-3 > :not([hidden]) ~ :not([hidden]){\n --tw-space-x-reverse: 0;\n margin-right: calc(0.75rem * var(--tw-space-x-reverse));\n margin-left: calc(0.75rem * calc(1 - var(--tw-space-x-reverse)));\n}\n.space-y-4 > :not([hidden]) ~ :not([hidden]){\n --tw-space-y-reverse: 0;\n margin-top: calc(1rem * calc(1 - var(--tw-space-y-reverse)));\n margin-bottom: calc(1rem * var(--tw-space-y-reverse));\n}\n.divide-y > :not([hidden]) ~ :not([hidden]){\n --tw-divide-y-reverse: 0;\n border-top-width: calc(1px * calc(1 - var(--tw-divide-y-reverse)));\n border-bottom-width: calc(1px * var(--tw-divide-y-reverse));\n}\n.divide-neutral-200 > :not([hidden]) ~ :not([hidden]){\n --tw-divide-opacity: 1;\n border-color: rgb(229 229 229 / var(--tw-divide-opacity));\n}\n.overflow-y-auto{\n overflow-y: auto;\n}\n.break-all{\n word-break: break-all;\n}\n.rounded-full{\n border-radius: 9999px;\n}\n.rounded-md{\n border-radius: 0.375rem;\n}\n.border{\n border-width: 1px;\n}\n.border-b{\n border-bottom-width: 1px;\n}\n.border-t{\n border-top-width: 1px;\n}\n.border-gray-200{\n --tw-border-opacity: 1;\n border-color: rgb(229 231 235 / var(--tw-border-opacity));\n}\n.border-neutral-300{\n --tw-border-opacity: 1;\n border-color: rgb(212 212 212 / var(--tw-border-opacity));\n}\n.bg-blue-100{\n --tw-bg-opacity: 1;\n background-color: rgb(219 234 254 / var(--tw-bg-opacity));\n}\n.bg-neutral-100{\n --tw-bg-opacity: 1;\n background-color: rgb(245 245 245 / var(--tw-bg-opacity));\n}\n.bg-neutral-200{\n --tw-bg-opacity: 1;\n background-color: rgb(229 229 229 / var(--tw-bg-opacity));\n}\n.bg-neutral-50{\n --tw-bg-opacity: 1;\n background-color: rgb(250 250 250 / var(--tw-bg-opacity));\n}\n.bg-transparent{\n background-color: transparent;\n}\n.p-2{\n padding: 0.5rem;\n}\n.px-12{\n padding-left: 3rem;\n padding-right: 3rem;\n}\n.px-2{\n padding-left: 0.5rem;\n padding-right: 0.5rem;\n}\n.px-3{\n padding-left: 0.75rem;\n padding-right: 0.75rem;\n}\n.px-4{\n padding-left: 1rem;\n padding-right: 1rem;\n}\n.px-6{\n padding-left: 1.5rem;\n padding-right: 1.5rem;\n}\n.py-1{\n padding-top: 0.25rem;\n padding-bottom: 0.25rem;\n}\n.py-1\\.5{\n padding-top: 0.375rem;\n padding-bottom: 0.375rem;\n}\n.py-2{\n padding-top: 0.5rem;\n padding-bottom: 0.5rem;\n}\n.py-5{\n padding-top: 1.25rem;\n padding-bottom: 1.25rem;\n}\n.pt-4{\n padding-top: 1rem;\n}\n.text-center{\n text-align: center;\n}\n.text-4xl{\n font-size: 2.25rem;\n line-height: 2.5rem;\n}\n.text-base{\n font-size: 1rem;\n line-height: 1.5rem;\n}\n.text-sm{\n font-size: 0.875rem;\n line-height: 1.25rem;\n}\n.font-extrabold{\n font-weight: 800;\n}\n.font-medium{\n font-weight: 500;\n}\n.uppercase{\n text-transform: uppercase;\n}\n.lowercase{\n text-transform: lowercase;\n}\n.text-blue-800{\n --tw-text-opacity: 1;\n color: rgb(30 64 175 / var(--tw-text-opacity));\n}\n.text-gray-500{\n --tw-text-opacity: 1;\n color: rgb(107 114 128 / var(--tw-text-opacity));\n}\n.text-neutral-400{\n --tw-text-opacity: 1;\n color: rgb(163 163 163 / var(--tw-text-opacity));\n}\n.text-neutral-900{\n --tw-text-opacity: 1;\n color: rgb(23 23 23 / var(--tw-text-opacity));\n}\n.text-white{\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity));\n}\n.outline-none{\n outline: 2px solid transparent;\n outline-offset: 2px;\n}\n.blur{\n --tw-blur: blur(8px);\n -webkit-filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n}\n.\\!filter{\n -webkit-filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow) !important;\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow) !important;\n}\n.filter{\n -webkit-filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n}\n.transition{\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, -webkit-transform, -webkit-filter, -webkit-backdrop-filter;\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-transform, -webkit-filter, -webkit-backdrop-filter;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n.ease-in-out{\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n}\n\nbody {\n font-family: \'Inter\', sans-serif;\n font-size: 20px;\n margin: 0;\n padding: 0;\n width: 100vw;\n height: 100vh;\n overflow: hidden;\n}\n\ncode {\n font-family: \'Inter\', sans-serif;\n}\n\na,\na:visited,\na:hover,\na:active {\n text-decoration: none;\n}\n\n.hover\\:bg-blue-200:hover{\n --tw-bg-opacity: 1;\n background-color: rgb(191 219 254 / var(--tw-bg-opacity));\n}\n\n.hover\\:text-neutral-900:hover{\n --tw-text-opacity: 1;\n color: rgb(23 23 23 / var(--tw-text-opacity));\n}\n\n.focus\\:outline-none:focus{\n outline: 2px solid transparent;\n outline-offset: 2px;\n}\n\n.active\\:scale-95:active{\n --tw-scale-x: .95;\n --tw-scale-y: .95;\n -webkit-transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n\n.dark .dark\\:divide-neutral-800 > :not([hidden]) ~ :not([hidden]){\n --tw-divide-opacity: 1;\n border-color: rgb(38 38 38 / var(--tw-divide-opacity));\n}\n\n.dark .dark\\:border-none{\n border-style: none;\n}\n\n.dark .dark\\:border-neutral-700{\n --tw-border-opacity: 1;\n border-color: rgb(64 64 64 / var(--tw-border-opacity));\n}\n\n.dark .dark\\:bg-blue-100{\n --tw-bg-opacity: 1;\n background-color: rgb(219 234 254 / var(--tw-bg-opacity));\n}\n\n.dark .dark\\:bg-neutral-800{\n --tw-bg-opacity: 1;\n background-color: rgb(38 38 38 / var(--tw-bg-opacity));\n}\n\n.dark .dark\\:bg-neutral-900{\n --tw-bg-opacity: 1;\n background-color: rgb(23 23 23 / var(--tw-bg-opacity));\n}\n\n.dark .dark\\:bg-red-100{\n --tw-bg-opacity: 1;\n background-color: rgb(254 226 226 / var(--tw-bg-opacity));\n}\n\n.dark .dark\\:text-blue-800{\n --tw-text-opacity: 1;\n color: rgb(30 64 175 / var(--tw-text-opacity));\n}\n\n.dark .dark\\:text-neutral-100{\n --tw-text-opacity: 1;\n color: rgb(245 245 245 / var(--tw-text-opacity));\n}\n\n.dark .dark\\:text-neutral-300{\n --tw-text-opacity: 1;\n color: rgb(212 212 212 / var(--tw-text-opacity));\n}\n\n.dark .dark\\:text-neutral-400{\n --tw-text-opacity: 1;\n color: rgb(163 163 163 / var(--tw-text-opacity));\n}\n\n.dark .dark\\:text-red-800{\n --tw-text-opacity: 1;\n color: rgb(153 27 27 / var(--tw-text-opacity));\n}\n\n.dark .dark\\:hover\\:bg-neutral-700:hover{\n --tw-bg-opacity: 1;\n background-color: rgb(64 64 64 / var(--tw-bg-opacity));\n}\n\n.dark .dark\\:hover\\:bg-red-200:hover{\n --tw-bg-opacity: 1;\n background-color: rgb(254 202 202 / var(--tw-bg-opacity));\n}\n\n.dark .hover\\:dark\\:bg-neutral-800:hover{\n --tw-bg-opacity: 1;\n background-color: rgb(38 38 38 / var(--tw-bg-opacity));\n}\n\n.dark .hover\\:dark\\:bg-neutral-800\\/50:hover{\n background-color: rgb(38 38 38 / 0.5);\n}\n\n.dark .hover\\:dark\\:text-neutral-100:hover{\n --tw-text-opacity: 1;\n color: rgb(245 245 245 / var(--tw-text-opacity));\n}\n\n.dark .group:hover .dark\\:group-hover\\:text-neutral-100{\n --tw-text-opacity: 1;\n color: rgb(245 245 245 / var(--tw-text-opacity));\n}\n',""]),t.Z=i},23347:function(e,t,n){"use strict";n.d(t,{S:function(){return l},e:function(){return E}});var r=n(78121),a=n(46236),o=new r.Validator;o.addSchema({id:"/IconSetValue",type:"object",properties:{name:{type:"string"},custom:{type:"boolean"}},required:!0},"/IconSetValue"),o.addSchema({id:"/SettingOptionIconSet",type:"object",properties:{label:{type:"string"},value:{$ref:"/IconSetValue"}},required:!0},"/SettingOptionIconSet");var i={type:"object",properties:{callVolume:{type:"number",required:!0},iconSet:{$ref:"/SettingOptionIconSet",required:!0},language:{$ref:"/SettingOption",required:!0},wallpaper:{$ref:"/SettingOption",required:!0},frame:{$ref:"/SettingOption",required:!0},theme:{$ref:"/SettingOption",required:!0},zoom:{$ref:"/SettingOption",required:!0},streamerMode:{type:"boolean",required:!0},ringtone:{$ref:"/SettingOption",required:!0},notiSound:{$ref:"/SettingOption",required:!0},TWITTER_notiFilter:{$ref:"/SettingOption",required:!0},TWITTER_notiSound:{$ref:"/SettingOption",required:!0},TWITTER_notiSoundVol:{type:"number",required:!0},TWITTER_notifyNewFeedTweet:{type:"boolean",required:!0},MARKETPLACE_notifyNewListing:{type:"boolean",required:!0}}};function l(e){var t=JSON.parse(e);return o.validate(t,i).valid}function E(){var e=localStorage.getItem(a._);if(e)try{var t=JSON.parse(e);return o.validate(t,i).valid}catch(e){console.error("JSON eror encountered while parsing the NPWD localStorage JSON string, using default schema as a fall back.",e)}return!0}o.addSchema({id:"/SettingOption",type:"object",properties:{label:{type:"string"},val:{type:"string"}},required:!0},"/SettingOption")},71060:function(e,t,n){"use strict";n.r(t);var r=n(61250),a=n(53182),o=n.n(a),i=n(72367),l=n.n(i),E=n(72777),s=n(53993),c=n.n(s),u=n(37899),d=n.n(u),T=n(12334),A=n.n(T),p=n(1808),_=n.n(p),I=n(69808),S=n.n(I),f=n(79297),h=n.n(f),R=n(72551),O={};O.styleTagTransform=h(),O.setAttributes=_(),O.insert=A().bind(null,"head"),O.domAPI=d(),O.insertStyleElement=S(),c()(R.Z,O),R.Z&&R.Z.locals&&R.Z.locals;var m,C=n(1640),L=n(83001),N={visibility:(0,L.atom)({key:"phoneVisibility",default:!1}),resourceConfig:(0,L.atom)({key:"resourceConfig",default:null}),phoneTime:(0,L.atom)({key:"phoneTime",default:null}),isPhoneDisabled:(0,L.atom)({key:"isPhoneDisabled",default:!1}),playerSource:(0,L.atom)({key:"playerSource",default:0}),playerIdentifier:(0,L.atom)({key:"playerIdentifier",default:null}),extApps:(0,L.atom)({key:"phoneExtApps",default:[]})};!function(e){e.PLAY_ALERT="npwd:playAlert"}(m||(m={}));var v=n(9833),y=function(){return y=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},D=function(e,t,n){if(n||2===arguments.length)for(var r,a=0,o=t.length;a0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i}(x(),1)[0];return(0,a.useMemo)((function(){return(0,C.createTheme)(w[e.theme.value],G)}),[e.theme])},F=function(){return F=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},B=(0,a.createContext)(null),H=function(e){var t=e.children,n=U((0,a.useState)(!1),2),o=n[0],i=n[1],l=U((0,a.useState)(null),2),E=l[0],s=l[1];return(0,r.jsx)(B.Provider,F({value:{alert:E,addAlert:function(e){s(e),i(!0)},handleClose:function(){i(!1)},isOpen:o}},{children:t}))},W=n(93080),z={};z.styleTagTransform=h(),z.setAttributes=_(),z.insert=A().bind(null,"head"),z.domAPI=d(),z.insertStyleElement=S(),c()(W.Z,z),W.Z&&W.Z.locals&&W.Z.locals;var V,K,Y=n(94548),Z=n(47264),J=function(){return J=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i}((0,le.useTranslation)(),1)[0],c=ue({backgroundColor:o||ie.Z[50],color:i||ie.Z[400]});return(0,r.jsx)(se,ce({arrow:!0,title:s(n),placement:"top",classes:{tooltip:c.tooltip},TransitionComponent:C.Zoom},{children:(0,r.jsx)(C.Button,ce({disableTouchRipple:!0,disableRipple:!0,disableFocusRipple:!0,className:c.root},{children:(0,r.jsx)(C.Badge,ce({color:"error",badgeContent:null==E?void 0:E.badge,invisible:!E||E.badge<2},{children:a?(0,r.jsx)(a,{className:c.icon,fontSize:"large"}):(0,r.jsx)(C.Avatar,ce({className:c.avatar},{children:l||s(n)}))}))}))}),t)},Te=function(){return Te=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i}((0,le.useTranslation)(),1)[0];return(0,r.jsx)("div",Te({className:"px-4 py-2 pt-4 bg-neutral-100 dark:bg-neutral-900"},a,{children:(0,r.jsx)("h3",Te({className:"text-4xl font-extrabold text-neutral-900 dark:text-neutral-100"},{children:o(n)}))}))},pe=n(67973),_e=n(4942),Ie=(0,_e.styled)("div")({background:"black",opacity:"0.6",position:"absolute",top:0,left:0,right:0,bottom:0,zIndex:5}),Se=n(25877),fe=n(14540),he=n(18491),Re=function(){return Re=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},me=function(e,t,n){if(n||2===arguments.length)for(var r,a=0,o=t.length;a0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},tt=(0,Z.Z)((function(e){return{cover:{cursor:"pointer",backgroundColor:e.palette.background.default,color:e.palette.getContrastText(e.palette.background.default),visibility:function(e){return e.covered?"visible":"hidden"}}}})),nt=function(e){var t=e.children,n=et(x(),1)[0],o=et((0,a.useState)(!1),2),i=o[0],l=o[1],E=et((0,a.useState)(!1),2),s=E[0],c=E[1],u=et((0,le.useTranslation)(),1)[0],d=tt({covered:i});return(0,a.useEffect)((function(){!0===n.streamerMode&&l(!0),c(!0)}),[n.streamerMode]),(0,r.jsxs)(C.Box,$e({width:"100%",position:"relative"},{children:[(0,r.jsx)(C.Box,$e({onClick:function(){return l(!1)},className:d.cover,width:"100%",height:"100%",position:"absolute",display:"flex",alignItems:"center",justifyContent:"center",top:0,left:0},{children:u("GENERIC_CLICK_TO_REVEAL")})),(0,r.jsx)(C.Box,$e({width:"100%",height:"100%",visibility:s?"visible":"hidden"},{children:t}))]}))},rt=n(85602),at=n(23855),ot=(0,rt.ZP)("div")((function(e){var t=e.theme;return{position:"relative",borderRadius:t.shape.borderRadius,backgroundColor:(0,C.emphasize)(t.palette.background.paper,.21),"&:hover":{backgroundColor:(0,C.emphasize)(t.palette.background.paper,.28)},marginLeft:t.spacing(1),width:"auto"}})),it=(0,rt.ZP)("div")((function(e){return{padding:e.theme.spacing(0,.7),height:"100%",position:"absolute",pointerEvents:"none",display:"flex",alignItems:"center",justifyContent:"center"}})),lt=(0,rt.ZP)(He)((function(e){var t=e.theme;return{fontWeight:400,fontSize:18,border:"1px solid",borderColor:t.palette.divider,"& .MuiInputBase-input":{padding:t.spacing(1,4,1,4),transition:t.transitions.create(["width","border"]),width:"16ch","&:focus":{width:"24ch",borderLeft:"2px solid ".concat(t.palette.primary.main," ")}}}})),Et=(0,rt.ZP)(C.Paper)((function(e){return e.theme,{display:"flex",height:"60px",justifyContent:"center",alignItems:"center"}})),st={onChange:function(){},value:"",placeholder:"Search..."},ct=function(e){var t=void 0===e?st:e,n=t.value,a=t.onChange,o=t.placeholder;return(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(Et,{children:(0,r.jsxs)(ot,{children:[(0,r.jsx)(it,{children:(0,r.jsx)(at.Z,{})}),(0,r.jsx)(lt,{value:n,onChange:a,placeholder:o,inputProps:{"aria-label":"search"}})]})})})},ut=function(){return ut=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i}(Ot(),2),t=e[0],n=e[1],r=yt(),o=(0,a.useCallback)((function(e){(0,v.Z)(K.INITIALIZE_CALL,{receiverNumber:e}).then((function(e){"ok"===e.status||console.error(e.errorMsg)}))}),[]),i=(0,a.useCallback)((function(){(0,v.Z)(K.ACCEPT_CALL,{transmitterNumber:t.transmitter})}),[t]),l=(0,a.useCallback)((function(){(0,v.Z)(K.REJECTED,{transmitterNumber:t.transmitter})}),[t]),E=(0,a.useCallback)((function(){(0,v.Z)(K.END_CALL,{transmitterNumber:t.transmitter,isUnavailable:t.isUnavailable,isTransmitter:t.transmitter===r})}),[t,r]),s=(0,a.useCallback)((function(e){(0,v.Z)(K.TOGGLE_MUTE_CALL,{call:t,state:e})}),[t]);return{call:t,setCall:n,acceptCall:i,rejectCall:l,endCall:E,initializeCall:o,muteCall:s}},Dt=function(){return Dt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i}((0,a.useState)(0),2),l=i[0],E=i[1],s=function(){o.current&&(clearInterval(o.current),o.current=void 0)},c=function(){o.current||(o.current=setInterval((function(){return E((function(e){return e+1}))}),1e3))};return(0,a.useEffect)((function(){return c(),s}),[]),Dt(Dt({},(e=l,t=Math.ceil(e),n=Math.floor(t%86400/3600),r=Math.floor(t%3600/60),{seconds:Math.floor(t%60),minutes:r,hours:n})),{startTimer:c,resetTimer:function(){s()}})},bt=function(){return bt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i}((0,L.useRecoilState)(Rt.callModal),2);return{modal:e[0],setModal:e[1]}},jt=n(98186),Ft=n(93609),Ut=function(){return Ut=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i}((0,a.useState)(!1),2),p=A[0],_=A[1];return(null==s?void 0:s.is_accepted)||(null==s?void 0:s.isTransmitter)?(0,r.jsxs)(C.Box,Ut({display:"flex",justifyContent:(null==s?void 0:s.is_accepted)?"space-between":"center",px:2,my:2},{children:[(0,r.jsx)(_t,Ut({color:"error",size:t?"small":"medium",onClick:function(e){e.stopPropagation(),i(!1),c()},className:t?n.smallIconWrapper:n.iconWrapper},{children:(0,r.jsx)(wt.Z,{className:n.icon})})),(null==s?void 0:s.is_accepted)&&(0,r.jsx)(_t,Ut({color:p?"error":"success",size:t?"small":"medium",onClick:function(){_((function(e){return!e})),T(!p)},className:t?n.smallIconWrapper:n.iconWrapper},{children:p?(0,r.jsx)(jt.Z,{className:n.icon}):(0,r.jsx)(Ft.Z,{className:n.icon})}))]})):(0,r.jsxs)(C.Box,Ut({display:"flex",alignItems:"center",justifyContent:"space-between",px:2,my:2},{children:[(0,r.jsx)(_t,Ut({color:"error",size:t?"small":"medium",onClick:function(e){e.stopPropagation(),i(!1),d()},className:t?n.smallIconWrapper:n.iconWrapper},{children:(0,r.jsx)(wt.Z,{className:n.icon})})),(0,r.jsx)(_t,Ut({color:"success",size:t?"small":"medium",onClick:function(e){e.stopPropagation(),o.push("/call"),u()},className:t?n.smallIconWrapper:n.iconWrapper},{children:(0,r.jsx)(kt.Z,{className:n.icon})}))]}))};!function(e){e.ADD_FAILED="CONTACT.FEEDBACK.ADD_FAILED",e.UPDATE_FAILED="CONTACT.FEEDBACK.UPDATE_FAILED",e.INVALID_HOST="GENERIC_INVALID_IMAGE_HOST"}(Ct||(Ct={})),function(e){e[e.avatar=255]="avatar",e[e.number=20]="number",e[e.display=255]="display"}(Lt||(Lt={})),function(e){e.PAY_CONTACT="npwd-contact-pay",e.GET_CONTACTS="npwd-contact-getAll",e.ADD_CONTACT="npwd-contact-add",e.UPDATE_CONTACT="npwd:updateContact",e.DELETE_CONTACT="npwd:deleteContact",e.ADD_CONTACT_EXPORT="npwd:addContactExport"}(Nt||(Nt={}));var Wt,zt=n(98105),Vt=[{id:1,display:"Rocko",number:"555-15196"},{id:2,display:"Taso",number:"215-8139",avatar:"http://i.tasoagc.dev/i9Ig"},{id:3,display:"Chip",number:"603-275-8373",avatar:"http://i.tasoagc.dev/2QYV"},{id:4,display:"Avarian",number:"444-4444"}],Kt=(0,L.atom)({key:"contactsList",default:(0,L.selector)({key:"contactsListDefault",get:function(){return e=void 0,t=void 0,r=function(){var e,t;return function(e,t){var n,r,a,o,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return o={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function l(l){return function(E){return function(l){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,l[0]&&(i=0)),i;)try{if(n=1,r&&(a=2&l[0]?r.return:l[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,l[1])).done)return a;switch(r=0,a&&(l=[2&l[0],a.value]),l[0]){case 0:case 1:a=l;break;case 4:return i.label++,{value:l[1],done:!1};case 5:i.label++,r=l[1],l=[0];continue;case 7:l=i.ops.pop(),i.trys.pop();continue;default:if(!((a=(a=i.trys).length>0&&a[a.length-1])||6!==l[0]&&2!==l[0])){i=0;continue}if(3===l[0]&&(!a||l[1]>a[0]&&l[1]0&&a[a.length-1])||6!==l[0]&&2!==l[0])){i=0;continue}if(3===l[0]&&(!a||l[1]>a[0]&&l[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(o),i=r.next();!i.done;i=r.next()){var l=i.value;if(a.test(l.display)&&e.conversationList.includes(l.number))return!0}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}return a.test(e.label)}))}}),messages:(0,L.atom)({key:"messages",default:[]}),activeMessageConversation:(0,L.atom)({key:"activeMessageGroup",default:null}),showNewMessageGroup:(0,L.atom)({key:"showNewMessageGroup",default:!1}),createMessageGroupResult:(0,L.atom)({key:"createMessageGroupResult",default:null}),imageModal:(0,L.atom)({key:"useImageModal",default:!1}),unreadMessagesCount:(0,L.atom)({key:"unreadMessagesCount",default:0}),selectedMessage:(0,L.atom)({key:"selectedMessage",default:null}),checkedConversations:(0,L.atom)({key:"checkedConversation",default:[]}),isEditing:(0,L.atom)({key:"messageIsEditing",default:!1})},rn=function(){return(0,L.useSetRecoilState)(nn.messages)},an=function(){return(0,L.useRecoilValue)(nn.activeMessageConversation)},on=function(){return(0,L.useRecoilValue)(tn)},ln=function(){return(0,L.useRecoilState)(nn.isEditing)},En=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},sn=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,a,o=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},cn=function(e,t,n){if(n||2===arguments.length)for(var r,a=0,o=t.length;a0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i}((0,le.useTranslation)(),1)[0],t=gt().call,n=un(),a=n.getDisplayByNumber,o=n.getPictureByNumber,i=function(){return t.isTransmitter?a(null==t?void 0:t.receiver):a(null==t?void 0:t.transmitter)};return(0,r.jsxs)(C.Box,dn({display:"flex",alignItems:"center"},{children:[(0,r.jsxs)(C.Box,dn({flexGrow:1,overflow:"hidden",textOverflow:"ellipsis"},{children:[(0,r.jsx)(C.Typography,dn({variant:"body1"},{children:t.isTransmitter?e("CALLS.MESSAGES.OUTGOING").toUpperCase():e("CALLS.MESSAGES.INCOMING").toUpperCase()})),(0,r.jsx)(C.Typography,dn({variant:"h4"},{children:i()}))]})),(0,r.jsx)(C.Avatar,{sx:{ml:1,height:80,width:80},alt:i(),src:t.isTransmitter?o(t.receiver):o(null==t?void 0:t.transmitter)})]}))},An=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,a,o=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},pn=function(){var e=An((0,le.useTranslation)(),1)[0],t=An((0,a.useState)(e("CALLS.MESSAGES.RINGING")),2),n=t[0],o=t[1],i=An((0,a.useState)(0),2),l=i[0],E=i[1];return(0,a.useEffect)((function(){var t=setInterval((function(){l<3?(E(l+1),o(n+".")):(o(e("CALLS.MESSAGES.RINGING")),E(0))}),500);return function(){return clearInterval(t)}}),[l,n,e]),(0,r.jsx)(C.Typography,{children:n})},_n=n(84782),In=function(){var e,t=k();return function(e){var t,n,r=_n.wallpapers;try{for(var a=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(r),o=a.next();!o.done;o=a.next())if(o.value.value===e)return!0}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}}(t.wallpaper.value)?"url(".concat((e=t.wallpaper.value,"media/backgrounds/".concat(e)),")"):"url(".concat(t.wallpaper.value,")")},Sn=function(){return Sn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&a[a.length-1])||6!==l[0]&&2!==l[0])){i=0;continue}if(3===l[0]&&(!a||l[1]>a[0]&&l[1]0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i}((0,le.useTranslation)(),1)[0],u=(0,C.useTheme)(),d=function(e){n(e)},T=(0,a.useCallback)((function(e){return l.length?t(e):e}),[l,t]);return(null==o?void 0:o.length)?(0,r.jsx)(fe.a,jn({disablePadding:!0},{children:o.map((function(t){return t.transmitter===e?(0,r.jsxs)(he.H,jn({divider:!0},{children:[(0,r.jsx)(C.ListItemIcon,{children:(0,r.jsx)(Dn.Z,{className:i.callForward})}),(0,r.jsx)(C.ListItemText,{primary:T(t.receiver),secondary:(0,r.jsx)(C.Typography,jn({style:{color:u.palette.text.secondary}},{children:xn()().to(xn().unix(parseInt(t.start)))})),primaryTypographyProps:{overflow:"hidden",textOverflow:"ellipsis",color:u.palette.text.primary}}),(0,r.jsx)(C.IconButton,jn({onClick:function(){return d(t.receiver)},size:"large"},{children:(0,r.jsx)(Pn.Z,{})})),T(t.receiver)===t.receiver&&(0,r.jsx)(C.IconButton,jn({onClick:function(){return s.push("/contacts/-1?addNumber=".concat(t.receiver,"&referal=/phone/contacts"))},size:"large"},{children:(0,r.jsx)(bn.Z,{})}))]}),t.id):(0,r.jsxs)(he.H,jn({divider:!0},{children:[(0,r.jsx)(C.ListItemIcon,{children:(0,r.jsx)(gn.Z,{className:i.callBack})}),(0,r.jsx)(C.ListItemText,{primary:T(t.transmitter),secondary:(0,r.jsx)(C.Typography,jn({style:{color:u.palette.text.secondary}},{children:xn()().to(xn().unix(parseInt(t.start)))})),primaryTypographyProps:{overflow:"hidden",textOverflow:"ellipsis",color:u.palette.text.primary}}),(0,r.jsx)(C.IconButton,jn({onClick:function(){return d(t.transmitter)},size:"large"},{children:(0,r.jsx)(Pn.Z,{})})),T(t.transmitter)===t.transmitter&&(0,r.jsx)(C.IconButton,jn({onClick:function(){return s.push("/contacts/-1?addNumber=".concat(t.transmitter,"&referal=/phone/contacts"))},size:"large"},{children:(0,r.jsx)(bn.Z,{})}))]}),t.id)}))})):(0,r.jsx)(C.Box,jn({display:"flex",justifyContent:"center",alignItems:"center",paddingTop:35},{children:(0,r.jsxs)("p",{children:[(0,r.jsx)(C.Typography,jn({style:{color:u.palette.text.primary}},{children:c("DIALER.NO_HISTORY")})),(0,r.jsx)("span",jn({role:"img","aria-label":"sad"},{children:"😞"}))]})}))},Bn=(0,a.createContext)(null),Hn=function(){return Hn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i}((0,le.useTranslation)(),1)[0],o=gt().initializeCall,i=(0,a.useContext)(Bn),l=i.inputVal,s=i.set;return(0,r.jsxs)(C.Box,Kn({component:C.Paper,className:e.root},{children:[(0,r.jsx)(He,{placeholder:n("DIALER.INPUT_PLACEHOLDER"),className:e.input,value:l,onChange:function(e){return s(e.target.value)}}),(0,r.jsx)(C.IconButton,Kn({color:"primary",className:e.iconBtn,disabled:l<="",onClick:function(){o(l)},size:"large"},{children:(0,r.jsx)(Pn.Z,{fontSize:"large"})})),(0,r.jsx)(C.IconButton,Kn({className:e.iconBtn,onClick:function(){return e=l,void t.push("/contacts/-1/?addNumber=".concat(e,"&referal=/phone/contacts"));var e},onMouseUp:function(){Ue(!1)},size:"large"},{children:(0,r.jsx)(bn.Z,{fontSize:"large"})}))]}))},Jn=n(57637),qn=n.n(Jn),Xn=function(){return Xn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i}((0,a.useState)(t||""),2),o=n[0],i=n[1];return(0,r.jsx)("div",$n({className:e.root},{children:(0,r.jsxs)(Bn.Provider,$n({value:{inputVal:o,add:function(e){return i(o+e)},removeOne:function(){return i(o.slice(0,-1))},clear:function(){return i("")},set:function(e){return i(e)}}},{children:[(0,r.jsx)(Zn,{}),(0,r.jsx)(Vn,{})]}))}))},nr=n(3424),rr=n(89351),ar=function(){return ar=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},ir=(0,Z.Z)((function(e){return{root:{width:"100%",backgroundColor:e.palette.background.paper},icon:{color:e.palette.primary.main}}})),lr=function(){var e=ir(),t=(0,E.useLocation)().pathname,n=or((0,a.useState)(t),2),o=n[0],i=n[1],l=or((0,le.useTranslation)(),1)[0];return(0,r.jsxs)(C.BottomNavigation,ar({value:o,onChange:function(e,t){i(t)},showLabels:!0,className:e.root},{children:[(0,r.jsx)(C.BottomNavigationAction,{label:l("DIALER.NAVBAR_HISTORY"),value:"/phone",component:E.NavLink,icon:(0,r.jsx)(rr.Z,{}),to:"/phone"}),(0,r.jsx)(C.BottomNavigationAction,{label:l("DIALER.NAVBAR_DIAL"),value:"/phone/dial",color:"secondary",component:E.NavLink,icon:(0,r.jsx)(Pn.Z,{}),to:"/phone/dial"}),(0,r.jsx)(C.BottomNavigationAction,{label:l("DIALER.NAVBAR_CONTACTS"),value:"/phone/contacts",color:"secondary",component:E.NavLink,icon:(0,r.jsx)(nr.Z,{}),to:"/phone/contacts"})]}))},Er=function(e,t){void 0===t&&(t=100);var n=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,a,o=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i}((0,a.useState)(e),2),r=n[0],o=n[1];return(0,a.useEffect)((function(){var n=setTimeout((function(){o(e)}),t);return function(){clearTimeout(n)}}),[e,t]),r},sr=function(){return sr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},ur=function(){var e=cr((0,le.useTranslation)(),1)[0],t=(0,L.useSetRecoilState)(Zt),n=cr((0,a.useState)(""),2),o=n[0],i=n[1],l=Er(o,500);return(0,a.useEffect)((function(){t(l)}),[l,t]),(0,r.jsx)("div",sr({className:"w-full py-2 px-4"},{children:(0,r.jsx)(Ve,{onChange:function(e){return i(e.target.value)},placeholder:e("CONTACTS.PLACEHOLDER_SEARCH_CONTACTS"),value:o})}))},dr=function(){return dr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i}((0,L.useRecoilValue)((0,L.waitForAll)([nn.activeMessageConversation])),1)[0],i=(0,L.useSetRecoilState)(tn),l=(0,L.useSetRecoilState)(nn.activeMessageConversation),s=(0,a.useCallback)((function(e){if("hasValue"===n&&r.length)return r&&r.find((function(t){return t.id===e}))}),[r,n]),c=(0,a.useCallback)((function(e){var t=s(e);return l(t),t}),[l,s]),u=(0,a.useCallback)((function(t){(null==t?void 0:t.id)&&e&&(i(t.id),e.push("/messages/conversations/".concat(t.id.toString())))}),[i,e]);return{activeMessageConversation:o,setActiveMessageConversation:c,getMessageConversationById:s,goToConversation:u,conversations:r}},mr=function(){return(0,a.useContext)(B)},Cr=function(){var e=mr().addAlert,t=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,a,o=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i}((0,le.useTranslation)(),1)[0],n=un(),r=n.addLocalContact,o=n.updateLocalContact,i=n.deleteLocalContact,l=(0,E.useHistory)(),s=(0,a.useCallback)((function(n){var r=n.number,a=n.amount;(0,v.Z)(Nt.PAY_CONTACT,{number:r,amount:a}).then((function(n){if("ok"!==n.status)return e({message:t("CONTACTS.FEEDBACK.PAYMENTFAILED"),type:"error"});e({message:t("CONTACTS.FEEDBACK.PAYMENTSENT"),type:"success"})}))}),[e,t]);return{addNewContact:(0,a.useCallback)((function(n,a){var o=n.display,i=n.number,E=n.avatar;(0,v.Z)(Nt.ADD_CONTACT,{display:o,number:i,avatar:E}).then((function(n){if("ok"!==n.status)return e({message:t(n.errorMsg),type:"error"});r(n.data),e({message:t("CONTACTS.FEEDBACK.ADD_SUCCESS"),type:"success"}),l.replace(a)}))}),[e,r,l,t]),updateContact:(0,a.useCallback)((function(n){var r=n.id,a=n.display,i=n.number,E=n.avatar;(0,v.Z)(Nt.UPDATE_CONTACT,{id:r,display:a,number:i,avatar:E}).then((function(n){if("ok"!==n.status)return e({message:t(n.errorMsg),type:"error"});o({id:r,display:a,number:i,avatar:E}),e({message:t("CONTACTS.FEEDBACK.UPDATE_SUCCESS"),type:"success"}),l.goBack()}))}),[e,l,t,o]),deleteContact:(0,a.useCallback)((function(n){var r=n.id;(0,v.Z)(Nt.DELETE_CONTACT,{id:r}).then((function(n){if("ok"!==n.status)return e({message:t("CONTACTS.FEEDBACK.DELETE_FAILED"),type:"error"});l.goBack(),i(r),e({message:t("CONTACTS.FEEDBACK.DELETE_SUCCESS"),type:"success"})}))}),[e,i,l,t]),payContact:s}},Lr=n(34063),Nr=function(){return Nr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},yr=function(e){var t=e.open,n=e.closeModal,o=e.openContact,i=Cr().payContact,l=vr((0,le.useTranslation)(),1)[0],E=vr((0,a.useState)(500),2),s=E[0],c=E[1];return(0,r.jsx)(Je,Nr({visible:t,handleClose:n},{children:(0,r.jsx)(Lr.TabContext,Nr({value:"1"},{children:(0,r.jsxs)(Lr.TabPanel,Nr({value:"1"},{children:[(0,r.jsx)(C.Typography,{children:l("CONTACTS.SENDMONEY")}),(0,r.jsx)(C.Box,Nr({mt:2,mb:2},{children:(0,r.jsxs)(C.Box,Nr({display:"flex",flexDirection:"column",alignItems:"flex-start",gap:2},{children:[(0,r.jsx)(Be,{placeholder:l("CONTACTS.AMOUNT"),value:s,onChange:function(e){var t=e.currentTarget.value;c(parseInt(t))}}),(0,r.jsx)(Se.z,Nr({onClick:function(){s&&s>0&&(n(),i({number:o,amount:s}))},variant:"outlined",color:"primary"},{children:l("GENERIC.SEND")}))]}))}))]}))}))}))},gr=function(){var e=(0,L.useRecoilValue)(N.visibility),t=(0,L.useRecoilValue)(N.resourceConfig),n=Rn().removeAlerts;return{ResourceConfig:t,closePhone:function(){n(),(0,v.Z)(xe.LO.CLOSE_PHONE,void 0,{}).catch()},openPhone:function(){(0,v.Z)(xe.LO.OPEN_PHONE,void 0,{}).catch()},isPhoneOpen:e}},Dr=function(){return Dr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},br=(0,Z.Z)({root:{height:"100%",width:"100%"},listContainer:{marginTop:30,width:"75%",margin:"0 auto",textAlign:"center"},avatar:{margin:"auto",height:"125px",width:"124px",marginBottom:29},input:{marginBottom:20,margin:"auto",textAlign:"center"},inputProps:{fontSize:22},button:{color:"#000000",backgroundColor:"#838383","&:hover":{backgroundColor:"#6a6a6a"}}}),Mr=function(){var e,t,n,o,i,l=br(),s=(0,E.useHistory)(),c=(0,E.useParams)().id,u=Qn({referal:"/contacts"}),d=u.addNumber,T=u.referal,A=u.avatar,p=u.name,_=function(){var e=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,a,o=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i}((0,L.useRecoilState)(Yt),2);return{contactPayModal:e[0],setContactPayModal:e[1]}}(),I=_.contactPayModal,S=_.setContactPayModal,f=un(),h=f.getContact,R=f.findExistingConversation,O=Cr(),m=O.updateContact,C=O.addNewContact,N=O.deleteContact,v=gt().initializeCall,y=yt(),g=Or().goToConversation,D=h(parseInt(c)),P=Pr((0,a.useState)(null!==(e=null==D?void 0:D.display)&&void 0!==e?e:""),2),b=P[0],M=P[1],x=Pr((0,a.useState)(null!==(t=null==D?void 0:D.number)&&void 0!==t?t:""),2),k=x[0],w=x[1],G=Pr((0,a.useState)(null!==(n=null==D?void 0:D.avatar)&&void 0!==n?n:""),2),j=G[0],F=G[1],U=Pr((0,le.useTranslation)(),1)[0],B=gr().ResourceConfig;return(0,a.useEffect)((function(){d&&w(d),A&&F(A),p&&M(p)}),[d,j,A,p]),B?(0,r.jsxs)("div",Dr({className:"mx-auto h-full w-full"},{children:[(0,r.jsx)(yr,{open:I,closeModal:function(){return S(!1)},openContact:k}),(0,r.jsx)("button",Dr({onClick:function(){return s.goBack()},className:"mt-4 ml-4 rounded-md px-3 py-1 hover:dark:bg-neutral-800"},{children:(0,r.jsx)(Ge.ArrowLeft,{className:"h-6 w-6 dark:text-neutral-300"})})),(0,r.jsxs)("div",Dr({className:"mx-auto w-9/12"},{children:[(0,r.jsx)("div",{children:(0,r.jsx)("img",{src:j,className:"mx-auto h-24 w-24 rounded-full text-center"})}),(0,r.jsxs)("div",Dr({className:"mt-8"},{children:[(0,r.jsx)("div",Dr({className:"text-sm font-medium dark:text-neutral-400"},{children:U("CONTACTS.FORM_NAME")})),(0,r.jsx)(ze,{value:b,onChange:function(e){e.currentTarget.value.length!==Lt.display&&M(e.target.value)}})]})),D&&(0,r.jsxs)("div",Dr({className:"mt-4 grid w-full grid-cols-4 gap-x-4"},{children:[(0,r.jsx)("button",Dr({onClick:function(){var e=k.toString();(0,kn.Z)({action:"Routing to Message",level:1,data:{phoneNumber:e}});var t=R(y,e);if(t)return g(t);s.push("/messages/new?phoneNumber=".concat(e))},className:"group flex items-center justify-center rounded-md py-2 dark:bg-neutral-800 dark:hover:bg-neutral-700"},{children:(0,r.jsx)(Ge.MessageCircle,{className:"h-6 w-6 dark:text-neutral-400 dark:group-hover:text-neutral-100"})})),(0,r.jsx)("button",Dr({onClick:function(){(0,kn.Z)({action:"Emitting `Start Call` to Scripts",level:2,data:!0}),v(k.toString())},className:"group flex items-center justify-center rounded-md py-2 dark:bg-neutral-800 dark:hover:bg-neutral-700"},{children:(0,r.jsx)(Ge.Phone,{className:"h-6 w-6 dark:text-neutral-400 dark:group-hover:text-neutral-100"})})),(null===(o=null==B?void 0:B.general)||void 0===o?void 0:o.useResourceIntegration)&&(null===(i=null==B?void 0:B.contacts)||void 0===i?void 0:i.frameworkPay)&&(0,r.jsx)("button",Dr({onClick:function(){var e,t;(null===(e=null==B?void 0:B.general)||void 0===e?void 0:e.useResourceIntegration)&&(null===(t=null==B?void 0:B.contacts)||void 0===t?void 0:t.frameworkPay)&&S(!0)},className:"group flex items-center justify-center rounded-md py-2 dark:bg-neutral-800 dark:hover:bg-neutral-700"},{children:(0,r.jsx)(Ge.HelpingHand,{className:"h-6 w-6 dark:text-neutral-400 dark:group-hover:text-neutral-100"})})),(0,r.jsx)("button",Dr({onClick:function(){N({id:D.id})},className:"group flex items-center justify-center rounded-md py-2 dark:bg-red-100 dark:hover:bg-red-200"},{children:(0,r.jsx)(Ge.Trash2,{className:"h-6 w-6 dark:text-red-800"})}))]})),(0,r.jsxs)("div",Dr({className:"mt-8 space-y-4"},{children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("div",Dr({className:"text-sm font-medium dark:text-neutral-400"},{children:U("CONTACTS.FORM_NUMBER")})),(0,r.jsx)(ze,{value:k,onChange:function(e){e.currentTarget.value.length!==Lt.number&&w(e.target.value)}})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("div",Dr({className:"text-sm font-medium dark:text-neutral-400"},{children:U("CONTACTS.FORM_AVATAR")})),(0,r.jsx)(ze,{value:j,onChange:function(e){e.currentTarget.value.length!==Lt.avatar&&F(e.target.value)}})]})]})),(0,r.jsx)("div",Dr({className:"mt-8"},{children:D?(0,r.jsx)(Se.D,Dr({onClick:function(){m({id:D.id,number:k,avatar:j,display:b})},className:l.button},{children:U("GENERIC.UPDATE")})):(0,r.jsx)(Se.D,Dr({onClick:function(){C({display:b,number:k,avatar:j},T)},className:l.button},{children:U("GENERIC.ADD")}))}))]}))]})):null},xr=function(){return xr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n1?Br(Br({},e),{num2:e.num2.slice(0,-1)}):Br(Br({},e),{num2:""});case"ac":return{value:0,op:"",num1:0,num2:"",num3:""};default:return e}},zr=function(e){var t=document.createElement("input");t.value=e,document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)},Vr=n(392),Kr=function(){return Kr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i}((0,a.useReducer)(Wr,Hr),2),t=e[0],n=e[1],r=function(e,t){if("2"!==t)return"".concat(e);switch(e){case"/":return function(e,t){return Number(e)/Number(t)};case"*":return function(e,t){return Number(e)*Number(t)};case"+":return function(e,t){return Number(e)+Number(t)};case"-":return function(e,t){return Number(e)-Number(t)}}},o=function(e,t){return{label:e,onClick:function(){return n({type:t,payload:r(e,t)})}}},i=function(e){return o(e,"1")},l=function(e){return o(e,"2")},E=o("C","c"),s=o("AC","ac"),c=o("=","3"),u=i(0),d=i("."),T=l("/"),A=l("*"),p=l("+");return{result:function(){return t.num2?t.num2:t.value},equals:c,clear:E,clearAll:s,divider:T,multiplier:A,substractor:l("-"),adder:p,dot:d,zero:u,one:i(1),two:i(2),three:i(3),four:i(4),five:i(5),six:i(6),seven:i(7),eight:i(8),nine:i(9)}}(),t=e.result,n=e.equals,o=e.clear,i=e.clearAll,l=e.divider,E=e.multiplier,s=e.substractor,c=e.adder,u=e.dot,d=e.zero,T=e.one,A=e.two,p=e.three,_=e.four,I=e.five,S=e.six,f=e.seven,h=e.eight,R=e.nine,O=mr().addAlert,m=(0,a.useMemo)((function(){return t().toLocaleString(void 0,{minimumFractionDigits:0,maximumFractionDigits:4})}),[t]),L=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,a,o=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i}((0,le.useTranslation)(),1)[0];return(0,r.jsxs)(C.Box,Yr({display:"flex",flexDirection:"column"},{children:[(0,r.jsxs)(qr,Yr({flexGrow:1,component:C.Paper,p:2,length:m.length},{children:[(0,r.jsx)(Jr,Yr({size:"small",onClick:function(){zr(m),O({message:L("GENERIC.WRITE_TO_CLIPBOARD_MESSAGE",{content:"number"}),type:"success"})}},{children:(0,r.jsx)(Vr.Z,{})})),m]})),(0,r.jsx)(C.Box,{children:(0,r.jsxs)(C.Grid,Yr({container:!0,justifyContent:"space-around"},{children:[(0,r.jsx)(Xr,{buttonOpts:o}),(0,r.jsx)(Xr,{buttonOpts:i}),(0,r.jsx)(Xr,{buttonOpts:l}),(0,r.jsx)(Xr,{buttonOpts:E}),(0,r.jsx)(Xr,{buttonOpts:f}),(0,r.jsx)(Xr,{buttonOpts:h}),(0,r.jsx)(Xr,{buttonOpts:R}),(0,r.jsx)(Xr,{buttonOpts:s}),(0,r.jsx)(Xr,{buttonOpts:_}),(0,r.jsx)(Xr,{buttonOpts:I}),(0,r.jsx)(Xr,{buttonOpts:S}),(0,r.jsx)(Xr,{buttonOpts:c}),(0,r.jsx)(Xr,{buttonOpts:T}),(0,r.jsx)(Xr,{buttonOpts:A}),(0,r.jsx)(Xr,{buttonOpts:p}),(0,r.jsx)(Xr,{buttonOpts:n}),(0,r.jsx)(Xr,{buttonOpts:u}),(0,r.jsx)(Xr,{buttonOpts:d,GridProps:{xs:9}})]}))})]}))},$r=function(){var e=XA("CALCULATOR");return(0,r.jsxs)(pe.O,{children:[(0,r.jsx)(Ae,{app:e}),(0,r.jsx)(ae,{children:(0,r.jsx)(Qr,{})})]})},ea=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,a,o=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},ta=function(e,t){return function(n){return{selected:e.value===n.value,onClick:function(){return t(n)},key:n.value,label:n.label}}},na=function(e){var t=ea((0,a.useState)(!1),2),n=t[0],o=t[1],i=ea((0,a.useState)(e||[]),2),l=i[0],E=i[1],s=function(){return o(!1)};return[function(e){E(e),o(!0)},s,function(){return(0,r.jsx)(Le,{open:n,onClose:s,options:l})},n]},ra=function(){return ra=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i}((0,L.useRecoilState)(e),2),n=t[0],r=t[1];return[n,function(e,t){r((function(n){var r;return ra(ra({},n),((r={})[e]=t,r))}))}]},ia=n(70385),la=function(){return la=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},fa=function(){var e=Sa(_a(),2),t=e[0],n=e[1],o=Sa(x(),2),i=o[0],l=o[1],E=Sa((0,le.useTranslation)(),1)[0],s=Sa((0,a.useState)(i.wallpaper.value?i.wallpaper.value:""),2),c=s[0],u=s[1],d=mr().addAlert,T=function(e){return/(http(s?):)([/|.|\w|\s|-])*\.(?:jpg|png|jpeg|gif)/g.test(e)};return(0,r.jsx)(ge,Ia({open:t,handleClose:function(){return n(!1)},onSubmit:function(){T(c)?(function(e,t){var n;l(Ia(Ia({},i),((n={}).wallpaper=t,n)))}(0,{label:E("SETTINGS.OPTIONS.CUSTOM_WALLPAPER.DIALOG_TITLE"),value:c}),n(!1)):d({message:E("SETTINGS.OPTIONS.CUSTOM_WALLPAPER.DIALOG_ERROR"),type:"error"})},title:E("SETTINGS.OPTIONS.CUSTOM_WALLPAPER.DIALOG_TITLE"),content:E("SETTINGS.OPTIONS.CUSTOM_WALLPAPER.DIALOG_CONTENT")},{children:(0,r.jsx)(Be,{value:c,error:!T(c)&&!0,onChange:function(e){return u(e.currentTarget.value)},placeholder:E("SETTINGS.OPTIONS.CUSTOM_WALLPAPER.DIALOG_PLACEHOLDER"),fullWidth:!0})}))},ha=function(){return ha=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},Na=function(e,t,n){if(n||2===arguments.length)for(var r,a=0,o=t.length;a0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},Pa=function(e,t,n){if(n||2===arguments.length)for(var r,a=0,o=t.length;a=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(o),E=i.next();!E.done;E=i.next()){var s=E.value;if(s!==a){var c=l(s);return c?c.display:s}}}catch(e){t={error:e}}finally{try{E&&!E.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}}),[l]);return{updateLocalConversations:c,removeLocalConversation:(0,a.useCallback)((function(e){"hasValue"===n&&r.length&&o((function(t){return Pa([],Da(t),!1).filter((function(t){return!e.includes(t.id)}))}))}),[o,n,r]),updateLocalMessages:(0,a.useCallback)((function(t){"hasValue"===e&&s===t.conversation_id&&i((function(e){return Pa(Pa([],Da(e),!1),[{message:t.message,conversation_id:t.conversation_id,author:t.author,id:t.id,createdAt:t.createdAt,is_embed:t.is_embed,embed:t.embed}],!1)}))}),[e,i,s]),deleteLocalMessage:(0,a.useCallback)((function(e){i((function(t){return Pa([],Da(t),!1).filter((function(t){return t.id!==e}))}))}),[i]),setMessageReadState:u,getLabelOrContact:d,getConversationParticipant:(0,a.useCallback)((function(e){var t=e.split("+").filter((function(e){return e!==E}));return l(t[0])}),[l,E])}},Ma=function(){var e=mr().addAlert,t=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,a,o=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i}((0,le.useTranslation)(),1)[0],n=ba(),r=n.updateLocalMessages,o=n.deleteLocalMessage,i=n.updateLocalConversations,l=n.removeLocalConversation,s=n.setMessageReadState,c=(0,E.useHistory)(),u=(0,L.useRecoilValueLoadable)(nn.messageCoversations),d=u.state,T=u.contents,A=rn(),p=yt(),_=(0,a.useCallback)((function(n){var a=n.conversationId,o=n.message,i=n.tgtPhoneNumber,l=n.conversationList;(0,v.Z)(Wt.SEND_MESSAGE,{conversationId:a,conversationList:l,message:o,tgtPhoneNumber:i,sourcePhoneNumber:p}).then((function(n){if("ok"!==n.status)return e({message:t("MESSAGES.FEEDBACK.NEW_MESSAGE_FAILED"),type:"error"});r(n.data)}))}),[r,t,e,p]),I=(0,a.useCallback)((function(n){var a=n.conversationId,o=n.embed,i=n.tgtPhoneNumber,l=n.conversationList,E=n.message,s=void 0===E?"":E;(0,v.Z)(Wt.SEND_MESSAGE,{conversationId:a,embed:JSON.stringify(o),is_embed:!0,tgtPhoneNumber:i,conversationList:l,sourcePhoneNumber:p,message:s}).then((function(n){if("ok"!==n.status)return e({message:t("MESSAGES.FEEDBACK.NEW_MESSAGE_FAILED"),type:"error"});r(n.data)}))}),[t,r,e,p]),S=(0,a.useCallback)((function(t){(0,v.Z)(Wt.SET_MESSAGE_READ,t).then((function(n){if("ok"!==n.status)return e({message:"Failed to read message",type:"error"});s(t,0)}))}),[e,s]),f=(0,a.useCallback)((function(n){(0,v.Z)(Wt.DELETE_MESSAGE,n).then((function(r){if("ok"!==r.status)return e({message:t("MESSAGES.FEEDBACK.DELETE_MESSAGE_FAILED"),type:"error"});o(n.id)}))}),[o,e,t]),h=(0,a.useCallback)((function(n){"hasValue"===d&&(0,v.Z)(Wt.CREATE_MESSAGE_CONVERSATION,{conversationLabel:n.conversationLabel,participants:n.participants,isGroupChat:n.isGroupChat}).then((function(r){return"ok"!==r.status?(c.push("/messages"),"MESSAGES.FEEDBACK.MESSAGE_CONVERSATION_DUPLICATE"===r.errorMsg?e({message:t("MESSAGES.FEEDBACK.MESSAGE_CONVERSATION_DUPLICATE"),type:"error"}):e({message:t('MESSAGE_CONVERSATION_CREATE_ONE_NUMBER_FAILED"',{number:n.conversationLabel}),type:"error"})):T.find((function(e){return e.conversationList===r.data.conversationList}))?(c.push("/messages"),e({message:t("MESSAGES.FEEDBACK.MESSAGE_CONVERSATION_DUPLICATE"),type:"error"})):(i({participant:r.data.participant,id:r.data.id,conversationList:r.data.conversationList,label:r.data.label,isGroupChat:r.data.isGroupChat,unread:0,unreadCount:0}),void c.push("/messages"))}))}),[c,i,e,t,T,d]);return{sendMessage:_,deleteMessage:f,deleteConversation:(0,a.useCallback)((function(n){(0,v.Z)(Wt.DELETE_CONVERSATION,{conversationsId:n}).then((function(r){if("ok"!==r.status)return e({message:t("MESSAGES.DELETE_CONVERSATION_FAILED"),type:"error"});l(n)}))}),[e,t,l]),addConversation:h,fetchMessages:(0,a.useCallback)((function(n,r){(0,v.Z)(Wt.FETCH_MESSAGES,{conversationId:n,page:r},en).then((function(n){if("ok"!==n.status)return e({message:t("MESSAGES.FEEDBACK.FETCHED_MESSAGES_FAILED"),type:"error"}),c.push("/messages");A(n.data)}))}),[A,e,t,c]),sendEmbedMessage:I,setMessageRead:S}},xa=function(){return xa=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},wa=function(e,t,n){if(n||2===arguments.length)for(var r,a=0,o=t.length;a1;(0,a.useEffect)((function(){if(t){var e=T(t)||{display:"",number:t};s((function(t){return wa(wa([],ka(t),!1),[e],!1)}))}}),[t,T]);var S=function(e,t){var n=t.length-1;if("string"==typeof t[n])return t.splice(n,1,{number:t[n]}),void s(t);s(t)},f=l.find((function(e){return e.number===_})),h=!(null==l?void 0:l.length)||I&&!u||!!f;return(0,r.jsxs)(C.Box,{children:[(0,r.jsx)(C.Box,xa({px:2,py:3},{children:(0,r.jsx)(C.Autocomplete,{value:l,freeSolo:!0,disablePortal:!0,PopperComponent:function(e){return(0,r.jsx)(C.Popper,xa({placement:"bottom-start"},e))},multiple:!0,autoHighlight:!0,options:A||[],ListboxProps:{style:{marginLeft:10}},getOptionLabel:function(e){return e.display||e.number},onChange:S,renderInput:function(e){return(0,r.jsx)(Be,xa({},e,{fullWidth:!0,label:o("MESSAGES.INPUT_NAME_OR_NUMBER"),inputProps:xa(xa({},e.inputProps),{onKeyPress:function(e){"Enter"===e.key&&e.currentTarget.value&&(e.preventDefault(),S(0,wa(wa([],ka(l),!1),[e.currentTarget.value],!1)))},autoFocus:!0})}))}})})),I&&(0,r.jsx)(C.Box,xa({px:2,py:1},{children:(0,r.jsx)(Be,{fullWidth:!0,placeholder:"Conversation label",value:u,onChange:function(e){return d(e.currentTarget.value)}})})),(0,r.jsxs)(C.Box,xa({px:2,py:3},{children:[(0,r.jsx)(C.Button,xa({onClick:function(){var e=l.map((function(e){return e.number})),t={conversationLabel:I?u:"",participants:wa([_],ka(e),!1),isGroupChat:I};p(t)},disabled:h,variant:"contained",fullWidth:!0,sx:{mb:1},color:"primary",type:"submit"},{children:o("MESSAGES.NEW_MESSAGE_GROUP_SUBMIT")})),(0,r.jsx)(C.Button,xa({onClick:function(){n.goBack()},variant:"contained",fullWidth:!0,color:"error"},{children:o("GENERIC_CANCEL")}))]}))]})},ja=function(){return ja=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(r),o=a.next();!o.done;o=a.next()){var l=o.value;if(l!==n)return T(l)||null}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=a.return)&&t.call(a)}finally{if(e)throw e.error}}}),[T,i]),p=(0,a.useCallback)((function(){var e,t=i.label,n=i.participant,r=i.conversationList.split("+");return i.isGroupChat?t:(null===(e=A())||void 0===e?void 0:e.display)||r.filter((function(e){return e!==n}))[0]}),[i,A]),_=(0,C.useTheme)();return(0,r.jsxs)(C.ListItem,Ba({onClick:E?function(){c(i.id)}:l(i),divider:!0,button:!0},{children:[E&&(0,r.jsx)(C.ListItemIcon,{children:(0,r.jsx)(C.Checkbox,{checked:-1!==s.indexOf(i.id),edge:"start",disableRipple:!0})}),(0,r.jsx)(C.ListItemAvatar,{children:(0,r.jsx)(C.Badge,Ba({color:"error",badgeContent:i.unreadCount<=99?i.unreadCount:"99+",invisible:i.unreadCount<=0},{children:i.isGroupChat?(0,r.jsx)(C.Avatar,{alt:i.label}):(0,r.jsx)(C.Avatar,{alt:null!==(n=null===(t=A())||void 0===t?void 0:t.display)&&void 0!==n?n:"",src:null===(o=A())||void 0===o?void 0:o.avatar})}))}),(0,r.jsx)(C.ListItemText,Ba({sx:{overflow:"hidden",color:_.palette.text.primary}},{children:p()}))]}),i.id)},Wa=(0,Z.Z)((function(e){return{root:{height:"580px",overflowY:"auto"}}})),za=n(44089),Va=function(){return Va=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},Ya=function(e,t,n){if(n||2===arguments.length)for(var r,a=0,o=t.length;a1?new RegExp(E.join("|"),"ig"):null}),[E]);return(0,r.jsx)(to.Provider,eo({value:{filter:s,clean:function(e){return l&&s?e.replace(s,(function(e){return"*".repeat(e.length)})):e}}},{children:n}))}var ro,ao,oo=function(){var e=(0,a.useContext)(to);if(!e)throw new Error("useWordFilter must be wrapped by WordFilterProvider");return e},io=function(){return io=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&a[a.length-1])||6!==l[0]&&2!==l[0])){i=0;continue}if(3===l[0]&&(!a||l[1]>a[0]&&l[1]0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},co=function(e){var t=e.messageConversation,n=e.onAddImageClick,o=e.onVoiceClick,i=e.voiceEnabled,l=so((0,le.useTranslation)(),1)[0],E=so((0,a.useState)(""),2),s=E[0],c=E[1],u=Ma().sendMessage,d=Or().activeMessageConversation,T=oo().clean,A=function(){return lo(void 0,void 0,void 0,(function(){return Eo(this,(function(e){switch(e.label){case 0:return s.trim()?[4,u({conversationId:t.id,conversationList:d.conversationList,message:T(s),tgtPhoneNumber:t.participant})]:[3,2];case 1:e.sent(),c(""),e.label=2;case 2:return[2]}}))}))};return t.id?(0,r.jsxs)(C.Paper,io({variant:"outlined",sx:{display:"flex",alignItems:"center",justifyContent:"space-between"}},{children:[(0,r.jsx)(C.Box,io({pt:1,pl:1,pb:1,flexGrow:1},{children:(0,r.jsx)(Be,{onKeyPress:function(e){return lo(void 0,void 0,void 0,(function(){return Eo(this,(function(t){switch(t.label){case 0:return"Enter"!==e.key||e.shiftKey?[3,2]:[4,A()];case 1:t.sent(),t.label=2;case 2:return[2]}}))}))},multiline:!0,maxRows:4,"aria-multiline":"true",inputProps:{style:{fontSize:"1.3em"}},value:s,onChange:function(e){c(e.currentTarget.value)},placeholder:l("MESSAGES.NEW_MESSAGE")})})),(0,r.jsx)(C.Box,io({pr:1},{children:(0,r.jsxs)(C.ButtonGroup,io({size:"small"},{children:[i&&(0,r.jsx)(C.Button,io({size:"small",onClick:o},{children:(0,r.jsx)(Qa.Z,{})})),(0,r.jsx)(C.Button,io({size:"small",onClick:n},{children:(0,r.jsx)($a.Z,{})})),(0,r.jsx)(C.Button,io({size:"small",onClick:A},{children:(0,r.jsx)(Xa.Z,{})}))]}))}))]})):null},uo=n(24437),To=(0,_e.styled)(C.Box)({wordBreak:"break-word",display:"flex",justifyContent:"space-between",alignItems:"center",whiteSpace:"pre-line"}),Ao=(0,_e.styled)(C.Box)({width:"100%",display:"flex",justifyContent:"flex-start",flexDirection:"column"}),po=To,_o=n(60598),Io=n(80724);!function(e){e.GENERIC="CAMERA.FAILED_TO_TAKE_PHOTO",e.INVALID_IMAGE_HOST="GENERIC_INVALID_IMAGE_HOST"}(ro||(ro={})),function(e){e.TAKE_PHOTO="npwd:TakePhoto",e.CAMERA_EXITED="npwd:cameraExited",e.NPWD_PHOTO_MODE_STARTED="npwd:PhotoModeStarted",e.NPWD_PHOTO_MODE_ENDED="npwd:PhotoModeEnded",e.TAKE_PHOTO_SUCCESS="npwd:TakePhotoSuccess",e.SAVE_IMAGE="npwd:saveImage",e.UPLOAD_PHOTO="npwd:UploadPhoto",e.FETCH_PHOTOS="npwd:FetchPhotos",e.DELETE_PHOTO="npwd:deletePhoto",e.DELETE_MULTIPLE_PHOTOS="npwd:deleteMultiplePhotos",e.GET_AUTHORISATION_TOKEN="npwd:getAuthToken"}(ao||(ao={}));var So=[{id:1,image:"https://i.imgur.com/7juREyw.png"},{id:2,image:"https://i.imgur.com/ULWUAoY.png"},{id:3,image:"https://i.imgur.com/2UScodu.png"},{id:4,image:"https://i.imgur.com/nNuoTkW.png"}],fo={photos:(0,L.atom)({key:"galleryPhotos",default:(0,L.selector)({key:"defaultGalleryPhotos",get:function(){return e=void 0,t=void 0,r=function(){var e,t;return function(e,t){var n,r,a,o,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return o={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function l(l){return function(E){return function(l){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,l[0]&&(i=0)),i;)try{if(n=1,r&&(a=2&l[0]?r.return:l[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,l[1])).done)return a;switch(r=0,a&&(l=[2&l[0],a.value]),l[0]){case 0:case 1:a=l;break;case 4:return i.label++,{value:l[1],done:!1};case 5:i.label++,r=l[1],l=[0];continue;case 7:l=i.ops.pop(),i.trys.pop();continue;default:if(!((a=(a=i.trys).length>0&&a[a.length-1])||6!==l[0]&&2!==l[0])){i=0;continue}if(3===l[0]&&(!a||l[1]>a[0]&&l[1]0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},Oo=function(e,t,n){if(n||2===arguments.length)for(var r,a=0,o=t.length;a0&&a[a.length-1])||6!==l[0]&&2!==l[0])){i=0;continue}if(3===l[0]&&(!a||l[1]>a[0]&&l[1]0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i}((0,le.useTranslation)(),1)[0],E=Ma().deleteMessage,s=function(){var e=mr().addAlert,t=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,a,o=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i}((0,le.useTranslation)(),1)[0],n=mo().saveLocalImage;return{saveImage:function(r){(0,v.Z)(ao.SAVE_IMAGE,{url:r}).then((function(r){if("ok"!==r.status)return e({type:"error",message:t("CAMERA.FAILED_TO_TAKE_PHOTO")});n(r.data)}))}}}().saveImage,c=(0,L.useRecoilValue)(nn.selectedMessage),u=(0,a.useCallback)((function(){E(c)}),[E,c]),d=function(){s(i.message)},T=(0,a.useMemo)((function(){return[{label:l("MESSAGES.FEEDBACK.DELETE_MESSAGE"),icon:(0,r.jsx)(Io.Z,{}),onClick:u}]}),[u,l]),A=(0,a.useMemo)((function(){return[{label:"Save image",icon:(0,r.jsx)(_o.Z,{}),onClick:d}]}),[d]);return(0,r.jsx)(Le,{open:t,onClose:n,options:o?A:T})},Lo=n(85332),No=n(25467),vo=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,a,o=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},yo=function(e){var t=vo((0,a.useState)(!1),2),n=t[0],r=t[1],o=vo((0,a.useState)(null),2),i=o[0],l=o[1],E=(0,a.useRef)(new Audio(e)),s=E.current.duration;return(0,a.useEffect)((function(){E.current&&(E.current.ontimeupdate=function(){l(Math.trunc(E.current.currentTime))})})),{play:function(){return e=void 0,t=void 0,a=function(){return function(e,t){var n,r,a,o,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return o={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function l(l){return function(E){return function(l){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,l[0]&&(i=0)),i;)try{if(n=1,r&&(a=2&l[0]?r.return:l[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,l[1])).done)return a;switch(r=0,a&&(l=[2&l[0],a.value]),l[0]){case 0:case 1:a=l;break;case 4:return i.label++,{value:l[1],done:!1};case 5:i.label++,r=l[1],l=[0];continue;case 7:l=i.ops.pop(),i.trys.pop();continue;default:if(!((a=(a=i.trys).length>0&&a[a.length-1])||6!==l[0]&&2!==l[0])){i=0;continue}if(3===l[0]&&(!a||l[1]>a[0]&&l[1]0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i};xn().extend(bo());var ko,wo=function(e){var t=e.isMine,n=e.embed,a=e.openMenu,o=xo((0,le.useTranslation)(),1)[0],i=(0,E.useHistory)(),l=(0,E.useLocation)().pathname,s=un().getContactByNumber,c=!t&&!s(null==n?void 0:n.number);return(0,r.jsxs)(po,{children:[(0,r.jsxs)(C.Box,{children:[(0,r.jsx)(C.Avatar,{src:null==n?void 0:n.avatar}),(0,r.jsx)(C.Typography,{children:null==n?void 0:n.display}),(0,r.jsx)(C.Typography,{children:null==n?void 0:n.number})]}),c&&(0,r.jsx)(C.Box,Mo({pl:1},{children:(0,r.jsx)(C.Button,Mo({fullWidth:!0,variant:"contained",color:"primary",onClick:function(){var e=encodeURIComponent(l);i.push("/contacts/-1?addNumber=".concat(n.number,"&name=").concat(n.display,"&referal=").concat(e))}},{children:o("GENERIC.ADD")}))})),t&&(0,r.jsx)(C.IconButton,Mo({color:"primary",onClick:a},{children:(0,r.jsx)(uo.Z,{})}))]})},Go=function(e){var t=e.isMine,n=e.embed,a=e.openMenu,o=xo((0,le.useTranslation)(),1)[0],i=(0,E.useHistory)(),l=(0,E.useLocation)().pathname;return(0,r.jsxs)(po,{children:[(0,r.jsxs)(C.Box,{children:[(0,r.jsx)(C.Typography,{children:null==n?void 0:n.title}),(0,r.jsx)(C.Typography,{children:(null==n?void 0:n.content.substring(0,8))+" ..."})]}),(0,r.jsxs)(C.Box,{children:[(0,r.jsx)(C.Tooltip,Mo({title:o("MESSAGES.NOTE_TOOLTIP")},{children:(0,r.jsx)(C.IconButton,Mo({color:"primary",onClick:function(){var e=qn().stringify({title:null==n?void 0:n.title,content:null==n?void 0:n.content}),t=encodeURIComponent(l);i.push("/notes/?".concat(e,"&referal=").concat(t))}},{children:(0,r.jsx)(No.Z,{})}))})),t&&(0,r.jsx)(C.IconButton,Mo({color:"primary",onClick:a},{children:(0,r.jsx)(uo.Z,{})}))]})]})},jo=function(e){var t=e.isMine,n=e.embed,a=e.message,o=e.openMenu,i=xo((0,le.useTranslation)(),1)[0];return(0,r.jsxs)(po,{children:[(0,r.jsx)(C.Box,{children:(0,r.jsx)(C.Typography,{children:null!=a?a:i("MESSAGES.LOCATION_MESSAGE")})}),(0,r.jsxs)(C.Box,{children:[(0,r.jsx)(C.Tooltip,Mo({title:i("MESSAGES.LOCATION_TOOLTIP")},{children:(0,r.jsx)(C.IconButton,Mo({color:"primary",onClick:function(){(0,v.Z)(Wt.MESSAGES_SET_WAYPOINT,{coords:n.coords})}},{children:(0,r.jsx)(Lo.Z,{})}))})),t&&(0,r.jsx)(C.IconButton,Mo({color:"primary",onClick:o},{children:(0,r.jsx)(uo.Z,{})}))]})]})},Fo=function(e){var t=e.isMine,n=e.embed,a=e.openMenu,o=yo(n.url),i=o.play,l=o.pause,E=o.playing,s=o.currentTime,c=o.duration,u=isNaN(c)||c==1/0?0:Math.trunc(s)/Math.trunc(c)*100;return(0,r.jsxs)(Ao,{children:[(0,r.jsxs)(C.Box,Mo({display:"flex",alignItems:"center"},{children:[(0,r.jsx)(C.IconButton,Mo({onClick:E?l:i},{children:E?(0,r.jsx)(Do.Z,{sx:{color:"#232323"}}):(0,r.jsx)(go.Z,{sx:{color:"#232323"}})})),(0,r.jsx)(C.Box,Mo({sx:{width:"60%"}},{children:!u&&E?(0,r.jsx)(C.LinearProgress,{}):(0,r.jsx)(C.LinearProgress,{variant:"determinate",value:u})})),t&&(0,r.jsx)(C.IconButton,Mo({color:"primary",onClick:a},{children:(0,r.jsx)(uo.Z,{})}))]})),(0,r.jsx)(C.Box,Mo({pl:1},{children:(0,r.jsx)(C.Typography,{children:xn().duration(1e3*s).format("mm:ss")})}))]})},Uo=function(e){var t=e.type,n=e.embed,a=e.isMine,o=e.message,i=e.openMenu,l={contact:(0,r.jsx)(wo,{embed:n,isMine:a,openMenu:i}),location:(0,r.jsx)(jo,{embed:n,isMine:a,message:o,openMenu:i}),note:(0,r.jsx)(Go,{embed:n,isMine:a,openMenu:i}),audio:(0,r.jsx)(Fo,{embed:n,isMine:a,openMenu:i})};return(0,r.jsx)(r.Fragment,{children:l[t]})},Bo=function(){return Bo=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i}((0,a.useState)(!1),2),d=u[0],T=u[1],A=un().getContactByNumber,p=(0,L.useSetRecoilState)(nn.selectedMessage),_=function(){T(!0),p(s)},I=yt(),S=s.author===I;(null==s?void 0:s.embed)&&(E=JSON.parse(null==s?void 0:s.embed));var f,h=function(){return A(s.author)},R=(f=s.message,/(http(s?):)([/|.|\w|\s|-])*\.(?:jpg|png|jpeg|gif|webp)/g.test(f));if(s.is_embed&&"audio"===E.type)return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(C.Box,Bo({display:"flex",ml:1,alignItems:"stretch",justifyContent:S?"flex-end":"flex-start",mt:1},{children:(0,r.jsxs)(C.Paper,Bo({className:S?c.myAudioSms:c.audioSms,variant:"outlined"},{children:[(0,r.jsx)(Uo,{type:E.type,embed:E,isMine:S,message:s.message,openMenu:_}),!S&&(0,r.jsx)(C.Typography,Bo({fontWeight:"bold",fontSize:14,color:"#ddd"},{children:null!==(n=null===(t=h())||void 0===t?void 0:t.display)&&void 0!==n?n:s.author})),(0,r.jsx)(C.Typography,Bo({ml:2,fontSize:12},{children:xn().unix(s.createdAt).fromNow()}))]}))})),(0,r.jsx)(Co,{open:d,handleClose:function(){return T(!1)}})]});var O=S||R;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(C.Box,Bo({display:"flex",ml:1,alignItems:"stretch",justifyContent:S?"flex-end":"flex-start",mt:1},{children:[S?null:(0,r.jsx)(C.Avatar,{src:null===(o=h())||void 0===o?void 0:o.avatar}),(0,r.jsxs)(C.Paper,Bo({className:S?c.mySms:c.sms,variant:"outlined"},{children:[s.is_embed?(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(Uo,{type:E.type,embed:E,isMine:S,message:s.message,openMenu:_})}):(0,r.jsxs)(po,{children:[R?(0,r.jsx)(nt,{children:(0,r.jsx)(Qe,{src:s.message,alt:"message multimedia"})}):(0,r.jsx)(r.Fragment,{children:s.message}),O&&(0,r.jsx)(C.IconButton,Bo({color:"primary",onClick:_},{children:(0,r.jsx)(uo.Z,{})}))]}),!S&&(0,r.jsx)(C.Typography,Bo({fontWeight:"bold",fontSize:14,color:"#ddd"},{children:null!==(l=null===(i=h())||void 0===i?void 0:i.display)&&void 0!==l?l:s.author})),(0,r.jsx)(C.Typography,Bo({mt:2,fontSize:12},{children:xn().unix(s.createdAt).fromNow()}))]}))]})),(0,r.jsx)(Co,{message:s,isImage:R,open:d,handleClose:function(){return T(!1)}})]})},zo=n(65348),Vo=n.n(zo),Ko=n(41656),Yo=n(90408),Zo=n(72159),Jo=n.n(Zo),qo=function(){return qo=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i}((0,le.useTranslation)(),1)[0],u=(0,E.useLocation)(),d=u.pathname,T=u.search,A=Ma().sendMessage,p=(0,a.useCallback)((function(){i(null),s.replace(Xo({pathname:d,search:T},"image"))}),[s,d,T,i]),_=Or().activeMessageConversation,I=(0,a.useCallback)((function(e){A({conversationId:t.id,conversationList:_.conversationList,message:e,tgtPhoneNumber:t.participant}),n()}),[A,t,n,_]),S=(0,a.useCallback)((function(e){I(e),p()}),[p,I]);return(0,a.useEffect)((function(){o&&i(o)}),[o,i]),(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(qe,Qo({visible:l,handleClose:p},{children:(0,r.jsxs)(C.Box,Qo({py:1},{children:[(0,r.jsx)(C.Typography,Qo({paragraph:!0},{children:c("MESSAGES.SHARE_IMAGE_TITLE")})),(0,r.jsx)(Qe,{src:l,alt:"Share gallery image preview"}),(0,r.jsx)(C.Button,Qo({fullWidth:!0,variant:"contained",color:"primary",onClick:function(){return S(l)}},{children:c("GENERIC.SHARE")}))]}))}))})},ei=function(){return ei=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},ni=function(e){var t=e.isVisible,n=e.onClose,o=e.messageGroup,i=ti((0,le.useTranslation)(),1)[0],l=Xt(),E=ti((0,a.useState)(null),2),s=E[0],c=E[1],u=Ma().sendEmbedMessage,d=Or().activeMessageConversation;return(0,r.jsxs)(qe,ei({visible:t,handleClose:n},{children:[(0,r.jsx)(C.Box,ei({py:1},{children:(0,r.jsx)(C.Typography,ei({paragraph:!0},{children:i("MESSAGES.SHARE_CONTACT_TITLE")}))})),(0,r.jsx)(C.Box,ei({pb:2},{children:(0,r.jsx)(C.Autocomplete,{renderInput:function(e){return(0,r.jsx)(Be,ei({},e,{label:"Choose contact"}))},getOptionLabel:function(e){return e.display},options:l,onChange:function(e,t){return c(t)}})})),(0,r.jsx)(C.Button,ei({disabled:!s,fullWidth:!0,variant:"contained",color:"primary",onClick:function(){u({conversationId:o.id,conversationList:d.conversationList,embed:ei({type:"contact"},s),tgtPhoneNumber:o.participant,message:i("MESSAGES.CONTACT_SHARED")}),n()}},{children:i("GENERIC.SHARE")}))]}))};!function(e){e.ADD_NOTE="npwd:addNote",e.FETCH_ALL_NOTES="npwd:fetchAllNotes",e.DELETE_NOTE="npwd:deleteNote",e.UPDATE_NOTE="npwd:updateNote",e.ADD_NOTE_EXPORT="npwd:addNoteExport"}(ko||(ko={}));var ri,ai=[{id:1,title:"You suck",content:"Nice note bro"},{id:2,title:"You suck",content:"Nice note bro"},{id:3,title:"You suck",content:"Nice note bro"},{id:4,title:"You suck",content:"Nice note bro"}],oi=(0,L.atom)({key:"noteItem",default:(0,L.selector)({key:"defaultNoteItems",get:function(){return e=void 0,t=void 0,r=function(){var e,t;return function(e,t){var n,r,a,o,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return o={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function l(l){return function(E){return function(l){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,l[0]&&(i=0)),i;)try{if(n=1,r&&(a=2&l[0]?r.return:l[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,l[1])).done)return a;switch(r=0,a&&(l=[2&l[0],a.value]),l[0]){case 0:case 1:a=l;break;case 4:return i.label++,{value:l[1],done:!1};case 5:i.label++,r=l[1],l=[0];continue;case 7:l=i.ops.pop(),i.trys.pop();continue;default:if(!((a=(a=i.trys).length>0&&a[a.length-1])||6!==l[0]&&2!==l[0])){i=0;continue}if(3===l[0]&&(!a||l[1]>a[0]&&l[1]0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i}((0,le.useTranslation)(),1)[0],u=(0,E.useLocation)(),d=u.pathname,T=u.search,A=Ma().sendEmbedMessage,p=ui(),_=(0,a.useCallback)((function(){i(null),s.replace(Xo({pathname:d,search:T},"note"))}),[s,d,T,i]),I=Or().activeMessageConversation,S=(0,a.useCallback)((function(e){A({conversationId:t.id,conversationList:I.conversationList,embed:di({type:"note"},e),tgtPhoneNumber:t.participant,message:""}),n()}),[A,t,n,I]),f=(0,a.useCallback)((function(e){S(e),_()}),[_,S]);return(0,a.useEffect)((function(){if(o){var e=p.filter((function(e){return e.id===Number(o)}));i(e[0])}}),[o,p,i]),(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(qe,di({visible:l,handleClose:_},{children:(0,r.jsxs)(C.Box,di({py:1},{children:[(0,r.jsx)(C.Typography,di({paragraph:!0},{children:c("MESSAGES.SHARE_NOTE_TITLE")})),(0,r.jsx)(C.Typography,{children:null==l?void 0:l.title}),(0,r.jsx)(C.Typography,di({sx:{marginBottom:2}},{children:(null==l?void 0:l.content.substring(0,25))+" ..."})),(0,r.jsx)(C.Button,di({fullWidth:!0,variant:"contained",color:"primary",onClick:function(){return f(l)}},{children:c("GENERIC.SHARE")}))]}))}))})},Ai=function(){return Ai=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},_i=function(e){var t=e.isOpen,n=e.onClose,o=e.messageGroup,i=e.image,l=e.note,s=(0,E.useHistory)(),c=pi((0,le.useTranslation)(),1)[0],u=(0,E.useLocation)(),d=u.pathname,T=u.search,A=pi((0,a.useState)(null),2),p=A[0],_=A[1],I=pi((0,a.useState)(null),2),S=I[0],f=I[1],h=pi((0,a.useState)(!1),2),R=h[0],O=h[1],m=Ma().sendEmbedMessage,C=Or().activeMessageConversation,L=p||R||S,N=(0,a.useMemo)((function(){return[{label:c("MESSAGES.MEDIA_OPTION"),icon:(0,r.jsx)(_o.Z,{}),onClick:function(){return s.push("/camera?".concat(qn().stringify({referal:encodeURIComponent(d+T)})))}},{label:c("MESSAGES.CONTACT_OPTION"),icon:(0,r.jsx)(Ko.Z,{}),onClick:function(){return O(!0)}},{label:c("MESSAGES.NOTE_OPTION"),icon:(0,r.jsx)(No.Z,{}),onClick:function(){return s.push("/notes?".concat(qn().stringify({referal:encodeURIComponent(d+T)})))}},{label:c("MESSAGES.LOCATION_OPTION"),icon:(0,r.jsx)(Yo.Z,{}),onClick:function(){(0,v.Z)(Wt.GET_MESSAGE_LOCATION).then((function(e){var t=e.data;m({conversationId:o.id,conversationList:C.conversationList,embed:Ai({type:"location"},t),tgtPhoneNumber:o.participant,message:c("MESSAGES.LOCATION_MESSAGE")})}))}}]}),[s,d,T,c,m,C,o]);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(Le,{open:t,onClose:n,options:N}),L?(0,r.jsx)(Ie,{}):void 0,(0,r.jsx)($o,{image:i,imagePreview:p,setImagePreview:_,messageGroup:o,onClose:n}),(0,r.jsx)(Ti,{noteId:l,notePreview:S,setNotePreview:f,messageGroup:o,onClose:n}),(0,r.jsx)(ni,{messageGroup:o,isVisible:R,onClose:function(){return O(!1)}})]})},Ii=n(36714),Si=n(78218),fi=function(){return fi=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},Ri=function(){var e=hi((0,a.useState)({mediaStream:null,recorder:null,isRecording:!1}),2),t=e[0],n=e[1],r=hi((0,a.useState)(null),2),o=r[0],i=r[1],l=hi((0,a.useState)(null),2),E=l[0],s=l[1];return(0,a.useEffect)((function(){var e=t.recorder,r=[];return t.recorder&&"inactive"===t.recorder.state&&(e.start(),n((function(e){return fi(fi({},e),{isRecording:!0})})),e.ondataavailable=function(e){r.push(e.data)},e.onstop=function(){var e=new Blob(r,{type:"audio/ogg"}),t=URL.createObjectURL(e);n((function(e){return fi(fi({},e),{isRecording:!1,recorder:null,mediaStream:null})})),i(t),s(e)}),function(){t.recorder&&t.recorder.stream.getAudioTracks().forEach((function(e){return e.stop()}))}}),[t.recorder]),{audio:o,blob:E,recordingState:t,startRecording:function(){return e=void 0,t=void 0,a=function(){var e,t;return function(e,t){var n,r,a,o,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return o={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function l(l){return function(E){return function(l){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,l[0]&&(i=0)),i;)try{if(n=1,r&&(a=2&l[0]?r.return:l[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,l[1])).done)return a;switch(r=0,a&&(l=[2&l[0],a.value]),l[0]){case 0:case 1:a=l;break;case 4:return i.label++,{value:l[1],done:!1};case 5:i.label++,r=l[1],l=[0];continue;case 7:l=i.ops.pop(),i.trys.pop();continue;default:if(!((a=(a=i.trys).length>0&&a[a.length-1])||6!==l[0]&&2!==l[0])){i=0;continue}if(3===l[0]&&(!a||l[1]>a[0]&&l[1]0&&a[a.length-1])||6!==l[0]&&2!==l[0])){i=0;continue}if(3===l[0]&&(!a||l[1]>a[0]&&l[1]0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i};xn().extend(bo());var vi=function(e){var t=e.isRecording,n=e.startRecording,a=e.stopRecording;return(0,r.jsx)(C.Box,{children:(0,r.jsxs)(C.ButtonGroup,{children:[(0,r.jsx)(C.Tooltip,mi({title:"Record voice message",placement:"right"},{children:(0,r.jsx)(C.IconButton,mi({disabled:t,color:"error",size:"small",onClick:n},{children:(0,r.jsx)(Ii.Z,{})}))})),t&&(0,r.jsx)(C.IconButton,mi({color:"error",size:"small",onClick:t&&a},{children:(0,r.jsx)(Si.Z,{})}))]})})},yi=function(e){var t=e.playing,n=e.play,a=e.pause;return(0,r.jsx)(C.Box,{children:(0,r.jsx)(C.ButtonGroup,{children:(0,r.jsx)(C.IconButton,mi({size:"small"},{children:t?(0,r.jsx)(Do.Z,{onClick:a}):(0,r.jsx)(go.Z,{onClick:n})}))})})},gi=function(e){var t,n,o,i,l,E=e.onClose,s=Ri(),c=s.blob,u=s.audio,d=s.recordingState,T=s.startRecording,A=s.stopRecording,p=Ni((0,a.useState)(null),2),_=p[0],I=p[1],S=(t=an(),n=yt(),o=mr().addAlert,i=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,a,o=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i}((0,le.useTranslation)(),1)[0],l=ba().updateLocalMessages,{uploadRecording:function(e,r){return a=void 0,E=void 0,c=function(){var a;return function(e,t){var n,r,a,o,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return o={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function l(l){return function(E){return function(l){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,l[0]&&(i=0)),i;)try{if(n=1,r&&(a=2&l[0]?r.return:l[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,l[1])).done)return a;switch(r=0,a&&(l=[2&l[0],a.value]),l[0]){case 0:case 1:a=l;break;case 4:return i.label++,{value:l[1],done:!1};case 5:i.label++,r=l[1],l=[0];continue;case 7:l=i.ops.pop(),i.trys.pop();continue;default:if(!((a=(a=i.trys).length>0&&a[a.length-1])||6!==l[0]&&2!==l[0])){i=0;continue}if(3===l[0]&&(!a||l[1]>a[0]&&l[1]0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},bi=function(e,t,n){if(n||2===arguments.length)for(var r,a=0,o=t.length;a0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},rl=function(){var e=(0,L.useRecoilValue)(N.visibility),t=nl(x(),1)[0].zoom,n=(0,L.useRecoilValue)(Ji),r=nl((0,a.useState)(!1),2),o=r[0],i=r[1],l=mt()||n.length;return(0,a.useEffect)((function(){i(!(!l||e))}),[l,n,e]),{bottom:(0,a.useMemo)((function(){return e||(0,zt.Id)()?"0px":"".concat(-750*t.value,"px")}),[e,t]),visibility:o||e||(0,zt.Id)()}},al=function(){return al=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},il=(0,_e.makeStyles)({tooltip:{fontSize:12},modalHide:{display:"none"},groupdisplay:{width:"300px",paddingTop:"8px",fontSize:"24px",whiteSpace:"nowrap",overflowX:"hidden",textOverflow:"ellipsis"},largeGroupDisplay:{width:"300px",paddingTop:"8px",fontSize:"20px",overflowX:"hidden",textOverflow:"ellipsis"}}),ll=function(){var e=ol((0,le.useTranslation)(),1)[0],t=il(),n=(0,E.useHistory)(),o=(0,E.useLocation)().pathname,i=(0,E.useParams)().groupId,l=Or(),s=l.activeMessageConversation,c=l.setActiveMessageConversation,u=Ma().fetchMessages,d=ba(),T=d.getLabelOrContact,A=d.getConversationParticipant,p=gt().initializeCall,_=un().getContactByNumber,I=ol((0,L.useRecoilState)(nn.messages),2),S=I[0],f=I[1],h=ol((0,a.useState)(!1),2),R=h[0],O=h[1],m=ol((0,a.useState)(!1),2),N=m[0],v=m[1],y=gr().ResourceConfig,g=yt();if((0,a.useEffect)((function(){i&&u(i,0)}),[i,u]),(0,a.useEffect)((function(){s&&S?setTimeout((function(){O(!0)}),600):O(!1)}),[s,S]),(0,a.useEffect)((function(){i&&c(parseInt(i,10))}),[i,c]),(0,a.useEffect)((function(){if(R){var e=document.getElementById(Mi);e&&(e.scrollTop=e.scrollHeight)}}),[R]),!s)return(0,r.jsx)("div",{children:(0,r.jsx)(C.CircularProgress,{})});var D=T(s),P="".concat(D.slice(0,80).trim(),"..."),b=(D=D.length>80?P:D).length>30?t.largeGroupDisplay:t.groupdisplay,M=function(e){var t=_(e),r=encodeURIComponent(o);return t?n.push("/contacts/".concat(t.id,"/?referal=").concat(r)):n.push("/contacts/-1/?addNumber=".concat(e,"&referal=").concat(r))},x=s.conversationList.split("+");x=x.filter((function(e){return e!==g}));var k=x.length>0?x[0]:s.participant,w=A(s.conversationList);return(0,r.jsx)(C.Slide,al({direction:"left",in:!!s},{children:(0,r.jsxs)(C.Paper,al({sx:{height:"100%",width:"100%",display:"flex",flexGrow:1,overflowY:"hidden",flexDirection:"column"}},{children:[(0,r.jsx)(zi,{open:N,onClose:function(){v(!1)},conversationList:s.conversationList,addContact:M}),N&&(0,r.jsx)(Ie,{}),(0,r.jsxs)(C.Box,al({display:"flex",justifyContent:"space-between",component:C.Paper,sx:{borderRadius:0}},{children:[(0,r.jsx)(C.Button,al({onClick:function(){f(null),n.push("/messages")}},{children:(0,r.jsx)(Ja.Z,{fontSize:"large"})})),(0,r.jsx)(C.Typography,al({variant:"h5",className:b},{children:D})),!s.isGroupChat&&(0,r.jsx)(C.Tooltip,al({classes:{tooltip:t.tooltip},title:"".concat(e("GENERIC.CALL")," ").concat(k),placement:"bottom"},{children:(0,r.jsx)(C.IconButton,al({onClick:function(){return p(k)}},{children:(0,r.jsx)(Aa.Call,{fontSize:"medium"})}))})),s.isGroupChat?(0,r.jsx)(C.Button,{children:(0,r.jsx)(qa.Z,{onClick:function(){v(!0)},fontSize:"large"})}):s.isGroupChat||w?(s.isGroupChat,null):(0,r.jsx)(C.Button,{children:(0,r.jsx)(bn.Z,{onClick:function(){return M(k)},fontSize:"large"})})]})),R&&s&&y?(0,r.jsx)(xi,{isVoiceEnabled:y.voiceMessage.enabled,messages:S,activeMessageGroup:s}):(0,r.jsx)(Hi,{})]}))}))},El=function(){return El=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i}(ln(),2),i=o[0],l=o[1],E=Ma().deleteConversation;return(0,r.jsx)(C.Fab,El({className:n.root,color:"primary",onClick:i?function(){E(a),l(!1)}:t,onMouseUp:function(){Ue(!1)}},{children:i?(0,r.jsx)(Aa.Delete,{}):(0,r.jsx)(Aa.Add,{})}))},ul=n(20253),dl=ul.Z[800],Tl=Nn.Z.white,Al=_r({palette:{primary:{main:dl,dark:ul.Z[900],light:ul.Z[100],contrastText:Tl}}}),pl=function(){return pl=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&a[a.length-1])||6!==l[0]&&2!==l[0])){i=0;continue}if(3===l[0]&&(!a||l[1]>a[0]&&l[1]0&&a[a.length-1])||6!==l[0]&&2!==l[0])){i=0;continue}if(3===l[0]&&(!a||l[1]>a[0]&&l[1]0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i}((0,le.useTranslation)(),1)[0],i=(0,E.useHistory)(),l=gt().initializeCall,s=mr().addAlert;return(0,r.jsxs)(C.Box,Pl({justifyContent:"space-between",alignItems:"center"},{children:[(0,r.jsx)("div",Pl({style:{float:"left"}},{children:t.number!==a&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(se,Pl({title:o("GENERIC.MESSAGE")},{children:(0,r.jsx)(C.Button,Pl({onClick:function(){i.push("/messages/new?phoneNumber=".concat(t.number))}},{children:(0,r.jsx)(Dl.Z,{className:n.icon})}))})),(0,r.jsx)(se,Pl({title:"".concat(o("GENERIC.CALL"),": ").concat(t.number)},{children:(0,r.jsx)(C.Button,Pl({onClick:function(){l(t.number)}},{children:(0,r.jsx)(Pn.Z,{className:n.icon})}))}))]})})),(0,r.jsx)("div",Pl({style:{float:"right"}},{children:t.number===a?(0,r.jsx)(se,Pl({title:o("GENERIC.DELETE")},{children:(0,r.jsx)(C.Button,Pl({onClick:function(){(0,v.Z)(Bi.DELETE_LISTING,{id:t.id}).then((function(e){if("ok"!==e.status)return s({message:o("MARKETPLACE.FEEDBACK.DELETE_LISTING_FAILED"),type:"error"});s({message:o("MARKETPLACE.FEEDBACK.DELETE_LISTING_SUCCESS"),type:"success"})}))}},{children:(0,r.jsx)(Io.Z,{})}))})):(0,r.jsx)(se,Pl({title:o("GENERIC.REPORT")},{children:(0,r.jsx)(C.Button,Pl({onClick:function(){(0,v.Z)(Bi.REPORT_LISTING,{id:t.id}).then((function(e){if("ok"!==e.status)return s({message:o("MARKETPLACE.FEEDBACK.REPORT_LISTING_FAILED"),type:"error"});s({message:o("MARKETPLACE.FEEDBACK.REPORT_LISTING_SUCCESS"),type:"success"})}))}},{children:(0,r.jsx)(gl.Z,{})}))}))}))]}))},xl=function(){return xl=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i}((0,le.useTranslation)(),1)[0];return(0,r.jsx)(he.H,xl({className:n.root},{children:(0,r.jsx)("div",xl({className:n.content},{children:(0,r.jsxs)(C.Paper,xl({variant:"outlined",className:n.paper},{children:[(0,r.jsxs)("div",xl({style:{margin:10}},{children:[(0,r.jsx)(C.Typography,xl({style:{margin:5},variant:"h5"},{children:t.name})),(0,r.jsx)(C.Typography,xl({variant:"h5",style:{padding:5}},{children:t.title}))]})),t.url?(0,r.jsx)(nt,{children:(0,r.jsx)(Qe,{src:t.url,alt:"".concat(t.name)})}):(0,r.jsxs)(C.Typography,xl({style:{margin:10}},{children:[a("MARKETPLACE.NO_IMAGE"),(0,r.jsx)("span",xl({role:"img","aria-label":"emoji"},{children:"🙁"}))]})),(0,r.jsx)(C.Typography,xl({variant:"body1",className:n.listingContent},{children:t.description})),(0,r.jsx)(Ml,xl({},t))]}))}))}))},Gl=function(){return Gl=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i}((0,a.useState)(0),2),n=t[0],o=t[1];return(0,r.jsxs)(C.BottomNavigation,Wl({value:n,onChange:function(e,t){o(t)},showLabels:!0,className:e.root},{children:[(0,r.jsx)(C.BottomNavigationAction,{component:E.Link,icon:(0,r.jsx)(Bl.Z,{}),to:"/marketplace"}),(0,r.jsx)(C.BottomNavigationAction,{component:E.Link,icon:(0,r.jsx)(Hl.Z,{}),to:"/marketplace/new"})]}))},Kl=n(57626),Yl=function(){return Yl=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},Jl=(0,Z.Z)((function(e){return{root:{width:"100%",margin:"auto",textAlign:"center"},input:{marginBottom:25},textFieldInput:{fontSize:22},multilineFieldInput:{fontSize:20},postButton:{display:"block",margin:"auto",color:"white",background:e.palette.primary.main,width:"80%",fontSize:20}}})),ql=function(){var e=Jl(),t=Zl((0,le.useTranslation)(),1)[0],n=mr().addAlert,o=(0,E.useHistory)(),i=(0,E.useLocation)(),l=i.pathname,s=i.search,c=Qn(),u=Zl(yl(),2),d=u[0],T=u[1],A=oo().clean,p=(0,C.useTheme)(),_=""!==d.title.trim()&&""!==d.description.trim(),I=(0,a.useCallback)((function(){o.push("/camera?".concat(qn().stringify({referal:encodeURIComponent(l+s)})))}),[o,l,s]);return(0,a.useEffect)((function(){(null==c?void 0:c.image)&&(T(Yl(Yl({},d),{url:c.image})),o.replace(Xo({pathname:l,search:s},"image")))}),[null==c?void 0:c.image,o,l,s,T,d]),(0,r.jsxs)("div",Yl({className:e.root},{children:[(0,r.jsx)("h1",{children:(0,r.jsx)(C.Typography,Yl({style:{color:p.palette.text.primary}},{children:t("MARKETPLACE.NEW_LISTING")}))}),(0,r.jsx)(Be,{className:e.input,value:d.title,error:d.title.length>=Fi.title,onChange:function(e){e.currentTarget.value.length!==Fi.title&&T(Yl(Yl({},d),{title:e.currentTarget.value}))},label:t("GENERIC.REQUIRED"),placeholder:t("MARKETPLACE.FORM_TITLE"),inputProps:{className:e.textFieldInput,maxLength:25},style:{width:"80%"},size:"medium",InputLabelProps:{shrink:!0}}),(0,r.jsxs)(C.Box,Yl({display:"flex",alignItems:"center",paddingLeft:5},{children:[(0,r.jsx)("div",{children:(0,r.jsx)(Kl.Z,{})}),(0,r.jsx)("div",{children:(0,r.jsx)(C.Button,Yl({onClick:I},{children:t("MARKETPLACE.CHOOSE_IMAGE")}))})]})),(0,r.jsx)(Be,{className:e.input,placeholder:t("MARKETPLACE.FORM_IMAGE"),value:d.url,error:d.url.length>=Fi.url,onChange:function(e){e.currentTarget.value.length!==Fi.url&&T(Yl(Yl({},d),{url:e.currentTarget.value}))},inputProps:{className:e.textFieldInput},style:{width:"80%"},size:"medium",variant:"outlined"}),(0,r.jsx)(Be,{className:e.input,onChange:function(e){e.currentTarget.value.length!==Fi.description&&T(Yl(Yl({},d),{description:e.currentTarget.value}))},label:t("GENERIC.REQUIRED"),value:d.description,error:d.description.length>=Fi.description,placeholder:t("MARKETPLACE.FORM_DESCRIPTION"),inputProps:{className:e.multilineFieldInput,maxLength:130},style:{width:"80%"},size:"medium",InputLabelProps:{shrink:!0},multiline:!0,rows:4,variant:"outlined"}),(0,r.jsx)(C.Button,Yl({onClick:function(){if(!_)return n({message:t("MARKETPLACE.FEEDBACK.REQUIRED_FIELDS"),type:"error"});(0,v.Z)(Bi.ADD_LISTING,Yl(Yl({},d),{title:A(d.title),description:A(d.description)})).then((function(e){if("ok"!==e.status)return n({message:t(e.errorMsg),type:"error"});n({message:t("MARKETPLACE.FEEDBACK.CREATE_LISTING_SUCCESS"),type:"success"}),o.push("/marketplace"),T({title:"",description:"",url:""})}))},className:e.postButton,disabled:!_},{children:t("MARKETPLACE.POST_LISTING")}))]}))},Xl=function(){return(0,r.jsx)("div",{children:(0,r.jsx)(ql,{})})},Ql=n(85942),$l=n.n(Ql),eE=(Sl=function(e,t){return Sl=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},Sl(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Sl(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),tE=function(){return tE=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},lE=function(e,t){var n;3===(e=e.replace(/^#/,"")).length&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]);var r=iE(e.match(/.{2}/g),3),a=r[0],o=r[1],i=r[2];a=(n=iE([parseInt(a,16)+t,parseInt(o,16)+t,parseInt(i,16)+t],3))[0],o=n[1],i=n[2],a=Math.max(Math.min(255,a),0).toString(16),o=Math.max(Math.min(255,o),0).toString(16),i=Math.max(Math.min(255,i),0).toString(16);var l=(a.length<2?"0":"")+a,E=(o.length<2?"0":"")+o,s=(i.length<2?"0":"")+i;return"#".concat(l).concat(E).concat(s)},EE=$l().div(hl||(hl=aE(["\n height: 100%;\n width: 100%;\n\n color: ",";\n background: ",";\n\n display: flex;\n align-items: center;\n justify-content: center;\n\n background-size: 400% 400%;\n animation: gradient 6s ease infinite;\n\n @keyframes gradient {\n 0% {\n background-position: 0% 50%;\n }\n 50% {\n background-position: 100% 50%;\n }\n 100% {\n background-position: 0% 50%;\n }\n }\n"],["\n height: 100%;\n width: 100%;\n\n color: ",";\n background: ",";\n\n display: flex;\n align-items: center;\n justify-content: center;\n\n background-size: 400% 400%;\n animation: gradient 6s ease infinite;\n\n @keyframes gradient {\n 0% {\n background-position: 0% 50%;\n }\n 50% {\n background-position: 100% 50%;\n }\n 100% {\n background-position: 0% 50%;\n }\n }\n"])),(function(e){var t=e.color;return null!=t?t:"#fff"}),(function(e){var t=e.background;return null!=t?t:"#222"})),sE=$l().div(Rl||(Rl=aE(["\n position: absolute;\n bottom: 0;\n left: 0;\n padding: 2rem;\n"],["\n position: absolute;\n bottom: 0;\n left: 0;\n padding: 2rem;\n"]))),cE=$l().div(Ol||(Ol=aE(["\n svg {\n width: 3.5rem;\n height: 3.5rem;\n }\n\n animation: 3s linear 0.25s infinite alternate breath;\n\n @keyframes breath {\n 0% {\n transform: scale(1);\n }\n\n 100% {\n transform: scale(1.5);\n }\n }\n"],["\n svg {\n width: 3.5rem;\n height: 3.5rem;\n }\n\n animation: 3s linear 0.25s infinite alternate breath;\n\n @keyframes breath {\n 0% {\n transform: scale(1);\n }\n\n 100% {\n transform: scale(1.5);\n }\n }\n"]))),uE=function(e){var t=lE(e,30),n=lE(e,-30);return"linear-gradient(45deg,".concat(t,", ").concat(n,", ").concat(t,", ").concat(n,", ").concat(n,")")},dE=function(e){var t=e.backgroundColor,n=e.icon,a=uE(t);return(0,r.jsxs)(EE,oE({},e,{background:a},{children:[(0,r.jsx)(cE,{children:n}),(0,r.jsx)(sE,{children:(0,r.jsx)(C.CircularProgress,{color:"inherit"})})]}))};function TE(e){return function(t){var n,i=t.children,l=(0,le.useTranslation)().t,E=j(),s=uE(null!==(n=e.backgroundColor)&&void 0!==n?n:"#222"),c=(0,a.useMemo)((function(){return(0,C.createTheme)((0,Ar.h)(E,null==e?void 0:e.theme))}),[E]);return(0,r.jsx)(rE,oE({background:s,color:e.color,t:l},{children:(0,r.jsx)(C.StyledEngineProvider,oE({injectFirst:!0},{children:(0,r.jsx)(o().Suspense,oE({fallback:(0,r.jsx)(dE,oE({},e))},{children:(0,r.jsx)(C.ThemeProvider,oE({theme:c},{children:i}))}))}))}))}}var AE,pE=function(){return pE=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i}((0,le.useTranslation)(),1)[0],a=ci(),o=Qn(),i=(0,E.useHistory)(),l=(0,C.useTheme)(),s=o.referal&&decodeURIComponent(o.referal);return e&&e.length?(0,r.jsx)(C.List,hE({disablePadding:!0},{children:e.map((function(e){return(0,r.jsx)(C.ListItem,hE({button:!0,divider:!0,onClick:function(){return function(e){s?i.push(SE(fE(s),"note",String(e.id))):(t(e),a(!0))}(e)}},{children:(0,r.jsx)(C.ListItemText,{children:(0,r.jsx)(C.Typography,hE({style:{color:l.palette.text.primary}},{children:e.title}))})}),e.id)}))})):(0,r.jsx)(C.Box,hE({display:"flex",justifyContent:"center",alignItems:"center",flexDirection:"column",height:"100%"},{children:(0,r.jsx)(C.Typography,hE({color:"inherit",variant:"h6",style:{fontWeight:300,color:l.palette.text.primary}},{children:n("NOTES.FEEDBACK.NO_NOTES")}))}))},OE=(0,Z.Z)((function(e){return{modalRoot:{zIndex:20,position:"absolute",height:"99%",width:"100%",background:e.palette.background.default},input:{marginBottom:20},inputPropsTitle:{fontSize:28},inputPropsContent:{fontSize:20,lineHeight:1.2}}})),mE=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,a,o=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},CE=function(e,t,n){if(n||2===arguments.length)for(var r,a=0,o=t.length;a0&&a[a.length-1])||6!==l[0]&&2!==l[0])){i=0;continue}if(3===l[0]&&(!a||l[1]>a[0]&&l[1]0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},gE=function(){var e=OE(),t=function(){var e,t=mr().addAlert,n=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,a,o=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i}((0,le.useTranslation)(),1)[0],r=(e=(0,L.useSetRecoilState)(oi),{deleteLocalNote:(0,a.useCallback)((function(t){e((function(e){return CE([],mE(e),!1).filter((function(e){return e.id!==t}))}))}),[e]),addLocalNote:(0,a.useCallback)((function(t){e((function(e){return CE([t],mE(e),!1)}))}),[e]),updateLocalNote:(0,a.useCallback)((function(t){e((function(e){var n=e.findIndex((function(e){return e.id===t.id})),r=CE([],mE(e),!1);return r[n]=t,r}))}),[e])}),o=r.addLocalNote,i=r.deleteLocalNote,l=r.updateLocalNote,E=(0,a.useCallback)((function(e){var r=e.title,a=e.content;return LE(void 0,void 0,void 0,(function(){var e;return NE(this,(function(i){switch(i.label){case 0:return[4,(0,v.Z)(ko.ADD_NOTE,{title:r,content:a})];case 1:return"ok"!==(e=i.sent()).status?[2,t({message:n("NOTES.FEEDBACK.ADD_FAILED"),type:"error"})]:(o(e.data),t({message:n("NOTES.FEEDBACK.ADD_SUCCESS"),type:"success"}),[2])}}))}))}),[t,o,n]),s=(0,a.useCallback)((function(e){return LE(void 0,void 0,void 0,(function(){var r;return NE(this,(function(a){switch(a.label){case 0:return[4,(0,v.Z)(ko.DELETE_NOTE,e)];case 1:return"ok"!==(r=a.sent()).status?[2,t({message:n("NOTES.FEEDBACK.DELETE_FAILED"),type:"error"})]:(i(r.data.id),t({message:n("NOTES.FEEDBACK.DELETE_SUCCESS"),type:"success"}),[2])}}))}))}),[t,i,n]),c=(0,a.useCallback)((function(e){var r=e.id,a=e.content,o=e.title;return LE(void 0,void 0,void 0,(function(){return NE(this,(function(e){switch(e.label){case 0:return[4,(0,v.Z)(ko.UPDATE_NOTE,{id:r,content:a,title:o})];case 1:return"ok"!==e.sent().status?[2,t({message:n("NOTES.FEEDBACK.UPDATE_FAILED"),type:"error"})]:(l({id:r,title:o,content:a}),t({message:n("NOTES.FEEDBACK.UPDATE_SUCCESS"),type:"success"}),[2])}}))}))}),[t,n,l]);return{addNewNote:E,deleteNote:s,updateNote:c}}(),n=t.addNewNote,o=t.deleteNote,i=t.updateNote,l=yE((0,L.useRecoilState)(li),2),s=l[0],c=l[1],u=yE((0,le.useTranslation)(),1)[0],d=yE(si(),2),T=d[0],A=d[1],p=yE((0,a.useState)(""),2),_=p[0],I=p[1],S=yE((0,a.useState)(""),2),f=S[0],h=S[1],R=(0,C.useTheme)(),O=(0,E.useHistory)(),m=(0,E.useLocation)(),N=!Boolean(null==T?void 0:T.id);(0,a.useEffect)((function(){null!==T&&(h(T.content),I(T.title))}),[T]);var y=function(){c(!1)};return null===T?null:(0,r.jsx)(C.Slide,vE({direction:"left",in:s,mountOnEnter:!0,unmountOnExit:!0,onExited:function(){A(null),m.search&&O.goBack()}},{children:(0,r.jsx)(C.Paper,vE({className:e.modalRoot,square:!0},{children:(0,r.jsx)(C.Container,{children:(0,r.jsxs)(C.Box,{children:[(0,r.jsx)(C.Box,vE({py:2},{children:(0,r.jsx)(C.Button,vE({color:"primary",size:"large",startIcon:(0,r.jsx)(Ja.Z,{fontSize:"large"}),onClick:y},{children:u("APPS_NOTES")}))})),(0,r.jsx)(Be,{className:e.input,maxRows:1,label:u("GENERIC.TITLE"),inputProps:{className:e.inputPropsTitle,maxLength:25},fullWidth:!0,value:_,onChange:function(e){I(e.target.value)}}),(0,r.jsx)(Be,{className:e.input,inputProps:{className:e.inputPropsContent,maxLength:250},label:u("GENERIC.CONTENT"),multiline:!0,fullWidth:!0,rows:16,variant:"outlined",value:f,onChange:function(e){h(e.target.value)}}),(0,r.jsxs)(C.Typography,vE({paragraph:!0},{children:[f.length,"/250"]})),N?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(C.Box,vE({display:"inline",p:1},{children:(0,r.jsx)(C.Button,vE({variant:"contained",disabled:_.length<=0,onClick:function(){n({title:_,content:f}).then((function(){m.search&&O.goBack(),c(!1)})).catch(console.error)}},{children:(0,r.jsx)(C.Typography,vE({style:_.length<=0&&{color:R.palette.text.disabled}||{color:R.palette.text.primary}},{children:u("GENERIC.SAVE")}))}))})),(0,r.jsx)(C.Box,vE({display:"inline",p:1},{children:(0,r.jsx)(Tt,vE({color:"error",variant:"contained",onClick:y},{children:(0,r.jsx)(C.Typography,vE({style:{color:R.palette.text.primary}},{children:u("GENERIC.CANCEL")}))}))}))]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(C.Box,vE({display:"inline",p:1},{children:(0,r.jsx)(C.Button,vE({color:"primary",variant:"contained",onClick:function(){i({id:T.id,title:_,content:f}).then((function(){c(!1)})).catch(console.error)},disabled:_.length<=0},{children:(0,r.jsx)(C.Typography,vE({style:_.length<=0&&{color:R.palette.text.disabled}||{color:R.palette.text.primary}},{children:u("GENERIC.UPDATE")}))}))})),(0,r.jsx)(C.Box,vE({display:"inline",p:1},{children:(0,r.jsx)(Tt,vE({color:"error",variant:"contained",onClick:function(){o({id:T.id}).then((function(){c(!1)})).catch(console.error)}},{children:(0,r.jsx)(C.Typography,vE({style:{color:R.palette.text.primary}},{children:u("GENERIC.DELETE")}))}))}))]})]})})}))}))},DE=n(52464),PE=(0,Z.Z)((function(e){return{backgroundModal:{background:"black",opacity:"0.6",position:"absolute",top:0,left:0,right:0,bottom:0,zIndex:5},absolute:{position:"absolute",right:e.spacing(3),bottom:e.spacing(5)}}})),bE=n(429),ME=bE.Z[800],xE=Nn.Z.white,kE=Nn.Z.white,wE=_r({palette:{primary:{main:ME,dark:bE.Z[900],light:bE.Z[500],contrastText:kE}}}),GE=function(){return GE=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},HE=function(){var e=FE(),t=(0,E.useHistory)(),n=Qn(),a=(0,L.useRecoilValue)(fo.photos),o=BE(ho(),2),i=o[0],l=o[1],s=BE((0,L.useRecoilState)(fo.checkedPhotos),2),c=s[0],u=s[1],d=n.referal?decodeURIComponent(n.referal):"/camera/image";return(0,r.jsx)("div",{children:(0,r.jsxs)(C.Box,UE({display:"flex",flexWrap:"wrap",alignContent:"flex-start",className:e.root},{children:[!!a.length&&(0,r.jsx)(C.Box,UE({position:"absolute",top:10,right:3},{children:(0,r.jsx)(C.IconButton,UE({onClick:function(){l((function(e){return!e}))}},{children:(0,r.jsx)(za.Z,{})}))})),a.map((function(n){return i?(0,r.jsx)(C.Box,{children:(0,r.jsx)("div",UE({style:{backgroundImage:"url(".concat(n.image,")")},className:e.photo,onClick:function(){return e=n.id,t=c.indexOf(e),r=function(e,t,n){if(n||2===arguments.length)for(var r,a=0,o=t.length;a0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i}((0,le.useTranslation)(),1)[0];return(0,r.jsx)(qe,VE({visible:!!t,handleClose:n},{children:(0,r.jsx)("div",VE({className:o.shareModal},{children:(0,r.jsxs)("div",VE({className:o.innerShareModal},{children:[(0,r.jsx)("h4",{children:l("CAMERA.COPY_IMAGE")}),(0,r.jsx)(C.Button,VE({onClick:function(){zr(t.image),i.push(a)},variant:"outlined",className:o.button},{children:"Copy image"}))]}))}))}))},YE=function(){return YE=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},JE=function(){var e=ZE((0,a.useState)(null),2),t=e[0],n=e[1],o=WE(),i=(0,E.useHistory)(),l=Qn(),s=mo().deletePhoto,c=mr().addAlert,u=ZE((0,le.useTranslation)(),1)[0],d=l.referal||"/camera",T=(0,a.useMemo)((function(){return{id:parseInt(l.id),image:l.image}}),[l]),A=(0,a.useCallback)((function(){n(T)}),[T]);return T?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(KE,{referal:d,meta:t,onClose:function(){return n(null)}}),(0,r.jsxs)(C.Paper,YE({className:o.modal},{children:[(0,r.jsx)("div",{className:t?o.backgroundModal:null}),(0,r.jsx)(C.Button,YE({onClick:function(){i.push(d)}},{children:(0,r.jsx)(Ja.Z,{})})),(0,r.jsx)("div",{className:o.image,style:{backgroundImage:"url(".concat(T.image,")")}}),(0,r.jsxs)("div",YE({className:o.actionDiv},{children:[(0,r.jsx)(C.Button,YE({onClick:function(){(0,v.Z)(ao.DELETE_PHOTO,{image:T.image}).then((function(e){if("ok"!==e.status)return c({message:u("CAMERA.FAILED_TO_DELETE"),type:"error"});s(T.image),i.goBack()}))}},{children:(0,r.jsx)(Io.Z,{fontSize:"large"})})),(0,r.jsx)(C.Button,YE({onClick:A},{children:(0,r.jsx)(zE.Z,{fontSize:"large"})}))]}))]}))]}):null},qE=function(){return qE=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},QE=(0,rt.ZP)(C.Fab)((function(e){var t=e.theme;return{position:"absolute",bottom:t.spacing(5),right:t.spacing(3)}})),$E=function(){var e=XE(ho(),2),t=e[0],n=e[1],o=XE((0,a.useState)(!1),2),i=o[0],l=o[1],E=(0,L.useRecoilValue)(fo.checkedPhotos),s=mo(),c=s.takePhoto,u=s.deletePhotos,d=mr().addAlert,T=XE((0,le.useTranslation)(),1)[0],A=(0,C.useTheme)();return i?(0,r.jsx)(QE,qE({color:"primary",disabled:!0},{children:(0,r.jsx)(C.CircularProgress,{})})):(0,r.jsx)(QE,qE({color:"primary",onClick:t?function(){(0,v.Z)(ao.DELETE_MULTIPLE_PHOTOS,E).then((function(e){if("ok"!==e.status)return d({message:T("CAMERA.FAILED_TO_DELETE"),type:"error"});u(E),n(!1)}))}:function(){l(!0),(0,v.Z)(ao.TAKE_PHOTO).then((function(e){if("ok"!==e.status)return l(!1),d({message:T(e.errorMsg),type:"error"});c(e.data),l(!1)}))}},{children:t?(0,r.jsx)(Aa.Delete,{style:{color:A.palette.error.main}}):(0,r.jsx)(Aa.Add,{style:{color:A.palette.primary.main}})}))},es=function(){return es=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},_s="BrowserURLBar",Is={urlInput:"".concat(_s,"-urlInput"),urlInputFocused:"".concat(_s,"-urlInputFocused"),root:"".concat(_s,"-root")},Ss=(0,rt.ZP)(C.Box)((function(e){var t,n=e.theme;return(t={})["& .".concat(Is.urlInput)]={borderRadius:18,borderWidth:1,borderStyle:"solid",paddingRight:10,paddingLeft:10,marginLeft:5,borderColor:"#787878FF",color:n.palette.text.disabled,transition:"color 0.1s ease"},t["&.".concat(Is.root)]={},t})),fs=function(e){var t=e.goBack,n=e.reloadPage,o=e.browserHasHistory,i=e.browserUrl,l=e.setBrowser,E=(0,a.useRef)(null),s=ps((0,a.useState)(""),2),c=s[0],u=s[1],d=ps((0,a.useState)(!1),2),T=d[0],A=d[1],p=i.replace(/(^\w+:|^)\/\//,""),_=T?c:p;return(0,r.jsxs)(Ss,As({display:"flex",py:1,className:Is.root,px:1},{children:[(0,r.jsx)(C.IconButton,As({size:"small",onClick:function(){return n()}},{children:(0,r.jsx)(Aa.Cached,{})})),o&&(0,r.jsx)(C.IconButton,As({size:"small",onClick:function(){return t()}},{children:(0,r.jsx)(Aa.KeyboardArrowLeft,{})})),(0,r.jsx)(He,{className:Is.urlInput,ref:E,fullWidth:!0,onChange:function(e){u(e.target.value)},onKeyDown:function(e){"Enter"===e.code&&(l(c),e.currentTarget.blur())},value:_,classes:{focused:Is.urlInputFocused},onFocus:function(e){u(i),A(!0)},spellCheck:!1,onBlur:function(e){A(!1),u(i)}})]}))},hs=function(e){return new Promise((function(t){return setTimeout(t,e)}))},Rs=function(){return Rs=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},ms="BrowserApp",Cs={iframe:"".concat(ms,"-iframe"),root:"".concat(ms,"-root")},Ls=(0,rt.ZP)(pe.O)((function(){var e;return(e={})["& .".concat(Cs.iframe)]={height:"100%",width:"100%",zoom:.5,border:"none"},e["& .".concat(Cs.root)]={height:"100%",display:"flex",flexDirection:"column"},e}));!function(e){e[e.SET_URL=0]="SET_URL",e[e.ADD_HISTORY=1]="ADD_HISTORY",e[e.RELOAD=2]="RELOAD"}(AE||(AE={}));var Ns,vs,ys=function(e,t){switch(t.type){case AE.ADD_HISTORY:return"about:blank"===t.payload?e:Rs(Rs({},e),{browserHistory:e.browserHistory.concat(t.payload)});case AE.SET_URL:return Rs(Rs({},e),{browserUrl:t.payload});default:throw new Error("Invalid reducer action type")}},gs=function(){var e=Os(oa(),1)[0].appSettings,t=Os((0,a.useReducer)(ys,{browserUrl:e.browserHomePage,browserHistory:[e.browserHomePage]}),2),n=t[0],o=t[1],i=n.browserHistory,l=n.browserUrl,E=(0,a.useRef)(null),s=function(e){var t=e.match(/^(http|https):\/\//)?e:"https://"+e;o({payload:l,type:AE.ADD_HISTORY}),o({payload:t,type:AE.SET_URL})};return(0,r.jsx)(Ls,Rs({id:"browser"},{children:(0,r.jsxs)(ae,Rs({className:Cs.root},{children:[(0,r.jsx)(fs,{browserUrl:l,browserHasHistory:i.length>1,setBrowser:s,goBack:function(){if(!(i.length<=1)){var e=i[i.length-1];e!==l&&s(e)}},reloadPage:function(){return e=void 0,t=void 0,r=function(){var e;return function(e,t){var n,r,a,o,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return o={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function l(l){return function(E){return function(l){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,l[0]&&(i=0)),i;)try{if(n=1,r&&(a=2&l[0]?r.return:l[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,l[1])).done)return a;switch(r=0,a&&(l=[2&l[0],a.value]),l[0]){case 0:case 1:a=l;break;case 4:return i.label++,{value:l[1],done:!1};case 5:i.label++,r=l[1],l=[0];continue;case 7:l=i.ops.pop(),i.trys.pop();continue;default:if(!((a=(a=i.trys).length>0&&a[a.length-1])||6!==l[0]&&2!==l[0])){i=0;continue}if(3===l[0]&&(!a||l[1]>a[0]&&l[1]0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i}((0,le.useTranslation)(),1)[0],l=yo(a.voiceMessage),E=l.play,s=l.pause,c=l.playing,u=l.currentTime,d=l.duration,T=isNaN(d)||d==1/0?0:Math.trunc(u)/Math.trunc(d)*100,A=(t=a.location,n=a.job,t&&n?"".concat(t," - ").concat(n):t||n||void 0);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(C.CardContent,js({className:o.tags},{children:a.tagList.map((function(e){return(0,r.jsx)(C.Chip,{className:o.tag,label:e,color:"primary"})}))})),(0,r.jsx)(C.CardMedia,{className:o.media,image:a.image||"https://upload.wikimedia.org/wikipedia/commons/a/ac/No_image_available.svg",title:a.name}),(0,r.jsxs)(C.CardContent,js({className:o.content},{children:[(0,r.jsx)(C.Typography,js({gutterBottom:!0,variant:"h4",component:"h2"},{children:a.name})),(0,r.jsx)(C.Typography,js({gutterBottom:!0,color:"textSecondary",component:"p"},{children:i("MATCH.MESSAGES.PROFILE_LAST_ACTIVE",{lastActive:a.lastActiveFormatted})})),A&&(0,r.jsx)(C.Typography,js({gutterBottom:!0,variant:"body1",color:"textSecondary",component:"p"},{children:A})),(0,r.jsx)(C.Typography,js({variant:"body2",color:"textSecondary",component:"p"},{children:a.bio})),a.voiceMessage&&(0,r.jsx)(C.Box,{children:(0,r.jsxs)(C.Box,js({display:"flex",alignItems:"center"},{children:[(0,r.jsx)(C.IconButton,js({onClick:c?s:E},{children:c?(0,r.jsx)(Do.Z,{sx:{color:"#232323"}}):(0,r.jsx)(go.Z,{sx:{color:"#232323"}})})),(0,r.jsx)(C.Box,js({sx:{width:"60%"}},{children:!T&&c?(0,r.jsx)(C.LinearProgress,{}):(0,r.jsx)(C.LinearProgress,{variant:"determinate",value:T})}))]}))})]}))]})},Bs=function(){return Bs=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&a[a.length-1])||6!==l[0]&&2!==l[0])){i=0;continue}if(3===l[0]&&(!a||l[1]>a[0]&&l[1]0&&a[a.length-1])||6!==l[0]&&2!==l[0])){i=0;continue}if(3===l[0]&&(!a||l[1]>a[0]&&l[1]0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i};xn().extend(bo());var ec=function(e){var t=e.isRecording,n=e.startRecording,a=e.stopRecording;return(0,r.jsx)(C.Box,{children:(0,r.jsxs)(C.ButtonGroup,{children:[(0,r.jsx)(C.Tooltip,qs({title:"Record voice message",placement:"right"},{children:(0,r.jsx)(C.IconButton,qs({disabled:t,color:"error",size:"small",onClick:n},{children:(0,r.jsx)(Ii.Z,{})}))})),t&&(0,r.jsx)(C.IconButton,qs({color:"error",size:"small",onClick:t&&a},{children:(0,r.jsx)(Si.Z,{})}))]})})},tc=function(e){var t=e.playing,n=e.play,a=e.pause;return(0,r.jsx)(C.Box,{children:(0,r.jsx)(C.ButtonGroup,{children:(0,r.jsx)(C.IconButton,qs({size:"small"},{children:t?(0,r.jsx)(Do.Z,{onClick:a}):(0,r.jsx)(go.Z,{onClick:n})}))})})},nc=function(e){var t=e.open,n=e.closeModal,o=e.setVoiceMessage,i=Ri(),l=i.blob,E=i.audio,s=i.recordingState,c=i.startRecording,u=i.stopRecording,d=$s((0,a.useState)(null),2),T=d[0],A=d[1],p=$s((0,a.useState)(!1),2),_=p[0],I=p[1],S=(0,a.useRef)(new Audio),f=S.current.duration;return(0,a.useEffect)((function(){S.current.src=E}),[E]),(0,a.useEffect)((function(){S.current&&(S.current.ontimeupdate=function(){A(Math.trunc(S.current.currentTime))})})),(0,r.jsxs)(qe,qs({visible:t,handleClose:n},{children:[(0,r.jsxs)(C.Box,qs({display:"flex",alignItems:"center",justifyContent:"flex-start",py:1},{children:[(0,r.jsx)(C.Box,qs({pl:1},{children:E&&!s.isRecording?(0,r.jsx)(tc,{play:function(){return Xs(void 0,void 0,void 0,(function(){return Qs(this,(function(e){switch(e.label){case 0:return[4,S.current.play()];case 1:return e.sent(),I(!0),[2]}}))}))},pause:function(){S.current.pause(),I(!1)},playing:_}):(0,r.jsx)(ec,{startRecording:function(){return Xs(void 0,void 0,void 0,(function(){return Qs(this,(function(e){switch(e.label){case 0:return[4,c()];case 1:return e.sent(),[2]}}))}))},stopRecording:function(){u()},isRecording:s.isRecording})})),E?s.isRecording?(0,r.jsx)(C.Typography,{children:"Recording..."}):E&&!isNaN(f)?(0,r.jsx)(C.Box,{children:(0,r.jsxs)(C.Typography,{children:[xn().duration(1e3*T).format("mm:ss"),f===1/0?null:" - ".concat(xn().duration(1e3*Math.trunc(f)).format("mm:ss"))]})}):(0,r.jsx)(C.Typography,{children:"Click to play voice message"}):(0,r.jsx)(C.Typography,{children:"Record Voice Message"})]})),!s.isRecording&&E&&l&&(0,r.jsx)(C.Button,qs({variant:"contained",onClick:function(){l&&(o(l),n())}},{children:"Save"}))]}))},rc=function(){return rc=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},oc=(0,Z.Z)({root:{position:"relative",width:"100%",height:"calc(100% - 40px)",padding:"15px"},card:{position:"absolute",margin:"15px 15px 25px 15px",height:"calc(100% - 80px)",width:"calc(100% - 30px)",overflow:"hidden"},spacer:{height:"8px"}}),ic=function(e){var t=this,n=e.profile,o=e.showPreview,i=oc(),l=ac((0,le.useTranslation)(),1)[0],s=gr().ResourceConfig,c=mr().addAlert,u=(0,L.useSetRecoilState)(Js.myProfile),d=(0,E.useHistory)(),T=(0,E.useLocation)(),A=T.pathname,p=T.search,_=Qn(),I=ac((0,a.useState)((null==n?void 0:n.image)||""),2),S=I[0],f=I[1],h=ac((0,a.useState)((null==n?void 0:n.name)||""),2),R=h[0],O=h[1],m=ac((0,a.useState)((null==n?void 0:n.bio)||""),2),N=m[0],y=m[1],g=ac((0,a.useState)((null==n?void 0:n.job)||""),2),D=g[0],P=g[1],b=ac((0,a.useState)((null==n?void 0:n.location)||""),2),M=b[0],x=b[1],k=ac((0,a.useState)((null==n?void 0:n.tags)||""),2),w=k[0],G=k[1],j=ac((0,a.useState)(null),2),F=j[0],U=j[1],B=ac((0,a.useState)(!1),2),H=B[0],W=B[1],z=yo(n.voiceMessage),V=z.play,K=z.pause,Y=z.playing,Z=z.currentTime,J=z.duration,q=isNaN(J)||J==1/0?0:Math.trunc(Z)/Math.trunc(J)*100,X=(0,a.useCallback)((function(){d.push("/camera?".concat(qn().stringify({referal:encodeURIComponent(A+p)})))}),[d,A,p]),Q=rc(rc({},n),{image:S,name:R,bio:N,location:M,job:D,tagList:w.split(",").map((function(e){return e.trim()}))});return(0,a.useEffect)((function(){(null==_?void 0:_.image)&&(f(_.image),d.replace(Xo({pathname:A,search:p},"image")))}),[_,d,f,A,p]),n||s.match.allowEditableProfileName?o?(0,r.jsx)(C.Card,rc({raised:!0,className:i.card},{children:(0,r.jsx)(Us,{profile:Q})})):(0,r.jsxs)("div",rc({className:i.root},{children:[(0,r.jsx)(nc,{open:H,closeModal:function(){W((function(e){return!e}))},setVoiceMessage:function(e){U(e)}}),H&&(0,r.jsx)(Ie,{}),(0,r.jsxs)(C.Box,{children:[(0,r.jsx)(Gs,{label:l("MATCH.EDIT_PROFILE_IMAGE"),value:Q.image,handleChange:f,allowChange:!0}),(0,r.jsx)(C.Box,rc({mt:1,mb:2},{children:(0,r.jsx)(Se.z,rc({variant:"contained",onClick:X},{children:"Choose image"}))}))]}),(0,r.jsx)(Gs,{label:l("MATCH.EDIT_PROFILE_NAME"),value:R,handleChange:O,allowChange:s.match.allowEditableProfileName}),(0,r.jsx)(Gs,{label:l("MATCH.EDIT_PROFILE_BIO"),value:Q.bio,handleChange:y,multiline:!0,maxLength:250}),(0,r.jsx)(Gs,{label:l("MATCH.EDIT_PROFILE_LOCATION"),value:Q.location,handleChange:x}),(0,r.jsx)(Gs,{label:l("MATCH.EDIT_PROFILE_JOB"),value:Q.job,handleChange:P,maxLength:50}),(0,r.jsx)(Gs,{label:l("MATCH.EDIT_PROFILE_TAGS"),value:w,handleChange:G}),s&&s.voiceMessage&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(C.Typography,rc({variant:"body2",color:"textSecondary",component:"p",sx:{marginTop:"8px"}},{children:l("MATCH.EDIT_VOICE_MESSAGE")})),(0,r.jsxs)(C.Stack,rc({direction:"row"},{children:[(0,r.jsx)(C.IconButton,rc({onClick:function(){return W(!0)}},{children:(0,r.jsx)(Qa.Z,{})})),n.voiceMessage&&(0,r.jsx)(C.Box,rc({sx:{width:"100%"}},{children:(0,r.jsxs)(C.Box,rc({display:"flex",alignItems:"center"},{children:[(0,r.jsx)(C.IconButton,rc({onClick:Y?K:V},{children:Y?(0,r.jsx)(Do.Z,{}):(0,r.jsx)(go.Z,{})})),(0,r.jsx)(C.Box,rc({sx:{width:"60%"}},{children:!q&&Y?(0,r.jsx)(C.LinearProgress,{}):(0,r.jsx)(C.LinearProgress,{variant:"determinate",value:q})}))]}))}))]}))]}),(0,r.jsx)(ht,{handleClick:function(){return e=t,r=void 0,o=function(){var e,t,r,a;return function(e,t){var n,r,a,o,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return o={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function l(l){return function(E){return function(l){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,l[0]&&(i=0)),i;)try{if(n=1,r&&(a=2&l[0]?r.return:l[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,l[1])).done)return a;switch(r=0,a&&(l=[2&l[0],a.value]),l[0]){case 0:case 1:a=l;break;case 4:return i.label++,{value:l[1],done:!1};case 5:i.label++,r=l[1],l=[0];continue;case 7:l=i.ops.pop(),i.trys.pop();continue;default:if(!((a=(a=i.trys).length>0&&a[a.length-1])||6!==l[0]&&2!==l[0])){i=0;continue}if(3===l[0]&&(!a||l[1]>a[0]&&l[1]0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},Ec=function(){var e=lc((0,L.useRecoilState)(Js.myProfile),2),t=e[0],n=e[1],r=lc((0,L.useRecoilState)(Js.noProfileExists),2);return{profile:t,setProfile:n,noProfileExists:r[0],setNoProfileExists:r[1]}},sc=function(){return sc=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},uc=(0,Z.Z)({root:{height:"100%",width:"100%"},switch:{marginLeft:"15px"}}),dc=function(){var e=Ec(),t=e.profile,n=e.noProfileExists,o=uc(),i=cc((0,le.useTranslation)(),1)[0],l=(0,C.useTheme)(),E=cc((0,a.useState)(!1),2),s=E[0],c=E[1];return t||n?(0,r.jsxs)(C.Box,sc({className:o.root},{children:[(0,r.jsx)(C.Box,sc({className:o.switch},{children:(0,r.jsx)(C.FormControlLabel,{control:(0,r.jsx)(C.Switch,{checked:s,onChange:function(){c((function(e){return!e}))}}),label:(0,r.jsx)(C.Typography,sc({style:{color:l.palette.text.primary}},{children:i("MATCH.EDIT_PROFILE_PREVIEW")}))})})),(0,r.jsx)(ic,{showPreview:s,profile:t})]})):(0,r.jsx)(Ms,{})},Tc=function(){var e=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,a,o=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i}((0,L.useRecoilState)(Js.profiles),1)[0],t=(0,L.useRecoilValue)(Js.errorLoadingProfiles),n=e?e.filter((function(e){return!e.viewed})):null;return{profiles:e,activeProfile:e?n[0]:null,error:t}},Ac=n(72203),pc=n(19465),_c=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ic=function(e){function t(t,n,r,a){var o=e.call(this,t,n)||this;return o.onMouseMove=function(e){e.preventDefault();var t=e.clientX,n=e.clientY,r=o.deltas(t,n).deltaX;o.onDrag(r),o._onMouseMove(t,n)},o.onMouseUp=function(){o.onDrop(),o._onMouseUp()},o.onDrag=r,o.onDrop=a,o}return _c(t,e),t}((function(e,t){void 0===t&&(t=null);var n=this;this.width=0,this.initialX=0,this.initialY=0,this.mouseDownInitialX=0,this.mouseDownInitialY=0,this.updatedX=0,this.updatedY=0,this.mouseDownX=0,this.mouseDownY=0,this.onMouseDown=function(e){e.preventDefault(),n.mouseDownX=e.clientX,n.mouseDownY=e.clientY,n.mouseDownInitialX=n.mouseDownX,n.mouseDownInitialY=n.mouseDownY,document.onmouseup=n.onMouseUp,document.onmousemove=n.onMouseMove},this.onMouseMove=function(e){e.preventDefault();var t=e.clientX,r=e.clientY;n._onMouseMove(t,r)},this._onMouseMove=function(e,t){if(n.updatedX=n.mouseDownX-e,n.updatedY=n.mouseDownY-t,n.mouseDownX=e,n.mouseDownY=t,n.element.style.top=n.element.offsetTop-n.updatedY+"px",n.element.style.left=n.element.offsetLeft-n.updatedX+"px",n.useRotation){var r=n.deltas(n.mouseDownX,n.mouseDownY).deltaX/n.width,a=-1*n.maxRotationDeg*r;n.element.style.webkitTransform="rotate(".concat(a,"deg)")}},this.onMouseUp=function(e){e.preventDefault(),n._onMouseUp()},this._onMouseUp=function(){n.cleanup(),n.element.style.left="".concat(n.initialX,"px"),n.element.style.top="".concat(n.initialY,"px"),n.useRotation&&(n.element.style.webkitTransform="rotate(0deg)")},this.cleanup=function(){document.onmouseup=null,document.onmousemove=null},this.deltas=function(e,t){return{deltaX:e-n.mouseDownInitialX,deltaY:t-n.mouseDownInitialX}},this.element=e.current,this.width=this.element.clientWidth,this.maxRotationDeg=t,this.useRotation=null!==t,this.element.onmousedown=this.onMouseDown})),Sc=function(){return Sc=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},Lc=(0,Z.Z)({root:{position:"relative",margin:"15px 15px 25px 15px",height:"calc(95% - 90px)",width:"calc(100% - 30px)",overflow:"hidden",cursor:"pointer"},media:{height:"60%"},content:{height:"40%"},status:{position:"absolute",zIndex:20,padding:"5px 15px",top:40,fontSize:"28px",fontWeight:"bold"},statusVisible:{transition:"opacity 0.25s ease-in-out"},statusNull:{transition:"opacity 0s"},like:{color:"green",border:"6px solid green",left:30,transform:"rotate(-18deg)"},nope:{color:"red",border:"6px solid red",right:30,transform:"rotate(18deg)"},buttons:{position:"absolute",bottom:70,width:"100%",height:"55px"},button:{margin:"0px 15px"}}),Nc=function(e){var t=e.profile,n=e.onSwipe,o=Lc(),i=Cc((0,le.useTranslation)(),1)[0],l=Cc((0,a.useState)(null),2),E=l[0],s=l[1],c=(0,a.useRef)(null),u=(0,a.useRef)(null);c.current=E,u.current=t.id;var d=!0===E,T=!1===E,A="".concat(o.status," ").concat(d?o.statusVisible:o.statusNull," ").concat(o.like),p="".concat(o.status," ").concat(T?o.statusVisible:o.statusNull," ").concat(o.nope);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(hc,mc({id:"active-profile",onDrag:function(e){var t=null!==E;!t&&e>150?s(!0):!t&&e<-150?s(!1):e>-150&&e<150&&s(null)},onDrop:function(){n(u.current,c.current),s(null)}},{children:(0,r.jsxs)(C.Card,mc({raised:!0,className:o.root},{children:[(0,r.jsx)(Oc,{className:A,text:i("MATCH.MESSAGES.LIKED"),visible:d}),(0,r.jsx)(Oc,{className:p,text:i("MATCH.MESSAGES.NOPE"),visible:T}),(0,r.jsx)(Us,{profile:t})]}))})),(0,r.jsxs)(C.Box,mc({className:o.buttons,display:"flex",justifyContent:"center"},{children:[(0,r.jsx)(se,mc({title:i("MATCH.DISLIKE"),"aria-label":"dislike"},{children:(0,r.jsx)(C.Fab,mc({size:"large",color:"secondary","aria-label":"dislike",onClick:function(){n(u.current,!1),s(null)},className:o.button},{children:(0,r.jsx)(Ac.Z,{})}))})),(0,r.jsx)(se,mc({title:i("MATCH.LIKE"),"aria-label":"like"},{children:(0,r.jsx)(C.Fab,mc({size:"large",color:"primary","aria-label":"like",onClick:function(){n(u.current,!0),s(null)},className:o.button},{children:(0,r.jsx)(pc.Z,{})}))}))]}))]})},vc=function(){return vc=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&a[a.length-1])||6!==l[0]&&2!==l[0])){i=0;continue}if(3===l[0]&&(!a||l[1]>a[0]&&l[1]0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},Pc=function(){var e=(0,L.useSetRecoilState)(Js.profiles),t=(0,L.useSetRecoilState)(Js.matches),n=mr().addAlert,r=Dc((0,le.useTranslation)(),1)[0],o=(0,a.useCallback)((function(a,o){e((function(e){return e.map((function(e){return a===e.id?vc(vc({},e),{viewed:!0,liked:o}):e}))})),o&&(0,v.Z)(vs.SAVE_LIKES,{id:a,liked:o}).then((function(e){if("ok"!==e.status)return n({message:r("MATCH.FEEDBACK.SAVE_LIKES_FAILED"),type:"error"});e.data&&(n({message:r("MATCH.FEEDBACK.NEW_LIKE_FOUND"),type:"info"}),(0,v.Z)(vs.GET_MATCHES,{page:0}).then((function(e){t(e.data)})))}))}),[e,n,r,t]),i=(0,L.useRecoilCallback)((function(e){var t=e.snapshot,n=e.set;return function(e,r){return yc(void 0,void 0,void 0,(function(){var a;return gc(this,(function(o){return e.identifier===r.identifier||(a=function(e){return"hasValue"!==e.getLoadable(Js.profiles).state}(t),a||n(Js.profiles,(function(t){return function(e,t,n){if(n||2===arguments.length)for(var r,a=0,o=t.length;a0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},xc=(0,Z.Z)({root:{height:"100%",width:"100%",overflow:"hidden"}}),kc=function(){var e=xc(),t=Mc((0,le.useTranslation)(),1)[0],n=Tc(),o=n.profiles,i=n.error,l=n.activeProfile,E=Pc().setViewed,s=Mc((0,a.useState)(!1),2),c=s[0],u=s[1];return(0,a.useEffect)((function(){window.setTimeout((function(){u(!0)}),1250)}),[]),i?(0,r.jsx)(Ws,{text:t("MATCH.FEEDBACK.PROFILES_ERROR")}):c&&o?l?(0,r.jsx)(C.Paper,bc({className:e.root,square:!0},{children:(0,r.jsx)(Nc,{profile:l,onSwipe:function(e,t){null!==t&&E(e,t)}})})):(0,r.jsx)(Ws,{text:t("MATCH.FEEDBACK.NO_PROFILES")}):(0,r.jsx)(Ms,{})},wc=n(78271),Gc=function(){return Gc=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},Fc=(0,Z.Z)({profile:{position:"relative",height:"90%",marginTop:"15px"}}),Uc=function(e){var t=e.match,n=(0,E.useHistory)(),o=Fc(),i=jc((0,le.useTranslation)(),1)[0],l=jc((0,a.useState)(!1),2),s=l[0],c=l[1],u=i("MATCH.MESSAGES.PROFILE_MATCHED_AT",{matchedAt:t.matchedAtFormatted});return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(C.ListItem,Gc({divider:!0},{children:[(0,r.jsx)(wc.Z,{primary:t.name,secondary:u}),(0,r.jsx)(C.Button,Gc({onClick:function(){c((function(e){return!e}))}},{children:(0,r.jsx)(nr.Z,{})})),(0,r.jsx)(C.Button,Gc({onClick:function(){n.push("/messages/new?phoneNumber=".concat(t.phoneNumber))}},{children:(0,r.jsx)(Dl.Z,{})}))]})),s&&(0,r.jsx)(C.Box,Gc({className:o.profile},{children:(0,r.jsx)(Us,{profile:t})}))]})},Bc=function(){var e=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,a,o=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i}((0,L.useRecoilState)(Js.matches),2);return{matches:e[0],setMatches:e[1],error:(0,L.useRecoilValue)(Js.errorLoadingMatches)}},Hc=o().memo((function(e){var t=e.totalCount,n=e.onChange;return(0,r.jsx)(C.Pagination,{defaultPage:1,count:t,onChange:n,color:"primary"})})),Wc=function(){return Wc=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},Vc=(0,Z.Z)({root:{height:"100%",display:"flex",justifyContent:"space-between",flexDirection:"column"}}),Kc=function(){var e=Vc(),t=zc((0,le.useTranslation)(),1)[0],n=Bc(),o=n.matches,i=n.error,l=Pc().newMatchesPage,E=zc((0,a.useState)(1),2),s=E[0],c=E[1],u=(0,a.useCallback)((function(e,t){c(t)}),[c]);if((0,a.useEffect)((function(){l(s-1)}),[s,l]),i)return(0,r.jsx)(Ws,{text:t("MATCH.FEEDBACK.MATCHES_ERROR")});if(!o)return(0,r.jsx)(Ms,{});if(0===o.length)return(0,r.jsx)(Ws,{text:t("MATCH.FEEDBACK.NO_MATCHES")});var d=Math.ceil(o.length/20);return(0,r.jsxs)(C.Box,Wc({className:e.root},{children:[(0,r.jsx)(C.Box,{children:o.map((function(e){return(0,r.jsx)(Uc,{match:e},e.id)}))}),(0,r.jsx)(C.Box,Wc({mb:2,width:"100%",display:"flex",justifyContent:"center",alignItems:"center"},{children:d>1&&(0,r.jsx)(Hc,{onChange:u,totalCount:d})}))]}))},Yc=function(){return Yc=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i}((0,a.useState)(0),2),s=l[0],c=l[1];return(0,a.useEffect)((function(){o(!t)}),[o,t]),(0,r.jsxs)(pe.O,{children:[(0,r.jsx)(Ae,{app:i}),(0,r.jsx)(ae,{children:n?(0,r.jsx)(dc,{}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(E.Route,{path:"/match/",exact:!0,component:kc}),(0,r.jsx)(E.Route,{path:"/match/matches",exact:!0,component:Kc}),(0,r.jsx)(E.Route,{path:"/match/profile",exact:!0,component:dc})]})}),(0,r.jsx)(Jc,{activePage:s,handleChange:function(e,t){return c(t)}})]})},Xc=function(){return Xc=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&a[a.length-1])||6!==l[0]&&2!==l[0])){i=0;continue}if(3===l[0]&&(!a||l[1]>a[0]&&l[1]0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},hu=function(e,t,n){if(n||2===arguments.length)for(var r,a=0,o=t.length;a0&&a[a.length-1])||6!==l[0]&&2!==l[0])){i=0;continue}if(3===l[0]&&(!a||l[1]>a[0]&&l[1]0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},Lu=function(e){var t=e.tweetId,n=e.isLiked,o=e.likes,i=Cu((0,a.useState)(n),2),l=i[0],E=i[1],s=Cu((0,a.useState)(!1),2),c=s[0],u=s[1],d=(0,le.useTranslation)().t,T=mr().addAlert,A=Ou().localToggleLike;return c?(0,r.jsx)(C.Button,mu({disabled:!0},{children:(0,r.jsx)(C.CircularProgress,{size:22})})):(0,r.jsx)(C.Button,mu({onClick:function(){u(!0),(0,v.Z)(nu.TOGGLE_LIKE,{tweetId:t}).then((function(e){if("ok"!==e.status)return T({message:d("TWITTER.FEEDBACK.LIKE_TWEET_FAILED"),type:"error"});u(!1),E(!l),A(t)}))},startIcon:l?(0,r.jsx)(au.Z,{color:"primary"}):(0,r.jsx)(ru.Z,{})},{children:(0,r.jsx)(C.Typography,mu({color:"#bfbfbf",fontSize:"16px"},{children:o}))}))},Nu=n(42443),vu=function(){return vu=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i}((0,a.useState)(null),2),s=E[0],c=E[1];return t&&n&&0!==n.length?(0,r.jsx)(C.Box,Mu({p:1},{children:n.map((function(e){return(0,r.jsxs)(C.Box,Mu({onClick:function(t){return function(e,t){c(e.currentTarget),l(t)}(t,e.id)}},{children:[(0,r.jsx)(bu,{link:e.link,handleClick:o?function(){return o(e.id)}:null},e.id),(0,r.jsx)(C.Popper,Mu({anchorEl:s,placement:"left",open:i===e.id},{children:(0,r.jsx)(Qe,{popper:!0,alt:"image",src:e.link})}))]}))}))})):null};xu.defaultProps={removeImage:null,small:!1};var ku=xu,wu=(0,C.styled)(C.Box)({width:"100%"}),Gu=(0,C.styled)("img")({borderRadius:"50%",objectFit:"cover"});function ju(e){var t=e.avatarUrl,n=e.showInvalidImage,o=e.height,i=e.width,l=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,a,o=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i}((0,a.useState)(!1),2),E=l[0],s=l[1],c=gr().ResourceConfig;return c&&c.twitter.enableAvatars?(0,r.jsxs)(wu,{children:[E&&(0,r.jsx)(Gu,{src:n?"media/twitter/invalid.png":ou,alt:"Invalid avatar",style:{height:o,width:i}}),(0,r.jsx)(Gu,{src:t||ou,alt:"Your profile avatar",onError:function(){return s(!0)},onLoad:function(){return s(!1)},style:{display:E?"none":"block",height:o,width:i}})]}):null}ju.defaultProps={avatarUrl:null,showInvalidImage:!1,height:"125px",width:"125px"};var Fu=ju,Uu=function(){return Uu=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},Hu=(0,Z.Z)((function(e){return{iconFilled:{color:e.palette.primary.main}}})),Wu=function(e){var t=e.tweetId,n=e.isRetweet,o=e.retweetId,i=Bu((0,a.useState)(!1),2),l=i[0],E=i[1],s=Bu((0,a.useState)(!1),2),c=s[0],u=s[1],d=Hu(),T=(0,le.useTranslation)().t,A=mr().addAlert;if(c)return(0,r.jsx)(C.Button,Uu({disabled:!0},{children:(0,r.jsx)(C.CircularProgress,{size:22})}));var p=l?d.iconFilled:"";return(0,r.jsx)(C.Button,Uu({onClick:function(){if(!l){var e=n?o:t;(0,v.Z)(nu.RETWEET,{tweetId:e}).then((function(e){if("ok"!==e.status)return A({message:T(e.errorMsg),type:"error"});window.setTimeout((function(){E(!0),u(!1)}),1250)}))}}},{children:(0,r.jsx)(Aa.Repeat,{className:p})}))},zu=(0,C.styled)(C.Box)((function(e){return{color:e.theme.palette.secondary.main,fontSize:"16px",justifyContent:"flex-start",width:"100%",display:"flex",alignItems:"flex-start",paddingBottom:"8px",marginBottom:"6px",marginTop:"-6px"}})),Vu=function(e){var t=e.profileName,n=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,a,o=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i}((0,le.useTranslation)(),1)[0];return(0,r.jsxs)(zu,{children:[(0,r.jsx)(Aa.Repeat,{})," ",t," ",n("TWITTER.RETWEETED")]})},Ku=n(54431),Yu=function(){return Yu=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i}((0,a.useState)(!1),2),E=l[0],s=l[1],c=mr().addAlert;return o?(0,r.jsxs)(C.MenuItem,Yu({onClick:t},{children:[(0,r.jsx)(Ku.Z,{}),(0,r.jsx)("span",Yu({style:{marginLeft:"5px"}},{children:i("TWITTER.REPORTED")}))]})):E?(0,r.jsx)(C.Button,Yu({disabled:!0},{children:(0,r.jsx)(C.CircularProgress,{id:"twitter-report-progress",size:22})})):(0,r.jsx)(C.MenuItem,Yu({dense:!0,onClick:function(){s(!0),(0,v.Z)(nu.REPORT,{tweetId:n}).then((function(e){if("ok"!==e.status)return c({message:i("TWITTER.FEEDBACK.REPORT_TWEET_FAILED"),type:"error"});s(!1),t(),c({message:i("TWITTER.FEEDBACK.REPORT_TWEET_SUCCESS"),type:"success"})}))}},{children:i("TWITTER.REPORT")}))},Ju=function(){return Ju=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i}((0,a.useState)(null),2),E=l[0],s=l[1],c=gr().ResourceConfig,u=mr().addAlert;if(Ou().deleteTweet,!c)return null;var d=function(){s(null)},T=c.twitter.allowDeleteTweets&&o,A=c.twitter.allowReportTweets&&!o,p=T||A?function(e){var t=e.currentTarget;s(t)}:function(){return null};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(C.Button,Ju({"aria-controls":"simple-menu","aria-haspopup":"true",onClick:p,style:{marginRight:15}},{children:(0,r.jsx)(uo.Z,{})})),(0,r.jsxs)(qu,Ju({id:"simple-menu",anchorEl:E,keepMounted:!0,open:Boolean(E),onClose:d},{children:[T&&(0,r.jsx)(C.MenuItem,Ju({onClick:function(){(0,v.Z)(nu.DELETE_TWEET,{tweetId:t}).then((function(e){if("ok"!==e.status)return u({message:i("TWITTER.FEEDBACK.DELETE_TWEET_FAILED"),type:"error"});d()}))}},{children:i("GENERIC.DELETE")})),A&&(0,r.jsx)(Zu,{handleClose:d,isReported:n,tweetId:t})]}))]})},Qu=(0,C.styled)(C.ListItem)({overflowX:"hidden",display:"flex",flexFlow:"column nowrap",width:"100%",marginTop:"6px"}),$u=(0,C.styled)(C.Box)({display:"flex",flexFlow:"row nowrap",alignItems:"flex-start",width:"100%"}),ed=(0,C.styled)(C.Box)({display:"flex",marginTop:"-10px",flexFlow:"column nowrap",width:"100%"}),td=(0,C.styled)(C.Box)({display:"flex",flexFlow:"row nowrap",width:"100%",alignItems:"flex-end"}),nd=(0,C.styled)(C.Box)((function(e){return{fontSize:"18px",fontWeight:"bold",color:e.theme.palette.text.primary}})),rd=(0,C.styled)(C.Typography)({marginLeft:"10px",fontSize:"14px"}),ad=(0,C.styled)(C.Box)((function(e){return{fontSize:"18px",wordBreak:"break-all",color:e.theme.palette.text.secondary}})),od=(0,C.styled)(C.Box)({display:"flex",flexFlow:"row nowrap",justifyContent:"space-between",width:"100%",marginLeft:"-20px",marginTop:"3px"}),id=function(){return id=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i}((0,le.useTranslation)(),1)[0],h=gr().ResourceConfig;if(!h)return null;var R=h.twitter,O=R.enableAvatars,m=R.enableImages,L=i.replace(/\n\r?/g,"
"),N=eu()(L,{whiteList:{br:[]}}),v=I?c:s,y=v?"@".concat(v):"",g=I?u:E;return(0,r.jsxs)(Qu,id({divider:!0},{children:[I&&(0,r.jsx)(Vu,{profileName:s}),(0,r.jsxs)($u,{children:[O&&(0,r.jsx)(C.ListItemAvatar,{children:(0,r.jsx)(C.Avatar,{children:(0,r.jsx)(Fu,{avatarUrl:g,height:"40px",width:"40px"})})}),(0,r.jsxs)(ed,{children:[(0,r.jsxs)(td,{children:[(0,r.jsx)(nd,{children:y}),(0,r.jsx)(rd,id({variant:"body2",color:"textSecondary"},{children:tu(f,T)}))]}),(0,r.jsx)(ad,{dangerouslySetInnerHTML:{__html:N}}),m&&(0,r.jsx)(ku,{visible:!0,images:l,open:n,onToggle:a}),(0,r.jsxs)(od,{children:[(0,r.jsx)(yu,{profile_name:s}),(0,r.jsx)(Lu,{likes:S,tweetId:o,isLiked:A}),h.twitter.allowRetweet&&!p&&(0,r.jsx)(Wu,{tweetId:o,retweetId:d,isRetweet:I}),(0,r.jsx)(Xu,{isMine:p,isReported:_,id:o})]})]})]})]}))})),Ed=n(13942),sd=function(){return sd=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},ud=function(e,t,n){if(n||2===arguments.length)for(var r,a=0,o=t.length;a0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},Od=function(){var e=Rd((0,L.useRecoilState)(pu.showCreateTweetModal),2),t=e[0],n=e[1],r=Rd((0,L.useRecoilState)(pu.modalMessage),2);return{modalVisible:t,setModalVisible:n,message:r[0],setMessage:r[1]}},md=n(8292),Cd=n(69061),Ld=(0,a.memo)((function(e){var t=e.visible,n=e.onEmojiClick,a=(0,C.useTheme)();return t?(0,r.jsx)(Cd.NimblePicker,{data:md,onClick:n,set:"google",theme:a.palette.mode,showPreview:!1}):null})),Nd=n(59491),vd=function(){return vd=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i}((0,le.useTranslation)(),1)[0],s=(0,E.useHistory)(),c=(0,E.useLocation)(),u=c.pathname,d=c.search,T=Qn();(0,a.useEffect)((function(){i.current&&i.current.focus()}),[t]);var A=(0,a.useCallback)((function(e,t){return o(e.target.value,t)}),[o]),p=(0,a.useCallback)((function(){s.push("/camera?".concat(qn().stringify({referal:encodeURIComponent(u+d)})))}),[s,u,d]);return(0,a.useEffect)((function(){(null==T?void 0:T.image)&&(o(T.image,!0),s.replace(Xo({pathname:u,search:d},"image")))}),[null==T?void 0:T.image,s,u,d,o]),t?(0,r.jsxs)(C.Box,vd({display:"flex",justifyContent:"space-between",alignItems:"center"},{children:[(0,r.jsx)(yd,{value:n,inputProps:{style:{fontSize:"18px"}},onChange:function(e){return A(e,!1)},multiline:!0,size:"small",placeholder:l("TWITTER.IMAGE_PLACEHOLDER"),inputRef:i}),(0,r.jsx)(C.Tooltip,vd({placement:"left",title:"Select an image from your gallery"},{children:(0,r.jsx)(C.IconButton,vd({onClick:p},{children:(0,r.jsx)(Nd.Z,{})}))}))]})):null}));function Dd(e){return e.split(/\r\n|\r|\n/).length}var Pd=(0,C.styled)(Be)({flex:"1 1 100%",padding:"10px 15px",marginTop:"15px",overflowY:"auto",maxHeight:"300px"}),bd=(0,a.memo)((function(e){var t=e.modalVisible,n=e.message,o=e.handleChange,i=e.onEnter,l=(0,a.useRef)(null),E=gr().ResourceConfig,s=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,a,o=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i}((0,le.useTranslation)(),1)[0],c=E.twitter,u=c.characterLimit,d=c.newLineLimit;if((0,a.useEffect)((function(){l.current&&l.current.focus()}),[t]),!E)return null;var T=null,A=n.trim().length>u,p="".concat(s("TWITTER.TWEET_MESSAGE_CHAR_LIMIT")," (").concat(u,")"),_=Dd(n)>d,I="".concat(s("TWITTER.TWEET_MESSAGE_NEW_LINE_LIMIT")," (").concat(d,")");return A?T=p:_&&(T=I),(0,r.jsx)(Pd,{value:n,inputProps:{style:{fontSize:"18px",paddingTop:"8px"}},onChange:function(e){return o(e.currentTarget.value)},onKeyPress:function(e){_||"Enter"!==e.key||e.shiftKey||i()},multiline:!0,placeholder:s("TWITTER.TWEET_MESSAGE_PLACEHOLDER"),inputRef:l,error:null!==T,helperText:T||null})})),Md=function(){return Md=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i}((0,le.useTranslation)(),1)[0],l=i(t&&!n?"TWITTER.SUBMIT_IMAGE":"TWITTER.TWEET"),E=t||n;return(0,r.jsxs)(xd,{children:[(0,r.jsx)(C.Button,Md({variant:"contained",color:"primary",onClick:o},{children:l})),E&&(0,r.jsx)(Tt,Md({style:{marginLeft:"8px"},variant:"contained",color:"error",onClick:a},{children:i("GENERIC.CLOSE")}))]})},wd=n(69403),Gd=n(4918),jd=function(){return jd=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&a[a.length-1])||6!==l[0]&&2!==l[0])){i=0;continue}if(3===l[0]&&(!a||l[1]>a[0]&&l[1]0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},Kd=function(e,t,n){if(n||2===arguments.length)for(var r,a=0,o=t.length;a0&&!function(e){return!(e.length>y)&&(Dd(e)0?R.map((function(e){return e.link})).join(su):""},(0,v.Z)(nu.CREATE_TWEET,n).then((function(e){if("ok"!==e.status)return E({type:"error",message:s("TWITTER.FEEDBACK.CREATE_PROFILE_FAILURE")})})),m()),[2]):[2]}}))}))},b=function(){T(!1),_(!p)},M=function(){return Wd(void 0,void 0,void 0,(function(){return zd(this,(function(e){switch(e.label){case 0:return _(!1),T(!d),[4,Ue(d)];case 1:return e.sent(),[2]}}))}))};return l?(0,r.jsxs)(qe,Hd({visible:o,handleClose:m},{children:[(0,r.jsx)(bd,{modalVisible:o,onEnter:P,message:t,handleChange:L}),(0,r.jsx)(gd,{visible:p,value:S,handleChange:C}),(0,r.jsx)(Ld,{visible:d,onEmojiClick:function(e,r){n(t.concat(e.native))}}),(0,r.jsx)(ku,{visible:!d&&R.length>0,images:R,removeImage:function(e){return O(R.filter((function(t){return e!==t.id})))}}),(0,r.jsxs)(Yd,{children:[(0,r.jsx)(Bd,{onImageClick:R.length0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},TT=(0,C.styled)(C.Box)({position:"relative",width:"100%",height:"100%",padding:"15px"}),AT=function(){var e=dT((0,le.useTranslation)(),1)[0],t=sT().profile,n=gr().ResourceConfig,o=mr().addAlert,i=(0,E.useHistory)(),l=Qn(),s=(0,E.useLocation)(),c=s.pathname,u=s.search,d=Ou().updateLocalProfile,T=dT((0,a.useState)(t.avatar_url||""),2),A=T[0],p=T[1],_=dT((0,a.useState)(t.profile_name||""),2),I=_[0],S=_[1],f=(0,a.useCallback)((function(){i.push("/camera?".concat(qn().stringify({referal:encodeURIComponent(c+u)})))}),[i,c,u]);if((0,a.useEffect)((function(){(null==l?void 0:l.image)&&p(l.image)}),[null==l?void 0:l.image,i,c,u,p]),!n)return null;var h=n.twitter,R=h.enableAvatars,O=h.allowEditableProfileName;return(0,r.jsxs)(TT,{children:[R&&(0,r.jsx)(Fu,{avatarUrl:A,showInvalidImage:!0}),(0,r.jsx)(C.Box,{height:8}),(0,r.jsxs)(C.Box,uT({display:"flex",alignItems:"center"},{children:[(0,r.jsx)("div",{children:(0,r.jsx)(Kl.Z,{})}),(0,r.jsx)("div",{children:(0,r.jsx)(C.Button,uT({onClick:f},{children:e("TWITTER.AVATAR_CHOOSE_IMAGE")}))})]})),(0,r.jsx)(Gs,{label:e("TWITTER.EDIT_PROFILE_AVATAR"),value:A,handleChange:p,allowChange:R}),(0,r.jsx)(Gs,{label:e("TWITTER.EDIT_PROFILE_NAME"),value:I,handleChange:S,allowChange:O}),(0,r.jsx)(cT,{handleClick:function(){var t={avatar_url:A,profile_name:I};(0,v.Z)(nu.UPDATE_PROFILE,t).then((function(t){if("ok"!==t.status)return o({message:e(t.errorMsg),type:"error"});d({profile_name:I,avatar_url:A}),o({message:e("TWITTER.FEEDBACK.EDIT_PROFILE_SUCCESS"),type:"success"})}))}})]})},pT=function(){return pT=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},fT=(0,C.styled)(C.Box)({width:"100%"}),hT=(0,C.styled)(C.Box)({padding:"15px"}),RT=(0,C.styled)(Be)({width:"100%"}),OT=function(){var e=ST((0,le.useTranslation)(),1)[0],t=ST((0,a.useState)(""),2),n=t[0],o=t[1],i=mr().addAlert,l=ST((0,L.useRecoilState)(pu.filteredTweets),2),E=l[0],s=l[1],c=E||[];return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(fT,{children:[(0,r.jsx)(hT,{children:(0,r.jsx)(RT,{placeholder:e("TWITTER.SEARCH_TWEETS_PLACEHOLDER"),label:e("TWITTER.SEARCH_TWEETS"),value:n,onChange:function(e){return o(e.target.value)},size:"medium",inputRef:function(e){return e&&e.focus()}})}),c.length>0&&(0,r.jsx)(dd,{tweets:E})]}),(0,r.jsx)(IT,{handleClick:function(){var t=n.trim();t&&(0,v.Z)(nu.FETCH_TWEETS_FILTERED,{searchValue:t}).then((function(t){if("ok"!==t.status)return i({message:e(t.errorMsg||""),type:"error"});s(t.data.map(du))}))}})]})},mT=n(24346),CT={};CT.styleTagTransform=h(),CT.setAttributes=_(),CT.insert=A().bind(null,"head"),CT.domAPI=d(),CT.insertStyleElement=S(),c()(mT.Z,CT),mT.Z&&mT.Z.locals&&mT.Z.locals,n(64161);var LT,NT=n(58261),vT=n(96224),yT=n(19971),gT=function(){return gT=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i}((0,le.useTranslation)(),1)[0];return(0,r.jsxs)(PT,{children:[(0,r.jsxs)(vT.Z,gT({className:i.formControl},{children:[(0,r.jsx)(NT.Z,gT({htmlFor:"profile-name"},{children:l("TWITTER.EDIT_DEFAULT_PROFILE_NAME")})),(0,r.jsx)(yT.Z,gT({value:t,onChange:function(e){e.preventDefault(),n(e.target.value)},inputProps:{name:"profileName",id:"profile-name"}},{children:o.map((function(e){return(0,r.jsx)(C.MenuItem,gT({value:e},{children:e}),e)}))}))]})),(0,r.jsx)(cT,{handleClick:a})]})},MT=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,a,o=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},xT=(0,C.styled)(C.Box)({position:"relative",width:"100%",height:"100%",padding:"15px"}),kT=function(){var e=this,t=MT((0,le.useTranslation)(),1)[0],n=sT().profile,o=Iu(),i=(0,L.useRecoilValue)(pu.defaultProfileNames),l=MT((0,a.useState)((null==n?void 0:n.profile_name)||""),2),E=l[0],s=l[1],c=gr().ResourceConfig,u=mr().addAlert,d=function(){return t=e,n=void 0,a=function(){return function(e,t){var n,r,a,o,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return o={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function l(l){return function(E){return function(l){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,l[0]&&(i=0)),i;)try{if(n=1,r&&(a=2&l[0]?r.return:l[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,l[1])).done)return a;switch(r=0,a&&(l=[2&l[0],a.value]),l[0]){case 0:case 1:a=l;break;case 4:return i.label++,{value:l[1],done:!1};case 5:i.label++,r=l[1],l=[0];continue;case 7:l=i.ops.pop(),i.trys.pop();continue;default:if(!((a=(a=i.trys).length>0&&a[a.length-1])||6!==l[0]&&2!==l[0])){i=0;continue}if(3===l[0]&&(!a||l[1]>a[0]&&l[1]0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i}((0,a.useState)(0),2),n=t[0],o=t[1],i=sT().profile,l=(0,E.useLocation)(),s=!i||!i.profile_name||!i.profile_name.trim(),c=!s&&0===n&&"/twitter"===l.pathname;return(0,r.jsx)(wT,{children:(0,r.jsxs)(pe.O,jT({id:"twitter-app"},{children:[(0,r.jsx)(no,{children:(0,r.jsx)(Zd,{})}),(0,r.jsx)(GT,{}),(0,r.jsx)(aT,{}),(0,r.jsx)(ae,{children:s?(0,r.jsx)(kT,{}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(E.Route,{path:"/twitter",exact:!0,component:fd}),(0,r.jsx)(E.Route,{path:"/twitter/search",component:OT}),(0,r.jsx)(E.Route,{path:"/twitter/profile",component:AT})]})}),c&&(0,r.jsx)(Qd,{openModal:function(){return e(!0)}}),!s&&(0,r.jsx)(ET,{activePage:n,handleChange:function(e,t){return o(t)}})]}))})})),UT=function(){return UT=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&a[a.length-1])||6!==l[0]&&2!==l[0])){i=0;continue}if(3===l[0]&&(!a||l[1]>a[0]&&l[1]0&&a[a.length-1])||6!==l[0]&&2!==l[0])){i=0;continue}if(3===l[0]&&(!a||l[1]>a[0]&&l[1]0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},oA=function(e,t,n){if(n||2===arguments.length)for(var r,a=0,o=t.length;a0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i}((0,le.useTranslation)(),1)[0];return{addChannel:function(e){(0,v.Z)(LT.ADD_CHANNEL,{channelIdentifier:e.channelIdentifier,label:e.label}).then((function(e){if("ok"!==e.status)return c({type:"error",message:u("DARKCHAT.FEEDBACK.JOIN_CHANNEL_FAILED")});t(e.data)}))},fetchMessages:function(e){(0,v.Z)(LT.FETCH_MESSAGES,{channelId:e},ZT).then((function(e){if("ok"!==e.status)return c({type:"error",message:u("DARKCHAT.FEEDBACK.FETCH_MESSAGES_FAILED")}),l.push("/darkchat");s(e.data)}))},sendMessage:function(e){(0,v.Z)(LT.SEND_MESSAGE,e).then((function(e){if("ok"!==e.status)return c({type:"error",message:u("DARKCHAT.FEEDBACK.SEND_MESSAGE_FAILED")});n(e.data)}))},leaveChannel:function(e){(0,v.Z)(LT.LEAVE_CHANNEL,{channelId:e}).then((function(t){if("ok"!==t.status)return c({type:"error",message:u("DARKCHAT.FEEDBACK.LEAVE_CHANNEL_FAILED")});r(e),l.goBack()}))},updateChannelLabel:function(e){(0,v.Z)(LT.UPDATE_CHANNEL_LABEL,e).then((function(t){if("ok"!==t.status)return c({type:"error",message:u("DARKCHAT.FEEDBACK.UPDATE_LABEL_FAILED")});a(e)}))},transferOwnership:function(e,t,n){(0,v.Z)(LT.TRANSFER_OWNERSHIP,{userIdentifier:t,channelId:e,newOwnerPhoneNumber:n}).then((function(e){if("ok"!==e.status)return c({type:"error",message:u("DARKCHAT.FEEDBACK.TRANSFER_OWNERSHIP_FAILED")});o(e.data),l.push("/darkchat")}))},fetchMembers:function(e){(0,v.Z)(LT.FETCH_MEMBERS,{channelId:e},(0,zt.MH)(YT)).then((function(e){if("ok"!==e.status)return c({type:"error",message:u("DARKCHAT.FEEDBACK.FETCH_MEMBERS_FAILED")});i(e.data)}))},deleteChannel:function(e){(0,v.Z)(LT.DELETE_CHANNEL,{channelId:e}).then((function(t){if("ok"!==t.status)return c({type:"error",message:u("DARKCHAT.FEEDBACK.DELETE_CHANNEL_FAILED")});r(e)}))}}},EA=function(){return EA=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},cA=(0,Z.Z)((function(e){return{button:{color:e.palette.text.primary,"&:hover":{backgroundColor:e.palette.action.hover}}}})),uA=function(e){var t=e.open,n=e.closeModal,o=sA((0,a.useState)(""),2),i=o[0],l=o[1],E=sA((0,le.useTranslation)(),1)[0],s=lA().addChannel,c=(0,C.useTheme)(),u=cA(c);return(0,r.jsxs)(qe,EA({visible:t,handleClose:n},{children:[(0,r.jsx)(C.Typography,{children:E("DARKCHAT.NEW_CHANNEL_TITLE")}),(0,r.jsx)(C.Box,EA({mt:3,mb:2},{children:(0,r.jsx)(Be,{type:"password",fullWidth:!0,placeholder:E("DARKCHAT.NEW_CHANNEL_INPUT_PLACEHOLDER"),value:i,onChange:function(e){return l(e.currentTarget.value)}})})),(0,r.jsx)(Se.z,EA({variant:"contained",className:u.button,onClick:function(){s({channelIdentifier:i}),n()}},{children:E("DARKCHAT.JOIN_BUTTON")}))]}))},dA=function(){return dA=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i}((0,a.useState)(!1),2),n=t[0],o=t[1],i=(0,C.useTheme)(),l=TA(i),E=function(){o((function(e){return!e}))};return(0,r.jsxs)(C.Box,{children:[(0,r.jsx)(uA,{open:n,closeModal:E}),n&&(0,r.jsx)(Ie,{}),(0,r.jsx)(fe.a,{children:e.map((function(e){return(0,r.jsx)(eA,dA({},e),e.id)}))}),(0,r.jsx)(C.Box,dA({position:"absolute",bottom:20,right:20},{children:(0,r.jsx)(C.Fab,dA({className:l.button,onClick:E},{children:(0,r.jsx)(DE.Z,{})}))}))]})},pA=function(){return pA=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},mA=function(){var e=OA((0,L.useRecoilState)(JT.showUploadMediaModal),2),t=e[0],n=e[1],r=OA((0,L.useRecoilState)(JT.modalMedia),2),a=r[0],o=r[1],i=OA((0,L.useRecoilState)(JT.showOwnerModal),2);return{modalVisible:t,setModalVisible:n,modalMedia:a,setModalMedia:o,ownerModal:i[0],setOwnerModal:i[1]}},CA=function(){return CA=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},NA=function(){var e=LA((0,a.useState)(""),2),t=e[0],n=e[1],o=LA((0,le.useTranslation)(),1)[0],i=lA().sendMessage,l=qT().id,E=yt(),s=mA().setModalVisible,c=function(){t.trim()&&(i({channelId:l,message:t,phoneNumber:E,type:"text"}),n(""))};return(0,r.jsxs)(C.Paper,CA({variant:"outlined",sx:{display:"flex",alignItems:"center"}},{children:[(0,r.jsx)(C.Box,CA({pl:3,pt:1,pb:1,flexGrow:1},{children:(0,r.jsx)(Be,{style:{paddingTop:7,paddingBottom:7},inputProps:{style:{fontSize:18,textIndent:5}},placeholder:o("DARKCHAT.MESSAGE_PLACEHOLDER"),variant:"standard",fullWidth:!0,value:t,maxRows:4,multiline:!0,onChange:function(e){return n(e.currentTarget.value)},onKeyPress:function(e){"Enter"!==e.key||e.shiftKey||(c(),n(""))}})})),(0,r.jsxs)(C.Box,{children:[(0,r.jsx)(C.Button,CA({color:"secondary",onClick:function(){return s(!0)}},{children:(0,r.jsx)(C.Tooltip,CA({title:o("DARKCHAT.MEDIA_UPLOAD")},{children:(0,r.jsx)($a.Z,{})}))})),(0,r.jsx)(C.Button,CA({onClick:c,color:"secondary"},{children:(0,r.jsx)(C.Tooltip,CA({title:o("GENERIC.SEND")},{children:(0,r.jsx)(Xa.Z,{})}))}))]})]}))},vA=n(11034),yA=function(){return yA=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i}((0,le.useTranslation)(),1)[0];return(0,r.jsxs)(Je,yA({visible:t,handleClose:function(){return n(!1)}},{children:[(0,r.jsx)(C.TextField,{placeholder:A("DARKCHAT.MEDIA_PLACEHOLDER"),variant:"standard",value:a,onChange:function(e){return o(e.target.value)}}),(0,r.jsxs)(gA,{children:[(0,r.jsx)(C.Button,yA({variant:"text",color:"secondary",startIcon:(0,r.jsx)(vA.Z,{}),onClick:function(){i.push("/camera?".concat(qn().stringify({referal:encodeURIComponent(s+c)})))}},{children:A("DARKCHAT.MEDIA_GALLERY")})),(0,r.jsx)(C.Button,yA({variant:"text",color:"secondary",startIcon:(0,r.jsx)(Xa.Z,{}),onClick:function(){var e=a;e.replace("/ /g",""),hd(e).then((function(){u({type:"image",message:a,channelId:d,phoneNumber:T}),n(!1),o("")})).catch(console.error)}},{children:A("GENERIC.SEND")}))]})]}))},PA=n(54464),bA=function(){return bA=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},xA=function(e){var t=e.open,n=e.closeModal,o=MA((0,a.useState)(""),2),i=o[0],l=o[1],s=MA((0,a.useState)("1"),2),c=s[0],u=s[1],d=(0,L.useRecoilValue)(JT.members),T=yt(),A=d&&d.filter((function(e){return e.phoneNumber!==T})),p=MA((0,le.useTranslation)(),1)[0],_=lA(),I=_.transferOwnership,S=_.deleteChannel,f=(0,E.useHistory)(),h=qT(),R=h.identifier===i,O=h.owner===T;return(0,r.jsx)(Je,bA({visible:t,handleClose:n},{children:(0,r.jsxs)(Lr.TabContext,bA({value:c},{children:[(0,r.jsxs)(Lr.TabList,bA({indicatorColor:"secondary",textColor:"secondary",onChange:function(e,t){u(t)}},{children:[(0,r.jsx)(C.Tab,{label:p("DARKCHAT.MEMBERS"),value:"1"}),(0,r.jsx)(C.Tab,{label:p("DARKCHAT.DANGER_ZONE"),value:"2"})]})),(0,r.jsx)(Lr.TabPanel,bA({value:"1"},{children:(0,r.jsx)(fe.a,{children:A&&A.map((function(e){return(0,r.jsx)(he.H,bA({secondaryAction:(0,r.jsx)(se,bA({title:p("DARKCHAT.TRANSFER_OWNERSHIP"),placement:"left"},{children:(0,r.jsx)(C.IconButton,bA({onClick:function(){return t=e.identifier,r=e.phoneNumber,n(),void I(h.id,t,r);var t,r},edge:"end","aria-label":"delete"},{children:(0,r.jsx)(PA.Z,{})}))}))},{children:(0,r.jsx)(C.ListItemText,{children:e.phoneNumber})}))}))})})),O&&(0,r.jsxs)(Lr.TabPanel,bA({value:"2"},{children:[(0,r.jsx)(C.Typography,{children:p("DARKCHAT.DELETE_CHANNEL_TITLE")}),(0,r.jsxs)(C.Box,bA({mt:2,mb:2},{children:[(0,r.jsx)(C.Typography,{children:p("DARKCHAT.TYPE_TO_CONFIRM",{identifier:h.identifier})}),(0,r.jsxs)(C.Box,bA({display:"flex",flexDirection:"column",alignItems:"flex-start",gap:2},{children:[(0,r.jsx)(Be,{placeholder:p("DARKCHAT.NEW_CHANNEL_INPUT_PLACEHOLDER"),value:i,onChange:function(e){return l(e.currentTarget.value)}}),(0,r.jsx)(Se.z,bA({onClick:function(){n(),S(h.id),f.push("/darkchat")},disabled:!R,variant:"outlined",color:"secondary"},{children:p("GENERIC.DELETE")}))]}))]}))]}))]}))}))},kA=function(){return kA=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},BA=$l()(C.Paper)((function(e){var t=e.theme;return{backgroundColor:e.background||t.palette.background.default,height:"60px",display:"flex",alignItems:"center",justifyContent:"space-between",borderRadius:0}})),HA=$l()(C.Button)((function(e){return{color:e.theme.palette.text.primary}})),WA=function(){var e=XA("DARKCHAT").backgroundColor,t=qT(),n=mA().setOwnerModal,o=lA(),i=o.leaveChannel,l=o.updateChannelLabel,s=(0,E.useHistory)().goBack,c=yt(),u=UA((0,le.useTranslation)(),1)[0],d=UA((0,a.useState)(!1),2),T=d[0],A=d[1],p=UA((0,a.useState)(t.label),2),_=p[0],I=p[1],S=c===t.owner;return(0,r.jsxs)(BA,FA({background:e},{children:[(0,r.jsxs)(C.Box,FA({display:"flex",alignItems:"center",flexDirection:"row",gap:1},{children:[(0,r.jsx)(C.IconButton,FA({onClick:s},{children:(0,r.jsx)(Ja.Z,{})})),(0,r.jsxs)(C.Box,FA({display:"flex",gap:2,alignItems:"center"},{children:[T?(0,r.jsx)(Be,{inputProps:{style:{fontSize:23}},value:_,onChange:function(e){return I(e.currentTarget.value)}}):(0,r.jsx)(C.Typography,FA({fontSize:26},{children:_})),S&&(0,r.jsx)(C.Box,{children:T?(0,r.jsx)(C.IconButton,FA({disableFocusRipple:!0,disableTouchRipple:!0,onClick:function(){return A(!1),_===t.label?I(t.label):_.trim()?void l({channelId:t.id,label:_}):I(t.label)}},{children:(0,r.jsx)(GA.Z,{})})):(0,r.jsx)(C.IconButton,FA({disableFocusRipple:!0,disableTouchRipple:!0,onClick:function(){return A(!0)}},{children:(0,r.jsx)(za.Z,{})}))})]}))]})),(0,r.jsx)(C.Box,FA({pr:2},{children:S?(0,r.jsx)(C.IconButton,FA({onClick:function(){n(!0)}},{children:(0,r.jsx)(jA.Z,{})})):(0,r.jsx)(HA,FA({onClick:function(){i(t.id)}},{children:u("DARKCHAT.LEAVE")}))}))]}))},zA=function(){return zA=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},JA=function(e,t,n){if(n||2===arguments.length)for(var r,a=0,o=t.length;a0&&a[a.length-1])||6!==l[0]&&2!==l[0])){i=0;continue}if(3===l[0]&&(!a||l[1]>a[0]&&l[1]0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i}((0,L.useRecoilState)(N.extApps),2),l=i[0],s=i[1],c=(e=function(e){return $A(void 0,void 0,void 0,(function(){return ep(this,(function(t){switch(t.label){case 0:return[4,new Promise((function(t,n){var r=document.createElement("script");r.src=e,r.type="text/javascript",r.async=!0,document.head.appendChild(r),r.onload=function(){t(!0)},r.onerror=function(e){r.parentElement.removeChild(r),n(e)}}))];case 1:return t.sent(),[2]}}))}))},t=function(t){return $A(void 0,void 0,Promise,(function(){var a,i,l,s,c,u,d,T,A;return ep(this,(function(p){switch(p.label){case 0:return p.trys.push([0,5,,6]),a="https://cfx-nui-".concat(t,"/web/dist/remoteEntry.js"),i=t,l="./config",[4,e(a)];case 1:return p.sent(),[4,n.I("default")];case 2:return p.sent(),[4,window[i].init(n.S.default)];case 3:return p.sent(),[4,window[i].get(l)];case 4:return s=p.sent(),c=s(),u=c.default(),(d=u).Component=function(e){return o().createElement(d.app,e)},T=TE(d),d.Route=function(e){return(0,r.jsx)(E.Route,QA({path:d.path},{children:(0,r.jsx)(T,{children:(0,r.jsx)(d.Component,QA({},e))})}))},d.icon=o().createElement(d.icon),d.NotificationIcon=d.notificationIcon,[2,d];case 5:return A=p.sent(),console.error('Failed to load external app "'.concat(t,'". Make sure it is started before NPWD.')),console.error(A),[2,null];case 6:return[2]}}))}))},{getConfigs:function(e){return void 0===e&&(e=[]),$A(void 0,void 0,void 0,(function(){return ep(this,(function(n){switch(n.label){case 0:return[4,Promise.all(e.map((function(e){return $A(void 0,void 0,void 0,(function(){var n;return ep(this,(function(r){switch(r.label){case 0:return[4,t(e)];case 1:return(n=r.sent())?[2,n]:[2,null]}}))}))})))];case 1:return[2,n.sent()]}}))}))}}).getConfigs,u=(0,L.useRecoilValue)(N.resourceConfig),d=function(e){"RELOAD"===e.data.type&&c(u.apps).then(s)};return(0,a.useEffect)((function(){return window.addEventListener("message",d),function(){window.removeEventListener("message",d)}}),[]),(0,a.useEffect)((function(){c(null==u?void 0:u.apps).then(s)}),[u]),l.filter((function(e){return e}))},np=function(){return np=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},ap=function(e,t,n){if(n||2===arguments.length)for(var r,a=0,o=t.length;a0&&a[a.length-1])||6!==l[0]&&2!==l[0])){i=0;continue}if(3===l[0]&&(!a||l[1]>a[0]&&l[1]0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},_p=function(e,t,n){if(n||2===arguments.length)for(var r,a=0,o=t.length;a=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Sp=function(){var e=(0,sp.useSnackbar)(),t=e.enqueueSnackbar,n=e.closeSnackbar,r=qA().getApp,a=(0,L.useRecoilCallback)((function(e){var n=e.set,a=e.snapshot;return function(e){var o=e.appId,l=e.content,E=e.secondaryTitle,s=e.notisId,c=e.path,u=e.keepOpen,d=void 0!==u&&u,T=e.onClick,A=e.duration;return Tp(void 0,void 0,void 0,(function(){var e,u,p;return Ap(this,(function(_){switch(_.label){case 0:return e=r(o),[4,a.getPromise(qi)];case 1:return u=_.sent(),p="".concat(s,":").concat(up()()),u.includes(p)?(console.error("Notification with key: [".concat(p,"] already exists!")),[2]):(n(Zi(p),{appId:e.id,content:l,path:c,onClick:T,isRead:!1,isActive:!0,keepOpen:d,duration:A,id:p}),n(qi,(function(e){return _p(_p([],pp(e),!1),[p],!1)})),n(Ji,(function(e){return _p(_p([],pp(e),!1),[p],!1)})),n(Xi,(function(e){return _p(_p([],pp(e),!1),[p],!1)})),n(Qi,(function(e){return _p(_p([],pp(e),!1),[{id:p,appId:o,path:c}],!1)})),t(l,{variant:"npwdNotification",anchorOrigin:{vertical:"top",horizontal:"center"},persist:d,key:p,onExited:function(){i(p)},onClick:T,secondaryTitle:E,path:c,app:e,autoHideDuration:3e3,disableWindowBlurListener:!0}),[2])}}))}))}})),o=(0,L.useRecoilCallback)((function(e){var t=e.reset,n=e.snapshot,r=e.set;return function(){return Tp(void 0,void 0,void 0,(function(){var e,a,o,i,l,E,s,c;return Ap(this,(function(u){switch(u.label){case 0:return[4,n.getPromise(Ji)];case 1:e=u.sent(),u.label=2;case 2:u.trys.push([2,7,8,9]),a=Ip(e),o=a.next(),u.label=3;case 3:return o.done?[3,6]:(i=o.value,[4,n.getPromise(Zi(i))]);case 4:if(!(l=u.sent()))return[3,5];r(Zi(i),dp(dp({},l),{isActive:!1})),u.label=5;case 5:return o=a.next(),[3,3];case 6:return[3,9];case 7:return E=u.sent(),s={error:E},[3,9];case 8:try{o&&!o.done&&(c=a.return)&&c.call(a)}finally{if(s)throw s.error}return[7];case 9:return t(Ji),[2]}}))}))}}),[]),i=(0,L.useRecoilCallback)((function(e){var t=e.set,r=e.snapshot;return function(e){return Tp(void 0,void 0,void 0,(function(){var a,o,i,l;return Ap(this,(function(E){switch(E.label){case 0:return n(e),[4,r.getPromise(Ji)];case 1:return a=E.sent(),o=Zi(e),[4,r.getPromise(o)];case 2:return(i=E.sent())?(t(o,dp(dp({},i),{isActive:!1})),l=a.filter((function(t){return t!==e})),t(Ji,l),[2]):[2]}}))}))}}),[n]),l=(0,L.useRecoilCallback)((function(e){var t=e.set,r=e.snapshot;return function(e){return Tp(void 0,void 0,void 0,(function(){var a,o,i,l,E,s,c,u,d,T;return Ap(this,(function(A){switch(A.label){case 0:return a=Zi(e),[4,r.getPromise(a)];case 1:return o=A.sent(),i=o.isActive,o.isRead,l=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i}((0,le.useTranslation)(),1)[0];return(0,r.jsx)(C.Box,Rp({width:"100%",py:1,textAlign:"center"},{children:(0,r.jsxs)(C.Typography,Rp({variant:"body2",color:"textSecondary"},{children:["🎉 ",e("NOTIFICATIONS.NO_UNREAD")," 🎉"]}))}))},mp=function(){return mp=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i}((0,L.useRecoilState)($i),2),o=n[0],i=n[1],l=el(),E=tl(),s=Sp().markAllAsRead;return(0,a.useEffect)((function(){0===l.length&&i(!1)}),[l,i]),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(C.Grid,mp({className:e.root,container:!0,justifyContent:"space-between",alignItems:"center",wrap:"nowrap",onClick:function(){i((function(e){return!e}))}},{children:[(0,r.jsx)(C.Grid,mp({container:!0,item:!0,wrap:"nowrap"},{children:E&&E.filter((function(e,t,n){return t===n.findIndex((function(t){return t.appId===e.appId}))})).map((function(e,t){return(0,r.jsx)(Lp,{tgtNoti:e},t)}))})),t&&(0,r.jsx)(C.Grid,mp({item:!0,className:e.item},{children:(0,r.jsx)(C.Typography,mp({className:e.text,variant:"button"},{children:t}))})),(0,r.jsxs)(C.Grid,mp({container:!0,item:!0,wrap:"nowrap",justifyContent:"flex-end",alignItems:"center"},{children:[(0,r.jsx)(C.Grid,mp({item:!0},{children:(0,r.jsx)(ip.Z,{fontSize:"small"})})),(0,r.jsx)(C.Grid,mp({item:!0,className:e.item},{children:(0,r.jsx)(C.Typography,mp({className:e.text,variant:"button"},{children:_n.cellProvider}))})),(0,r.jsx)(C.Grid,mp({item:!0},{children:(0,r.jsx)(lp.Z,{style:{transform:"rotate(90deg)",display:"block"}})}))]}))]})),(0,r.jsx)(C.Slide,mp({direction:"down",in:o,mountOnEnter:!0,unmountOnExit:!0},{children:(0,r.jsxs)(C.Paper,mp({square:!0,className:e.drawer},{children:[(0,r.jsxs)(C.Box,mp({py:1},{children:[0!==(null==l?void 0:l.length)&&(0,r.jsx)(C.Box,mp({pl:2},{children:(0,r.jsx)(C.Button,mp({color:"primary",size:"small",onClick:function(){return e=void 0,t=void 0,r=function(){return function(e,t){var n,r,a,o,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return o={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function l(l){return function(E){return function(l){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,l[0]&&(i=0)),i;)try{if(n=1,r&&(a=2&l[0]?r.return:l[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,l[1])).done)return a;switch(r=0,a&&(l=[2&l[0],a.value]),l[0]){case 0:case 1:a=l;break;case 4:return i.label++,{value:l[1],done:!1};case 5:i.label++,r=l[1],l=[0];continue;case 7:l=i.ops.pop(),i.trys.pop();continue;default:if(!((a=(a=i.trys).length>0&&a[a.length-1])||6!==l[0]&&2!==l[0])){i=0;continue}if(3===l[0]&&(!a||l[1]>a[0]&&l[1]0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i}(_u(),2),i=o[0],l=o[1],s=Sp().enqueueNotification,c=(0,E.useLocation)().pathname,u=(0,L.useRecoilValueLoadable)(pu.profile),d=u.state,T=u.contents,A=(0,L.useSetRecoilState)(pu.filteredTweets),p=(0,a.useCallback)((function(e){s({appId:"TWITTER",content:e.message,notisId:"npwd:tweetBroadcast",secondaryTitle:e.profile_name,path:"/twitter",playSound:!0})}),[s]),_=(0,a.useCallback)((function(e){s({appId:"TWITTER",content:"@".concat(e," liked your tweet!"),notisId:"npwd:tweetBroadcast",path:"/twitter"})}),[s]),I=(0,a.useCallback)((function(e){if("hasValue"===d&&T){i.length>=50&&l((function(e){return e.slice(0,-1)})),c.includes("/twitter")||p(e);var n=function(e,t){var n=du(e),r=(null==t?void 0:t.identifier)===e.identifier;return uu(uu({},n),{isMine:r,isLiked:!1})}(e,T);t(n)}}),[t,p,T,d,l,i.length,c]),S=(0,a.useCallback)((function(e){var t=e.tweetId,r=e.isAddLike,a=e.likedByProfileName;if(n(t,r),r&&!c.includes("/twitter")){var o=i.find((function(e){return e.id==t}));o.isMine&&o.profile_name!==a&&_(a)}}),[_,n,i]),f=(0,a.useCallback)((function(e){r(e)}),[r]);(0,bp.useNuiEvent)(iu,nu.FETCH_TWEETS_FILTERED,(function(e){A(e.map(du))})),(0,bp.useNuiEvent)(iu,nu.CREATE_TWEET_BROADCAST,I),(0,bp.useNuiEvent)(iu,nu.TWEET_LIKED_BROADCAST,S),(0,bp.useNuiEvent)(iu,nu.DELETE_TWEET_BROADCAST,f)},xp=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,a,o=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},kp=function(e,t,n){if(n||2===arguments.length)for(var r,a=0,o=t.length;a0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i}(Ot(),2),t=e[0],n=e[1],r=(0,sp.useSnackbar)(),o=r.enqueueSnackbar,i=r.closeSnackbar,l=Xt(),E=un().getDisplayByNumber,s=(0,a.useCallback)((function(e){return l.length?E(e):e}),[l,E]);return{enqueueCallNotification:function(e){t||(i("npwd:callNotification"),o("",{variant:"npwdCallNotification",anchorOrigin:{vertical:"top",horizontal:"center"},persist:!0,title:"Call",onExited:function(){n(null)},transmitter:s(e.transmitter),receiver:s(e.receiver),key:"npwd:callNotification"}))},removeNotification:function(){i("npwd:callNotification")}}}(),r=n.enqueueCallNotification,o=n.removeNotification;(0,bp.useNuiEvent)("CALL",K.SET_CALL_INFO,(function(e){if(!e)return o();t(e),r(e)})),(0,bp.useNuiEvent)("CALL",K.END_CALL,e)},Gp=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,a,o=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},jp=function(){var e=mr().addAlert,t=(0,L.useSetRecoilState)(Gn.history),n=Gp((0,le.useTranslation)(),1)[0],r=(0,L.useRecoilCallback)((function(e){var n=e.snapshot;return function(e){"hasValue"===n.getLoadable(Gn.history).state&&t((function(t){return function(e,t,n){if(n||2===arguments.length)for(var r,a=0,o=t.length;a0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},zp=(0,Z.Z)({root:{position:"absolute",width:"auto",bottom:20}}),Vp=function(){var e=Wp((0,a.useState)(!1),2),t=e[0],n=e[1],o=Wp((0,a.useState)(""),2),i=o[0],l=o[1],E=Wp((0,a.useState)("info"),2),s=E[0],c=E[1],u=zp();return(0,bp.useNuiEvent)("PHONE","startRestart",(function(){l("Restarting UI"),n(!0),c("error"),setTimeout((function(){return window.location.reload()}),3e3)})),(0,r.jsx)(C.Snackbar,Hp({open:t,onClose:function(){n(!1)},className:u.root},{children:(0,r.jsx)(X,Hp({severity:s},{children:(0,r.jsxs)(C.Typography,Hp({variant:"body1"},{children:["Phone - ",i]}))}))}))},Kp=function(){return Kp=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i}(x(),1)[0],a=rl(),o=a.bottom,i=a.visibility,l=In(),s=(0,E.useLocation)().pathname;return(0,r.jsx)(C.Slide,Kp({direction:"up",timeout:{enter:500,exit:500},in:i},{children:(0,r.jsx)("div",Kp({className:"PhoneWrapper"},{children:(0,r.jsxs)("div",Kp({className:"Phone",style:{position:"fixed",transformOrigin:"right bottom",transform:"scale(".concat(n.zoom.value),bottom:o}},{children:[(0,r.jsx)("div",{className:"PhoneFrame",style:{backgroundImage:"url(media/frames/".concat(n.frame.value,")")}}),(0,r.jsx)("div",Kp({id:"phone",className:"PhoneScreen bg-neutral-100 dark:bg-neutral-900",style:{backgroundImage:"/"===s&&l}},{children:t}))]}))}))}))},Zp=(JSON.parse('{"PhoneAsItem":{"enabled":false,"exportResource":"my-core-resource","exportFunction":"myCheckerFunction"},"general":{"useResourceIntegration":false,"toggleKey":"f1","toggleCommand":"phone","defaultLanguage":"en"},"contacts":{"frameworkPay":false,"payResource":"my-core-resource","payFunction":"myCheckerFunction"},"profanityFilter":{"enabled":false,"badWords":["esx"]},"database":{"useIdentifierPrefix":false,"playerTable":"users","identifierColumn":"identifier","identifierType":"license","profileQueries":true,"phoneNumberColumn":"phone_number"},"debug":{"level":"error","enabled":true,"sentryEnabled":true},"defaultContacts":[],"disabledApps":[],"apps":["pefcl"],"voiceMessage":{"enabled":false,"authorizationHeader":"PE-Secret","url":"","returnedDataIndexes":["url"]}}'),n(81061)),Jp=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),qp=function(){return qp=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i}((0,le.useTranslation)(),1)[0];return(0,r.jsxs)(C.Dialog,qp({open:t},{children:[(0,r.jsx)(C.DialogTitle,{children:a("MISC.TOP_LEVEL_ERR_TITLE")}),(0,r.jsxs)(C.DialogContent,{children:[(0,r.jsxs)(C.DialogContentText,{children:[a("MISC.TOP_LEVEL_ERR_MSG"),(0,r.jsx)("br",{}),(0,r.jsx)("br",{}),(0,r.jsx)("code",qp({style:{color:"red"}},{children:n}))]}),(0,r.jsx)(C.DialogActions,{children:(0,r.jsx)(C.Button,qp({color:"primary",onClick:function(){return window.location.reload()}},{children:a("MISC.TOP_LEVEL_ERR_ACTION")}))})]})]}))},Qp=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={hasError:!1,errorMsg:""},t}return Jp(t,e),t.getDerivedStateFromError=function(e){return{hasError:!0,errorMsg:e.message}},t.prototype.componentDidCatch=function(e,t){var n=t.componentStack;(0,Zp.Tb)(e,{contexts:{react:{componentStack:n}}})},t.prototype.render=function(){return this.state.hasError?(0,r.jsx)(Xp,{isOpen:this.state.hasError,errorMsg:this.state.errorMsg}):this.props.children},t}(o().Component),$p=function(){return $p=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i}(x(),1)[0],p=(0,C.useTheme)();(0,a.useEffect)((function(){d.changeLanguage(A.language.value).catch((function(e){return console.error(e)}))}),[d,A.language]),(0,a.useEffect)((function(){"taso-dark"===A.theme.value?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark")}),[A.theme.value]),t=(0,L.useSetRecoilState)(N.resourceConfig),(0,L.useRecoilValue)(N.resourceConfig),(0,a.useEffect)((function(){if((0,zt.Id)())return t(Ki);(0,Vi.Q)().then(t)}),[t]),function(){var e=(0,E.useHistory)(),t=gr().closePhone,n=gt().call,r=(0,L.useRecoilValue)(r_.ArrowRight),o=(0,L.useRecoilValue)(r_.ArrowLeft),i=(0,L.useRecoilValue)(r_.ArrowUp),l=(0,L.useRecoilValue)(r_.ArrowDown),s=(0,L.useRecoilValue)(r_.Backspace),c=(0,L.useRecoilValue)(r_.Enter),u=(0,L.useRecoilValue)(r_.Escape),d=(0,a.useRef)(new Map),T=(0,L.useSetRecoilState)(r_.Escape),A=(0,L.useSetRecoilState)(r_.Backspace);(0,a.useEffect)((function(){d.current.set("ArrowRight",r),d.current.set("ArrowLeft",o),d.current.set("ArrowUp",i),d.current.set("ArrowDown",l),d.current.set("Backspace",s),d.current.set("Enter",c),d.current.set("Escape",u)}),[l,o,r,i,s,c,u]),(0,a.useEffect)((function(){function e(e){var t=e.key,n=d.current.get(t);if(function(e){return-1!==a_.indexOf(e)}(t)&&n&&n.call)return n(e)}return window.addEventListener("keyup",e),function(){return window.removeEventListener("keyup",e)}}),[]),(0,a.useEffect)((function(){function e(e){"Tab"!==e.key||e.preventDefault()}return window.addEventListener("keydown",e),function(){return window.removeEventListener("keydown",e)}}),[]);var p=(0,a.useCallback)((function(t){["input","textarea"].includes(t.target.nodeName.toLowerCase())||n||e.goBack()}),[e,n]),_=function(e){["input","textarea"].includes(e.target.nodeName.toLowerCase())&&e.target.blur(),t()};(0,a.useEffect)((function(){d.current.set("Escape",_),d.current.set("Backspace",p)}),[T,A,e,p,t])}(),function(){var e=qA().getApp,t=mr().addAlert,n=(0,E.useHistory)(),r=(0,L.useSetRecoilState)(N.visibility),o=(0,L.useSetRecoilState)(N.resourceConfig),i=(0,L.useSetRecoilState)(N.phoneTime),l=(0,L.useSetRecoilState)(N.isPhoneDisabled),s=(0,L.useSetRecoilState)(N.playerSource),c=(0,L.useSetRecoilState)(N.playerIdentifier),u=(0,a.useCallback)((function(t){var r=e(t.toUpperCase());if(!r)return console.error('App "'.concat(t,'" is an invalid app id to open'));n.push(r.path)}),[e,n]);Yi("PHONE",xe.LO.ADD_SNACKBAR_ALERT,t),Yi("PHONE",xe.LO.SET_VISIBILITY,r),Yi("PHONE",xe.LO.SET_CONFIG,o),Yi("PHONE",xe.LO.SET_TIME,i),Yi("PHONE",xe.LO.OPEN_APP,u),Yi("PHONE",xe.LO.IS_PHONE_DISABLED,l),Yi("PHONE",xe.LO.SEND_PLAYER_SOURCE,s),Yi("PHONE",xe.LO.SEND_PLAYER_IDENTIFIER,(function(e){c(e)}))}(),n=(0,L.useSetRecoilState)(vt.number),Yi("SIMCARD",xe.LO.SET_NUMBER,n),yt(),function(){var e,t,n=Sp().enqueueNotification,r=qA().getApp,o=(e="npwd:ext:createNotification",t=function(e){i(e.detail)},(0,a.useEffect)((function(){window.addEventListener(e,t)})),{unsubscribe:function(){return window.removeEventListener(e,t)}}).unsubscribe;(0,a.useEffect)((function(){return function(){o()}}));var i=function(e){var t=r(e.appId);n({appId:t.id,content:e.content,secondaryTitle:e.secondaryTitle,duration:e.duration,keepOpen:e.keepOpen,path:e.path,notisId:e.notisId,onClick:null})};(0,bp.useNuiEvent)("PHONE",Pp.CREATE_NOTIFICATION,i)}(),function(){var e=(0,sp.useSnackbar)(),t=e.enqueueSnackbar,n=e.closeSnackbar,r=Sp().removeActive,a=(0,L.useRecoilCallback)((function(e){var n=e.set,a=e.snapshot;return function(e){return o=void 0,i=void 0,E=function(){var o,i,l;return function(e,t){var n,r,a,o,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return o={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function l(l){return function(E){return function(l){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,l[0]&&(i=0)),i;)try{if(n=1,r&&(a=2&l[0]?r.return:l[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,l[1])).done)return a;switch(r=0,a&&(l=[2&l[0],a.value]),l[0]){case 0:case 1:a=l;break;case 4:return i.label++,{value:l[1],done:!1};case 5:i.label++,r=l[1],l=[0];continue;case 7:l=i.ops.pop(),i.trys.pop();continue;default:if(!((a=(a=i.trys).length>0&&a[a.length-1])||6!==l[0]&&2!==l[0])){i=0;continue}if(3===l[0]&&(!a||l[1]>a[0]&&l[1]0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i}(e),!1),[i],!1)})),t(e.content,{variant:"npwdSystemNotification",secondaryTitle:e.secondaryTitle,key:e.uniqId,persist:e.keepOpen||!1,autoHideDuration:e.duration||3e3,controls:null!==(l=e.controls)&&void 0!==l&&l,onExited:function(){r(i)}}),[2])}}))},new((l=void 0)||(l=Promise))((function(e,t){function n(e){try{a(E.next(e))}catch(e){t(e)}}function r(e){try{a(E.throw(e))}catch(e){t(e)}}function a(t){var a;t.done?e(t.value):(a=t.value,a instanceof l?a:new l((function(e){e(a)}))).then(n,r)}a((E=E.apply(o,i||[])).next())}));var o,i,l,E}}),[]);(0,bp.useNuiEvent)("SYSTEM",Pp.CREATE_SYSTEM_NOTIFICATION,a),(0,bp.useNuiEvent)("SYSTEM",Pp.REMOVE_SYSTEM_NOTIFICATION,(function(e){var t=e.uniqId;n(t)}))}(),o=(0,E.useHistory)(),i=Sp().markAsRead,l=(0,L.useRecoilCallback)((function(e){var t=e.snapshot;return function(e){return n=void 0,r=void 0,o=function(){var n,r,a,o,l,s,c;return function(e,t){var n,r,a,o,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return o={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function l(l){return function(E){return function(l){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,l[0]&&(i=0)),i;)try{if(n=1,r&&(a=2&l[0]?r.return:l[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,l[1])).done)return a;switch(r=0,a&&(l=[2&l[0],a.value]),l[0]){case 0:case 1:a=l;break;case 4:return i.label++,{value:l[1],done:!1};case 5:i.label++,r=l[1],l=[0];continue;case 7:l=i.ops.pop(),i.trys.pop();continue;default:if(!((a=(a=i.trys).length>0&&a[a.length-1])||6!==l[0]&&2!==l[0])){i=0;continue}if(3===l[0]&&(!a||l[1]>a[0]&&l[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(n),a=r.next(),u.label=3;case 3:return a.done?[3,6]:(o=a.value,(0,E.matchPath)(e.pathname,{path:o.path,exact:!1})?[4,i(o.id)]:[3,5]);case 4:u.sent(),u.label=5;case 5:return a=r.next(),[3,3];case 6:return[3,9];case 7:return l=u.sent(),s={error:l},[3,9];case 8:try{a&&!a.done&&(c=r.return)&&c.call(r)}finally{if(s)throw s.error}return[7];case 9:return[2]}}))},new((a=void 0)||(a=Promise))((function(e,t){function i(e){try{E(o.next(e))}catch(e){t(e)}}function l(e){try{E(o.throw(e))}catch(e){t(e)}}function E(t){var n;t.done?e(t.value):(n=t.value,n instanceof a?n:new a((function(e){e(n)}))).then(i,l)}E((o=o.apply(n,r||[])).next())}));var n,r,a,o}})),(0,a.useEffect)((function(){return o.listen(l)}),[o,l]),Mp(),function(){var e=(0,E.useLocation)().pathname,t=rl().visibility,n=Pc(),r=n.addMatchAccount,o=n.addMatchedAccount,i=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,a,o=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i}((0,le.useTranslation)(),1)[0],l=Sp().enqueueNotification,s=(0,L.useRecoilValueLoadable)(Js.myProfile),c=s.state,u=s.contents,d=(0,a.useCallback)((function(e){"hasValue"===c&&u&&r(e,u)}),[r,u,c]);(0,bp.useNuiEvent)("MATCH",vs.SAVE_LIKES_BROADCAST,(function(n){var r=n.name;t&&e.includes("/match/")||(l({appId:"MATCH",content:r,secondaryTitle:i("MATCH.MESSAGES.NEW_MATCH"),notisId:"npwd:matchBroadcast",path:"/match",keepOpen:!1,duration:3e3}),o())})),(0,bp.useNuiEvent)("MATCH",vs.CREATE_MATCH_ACCOUNT_BROADCAST,d)}(),function(){var e,t=(e=(0,L.useSetRecoilState)(Nl),{deleteListing:(0,L.useRecoilCallback)((function(t){var n=t.snapshot;return function(t){var r=n.getLoadable(Nl),a=r.state,o=r.contents;"hasValue"===a&&o.length&&e((function(e){return kp([],xp(e),!1).filter((function(e){return!t.includes(e.id)}))}))}}),[]),addListing:(0,L.useRecoilCallback)((function(t){var n=t.snapshot;return function(t){"hasValue"===n.getLoadable(Nl).state&&e((function(e){return kp([t],xp(e),!1)}))}}),[e])}),n=t.addListing,r=t.deleteListing,o=Sp().enqueueNotification,i=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,a,o=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i}((0,le.useTranslation)(),1)[0],l=(0,a.useCallback)((function(e){n(e.listing),o({appId:"MARKETPLACE",notisId:"npwd:marketplace:newListingBroadcast",content:e.listing.description,secondaryTitle:i("MARKETPLACE.NEW_LISTING")})}),[n,o]),E=(0,a.useCallback)((function(e){r(e)}),[r]);(0,bp.useNuiEvent)("MARKETPLACE",Bi.BROADCAST_ADD,l),(0,bp.useNuiEvent)("MARKETPLACE",Bi.BROADCAST_DELETE,E)}(),function(){var e=ba(),t=e.updateLocalMessages,n=e.updateLocalConversations,r=e.setMessageReadState,o=(0,E.useLocation)().pathname,i=an(),l=rl().visibility,s=Sp().enqueueNotification,c=un().getDisplayByNumber,u=Or(),d=u.getMessageConversationById,T=u.goToConversation,A=(0,a.useCallback)((function(e,t,n){var r,a=d(n);s({appId:"MESSAGES",notisId:"npwd:messages:messageBroadcast",content:e,onClick:function(){return T(a)},secondaryTitle:null!==(r=c(t))&&void 0!==r?r:t,path:"/messages/conversations/".concat(n)})}),[s]),p=(0,a.useCallback)((function(e){e.conversation_id===(null==i?void 0:i.id)&&t(e)}),[t,i]),_=(0,a.useCallback)((function(e){n({participant:e.participant,isGroupChat:e.isGroupChat,id:e.id,conversationList:e.conversationList,label:e.label,unread:0})}),[n]);(0,bp.useNuiEvent)("MESSAGES",Wt.CREATE_MESSAGE_BROADCAST,(function(e){var t=e.conversationName,n=e.conversation_id,a=e.message;l&&o.includes("/messages/conversations/".concat(n))||(r(n,1),A(a,t,n))})),(0,bp.useNuiEvent)("MESSAGES",Wt.SEND_MESSAGE_SUCCESS,p),(0,bp.useNuiEvent)("MESSAGES",Wt.CREATE_MESSAGE_CONVERSATION_SUCCESS,_)}(),function(){var e=un().getContactByNumber,t=(0,E.useHistory)(),n=qA().getApp,r=(0,a.useCallback)((function(r){var a,o,i=e(r.number),l=n("CONTACTS").path,E=qn().stringify({addNumber:r.number.slice(0,Lt.number),name:null===(a=r.name)||void 0===a?void 0:a.slice(0,Lt.display),avatar:null===(o=r.avatar)||void 0===o?void 0:o.slice(0,Lt.avatar)});if(!i)return t.push({pathname:"".concat(l,"/-1"),search:"?".concat(E)});t.push({pathname:"".concat(l,"/").concat(i.id),search:"?".concat(E)})}),[n,e,t]);Yi("CONTACTS",Nt.ADD_CONTACT_EXPORT,r)}(),function(){var e=qA().getApp,t=(0,E.useHistory)(),n=(0,a.useCallback)((function(n){var r=e("NOTES").path,a=qn().stringify(n);t.push({pathname:r,search:"?".concat(a)})}),[t,e]);Yi("NOTES",ko.ADD_NOTE_EXPORT,n)}(),wp(),jp(),function(){var e=iA(),t=e.addLocalMessage,n=e.updateLocalChannelLabel,r=e.localTransferOwner,o=e.leaveLocalChannel,i=qT(),l=(0,a.useCallback)((function(e){i.id===e.channelId&&t(e)}),[i,t]),E=(0,a.useCallback)((function(e){i.id===e.channelId&&n(e)}),[i,t]),s=(0,a.useCallback)((function(e){r(e)}),[r]),c=(0,a.useCallback)((function(e){o(e.channelId)}),[o]);Yi("DARKCHAT",LT.BROADCAST_MESSAGE,l),Yi("DARKCHAT",LT.BROADCAST_LABEL_UPDATE,E),Yi("DARKCHAT",LT.TRANSFER_OWNERSHIP_SUCCESS,s),Yi("DARKCHAT",LT.DELETE_CHANNEL_SUCCESS,c)}(),s=mr().addAlert,c=(0,le.useTranslation)().t,(0,a.useEffect)((function(){(0,n_.e)()||s({message:c("SETTINGS.MESSAGES.INVALID_SETTINGS"),type:"error"})}),[]);var _=tp(),I=Gt().modal;return(0,r.jsx)("div",{children:(0,r.jsxs)(Qp,{children:[(0,r.jsx)(Vp,{}),(0,r.jsxs)(Yp,{children:[(0,r.jsx)(vp,{}),(0,r.jsxs)("div",i_({className:"PhoneAppContainer",id:"notificationAppContainer",ref:u},{children:[(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(E.Route,{exact:!0,path:"/",component:op}),I&&(0,r.jsx)(E.Route,{exact:!0,path:"/call",component:hn}),T.map((function(e){return(0,r.jsx)(a.Fragment,{children:!e.isDisabled&&(0,r.jsx)(e.Route,{},e.id)},e.id)})),_.map((function(e){return(0,r.jsx)(a.Fragment,{children:(0,r.jsx)(e.Route,{settings:A,i18n:d,theme:p})},e.id)}))]}),(0,r.jsx)(Bp,{}),(0,r.jsx)(t_,{})]})),(0,r.jsx)(gp,{})]})]})})},E_=function(){return E_=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i}((0,le.useTranslation)(),1)[0],u=(0,E.useHistory)();return(0,r.jsxs)(c_,E_({onClick:function(){l&&!s?u.push(l):s(),n(e.id.toString())},ref:t,style:{minWidth:"370px"}},{children:[(0,r.jsxs)(C.Box,E_({display:"flex",alignItems:"center",color:"white",width:"100%",mb:.7},{children:[(0,r.jsx)(C.Box,E_({p:"5px",borderRadius:30,bgcolor:a.backgroundColor,display:"flex",justifyContent:"center",alignItems:"center"},{children:(0,r.jsx)(a.NotificationIcon,{fontSize:"inherit"})})),(0,r.jsx)(C.Box,E_({color:"#bfbfbf",fontWeight:400,paddingLeft:1,flexGrow:1,fontSize:16},{children:c(a.nameLocale)})),(0,r.jsx)(C.Box,{children:(0,r.jsx)(C.Typography,E_({color:"#bfbfbf"},{children:i}))})]})),(0,r.jsx)(s_,{children:o})]}))})),d_=function(){return d_=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&a[a.length-1])||6!==l[0]&&2!==l[0])){i=0;continue}if(3===l[0]&&(!a||l[1]>a[0]&&l[1]0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i}((0,le.useTranslation)(),1)[0];return(0,r.jsxs)(R_,S_({onClick:function(){i(e.id)},style:{minWidth:"370px"},ref:t},{children:[(0,r.jsxs)(C.Box,S_({display:"flex",alignItems:"center",color:"white",width:"100%",mb:.7},{children:[(0,r.jsx)(C.Box,S_({p:"5px",borderRadius:30,bgcolor:l.backgroundColor,display:"flex",justifyContent:"center",alignItems:"center"},{children:(0,r.jsx)(l.NotificationIcon,{fontSize:"inherit"})})),(0,r.jsx)(C.Box,S_({color:"#bfbfbf",fontWeight:400,paddingLeft:1,flexGrow:1,fontSize:16},{children:E("APPS_SYSTEM")})),(0,r.jsx)(C.Box,{children:(0,r.jsx)(C.Typography,S_({color:"#bfbfbf"},{children:n}))})]})),(0,r.jsx)(O_,{children:a}),o&&(0,r.jsxs)(C.Box,{children:[(0,r.jsx)(C.IconButton,S_({size:"small",onClick:function(){return f_(void 0,void 0,void 0,(function(){return h_(this,(function(t){switch(t.label){case 0:return[4,(0,v.Z)("npwd:onNotificationConfirm",e.id)];case 1:return t.sent(),[2]}}))}))}},{children:(0,r.jsx)(__.Z,{})})),(0,r.jsx)(C.IconButton,S_({size:"small",onClick:function(){return f_(void 0,void 0,void 0,(function(){return h_(this,(function(t){switch(t.label){case 0:return[4,(0,v.Z)("npwd:onNotificationCancel",e.id)];case 1:return t.sent(),[2]}}))}))}},{children:(0,r.jsx)(I_.Z,{})}))]})]}))})),C_=function(){return C_=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},P_=function(e,t,n){if(n||2===arguments.length)for(var r,a=0,o=t.length;a0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i}((0,a.useState)(0),2),o=n[0],i=n[1];return(0,bp.useNuiEvent)("PHONE",xe.LO.UNLOAD_CHARACTER,(function(){i((function(e){return e+1}))})),(0,r.jsxs)(L.RecoilRoot,{children:[(0,r.jsx)(M_,{}),t]},o)}),{children:(0,r.jsx)((function(e){var t=e.children,n=(0,L.useRecoilSnapshot)();return(0,a.useEffect)((function(){var e,t;if(_n.debug.shouldShowAtomDebug){console.debug("The following atoms were modified:");try{for(var r=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(n.getNodes_UNSTABLE({isModified:!0})),a=r.next();!a.done;a=r.next()){var o=a.value;console.debug(o.key,n.getLoadable(o))}}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}}}),[n]),(0,r.jsx)(r.Fragment,{children:t})}),{children:(0,r.jsx)((function(){var e=j(),t=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,a,o=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i}((0,a.useState)(),2),n=t[0],o=t[1],i=L_();return(0,r.jsx)(C.StyledEngineProvider,C_({injectFirst:!0},{children:(0,r.jsx)(C.ThemeProvider,C_({theme:e},{children:(0,r.jsx)(b,{children:(0,r.jsx)(sp.SnackbarProvider,C_({classes:{containerRoot:i.rootOverride},autoHideDuration:3e3,maxSnack:2,Components:{npwdNotification:u_,npwdCallNotification:p_,npwdSystemNotification:m_},disableWindowBlurListener:!0,anchorOrigin:{horizontal:"center",vertical:"top"},domRoot:n},{children:(0,r.jsx)(H,{children:(0,r.jsx)(l_,{notiRefCB:o})})}))})}))}))}),{})})})}))}))}),document.getElementById("root"))},98105:function(e,t,n){"use strict";n.d(t,{Id:function(){return r},MH:function(){return o},Yj:function(){return a}});var r=function(){return!1},a=function(){return window.GetParentResourceName?null===window||void 0===window?void 0:window.GetParentResourceName():"npwd"},o=function(e,t,n){return{data:e,status:t,errorMsg:n}}},84782:function(e){"use strict";e.exports=JSON.parse('{"cellProvider":"3","defaultLanguage":"en","wallpapers":[{"label":"Minimal","value":"minimal.jpg"},{"label":"Surf","value":"surf.jpg"},{"label":"Waves","value":"waves.jpg"},{"label":"Project Error","value":"projecterror.jpg"},{"label":"NPWD 2020","value":"npwd2020.png"},{"label":"Default","value":"default.jpg"}],"frames":[{"label":"Default","value":"default.png"},{"label":"Blå","value":"blue.png"},{"label":"Guld","value":"gold.png"},{"label":"Minimal","value":"minimal.png"},{"label":"Pink","value":"pink.png"},{"label":"White","value":"white.png"}],"zoomOptions":[{"label":"150%","value":1.5},{"label":"100%","value":1},{"label":"90%","value":0.9},{"label":"80%","value":0.8},{"label":"70%","value":0.7}],"languages":[{"label":"English","value":"en"},{"label":"Español","value":"es"},{"label":"Français","value":"fr"},{"label":"Norsk","value":"no"},{"label":"Polski","value":"pl"},{"label":"Bosanski","value":"ba"},{"label":"Português","value":"pt"},{"label":"Hungarian","value":"hu"},{"label":"Čeština","value":"cs"},{"label":"Nederlands","value":"nl"},{"label":"Deutsch","value":"de"},{"label":"Finnish","value":"fi"},{"label":"Italian","value":"it"},{"label":"Indonesia","value":"id"},{"label":"简体中文","value":"zhcn"},{"label":"繁體中文","value":"zhtw"},{"label":"Русский","value":"ru"},{"label":"Svenska","value":"sv"},{"label":"Türkçe","value":"tr"},{"label":"Lietuvių","value":"lt"}],"ringtones":[{"label":"iFruit","value":"PHONE_GENERIC_RING_01"},{"label":"Desk Phone","value":"PHONE_GENERIC_RING_02"},{"label":"Rotary Phone","value":"PHONE_GENERIC_RING_03"}],"notiSounds":[{"label":"Online","value":"Phone_SoundSet_Default"},{"label":"Michael","value":"Phone_SoundSet_Michael"},{"label":"Trevor","value":"Phone_SoundSet_Trevor"},{"label":"Franklin","value":"Phone_SoundSet_Franklin"}],"notiFilters":[{"label":"Alle Tweets","value":"all"},{"label":"Kun mentions","value":"mentions"}],"defaultSettings":{"language":{"label":"English","value":"en"},"callVolume":50,"iconSet":{"label":"Material","value":{"custom":false,"name":"material"}},"wallpaper":{"label":"Minimal","value":"minimal.jpg"},"customWallpaper":"","frame":{"label":"Default","value":"default.png"},"theme":{"label":"Dark","value":"taso-dark"},"zoom":{"label":"90%","value":0.9},"streamerMode":false,"ringtone":{"label":"iFruit","value":"PHONE_GENERIC_RING_01"},"notiSound":{"label":"Online","value":"Phone_SoundSet_Default"},"TWITTER_notiFilter":{"label":"Alle Tweets","value":"all"},"TWITTER_notiSound":{"label":"Online","value":"online"},"TWITTER_notiSoundVol":25,"TWITTER_notifyNewFeedTweet":true,"MARKETPLACE_notifyNewListing":true},"appSettings":{"browserHomePage":"https://google.com"},"iconSet":[{"label":"NPWD Icons","value":{"custom":true,"name":"npwd_icons"}},{"label":"Material","value":{"custom":false,"name":"material"}}],"themes":[{"label":"Dark","value":"taso-dark"},{"label":"Light","value":"default-light"}],"debug":{"printDebugLogs":false,"logLevel":1,"shouldShowAtomDebug":false},"SentryErrorMetrics":false}')}}]);