PageSourceSearch

https://indiaindex.com/_next/static/chunks/pages/supplier/[userId]/usersettings-b7bffef4ab04fc14.js

js indiaindex.com collected 2026-10-06 18:51:34 UTC 17,115 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3551],{70338:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/supplier/[userId]/usersettings",function(){return s(33039)}])},55786:function(e,t,s){"use strict";var a=s(85893);s(67294),t.Z=function(){return(0,a.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"loading-animate",width:"30px",height:"30px",viewBox:"0 0 100 100",preserveAspectRatio:"xMidYMid",children:[(0,a.jsxs)("rect",{x:"17.5",y:"25.5",width:"15",height:"49",fill:"#1947c4",children:[(0,a.jsx)("animate",{attributeName:"y",repeatCount:"indefinite",dur:"0.5813953488372093s",calcMode:"spline",keyTimes:"0;0.5;1",values:"10.799999999999997;25.5;25.5",keySplines:"0 0.5 0.5 1;0 0.5 0.5 1",begin:"-0.11627906976744187s"}),(0,a.jsx)("animate",{attributeName:"height",repeatCount:"indefinite",dur:"0.5813953488372093s",calcMode:"spline",keyTimes:"0;0.5;1",values:"78.4;49;49",keySplines:"0 0.5 0.5 1;0 0.5 0.5 1",begin:"-0.11627906976744187s"})]}),(0,a.jsxs)("rect",{x:"42.5",y:"25.5",width:"15",height:"49",fill:"#1947c4",children:[(0,a.jsx)("animate",{attributeName:"y",repeatCount:"indefinite",dur:"0.5813953488372093s",calcMode:"spline",keyTimes:"0;0.5;1",values:"14.474999999999994;25.5;25.5",keySplines:"0 0.5 0.5 1;0 0.5 0.5 1",begin:"-0.058139534883720936s"}),(0,a.jsx)("animate",{attributeName:"height",repeatCount:"indefinite",dur:"0.5813953488372093s",calcMode:"spline",keyTimes:"0;0.5;1",values:"71.05000000000001;49;49",keySplines:"0 0.5 0.5 1;0 0.5 0.5 1",begin:"-0.058139534883720936s"})]}),(0,a.jsxs)("rect",{x:"67.5",y:"25.5",width:"15",height:"49",fill:"#1947c4",children:[(0,a.jsx)("animate",{attributeName:"y",repeatCount:"indefinite",dur:"0.5813953488372093s",calcMode:"spline",keyTimes:"0;0.5;1",values:"14.474999999999994;25.5;25.5",keySplines:"0 0.5 0.5 1;0 0.5 0.5 1"}),(0,a.jsx)("animate",{attributeName:"height",repeatCount:"indefinite",dur:"0.5813953488372093s",calcMode:"spline",keyTimes:"0;0.5;1",values:"71.05000000000001;49;49",keySplines:"0 0.5 0.5 1;0 0.5 0.5 1"})]})]})}},54564:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){let{children:t}=e;return t},t.suspense=function(){let e=Error(a.NEXT_DYNAMIC_NO_SSR_CODE);throw e.digest=a.NEXT_DYNAMIC_NO_SSR_CODE,e},(0,s(92648).Z)(s(67294));var a=s(92983)},37645:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){let s=n.default,l={loading:e=>{let{error:t,isLoading:s,pastDelay:a}=e;return null}};e instanceof Promise?l.loader=()=>e:"function"==typeof e?l.loader=e:"object"==typeof e&&(l=a({},l,e)),l=a({},l,t);let r=l.loader,i=()=>r().then(o);if(l.loadableGenerated&&delete(l=a({},l,l.loadableGenerated,{loader:i})).loadableGenerated,"boolean"==typeof l.ssr){if(!l.ssr)return delete l.ssr,d(i,l);delete l.ssr}return s(l)},t.noSSR=d;var a=s(6495).Z,l=s(92648).Z,r=(0,s(91598).Z)(s(67294)),n=l(s(14588)),i=l(s(54564));function o(e){return{default:e.default||e}}function d(e,t){delete t.webpack,delete t.modules;let s=r.lazy(e),a=t.loading,l=r.default.createElement(a,{error:null,isLoading:!0,pastDelay:!1,timedOut:!1});return e=>r.default.createElement(r.Suspense,{fallback:l},r.default.createElement(i.default,null,r.default.createElement(s,Object.assign({},e))))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},33644:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LoadableContext=void 0;var a=(0,s(92648).Z)(s(67294));let l=a.default.createContext(null);t.LoadableContext=l},14588:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(6495).Z,l=(0,s(92648).Z)(s(67294)),r=s(33644);let n=[],i=[],o=!1;function d(e){let t=e(),s={loading:!0,loaded:null,error:null};return s.promise=t.then(e=>(s.loading=!1,s.loaded=e,e)).catch(e=>{throw s.loading=!1,s.error=e,e}),s}class c{promise(){return this._res.promise}retry(){this._clearTimeouts(),this._res=this._loadFn(this._opts.loader),this._state={pastDelay:!1,timedOut:!1};let{_res:e,_opts:t}=this;e.loading&&("number"==typeof t.delay&&(0===t.delay?this._state.pastDelay=!0:this._delay=setTimeout(()=>{this._update({pastDelay:!0})},t.delay)),"number"==typeof t.timeout&&(this._timeout=setTimeout(()=>{this._update({timedOut:!0})},t.timeout))),this._res.promise.then(()=>{this._update({}),this._clearTimeouts()}).catch(e=>{this._update({}),this._clearTimeouts()}),this._update({})}_update(e){this._state=a({},this._state,{error:this._res.error,loaded:this._res.loaded,loading:this._res.loading}
1,e),this._callbacks.forEach(e=>e())}_clearTimeouts(){clearTimeout(this._delay),clearTimeout(this._timeout)}getCurrentValue(){return this._state}subscribe(e){return this._callbacks.add(e),()=>{this._callbacks.delete(e)}}constructor(e,t){this._loadFn=e,this._opts=t,this._callbacks=new Set,this._delay=null,this._timeout=null,this.retry()}}function u(e){return function(e,t){let s=Object.assign({loader:null,loading:null,delay:200,timeout:null,webpack:null,modules:null},t);s.lazy=l.default.lazy(s.loader);let a=null;function n(){if(!a){let t=new c(e,s);a={getCurrentValue:t.getCurrentValue.bind(t),subscribe:t.subscribe.bind(t),retry:t.retry.bind(t),promise:t.promise.bind(t)}}return a.promise()}if(!o){let d=s.webpack?s.webpack():s.modules;d&&i.push(e=>{for(let t of d)if(-1!==e.indexOf(t))return n()})}function u(e){!function(){n();let e=l.default.useContext(r.LoadableContext);e&&Array.isArray(s.modules)&&s.modules.forEach(t=>{e(t)})}();let t=l.default.createElement(s.loading,{isLoading:!0,pastDelay:!0,error:null});return l.default.createElement(l.default.Suspense,{fallback:t},l.default.createElement(s.lazy,e))}return u.preload=()=>n(),u.displayName="LoadableComponent",u}(d,e)}function m(e,t){let s=[];for(;e.length;){let a=e.pop();s.push(a(t))}return Promise.all(s).then(()=>{if(e.length)return m(e,t)})}u.preloadAll=()=>new Promise((e,t)=>{m(n).then(e,t)}),u.preloadReady=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return new Promise(t=>{let s=()=>(o=!0,t());m(i,e).then(s,s)})},window.__NEXT_PRELOADREADY=u.preloadReady,t.default=u},33039:function(e,t,s){"use strict";s.r(t);var a=s(85893),l=s(67294),r=s(18579),n=s(87536),i=s(47533),o=s(74231),d=s(89583),c=s(86721),u=s(5152),m=s.n(u);s(5121);var h=s(79352),p=s(95123),x=s(55786),f=s(22920);let b=[{id:1,name:"Plese select a Company Structure"},{id:2,name:"INDIA"},{id:3,name:"2-10"}],w=[{name:"Silver",priceYearly:1499},{name:"Gold",priceYearly:2499},{name:"Platinum",priceYearly:4999},{name:"Enterprise",priceYearly:9999}],y=o.Ry().shape({newPassword:o.Z_().min(8,"Password should be at least 8 characters long").matches(/[a-z]/,"Password should have at least one lowercase character").matches(/[A-Z]/,"Password should have at least one uppercase character").matches(/[@$!%*?#`~&]/,"Password should have at least 1 number or special character (@,!,#, etc)."),confirmPassword:o.Z_().oneOf([o.iH("newPassword"),null],"Passwords don't match").required("Please confirm your password")});function g(){var e,t,s;let[o,u]=(0,l.useState)(!1),[m,g]=(0,l.useState)("account"),[j,v]=(0,l.useState)(w[0]),[N,_]=(0,l.useState)(!1),[S,C]=(0,l.useState)(b[0]),[P,k]=(0,l.useState)(b[1]),[E,A]=(0,l.useState)(b[2]),[F,O]=(0,l.useState)("Supplier"),[T,D]=(0,l.useState)(""),[Z,M]=(0,l.useState)(""),[B,I]=(0,l.useState)(""),[H,R]=(0,l.useState)([]),[V,Y]=(0,l.useState)([]),[L,z]=(0,l.useState)([]),[X,G]=(0,l.useState)([]),[q,$]=(0,l.useState)([]),{register:J,handleSubmit:U,formState:{errors:K}}=(0,n.cI)({resolver:(0,i.X)(y)}),{state:Q,dispatch:W}=(0,l.useContext)(r.y);console.log(Q),(0,l.useEffect)(()=>{let e=async()=>{Q.authHeaders.userId;let e=await (0,c.et)(Q.authHeaders);console.log(e);let{user:t}=e.data;et(t)};e()},[]);let[ee,et]=(0,l.useState)(),[es,ea]=(0,l.useState)(null),[el,er]=(0,l.useState)(null),[en,ei]=(0,l.useState)(null);console.log("HTS OBJECT ",V),console.log(ee),console.log(Q.authHeaders.userId);let[eo,ed]=(0,l.useState)(!1),ec=async(e,t)=>{t.preventDefault(),ed(!0);try{let s=await (0,c.Cp)(e.currentPassword,e.newPassword,Q.authHeaders);s.success&&(f.Am.success(s.message),ed(!1))}catch(a){f.Am.error(a.response.data.message)}},[eu,em]=(0,l.useState)(!1),[eh,ep]=(0,l.useState)(!1),[ex,ef]=(0,l.useState)(!1),[eb,ew]=(0,l.useState)(!1),ey=async e=>{e.preventDefault(),ep(!0);let t=await (0,c.eu)(T,Q.authHeaders);t&&(ep(!1),f.Am.success(t.message),em(!1))},[eg,ej]=(0,l.useState)(!1),[ev,eN]=(0,l.useState)(!1),[e_,eS]=(0,l.useState)(""),eC=async e=>{eN(!0);try{let t=await (0,c.fz)(e,Q.authHeaders);if(t)return f.Am.info(t.message),t}catch(s){return console.log(s),f.Am.error("".concat(s.response.data.message)),M(""),ew(!1),"errored"}},eP=async e=>{if(e.preventDefault(),ej(!0),Z&&e_)try{let t=await (0,c.Z7)(Z,e_,Q.authHeaders);t.success&&(f.Am.success(t.message),ef(!1),eN(!1),ej(!1))}catch(s){f.Am.error("".concat(s.response.data.message))}},ek=async e=>{if(e.preventDefault(),ef(!0),console.warn("Email",Z),Z.match(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/)){let t=await eC(Z);t&&(console.log(t),ew(!1))}else f.Am.error("Enter a valid email")},[eE,eA]=(0,l.useState)(!1),eF=()=>{eA(!eE)},[eO,eT]=(0,l.useState)(!1),eD=()=>{eT(!eO)},[eZ,eM]=(0,l.useState)(!1),eB=()=>{eM(!eZ)};return(0,a.jsx)(p.Z,{sidebarOpen:o,setSidebarOpen:u,title:"India Index - Settings",userIdState:Q.authHeaders.userId,children:(0,a.jsx)("main",{className:"rounded-bl-2xl duration-300 ".concat("flex-1"),children:(0,a.jsxs)("div",{className:"bg-white h-[93.5vh] pb-10 rounded-bl-2xl pt-12 px-8 sm:px10 lg:px-24",children:[(0,a.jsx)("div",{className:"bg-white sm:flex sm:items-center",children:(0,a.jsx)("div",{className:"bg-white sm:flex-auto",children:(0,a.jsx)("h1",{className:"bg-white text-2xl font-semibold text-gray-900",children:"Account Settings"})})}),(0,a.jsx)("div",{className:"",children:(0,a.jsxs)("div",{className:"lg:grid lg:grid-cols-12 h-[42rem] mt-5 rounded-xl border border-[#D2DBE7] overflow-hidden",children:[(0,a.jsx)("aside",{className:"col-span-3 border-r bg-[#F7F9FC]",children:(0,a.jsxs)("nav",{className:"",children:[(0,a.jsxs)("a",{onClick:()=>g("account"),className:"group py-5 border-b items-center pl-10 flex text-md font-medium ".concat("account"===m?"bg-white":"bg-[#F7F9FC]"),children:[(0,a.jsx)(d.VRY,{className:"flex-shrink-0 -ml-1 mr-5 h-7 w-7 text-[#2B67B2]","aria-hidden":"true"}),(0,a.jsx)("span",{className:"truncate",children:"Account Details"})]},"Account Details"),(0,a.jsxs)("a",{onClick:()=>g("password"),className:"group py-5 border-b items-center pl-10 flex text-md font-medium ".concat("password"===m?"bg-white":"bg-[#F7F9FC]"),children:[(0,a.jsx)(h.xuE,{className:"flex-shrink-0 -ml-1 mr-5 h-7 w-7 text-[#2B67B2]","aria-hidden":"true"}),(0,a.jsx)("span",{className:"truncate",children:"Password"})]},"Password")]})}),"account"===m&&(0,a.jsx)("div",{className:" sm:px-6 lg:col-span-9 lg:px-0 overflow-auto ",children:(0,a.jsx)("div",{children:(0,a.jsx)("div",{className:"",children:(0,a.jsx)("div",{className:"space-y-6 bg-white py-8 px-16",children:(0,a.jsxs)("div",{className:"",children:[(0,a.jsx)("h3",{className:"text-lg font-medium leading-6 text-[#2B67B2]",children:"Account Details"}),(0,a.jsx)("p",{className:"mt-1 text-sm text-gray-500",children:"User details"}),(0,a.jsxs)("div",{className:"flex-col w-full",children:[(0,a.jsxs)("div",{className:"relative justify-between items-center mt-6 flex",children:[(0,a.jsx)("label",{htmlFor:"name",className:"block text-md font-semibold text-gray-700",children:"Full Name"}),(0,a.jsxs)("div",{className:"w-[71%]",children:[(0,a.jsx)("input",{name:"name",defaultValue:Q.createAccount.name,id:"name",autoComplete:"name",onChange:e=>D(e.target.value),placeholder:"".concat(ee&&ee.userName),type:"text",disabled:!eu,className:"mt-1 block w-full rounded-md border border-gray-300 py-2 px-3 shadow-sm sm:text-sm"}),eu?(0,a.jsx)("button",{onClick:ey,className:"absolute top-0 py-2.5 text-[1rem] font-normal text-tablehead right-0 px-2",children:eh?(0,a.jsx)(x.Z,{}):"Save"}):(0,a.jsx)("button",{onClick:()=>em(!0),className:"absolute top-0 py-2.5 text-[1rem] font-normal text-tablehead right-0 px-2",children:eh?(0,a.jsx)(x.Z,{}):"Edit"})]})]}),(0,a.jsxs)("div",{className:"relative justify-between items-center mt-6 flex",children:[(0,a.jsx)("label",{htmlFor:"email",className:"block text-md font-semibold text-gray-700",children:"Email Address"}),(0,a.jsx)("input",{name:"email",defaultValue:Q.createAccount.email,id:"email",autoComplete:"email",onChange:e=>M(e.target.value),placeholder:"".concat(ee&&ee.email),type:"text",disabled:!eb,className:"mt-1 block w-[71%] rounded-md border border-gray-300 py-2 px-3 shadow-sm sm:text-sm"}),eb?(0,a.jsx)("button",{onClick:ek,className:"absolute top-0 py-2.5 text-[1rem] text-tablehead font-normal right-0 px-2",children:ex?(0,a.jsx)(x.Z,{}):"Save"}):(0,a.jsx)("button",{onClick:()=>ew(!0),className:"absolute top-0 py-2.5 text-[1rem] text-tablehead font-normal right-0 px-2",children:ex?(0,a.jsx)(x.Z,{}):"Edit"})]}),ev&&(0,a.jsx)("div",{className:"w-full mt-6 items-center flex gap-3 justify-end",children:(0,a.jsxs)("div",{className:"w-[71%] flex gap-3",children:[(0,a.jsx)("input",{type:"text",onCh
1ange:e=>eS(e.target.value),maxLength:6,className:"rounded-md border border-gray-300 py-2 px-3 shadow-sm sm:text-sm"})," ",(0,a.jsx)("button",{type:"button",onClick:eP,className:"bg-[#2b67b2] text-white px-6 py-1",children:eg?(0,a.jsx)(x.Z,{}):"VERIFY OTP"})]})})]})]})})})})}),"password"===m&&(0,a.jsx)("div",{className:" sm:px-6 lg:col-span-9 lg:px-0 overflow-auto ",children:(0,a.jsx)("form",{onSubmit:U(ec),children:(0,a.jsx)("div",{className:"",children:(0,a.jsx)("div",{className:"space-y-6 bg-white py-8 px-16",children:(0,a.jsxs)("div",{className:"",children:[(0,a.jsx)("h3",{className:"text-lg font-medium leading-6 text-[#2B67B2]",children:"Change Password"}),(0,a.jsx)("p",{className:"mt-1 text-sm text-gray-500",children:"Create a new password"}),(0,a.jsxs)("div",{className:"flex-col w-full",children:[(0,a.jsxs)("div",{className:"relative justify-between items-center mt-6 flex",children:[(0,a.jsx)("label",{htmlFor:"hts-code",className:"block text-md font-semibold text-gray-700",children:"Current Password"}),(0,a.jsxs)("div",{className:" relative w-[71%]",children:[(0,a.jsx)(d.dSq,{className:"absolute right-[0.6rem] bottom-[0.8rem] ".concat(eE?"text-tablehead":" text-gray-300"),onClick:eF}),(0,a.jsx)("input",{...J("currentPassword"),name:"currentPassword",defaultValue:Q.createAccount.currentPassword,id:"currentPassword",autoComplete:"currentPassword",placeholder:"Enter your current password.",type:eE?"text":"password",className:"mt-1 block w-full rounded-md border border-gray-300 py-2 px-3 shadow-sm sm:text-sm"}),null===(e=K.currentPassword)||void 0===e?void 0:e.message]})]}),(0,a.jsxs)("div",{className:"relative justify-between items-center mt-6 flex",children:[(0,a.jsx)("label",{htmlFor:"hts-code",className:"block text-md font-semibold text-gray-700",children:"New Password"}),(0,a.jsxs)("div",{className:" relative w-[71%]",children:[(0,a.jsx)(d.dSq,{className:"absolute right-[0.6rem] bottom-[0.8rem] ".concat(eO?"text-tablehead":" text-gray-300"),onClick:eD}),(0,a.jsx)("input",{...J("newPassword"),name:"newPassword",defaultValue:Q.createAccount.newPassword,id:"newPassword",autoComplete:"newPassword",placeholder:"Enter your new password.",type:eO?"text":"password",className:"mt-1 block w-full rounded-md border border-gray-300 py-2 px-3 shadow-sm sm:text-sm"}),null===(t=K.newPassword)||void 0===t?void 0:t.message]})]}),(0,a.jsxs)("div",{className:"relative justify-between items-center mt-6 flex",children:[(0,a.jsx)("label",{htmlFor:"hts-code",className:"block text-md font-semibold text-gray-700",children:"Confirm Password"}),(0,a.jsxs)("div",{className:" relative w-[71%]",children:[(0,a.jsx)(d.dSq,{className:"absolute right-[0.6rem] bottom-[0.8rem] ".concat(eZ?"text-tablehead":" text-gray-300"),onClick:eB}),(0,a.jsx)("input",{...J("confirmPassword"),name:"confirmPassword",defaultValue:Q.createAccount.confirmPassword,id:"confirmPassword",autoComplete:"confirmPassword",placeholder:"Confirm your new password.",type:eZ?"text":"password",className:"mt-1 block w-full rounded-md border border-gray-300 py-2 px-3 shadow-sm sm:text-sm"}),null===(s=K.confirmPassword)||void 0===s?void 0:s.message]})]}),(0,a.jsxs)("div",{className:"flex justify-end gap-x-5 mt-8 ",children:[(0,a.jsx)("button",{className:"bg-[#F7F9FC] text-[#2B67B2] rounded-md px-[4rem] py-1.5",children:"CANCEL"}),(0,a.jsx)("button",{type:"submit",disabled:eo,className:"bg-[#2B67B2] text-[#F7F9FC] rounded-md px-[2.25rem] py-1.5",children:eo?(0,a.jsx)(x.Z,{}):"SAVE CHANGES"})]})]})]})})})})})]})})]})})})}t.default=m()(()=>Promise.resolve(g),{ssr:!1})},5152:function(e,t,s){e.exports=s(37645)}},function(e){e.O(0,[5937,2013,1228,3874,9866,5445,5121,499,7536,9261,3544,939,9491,1225,5123,9774,2888,179],function(){return e(e.s=70338)}),_N_E=e.O()}]);

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.