PageSourceSearch

https://atzuma.co.il/assets/ShareAndRedirectPage-BvtioSZY.js

js atzuma.co.il collected 2026-09-24 21:11:12 UTC 9,326 bytes, 6 lines download raw bytes

1import{j as e}from"./index-BtgGoHYl.js";import{d as Y,r as i}from"./router-BXL9ASSk.js";import"./vendor-BNcAc9ko.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};s.SENTRY_RELEASE={id:"[email protected]"}}catch{}})();try{(function(){var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},l=new s.Error().stack;l&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[l]="cd22faf9-6c58-4321-8df3-61c587ff008c",s._sentryDebugIdIdentifier="sentry-dbid-cd22faf9-6c58-4321-8df3-61c587ff008c")})()}catch{}const V=({language:s,petitionSlug:l,petitionData:x,onNavigate:j,autoRedirectDelay:k=30,showTimer:u=!0,className:h=""})=>{const{slug:C}=Y(),p=C||l,[B,b]=i.useState(!x),[T,y]=i.useState(null),[o,R]=i.useState(x||null),[m,$]=i.useState(k),[_,E]=i.useState(!1),[d,I]=i.useState(new Set),[U,A]=i.useState(null),[P,M]=i.useState(null),[K,z]=i.useState(null),[Z,D]=i.useState(null);i.useEffect(()=>{try{const t=sessionStorage.getItem("ux_journey_experience");if(t){const n=JSON.parse(t);n.headline&&A(n.headline),n.subheadline&&M(n.subheadline),n.cta_primary_text&&z(n.cta_primary_text),n.experience_key&&D(n.experience_key),sessionStorage.removeItem("ux_journey_experience")}}catch{}},[]);const[W]=i.useState(()=>`sess_${Date.now()}_${Math.random().toString(36).substring(2,15)}`),S=i.useRef(Date.now()),N=s==="he";i.useEffect(()=>{!o&&p&&(async()=>{b(!0);try{R({petition_id:38,title:"Save the Environment",slug:p,current_signatures_count:1247,target_signatures:5e3,main_image_url:"/images/environment-petition.jpg",status:"active",category:{category_id:1,name:"Environment",name_i18n:{en:"Environment",he:"סביבה"}},creator_user_id:1,language_code:s,created_at:"2024-01-01T00:00:00Z",published_at:"2024-01-01T00:00:00Z"}),y(null)}catch(n){console.error("Failed to load petition:",n),y("Failed to load petition data")}finally{b(!1)}})()},[o,p,s]),i.useEffect(()=>{if(!u||m<=0)return;const t=setInterval(()=>{$(n=>n<=1?(f(),0):n-1)},1e3);return()=>clearInterval(t)},[m,u]),i.useEffect(()=>{o&&g("page_view",{event_type:"free_share_page_view"})},[o]);const g=async(t,n={})=>{try{const c={petition_id:o?.petition_id,session_id:W,event_type:t,time_on_page:Math.floor((Date.now()-S.current)/1e3),...n};console.log("📊 Recording share analytics:",c)}catch(c){console.warn("Share analytics recording failed:",c)}},w=()=>({en:{title:"Thank You for Your Support!",subtitle:"Help us reach even more people by sharing this important petition",petitionTitle:"Petition: {title}",currentProgress:"{current} of {target} signatures",shareMessage:"Choose how you'd like to share:",shareButtons:{whatsapp:"Share on WhatsApp",facebook:"Share on Facebook",twitter:"Share on Twitter",email:"Share via Email"},redirectMessage:"Returning to petition in {time} seconds...",returnNow:"Return to Petition Now",shareSuccess:"Thanks for sharing on {platform}!",shareAnother:"Share on another platform for even more impact!",loading:"Loading petition details...",error:"Unable to load petition details"},he:{title:"תודה על התמיכה שלך!",subtitle:"עזור לנו להגיע לעוד אנשים על ידי שיתוף העצומה החשובה הזו",petitionTitle:"עצומה: {title}",currentProgress:"{current} מתוך {target} חתימות",shareMessage:"בחר איך תרצה לשתף:",shareButtons:{whatsapp:"שתף בוואטסאפ",facebook:"שתף בפייסבוק",twitter:"שתף בטוויטר",email:"שתף באימייל"},redirectMessage:"חוזר לעצומה בעוד {time} שניות...",returnNow:"חזור לעצומה עכשיו",shareSuccess:"תודה על השיתוף ב{platform}!",shareAnother:"שתף בפלטפורמה נוספת להשפעה גדולה יותר!",loading:"טוען פרטי עצומה...",error:"לא ניתן לטעון פרטי עצומה"}}),a=w()[s]||w().en,F=async t=>{if(!o)return;g("share_click",{event_type:"free_share_click",platform:t,petition_id:o.petition_id});const c=`${`${window.location.origin}/petition/${o.slug}`}?utm_source=${t}&utm_medium=social&utm_campaign=free_share`,v={whatsapp:`https://wa.me/?text=${encodeURIComponent(`${o.title} - ${c}`)}`,facebook:`https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(c)}`,twitter:`https://twitter.com/intent/tweet?text=${encodeURIComponent(`Support this important petition: ${o.title}`)}&url=${encodeURIComponent(c)}`,email:`mailto:?subject=${encodeURIComponent(`Important petition: ${o.title}`)}&body=${encodeURIComponent(`I thought you might be interested in this petition:
2
3${o.title}
4
5${c}`)}`}[t];v&&(window.open(v,"_blank","noopener,noreferrer"),E(!0),I(L=>new Set([...L,t])))},f=()=>{g("return_to_petition",{event_type:"return_from_share",time_on_page:Math.floor((Date.now()-S.current)/1e3),has_shared:_,shared_platforms:Array.from(d)}),o&&j(`/petition/${o.slug}`)},r={container:{minHeight:"100vh",backgroundColor:"#f8fafc",fontFamily:"'Inter', sans-serif",direction:N?"rtl":"ltr",padding:"2rem 1rem"},contentWrapper:{maxWidth:"600px",margin:"0 auto",backgroundColor:"white",borderRadius:"12px",padding:"2rem",boxShadow:"0 4px 20px rgba(0,0,0,0.1)"},header:{textAlign:"center",marginBottom:"2rem"},title:{fontSize:"2rem",fontWeight:"700",color:"#1f2937",marginBottom:"0.5rem"},subtitle:{fontSize:"1.1rem",color:"#6b7280",lineHeight:"1.6"},petitionCard:{border:"1px solid #e5e7eb",borderRadius:"8px",padding:"1.5rem",marginBottom:"2rem",backgroundColor:"#f9fafb"},petitionTitle:{fontSize:"1.3rem",fontWeight:"700",color:"#1f2937",marginBottom:"0.5rem"},progressText:{fontSize:"1rem",color:"#6b7280"},shareSection:{marginBottom:"2rem"},shareMessage:{fontSize:"1.1rem",fontWeight:"600",color:"#374151",marginBottom:"1rem",textAlign:"center"},shareButtons:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(200px, 1fr))",gap:"1rem",marginBottom:"1.5rem"},shareButton:(t,n)=>({padding:"1rem",backgroundColor:n?"#10B981":{whatsapp:{bg:"#25D366",hover:"#128C7E"},facebook:{bg:"#1877F2",hover:"#166FE5"},twitter:{bg:"#1DA1F2",hover:"#1991DB"},email:{bg:"#6B7280",hover:"#4B5563"}}[t].bg,color:"white",border:"none",borderRadius:"8px",fontSize:"1rem",fontWeight:"600",cursor:"pointer",transition:"all 0.2s",display:"flex",alignItems:"center",justifyContent:"center",gap:"0.5rem",transform:n?"scale(1.02)":"scale(1)",boxShadow:n?"0 4px 15px rgba(16, 185, 129, 0.3)":"0 2px 4px rgba(0,0,0,0.1)"}),successMessage:{backgroundColor:"#dcfce7",color:"#166534",padding:"1rem",borderRadius:"8px",textAlign:"center",marginBottom:"1rem",border:"1px solid #bbf7d0"},timerSection:{textAlign:"center",padding:"1.5rem",backgroundColor:"#f3f4f6",borderRadius:"8px",marginBottom:"1rem"},timerText:{fontSize:"1rem",color:"#6b7280",marginBottom:"1rem"},returnButton:{padding:"0.75rem 1.5rem",backgroundColor:"#dc2626",color:"white",border:"none",borderRadius:"8px",fontSize:"1rem",fontWeight:"600",cursor:"pointer",transition:"background-color 0.2s"},loadingContainer:{textAlign:"center",padding:"4rem 2rem",color:"#6b7280"},errorContainer:{textAlign:"center",padding:"4rem 2rem",color:"#dc2626"}},H=t=>({whatsapp:"📱",facebook:"📘",twitter:"🐦",email:"✉️"})[t];return B?e.jsx("div",{className:`share-redirect-page ${h}`,style:r.container,children:e.jsx("div",{style:r.contentWrapper,children:e.jsxs("div",{style:r.loadingContainer,children:[e.jsx("div",{style:{fontSize:"3rem",marginBottom:"1rem"},children:"⏳"}),e.jsx("h2",{children:a.loading})]})})}):T||!o?e.jsx("div",{className:`share-redirect-page ${h}`,style:r.container,children:e.jsx("div",{style:r.contentWrapper,children:e.jsxs("div",{style:r.errorContainer,children:[e.jsx("div",{style:{fontSize:"3rem",marginBottom:"1rem"},children:"❌"}),e.jsx("h2",{children:a.error}),e.jsx("button",{onClick:f,style:r.returnButton,children:a.returnNow})]})})}):e.jsx("div",{className:`share-redirect-page ${h}`,style:r.container,children:e.jsxs("div",{style:r.contentWrapper,children:[e.jsxs("div",{style:r.header,children:[e.jsx("h1",{style:r.t
5itle,children:U??a.title}),e.jsx("p",{style:r.subtitle,children:P??a.subtitle})]}),e.jsxs("div",{style:r.petitionCard,children:[e.jsx("h3",{style:r.petitionTitle,children:a.petitionTitle.replace("{title}",o.title)}),e.jsx("p",{style:r.progressText,children:a.currentProgress.replace("{current}",o.current_signatures_count.toLocaleString()).replace("{target}",o.target_signatures.toLocaleString())})]}),_&&e.jsx("div",{style:r.successMessage,children:d.size===1?e.jsx("p",{children:a.shareSuccess.replace("{platform}",Array.from(d)[0])}):e.jsx("p",{children:a.shareAnother})}),e.jsxs("div",{style:r.shareSection,children:[e.jsx("p",{style:r.shareMessage,children:a.shareMessage}),e.jsx("div",{style:r.shareButtons,children:["whatsapp","facebook","twitter","email"].map(t=>e.jsxs("button",{onClick:()=>F(t),style:r.shareButton(t,d.has(t)),children:[e.jsx("span",{children:H(t)}),e.jsx("span",{children:a.shareButtons[t]}),d.has(t)&&e.jsx("span",{children:"✅"})]},t))})]}),u&&e.jsxs("div",{style:r.timerSection,children:[e.jsx("p",{style:r.timerText,children:a.redirectMessage.replace("{time}",m.toString())}),e.jsx("button",{onClick:f,style:r.returnButton,children:a.returnNow})]})]})})};export{V as default};
6//# sourceMappingURL=ShareAndRedirectPage-BvtioSZY.js.map

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.