https://gamebreaker.ru/_next/static/chunks/pages/manage/special-prices/edit/[id]-0816ce4eef44d211.js
1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[134],{69722:function(e,a,t){"use strict";t.d(a,{Z:function(){return l}});var n=t(36497),s=t.n(n),c=function(e,a){var t,n,s,c,l={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return c={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function r(r){return function(i){return function(r){if(t)throw TypeError("Generator is already executing.");for(;c&&(c=0,r[0]&&(l=0)),l;)try{if(t=1,n&&(s=2&r[0]?n.return:r[0]?n.throw||((s=n.return)&&s.call(n),0):n.next)&&!(s=s.call(n,r[1])).done)return s;switch(n=0,s&&(r=[2&r[0],s.value]),r[0]){case 0:case 1:s=r;break;case 4:return l.label++,{value:r[1],done:!1};case 5:l.label++,n=r[1],r=[0];continue;case 7:r=l.ops.pop(),l.trys.pop();continue;default:if(!(s=(s=l.trys).length>0&&s[s.length-1])&&(6===r[0]||2===r[0])){l=0;continue}if(3===r[0]&&(!s||r[1]>s[0]&&r[1]<s[3])){l.label=r[1];break}if(6===r[0]&&l.label<s[1]){l.label=s[1],s=r;break}if(s&&l.label<s[2]){l.label=s[2],l.ops.push(r);break}s[2]&&l.ops.pop(),l.trys.pop();continue}r=a.call(e,l)}catch(e){r=[6,e],n=0}finally{t=s=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,i])}}};function l(e,a){var t,n,l,r;return void 0===a&&(a=!0),t=this,n=void 0,l=void 0,r=function(){return c(this,function(t){switch(t.label){case 0:return[4,s().push({pathname:s().pathname,query:s().query},s().asPath,{locale:e,scroll:a})];case 1:return[2,t.sent()]}})},new(l||(l=Promise))(function(e,a){function s(e){try{i(r.next(e))}catch(e){a(e)}}function c(e){try{i(r.throw(e))}catch(e){a(e)}}function i(a){var t;a.done?e(a.value):((t=a.value)instanceof l?t:new l(function(e){e(t)})).then(s,c)}i((r=r.apply(t,n||[])).next())})}},78304:function(e,a,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/manage/special-prices/edit/[id]",function(){return t(88568)}])},6852:function(e,a,t){"use strict";t.d(a,{Z:function(){return n}});let n=(0,t(87354).Z)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]])},40111:function(e,a,t){"use strict";t.d(a,{Z:function(){return n}});let n=(0,t(87354).Z)("save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]])},34533:function(e,a,t){"use strict";t.d(a,{Z:function(){return n}});let n=(0,t(87354).Z)("sparkles",[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}
1],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]])},46935:function(e,a,t){"use strict";var n=t(74817),s=t(93772),c=t(32596),l=t.n(c),r=t(37518),i=t.n(r),o=t(36497),d=t(64912),u=t(51646);a.Z=()=>{var e;let{pathname:a}=(0,o.useRouter)(),{user:t}=(0,s.a)(),c=null==t?void 0:t.role,r="super_admin"===c,h="staff"===c,m="media_manager"===c,p="admin"===c||r,g=p||h,_=p||h||m,b=p||h,f=p||"editor"===c,v=p||h||m,x=(null===(e=(0,d.useQuery)(["reseller-chat-manage-badge"],()=>u.g.getThreads({page:1,limit:1}),{enabled:g,refetchInterval:1e4,refetchOnWindowFocus:!1,retry:!1}).data)||void 0===e?void 0:e.totalUnreadCount)||0;return(0,n.jsxs)("div",{className:l().manageButtons,children:[(0,n.jsx)("h2",{className:l().title,children:"ÐÐ°Ð½ÐµÐ»Ñ ÑпÑавлениÑ"}),(0,n.jsxs)("div",{className:l().buttons,children:[p&&(0,n.jsx)(i(),{href:"/manage",className:"".concat(l().button," ").concat("/manage"===a&&l().buttonActive),scroll:!1,children:"ÐбÑее"}),p&&(0,n.jsx)(i(),{href:"/manage/config",className:"".concat(l().button," ").concat("/manage/config"===a&&l().buttonActive),scroll:!1,children:"ÐонÑиг"}),_&&(0,n.jsx)(i(),{href:"/manage/users",className:"".concat(l().button," ").concat("/manage/users"===a&&l().buttonActive),scroll:!1,children:"ЮзеÑÑ"}),b&&(0,n.jsx)(i(),{href:"/manage/games",className:"".concat(l().button," ").concat(a.startsWith("/manage/games")&&l().buttonActive),scroll:!1,children:"ÐгÑÑ"}),b&&(0,n.jsx)(i(),{href:"/manage/cheats",className:"".concat(l().button," ").concat(a.startsWith("/manage/cheats")&&l().buttonActive),scroll:!1,children:"ÐÑодÑкÑÑ"}),b&&(0,n.jsx)(i(),{href:"/manage/reviews",className:"".concat(l().button," ").concat(a.startsWith("/manage/reviews")&&l().buttonActive),scroll:!1,children:"ÐÑзÑвÑ"}),b&&(0,n.jsx)(i(),{href:"/manage/developers",className:"".concat(l().button," ").concat(a.startsWith("/manage/developers")&&l().buttonActive),scroll:!1,children:"РазÑабоÑÑики"}),r&&(0,n.jsx)(i(),{href:"/manage/special-prices",className:"".concat(l().button," ").concat(a.startsWith("/manage/special-prices")&&l().buttonActive),scroll:!1,children:"СпеÑÑенÑ"}),p&&(0,n.jsx)(i(),{href:"/manage/spoilers",className:"".concat(l().button," ").concat(a.startsWith("/manage/spoilers")&&l().buttonActive),scroll:!1,children:"СпойлеÑÑ"}),p&&(0,n.jsx)(i(),{href:"/manage/alerts",className:"".concat(l().button," ").concat(a.startsWith("/manage/alerts")&&l().buttonActive),scroll:!1,children:"ÐлеÑÑÑ"}),f&&(0,n.jsx)(i(),{href:"/manage/blogs",className:"".concat(l().button," ").concat(a.startsWith("/manage/blogs")&&l().buttonActive),scroll:!1,children:"Ðлоги"}),p&&(0,n.jsx)(i(),{href:"/manage/events",className:"".concat(l().button," ").concat(a.startsWith("/manage/events")&&l().buttonActive),scroll:!1,children:"СобÑÑиÑ"}),p&&(0,n.jsx)(i(),{href:"/manage/keys",className:"".concat(l().button," ").concat(a.startsWith("/manage/keys")&&l().buttonActive),scroll:!1,children:"ÐлÑÑи"}),p&&(0,n.jsx)(i(),{href:"/manage/promo-code",className:"".concat(l().button," ").concat(a.startsWith("/manage/promo-code")&&l().buttonActive),scroll:!1,children:"ÐÑомокодÑ"}),p&&(0,n.jsx)(i(),{href:"/manage/sales",className:"".concat(l().button," ").concat("/manage/sales"===a||a.startsWith("/manage/sales/")?l().buttonActive:""),scroll:!1,children:"ÐÑодÑкÑÑ Ñо Ñкидками"}),p&&(0,n.jsx)(i(),{href:"/manage/sales-reports",className:"".concat(l().button," ").concat(a.startsWith("/manage/sales-reports")&&l().buttonActive),scroll:!1,children:"ÐналиÑика пÑодаж"}),r&&(0,n.jsx)(i(),{href:"/manage/resellers",className:"".concat(l().button," ").concat(a.startsWith("/manage/resellers")&&l().buttonActive),scroll:!1,children:"РеÑеллеÑÑ"}),g&&(0,n.jsxs)(i(),{href:"/manage/reseller-chat",className:"".concat(l().button," ").concat(a.startsWith("/manage/reseller-chat")&&l().buttonActive),scroll:!1,children:[(0,n.jsx)("span",{className:l().buttonLabel,children:"Ð§Ð°Ñ ÑеÑеллеÑов"}),x>0&&(0,n.jsx)("span",{className:l().badge,children:x})]}),p&&(0,n.jsx)(i(),{href:"/manage/action-logs",className:"".concat(l().button," ").concat(a.startsWith("/manage/action-logs")&&l(
1).buttonActive),scroll:!1,children:"Ðоги"}),p&&(0,n.jsx)(i(),{href:"/manage/promo-balance-logs",className:"".concat(l().button," ").concat(a.startsWith("/manage/promo-balance-logs")&&l().buttonActive),scroll:!1,children:"Ðоги пÑомо-баланÑа"}),p&&(0,n.jsx)(i(),{href:"/manage/email-campaigns",className:"".concat(l().button," ").concat(a.startsWith("/manage/email-campaigns")&&l().buttonActive),scroll:!1,children:"Email ÑаÑÑÑлки"}),p&&(0,n.jsx)(i(),{href:"/manage/paypal-invoices",className:"".concat(l().button," ").concat(a.startsWith("/manage/paypal-invoices")&&l().buttonActive),scroll:!1,children:"PayPal пополнениÑ"}),r&&(0,n.jsx)(i(),{href:"/manage/forum-permissions",className:"".concat(l().button," ").concat(a.startsWith("/manage/forum-permissions")&&l().buttonActive),scroll:!1,children:"ÐÑава доÑÑÑпа"})]}),v&&(0,n.jsxs)("div",{className:l().buttons,children:[(0,n.jsx)(i(),{href:"/manage/referrals",className:"".concat(l().button," ").concat(a.startsWith("/manage/referrals")&&l().buttonActive),scroll:!1,children:"РеÑеÑалÑ"}),(0,n.jsx)(i(),{href:"/manage/referral-withdrawals",className:"".concat(l().button," ").concat(a.startsWith("/manage/referral-withdrawals")&&l().buttonActive),scroll:!1,children:"ÐаÑвки на вÑплаÑÑ"})]})]})}},9644:function(e,a,t){"use strict";t.d(a,{b:function(){return n}}),t(74817);let n=e=>(e.isOnlyAdmin=!0,e)},87593:function(e,a,t){"use strict";var n=t(74817),s=t(71248),c=t(92203),l=t.n(c);a.Z=e=>{let{label:a,placeholder:t,helperText:c,options:r,values:i,onChange:o}=e,[d,u]=(0,s.useState)(""),h=(0,s.useMemo)(()=>{let e=d.trim().toLowerCase();return e?r.filter(a=>a.label.toLowerCase().includes(e)):r},[r,d]),m=(0,s.useMemo)(()=>r.filter(e=>i.includes(e.value)).map(e=>e.label),[r,i]),p=e=>{if(i.includes(e)){o(i.filter(a=>a!==e));return}o([...i,e])};return(0,n.jsxs)("div",{className:l().shell,children:[(0,n.jsxs)("div",{className:l().header,children:[(0,n.jsx)("label",{className:l().label,children:a}),i.length>0&&(0,n.jsx)("button",{type:"button",onClick:()=>o([]),className:l().clearButton,children:"ÐÑиÑÑиÑÑ"})]}),(0,n.jsxs)("div",{className:l().panel,children:[(0,n.jsx)("input",{type:"text",value:d,onChange:e=>{u(e.target.value)},placeholder:t,className:l().searchInput}),m.length>0&&(0,n.jsx)("div",{className:l().selectedWrap,children:m.map((e,a)=>(0,n.jsx)("span",{className:l().badge,children:e},"".concat(e,"-").concat(a)))}),(0,n.jsx)("div",{className:l().list,children:0===h.length?(0,n.jsx)("div",{className:l().empty,children:"ÐиÑего не найдено"}):h.map(e=>{let a=i.includes(e.value);return(0,n.jsxs)("label",{className:"".concat(l().option," ").concat(a?l().optionChecked:""),children:[(0,n.jsx)("input",{type:"checkbox",checked:a,onChange:()=>p(e.value),className:l().checkbox}),(0,n.jsx)("span",{children:e.label})]},e.value)})})]}),c&&(0,n.jsx)("span",{className:l().helperText,children:c})]})}},75316:function(e,a,t){"use strict";t.d(a,{P:function(){return n}});let n=[1,3,7,30]},88568:function(e,a,t){"use strict";t.r(a),t.d(a,{__N_SSP:function(){return A},default:function(){return Z}});var n=t(74817),s=t(19365),c=t.n(s),l=t(71248),r=t(37518),i=t.n(r),o=t(36497),d=t(64912),u=t(34533),h=t(6852),m=t(40111),p=t(46935),g=t(9644),_=t(98907),b=t(75316),f=t(84535),v=t(20416),x=t(46696),N=t(27939),y=t(87593);let j=e=>b.P.map(a=>({sourceDeadline:a,discountPercent:Number((null==e?void 0:e.discountPercent)||10),durationValue:Number((null==e?void 0:e.durationValue)||1),durationUnit:(null==e?void 0:e.durationUnit)==="hours"?"hours":"days",purchaseLimit:Number((null==e?void 0:e.purchaseLimit)||1)})),P=(e,a)=>{let t=new Map((e||[]).map(e=>[Number(e.sourceDeadline),e]));return a.map(e=>{let a=t.get(Number(e.sourceDeadline));return a?{sourceDeadline:Number(e.sourceDeadline),discountPercent:Number(a.discountPercent||e.discountPercent),durationValue:Number(a.durationValue||e.durationValue),durationUnit:"hours"===a.durationUnit?"hours":"days",purchaseLimit:Number(a.purchaseLimit||e.purchaseLimit)}:e})},S=()=>({name:"",isEnabled:!1,sourceGameIds:[],sourceCheatIds:[],targetCheatId:"",targetCheatIds:[],discountPercent:10,durationValue:1,durationUnit:"days",purchaseLimit:1,priority:0,planSettings:j()});var C=(0,g.b)(()=>{var e;let{push:a,query:t}=(0,o.useRouter)(),s=String(t.id||""),[r,g]=(0,l.useState)(S()),{data:b,isLoading:C}=(0,d.useQuery)(["special price",s],()=>_.H.getById(s),{enabled:!!t.id,onSuccess:e=>{var a,t;let{data:n}=e,s=j({discountPercent:Number(n.discountPercent||10),durationValue:Number(n.durationValue||1),durationUnit:"hours"===n.durationUnit?"hours":"days",purchaseLimit:Number(n.purchaseLimit||1)});g({name:n.name||"",isEnabled:!!n.isEnabled,sourceGameIds:(n.sourceGameIds||[]).map(e=>"string"==typeof e?e:e._id),sourceCheatIds:(n.sourceCheatIds||[]).map(e=>"string"==typeof e?e:e._id),targetCheatId:"string"==typeof n.targetCheatId?n.targetCheatId:(null===(a=n.targetCheatId)||void 0===a?void 0:a._id)||"",targetCheatIds:((null===(t=n.targetCheatIds)||void 0===t?void 0:t.length)?n.targetCheatIds:n.targetCheatId?[n.targetCheatId]:[]).map(e=>"string"==typeof e?e:e._id),discountPercent:Number(n.discountPercent||10),durationValue:Number(n.durationValue||1),durationUnit:"hours"===n.durationUnit?"hours":"days",purchaseLimit:Number(n.purchaseLimit||1),priority:Number(n.priority||0),planSettings:P(n.planSettings,s)})},onError:()=>{(0,N._)("Ðе ÑдалоÑÑ Ð·Ð°Ð³ÑÑзиÑÑ Ð¿Ñавило")}}),{data:w}=(0,d.useQuery)(["special price cheats"],()=>f.o.getAll()),{data:E}=(0,d.useQuery)(["special price games"],()=>v.h.getAll()),k=(0,l.useMemo)(()=>(null==w?void 0:w.data)||[],[w]),M=(0,l.useMemo)(()=>(null==E?void 0:E.data)||[],[E]),A=(0,l.useMemo)(()=>k.map(e=>({value:e._id,label:e.name})),[k]),Z=(0,l.useMemo)(()=>M.map(e=>({value:e._id,label:e.name})),[M]),{mutateAsync:L,isLoading:I}=(0,d.useMutation)(e=>_.H.update(s,e),{onSuccess:()=>{(0,N.x)("ÐÑавило ÑоÑ
Ñанено"),a((0,x.A7)("special-prices"))},onError:e=>{var a,t;(0,N._)((null==e?void 0:null===(t=e.response)||void 0===t?void 0:null===(a=t.data)||void 0===a?void 0:a.message)||"Ðе ÑдалоÑÑ ÑоÑ
ÑаниÑÑ Ð¿Ñавило")}});(0,l.useEffect)(()=>{t.id||g(S())},[t.id]);let U=e=>{let{name:a,value:t,type:n}=e.target,s="checked"in e.target&&e.target.checked;g(e=>({...e,[a]:"checkbox"===n?s:"number"===n?Number(t):t}))},W=(e,a)=>{g(t=>({...t,[e]:a,..."targetCheatIds"===e?{targetCheatId:a[0]||""}:{}}))},D=async e=>{if(e.preventDefault(),!r.targetCheatIds.length){(0,N._)("ÐÑбеÑиÑе Ñ
оÑÑ Ð±Ñ Ð¾Ð´Ð¸Ð½ Ñелевой ÑоваÑ");return}await L(r)},T=(e,a,t)=>{g(n=>({...n,planSettings:n.planSettings.map(n=>Number(n.sourceDeadline)===e?{...n,[a]:"durationUnit"===a?"hours"===t?"hours":"days":Number(t)}:n)}))};return(0,n.jsxs)("div",{className:c().edit,children:[(0,n.jsx)(p.Z,{}),(0,n.jsxs)("div",{className:c().header,children:[(0,n.jsxs)("div",{children:[(0,n.jsxs)("h1",{className:c().title,children:[(0,n.jsx)(u.Z,{size:24}),"РедакÑиÑование ÑпеÑÑенÑ"]}),(0,n.jsx)("p",{className:c().description,children:"ÐокÑпка Ð´Ð»Ñ Ð°ÐºÑиваÑии ÑабоÑÐ°ÐµÑ Ð¿Ð¾ OR Ð¼ÐµÐ¶Ð´Ñ Ð²ÑбÑаннÑми игÑами и вÑбÑаннÑми ÑоваÑами. ÐовÑоÑÐ½Ð°Ñ Ð¿Ð¾Ð´Ñ
одÑÑÐ°Ñ Ð¿Ð¾ÐºÑпка ÑбÑаÑÑÐ²Ð°ÐµÑ ÑÐ°Ð¹Ð¼ÐµÑ Ð¸ ÑÑеÑÑик."})]}),(0,n.jsxs)(i(),{href:(0,x.A7)("special-prices"),className:c().backLink,children:[(0,n.jsx)(h.Z,{size:16}),"Ðазад к ÑпиÑкÑ"]})]}),(0,n.jsx)("div",{className:c().formCard,children:C?(0,n.jsx)("div",{className:c().loading,children:"ÐагÑÑзка пÑавила..."}):(0,n.jsxs)("form",{onSubmit:D,className:c().form,children:[(0,n.jsxs)("div",{className:c().formGrid,children:[(0,n.jsxs)("div",{className:c().field,children:[(0,n.jsx)("label",{htmlFor:"name",className:c().fieldLabel,children:"Ðазвание"}),(0,n.jsx)("input",{id:"name",name:"name",value:r.name,onChange:U,className:c().control,required:!0})]}),(0,n.jsx)("div",{className:c().fullWidth,children:(0,n.jsx)(y.Z,{label:"ЦелевÑе ÑоваÑÑ",placeholder:"ÐоиÑк ÑелевÑÑ
ÑоваÑов...",options:A,values:r.targetCheatIds,onChange:e=>W("targetCheatIds",e),helperText:"ÐÑбеÑиÑе ÑоваÑÑ, на коÑоÑÑе бÑÐ´ÐµÑ Ð´ÐµÐ¹ÑÑвоваÑÑ Ð¾Ð´Ð½Ð° и Ñа же пеÑÑоналÑÐ½Ð°Ñ Ñкидка Ñ Ð¾Ð±Ñим лимиÑом покÑпок."})}),(0,n.jsxs)("div",{className:c().field,children:[(0,n.jsx)("label",{htmlFor:"discountPercent",className:c().fieldLabel,children:"Скидка Ð´Ð»Ñ Ð¾ÑÑалÑнÑÑ
ÑÑоков, %"}),(0,n.jsx)("input",{id:"discountPercent",name:"discountPercent",type:"number",min:1,max:100,value:r.discountPercent,onChange:U,className:c().control,required:!0})]}),(0,n.jsxs)("div",{className:c().field,children:[(0,n.jsx)("label",{htmlFor:"purchaseLimit",className:c().fieldLabel,children:"ÐокÑпки Ð´Ð»Ñ Ð¾ÑÑалÑнÑÑ
ÑÑоков"}),(0,n.jsx)("input",{id:"purchaseLimit",name:"purchaseLimit",type:"number",min:1,value:r.purchaseLimit,onChange:U,className:c().control,required:!0})]}),(0,n.jsxs)("div",{className:c().field,children:[(0,n.jsx)("label",{htmlFor:"durationValue",className:c().fieldLabel,children:"ÐлиÑелÑноÑÑÑ Ð´Ð»Ñ Ð¾ÑÑалÑнÑÑ
ÑÑоков"}),(0,n.jsx)("input",{id:"durationValue",name:"durationValue",type:"number",min:1,value:r.durationValue,onChange:U,className:c().control,required:!0})]}),(0,n.jsxs)("div",{className:c().field,children:[(0,n.jsx)("label",{htmlFor:"durationUnit",className:c().fieldLabel,children:"ÐдиниÑа вÑемени Ð´Ð»Ñ Ð¾ÑÑалÑнÑÑ
ÑÑоков"}),(0,n.jsxs)("select",{id:"durationUnit",name:"durationUnit",value:r.durationUnit,onChange:U,className:c().control,children:[(0,n.jsx)("option",{value:"hours",children:"ЧаÑÑ"}),(0,n.jsx)("option",{value:"days",children:"Ðни"})]})]}),(0,n.jsxs)("div",{className:c().field,children:[(0,n.jsx)("label",{htmlFor:"priority",className:c().fieldLabel,children:"ÐÑиоÑиÑÐµÑ Ð¿Ñи Ñавной Ñкидке"}),(0,n.jsx)("input",{id:"priority",name:"priority",type:"number",value:r.priority,onChange:U,className:c().control})]}),(0,n.jsxs)("div",{className:"".concat(c().field," ").concat(c().toggleField),children:[(0,n.jsx)("span",{className:c().fieldLabel,children:"СÑаÑÑÑ Ð¿Ñавила"}),(0,n.jsxs)("label",{className:c().toggle,children:[(0,n.jsx)("input",{type:"checkbox",name:"isEnabled",checked:r.isEnabled,onChange:U,className:c().toggleCheckbox}),"ÐÑавило вклÑÑено"]})]})]}),(0,n.jsxs)("div",{className:c().selectionGrid,children:[(0,n.jsx)(y.Z,{label:"ÐгÑÑ Ð´Ð»Ñ Ð°ÐºÑиваÑии",placeholder:"ÐоиÑк игÑ...",options:Z,values:r.sourceGameIds,onChange:e=>W("sourceGameIds",e),helperText:"ÐокÑпка лÑбого ÑоваÑа из вÑбÑанной игÑÑ Ð¿Ð¾Ð´Ð¾Ð¹Ð´ÐµÑ Ð´Ð»Ñ Ð°ÐºÑиваÑии."}),(0,n.jsx)(y.Z,{label:"ТоваÑÑ Ð´Ð»Ñ Ð°ÐºÑиваÑии",placeholder:"ÐоиÑк ÑоваÑов...",options:A,values:r.sourceCheatIds,onChange:e=>W("sourceCheatIds",e),helperText:"ÐовÑоÑÐ½Ð°Ñ Ð¿Ð¾Ð´Ñ
одÑÑÐ°Ñ Ð¿Ð¾ÐºÑпка заново запÑÑÑÐ¸Ñ ÑÑок дейÑÑÐ²Ð¸Ñ Ð¸ лимиÑ."})]}),(0,n.jsx)("p",{className:c().infoNote,children:"ЦелевÑе ÑоваÑÑ Ð¼Ð¾Ð³ÑÑ Ð½Ð°Ñ
одиÑÑÑÑ Ð² вÑбÑанной игÑе Ð´Ð»Ñ Ð°ÐºÑиваÑии, но иÑ
ÑобÑÑÐ²ÐµÐ½Ð½Ð°Ñ Ð¿Ð¾ÐºÑпка не акÑивиÑÑÐµÑ ÑÑо пÑавило. Ð ÑпиÑок ÑоваÑов Ð´Ð»Ñ Ð°ÐºÑиваÑии ÑÑи же ÑоваÑÑ Ð´Ð¾Ð±Ð°Ð²Ð»ÑÑÑ Ð½ÐµÐ»ÑзÑ."}),(0,n.jsxs)("div",{className:c().plansCard,children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("h3",{className:c().plansTitle,children:"ÐаÑÑÑойки по планам 1 / 3 / 7 / 30 дней"}),(0,n.jsx)("p",{className:c().plansDescription,children:"ÐÑли ÑÐ¾Ð²Ð°Ñ Ð´Ð»Ñ Ð°ÐºÑиваÑии кÑплен на один из ÑÑиÑ
ÑÑоков, ÑпеÑÑена возÑÐ¼ÐµÑ Ð¿Ð°ÑамеÑÑÑ Ð¸Ð· ÑооÑвеÑÑÑвÑÑÑего блока ниже. ÐÑÑалÑнÑе ÑÑоки иÑполÑзÑÑÑ Ð·Ð½Ð°ÑÐµÐ½Ð¸Ñ ÑвеÑÑ
Ñ."})]}),(0,n.jsx)("div",{className:c().plansGrid,children:r.planSettings.map(e=>(0,n.jsxs)("div",{className:c().planCard,children:[(0,n.jsxs)("div",{className:c().planTitle,children:["ÐокÑпка Ð´Ð»Ñ Ð°ÐºÑиваÑии: ",e.sourceDeadline," ",1===Number(e.sourceDeadline)?"денÑ":"днÑ"]}),(0,n.jsxs)("div",{className:c().field,children:[(0,n.jsx)("label",{htmlFor:"plan-discount-".concat(e.sourceDeadline),className:c().fieldLabel,children:"Скидка, %"}),(0,n.jsx)("input",{id:"plan-discount-".concat(e.sourceDeadline),type:"number",min:1,max:100,value:e.discountPercent,onChange:a=>T(Number(e.sourceDeadline),"discountPercent",a.target.value),className:c().control})]}),(0,n.jsxs)("div",{className:c().field,children:[(0,n.jsx)("label",{htmlFor:"plan-limit-".concat(e.sourceDeadline),className:c().fieldLabel,children:"ÐолиÑеÑÑво покÑпок"}),(0,n.jsx)("input",{id:"plan-limit-".concat(e.sourceDeadline),type:"number",min:1,value:e.purchaseLimit,onChange:a=>T(Number(e.sourceDeadline),"purchaseLimit",a.target.value),className:c().control})]}),(0,n.jsxs)("div",{className:c().doubleGrid,children:[(0,n.jsxs)("div",{className:c().field,children:[(0,n.jsx)("label",{htmlFor:"plan-duration-".concat(e.sourceDeadline),className:c().fieldLabel,children:"ÐлиÑелÑноÑÑÑ"}),(0,n.jsx)("input",{id:"plan-duration-".concat(e.sourceDeadline),type:"number",min:1,value:e.durationValue,onChange:a=>T(Number(e.sourceDeadline),"durationValue",a.target.value),className:c().control})]}),(0,n.jsxs)("div",{className:c().field,children:[(0,n.jsx)("label",{htmlFor:"plan-unit-".concat(e.sourceDeadline),className:c().fieldLabel,children:"ÐдиниÑа"}),(0,n.jsxs)("select",{id:"plan-unit-".concat(e.sourceDeadline),value:e.durationUnit,onChange:a=>T(Number(e.sourceDeadline),"durationUnit",a.target.value),className:c().control,children:[(0,n.jsx)("option",{value:"hours",children:"ЧаÑÑ"}),(0,n.jsx)("option",{value:"days",children:"Ðни"})]})]})]})]},e.sourceDeadline))})]}),(0,n.jsxs)("div",{className:c().footer,children:[(0,n.jsxs)("button",{type:"submit",disabled:I,className:c().saveButton,children:[(0,n.jsx)(m.Z,{size:16}),I?"СоÑ
Ñанение...":"СоÑ
ÑаниÑÑ"]}),(null==b?void 0:null===(e=b.data)||void 0===e?void 0:e._id)&&(0,n.jsxs)("span",{className:c().meta,children:["ID: ",b.data._id]})]})]})})]})}),w=t(16398),E=t(11758),k=t(37319);let M=()=>(0,n.jsxs)(k.Z,{title:"GAMEBREAKER | Edit special price",children:[(0,n.jsx)(E.Z,{}),(0,n.jsx)(C,{}),(0,n.jsx)(w.Z,{})]});M.allowedRoles=["super_admin"];var A=!0,Z=M},84535:function(e,a,t){"use strict";t.d(a,{Y:function(){return l},o:function(){return c}});var n=t(46696),s=t(15203);let c={async getAll(e){let a;for(let t=1;t<=3;t++)try{return await s.vV.get((0,n.U_)(""),{params:e?{searchTerm:e}:{}})}catch(e){a=e,console.warn("Attempt ".concat(t,"/").concat(3," failed for getAll cheats:"),e),t<3&&await new Promise(e=>setTimeout(e,1e3*t))}throw a},getManageAll:async e=>s.ZP.get((0,n.U_)("/manage"),{params:e?{searchTerm:e}:{}}),async getMostPopularCheats(){let{data:e}=await s.vV.get((0,n.U_)("/most-popular"));return e},getById:async e=>s.ZP.get((0,n.U_)("/".concat(e))),getByGame:async e=>s.vV.get((0,n.U_)("/by-game/".concat(e))),async getBySlug(e){let a;for(let t=1;t<=3;t++)try{return await s.vV.get((0,n.U_)("/by-slug/".concat(e)))}catch(n){a=n,console.warn("Attempt ".concat(t,"/").concat(3,' failed for cheat slug "').concat(e,'":'),n),t<3&&await new Promise(e=>setTimeout(e,1e3*t))}throw a},createCheat:async()=>s.ZP.post((0,n.U_)("")),updateCheat:async(e,a)=>s.ZP.put((0,n.U_)("/".concat(e)),a),deleteCheat:async e=>s.ZP.delete((0,n.U_)("/".concat(e))),updateCountOpened:async e=>s.vV.put((0,n.U_)("/update-count-opened"),{slug:e})},l={getCountCheats:async()=>s.ZP.get((0,n.U_)("/count"))}},20416:function(e,a,t){"use strict";t.d(a,{h:function(){return c},z:function(){return l}});var n=t(46696),s=t(15203);let c={async getAll(e){let a;for(let t=1;t<=3;t++)try{return await s.vV.get((0,n.cg)(""),{params:e?{searchTerm:e}:{}})}catch(e){a=e,console.warn("Attempt ".concat(t,"/").concat(3," failed for getAll games:"),e),t<3&&await new Promise(e=>setTimeout(e,1e3*t))}throw a},getById:asy
1nc e=>s.ZP.get((0,n.cg)("/".concat(e))),async getBySlug(e){let a;for(let t=1;t<=3;t++)try{return await s.vV.get((0,n.cg)("/by-slug/".concat(e)))}catch(n){a=n,console.warn("Attempt ".concat(t,"/").concat(3,' failed for game slug "').concat(e,'":'),n),t<3&&await new Promise(e=>setTimeout(e,1e3*t))}throw a},createGame:async()=>s.ZP.post((0,n.cg)("")),updateGame:async(e,a)=>s.ZP.put((0,n.cg)("/".concat(e)),a),deleteGame:async e=>s.ZP.delete((0,n.cg)("/".concat(e)))},l={getCountGames:async()=>s.ZP.get((0,n.cg)("/count"))}},51646:function(e,a,t){"use strict";t.d(a,{g:function(){return c}});var n=t(15203),s=t(46696);let c={async getOwnThread(){let{data:e}=await n.ZP.get((0,s.MP)("/thread"));return e},async getOwnThreadMessages(){let{data:e}=await n.ZP.get((0,s.MP)("/thread/messages"));return e},async sendOwnMessage(e){let{data:a}=await n.ZP.post((0,s.MP)("/thread/messages"),e);return a},async markOwnThreadRead(){let{data:e}=await n.ZP.post((0,s.MP)("/thread/read"));return e},async getThreads(e){let{data:a}=await n.ZP.get((0,s.MP)("/threads"),{params:e});return a},async getThreadMessages(e){let{data:a}=await n.ZP.get((0,s.MP)("/threads/".concat(e,"/messages")));return a},async sendThreadMessage(e,a){let{data:t}=await n.ZP.post((0,s.MP)("/threads/".concat(e,"/messages")),a);return t},async markThreadRead(e){let{data:a}=await n.ZP.post((0,s.MP)("/threads/".concat(e,"/read")));return a},async updateThreadStatus(e,a){let{data:t}=await n.ZP.patch((0,s.MP)("/threads/".concat(e,"/status")),{status:a});return t}}},98907:function(e,a,t){"use strict";t.d(a,{H:function(){return c}});var n=t(15203),s=t(46696);let c={getAll:async e=>n.ZP.get((0,s.ME)(""),{params:e?{searchTerm:e}:{}}),getById:async e=>n.ZP.get((0,s.ME)("/".concat(e))),getPublic:async()=>n.ZP.get((0,s.ME)("/public")),create:async()=>n.ZP.post((0,s.ME)("")),update:async(e,a)=>n.ZP.put((0,s.ME)("/".concat(e)),a),delete:async e=>n.ZP.delete((0,s.ME)("/".concat(e)))}},32596:function(e){e.exports={manageButtons:"ManageHeader_manageButtons__eYlnB",title:"ManageHeader_title__aoN7_",buttons:"ManageHeader_buttons__XbDvh",button:"ManageHeader_button__sALhk",buttonLabel:"ManageHeader_buttonLabel__2qzBK",badge:"ManageHeader_badge__DeLN3",buttonActive:"ManageHeader_buttonActive__69JoS",manageHeader:"ManageHeader_manageHeader__imgoY",search:"ManageHeader_search__bxOl_",icon:"ManageHeader_icon__RwcJP",input:"ManageHeader_input__7Z19U",create:"ManageHeader_create__pxZxi",selectedWrapper:"ManageHeader_selectedWrapper__GGWEm"}},19365:function(e){e.exports={edit:"EditSpecialPrice_edit__ZugkQ",header:"EditSpecialPrice_header__zT_ih",title:"EditSpecialPrice_title__t1f6K",description:"EditSpecialPrice_description__euQ70",backLink:"EditSpecialPrice_backLink__P2KPx",formCard:"EditSpecialPrice_formCard__r6HJc",loading:"EditSpecialPrice_loading__482ot",form:"EditSpecialPrice_form__k_Akj",formGrid:"EditSpecialPrice_formGrid__YIqpO",field:"EditSpecialPrice_field__7hgK1",fullWidth:"EditSpecialPrice_fullWidth__LJSVI",fieldLabel:"EditSpecialPrice_fieldLabel__0hUvu",control:"EditSpecialPrice_control__3LN2_",toggleField:"EditSpecialPrice_toggleField__isYR6",toggle:"EditSpecialPrice_toggle__Hepb_",toggleCheckbox:"EditSpecialPrice_toggleCheckbox__79y2a",selectionGrid:"EditSpecialPrice_selectionGrid__6Udh7",infoNote:"EditSpecialPrice_infoNote__HCcJ7",plansCard:"EditSpecialPrice_plansCard__6LWCD",plansTitle:"EditSpecialPrice_plansTitle__mujGE",plansDescription:"EditSpecialPrice_plansDescription__rYEpB",plansGrid:"EditSpecialPrice_plansGrid__0SDRT",planCard:"EditSpecialPrice_planCard__qRLWn",planTitle:"EditSpecialPrice_planTitle__CEdE9",doubleGrid:"EditSpecialPrice_doubleGrid__opEqF",footer:"EditSpecialPrice_footer__93EQO",saveButton:"EditSpecialPrice_saveButton__pRJOl",meta:"EditSpecialPrice_meta__3Q6ID"}},92203:function(e){e.exports={shell:"SearchableSelect_shell__c2rnh",header:"SearchableSelect_header__tpCFD",label:"SearchableSelect_label__Ey9ww",clearButton:"SearchableSelect_clearButton__b48kU",headerActions:"SearchableSelect_headerActions__9nJxl",panel:"SearchableSelect_panel__kXXCX",
1searchInput:"SearchableSelect_searchInput__vBesC",selectedWrap:"SearchableSelect_selectedWrap__gBDia",badge:"SearchableSelect_badge__v6Sjz",list:"SearchableSelect_list__b3V_2",empty:"SearchableSelect_empty__seNry",option:"SearchableSelect_option__QRUdP",optionChecked:"SearchableSelect_optionChecked__Vq3za",checkbox:"SearchableSelect_checkbox__KtVdU",radioIndicator:"SearchableSelect_radioIndicator__Uipvl",radioIndicatorChecked:"SearchableSelect_radioIndicatorChecked__3QBnY",helperText:"SearchableSelect_helperText__63X0a",toggleButton:"SearchableSelect_toggleButton__9H4ui",compactList:"SearchableSelect_compactList__r7enp"}}},function(e){e.O(0,[7518,8735,3212,2888,9774,179],function(){return e(e.s=78304)}),_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.