PageSourceSearch

https://dtp.bg/_next/static/chunks/pages/admin/login-9fe1d6e0cc49c7a3.js

js dtp.bg collected 2026-10-02 21:07:07 UTC 11,634 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2300],{3454:function(t,e,n){"use strict";var o,r;t.exports=(null==(o=n.g.process)?void 0:o.env)&&"object"==typeof(null==(r=n.g.process)?void 0:r.env)?n.g.process:n(7663)},6262:function(t,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/login",function(){return n(9530)}])},6419:function(t,e,n){"use strict";n.d(e,{P:function(){return o.Ps},y:function(){return r}});var o=n(108);let r=function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return(0,o.WY)({url:t,document:e,variables:n,requestHeaders:r})}},1946:function(t,e,n){"use strict";n.d(e,{C2:function(){return a},Hb:function(){return c},gE:function(){return r}});var o=n(6489);let r="authToken",i=(t,e)=>{let n={maxAge:2592e3,path:"/",secure:!0};return e&&e(r,t,n),o.serialize(r,t,n)},c=()=>document.cookie.split("; ").reduce((t,e)=>{let n=e.split("=");return n[0]===r?decodeURIComponent(n[1]):t},"")||"",a=t=>{document.cookie=i(t)}},1502:function(t,e,n){"use strict";n.d(e,{gE:function(){return o.gE},M0:function(){return i},C2:function(){return o.C2},ew:function(){return c}});var o=n(1946);n(1202);var r=n(5893),i=n(7294).createContext(void 0),c=t=>e=>{let{adminToken:n,...o}=e;return(0,r.jsx)(i.Provider,{value:n,children:(0,r.jsx)(t,{...o})})}},9111:function(t,e,n){"use strict";n.d(e,{Z:function(){return a}});var o=n(2395),r=n(5556);let i="/admin/cms/articles/",c="admin";var a={adminPrefix:c,redirects:{admin:{list:"/".concat(c,"/cms/redirects"),new:"/".concat(c,"/cms/redirects/new"),edit:t=>"/admin/cms/redirects/".concat(t,"/edit")}},articles:{admin:{list:"/admin/cms/articles",new:"".concat(i,"new"),show:(t,e,n)=>(0,r.B)("".concat(i).concat(t),e,n),urls:{new:(t,e,n)=>(0,r.B)("".concat(i).concat(t,"/urls/new"),e,n)},deletes:{new:(t,e,n)=>(0,r.B)("".concat(i).concat(t,"/deletes/new"),e,n)},translations:{new:(t,e,n)=>(0,r.B)("".concat(i).concat(t,"/translations/new"),e,n),create:(t,e,n)=>(0,r.B)("".concat(i).concat(t,"/translations/create"),e,n)},revisions:{edit:(t,e,n,o)=>(0,r.B)("".concat(i).concat(t,"/revisions/").concat(e,"/edit"),n,o),publish:(t,e,n,o)=>(0,r.B)("".concat(i).concat(t,"/revisions/").concat(e,"/publish"),n,o),builder:(t,e,n,o)=>(0,r.B)("".concat(i).concat(t,"/revisions/").concat(e,"/builder"),n,o),preview:(t,e,n,o)=>(0,r.B)("".concat(i).concat(t,"/revisions/").concat(e,"/preview"),n,o)}},frontend:{list:"/news/",show:(t,e,n)=>(0,r.B)("/news/".concat(t),e,n),revisionPreview:(t,e,n,o)=>(0,r.B)("/news/revision-preview/".concat(t,"?rev=").concat(e),n,o)}},program:{list:t=>(0,r.B)("/program",t,"")},pages:o.L,tags:{admin:{list:"/".concat(c,"/cms/tags"),new:"/".concat(c,"/cms/tags/new"),edit:t=>"/admin/cms/tags/".concat(t,"/edit")}},sanitizeHomepage:o.H,admin:{dashboard:"/".concat(c),auth:{login:"/".concat(c,"/login"),logout:"/".concat(c,"/logout"),loginCallback:"/".concat(c,"/login/callback")}},website:{admin:{edit:"/".concat(c,"/cms/settings/edit")}}}},2395:function(t,e,n){"use strict";n.d(e,{H:function(){return r},L:function(){return c}});var o=n(5556);let r=t=>"homepage"===t?"":t,i="/admin/cms/pages/",c={admin:{list:i,new:"".concat(i,"new"),show:(t,e,n)=>(0,o.B)("".concat(i).concat(t),e,n),urls:{new:(t,e,n)=>(0,o.B)("".concat(i).concat(t,"/urls/new"),e,n)},deletes:{new:(t,e,n)=>(0,o.B)("".concat(i).concat(t,"/deletes/new"),e,n)},translations:{new:(t,e,n)=>(0,o.B)("".concat(i).concat(t,"/translations/new"),e,n),create:(t,e,n)=>(0,o.B)("".concat(i).concat(t,"/translations/create"),e,n)},revisions:{edit:(t,e,n,r)=>(0,o.B)("".concat(i).concat(t,"/revisions/").concat(e,"/edit"),n,r),publish:(t,e,n,r)=>(0,o.B)("".concat(i).concat(t,"/revisions/").concat(e,"/publish"),n,r),builder:(t,e,n,r)=>(0,o.B)("".concat(i).concat(t,"/revisions/").concat(e,"/builder"),n,r),preview:(t,e,n,r)=>(0,o.B)("".concat(i).concat(t,"/revisions/").concat(e,"/preview"),n,r)}},frontend:{show:(t,e,n)=>{if(""===t)return(0,o.J)((0,o.B)("/",e,n));let r=t.startsWith("/")?t:"/".concat(t);return(0,o.B)((0,o.J)(r),e,n)},revisionPreview:(t,e,n,r)=>(0,o.B)("/pages/revision-preview/".concat(t,"?rev=").concat(e),n,r)}}},5556:function(t,e,n){"use strict";n.d(e,{B:function(){return o},J:function(){return r}});let o=(t,e,n)=>e===n?t:"/".concat(e).concat(t),r=t=>t.endsWith("/")&&t.length>1?t.slice(0,-1):t},9530:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return x}});var o=n(5893),r=n(9544),i=n(6045),c=n(3454);let a=[[c.env.NEXT_PUBLIC_GATEWAY_SOCIAL_AUTH_URL,"1-dtp-ncknnb","1-dtp-tqtcvg","google"].join("/"),"?return_to=",c.env.NEXT_PUBLIC_ADMIN_LOGIN_CALLBACK_URL].join(""),s=()=>c.env.NEXT_PUBLIC_GATEWAY_SOCIAL_AUTH_URL&&c.env.NEXT_PUBLIC_ADMIN_LOGIN_CALLBACK_URL;var u=()=>{let t={};return s()&&(t={google:a}),t},l=n(6887),d=n.n(l),h=n(2729),g=n(6419);function p(){let t=(0,h._)(["\n  mutation Login($input: LoginInput!) {\n    login(input: $input) {\n      accessToken\n      errors {\n        key\n        message\n      }\n    }\n  }\n"]);return p=function(){return t},t}let f=(0,g.P)(p()),m=(t,e)=>(0,g.y)("https://gateway.raketa.cloud/auth",t,e),v={request:(t,e)=>m(f,{input:{email:t,password:e,userPools:["1-dtp-tqtcvg","studio-raketa"],project:"
11-dtp-ncknnb"}})};var w=n(1502),y=n(9111);let b=()=>(0,o.jsxs)(d(),{onSubmit:async(t,e)=>{let n=await v.request(t.get("email"),t.get("password"));n.login.errors&&e(n.login.errors),n.login.accessToken&&((0,w.C2)(n.login.accessToken),window.location=y.Z.admin.dashboard)},children:[(0,o.jsx)(d().Field,{type:"email",name:"email",label:"Email",required:!0}),(0,o.jsx)(d().Field,{type:"password",name:"password",label:"Password",required:!0}),(0,o.jsx)(d().Submit,{children:"Login"})]}),B=t=>{let{socialLogins:e}=t;return e.google?(0,o.jsx)("div",{style:{display:"flex",justifyContent:"center",marginTop:"0.25em"},children:(0,o.jsx)("a",{href:e.google,children:(0,o.jsx)(r.Button,{type:"button",variant:"secondary",children:"Login with Google"})})}):null};var _=n(1163),x=()=>{let{query:t}=(0,_.useRouter)(),e=u(),n=t.user_active;return(0,o.jsx)(i.Z,{children:(0,o.jsx)(r.Stack,{className:"r-stack-justify-center r-stack-align-center",style:{background:"linear-gradient(135deg, #EBC3CD 0%, #8EC4EA 100%)",height:"100vh"},children:(0,o.jsxs)("div",{style:{width:"300px",marginBottom:"0.25em"},children:[(0,o.jsx)("div",{style:{fontSize:"48px"},children:"\uD83D\uDC69‍\uD83D\uDE80 + \uD83D\uDC69‍\uD83D\uDCBC = \uD83D\uDD96"}),"0"===n&&(0,o.jsx)(r.P,{style:{paddingBottom:"1rem"},children:"Your account is now created but still not activated. Please ask your administrator to grant you access."}),e&&e.google?(0,o.jsx)(B,{socialLogins:e}):(0,o.jsx)(b,{})]})})})}},6045:function(t,e,n){"use strict";n.d(e,{Z:function(){return f}});var o=n(5893);n(7294);let r=(t,e)=>{var n,o=[];for(n in t)if(t.hasOwnProperty(n)){var i=e?e+"["+n+"]":n,c=t[n];o.push(null!==c&&"object"==typeof c?r(c,i):encodeURIComponent(i)+"="+encodeURIComponent(c))}return o.join("&")},i=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return fetch("".concat(t,"?").concat(r(e)),n)},c=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return fetch(t,Object.assign({method:"POST",credentials:"same-origin",body:JSON.stringify(e)},n))},a=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return fetch(t,{method:"PUT",credentials:"same-origin",body:JSON.stringify(e),...n})},s=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return fetch(t,Object.assign({method:"DELETE",credentials:"same-origin",body:JSON.stringify(e)},n))};class u{findAll(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:100;i("".concat(this.baseUrl,"images"),{page_size:n,...e},{headers:{Authorization:"Bearer ".concat(this.api_key)}}).then(t=>t.json()).then(e=>t(e))}uploadFile(t,e){let n=new FormData;n.append("image",t),c("".concat(this.baseUrl,"images"),{},{body:n,headers:{Authorization:"Bearer ".concat(this.api_key)}}).then(t=>t.json()).then(t=>e(t))}destroy(t,e){s("".concat(this.baseUrl,"images/").concat(t.id),{},{headers:{"content-type":"application/json",Authorization:"Bearer ".concat(this.api_key)}}).then(t=>t.json()).then(t=>e(t))}update(t,e,n){let o={image:{...e}};a("".concat(this.baseUrl,"images/").concat(t.id),o,{headers:{Authorization:"Bearer ".concat(this.api_key),"Content-Type":"application/json"}}).then(t=>t.json()).then(t=>n(t))}constructor(t,e){this.baseUrl=t,this.api_key=e}}var l=n(2549),d=n(9785),h=t=>{let{configuration:e,children:n}=t;return(0,o.jsx)(d.BuilderContext.Provider,{value:e,children:n})},g={buttonStyles:[["primary","Primary"],["secondary","Secondary"],["text","Text"]],containerAdmin:{spacing:{type:"select",options:[["none","None"],["both","Both"],["top","Top"],["bottom","Bottom"]]},theme:{type:"select",options:[["none","None"],["light","Light"],["gray","Gray"],["dark","Dark"],["brand","Brand"],["brand-alt","Brand (alt.)"]]},containerID:{type:"text",label:"Section ID",hint:"HTML ID attribute for use in anchors"},className:{type:"text",label:"CSS class"}}};let p=new u("https://images.raketa.cloud/api/","6c79f897-27a2-48d5-b271-f59acdbc5979.oPrXz4t7DX3P5Nx2PA-F_XwWV72W2v");function f(t){let{children:e}=t;return(0,o.jsx)(h,{configuration:g,children:(0,o.jsx)(l.MediaManagerContext.Provider,{value:p,children:e})})}},7663:function(t){!function(){var e={229:function(t){var e,n,o,r=t.exports={};function i(){throw Error("setTimeout has not been defined")}function c(){throw Error("clearTimeout has not been defined")}function a(t){if(e===setTimeout)return setTimeout(t,0);if((e===i||!e)&&setTimeout)return e=setTimeout,setTimeout(t,0);try{return e(t,0)}catch(n){try{return e.call(null,t,0)}catch(n){return e.call(this,t,0)}}}!function(){try{e="function"==typeof setTimeout?setTimeout:i}catch(t){e=i}try{n="function"==typeof clearTimeout?clearTimeout:c}catch(t){n=c}}();var s=[],u=!1,l=-1;
1function d(){u&&o&&(u=!1,o.length?s=o.concat(s):l=-1,s.length&&h())}function h(){if(!u){var t=a(d);u=!0;for(var e=s.length;e;){for(o=s,s=[];++l<e;)o&&o[l].run();l=-1,e=s.length}o=null,u=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===c||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(t)}}function g(t,e){this.fun=t,this.array=e}function p(){}r.nextTick=function(t){var e=Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];s.push(new g(t,e)),1!==s.length||u||a(h)},g.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=p,r.addListener=p,r.once=p,r.off=p,r.removeListener=p,r.removeAllListeners=p,r.emit=p,r.prependListener=p,r.prependOnceListener=p,r.listeners=function(t){return[]},r.binding=function(t){throw Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(t){throw Error("process.chdir is not supported")},r.umask=function(){return 0}}},n={};function o(t){var r=n[t];if(void 0!==r)return r.exports;var i=n[t]={exports:{}},c=!0;try{e[t](i,i.exports,o),c=!1}finally{c&&delete n[t]}return i.exports}o.ab="//";var r=o(229);t.exports=r}()}},function(t){t.O(0,[9451,545,5474,8717,9253,2888,9774,179],function(){return t(t.s=6262)}),_N_E=t.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.