1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[16694],{5653:function(e,t,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/addVersion",function(){return a(29985)}])},72918:function(e,t,a){"use strict";a.d(t,{Z:function(){return l}});let l=(0,a(51601).Z)("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]])},71994:function(e,t,a){"use strict";a.d(t,{Z:function(){return l}});let l=(0,a(51601).Z)("CircleUserRound",[["path",{d:"M18 20a6 6 0 0 0-12 0",key:"1qehca"}],["circle",{cx:"12",cy:"10",r:"4",key:"1h16sb"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]])},99518:function(e,t,a){"use strict";a.d(t,{Z:function(){return l}});let l=(0,a(51601).Z)("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]])},19320:function(e,t,a){"use strict";a.d(t,{Z:function(){return l}});let l=(0,a(51601).Z)("LogIn",[["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}],["polyline",{points:"10 17 15 12 10 7",key:"1ail0h"}],["line",{x1:"15",x2:"3",y1:"12",y2:"12",key:"v6grx8"}]])},71578:function(e,t,a){"use strict";a.d(t,{Z:function(){return l}});let l=(0,a(51601).Z)("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]])},14386:function(e,t,a){"use strict";a.d(t,{Z:function(){return l}});let l=(0,a(51601).Z)("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]])},60081:function(e,t,a){"use strict";a.d(t,{Z:function(){return l}});let l=(0,a(51601).Z)("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]])},29985:function(e,t,a){"use strict";a.r(t);var l=a(52676),r=a(75271),s=a(40768),i=a(16422),o=a(51929),n=a(95196),d=a(39866),c=a(33471);let h=e=>e.replace(/[^a-zA-Z0-9._-]+/g,"-").replace(/^-+|-+$/g,"")||"release",x=e=>e.replace(/[^a-zA-Z0-9._-]+/g,"-").replace(/-+/g,"-"),u=["fitWithPulse","pulseCheck","macra"],m=async e=>{var t;let a=new Map;for(let t of c.KA[e].versionCollections)try{(await (0,s.getDocs)((0,s.collection)(o.db,t))).docs.forEach(e=>{let t=(0,c.y3)(e.id,e.data()),l=a.get(t.version);if(!l){a.set(t.version,t);return}let r=l.media.length+l.changeNotes.length;t.media.length+t.changeNotes.length>=r&&a.set(t.version,t)})}catch(e){console.error("Error fetching versions from '".concat(t,"'"),e)}return null!==(t=Array.from(a.values()).sort((e,t)=>{let a=(0,c.oR)(t.version,e.version);return 0!==a?a:(0,c.Ng)(t.buildNumber,e.buildNumber)})[0])&&void 0!==t?t:null},p=async e=>{var t;let a=await (0,s.getDoc)((0,s.doc)(o.db,...c.KA[e].updateModalConfigPath));return!a.exists()||null===(t=a.data().isEnabled)||void 0===t||t};t.default=()=>{var e,t;let[a,g]=(0,r.useState)("fitWithPulse"),[b,f]=(0,r.useState)(""),[v,y]=(0,r.useState)(""),[j,w]=(0,r.useState)([""]),[N,k]=(0,r.useState)(!1),[C,L]=(0,r.useState)(null),[U,R]=(0,r.useState)([]),[S,A]=(0,r.useState)(!1),[M,z]=(0,r.useState)(""),[Z,P]=(0,r.useState)(""),[V,O]=(0,r.useState)(""),[_,E]=(0,r.useState)(null),[T,K]=(0,r.useState)(!1),[W,B]=(0,r.useState)(!0),[D,q]=(0,r.useState)(!1),[F,H]=(0,r.useState)(""),I="fitWithPulse"===a;(0,r.useEffect)(()=>{(async()=>{try{K(!0);let[e,t]=await Promise.all([m(a),p(a)]);E(e),B(t)}catch(e){console.error("Error fetching latest version",e)}finally{K(!1)}})()},[a,Z]);let X=()=>{C&&URL.revokeObjectURL(C.previewUrl),U.forEach(e=>URL.revokeObjectURL(e.previewUrl)),L(null),R([])},G=(e,t)=>{w(a=>a.map((a,l)=>l===e?t:a))},Q=e=>{w(t=>t.filter((t,a)=>a!==e))},$=e=>{R(t=>{let a=t.find(t=>t.id===e);return a&&URL.revokeObjectURL(a.previewUrl),t.filter(t=>t.id!==e)})},J=async e=>{let t=h(e),l=[],r=c.KA[a].storageRoot;if(C){z("Uploading update video...");let a="".concat(r,"/").concat(t,"/video/").concat(Date.now(),"-").concat(x(C.file.name)),s=await i.firebaseStorageService.uploadFileToStorage(C.file,a);l.push({id:"video-".concat(e),type:"video",url:s.downloadURL,storagePath:a,fileName:C.file.name,mimeType:C.file.type})}for(let[e,a]of U.entries()){z("Uploading image ".concat(e+1," of ").concat(U.length,"..."));let s="".concat(r,"/").concat(t,"/images/").concat(Date.now(),"-").concat(e,"-").concat(x(a.file.name)),o=await i.firebaseStorageService.uploadFileToStorage(a.file,s);l.push({id:a.id,type:"image",url:o.downloadURL,storagePath:s,fileName:a.file.name,mimeType:a.file.type})}return l},Y=async e=>{e.preventDefault(),A(!0),z("Saving release..."),P(""),O("");
1let t=b.trim(),l=v.trim(),r=j.map(e=>e.trim()).filter(e=>e.length>0);if(!t||0===r.length||I&&!l){O(I?"Version, build number, and at least one change note are required.":"Version and at least one change note are required."),A(!1),z("");return}try{let e=await J(t);z("Writing release notes..."),await n.Q.addVersion(a,t,l||void 0,r,N,e),P("Version added successfully!"),f(""),y(""),w([""]),k(!1),X()}catch(e){O((null==e?void 0:e.message)||"Failed to add version.")}finally{A(!1),z("")}},ee=null!==(e=null==_?void 0:_.media.filter(e=>"video"===e.type).length)&&void 0!==e?e:0,et=null!==(t=null==_?void 0:_.media.filter(e=>"image"===e.type).length)&&void 0!==t?t:0,ea=async()=>{let e=!W;q(!0),H("");try{await (0,s.setDoc)((0,s.doc)(o.db,...c.KA[a].updateModalConfigPath),{isEnabled:e,updatedAt:(0,s.serverTimestamp)()},{merge:!0}),B(e),H(e?"Update modal is enabled across the app.":"Update modal is disabled across the app.")}catch(e){console.error("Error updating app update modal config",e),H("Could not update the global modal setting. Please try again.")}finally{q(!1)}};return(0,l.jsx)(d.Z,{children:(0,l.jsx)("div",{className:"min-h-screen bg-[#111417] text-white py-10 px-4",children:(0,l.jsxs)("div",{className:"max-w-3xl mx-auto",children:[(0,l.jsxs)("h1",{className:"text-2xl font-bold mb-8 flex items-center",children:[(0,l.jsx)("span",{className:"text-[#d7ff00] mr-2",children:(0,l.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:"w-7 h-7",children:[(0,l.jsx)("path",{d:"M9.75 6.75h4.5a.75.75 0 0 1 .75.75v11.25a.75.75 0 0 1-.75.75h-4.5a.75.75 0 0 1-.75-.75V7.5a.75.75 0 0 1 .75-.75Z"}),(0,l.jsx)("path",{d:"M6 8.25h1.5a.75.75 0 0 1 .75.75v9.75a.75.75 0 0 1-.75.75H6a.75.75 0 0 1-.75-.75V9a.75.75 0 0 1 .75-.75Z"}),(0,l.jsx)("path",{d:"M16.5 8.25H18a.75.75 0 0 1 .75.75v9.75a.75.75 0 0 1-.75.75h-1.5a.75.75 0 0 1-.75-.75V9a.75.75 0 0 1 .75-.75Z"})]})}),"Publish App Release"]}),(0,l.jsx)("div",{className:"mb-6 flex flex-wrap gap-3",children:u.map(e=>{let t=c.KA[e],r=e===a;return(0,l.jsxs)("button",{type:"button",onClick:()=>{g(e),P(""),O(""),H(""),E(null),X(),f(""),y(""),w([""]),k(!1)},className:"rounded-xl border px-4 py-3 text-left transition ".concat(r?"border-[#d7ff00] bg-[#d7ff00]/10 text-white":"border-zinc-700 bg-[#1a1e24] text-zinc-300 hover:border-zinc-500 hover:text-white"),children:[(0,l.jsx)("div",{className:"text-sm font-semibold",children:t.label}),(0,l.jsx)("div",{className:"text-xs text-zinc-400",children:"fitWithPulse"===e?"Legacy Fit With Pulse live release feed":"pulseCheck"===e?"PulseCheck live release feed":"Macra live release feed"})]},e)})}),(0,l.jsxs)("div",{className:"relative bg-[#1a1e24] rounded-xl p-6 mb-6 shadow-xl overflow-hidden",children:[(0,l.jsx)("div",{className:"absolute top-0 left-0 right-0 h-[2px] bg-gradient-to-r from-amber-500 via-orange-500 to-red-500"}),(0,l.jsx)("div",{className:"absolute top-0 left-0 bottom-0 w-[2px] bg-gradient-to-b from-amber-500 via-orange-500 to-red-500"}),(0,l.jsxs)("div",{className:"flex items-start gap-3",children:[(0,l.jsx)("div",{className:"mt-0.5 rounded-full bg-amber-500/15 p-2 text-amber-300",children:(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:(0,l.jsx)("path",{fillRule:"evenodd",d:"M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.981-1.742 2.981H4.42c-1.53 0-2.492-1.647-1.743-2.98l5.58-9.921ZM11 13a1 1 0 10-2 0 1 1 0 002 0Zm-1-6a1 1 0 00-.993.883L9 8v3a1 1 0 001.993.117L11 11V8a1 1 0 00-1-1Z",clipRule:"evenodd"})})}),(0,l.jsxs)("div",{children:[(0,l.jsx)("h2",{className:"text-lg font-semibold text-white",children:"Publish Timing Guardrail"}),(0,l.jsx)("p",{className:"text-sm text-gray-300 mt-1",children:"This page controls the live in-app update feed and modal. It does not change the Xcode project build for you."}),(0,l.jsx)("p",{className:"text-sm text-gray-400 mt-3",children:"Only publish a release here after the matching App Store or TestFlight build is approved, processed, and actually available to install."})]})]})]}),(0,l.jsxs)("div",{className:"relative bg-[#1a1e24] rounded-xl p-6 mb-6 shadow-xl overflow-hidden",children:[(0,l.jsx)("div",{className:"absolute top-0 left-0 right-0 h-[2px] bg-gradient-to-r from-orange-500 via-red-500 to-pink-500"}),(0,l.jsx)("div",{className:"absolute top-0 left-0 bottom-0 w-[2px] bg-gradient-to-b from-orange-500 via-red-500 to-pink-500"}),(0,l.jsxs)("div",{className:"flex flex-col gap-4 lg:flex-row lg:items-center lg:justify-between",children:[(0,l.jsxs)("div",{children:[(0,l.jsxs)("h2",{className:"text-lg font-semibold text-white",children:[c.KA[a].shortL
1abel," Live Update Modal Switch"]}),(0,l.jsxs)("p",{className:"text-sm text-gray-400 mt-1",children:["Use this failsafe to hide the ",c.KA[a].shortLabel," update modal everywhere if a release note or media payload malfunctions."]})]}),(0,l.jsx)("button",{type:"button",onClick:ea,disabled:D,className:"min-w-[200px] rounded-lg px-4 py-3 font-semibold transition ".concat(W?"bg-[#d7ff00] text-black hover:bg-[#c3eb00]":"bg-red-900/40 text-red-200 border border-red-700 hover:bg-red-900/60"," disabled:opacity-50"),children:D?"Saving...":W?"Disable Update Modal":"Enable Update Modal"})]}),(0,l.jsxs)("div",{className:"mt-4 flex flex-wrap items-center gap-3 text-sm",children:[(0,l.jsx)("span",{className:"px-3 py-1 rounded-full border ".concat(W?"bg-emerald-900/30 text-emerald-200 border-emerald-700":"bg-red-900/30 text-red-200 border-red-700"),children:W?"Currently enabled":"Currently disabled"}),F&&(0,l.jsx)("span",{className:"text-gray-300",children:F})]})]}),(0,l.jsxs)("div",{className:"relative bg-[#1a1e24] rounded-xl p-6 mb-6 shadow-xl overflow-hidden",children:[(0,l.jsx)("div",{className:"absolute top-0 left-0 right-0 h-[2px] bg-gradient-to-r from-teal-500 via-blue-500 to-purple-500"}),(0,l.jsx)("div",{className:"absolute top-0 right-0 bottom-0 w-[2px] bg-gradient-to-b from-purple-500 via-blue-500 to-teal-500"}),(0,l.jsxs)("div",{className:"flex justify-between items-center mb-3",children:[(0,l.jsxs)("h2",{className:"text-lg font-semibold text-white",children:[c.KA[a].shortLabel," Live Published Release"]}),(null==_?void 0:_.isCriticalUpdate)&&(0,l.jsx)("span",{className:"px-2 py-1 bg-red-900/30 text-red-400 rounded-full text-xs font-medium border border-red-900",children:"Critical"})]}),T?(0,l.jsx)("div",{className:"py-4 flex justify-center",children:(0,l.jsxs)("div",{className:"animate-pulse flex space-x-4",children:[(0,l.jsx)("div",{className:"h-3 w-3 bg-[#d7ff00] rounded-full"}),(0,l.jsx)("div",{className:"h-3 w-3 bg-[#d7ff00] rounded-full"}),(0,l.jsx)("div",{className:"h-3 w-3 bg-[#d7ff00] rounded-full"})]})}):_?(0,l.jsxs)("div",{className:"space-y-4",children:[(0,l.jsxs)("div",{className:"flex items-center gap-3",children:[(0,l.jsx)("span",{className:"text-xl font-bold text-[#d7ff00]",children:_.version}),_.buildNumber&&(0,l.jsxs)("span",{className:"px-2 py-1 rounded-full bg-zinc-900/60 border border-zinc-700 text-zinc-200 text-xs",children:["Build ",_.buildNumber]}),(ee>0||et>0)&&(0,l.jsxs)("div",{className:"flex flex-wrap gap-2 text-xs",children:[ee>0&&(0,l.jsxs)("span",{className:"px-2 py-1 rounded-full bg-blue-900/30 border border-blue-700 text-blue-200",children:[ee," video"]}),et>0&&(0,l.jsxs)("span",{className:"px-2 py-1 rounded-full bg-emerald-900/30 border border-emerald-700 text-emerald-200",children:[et," image",et>1?"s":""]})]})]}),(0,l.jsx)("div",{className:"space-y-2",children:_.changeNotes.map((e,t)=>(0,l.jsx)("div",{className:"text-sm text-gray-300 pl-3 border-l-2 border-blue-500",children:e},t))})]}):(0,l.jsx)("div",{className:"text-gray-400 text-sm",children:"No versions available"})]}),(0,l.jsxs)("div",{className:"relative bg-[#1a1e24] rounded-xl p-6 mb-6 shadow-xl overflow-hidden",children:[(0,l.jsx)("div",{className:"absolute top-0 left-0 right-0 h-[2px] bg-gradient-to-r from-blue-500 via-purple-500 to-[#d7ff00]"}),(0,l.jsx)("div",{className:"absolute top-0 left-0 bottom-0 w-[2px] bg-gradient-to-b from-blue-500 via-purple-500 to-[#d7ff00]"}),(0,l.jsxs)("div",{className:"text-sm text-gray-400 mb-4",children:["Publish the live release details for ",c.KA[a].label,". This should match the already-approved App Store or TestFlight build number and any optional in-app update media you want to show."]}),(0,l.jsxs)("form",{onSubmit:Y,className:"space-y-6",children:[(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-4 lg:grid-cols-[minmax(0,1fr)_220px]",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{className:"block text-gray-300 mb-2 text-sm font-medium",children:"Version Number"}),(0,l.jsxs)("div",{className:"flex space-x-2",children:[(0,l.jsx)("input",{type:"text",className:"w-full bg-[#262a30] border border-gray-700 rounded-lg px-4 py-3 focus:outline-none focus:ring-2 focus:ring-[#d7ff00] transition text-white placeholder-gray-500",value:b,onChange:e=>f(e.target.value),placeholder:"fitWithPulse"===a?"e.g. 5.70":"pulseCheck"===a?"e.g. 2.11":"e.g. 1.2",required:!0}),(0,l.jsxs)("button",{type:"button",onClick:()=>
1{if(!_)return;let e=_.version.split(".");if(0===e.length)return;let t=e[e.length-1],a=t.length,l=t.startsWith("0")&&a>1,r=parseInt(t,10);if(Number.isNaN(r))return;let s=r+1;e[e.length-1]=l?s.toString().padStart(a,"0"):s.toString(),f(e.join(".")),_.changeNotes.length>0&&w([..._.changeNotes])},disabled:!_,className:"px-4 py-2 bg-[#262a30] hover:bg-[#2a2f36] border border-gray-700 text-gray-300 rounded-lg transition disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center group",title:"Auto-increment version from latest",children:[(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5 text-[#d7ff00]",viewBox:"0 0 20 20",fill:"currentColor",children:(0,l.jsx)("path",{fillRule:"evenodd",d:"M10 5a1 1 0 011 1v3h3a1 1 0 110 2h-3v3a1 1 0 11-2 0v-3H6a1 1 0 110-2h3V6a1 1 0 011-1z",clipRule:"evenodd"})}),(0,l.jsx)("span",{className:"sr-only group-hover:not-sr-only ml-1 text-xs whitespace-nowrap",children:"Auto-increment"})]})]})]}),(0,l.jsxs)("div",{children:[(0,l.jsxs)("label",{className:"block text-gray-300 mb-2 text-sm font-medium",children:["Build Number",I?"":" (Optional)"]}),(0,l.jsxs)("div",{className:"flex space-x-2",children:[(0,l.jsx)("input",{type:"text",inputMode:"numeric",className:"w-full bg-[#262a30] border border-gray-700 rounded-lg px-4 py-3 focus:outline-none focus:ring-2 focus:ring-[#d7ff00] transition text-white placeholder-gray-500",value:v,onChange:e=>y(e.target.value),placeholder:I?"e.g. 2":"Optional",required:I}),(0,l.jsxs)("button",{type:"button",onClick:()=>{y((0,c.cA)(null==_?void 0:_.buildNumber))},className:"px-4 py-2 bg-[#262a30] hover:bg-[#2a2f36] border border-gray-700 text-gray-300 rounded-lg transition flex items-center justify-center group",title:"Auto-increment build number from latest",children:[(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5 text-[#d7ff00]",viewBox:"0 0 20 20",fill:"currentColor",children:(0,l.jsx)("path",{fillRule:"evenodd",d:"M10 5a1 1 0 011 1v3h3a1 1 0 110 2h-3v3a1 1 0 11-2 0v-3H6a1 1 0 110-2h3V6a1 1 0 011-1z",clipRule:"evenodd"})}),(0,l.jsx)("span",{className:"sr-only group-hover:not-sr-only ml-1 text-xs whitespace-nowrap",children:"Next build"})]})]})]})]}),(0,l.jsxs)("div",{className:"rounded-xl border border-zinc-700 bg-black/20 px-4 py-3 text-sm text-zinc-300",children:[(0,l.jsx)("span",{className:"font-semibold text-white",children:"Release rule:"})," ",I?"upload and wait for Apple first, then publish the matching version/build here to turn on the in-app release messaging.":"upload and wait for Apple first, then publish the matching version here. A build number is optional for ".concat(c.KA[a].shortLabel,".")]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{className:"block text-gray-300 mb-2 text-sm font-medium",children:"Change Notes"}),(0,l.jsxs)("div",{className:"space-y-3",children:[j.map((e,t)=>(0,l.jsxs)("div",{className:"relative flex items-center gap-2 bg-[#262a30] rounded-lg p-3 transition-all hover:bg-[#2a2f36] overflow-hidden",children:[(0,l.jsx)("div",{className:"absolute left-0 top-0 bottom-0 w-[2px] bg-gradient-to-b from-blue-400 to-teal-400"}),(0,l.jsx)("input",{type:"text",className:"flex-1 bg-transparent border-none focus:ring-0 text-white placeholder-gray-500 pl-2",value:e,onChange:e=>G(t,e.target.value),placeholder:"Change note #".concat(t+1),required:!0}),j.length>1&&(0,l.jsx)("button",{type:"button",onClick:()=>Q(t),className:"text-gray-400 hover:text-red-400 transition-colors","aria-label":"Remove note",children:(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,l.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]},t)),(0,l.jsxs)("button",{type:"button",onClick:()=>{w(e=>[...e,""])},className:"flex items-center gap-2 w-full justify-center py-3 rounded-lg border border-gray-700 bg-[#262a30] hover:bg-[#2a2f36] transition group relative overflow-hidden",children:[(0,l.jsx)("div",{className:"absolute bottom-0 left-0 right-0 h-[2px] bg-gradient-to-r from-blue-500 via-teal-500 to-[#d7ff00] transform translate-x-[-100%] group-hover:translate-x-0 transition-transform duration-300"}),(0,l.jsx)("span",{className:"text-[#d7ff00] group-hover:scale-110 transition-transform",children:(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,l.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"})})}),(0,l.jsx)("span",{className:"text-gray-300 group-hover:text-white transition-colors",children:"Add Note"})]})]})]}),(0,l.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:[(0,l.jsxs)("div",{className:"bg-[#262a30] rounded-xl p-4 border border-gray-700",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("h3",{className:"text-sm font-semibold text-white",children:"Update Video"}),(0,l.jsx)("p",{className:"text-xs text-gray-400",children:"Optional. If present, it will always appear first in the carousel."})]}),C&&(0,l.jsx)("button",{type:"button",onClick:()=>{C&&URL.revokeObjectURL(C.previewUrl),L(null)},className:"text-xs text-red-300 hover:text-red-200",children:"Remove"})]}),(0,l.jsxs)("label",{className:"block border border-dashed border-gray-600 rounded-lg p-4 text-center cursor-pointer hover:border-[#d7ff00] transition",children:[(0,l.jsx)("input",{type:"file",accept:"video/*",className:"hidden",onChange:e=>{var t;let a=null===(t=e.target.files)||void 0===t?void 0:t[0];if(e.target.value="",!a)return;C&&URL.revokeObjectURL(C.previewUrl);let l=URL.createObjectURL(a);L({file:a,previewUrl:l})}}),(0,l.jsx)("span",{className:"text-sm text-gray-300",children:C?"Replace video":"Upload video"})]}),C&&(0,l.jsxs)("div",{className:"mt-4 space-y-2",children:[(0,l.jsx)("video",{src:C.previewUrl,controls:!0,className:"w-full rounded-lg bg-black max-h-64"}),(0,l.jsx)("p",{className:"text-xs text-gray-400 break-all",children:C.file.name})]})]}),(0,l.jsxs)("div",{className:"bg-[#262a30] rounded-xl p-4 border border-gray-700",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("h3",{className:"text-sm font-semibold text-white",children:"Carousel Images"}),(0,l.jsx)("p",{className:"text-xs text-gray-400",children:"Optional. Add one or more screenshots for the update carousel."})]}),U.length>0&&(0,l.jsxs)("span",{className:"text-xs text-emerald-300",children:[U.length," selected"]})]}),(0,l.jsxs)("label",{className:"block border border-dashed border-gray-600 rounded-lg p-4 text-center cursor-pointer hover:border-[#d7ff00] transition",children:[(0,l.jsx)("input",{type:"file",accept:"image/*",multiple:!0,className:"hidden",onChange:e=>{var t;let a=Array.from(null!==(t=e.target.files)&&void 0!==t?t:[]);e.target.value="",0!==a.length&&R(e=>[...e,...a.map((e,t)=>({id:"".concat(Date.now(),"-").concat(t,"-").concat(e.name),file:e,previewUrl:URL.createObjectURL(e)}))])}}),(0,l.jsx)("span",{className:"text-sm text-gray-300",children:"Upload images"})]}),U.length>0&&(0,l.jsx)("div",{className:"mt-4 grid grid-cols-2 gap-3",children:U.map(e=>(0,l.jsxs)("div",{className:"relative group rounded-lg overflow-hidden border border-gray-700 bg-[#1a1e24]",children:[(0,l.jsx)("img",{src:e.previewUrl,alt:e.file.name,className:"w-full h-28 object-cover"}),(0,l.jsx)("button",{type:"button",onClick:()=>$(e.id),className:"absolute top-2 right-2 bg-black/70 text-white rounded-full w-7 h-7 text-sm opacity-0 group-hover:opacity-100 transition","aria-label":"Remove ".concat(e.file.name),children:"\xd7"}),(0,l.jsx)("div",{className:"p-2 text-[11px] text-gray-400 truncate",children:e.file.name})]},e.id))})]})]}),(0,l.jsxs)("div",{className:"relative flex items-center bg-[#262a30] p-4 rounded-lg overflow-hidden",children:[(0,l.jsx)("div",{className:"absolute right-0 top-0 bottom-0 w-[2px] bg-gradient-to-b from-orange-500 to-red-500"}),(0,l.jsx)("div",{className:"relative flex items-center h-5",children:(0,l.jsx)("input",{type:"checkbox",id:"critical-update",checked:N,onChange:e=>k(e.target.checked),className:"h-5 w-5 rounded border-gray-600 text-[#d7ff00] focus:ring-[#d7ff00] bg-[#1a1e24]"})}),(0,l.jsxs)("div",{className:"ml-3 text-sm",children:[(0,l.jsx)("label",{htmlFor:"critical-update",className:"font-medium text-gray-300",children:"Is Critical Update?"}),(0,l.jsx)("p",{className:"text-gray-500 text-xs mt-1",children:"fitWithPulse"===a?"Mark this only when the new build is already live and
1you want the app to push people to install it.":"Mark this only when the new build is already live. ".concat(c.KA[a].shortLabel," iOS will gate the app and keep people on the update screen until they install it.")})]}),N&&(0,l.jsx)("span",{className:"ml-auto px-2 py-1 bg-red-900/30 text-red-400 rounded-full text-xs font-medium border border-red-900",children:"Critical"})]}),(0,l.jsxs)("button",{type:"submit",className:"relative w-full bg-[#d7ff00] text-black px-6 py-4 rounded-lg font-bold text-lg hover:bg-[#c3eb00] transition disabled:opacity-50 disabled:bg-gray-700 disabled:text-gray-400 overflow-hidden group",disabled:S,children:[(0,l.jsx)("div",{className:"absolute inset-0 opacity-0 group-hover:opacity-10 bg-gradient-to-r from-[#40c9ff] to-[#e81cff] transition-opacity"}),(0,l.jsx)("span",{className:"relative z-10",children:S?M||"Publishing...":"Publish Release"}),(0,l.jsx)("span",{className:"absolute bottom-0 left-0 w-full h-1 bg-white/20 transform scale-x-0 group-hover:scale-x-100 transition-transform origin-left"})]}),Z&&(0,l.jsxs)("div",{className:"flex items-center gap-2 text-green-400 mt-4 p-3 bg-green-900/20 rounded-lg relative overflow-hidden",children:[(0,l.jsx)("div",{className:"absolute top-0 left-0 right-0 h-[1px] bg-gradient-to-r from-green-500 to-emerald-400"}),(0,l.jsx)("div",{className:"absolute bottom-0 left-0 right-0 h-[1px] bg-gradient-to-r from-green-500 to-emerald-400"}),(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:(0,l.jsx)("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})}),(0,l.jsx)("span",{children:Z})]}),V&&(0,l.jsxs)("div",{className:"flex items-center gap-2 text-red-400 mt-4 p-3 bg-red-900/20 rounded-lg relative overflow-hidden",children:[(0,l.jsx)("div",{className:"absolute top-0 left-0 right-0 h-[1px] bg-gradient-to-r from-red-500 to-orange-400"}),(0,l.jsx)("div",{className:"absolute bottom-0 left-0 right-0 h-[1px] bg-gradient-to-r from-red-500 to-orange-400"}),(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:(0,l.jsx)("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"})}),(0,l.jsx)("span",{children:V})]})]})]})]})})})}}},function(e){e.O(0,[31095,95196,39866,92888,49774,40179],function(){return e(e.s=5653)}),_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.