PageSourceSearch

https://demo.sonraisecurity.com/_next/static/chunks/pages/integrat…/front-internal/sidebar-6e4817d89c56947c.js

js sonraisecurity.com collected 2026-10-01 11:37:30 UTC 30,731 bytes, 5 lines download raw bytes

1
2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="dae0015d-5506-5e3c-94c3-3b457f75f8cf")}catch(e){}}();
3(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4921],{261:(e,t,r)=>{"use strict";r.d(t,{d:()=>l,j:()=>i});var a=r(12108),n=r(55729),s=r(33684);function l(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.Nx;return Object.entries({xs:(0,s.Ub)("(min-width: 0px)"),sm:(0,s.Ub)("(min-width: 640px)"),md:(0,s.Ub)("(min-width: 768px)"),lg:(0,s.Ub)("(min-width: 1024px)"),xl:(0,s.Ub)("(min-width: 1280px)")}).reverse().filter(t=>{let[r]=t;return e.includes(r)}).find(e=>{let[,t]=e;return t})[0]}let i=e=>{let{defaultIsOpen:t=!1}=e||{},[r,a]=(0,n.useState)(t),s=(0,n.useCallback)(()=>{a(!0)},[]);return{isOpen:r,onOpen:s,onClose:(0,n.useCallback)(()=>{a(!1)},[]),onToggle:(0,n.useCallback)(()=>{a(e=>!e)},[])}}},10994:(e,t,r)=>{"use strict";r.d(t,{YJ:()=>B,dp:()=>F,jI:()=>D,z$:()=>K});var a=r(55729);function n(){return(n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e}).apply(this,arguments)}function s(e,t){if(null==e)return{};var r,a,n={},s=Object.keys(e);for(a=0;a<s.length;a++)t.indexOf(r=s[a])>=0||(n[r]=e[r]);return n}function l(e){var t=(0,a.useRef)(e),r=(0,a.useRef)(function(e){t.current&&t.current(e)});return t.current=e,r.current}var i=function(e,t,r){return void 0===t&&(t=0),void 0===r&&(r=1),e>r?r:e<t?t:e},o=function(e){return"touches"in e},c=function(e){return e&&e.ownerDocument.defaultView||self},u=function(e,t,r){var a=e.getBoundingClientRect(),n=o(t)?function(e,t){for(var r=0;r<e.length;r++)if(e[r].identifier===t)return e[r];return e[0]}(t.touches,r):t;return{left:i((n.pageX-(a.left+c(e).pageXOffset))/a.width),top:i((n.pageY-(a.top+c(e).pageYOffset))/a.height)}},d=function(e){o(e)||e.preventDefault()},f=a.memo(function(e){var t=e.onMove,r=e.onKey,i=s(e,["onMove","onKey"]),f=(0,a.useRef)(null),m=l(t),p=l(r),h=(0,a.useRef)(null),x=(0,a.useRef)(!1),g=(0,a.useMemo)(function(){var e=function(e){d(e),(o(e)?e.touches.length>0:e.buttons>0)&&f.current?m(u(f.current,e,h.current)):r(!1)},t=function(){return r(!1)};function r(r){var a=x.current,n=c(f.current),s=r?n.addEventListener:n.removeEventListener;s(a?"touchmove":"mousemove",e),s(a?"touchend":"mouseup",t)}return[function(e){var t=e.nativeEvent,a=f.current;if(a&&(d(t),(!x.current||o(t))&&a)){if(o(t)){x.current=!0;var n=t.changedTouches||[];n.length&&(h.current=n[0].identifier)}a.focus(),m(u(a,t,h.current)),r(!0)}},function(e){var t=e.which||e.keyCode;t<37||t>40||(e.preventDefault(),p({left:39===t?.05:37===t?-.05:0,top:40===t?.05:38===t?-.05:0}))},r]},[p,m]),v=g[0],y=g[1],j=g[2];return(0,a.useEffect)(function(){return j},[j]),a.createElement("div",n({},i,{onTouchStart:v,onMouseDown:v,className:"react-colorful__interactive",ref:f,onKeyDown:y,tabIndex:0,role:"slider"}))}),m=function(e){return e.filter(Boolean).join(" ")},p=function(e){var t=e.color,r=e.left,n=e.top,s=m(["react-colorful__pointer",e.className]);return a.createElement("div",{className:s,style:{top:100*(void 0===n?.5:n)+"%",left:100*r+"%"}},a.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},h=function(e,t,r){return void 0===t&&(t=0),void 0===r&&(r=Math.pow(10,t)),Math.round(r*e)/r},x=function(e){return C(g(e))},g=function(e){return"#"===e[0]&&(e=e.substring(1)),e.length<6?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:4===e.length?h(parseInt(e[3]+e[3],16)/255,2):1}:{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16),a:8===e.length?h(parseInt(e.substring(6,8),16)/255,2):1}},v=function(e){return _(b(e))},y=function(e){var t=e.s,r=e.v,a=e.a,n=(200-t)*r/100;return{h:h(e.h),s:h(n>0&&n<200?t*r/100/(n<=100?n:200-n)*100:0),l:h(n/2),a:h(a,2)}},j=function(e){var t=y(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},w=function(e){var t=y(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},b=function(e){var t=e.h,r=e.s,a=e.v,n=e.a;t=t/360*6,r/=100,a/=100;var s=Math.floor(t),l=a*(1-r),i=a*(1-(t-s)*r),o=a*(1-(1-t+s)*r),
3c=s%6;return{r:h(255*[a,i,l,l,o,a][c]),g:h(255*[o,a,a,i,l,l][c]),b:h(255*[l,l,o,a,a,i][c]),a:h(n,2)}},N=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},_=function(e){var t=e.r,r=e.g,a=e.b,n=e.a,s=n<1?N(h(255*n)):"";return"#"+N(t)+N(r)+N(a)+s},C=function(e){var t=e.r,r=e.g,a=e.b,n=e.a,s=Math.max(t,r,a),l=s-Math.min(t,r,a),i=l?s===t?(r-a)/l:s===r?2+(a-t)/l:4+(t-r)/l:0;return{h:h(60*(i<0?i+6:i)),s:h(s?l/s*100:0),v:h(s/255*100),a:n}},k=a.memo(function(e){var t=e.hue,r=e.onChange,n=m(["react-colorful__hue",e.className]);return a.createElement("div",{className:n},a.createElement(f,{onMove:function(e){r({h:360*e.left})},onKey:function(e){r({h:i(t+360*e.left,0,360)})},"aria-label":"Hue","aria-valuenow":h(t),"aria-valuemax":"360","aria-valuemin":"0"},a.createElement(p,{className:"react-colorful__hue-pointer",left:t/360,color:j({h:t,s:100,v:100,a:1})})))}),S=a.memo(function(e){var t=e.hsva,r=e.onChange,n={backgroundColor:j({h:t.h,s:100,v:100,a:1})};return a.createElement("div",{className:"react-colorful__saturation",style:n},a.createElement(f,{onMove:function(e){r({s:100*e.left,v:100-100*e.top})},onKey:function(e){r({s:i(t.s+100*e.left,0,100),v:i(t.v-100*e.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+h(t.s)+"%, Brightness "+h(t.v)+"%"},a.createElement(p,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:j(t)})))}),E=function(e,t){if(e===t)return!0;for(var r in e)if(e[r]!==t[r])return!1;return!0},z=function(e,t){return e.toLowerCase()===t.toLowerCase()||E(g(e),g(t))};function A(e,t,r){var n=l(r),s=(0,a.useState)(function(){return e.toHsva(t)}),i=s[0],o=s[1],c=(0,a.useRef)({color:t,hsva:i});return(0,a.useEffect)(function(){if(!e.equal(t,c.current.color)){var r=e.toHsva(t);c.current={hsva:r,color:t},o(r)}},[t,e]),(0,a.useEffect)(function(){var t;E(i,c.current.hsva)||e.equal(t=e.fromHsva(i),c.current.color)||(c.current={hsva:i,color:t},n(t))},[i,e,n]),[i,(0,a.useCallback)(function(e){o(function(t){return Object.assign({},t,e)})},[])]}var L,M="undefined"!=typeof window?a.useLayoutEffect:a.useEffect,I=new Map,q=function(e){M(function(){var t=e.current?e.current.ownerDocument:document;if(void 0!==t&&!I.has(t)){var a=t.createElement("style");a.innerHTML='.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url(\'data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>\')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}',I.set(t,a);var n=L||r.nc;n&&a.setAttribute("nonce",n),t.head.appendChild(a)}},[])}
3,T=function(e){var t=e.className,r=e.colorModel,l=e.color,i=void 0===l?r.defaultColor:l,o=e.onChange,c=s(e,["className","colorModel","color","onChange"]),u=(0,a.useRef)(null);q(u);var d=A(r,i,o),f=d[0],p=d[1],h=m(["react-colorful",t]);return a.createElement("div",n({},c,{ref:u,className:h}),a.createElement(S,{hsva:f,onChange:p}),a.createElement(k,{hue:f.h,onChange:p,className:"react-colorful__last-control"}))},R={defaultColor:"000",toHsva:x,fromHsva:function(e){return v({h:e.h,s:e.s,v:e.v,a:1})},equal:z},D=function(e){return a.createElement(T,n({},e,{colorModel:R}))},O=function(e){var t=e.className,r=e.hsva,n=e.onChange,s={backgroundImage:"linear-gradient(90deg, "+w(Object.assign({},r,{a:0}))+", "+w(Object.assign({},r,{a:1}))+")"},l=m(["react-colorful__alpha",t]),o=h(100*r.a);return a.createElement("div",{className:l},a.createElement("div",{className:"react-colorful__alpha-gradient",style:s}),a.createElement(f,{onMove:function(e){n({a:e.left})},onKey:function(e){n({a:i(r.a+e.left)})},"aria-label":"Alpha","aria-valuetext":o+"%","aria-valuenow":o,"aria-valuemin":"0","aria-valuemax":"100"},a.createElement(p,{className:"react-colorful__alpha-pointer",left:r.a,color:w(r)})))},U=function(e){var t=e.className,r=e.colorModel,l=e.color,i=void 0===l?r.defaultColor:l,o=e.onChange,c=s(e,["className","colorModel","color","onChange"]),u=(0,a.useRef)(null);q(u);var d=A(r,i,o),f=d[0],p=d[1],h=m(["react-colorful",t]);return a.createElement("div",n({},c,{ref:u,className:h}),a.createElement(S,{hsva:f,onChange:p}),a.createElement(k,{hue:f.h,onChange:p}),a.createElement(O,{hsva:f,onChange:p,className:"react-colorful__last-control"}))},H={defaultColor:"0001",toHsva:x,fromHsva:v,equal:z},F=function(e){return a.createElement(U,n({},e,{colorModel:H}))},P={defaultColor:{r:0,g:0,b:0,a:1},toHsva:C,fromHsva:b,equal:E},B=function(e){return a.createElement(U,n({},e,{colorModel:P}))},V={defaultColor:{r:0,g:0,b:0},toHsva:function(e){return C({r:e.r,g:e.g,b:e.b,a:1})},fromHsva:function(e){var t;return{r:(t=b(e)).r,g:t.g,b:t.b}},equal:E},K=function(e){return a.createElement(T,n({},e,{colorModel:V}))}},12094:(e,t,r)=>{"use strict";r.d(t,{W:()=>n,Y:()=>a});let a="NAVATTIC_AUTH_SUCCESS";function n(e,t,r,n){let s=window.open(t?"".concat(e,"?token=").concat(t):e,"_blank","width=".concat(600,",height=").concat(800,",scrollbars=yes,resizable=yes")),l=e=>{e.origin===window.location.origin&&e.data.type===a&&(null==s||s.close(),r(e.data.newToken))};window.addEventListener("message",l);let i=setInterval(()=>{(null==s?void 0:s.closed)&&(window.removeEventListener("message",l),clearInterval(i),null==n||n())},1e3)}},12108:(e,t,r)=>{"use strict";r.d(t,{Nx:()=>a});let a=["xs","sm","md","lg","xl"]},13342:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var a=r(6029),n=r(95678),s=r(16332),l=r(55613);let i=e=>{let{handleAction:t,integrationIcon:r,loading:i=!1,title:o,loadingTitle:c,description:u,loadingDescription:d,buttonText:f}=e;return(0,a.jsxs)("div",{className:"flex min-h-screen flex-col items-center justify-center space-y-2 bg-white p-4",children:[(0,a.jsxs)("div",{className:"flex flex-row items-center justify-center",children:[(0,a.jsx)("div",{className:"flex h-24 w-24 justify-center rounded-full border-2",children:(0,a.jsx)(n.I,{size:"lg",name:r,className:"h-full w-1/2"})}),(0,a.jsx)(n.I,{size:"lg",name:"arrow-right",className:"h-full"}),(0,a.jsx)("div",{className:"flex h-24 w-24 justify-center rounded-full border-2",children:(0,a.jsx)(n.I,{size:"lg",name:"navattic",className:"h-full w-1/2"})})]}),(0,a.jsx)("h1",{className:"text-default text-2xl font-semibold tracking-tight",children:i?c:o}),(0,a.jsx)("div",{className:"mb-3 w-3/4 text-center text-lg font-medium text-gray-500",children:i?d:u}),(0,a.jsx)("div",{className:"mb-16",children:i?(0,a.jsx)(s.a,{}):(0,a.jsx)(l.$,{onClick:t,children:f})})]})}},16332:(e,t,r)=>{"use strict";r.d(t,{a:()=>s});var a=r(6029),n=r(34281);let s=e=>{let{loadingText:t,"data-test-id":r,...n}=e;return(0,a.jsx)("div",{className:"flex h-full w-full items-center justify-center","data-test-id":r,...n,children:(0,a.jsxs)("div",{className:"flex w-fit items-center justify-center gap-3",children:[(0,a.jsx)(l,{}),t&&(0,a.jsx)("p",{className:"font-medium text-gray-600",children:t})]})})};
3function l(){let e={initial:{opacity:.3,y:-2},animate:{opacity:1,y:0},exit:{opacity:.3,y:-2}};return(0,a.jsxs)(n.P.svg,{className:"home-hero-iframe-loader",fill:"none",height:"32",viewBox:"0 0 32 32",width:"32",xmlns:"http://www.w3.org/2000/svg",children:[(0,a.jsx)(n.P.path,{d:"M25.7812 5.8075C23.5161 5.8075 21.5334 7.32873 20.9468 9.51659C20.9258 9.59519 20.9764 9.67507 21.0566 9.68867C22.826 9.98856 24.6808 9.96791 26.7634 9.09746C27.0395 8.98207 27.2396 8.73947 27.3171 8.45044L27.9971 5.91388C28.0115 5.86021 27.971 5.8075 27.9154 5.8075H25.7812Z",fill:"#03020F",initial:"initial",animate:"animate",exit:"exit",variants:e,transition:{repeat:1/0,repeatType:"reverse",duration:.5,delay:.3,ease:"linear"}}),(0,a.jsx)(n.P.path,{d:"M26.4854 11.0039C26.5509 10.9743 26.6255 11.0326 26.6069 11.1021L25.689 14.5282C25.6118 14.8162 25.409 15.0599 25.1343 15.1757C18.3477 18.035 13.9951 11.807 7.14476 14.9043C7.07919 14.934 7.00461 14.8757 7.02323 14.8062L7.94114 11.3801C8.0183 11.0921 8.22108 10.8484 8.49586 10.7326C15.2825 7.87327 19.635 14.1013 26.4854 11.0039Z",fill:"#03020F",initial:"initial",animate:"animate",exit:"exit",variants:e,transition:{repeat:1/0,repeatType:"reverse",duration:.5,delay:.2,ease:"linear"}}),(0,a.jsx)(n.P.path,{d:"M24.8552 17.0883C24.9208 17.0587 24.9954 17.117 24.9768 17.1865L24.0589 20.6126C23.9817 20.9006 23.7789 21.1443 23.5041 21.2601C16.7176 24.1194 12.365 17.8914 5.51464 20.9888C5.44907 21.0184 5.37449 20.9601 5.39311 20.8906L6.31102 17.4645C6.38819 17.1765 6.59096 16.9328 6.86574 16.817C13.6523 13.9577 18.0049 20.1857 24.8552 17.0883Z",fill:"#03020F",initial:"initial",animate:"animate",exit:"exit",variants:e,transition:{repeat:1/0,repeatType:"reverse",duration:.5,delay:.1,ease:"linear"}}),(0,a.jsx)(n.P.path,{d:"M6.21512 26.1852C8.48235 26.1852 10.4669 24.6625 11.0539 22.4725C11.075 22.3937 11.024 22.3136 10.9435 22.3
3002C9.17467 22.0066 7.32202 22.0269 5.24695 22.8771C4.96779 22.9915 4.76499 23.2355 4.68689 23.5269L4.00293 26.0788C3.98854 26.1325 4.02899 26.1852 4.08455 26.1852H6.21512Z",fill:"#03020F",initial:"initial",animate:"animate",exit:"exit",variants:e,transition:{repeat:1/0,repeatType:"reverse",duration:.5,delay:0,ease:"linear"}})]})}},36485:e=>{var t,r="undefined"!=typeof window&&(window.crypto||window.msCrypto)||"undefined"!=typeof self&&self.crypto;e.exports=t=r?function(){return Math.abs(r.getRandomValues(new Uint32Array(1))[0]/0xffffffff)}:Math.random},38256:e=>{e.exports=function(e,t){var r="000000000"+e;return r.substr(r.length-t)}},44580:(e,t,r)=>{"use strict";r.d(t,{S:()=>c});var a=r(6029),n=r(95632),s=r(87173),l=r(34281),i=r(55729);let o={open:{height:"auto",opacity:1},collapsed:{height:0,opacity:0}},c=e=>{let{isOpen:t,className:r,children:c,motionKey:u="collapse-content",allowOverflowWhenOpen:d=!1,withTriggerSpacing:f=!0,"data-test-id":m,...p}=e,[h,x]=(0,i.useState)(t),g=(0,i.useRef)(c);return t&&(g.current=c),(0,i.useEffect)(()=>{t&&x(!0)},[t]),(0,a.jsx)(s.N,{initial:!1,children:(t||h)&&(0,a.jsx)(l.P.div,{variants:o,initial:"collapsed",animate:t?"open":"collapsed",exit:"collapsed",transition:{ease:[.175,.885,.32,1.1]},onAnimationComplete:e=>{"collapsed"!==e||t||x(!1)},"data-test-id":m,className:(0,n.cn)(d&&t?"overflow-visible":"overflow-hidden",r),...p,children:(0,a.jsx)("div",{className:(0,n.cn)(f&&"mt-3"),children:t?c:g.current})},u)})}},47327:(e,t,r)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/integration/front-internal/sidebar",function(){return r(78636)}])},59584:(e,t,r)=>{"use strict";r.d(t,{_:()=>f});var a=r(6029),n=r(95632),s=r(261),l=r(55613),i=r(26100),o=r(44580),c=r(95678),u=r(69222);let d=(0,r(67827).F)(["inline-flex justify-start gap-2 rounded-xl border","[box-shadow:0px_2px_1px_-1px_rgba(255,255,255,0.7)_inset]"],{variants:{isFullWidth:{true:"w-full",false:"w-fit"},colorScheme:{gray:"bg-gray-50 border-gray-200 text-default",brand:"bg-blue-50 border-blue-200 text-info",orange:"bg-orange-50 border-orange-200 text-attention",red:"bg-red-50 border-red-200 text-error",green:"bg-green-50 border-green-200 text-success",yellow:"bg-yellow-50 border-yellow-200 text-yellow-900"},size:{sm:"pl-3 pr-1 py-1 gap-2 min-h-[33px]",md:"pl-3.5 pr-1.5 py-1.5 gap-2.5 min-h-[37px]",lg:"pl-4 pr-2 py-2 gap-3 min-h-[45px]"},hasButton:{true:"",false:""},hasDescription:{true:"items-start",false:"items-center"}},compoundVariants:[{size:"sm",hasButton:!1,className:"pr-3"},{size:"md",hasButton:!1,className:"pr-5"},{size:"lg",hasButton:!1,className:"pr-5"},{size:"sm",hasButton:!0,hasDescription:!0,className:"pr-2"},{size:"md",hasButton:!0,hasDescription:!0,className:"pr-2.5"},{size:"lg",hasButton:!0,hasDescription:!0,className:"pr-2.5"}],defaultVariants:{isFullWidth:!0,colorScheme:"gray"}});function f(e){let{colorScheme:t="gray",icon:r,title:f,description:m,className:p,isDismissible:h,actionButton:x,elementRight:g,isFullWidth:v=!0,onDismiss:y,"data-test-id":j,collapseClassName:w,size:b="lg",...N}=e,{isOpen:_,onToggle:C}=(0,s.j)({defaultIsOpen:!0}),k=!!(x||h||g),S=(0,a.jsxs)("div",{...N,"data-test-id":j,className:(0,n.cn)(d({isFullWidth:v,colorScheme:t,hasDescription:!!m,hasButton:k,size:b}),p),children:[r&&(0,a.jsx)(c.I,{name:r,size:"sm"===b?"sm":"lg"===b?"md":"sm",className:(0,n.cn)("shrink-0",{"self-start mt-[5px]":!!m})}),(0,a.jsxs)("div",{className:(0,n.cn)("inline-flex min-w-0 flex-col justify-start gap-1 pr-2",v&&"w-full",m&&"py-1",{"mt-px":!!m}),children:[(0,a.jsx)("div",{className:(0,n.cn)("sm"===b?"text-xs":"text-sm","leading-none font-medium"),children:f}),m&&(0,a.jsx)("div",{className:"text-xs text-balance",children:m})]}),h||x?(0,a.jsxs)(i.e,{size:"lg"===b?"sm":"xs",className:"items-center self-stretch",children:[x&&(0,a.jsx)(l.$,{variant:"outline",...x}),h&&(0,a.jsx)(u.K,{variant:"ghost",icon:"x",onClick:()=>{C(),null==y||y(!0)},tooltip:"Dismiss",className:(0,n.cn)({"text-info":"brand"===t,"text-attention":"orange"===t,"text-error":"red"===t,"text-success":"green"===t})})]}):g||null]});return h?(0,a.jsx)(o.S,{isOpen:_,className:(0,n.cn)(w),children:S}):S}},63357:(e,t,r)=>{var a=r(83243),n=r(38256),s=r(36485),l=0;function i(){return n((1679616*s()|0).toString(36),4)}function o(){return l=l<1679616?l:0,++l-1}function c(){return"c"+new Date().getTime().toString(36)+n(o().toString(36),4)+a()+(i()+i())}c.slug=function(){var e=new Date().getTime().toString(36),t=o().toString(36).slice(-4),r=a().slice(0,1)+a().slice(-1),n=i().slice(-2);return e.slice(-2)+t+r+n},c.isCuid=function(e){return"string"==typeof e&&!!e.startsWith("c")},c.isSlug=function(e){if("string"!=typeof e)return!1;var t=e.length;return!!(t>=7)&&!!(t<=10)},c.fingerprint=a,e.exports=c},78636:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>S});var a=r(6029),n=r(34584),s=r(78869),l=r(81983),i=r(59584),o=r(55613),c=r(73096),u=r(531);function d(e,t){switch(t.type){case"select-email":return{...e,selectedEmail:t.payload};case"start-lookup":return{...e,isLoading:!0,error:null,workspaces:[],user:null,requestStates:{}};case"lookup-success":return{...e,isLoading:!1,workspaces:t.payload.workspaces,user:t.payload.user};case"lookup-error":return{...e,isLoading:!1,error:t.payload};case"start-request":return{...e,requestStates:{...e.requestStates,[t.payload]:{state:"loading"}}};case"request-success":return{...e,requestStates:{...e.requestStates,[t.payload.workspaceId]:{state:"success",expiresAt:t.payload.expiresAt}}};case"request-error":return{...e,requestStates:{...e.requestStates,[t.payload.workspaceId]:{state:"error",error:t.payload.error}}};default:return e}}function f(e){return{selectedEmail:e,isLoading:!1,error:null,workspaces:[],user:null,requestStates:{}}}var m=r(81386),p=r(55729);let h=e=>"permanent"===e?"Permanent":new Date(e).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}),x=e=>{let t=new Date(e);return{date:t.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}),time:t.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",timeZoneName:"short"})}};function g(e){let{emails:t,selectedEmail:r,onSelect:n}=e,l=t.map(e=>({label:e,value:e}));return(0,a.jsx)("div",{className:"mb-4",children:(0,a.jsx)(s.l6,{label:"Select recipient",items:l,value:r,onValueChange:n,size:"sm"})})}function v(e){var t;let{emails:r,token:s}=e,[u,v]=(0,p.useReducer)(d,null!=(t=r[0])?t:"",f),{selectedEmail:j,isLoading:w,error:b,workspaces:N,user:_,requestStates:C}=u;(0,p.useEffect)(()=>{var e;let t=null!=(e=r[0])?e:"";t!==j&&v({type:"select-email",payload:t})},[r,j]);let k=(0,p.useCallback)(async()=>
3{if(j){v({type:"start-lookup"});try{let e=await fetch("".concat((0,n.PsK)(),"?email=").concat(encodeURIComponent(j)),{headers:{Authorization:"Bearer ".concat(s)}});if(e.ok){let t=await e.json();v({type:"lookup-success",payload:{workspaces:t.workspaces,user:t.user}})}else{let t=await e.json();v({type:"lookup-error",payload:t.error||"Failed to lookup workspaces"})}}catch(e){v({type:"lookup-error",payload:"Failed to lookup workspaces"})}}},[j,s]);(0,p.useEffect)(()=>{k()},[k]);let S=async e=>{v({type:"start-request",payload:e});try{let t=await fetch((0,n.nnY)(),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(s)},body:JSON.stringify({workspaceId:e})});if(t.ok){let r=await t.json();v({type:"request-success",payload:{workspaceId:e,expiresAt:r.expiresAt}})}else{let r=await t.json();v({type:"request-error",payload:{workspaceId:e,error:r.error||"Failed to request membership"}})}}catch(t){v({type:"request-error",payload:{workspaceId:e,error:"Failed to request membership"}})}},E=e=>{v({type:"select-email",payload:e})};if(!j)return(0,a.jsx)("div",{className:"p-4",children:(0,a.jsx)(l.V,{iconLeft:"mail",title:"Select a conversation",description:"Open a conversation to look up the customer's workspace"})});if(w)return(0,a.jsx)("div",{className:"p-4",children:(0,a.jsx)(l.V,{iconLeft:"loader",title:"Looking up workspaces..."})});if(b)return(0,a.jsxs)("div",{className:"p-4",children:[(0,a.jsx)(i._,{title:"Error",description:b,colorScheme:"red",icon:"triangle-alert"}),(0,a.jsx)(o.$,{className:"mt-3",onClick:k,size:"sm",children:"Retry"})]});if(!_)return(0,a.jsxs)("div",{className:"p-4",children:[r.length>1&&(0,a.jsx)(g,{emails:r,selectedEmail:j,onSelect:E}),(0,a.jsx)(i._,{title:"No user found",description:"No Navattic user found for ".concat(j),colorScheme:"gray",icon:"search"})]});let z=[_.firstName,_.lastName].filter(Boolean).join(" ")||null;return(0,a.jsxs)("div",{className:"flex flex-col gap-4 p-4",children:[r.length>1&&(0,a.jsx)(g,{emails:r,selectedEmail:j,onSelect:E}),(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsx)("span",{className:"text-sm font-medium text-gray-500",children:"User"}),(0,a.jsx)("div",{className:"rounded-lg border border-gray-200 p-3",children:(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("span",{className:"text-xs text-gray-500",children:"Email"}),(0,a.jsxs)("div",{className:"text-right",children:[(0,a.jsx)("div",{className:"text-sm font-medium text-gray-900",children:_.email}),_.emailVerified&&(0,a.jsx)(c.E,{colorScheme:"green",size:"xs",children:"Verified"})]})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("span",{className:"text-xs text-gray-500",children:"Name"}),(0,a.jsx)("div",{className:"text-sm font-medium text-gray-900",children:z||"N/A"})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("span",{className:"text-xs text-gray-500",children:"Created"}),(0,a.jsxs)("div",{className:"text-right",children:[(0,a.jsx)("div",{className:"text-sm font-medium text-gray-900",children:x(_.createdAt).date}),(0,a.jsx)("div",{className:"text-xs text-gray-500",children:x(_.createdAt).time})]})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("span",{className:"text-xs text-gray-500",children:"Last Active"}),(0,a.jsx)("div",{className:"text-right",children:_.lastActive?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"text-sm font-medium text-gray-900",children:x(_.lastActive).date}),(0,a.jsx)("div",{className:"text-xs text-gray-500",children:x(_.lastActive).time})]}):(0,a.jsx)("div",{className:"text-sm text-gray-400",children:"Never"})})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("span",{className:"text-xs text-gray-500",children:"Use Cases"}),(0,a.jsx)("div",{className:"flex flex-wrap justify-end gap-1",children:_.useCases.length>0?_.useCases.map(e=>(0,a.jsx)(c.E,{colorScheme:"green",size:"xs",children:e.name},e.id)):(0,a.jsx)("span",{className:"text-sm text-gray-400",children:"None"})})]}),_.posthogRecordingsUrl&&(0,a.jsx)("div",{className:"mt-2 border-t border-gray-200 pt-3",children:(0,a.jsx)(o.$,{size:"sm",variant:"outline",iconLeft:"logo-posthog",className:"w-full",onClick:()=>m.default.openUrl(_.posthogRecordingsUrl),children:"View Sessions"})})]})})]}),0===N.length?(0,a.jsx)(i._,{title:"No workspaces found",description:"No Navattic workspace found for ".concat(j),colorScheme:"gray",icon:"search"}):(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsx)("span",{className:"text-sm font-medium text-gray-500",children:1===N.length?"Workspace":"Workspaces"}),N.map(e=>(0,a.jsx)(y,{workspace:e,requestState:C[e.id],onRequestMembership:()=>S(e.id),formatExpiryDate:h},e.id))]})]})}function y(e){var t;let{workspace:r,requestState:n,onRequestMembership:s,formatExpiryDate:l}=e,d=(null==n?void 0:n.state)==="success",f=(null==n?void 0:n.state)==="loading",p=(null==n?void 0:n.state)==="error";return(0,a.jsxs)("div",{className:"flex flex-col gap-2 rounded-lg border border-gray-200 p-3",children:[(0,a.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsx)("span",{className:"text-sm font-medium text-gray-900",children:r.name}),(0,a.jsx)("span",{className:"text-xs text-gray-500",children:r.slug})]}),(0,a.jsx)(c.E,{size:"sm",colorScheme:"gray",children:r.planType})]}),r.hasAccess||d?(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(r.accessExpiresAt||(null==n?void 0:n.expiresAt))&&(0,a.jsx)(i._,{title:"You have access",description:"Expires ".concat(l(null!=(t=null==n?void 0:n.expiresAt)?t:r.accessExpiresAt)),colorScheme:"green",icon:"check"}),(0,a.jsx)(o.$,{size:"sm",iconRight:"external-link",className:"w-full",onClick:()=>m.default.openUrl("".concat(u.A.APP_URL,"/").concat(r.slug)),children:"Open Workspace"})]}):p?(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)(i._,{title:"Error",description:null==n?void 0:n.error,colorScheme:"red",icon:"triangle-alert"}),(0,a.jsx)(o.$,{onClick:s,size:"sm",variant:"outline",children:"Retry"})]}):(0,a.jsx)(o.$,{onClick:s,isLoading:f,size:"sm",children:"Request Membership"})]})}var j=r(13342),w=r(12094),b=r(47527),N=r(35460);let _={STAFF:"Staff",ADMIN:"Admin",SUPER_ADMIN:"Super Admin"};function C(e){let{token:t}=e,{isSDKLoading:r,isValidContext:n,recipients:s}=(()=>{let[e,t]=(0,p.useState)(!0),[r,a]=(0,p.useState)(!1),[n,s]=(0,p.useState)([]);return(0,p.useEffect)(()=>{try{let e=m.default.contextUpdates.subscribe(async e=>{if("singleConversation"!==e.type){a(!1),t(!1);return}let r=e.conversation;if(!r){a(!1),t(!1);return}let n=r.recipient?[r.recipient]:[];s(n),a(!0),t(!1)});return()=>e.unsubscribe()}catch(e){b.Rm.error({message:"Failed to initialize Front SDK for internal plugin",error:e}),t(!1)}}
3,[]),{isSDKLoading:e,isValidContext:r,recipients:n}})();if(r)return(0,a.jsx)("div",{className:"p-4",children:(0,a.jsx)(l.V,{iconLeft:"loader",title:"Loading Front SDK..."})});if(!n)return(0,a.jsx)("div",{className:"p-4",children:(0,a.jsx)(i._,{title:"Invalid context",description:"Please open a conversation to use this plugin",colorScheme:"yellow",icon:"triangle-alert"})});let o=s.map(e=>e.handle);return(0,a.jsx)(v,{emails:o,token:t})}function k(){let[e,t]=(0,p.useState)(null),[r,n]=(0,p.useState)(null),[s,l]=(0,p.useState)(!1),i=(0,p.useCallback)(()=>{l(!1);let e=window.open("/integration/front-internal/link-account","_blank","width=600,height=800,scrollbars=yes,resizable=yes"),r=a=>{a.origin===window.location.origin&&a.data.type===w.Y&&(null==e||e.close(),a.data.newToken&&t(a.data.newToken),a.data.user&&n(a.data.user),window.removeEventListener("message",r))};window.addEventListener("message",r)},[]);return(0,p.useEffect)(()=>{e||s||i()},[e,i,s]),(0,a.jsxs)("div",{className:"flex h-full w-full flex-col bg-white",children:[(0,a.jsx)("div",{className:"flex-1",children:e?(0,a.jsx)(C,{token:e}):(0,a.jsx)(j.A,{handleAction:i,integrationIcon:"logo-front",loading:!1,title:"Sign In Required",description:"Sign in with your Navattic account to access customer workspaces",loadingTitle:"Connecting...",loadingDescription:"Please wait while we verify your access",buttonText:"Sign In"})}),(0,a.jsx)("div",{className:"border-t border-gray-200 p-4",children:r?(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-1",children:[(0,a.jsx)("span",{className:"text-xs text-gray-500",children:"Logged in as"}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("p",{className:"truncate text-sm font-medium text-gray-900",children:r.name}),(0,a.jsx)(c.E,{colorScheme:"purple",size:"sm",children:_[r.internalRole]})]})]}),(0,a.jsx)(o.$,{size:"xs",variant:"outline",onClick:async()=>{await (0,N.signOut)({redirect:!1}),l(!0),t(null),n(null)},children:"Logout"})]}):(0,a.jsx)("p",{className:"text-sm text-gray-500",children:"Sign in to continue"})})]})}let S=function(){return(0,a.jsx)(k,{})}},83243:(e,t,r)=>{var a=r(38256),n=Object.keys("object"==typeof window?window:self).length,s=a(((navigator.mimeTypes?navigator.mimeTypes.length:0)+navigator.userAgent.length).toString(36)+n.toString(36),4);e.exports=function(){return s}}},e=>{e.O(0,[238,9913,8277,3684,5460,1386,2532,8975,6100,8255,6593,8792],()=>e(e.s=47327)),_N_E=e.O()}]);
4//# sourceMappingURL=sidebar-6e4817d89c56947c.js.map
5//# debugId=dae0015d-5506-5e3c-94c3-3b457f75f8cf

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