1"use strict";(self.webpackChunkfbcreatorapp=self.webpackChunkfbcreatorapp||[]).push([[1505],{124:(e,t,n)=>{n.d(t,{A:()=>a});var o=n(6910);const a=new class{constructor(){this.apiBase="https://api.autowork.com.vn"}isConfigured(){return Boolean(this.apiBase)}async sendMessage(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isConfigured())return console.warn("Telegram proxy ch\u01b0a \u0111\u01b0\u1ee3c c\u1ea5u h\xecnh (thi\u1ebfu REACT_APP_API_URL)."),{success:!1,error:"Not configured"};const n=t.kind||"generic";if("generic"===n&&!t.authToken)return console.warn("Telegram generic requires Firebase authToken; refusing unauthenticated free-form send"),{success:!1,error:"AUTH_REQUIRED"};try{const a={"Content-Type":"application/json"};t.authToken&&(a.Authorization="Bearer ".concat(t.authToken));return{success:!0,data:(await o.A.post("".concat(this.apiBase,"/api/notifications/telegram"),{kind:n,text:e},{timeout:1e4,headers:a})).data}}catch(s){var a,r,i;return console.error("Error sending Telegram message:",(null===(a=s.response)||void 0===a?void 0:a.data)||s.message),{success:!1,error:(null===(r=s.response)||void 0===r||null===(i=r.data)||void 0===i?void 0:i.message)||s.message}}}async sendFeedbackNotification(e){const{userId:t,userName:n,userEmail:o,content:a,rating:r}=e,i=r>0?"\u2b50".repeat(r):"Kh\xf4ng \u0111\xe1nh gi\xe1",s="\n\ud83d\udd14 PH\u1ea2N H\u1ed2I M\u1edaI T\u1eea NG\u01af\u1edcI D\xd9NG\n\n\ud83d\udce7 Email: ".concat(o||"N/A","\n\ud83c\udd94 User ID: ").concat(t||"N/A","\n\ud83d\udc64 Name: ").concat(n||"N/A","\n\n\u2b50 \u0110\xe1nh gi\xe1: ").concat(i,"\n\n\ud83d\udcac N\u1ed9i dung:\n").concat(a||"","\n\n\ud83d\udd17 URL: ").concat("undefined"!==typeof window?window.location.href:"","\n\ud83d\udd50 Th\u1eddi gian: ").concat((new Date).toLocaleString("vi-VN"),"\n ").trim();return this.sendMessage(s,{kind:"generic"})}async sendConnectionNotification(e){let{platform:t,userId:n,userEmail:o,detail:a}=e;const r="\n\u2705 K\u1ebeT N\u1ed0I N\u1ec0N T\u1ea2NG TH\xc0NH C\xd4NG\n\n\ud83c\udf10 N\u1ec1n t\u1ea3ng: ".concat(t||"N/A","\n\ud83c\udd94 User ID: ").concat(n||"N/A","\n\ud83d\udce7 Email: ").concat(o||"N/A").concat(a?"\n\ud83d\udccc Chi ti\u1ebft: ".concat(a):"","\n\n\ud83d\udd50 Th\u1eddi gian: ").concat((new Date).toLocaleString("vi-VN"),"\n ").trim();return this.sendMessage(r,{kind:"generic"})}async sendSimpleMessage(e){return this.sendMessage(e,{kind:"generic"})}}},1505:(e,t,n)=>{n.r(t),n.d(t,{default:()=>A});var o=n(9379),a=n(9950),r=n(6339),i=n(5299),s=n(2578),c=n(124),_=n(4414);const A=e=>{let{onClose:t}=e;const[n,A]=(0,a.useState)(""),[E,d]=(0,a.useState)(0),[l,u]=(0,a.useState)(!1),[p,R]=(0,a.useState)(null),[g,P]=(0,a.useState)(""),C={form:{border:"1px solid #ccc",padding:"20px",borderRadius:"8px",maxWidth:"750px",width:"90%",margin:"20px auto",backgroundColor:"#f9f9f9",maxHeight:"90vh",overflowY:"auto",boxSizing:"border-box"},label:{display:"block",marginBottom:"5px",fontWeight:"bold"},textarea:{width:"100%",padding:"10px",marginBottom:"15px",border:"1px solid #ccc",borderRadius:"4px",minHeight:"150px",boxSizing:"border-box",fontSize:"1rem"},button:{padding:"10px 20px",backgroundColor:"#007bff",color:"white",border:"none",borderRadius:"4px",cursor:"pointer",marginRight:"10px",fontSize:"1rem"},buttonDisabled:{backgroundColor:"#ccc",cursor:"not-allowed"},closeButton:{backgroundColor:"#6c757d"},statusMessage:{marginTop:"15px",padding:"10px",borderRadius:"4px"},successMessage:{backgroundColor:"#d4edda",color:"#155724",border:"1px solid #c3e6cb"},errorMessage:{backgroundColor:"#f8d7da",color:"#721c24",border:"1px solid #f5c6cb"},ratingContainer:{marginBottom:"20px",display:"flex",alignItems:"center",gap:"10px"},starButton:{background:"none",border:"none",cursor:"pointer",padding:"2px",color:"#ccc",fontSize:"1.8rem",lineHeight:"1"},starButtonActive:{color:"#ffc107"}};return(0,_.jsxs)("form",{onSubmit:async e=>{e.preventDefault(),u(!0),R(null),P("");const t=localStorage.getItem("userId"),o=localStorage.getItem("userName")||localStorage.getItem("displayName"),a=localStorage.getItem("userEmail")||localStorage.getItem("email");if(!t)return P("B\u1ea1n c\u1ea7n \u0111\u0103ng nh\u1eadp \u0111\u1ec3 g\u1eedi ph\u1ea3n h\u1ed3i."),u(!1),void R("error");
1if(!n.trim())return P("Vui l\xf2ng nh\u1eadp n\u1ed9i dung ph\u1ea3n h\u1ed3i."),u(!1),void R("error");const r={userId:t,userName:o||"N/A",userEmail:a||"N/A",content:n,rating:E>0?E:null,context:{appVersion:{NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_VERCEL_GIT_COMMIT_AUTHOR_NAME:"Phuoc",REACT_APP_VERCEL_GIT_PROVIDER:"github",REACT_APP_FIREBASE_PROJECT_ID:"autowork-98cc6",REACT_APP_ADMIN_PASSWORD:"2608",REACT_APP_VERCEL_PROJECT_ID:"prj_cJRt1H2WMz9JTkDrXIgdcxKjzTO1",REACT_APP_VERCEL_OBSERVABILITY_CLIENT_CONFIG:'{"analytics":{"scriptSrc":"a37598d78e6da9e5/script.js","viewEndpoint":"a37598d78e6da9e5/view","eventEndpoint":"a37598d78e6da9e5/event","sessionEndpoint":"a37598d78e6da9e5/session"},"speedInsights":{"scriptSrc":"0848e94a02467a3b/script.js","endpoint":"0848e94a02467a3b/vitals"}}',REACT_APP_VERCEL_GIT_PULL_REQUEST_ID:"",REACT_APP_TELEGRAM_API_URL:"https://api.telegram.org/bot7869904779:AAHZB4s8WqrZ8xEoommIY9qEaXScHTtfW9E/sendMessage",REACT_APP_S3_BUCKET_NAME:"autowork",REACT_APP_PIXEL_ID:"503139496118119",REACT_APP_VERCEL_BRANCH_URL:"fbcreatorapp-git-main-pipyls-projects.vercel.app",REACT_APP_TELEGRAM_CHAT_ID:"-1002498447797",REACT_APP_FIREBASE_DATABASE_URL:"https://autowork-98cc6-default-rtdb.asia-southeast1.firebasedatabase.app",REACT_APP_VERCEL_GIT_COMMIT_MESSAGE:"chore(release): sync fbaimkt v1.3.5 extension release artifacts",REACT_APP_AWS_REGION:"ap-southeast-1",REACT_APP_R2_PUBLIC_BASE_URL:"https://pub-67d3251dc6c847d1a3d7412e69d1ba2a.r2.dev",REACT_APP_FB_GRAPH_API_VERSION:"v25.0",REACT_APP_FIREBASE_MEASUREMENT_ID:"G-BBMBCBN6J6",REACT_APP_VERCEL_DEPLOYMENT_ID:"dpl_2iSJfAQtUefv9tbdo887rDzKwhC5",REACT_APP_AWS_ACCESS_KEY_ID:"AKIAU6ULZGUUDCF3HTH2",REACT_APP_VERCEL_GIT_REPO_SLUG:"fbcreatorapp",REACT_APP_API_URL:"https://api.autowork.com.vn",REACT_APP_VERCEL_TARGET_ENV:"production",REACT_APP_FIREBASE_STORAGE_BUCKET:"autowork-98cc6.firebasestorage.app",REACT_APP_VERCEL_GIT_COMMIT_SHA:"9f882363eb6a5b45b28c6c0da11db30ee956e4b4",REACT_APP_VERCEL_ENV:"production",REACT_APP_VERCEL_GIT_COMMIT_REF:"main",REACT_APP_FIREBASE_MESSAGING_SENDER_ID:"901149518694",REACT_APP_FIREBASE_AUTH_DOMAIN:"autowork-98cc6.firebaseapp.com",REACT_APP_VERCEL_URL:"fbcreatorapp-3p873z3pa-pipyls-projects.vercel.app",REACT_APP_AWS_SECRET_ACCESS_KEY:"fjXZcJvRcofxtF7UTvrir+OEkRbY4PdNX5aPIDdA",REACT_APP_VERCEL_PROJECT_PRODUCTION_URL:"autowork.com.vn",REACT_APP_FIREBASE_API_KEY:"AIzaSyCwywUjrepC_spHLA4h7VRQdyRWpJiiMxU",REACT_APP_SERPER_API_KEY:"2f5332c8b7c3a33af9b987e3f2624c3fcd2ff0f7",REACT_APP_VERCEL_GIT_PREVIOUS_SHA:"",REACT_APP_FB_CLIENT_ID:"503139496118119",REACT_APP_GEMINI_API_KEY:"",REACT_APP_VERCEL_GIT_REPO_ID:"902777647",REACT_APP_FIREBASE_APP_ID:"1:901149518694:web:ea722596e83ad4a3ac36a7",REACT_APP_FB_CLIENT_SECRET:"5f55255f687b00981f4db189bfab56ef",REACT_APP_VERCEL_GIT_COMMIT_AUTHOR_LOGIN:"PiPyL",REACT_APP_VERCEL_GIT_REPO_OWNER:"PiPyL"}.REACT_APP_VERSION||"N/A",userAgent:navigator.userAgent,timestamp:(0,s.O5)(),url:window.location.href}};try{const e=(0,s.ref)(i.db,"feedbacks");if(await(0,s.VC)(e,r),c.A.isConfigured()){const e=await c.A.sendFeedbackNotification({userId:t,userName:o||"N/A",userEmail:a||"N/A",content:n,rating:E});e.success||console.warn("\u26a0 Telegram notification failed:",e.error)}else console.warn("\u26a0 Telegram not configured, skipping notification");R("success")}catch(_){console.error("\u2717 Error submitting feedback:",_),P(_.message||"\u0110\xe3 x\u1ea3y ra l\u1ed7i khi g\u1eedi ph\u1ea3n h\u1ed3i. Vui l\xf2ng th\u1eed l\u1ea1i."),R("error")}finally{u(!1)}},style:C.form,children:[(0,_.jsx)("h2",{children:"G\u1eedi Ph\u1ea3n H\u1ed3i"}),"success"===p&&(0,_.jsx)("div",{style:(0,o.A)((0,o.A)({},C.statusMessage),C.successMessage),children:"C\u1ea3m \u01a1n b\u1ea1n \u0111\xe3 g\u1eedi ph\u1ea3n h\u1ed3i! AutoWork lu\xf4n ghi nh\u1eadn m\u1ecdi \xfd ki\u1ebfn \u0111\xf3ng g\xf3p v\xe0 s\u1ebd n\u1ed7 l\u1ef1c c\u1ea3i ti\u1ebfn s\u1ea3n ph\u1ea9m \u0111\u1ec3 mang l\u1ea1i tr\u1ea3i nghi\u1ec7m ng\xe0y c\xe0ng t\u1ed1t h\u01a1n."}),"error"===p&&(0,_.jsxs)("div",{style:(0,o.A)((0,o.A)({},C.statusMessage),C.errorMessage),children:["L\u1ed7i: ",g]}),"success"!==p&&(0,_.jsxs)(_.Fragment,{children:[(0,_.jsxs)("div",{style:C.ratingContainer,children:[(0,_.jsx)("label",{style:(0,o.A)((0,o.A)({},C.label),{},{marginBottom:0}),children:"\u0110\xe1nh gi\xe1 c\u1ee7a b\u1ea1n:"}),(0,_.jsx)("div",{children:[1,2,3,4,5].map((e=>(0,_.jsx)("button",{type:"button",style:(0,o.A)((0,o.A)({},C.starButton),e<=E?C.starButtonActive:{}),onClick:()=>d(e),disabled:l,"aria-label":"Rate ".concat(e," out of 5 stars"),children:(0,_.jsx)(r.usP,{fill:e<=E?"currentColor":"none"})},e)))})]}),(0,_.jsx)("label",{htmlFor:"content",style:C.label,children:"N\u1ed9i dung ph\u1ea3n h\u1ed3i:"}),(0,_.jsx)("textarea",{id:"content",value:n,onChange:e=>A(e.target.value),style:C.textarea,placeholder:"Nh\u1eadp g\xf3p \xfd, b\xe1o c\xe1o l\u1ed7i (k\xe8m c\xe1c b\u01b0\u1edbc t\xe1i hi\u1ec7n n\u1ebfu c\xf3), ho\u1eb7c \u0111\u1ec1 xu\u1ea5t t\xednh n\u0103ng m\u1edbi...",disabled:l,required:!0}),(0,_.jsxs)("div",{children:[(0,_.jsx)("button",{type:"submit",disabled:l,style:l?(0,o.A)((0,o.A)({},C.button),C.buttonDisabled):C.button,children:l?"\u0110ang g\u1eedi...":"G\u1eedi Ph\u1ea3n H\u1ed3i"}),"function"===typeof t&&(0,_.jsx)("button",{type:"button",onClick:t,style:(0,o.A)((0,o.A)({},C.button),C.closeButton),disabled:l,children:"\u0110\xf3ng"})]})]}),"success"===p&&"function"===typeof t&&(0,_.jsx)("button",{type:"button",onClick:t,style:(0,o.A)((0,o.A)((0,o.A)({},C.button),C.closeButton),{}
1,{marginTop:"15px"}),children:"\u0110\xf3ng"})]})}}}]);
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.