PageSourceSearch

https://apply.nymcu.org/_next/static/chunks/7335.383c70a1807c0b3f.js

js nymcu.org collected 2026-09-24 19:06:57 UTC 13,278 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7335],{27020:(t,e,n)=>{n.r(e),n.d(e,{ReportIssueButton:()=>O});var o=n(80263),r=n(84297),i=n(95952),a=n(48850),s=n(39194),l=n(92650),u=n(71465),c=n(77216),d=n(44213),p=n(54366),f=n(92972),y=n(44007),m=n(62257),h=n(64413),g=n(53239),b=n(8368);let v=b.Ay.div.withConfig({displayName:"ReportIssueModal.styled__Fields",componentId:"sc-24a05647-0"})(["display:flex;flex-direction:column;gap:",";"],t=>{let{theme:e}=t;return e.token.spacing["16"]}),x=b.Ay.p.withConfig({displayName:"ReportIssueModal.styled__ErrorMessage",componentId:"sc-24a05647-1"})(["color:",";font-size:",";margin:0;"],t=>{let{theme:e}=t;return e.token.color.text.negative},t=>{let{theme:e}=t;return e.token.typography.fontSize["02"]});var I=n(86917),S=n(97722),C=n(80251);class A extends Error{constructor(t){super("HTTP ".concat(t)),this.status=t,this.name="ReportIssueHttpError"}}let j=t=>{let{open:e,onClose:n}=t,{customer:r}=(0,h.useCustomer)(),{vendors:i,env:a}=(0,m.wQ)(),b=(0,y.useRouter)(),j=b.asPath.split("?")[0],[R,k]=(0,g.useState)(""),[w,E]=(0,g.useState)(""),[N,O]=(0,g.useState)(!1),{mutate:T,reset:_,isLoading:$,isError:D,error:K}=function(t){let{onSuccess:e}=t;return(0,C.n)({mutationFn:async t=>{var e;let n=navigator.connection,o=await fetch("/api/report-issue",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify((0,S._)((0,I._)({},t),{timestamp:Date.now(),userAgent:navigator.userAgent,viewport:{width:window.innerWidth,height:window.innerHeight},connectionType:null!=(e=null==n?void 0:n.effectiveType)?e:null}))});if(!o.ok)throw new A(o.status)},onSuccess:e,onError:t=>{(0,p.Qw)(t instanceof Error?t:Error(String(t)),{source:"ReportIssueModal.handleSubmit"})}})}({onSuccess:()=>O(!0)}),U=()=>{k(""),E(""),O(!1),_(),n()};return(0,g.useEffect)(()=>{if(!N)return;let t=setTimeout(()=>{O(!1),k(""),E(""),_(),n()},2500);return()=>clearTimeout(t)},[N,n,_]),(0,o.jsx)(s.a,{open:e,onClose:U,title:"Report an issue",size:"medium",type:"dialog",loading:$,primaryAction:N?{text:"Done",onClick:U}:{text:"Report",onClick:()=>{var t;return T({route:j,customerId:null!=(t=r.id)?t:null,userEmail:R.trim()||null,env:i.datadog.env,version:i.datadog.version,envName:a,sessionReplayUrl:(0,p.GJ)(),applicationId:((t,e)=>{var n;let o=t[e];return Array.isArray(o)?null!=(n=o[0])?n:null:null!=o?o:null})(b.query,"applicationId"),details:w.trim()||null})},disabled:$},secondaryAction:N?void 0:{text:"Cancel",onClick:U},children:N?(0,o.jsx)("div",{role:"status",children:(0,o.jsx)(l.P,{status:u.t.SUCCESS,title:"Issue reported!",description:"Our engineers will look into it shortly."})}):(0,o.jsxs)(v,{children:[(0,o.jsx)(c.G,{variant:"form-field",label:{text:"Route"},value:{text:j}}),(0,o.jsx)(d.p,{id:"report-issue-email",name:"report-issue-email",type:"email",autoComplete:"email",label:"Your email",value:R,onChange:t=>k(t.target.value)}),(0,o.jsx)(c.G,{variant:"form-field",label:{text:"Environment"},value:{text:i.datadog.env}}),(0,o.jsx)(c.G,{variant:"form-field",label:{text:"Version"},value:{text:i.datadog.version||"-"}}),(0,o.jsx)(d.p,{id:"report-issue-details",type:"textarea",label:"Additional details",placeholder:"Describe the issue…",value:w,maxLength:5e3,onChange:t=>E(t.target.value)}),D&&(0,o.jsx)(x,{role:"alert",children:function(t){if(t instanceof A){if(t.status===f.t.UNAUTHORIZED||t.status===f.t.FORBIDDEN)return"You need to be signed in to report an issue.";if(t.status===f.t.NOT_FOUND)return"This feature is not currently available."}return"Something went wrong. Please try again."}(K)})]})})};var R=n(54421),k=n(42884),w=n(33332);let E=b.Ay.div.withConfig({displayName:"ReportIssueButton.styled__Container",componentId:"sc-457fe8c8-0"})(["position:fixed;right:2rem;bottom:calc(env(safe-area-inset-bottom,0px) + 6rem);z-index:",";visibility:",";pointer-events:",";"],t=>{let{theme:e}=t;return e.foundations.zIndex.docked},t=>{let{$isOpen:e}=t;return e?"hidden":"visible"},t=>{let{$isOpen:e}=t;return e?"none":"auto"}),N=(0,b.Ay)(w.K).withConfig({displayName:"ReportIssueButton.styled__RoundIconButton",componentId:"sc-457fe8c8-1"})(["--bg-color:",";box-shadow:",";&:hover{--bg-color:",";opacity:0.9;}"],t=>{let{theme:e}=t;return e.colors.primary},t=>{let{theme:e}=t;return e.token.shadow["100"]},t=>{let{theme:e}=t;return e.colors.primary}),O=()=>{let{isToggleEnabled:t}=(0,k.Ei)(R.a.enableReportIssue),[e,n]=(0,g.useState)(!1);return t?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(E,{$isOpen:e,children:(0,o.jsx)(N,{"aria-label":"Report an issue","data-testid":"report-issue-button",onClick:()=>n(!0),children:(0,o.jsx)(r.I,{size:i.y.MEDIUM,color:"white",children:(0,o.jsx)(a.l,{weight:"fill"})})})}),(0,o.jsx)(j,{open:e,onClose:()=>n(!1)})]}):null}},43348:(t,e,n)=>{n.d(e,{E:()=>s});var o=n(8368),r=function(t,e,n){if(!n)return"cta"===e||"disclaimer"===e?t.token.typography.fontWeight["700"]:t.token.typography.fontWeight["400"];
1switch(n){case"bold":return t.token.typography.fontWeight["700"];case"medium":return t.token.typography.fontWeight["500"];default:return t.token.typography.fontWeight["400"]}},i=function(t,e){switch(e){case"cta":return t.token.typography.fontSize["00"];case"label":case"action":return t.token.typography.fontSize["01"];case"secondary":return t.token.typography.fontSize["02"];default:return t.token.typography.fontSize["03"]}},a=(0,o.AH)(["",""],function(t){var e=t.$color,n=t.theme;return(0,o.AH)(["color:",";"],e||n.token.color.text.primary)}),s=o.Ay.p.withConfig({displayName:"Textstyled__Text",componentId:"sc-hn4bbp-0"})([""," "," font-weight:",";font-size:",";",""],a,function(t){var e=t.$variant;return"action"===e||"cta"===e?"text-transform: uppercase;":""},function(t){return r(t.theme,t.$variant,t.$weight)},function(t){return i(t.theme,t.$variant)},function(t){return t.$shouldUseDesignSystemFont?(0,o.AH)(["font-family:",";"],function(t){return t.theme.token.typography.fontFamily.base}):""})},71465:(t,e,n)=>{n.d(e,{K:()=>r,t:()=>o});var o={INFO:"INFO",WARNING:"WARNING",ERROR:"ERROR",SUCCESS:"SUCCESS",NEUTRAL:"NEUTRAL"},r={DISMISS:"dismiss",REDIRECT:"redirect",ACTION:"action"}},92650:(t,e,n)=>{n.d(e,{P:()=>M});var o=n(84297),r=n(95952),i=n(22737),a=n(17378),s=n(38057),l=n(45540),u=n(90410),c=n(24609),d=n(94506),p=n(53239),f=n(81416),y=n(77091),m=n(9186),h=n(8368),g=n(17999),b=function(t){var e=t.status,n=t.colorKey;return({text:{INFO:m.A.token.color.status.info,WARNING:m.A.token.color.status.alert,ERROR:m.A.token.color.status.negative,SUCCESS:m.A.token.color.status.positive,NEUTRAL:m.A.token.color.status.disabled},surface:{INFO:m.A.token.color.surface.status.info,WARNING:m.A.token.color.surface.status.alert,ERROR:m.A.token.color.surface.status.negative,SUCCESS:m.A.token.color.surface.status.positive,NEUTRAL:m.A.token.color.surface.status.disabled}})[n][e]},v=(0,h.i7)(["from{opacity:0;}to{opacity:1;}"]),x=(0,h.AH)(["animation:"," ","ms ease-in;"],v,200),I=(0,h.i7)(["from{opacity:1;}to{opacity:0;}"]),S=(0,h.AH)(["animation:"," ","ms ease-out;"],I,200),C=h.Ay.div.withConfig({displayName:"Calloutstyled__CalloutWrapper",componentId:"sc-1q9ixyt-0"})(["padding:1.5rem;width:100%;min-height:",";background-color:",";border-radius:",";gap:0.625rem;display:flex;align-items:center;justify-content:space-between;"," "," ",""],"4.75rem",function(t){return b({status:t.$status,colorKey:"surface"})},function(t){return t.theme.token.radius["02"]},function(t){return t.$pointer?"cursor: pointer;":""},function(t){return t.$shouldHaveAppearAnimation?x:""},function(t){return t.$shouldHaveHideAnimation?S:""}),A=h.Ay.div.withConfig({displayName:"Calloutstyled__ActionsWrapper",componentId:"sc-1q9ixyt-1"})(["display:flex;align-items:center;gap:",";flex-shrink:0;"],function(t){return t.theme.token.spacing["08"]}),j=h.Ay.div.withConfig({displayName:"Calloutstyled__TextWrapper",componentId:"sc-1q9ixyt-2"})([""," display:flex;flex-direction:column;flex-grow:1;"],function(t){return t.$shouldHaveGap?"gap: 0.5rem;":""}),R=h.Ay.button.withConfig({displayName:"Calloutstyled__IconButton",componentId:"sc-1q9ixyt-3"})(["padding:0;background-color:",";transition:background-color 150ms cubic-bezier(0.4,0,0.2,1) 0ms;border-radius:var(--border-radius);cursor:pointer;border:none;"],function(t){return b({status:t.$status,colorKey:"surface"})}),k=(0,h.Ay)(g.Uo).withConfig({displayName:"Calloutstyled__TitleStyled",componentId:"sc-1q9ixyt-4"})(["color:",";margin:0;text-box-trim:trim-both;text-box-edge:cap alphabetic;"],function(t){return b({status:t.$status,colorKey:"text"})}),w=(0,h.Ay)(g.mb).withConfig({displayName:"Calloutstyled__BodyStyled",componentId:"sc-1q9ixyt-5"})(["color:",";margin:0;text-box-trim:trim-both;text-box-edge:cap alphabetic;> *{color:",";}"],function(t){return b({status:t.$status,colorKey:"text"})},function(t){return b({status:t.$status,colorKey:"text"})}),E=n(71465),N=n(16568),O=n(80263);function T(t){return(T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function _(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,o)}return n}function $(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};
1e%2?_(Object(n),!0).forEach(function(e){K(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):_(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function D(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=Array(e);n<e;n++)o[n]=t[n];return o}function K(t,e,n){var o;return(o=function(t,e){if("object"!=T(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e||"default");if("object"!=T(o))return o;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==T(o)?o:o+"")in t)?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var U=K(K({},E.K.DISMISS,(0,O.jsx)(a.X,{})),E.K.REDIRECT,(0,O.jsx)(s.K,{})),z=K(K(K(K(K({},E.t.INFO,(0,O.jsx)(l.R,{})),E.t.WARNING,(0,O.jsx)(u.N,{})),E.t.ERROR,(0,O.jsx)(c.Q,{})),E.t.SUCCESS,(0,O.jsx)(d.J,{})),E.t.NEUTRAL,(0,O.jsx)(l.R,{})),M=(0,p.forwardRef)(function(t,e){var n,a,s,u=t.status,c=void 0===u?"INFO":u,d=t.title,m=t.description,h=t.customDescription,g=t.dataTestId,v=t.actionButtonDataTestId,x=t.onClick,I=t.actionButtonText,S=t.secondaryOnClick,T=t.secondaryActionButtonDataTestId,_=t.secondaryActionButtonText,K=t.variant,M=t.withIcon,P=t.tooltipProps,H=function(t){if(Array.isArray(t))return t}(n=(0,p.useState)(!1))||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var o,r,i,a,s=[],l=!0,u=!1;try{i=(n=n.call(t)).next,!1;for(;!(l=(o=i.call(n)).done)&&(s.push(o.value),s.length!==e);l=!0);}catch(t){u=!0,r=t}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw r}}return s}}(n,2)||function(t,e){if(t){if("string"==typeof t)return D(t,2);var n=({}).toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?D(t,e):void 0}}(n,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),B=H[0],L=H[1],W=b({status:c,colorKey:"text"});return(0,O.jsxs)(C,{onClick:K&&K===E.K.REDIRECT?x:void 0,$pointer:!!K&&K===E.K.REDIRECT,$status:c,$shouldHaveAppearAnimation:K===E.K.DISMISS&&!B,$shouldHaveHideAnimation:K===E.K.DISMISS&&B,"data-testid":g,ref:e,children:[(void 0===M||M)&&(0,O.jsx)(o.I,{colorfulBackgroun
1d:!1,color:W,size:r.y.MEDIUM,weight:"bold",children:z[c]}),(0,O.jsxs)(j,{$shouldHaveGap:!!d&&(null!=m||null!=h),children:[(0,O.jsx)(k,{size:"sm",as:"h4",$status:c,children:(0,O.jsx)("span",{children:d})}),(null!=m||null!=h)&&(0,O.jsx)(w,{size:"sm",$status:c,children:null!=m?m:h})]}),(0,O.jsx)(i.j,{condition:!!(null!=P&&P.message),children:(0,O.jsx)(N.m,$($({},P),{},{asChild:!0,openOnClick:null==(a=null==P?void 0:P.openOnClick)||a,timeToClose:null!=(s=null==P?void 0:P.timeToClose)?s:8e5,children:(0,O.jsx)(R,{type:"button",$status:c,"aria-label":"More information",onClick:function(t){return t.stopPropagation()},children:(0,O.jsx)(o.I,{colorfulBackground:!1,color:W,size:r.y.SMALL,weight:"bold",children:(0,O.jsx)(l.R,{})})})}))}),K&&K!==E.K.ACTION?(0,O.jsx)(R,{type:"button",onClick:K!==E.K.REDIRECT?function(){K===E.K.DISMISS?(L(!0),setTimeout(function(){return x()},200)):x()}:void 0,$status:c,"data-testid":v,children:(0,O.jsx)(o.I,{colorfulBackground:!1,color:W,size:r.y.SMALL,weight:"bold",children:U[K]})}):null,(0,O.jsx)(i.j,{condition:!!K&&K===E.K.ACTION,children:(0,O.jsxs)(A,{children:[!!_&&(0,O.jsx)(f.$,{variant:"text",size:y.l.SMALL,onClick:S,dataTestId:T,children:_}),(0,O.jsx)(f.$,{variant:"text",size:y.l.SMALL,onClick:x,dataTestId:v,children:I})]})})]})});M.displayName="Callout"}}]);
2//# sourceMappingURL=7335.383c70a1807c0b3f.js.map

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.