1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},s=(new e.Error).stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="97262d14-8e60-48fc-aa55-c3c2cbed3866",e._sentryDebugIdIdentifier="sentry-dbid-97262d14-8e60-48fc-aa55-c3c2cbed3866")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6385],{46385:function(e,s,t){t.d(s,{Z:function(){return g}});var a=t(57437),n=t(2265),r=t(33145),c=t(26901),d=t(7790),i=t(99376),l=t(43949),o=t(99856),u=t(10123),h=t(94242),x=t(56277),m=t(72556);function g(e){var s;let{pagename:t,handleclosebutton:g}=e,{t:p}=(0,l.$G)(["success"],{useSuspense:!1}),[f,b]=(0,n.useState)(0),[j,y]=(0,n.useState)(!0),[k,I]=(0,n.useState)({rating:"",reasons:"",comments:""}),[v,N]=(0,n.useState)([]),[T,E]=(0,n.useState)([]),[A,R]=(0,n.useState)([]),[C,w]=(0,n.useState)(null),[S,_]=(0,n.useState)(!1),[D,F]=(0,n.useState)([{id:1,selectedIcon:d.AVV,unselectedIcon:d.JD_},{id:2,selectedIcon:d.j$R,unselectedIcon:d.auj},{id:3,selectedIcon:d.J17,unselectedIcon:d.gnV},{id:4,selectedIcon:d.FJt,unselectedIcon:d.OEx},{id:5,selectedIcon:d.Xql,unselectedIcon:d.FK6}]),[q,P]=(0,n.useState)(!1),B=(0,m.w)(o.z.getItem("company_Id"),"Policy/policyRattingStatus"),L=null===(s=(0,i.usePathname)())||void 0===s?void 0:s.includes("ar"),O=e=>{b(e),I(e=>({...e,rating:""})),R([])},J=(e,s)=>{e.target,e.target.checked?R(e=>[...e,s]):R(A.filter(e=>e!==s))},U=e=>{w(e.currentTarget.value)};(0,n.useEffect)(()=>{M(),V()},[]);let M=async()=>{N(await (0,x.a8)("LoadRateUsCategories"))},V=async()=>{E(await (0,x.a8)("LoadRateUsReasons"))},Z=async()=>{if(0==f){I(e=>({...e,rating:L?"ÙØØªØ§Ø¬ ÙØ¹Ø±Ù تÙÙÙÙ
Ù ÙÙØªØ¬Ø±Ø¨Ø©":"Please Choose A Rating For Your Experience\xa0!"}));return}if(I(e=>({...e,rating:""})),0===A.length){I(e=>({...e,reasons:L?"ÙØØªØ§Ø¬ تختار عÙÙ Ø§ÙØ§Ù٠سبب ÙØ§ØØ¯":"Please Select At Least One Reason!"}));return}I(e=>({...e,reasons:""})),_(!0);try{let e=o.z.getItem("company_Id");if(!e||"null"===e){h.Am.error("Invalid policy ID");return}if(!Array.isArray(A)||0===A.length)return;let s=await (0,x.a8)("LoginAndRegistration/AddPolicyRatting",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({policy_id:e,ratting:f,comments:C,page_name:t,reason:A})});!0==s.Result?(_(!1),h.Am.success(L?".Ø´ÙØ±Ùا ÙÙ, تÙÙÙÙ
Ù ÙØ³Ø§Ø¹Ø¯Ùا ÙÙ ØªØØ³Ù٠خدÙ
Ø§ØªÙØ§":"Thank you, your feedback helps us to improve."),y(!1)):h.Am.error(s.ExceptionMessage)}catch(e){_(!1),h.Am.error(L?"ØØ¯Ø« خطأ Ù
ا Ø ØØ§ÙÙ Ù
رة أخرÙ":"Something Went wrong, try again!")}};return(0,a.jsx)(a.Fragment,{children:j&&!B&&(0,a.jsxs)(c.Z,{children:[(0,a.jsxs)("div",{className:"feedbackwrapper",children:[(0,a.jsxs)("div",{className:"feedback-closebutton",children:[(0,a.jsxs)("p",{children:[" ",p("feedback.rateus")]}),(0,a.jsx)(r.default,{src:d.aMB,alt:"Close Button",onClick:()=>{y(e=>!e)}})]}),(0,a.jsx)("div",{className:"paddingTopBottom",children:(0,a.jsx)("hr",{style:{border:"1px solid #DDE0E2"}})}),(0,a.jsx)("div",{className:"feedback-description",children:(0,a.jsx)("p",{children:p("feedback.description1")})}),(0,a.jsx)("div",{className:"paddingTopBottom",children:(0,a.jsx)("hr",{style:{border:"1px solid #DDE0E2"}})}),(0,a.jsx)("div",{className:"feedback-description1--one",children:p("feedback.description2")}),(0,a.jsxs)("div",{className:"Rating-section ".concat(""!==k.rating?"redborder":""),children:[(0,a.jsx)("p",{className:"Rating-Mainquestion",children:p("feedback.question")}),(0,a.jsx)("div",{className:"RatingIcons",children:v.map(e=>{var s,t;return(0,a.jsxs)(a.Fragment,{children:[f!=e.Id&&(0,a.jsxs)("div",{className:"Rating",onClick:()=>O(e.Id),children:[(0,a.jsx)(r.default,{src:null===(s=D.find(s=>s.id===e.Id))||void 0===s?void 0:s.unselectedIcon,alt:"Rate Us Icons",height:24,width:24}),(0,a.jsx)("span",{children:L?e.TextAr:e.TextEn})]}),f==e.Id&&(0,a.jsxs)("div",{className:"Rating selected_radius",onClick:()=>O(0),children:[(0,a.jsx)(r.default,{src:null===(t=D.find(s=>s.id===e.Id))||void 0===t?void 0:t.selectedIcon,alt:"Rate Us Icons",height:24,width:24}),(0,a.jsx)("span",{className:"selected_text",children:L?e.TextAr:e.TextEn})]})]})})})]}),""!==k.rating&&(0,a.jsx)("span",{className:"error",children:k.rating}),(1==f||2==f)&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"rating-happycustomer",children:[(0,a.jsx)("p",{className:"text-gladtohear",children:p("feedback.gladtohear")}),(0,a.jsx)("p",{className:"text-selectapply",children:p("feedback.selectapply")}),(0,a.jsx)("div",{className:"feedback-questions",children:T.filter(e=>e.CategoryId==f).map(e=>(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)("div",{className:"question",children:[(0,a.jsx)("input",{type:"checkbox",name:"lagorcrash",title:L?e.TextAr:e.TextEn,onChange:s=>J(s,e.Id),checked:A.includes(e.Id)}),(0,a.jsx)("span",{children:L?e.TextAr:e.TextEn})]})}))})]}),""!==k.reasons&&(0,a.jsx)("span",{className:"error",children:k.reasons})]}),(3==f||4==f||5==f)&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"rating-notstisfiedcustome",children:[(0,a.jsx)("p",{className:"text-gladtohear",children:p("feedback.gladtohear")}),(0,a.jsx)("p",{className:"text-selectapply",children:p("feedback.selectapply")}),(0,a.jsx)("div",{className:"feedback-questions",children:T.filter(e=>e.CategoryId==f).map(e=>(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)("div",{className:"question",children:[(0,a.jsx)("input",{type:"checkbox",name:"lagorcrash",title:L?e.TextAr:e.TextEn,onChange:s=>J(s,e.Id),checked:A.includes(e.Id)}),(0,a.jsx)("span",{children:L?e.TextAr:e.TextEn})]})}))})]}),""!==k.reasons&&(0,a.jsx)("span",{className:"error",children:k.reasons})]}),0!=f&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("hr",{style:{border:"1px solid #DDE0E2",marginBottom:"0px"}}),(0,a.jsx)("p",{className:"text-suggestion",children:p("feedback.suggestion")}),(0,a.jsx)("textarea",{className:"feedbacktextarea",placeholder:p("feedback.placeholder"),rows:3,cols:50,maxLength:500,onChange:e=>U(e)}),""!==k.comments&&(0,a.jsx)("span",{className:"error",children:k.comments})]}),(0,a.jsx)("div",{className:"feedback-submitbutton",children:0==f?(0,a.jsx)("button",{className:"submitbutton inactive",children:p("feedback.button")}):(0,a.jsx)("button",{className:"submitbutton active",onClick:Z,children:p("feedback.button")})})]}),(0,a.jsx)(u.default,{loadingstatus:S})]})})}},10123:function(e,s,t){t.d(s,{default:function(){return d}});var a=t(57437);t(2265);var n=t(4810),r=t.n(n),c=t(10279),d=function(e){let{loadingstatus:s}=e;return(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(r(),{isOpen:s,ariaHideApp:!1,style:{overlay:{backgroundColor:"rgb(68 68 68 / 33%)"},content:{top:"50%",left:"50%",right:"auto",bottom:"auto",border:"1px solid rgb(68 68 68 / 5%)",backgroundColor:"#ffff",borderRadius:"12px",transform:"translate(-50%, -50%)"}},children:(0,a.jsx)(c.Z,{animation:"border",variant:"primary"})})})}}}]);
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.