PageSourceSearch

https://www.jumpspree.com/social

html jumpspree.com collected 2026-09-24 11:02:45 UTC 1,184,463 bytes, 28,998 lines download raw bytes

1
2<!DOCTYPE html>
3<html lang="en">
4<head>
5<meta charset="UTF-8">
6<link rel="preconnect" href="https://code.jquery.com">
7<link rel="preconnect" href="https://cdn.jsdelivr.net">
8<link rel="preconnect" href="https://fonts.googleapis.com">
9<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
10<link rel="preconnect" href="https://cdnjs.cloudflare.com">
11<link rel="preconnect" href="https://kit.fontawesome.com">
12 <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> 
13<!--<meta name="viewport" content="width=device-width, initial-scale=1.0">-->
14
15
16<title>Jumpspree | Social Shopping Feed &amp; Creator Marketplace </title>
17<meta name="description" content="Join Jumpspree—the social shopping app where creators post, sell and earn. Discover unique products from real people and support small brands. Sign up now.">
18<meta name="keywords" content="social marketplace, creator marketplace, social shopping app, buy and sell app, shopping social network, sell online marketplace, shop and earn app, community commerce platform">
19
20<meta name="robots" content="index, follow">
21
22
23<link rel="icon" href="https://www.jumpspree.com/public/images/grad-logo.png?ver=1.027">
24<link rel="apple-touch-icon" href="https://www.jumpspree.com/public/images/jumpspree_preview_new.png">
25<link rel="preload" href="https://www.jumpspree.com/public/css/hgi-stroke-rounded.css" as="style" onload="this.onload=null;this.rel='stylesheet'">
26<noscript><link rel="stylesheet" href="https://www.jumpspree.com/public/css/hgi-stroke-rounded.css"></noscript>
27
28<meta name="apple-itunes-app" content="app-id=1558701442">
29
30<link rel="canonical" href="https://www.jumpspree.com/social">
31<link rel="preload" as="image" href="https://cubesnack-seller.s3.amazonaws.com/products/1109260229016298.jpg">
32<meta property="og:url" content="https://www.jumpspree.com/social">
33<meta property="og:title" content="Jumpspree | Social Shopping Feed &amp; Creator Marketplace ">
34<meta property="og:type" content="website">
35<meta property="og:description" content="Join Jumpspree—the social shopping app where creators post, sell and earn. Discover unique products from real people and support small brands. Sign up now.">
36<meta property="og:site_name" content="Jumpspree">
37<meta property="og:image" content="https://www.jumpspree.com/public/images/jumpspree_preview_new.png">
38<meta property="og:image:alt" content="Jumpspree">
39<meta property="og:image:width" content="512">
40<meta property="og:image:height" content="512">
41<meta name="twitter:title" content="Jumpspree | Social Shopping Feed &amp; Creator Marketplace ">
42<meta name="twitter:description" content="Join Jumpspree—the social shopping app where creators post, sell and earn. Discover unique products from real people and support small brands. Sign up now.">
43<meta name="twitter:url" content="https://www.jumpspree.com/social">
44<meta name="twitter:card" content="summary_large_image">
45<meta name="twitter:image" content="https://www.jumpspree.com/public/images/jumpspree_preview_new.png">
46<meta name="twitter:image:alt" content="Jumpspree">
47
48<script type="application/ld+json">
49{
50  "@context": "https://schema.org",
51  "@type": "Organization",
52  "name": "Jumpspree",
53  "url": "https://www.jumpspree.com",
54  "logo": "https://www.jumpspree.com/logo.png",
55  "sameAs": [
56    "https://www.facebook.com/jumpspree",
57    "https://www.instagram.com/jumpspree",
58    "https://www.linkedin.com/company/jumpspree"
59  ]
60}
61</script>
61
62
63<script type="application/ld+json">
64{
65  "@context": "https://schema.org",
66  "@type": "WebSite",
67  "url": "https://www.jumpspree.com",
68  "potentialAction": {
69    "@type": "SearchAction",
70    "target": "https://www.jumpspree.com/search?q={search_term_string}",
71    "query-input": "required name=search_term_string"
72  }
73}
74</script>
74
75
76
77
78<!--
78<script> (function(){ var s = document.createElement('script'); var h = document.querySelector('head') || document.body; s.src = 'https://acsbapp.com/apps/app/dist/js/app.js'; s.async = true; s.onload = function(){ acsbJS.init({ statementLink : '', footerHtml : '', hideMobile : false, hideTrigger : false, disableBgProcess : false, language : 'en', position : 'left', leadColor : '#6E12FF', triggerColor : '#6E12FF', triggerRadius : '50%', triggerPositionX : 'right', triggerPositionY : 'bottom', triggerIcon : 'people', triggerSize : 'small', triggerOffsetX : 20, triggerOffsetY : 20, mobile : { triggerSize : 'small', triggerPositionX : 'right', triggerPositionY : 'bottom', triggerOffsetX : 10, triggerOffsetY : 10, triggerRadius : '50%' } }); }; h.appendChild(s); })(); </script>
78-->
79
80<!--
81<script>
82(function(){
83  var s = document.createElement('script');
84  var h = document.querySelector('head') || document.body;
85  s.src = 'https://acsbapp.com/apps/app/dist/js/app.js';
86  s.async = true;
87  s.onload = function(){
88    acsbJS.init({
89      statementLink : '',
90      footerHtml : '',
91      hideMobile : false,
92      hideTrigger : false,
93      disableBgProcess : false,
94      language : 'en',
95      position : 'left',
96      leadColor : '#6E12FF',
97      triggerColor : '#6E12FF',
98      triggerRadius : '50%',
99      triggerPositionX : 'right',
100      triggerPositionY : 'bottom',
101      triggerIcon : 'people',
102      triggerSize : 'small',
103      triggerOffsetX : 20,
104      triggerOffsetY : 20,
105      mobile : {
106        triggerSize : 'small',
107        triggerPositionX : 'right', // Keep default
108        triggerPositionY : 'center',
109        triggerOffsetX : 10,
110        triggerOffsetY : 10,
111        triggerRadius : '50%'
112      }
113    });
114
115    // Wait for widget to render, then override styles
116    setTimeout(function(){
117      var style = document.createElement('style');
118      style.innerHTML = `
119        @media(max-width: 767px) {
120          .acsb-trigger {
121            left: 50% !important;
122            transform: translateX(-50%) !important;
123            right: auto !important;
124          }
125        }
126      `;
127      document.head.appendChild(style);
128    }, 1500); // Allow time for the trigger to appear
129  };
130  h.appendChild(s);
131})();
132</script>
132
133-->
134
135<!--
136<script>
137(function(){
138  var blockedPatterns = [
139    "/live-streaming",
140    "/start-streaming",
141    "/seller-pad/live-stream-start"
142  ];
143
144  var currentUrl = window.location.href;
145
146  var isBlocked = blockedPatterns.some(function(pattern) {
147    return currentUrl.includes(pattern);
148  });
149
150  if (isBlocked) {
151    return;
152  }
153
154  var s = document.createElement('script');
155  var h = document.querySelector('head') || document.body;
156  s.src = 'https://acsbapp.com/apps/app/dist/js/app.js';
157  s.async = true;
158  s.onload = function(){
159    acsbJS.init({
160      statementLink : '',
161      footerHtml : '',
162      hideMobile : false,
163      hideTrigger : false,
164      disableBgProcess : false,
165      language : 'en',
166      position : 'left',
167      leadColor : '#6E12FF',
168      triggerColor : '#6E12FF',
169      triggerRadius : '50%',
170      triggerPositionX : 'right',
171      triggerPositionY : 'bottom',
172      triggerIcon : 'people',
173      triggerSize : 'small',
174      triggerOffsetX : 20,
175      triggerOffsetY : 20,
176      mobile : {
177        triggerSize : 'small',
178        triggerPositionX : 'right',
179        triggerPositionY : 'center',
180        triggerOffsetX : 10,
181        triggerOffsetY : 10,
182        triggerRadius : '50%'
183      }
184    });
185
186    setTimeout(function(){
187      var style = document.createElement('style');
188      style.innerHTML = `
189        @media(max-width: 767px) {
190          .acsb-trigger {
191            left: 50% !important;
192            transform: translateX(-50%) !important;
193            right: auto !important;
194          }
195        }
196      `;
197      document.head.appendChild(style);
198    }, 1500);
199  };
200  h.appendChild(s);
201})();
202</script>
202
203-->
204
205
206<link href="https://www.jumpspree.com/public/css/header-all.css?ver:1.011779" rel="stylesheet">
207<!--<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet">
208<link rel="stylesheet" href="/public/css/stylesheet.css?ver:1.294982ee444491020">
209<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet">
210<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">-->
211
212<script src="https://code.jquery.com/jquery-3.7.1.min.js"></script>
212
213<script async src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
213
214
215<!--css in header-all.css-->
216<style>
217body.light-mode .footer-inner {background: #fff !important}
218body.light-mode .gta-text-full.border-top.other-app h2.mobb-mb-10 a {
219    color: #222 !important;
220}    
221body.dark-mode .nav-bar.hide-on-mob li a:hover {
222        color: #000 !important;
223    } 
224body.dark-mode .nav-bar.hide-on-mob .get-app-btn a:hover {
225        color: #fff !important;
226    }    
227     /* Hide Google Translate top banner + overlay */
228        iframe[id^=":"] {
229  width:0 !important;
230  height:0 !important;
231  opacity:0 !important;
232  pointer-events:none !important;
233  position:fixed !important;
234  top:-9999px !important;
235  left:-9999px !important;
236  border:0 !important;
237}
238body.light-mode .nav-bar ul li:first-child a:hover, .nav-bar.hide-on-mob li a:hover {
239    background: #e3e3e3 !important;
240}    
241
242        /* Hide Google Translate UI overlays */
243        
244
245        /* Hide Google Translate tooltip, banner, icon, etc. */
246        .goog-te-banner-frame,
247        .goog-te-balloon-frame,
248        .goog-te-menu-frame,
249        .goog-tooltip,
250        .goog-tooltip:hover,
251        .goog-text-highlight {
252          
253          opacity: 0 !important;
254          visibility: hidden !important;
255          pointer-events: none !important;
256        }
257
258        /* Prevent body shift when banner injects */
259        body {
260            top: 0px !important;
261        }
262        .notranslate {
263        translate: no !important;
264        }
265    @media screen and (min-width:768px){
266.nav-bar.hide-on-mob li a:hover {
267    background: #222;
268    border-radius: 50px;
269}
270.lang-btn {
271    display: none
272}
273
274    }
275    
276@media screen and (max-width:767px){
277body.light-mode .qrcodeforstaticpage img {
278        filter: brightness(0) !important;
279    }    
280body.light-mode img.search-icon {
281    filter: invert(0) !important;
282}    
283body.light-mode .share-url.get-the-app-btn img {
284    filter: invert(1) !important;
285}    
286.popup-content .inner-language-box {
287    padding-right: 0px !important;
288}    
289    button#langCurrencyBtn{display: none !important}    
290.lang-btn {
291    clear: both;
292    padding: 0 12px 10px;
293    position: absolute;
294    bottom: 0;
295    display: flex;
296    align-items: center;
297    color: #fff;
298}
299.lang-btn {
300    position: fixed;
301    bottom: 10px;
302}
303.lang-btn #langCurrencyBtn {
304    background: no-repeat;
305}    
306.lang-btn button.langCurrencyBtn {
307        position: static;
308        display: inline-block !important;
309        width: auto;
310        margin-right: 8px;
311        margin-left: 9px;
312        width: 35px;
313        height: 35px;
314        border-radius: 50%;
315        display: flex;
316        align-items: center;
317        justify-content: center;
318        background: transparent;
319        border: none;
320        width: auto;
321}
322.lang-btn button.langCurrencyBtn svg {
323    margin-right: 0;
324}    
325.lang-btn button#langCurrencyBtn2 {
326    color: #fff;
327    display: flex !important;
328    gap: 9px;
329    align-items: center;
330}
331.lang-btn {
332    display: flex;
333    align-items: center;
334}    
335    }
336</style>
337
338<style>
339/* lang change */
340#langCurrencyPopup .tabs .tab.active {
341    border-bottom: none;
342    background: #333 !important;
343    padding: 0;
344    padding: 0 25px !important;
345    border-radius: 35px !important;
346    font-size: 14px;
347}
348
349#langCurrencyPopup button.language-option {
350    border: none;
351    color: #fff;
352    width: 18.5%;
353    max-width: 20%;
354    text-align: left;
355    padding: 12px;
356    border-radius: 10px;
357    margin: 0;
358    background: #f5f5f503 !important;
359}
360#langCurrencyPopup .tabs {
361    border-bottom: none !important;
362}
363.inner-language-box {
364    margin: 0 !important;
365}
366 .popup-content .inner-language-box .tabs .tab {
367    color: #fff;
368    font-size: 14px;
369}
370div#allLanguagesContainer {
371    padding: 20px 0;
372    display: flex;
373    flex-wrap: wrap;
374    gap: 15px;
375    align-items: flex-start;
376    margin-top: 0 !important;
377    padding-top: 0 !important;
378}
379#langCurrencyPopup #popupClose {
380    right: 25px;
381}
382div#langCurrencyPopup #popupClose img {
383    width: 26px;
384}
385div#langCurrencyPopup #popupClose {
386    top: 25px !important;
387}
388#langCurrencyPopup .popup-content {
389    padding: 0 !important;
390}
391#langCurrencyPopup .tabs .tab {
392    padding: 10px 0;
393    border: none;
394    background: none;
395    cursor: pointer;
396    color: #fff !important;
397    flex: none;
398    margin-right: 20px;
399}
400div#tab-currency {
401    padding: 10px 25px;
402}
403#allCurrencies button.active {
404    background: #333 !important;
405    color: #fff;
406    border: 1px solid #ccc !important;
407}
408#langCurrencyPopup  button.language-option.notranslate.active{background: #fff !important}
409button.language-option.notranslate.active * {
410    color: #000;
411}
412.popup-content {
413    width: 100% !important;
414    max-width: 950px !important;
415}
416.lang-sub {
417    font-weight: 300 !important;
418    font-size: 13px !important;
419}
420div#tab-lang h3.popup-label {
421    color: #fff;
422    font-size: 16px;
423}
424#langCurrencyPopup .tabs {
425    border-bottom: none !important;
426    padding: 25px 25px 15px;
427    border-bottom: 1px solid #3241585c !important;
428}
429#langCurrencyPopup div#tab-lang {
430    padding: 25px;
431    margin-top: 0;
432}
433.note-language p {
434    color: #ccc;
435    padding: 23px 0 25px;
436    line-height: 17px;
437    font-size: 13px;
438}
439
440.note-language {
441    margin: 0 25px;
442}
443#langCurrencyPopup button.language-option.active {
444    background: #f5f5f5 !important;
445    color: #000;
446}
447button.language-option.active .lang-sub {
448    font-weight: 600 !important;
449}
450#allCurrencies button {
451    margin: 5px;
452    padding: 8px 12px;
453    border-radius: 5px;
454    cursor: pointer;
455    border: none !important;
456    color: #fff;
457    width: auto;
458    max-width: 20%;
459    text-align: left;
460    padding: 12px;
461    border-radius: 10px;
462    margin: 0;
463    background: #f5f5f503 !important;
464}
465#allCurrencies button.active {
466    background: #f5f5f5 !important;
467    color: #000 !important;
468}
469/*Hindi Lang*/
470.profile-drop-down ul li a:lang(hi) {
471    font-size: 12px;
472}
473#signup-new-process .signup-footer .arrow-right:lang(hi), #signup-new-process .signup-footer .arrow-right:lang(fr), #signup-new-process .signup-footer .arrow-right:lang(fa), #signup-new-process .signup-footer .arrow-right:lang(pt-PT), #signup-new-process .signup-footer .arrow-right:lang(sw) {
474    width: 22px;
475    top: 2px;
476}
477#signup-new-process .arrow-right:lang(hi), #verifyreset-new-process .arrow-right:lang(hi), #enter-new-password .arrow-right:lang(hi) {
478    width: 22px;
479    top: 1px;
480    position: relative;
481}
482#download-app-popup #download-app-popup-inner .download-btns a:lang(hi) {
483    display: flex;
484    gap: 5px;
485    align-items: center;
486}
487
488.get-more-class.get-more-mob:lang(te), .get-more-class.get-more-mob:lang(fa){
489    width: 160px;
490}
491
492.profile-drop-down ul li a:lang(fa) {
493    font-size: 13px;
494}
495.get-more-class.get-more-mob:lang(ko), .get-more-class.get-more-mob:lang(fr), .get-more-class.get-more-mob:lang(kn), .get-more-class.get-more-mob:lang(ro){
496    width: 160px;
497}
498.get-more-class.get-more-mob:lang(ar), .get-more-class.get-more-mob:lang(bg){
499        width: 140px;
500    }
501.get-more-class.get-more-mob:lang(pt-PT) {
502        width: 130px;
503    }
504.get-more-class.get-more-mob:lang(tr) {
505        width: 190px;
506    }
507.get-more-class.get-more-mob:lang(es){
508    width: 130px;
509}
510.recomendation h4:lang(te) {
511    font-size: 14px;
512}
513
514#signup-new-process #step03 .form-box h2.signup-title:lang(fr), #signup-new-process #step04 .form-box h2.signup-title:lang(fr), #signup-new-process #step05 .form-box h2.signup-title:lang(fr)  {
515    line-height: 28px;
516    margin-bottom: 15px !important;
517}
518/*Hindi Lang*/
519
520body.dark-mode .popup-content {
521    background: #222;
522}
523.inner-language-box {
524    margin-top: 0px !important;
525    overflow: auto !important;
526    padding: 0px 0px !important;
527    height: calc(100vh - 250px) !important;
528    max-height: 875px !important;
529    padding-right: 15px !important;
530}    
531button#langCurrencyBtn {
532    position: fixed;
533    right: 25px;
534    bottom: 25px;
535    background: #82828287;
536    border: none;
537    color: #000 !important;
538    width: 35px;
539    height: 35px;
540    border-radius: 50%;
541    display: flex;
542    align-items: center;
543    justify-content: center;
544    /* opacity: 0; */
545}       
546div#tab-lang h3.popup-label {
547    color: #fff;
548    font-size: 16px;
549    margin: 0 0 2rem !important;
550}       
551       #langCurrencyBtn{display: flex!important}  
552div#tab-currency h3 {
553    margin-bottom: 10px;
554    border-bottom: none;
555    padding-bottom: 5px;
556    color: #222;
557    font-size: 16px;
558    font-weight: 600;
559    color: #fff;
560}  
561    
562body.light-mode, body.light-mode header{
563    background: #fff !important;
564}    
565body.light-mode .app-install.email-verification {
566    background: #f1f1f1;
567    border: 1px solid #eaeaea;
568}
569body.light-mode .app-install.email-verification h1 {
570    color: #222;
571}    
572body.light-mode .email-verification.reset-pass.reset-pass1.app-install p{
573        color: #222
574    }    
575body.light-mode .or-change a {
576    color: #222 !important;
577}
578body.light-mode  #forgotpasswordform .form-control {
579    background-color: #cbcbcb !important;
580    border: 1px solid #3241585c !important;
581    color: #d4d4d4 !important;
582}    
583body.light-mode .blog-box {
584    border: 1px solid #eaeaea !important;
585    background: #f1f1f1;
586}
587body.light-mode .blog-box h3 a {
588    color: #222 !important;
589}
590body.light-mode .tncpages a {
591    color: #222 !important;
592}    
593body.light-mode .tncpages h1, body.light-mode .tncpages h2{
594        color: #222 !important
595    }    
596body.light-mode .blog-detail .blog-date {
597    color: #222;
598}
599body.light-mode .back-button img {
600    filter: invert(0);
601    }
602body.light-mode .blog-box {
603    border: none !important;
604    background: none !important;
605}
606body.light-mode .tncpages p, body.light-mode .tncpages ul, body.light-mode .tncpages ul li {
607    color: #222 !important;
608} 
609    body.light-mode .tncpages ol li b, body.light-mode .tncpages ol li, body.light-mode .tncpages ul li {
610        color: #222 !important;
611    }
612body.light-mode .blog-box h3 {
613    color: #222;
614    }
615body.light-mode .nav-bar ul a {
616    color: #222 !important;
617}
618body.light-mode .faq-new-wrapper h3 {
619    color: #222;
620}
621body.light-mode .tncpages ul.accordion > li > a {
622    background: #f1f1f1 !important;
623}    
624body.light-mode .accordion li {
625    background: #ffffff !important;
626}
627body.light-mode .tncpages ul.accordion>li>a:hover {
628    color: #222 !important;
629}
630body.light-mode .email-verification {
631    background: #ffffff;
632    padding: 0;
633} 
634body.light-mode .email-verification.after-login.textpages h6 b {
635    color: #222 !important;
636}     
637body.light-mode .read-more-footer {
638    border-top: 1px solid #3241582b;
639} 
640body.light-mode .tncpages h6 strong, body.light-mode .tncpages li, body.light-mode .tncpages h5 {
641    color: #222 !important;
642}    
643    
644/* lang change */
645
646@media (max-width:767px) {
647.popup-content .inner-language-box {
648        padding-right: 0px !important;
649    }    
650/* lang change */
651#langCurrencyPopup .popup-content {
652    padding-right: 0px;
653    position: fixed;
654    bottom: 0;
655    border-radius: 25px 25px 0 0;
656}    
657.note-language p {
658    color: #ccc;
659    padding: 11px 0 9px;
660    line-height: 16px;
661    font-size: 10px;
662    margin-bottom: 0;
663}    
664#langCurrencyPopup .tabs .tab.active {
665    font-size: 12px !important;
666}    
667#langCurrencyPopup .tabs .tab {
668    font-size: 12px;
669}
670div#tab-lang h3.popup-label {
671    font-size: 14px;
672}
673    
674    button#langCurrencyBtn {
675        right: 35px;
676        bottom: 75px;
677        z-index: 99999999999 !important;
678        background: #4f4f4f;
679    }   
680#langCurrencyPopup button.language-option {
681    width: 47.5%;
682    max-width: 47.5%;
683}
684#langCurrencyPopup .tabs {
685    padding: 20px 20px 15px;
686}
687#langCurrencyPopup div#tab-lang {
688    padding: 20px;
689}    
690div#langCurrencyPopup #popupClose {
691    top: 18px !important;
692}
693div#langCurrencyPopup #popupClose img {
694    width: 22px;
695}    
696/* lang change */
697    
698    
699    
700    .list-type-number {
701        margin-left: 2.3rem
702    }
703    
704    
705}       
706    
707body.dark-mode span.field_icon.toggle-password2 i {
708    color: #fff;
709}    
710</style>
711<!--css in header-all.css-->
712
713
714</head>
715              <body class="dark-mode user-not-logged-in">
716                
717<div class="blog-side-menu" onclick="$('.blog-side-menu').removeClass('blog-side-menu-show'); $('.col-md-3.col-sm-2').removeClass('side-menu-opend')">
718<div class="side-menu-inner" onclick="window.event.cancelBubble = true;">
719<div class="side-menu-logo">
720<!--    <a href="https://www.jumpspree.com"><img src="https://www.jumpspree.com/public/images/ico.png?ver:1.08" style="display:none" class="logo-ico hide-on-desktop hide-on-mob" alt="jumpspree-logo" title="jumpspree logo"></a>-->
721    <a href="https://www.jumpspree.com"><img src="https://www.jumpspree.com/public/images/logo-icon-black.png?ver:1.08" style="display:none" class="logo-ico hide-on-desktop hide-on-mob" alt="jumpspree-logo" title="jumpspree logo"></a>
722</div>   
723    <ul style="margin-bottom:0">
724<!--
725    <li><a href="https://www.jumpspree.com/seller-pad/live-streams" target="_blank"><img style="width: 17px;
726    margin-left: -2px;
727    margin-right: 2px;" src="https://www.jumpspree.com/public/images/seller-pad-iconn.png" class="home-icon-outline" alt="Home" title="Home"> Seller Pad</a></li>
728-->
728
729   <li><a href="https://www.jumpspree.com/seller-pad/live-streams" target="_blank"><img style="width: 17px;
730    margin-left: -2px;
731    margin-right: 2px;" src="https://www.jumpspree.com/public/images/sellerpad_new.png" class="home-icon-outline" alt="Home" title="Home"> Seller Pad</a></li>
732    <li><a href="https://www.jumpspree.com/frequently-asked-questions" target="_blank"><i class="hgi hgi-stroke hgi-message-question"></i> FAQ</a></li>
733    <li><a href="https://www.jumpspree.com/blog" target="_blank"><i class="hgi hgi-stroke hgi-license"></i> Blog</a></li>
734    <li><a href="https://www.jumpspree.com/selling-fees" target="_blank"><i class="hgi hgi-stroke hgi-dollar-circle"></i> Selling fees  </a></li>
735    <!--                            <li><a href="#"  target="_blank">Seller Resources</a></li>-->
736<!--    <li><a href="https://www.jumpspree.com/selling-fees" target="_blank"><i class="hgi hgi-stroke hgi-shipping-truck-01"></i> Shipping guidelines</a></li>-->
737    <li><a href="https://www.jumpspree.com/return-policy" target="_blank"><i class="hgi hgi-stroke hgi-return-request"></i> Return policy</a></li>
738    <li><a href="https://www.jumpspree.com/privacy-policy" target="_blank"><i class="hgi hgi-stroke hgi-square-lock-02"></i> Privacy policy</a></li>
739    <li><a href="https://www.jumpspree.com/terms-of-use" target="_blank"><i class="hgi hgi-stroke hgi-filter-mail-square"></i> Terms of use</a></li>
740    <!--    <li class="logout-btn"><a href="#">Log Out</a></li>-->
741    </ul>
742    
743    <div class="side-menu-bottom">
744        <ul style="margin-top:0"> 
745<!--        <li><a href="https://www.jumpspree.com/account_settings"><i class="hgi hgi-stroke hgi-account-setting-03"></i> Account setting</a></li>-->
746        <li style="display:none"> 
747                  
748
749                    <a href="javascript:void(0)" onclick="$('#signup-new-process').hide();$('#signin-new-process').fadeIn('fast')"><i class="hgi hgi-stroke hgi-account-setting-03"></i> Account settings</a>
750
751                            </li>
752        <li><a href="https://www.jumpspree.com/download-the-official-jumpspree-app-for-ios-and-android" style="    display: flex;align-items: center;"><span><img style="width: 15px;margin-right: 8px;float: none;margin-top: -3px; border-radius:5px" src="https://www.jumpspree.com/public/images/grad-logo.png" class="get-the-app" alt="Get the app" title="Get the app"> Get the app</span></a></li>    
753        <li class="report-a-problem-tab"><a href="javascript:void(0)"  onclick="$('#report-on-more-option').fadeIn('fast'); $('.blog-side-menu').removeClass('blog-side-menu-show');$('.left_section').removeClass('side-menu-opend');"><i class="hgi hgi-stroke hgi-alert-circle"></i> Report a problem</a></li>
754<!--        <li><a href=""><i class="hgi hgi-stroke hgi-login-03"></i> Sign in</a></li>-->
755        <li> 
756                  
757
758<!--                    <a href="javascript:void(0)" onclick="showSignInPopUp()"><i class="hgi hgi-stroke hgi-login-03"></i> Sign in</a>-->
759                    <a href="javascript:void(0)" onclick="https://www.jumpspree.com/sign-in"><i class="hgi hgi-stroke hgi-login-03"></i> Sign in</a>
760
761                            </li>
762        </ul>
763    </div>
764    
765         
766    <div class="lang-btn">
767        <button class="langCurrencyBtn" id="langCurrencyBtn2" onclick="openLangPopup()">
768  <svg xmlns="https://www.w3.org/2000/svg" viewBox="0 0 16 16" style="display:block;height:16px;width:16px;fill:#fff;">
769    <path d="M8 .25a7.77 7.77 0 0 1 7.75 7.78 7.75 7.75 0 0 1-7.52 7.72h-.25A7.75 
770             7.75 0 0 1 .25 8.24v-.25A7.75 7.75 0 0 1 8 .25zm1.95 
771             8.5h-3.9c.15 2.9 1.17 5.34 1.88 5.5H8c.68 0 1.72-2.37 
772             1.93-5.23zm4.26 0h-2.76c-.09 1.96-.53 3.78-1.18 
773             5.08A6.26 6.26 0 0 0 14.17 9zm-9.67 0H1.8a6.26 
774             6.26 0 0 0 3.94 5.08 12.59 12.59 0 0 1-1.16-4.7l-.03-.38zm1.2-6.58
775             -.12.05a6.26 6.26 0 0 0-3.83 5.03h2.75c.09-1.83.48-3.54 
776             1.06-4.81zm2.25-.42c-.7 0-1.78 2.51-1.94 5.5h3.9c-.15-2.9-1.18-5.34
777             -1.89-5.5h-.07zm2.28.43.03.05a12.95 12.95 0 0 1 1.15 
778             5.02h2.75a6.28 6.28 0 0 0-3.93-5.07z"></path>
779  </svg>
780  <span class="notranslate" id="langName">English</span>
781</button> 
782   
783   
784<!--   <button id="currency-left-menu" class="tab" data-tab="currency">Currency</button>-->
785    </div>
786</div>
787    
788</div>
789  <div class="header-wrapper">
790      <div class="container-fluid p-0">
791      <img src="" style="display: none;" alt="meta image">
792               <header>
793          <div class="container">
794              <div class="d-flex justify-content-between align-items-center">
795               <div class="logo xl">
796                  <div class="get-more-class get-more-mob" style="display:none; position: absolute;top: 6px;
797    left: 12px;"><a class="share-url" href="javascript:void(0)" onclick="getmorepopup()"  style="    border-radius: 53px;
798    padding: 0px 20px;
799    margin-right: 0;
800    border: none;
801    background: #111;
802    height: 35px;
803    display: flex;
804    align-items: center;
805    padding: 0 9px;
806    font-size: 10px"><img src="https://www.jumpspree.com/public/images/more-icon-check.png" alt="verified" title="Get MORE" style="margin-right: 5px;
807    color: #fff;
808    filter: invert(0) !important;
809    width: 20px !important;
810    margin-top: -4px;"> Get MORE</a></div>
811<!--                   <a href="https://www.jumpspree.com"><img src="https://www.jumpspree.com/public/images/logo-white-jumpspree.png?ver:1.008" class="logo-hide-on-mob" alt="jumpspree-logo" title="jumpspree logo"><img src="https://www.jumpspree.com/public/images/ico.png?ver:1.08" style="display:none" class="logo-ico hide-on-desktop hide-on-mob" alt="jumpspree-logo" title="jumpspree logo"></a>-->
812                   <a href="https://www.jumpspree.com"><img src="https://www.jumpspree.com/public/images/logo-left.png?ver:1.008" class="logo-hide-on-mob" alt="jumpspree-logo" title="jumpspree logo"><img src="https://www.jumpspree.com/public/images/logo-icon-black.png?ver:1.08" style="display:none" class="logo-ico hide-on-desktop hide-on-mob" alt="jumpspree-logo" title="jumpspree logo"></a>
813                   
814<!--                   https://www.jumpspree.com/download-the-official-jumpspree-app-for-ios-and-android-->
815                   <a class="share-url get-the-app-btn logo-hide-on-mob qrcodeforstaticpage" href="javascript:void(0)" onclick="$('#ios-app').fadeIn('fast')" style="border-radius: 53px;
816    padding: 0px 9px;
817    margin-right: 0;
818    border: 1px solid #3241585c;
819    background: #111;
820    height: 35px;
821    display: flex;
822    align-items: center;font-size:10px;top: 9px;right: 55px; position: absolute; display:none"><img src="https://www.jumpspree.com/public/images/qr.png?ver:10.2" alt="QR Code" title="QR Code" style="width: 18px;margin-top: -5px;filter: invert(1) brightness(5);"> Get the App</a>
823                   
824                   <div class="get-more-class refer-frnd-mob get-app-btn" style="display:none">
825<!--
826                   <a class="share-url" href="https://www.jumpspree.com/refer-friend" style="border-radius: 53px;
827    padding: 0px 9px;
828    margin-right: 0;
829    border: 1px solid #3241585c;
830    background: #111;
831    height: 35px;
832    display: flex;
833    align-items: center;font-size:10px"><i class="fa-light fa-gift" aria-hidden="true" style="margin-right: 5px;font-size: 15px;"></i> Refer a Friend</a>
834-->
835<!--            https://www.jumpspree.com/download-the-official-jumpspree-app-for-ios-and-android-->
836             <a class="share-url get-the-app-btn" href="#" onclick="$('#search-popup-wrapper-new').fadeIn('fast'); $('body').addClass('overflow-hidden');"  style="border-radius: 53px;
837    padding: 0px 9px;
838    margin-right: 0;
839    border: 1px solid #3241585c;
840    background: #111;
841    height: 35px;
842    margin-right:7px;
843    display: flex;
844    align-items: center;font-size:10px"><img class="search-icon" src="https://www.jumpspree.com/public/images/lense--search.png?ver:10.2" alt="Search" title="Search" style="width: 18px;margin-top: -5px;filter: invert(1) brightness(5);"></a>
845    
846    <a class="share-url get-the-app-btn" onclick="$('#ios-app').fadeIn('fast');" href="javascript:void(0)"  style="border-radius: 53px;
847    padding: 0px 9px;
848    margin-right: 0;
849    border: 1px solid #3241585c;
850    background: #111;
851    height: 35px;
852    display: flex;
853    margin-right:7px;
854    align-items: center;font-size:10px"><img src="https://www.jumpspree.com/public/images/qr.png?ver:10.2" alt="QR Code" title="QR Code" style="width: 18px;margin-top: -5px;filter: invert(1) brightness(5);"> Get the App</a>
855             <div class="side-menu" onclick="$('.blog-side-menu').addClass('blog-side-menu-show'); $('.col-md-3.col-sm-2').addClass('side-menu-opend')">
856                 <i class="hgi hgi-stroke hgi-menu-02"></i>
857             </div>
858              </div>
859               </div>
860                      
861                      
862                <div class="search-bar">
863                   <img src="https://www.jumpspree.com/public/images/search.png" alt="Search" title="Search">
864                    <input type="text" class="searchbar-header" placeholder="Search by product name or brand name">
865                </div>      
866                       <div class="mob-head-right">
867                     <div class="refer-btn"  style="margin-right:10px;"><button 
868  class="bn btn-refer"
869      onclick="$('#signup-new-process').hide(); $('#signin-new-process').fadeIn('fast');"
870  >
871  <img src="https://www.jumpspree.com/public/images/dollar.png" alt="Refer & Earn" title="Refer & Earn">
872  Refer & Earn
873</button></div>
874                        <!--                     <div class="hamburger"><img src="/public/images/hamburger.png" alt="Jumpspree"></div>-->
875<!--
876                    <a class="share-url get-the-app-btn" href="#" style="border-radius: 53px;
877    padding: 0px 9px;
878    margin-right: 0;
879    border: 1px solid #3241585c;
880    background: #111;
881    height: 35px;
882    display: flex;
883    align-items: center;font-size:10px"><img src="https://www.jumpspree.com/public/images/qr.png?ver:10.2" alt="Jumpspree" style="width: 18px;margin-top: -5px;filter: invert(1) brightness(5); display:none"> Get the App</a>
884-->
885                    
886                     <div class="side-menu side-menu-hidden-inner" style="z-index: 0;position: absolute;right: 10px;top: 9px;width: 35px;
887    height: 35px;font-size: 20px;justify-content: center;" onclick="$('.blog-side-menu').addClass('blog-side-menu-show'); $('.col-md-3.col-sm-2').addClass('side-menu-opend')">
888                 <i class="hgi hgi-stroke hgi-menu-02"></i>
889             </div>
890                     
891                     <div class="social-heder" style="display:none"><ul>
892                     <li><a href="javascript:void(0)" onclick="$('#signup-new-process').hide();$('#signin-new-process').fadeIn('fast')"><i class="fa-regular fa-circle-dollar"></i></a></li>
893                     <li><a href="javascript:void(0)" onclick="$('#signup-new-process').hide();$('#signin-new-process').fadeIn('fast')"><i class="fa-regular fa-bell"></i></a></li>
894                     <li><a href="javascript:void(0)" onclick="$('#search-popup').fadeIn('fast')"><i class="fa-regular fa-magnifying-glass"></i></a></li>
895                     </ul></div>
896               </div>
897               
898                       
899               
900               
901                   
902                  <!--   jab session out hai    start here-->
903                            <div class="nav-bar hide-on-mob nav-menu-for-active">
904                                <ul class="d-flex align-items-center">
905<!--                                    <li class="su" ><a class="su" href="javascript:void(0)" onclick="showSignUpPopUp()">Sign Up</a></li>-->
906                                    <li class="su" ><a class="su" href="https://www.jumpspree.com/sign-up">Sign Up</a></li>
907<!--                                    <li><a href="javascript:void(0)" onclick="showSignInPopUp()" >Sign In</a></li>-->
908                                    <li><a href="https://www.jumpspree.com/sign-in" >Sign In</a></li>
909                                    <li class="get-app-btn"><a  href="https://www.jumpspree.com/download-the-official-jumpspree-app-for-ios-and-android" style="border-radius: 53px;
910    padding: 0px 20px;
911    margin-right: 0;
912    border: 1px solid #3241585c;
913    background: #111;
914    height: 41px;
915    display: flex;
916    align-items: center;"><img src="https://www.jumpspree.com/public/images/qr.png?ver:10.2" alt="QR Code" title="QR Code" style="width:16px" > Get the App</a></li>
917                                </ul>
918                            </div>
919                            </div>
920          </div>
921          <style>
922             
923            </style>
924      </header>
925                        <div class="nav-bar hide-on-desktop nav-menu-for-active" style="display:none">
926                            <ul class="d-flex align-items-center"> 
927                                <li class="su" ><a  href="javascript:void(0)" onclick="showSignUpPopUp()" >Sign Up</a></li>
928                                <li><a href="javascript:void(0)" onclick="$('#signup-new-process').hide();$('#signin-new-process').fadeIn('fast')">Sign In</a></li>
929                                <li class="get-app-btn"><a  href="javascript:void(0)" onclick="$('#ios-app').fadeIn('fast')"><img src="https://www.jumpspree.com/public/images/qr.png?ver:10.2" alt="Get the App" title="Get the App"> Get the App</a></li>
930                            </ul>
931                        </div>
932             <!--   jab session out hai    end here-->
933                  
934       </div>
935  </div>
936   
936<script>
937 function showSignInPopUp(){
938
939        localStorage.setItem('showsigninpopup', '1');
940        window.location.href='https://www.jumpspree.com'
941
942 }
943 function showSignUpPopUp(){
944
945        localStorage.setItem('showsignuppopup', '1');
946        window.location.href='https://www.jumpspree.com'
947
948 }
949 
950    </script>
950
951
952
953
954
955
956   <div class="container">
957      
958       
959   <div class="body-container"></div>
960
961<!-- Swiper CSS loaded async in footer.php — no duplicate here -->
962<!-- Lightbox CSS — async, not render-blocking -->
963<link rel="preload" href="https://cdnjs.cloudflare.com/ajax/libs/lightbox2/2.11.3/css/lightbox.min.css" as="style" onload="this.onload=null;this.rel='stylesheet'">
964<noscript><link href="https://cdnjs.cloudflare.com/ajax/libs/lightbox2/2.11.3/css/lightbox.min.css" rel="stylesheet"></noscript>
965
966<!-- BOOT ORCHESTRATOR — must load before leftsidebar.php (which loads scripts.js) — 2026-05-15 -->
967<script src="https://www.jumpspree.com/public/js/social-boot-orchestrator.js?ver=1.1"></script>
967
968
969<script defer src="https://cdnjs.cloudflare.com/ajax/libs/lightbox2/2.11.3/js/lightbox.min.js"></script>
969
970
971<!-- Pre-loaded page 1 feed data — used below to skip the initial AJAX round-trip -->
972<script>
973var _preloadedPosts    = [{"postFiles":[],"postFilesAspectClass":"Vertical","postMap":[],"likes":3,"comments":0,"shares":0,"viewcount":"12","reposted_count":"2","quoteDetails":{"IsCommentsBlocked":"0","postText":"Selling my iPhone 14 Pro Max, 256GB, White in excellent condition. Well cared for, always used in a case, and works like a brand new phone. Great phone with plenty of storage and a clean, premium look. DM for questions.","postTitle":"iPhone 14 Pro Max, 256 GB, White. Excellent condition.","postId":"1176","is_blog":"0","is_product":"1","source":"1","user_token":"CSB221009375","pdate":"Mon 08\/24\/26","ptime":"01:40:pm","insertedDate":"2026-08-24 01:40:pm","postkey":"PRODUCT","is_promoted":"0","enableEditBanner":"0","postFiles":[{"imagepath":"https:\/\/cubesnack-seller.s3.amazonaws.com\/products\/2408260140341050.jpg","imagetype":"image"},{"imagepath":"https:\/\/cubesnack-seller.s3.amazonaws.com\/products\/2408260140346054.jpg","imagetype":"image"},{"imagepath":"https:\/\/cubesnack-seller.s3.amazonaws.com\/products\/2408260140343678.jpg","imagetype":"image"},{"imagepath":"https:\/\/cubesnack-seller.s3.amazonaws.com\/products\/2408260140345500.jpg","
973imagetype":"image"},{"imagepath":"https:\/\/cubesnack-seller.s3.amazonaws.com\/products\/2408260140345624.jpg","imagetype":"image"},{"imagepath":"https:\/\/cubesnack-seller.s3.amazonaws.com\/products\/2408260140356922.jpg","imagetype":"image"}],"postMap":[],"name":"Vic","userId":"375","username":"Vic","usertype":"1","bluetick":"1","is_verified":"1","profile_photo":"https:\/\/cubesnack-seller.s3.amazonaws.com\/products\/1908260555398244.jpg","is_poll":false,"storeDetails":{"storeInfo":{"storeid":"150","storename":"Vic’s Shop on Jumpspree","about_store":"This is Vic’s shop on Jumpspree. You can have one, too!! Simply go to your account settings and tap on the \u0026#34;SellerPad\u0026#34; button to create yours!","storeusername":"Shop","storelogo":"https:\/\/cubesnack-seller.s3.amazonaws.com\/products\/2408260752568507.jpg","store_website":null},"sellerName":"Vic’s Shop on Jumpspree","storeusername":"Shop","storeId":null,"storePhoto":"https:\/\/cubesnack-seller.s3.amazonaws.com\/products\/2408260752568507.jpg","storeBanner":null,"storeDescription":null,"storeRating":null,"storeReviews":null,"storeLocation":null,"address_city":null,"address_state":null,"address_line1":null,"address_line2":null},"product":{"id":"1176","producttitle":"iPhone 14 Pro Max, 256 GB, White. Excellent condition.","description":"Selling my iPhone 14 Pro Max, 256GB, White in excellent condition. Well cared for, always used in a case, and works like a brand new phone. Great phone with plenty of storage and a clean, premium look. DM for questions.","sellingprice":"575.00","discountedprice":"550.00","discountPercent":5,"category":"8","subcategory":"118","brand_id":"158","status":"1","view":"1","quantity":"1","shipping":"1","isFreeShipping":"1","returnPolicy":"This seller accept returns for 14 days only.","isReturn":"2","returnPeriod":"0","isVariation":"1","country":"1","address_city":"Oyster Bay","address_state":"NY","reposted":"0","reposted_count":"1","viewcount":"19","rating":"0.0","inStorePickup":"0","sameDayDelivery":"0","deals":"0","sku":"","identifier":"","conditions":"2","is_approved":"3","packageLength":"9","packageBreadth":"6","packageHeight":"3"}},"reposted_by":{"user_token":"CSB22073152","username":"Jumpspree","name":"Jumpspree","profile_photo":"https:\/\/cubesnack-seller.s3.amazonaws.com\/products\/0106260241236164.png","is_verified":"1","is_self":false},"is_poll":false,"poll_options":[],"has_voted":2,"user_voted_option_id":null,"poll_closed":0,"poll_duration":0,"poll_start_time":null,"poll_end_time":null,"poll_time_remaining":null,"block":"0","mute":0,"is_follow":"0","followers":211,"followings":243,"session":0,"self":0,"is_wishlist":"0","liked":"0","bluetick":0,"online_status":0,"private":0,"is_reposted_version":true,"is_reposted_by_user":false,"user_repost_type":null,"user_repost_id":null,"user_reposted_at":null,"postId":4275,"postText":"In case someone is looking for a used iPhone in excellent condition. 👇","postTitle":"","is_blog":"0","postkey":"CBSKP","cubeapp_token":"CSB221009375","user_token":"CSB221009375","pdate":"Mon 09\/21\/26","ptime":"07:42","name":"Vic","userId":375,"username":"Vic","usertype":"1","profile_photo":"https:\/\/cubesnack-seller.s3.amazonaws.com\/products\/1908260555398244.jpg","cover_photo":"https:\/\/cubesnack-seller.s3.amazonaws.com\/products\/c6.png","is_verified":"1","is_reposted":"1","is_quote":"1176","hideLike":"0","commentsoff":"0","source":"1","about_us":"Founder of @jumpspree. Currently also shipping @cent and @pageraise.","about_us_full":"Founder of @jumpspree. Currently also shipping @cent and @pageraise.","repost_id":"2476","repost_created_at":"2026-09-21 07:42:30"},{"postFiles":[],"postFilesAspectClass":"Vertical","postMap":[],"likes":1,"comments":0,"shares":0,"viewcount":"5","reposted_count":"0","quoteDetails":null,"reposted_by":null,"is_poll":false,"poll_options":[],"has_voted":2,"user_voted_option_id":null,"poll_closed":0,"poll_duration":0,"poll_start_time":null,"poll_end_time":null,"poll_time_remaining":null,"block":"0","mute":0,"is_follow":"0","followers":3,"followings":40,"session":0,"self":0,"is_wishlist":"0","liked":"0","bluetick":0,"online_status":0,"private":0,"is_reposted_version":false,"is_reposted_by_user":false,"user_repost_type":null,"user_repost_id":null,"user_reposted_at":null,"postId":4326,"postText":"Success isn’t about having the perfect idea.\u003Cbr \/\u003E\r\nIt’s about taking action when others are still waiting.\u003Cbr \/\u003E\r\nStart. Execute. Improve. Repeat.","postTitle":"","is_blog":"0","postkey":"CBSKP","cubeapp_token":"JUMP2412311966","user_token":"JUMP2412311966","pdate":"Fri 09\/11\/26","ptime":"03:41","name":"Junior Firefighter","userId":1966,"username":"codecrafted","usertype":"3","profile_photo":"https:\/\/cubesnack-seller.s3.amazonaws.com\/products\/0809261010074079.jpg","cover_photo":"https:\/\/cubesnack-seller.s3.amazonaws.com\/products\/c5.png","is_verified":"1","is_reposted":"0","is_quote":"0","hideLike":"0","commentsoff":"0","source":"2","about_us":"Great features start with great ideas. Great products protect them. Hey everyone 👋","about_us_full":"Great features start with great ideas. Great products protect them. Hey everyone 👋"},{"postFiles":[],"postFilesAspectClass":"Vertical","postMap":[],"likes":1,"comments":0,"shares":0,"viewcount":"3","reposted_count":"0","quoteDetails":null,"reposted_by":null,"is_poll":false,"poll_options":[],"has_voted":2,"user_voted_option_id":null,"poll_closed":0,"poll_duration":0,"poll_start_time":null,"poll_end_time":null,"poll_time_remaining":null,"block":"0","mute":0,"is_follow":"0","followers":3,"followings":40,"session":0,"self":0,"is_wishlist":"0","liked":"0","bluetick":0,"online_status":0,"private":0,"is_reposted_version":false,"is_reposted_by_user":false,"user_repost_type":null,"user_repost_id":null,"user_reposted_at":null,"postId":4324,"postText":"Your iPhone captures the moments. Your mindset creates them.\u003Cbr \/\u003E\r\nDream bigger. Create more. Keep moving. 📱","postTitle":"","is_blog":"0","postkey":"CBSKP","cubeapp_token":"JUMP2412311966","user_token":"JUMP2412311966","pdate":"Fri 09\/11\/26","ptime":"02:44","name":"Junior Firefighter","userId":1966,"username":"codecrafted","usertype":"3","profile_photo":"https:\/\/cubesnack-seller.s3.amazonaws.com\/products\/0809261010074079.jpg","cover_photo":"https:\/\/cubesnack-seller.s3.amazonaws.com\/products\/c5.png","is_verified":"1","is_reposted":"0","is_quote":"0","hideLike":"0","commentsoff":"0","source":"2","about_us":"Great features start with great ideas. Great products protect them. Hey everyone 👋","about_us_full":"Great features start with great ideas. Great products protect them. Hey everyone 👋"},{"postFiles":[],"postFilesAspectClass":"Vertical","postMap":[],"likes":2,"comments":0,"shares":0,"viewcount":"10","reposted_count":"0","quoteDetails":null,"reposted_by":null,"is_poll":false,"poll_options":[],"has_voted":2,"user_voted_option_id":null,"poll_closed":0,"poll_duration":0,"poll_start_time":null,"poll_end_time":null,"poll_time_remaining":null,"block":"0","mute":0,"is_follow":"0","followers":83,"followings":32,"session":0,"self":0,"is_wishlist":"0","liked":"0","bluetick":0,"online_status":0,"private":0,"is_reposted_version":false,"is_reposted_by_user":false,"user_repost_type":null,"user_repost_id":null,"user_reposted_at":null,"postId":4342,"postText":"ANTHROPIC MAY HAVE SOLVED THE AI PROFIT PROBLEM AHEAD OF ITS IPO.\u003Cbr \/\u003E\n\u003Cbr \/\u003E\nFull story 👇 \u003Cbr \/\u003E\n\u003Cbr \/\u003E\nhttps:\/\/www.cryptopolitan.com\/anthropic-hits-profitability-milestone\/","postTitle":"","is_blog":"0","postkey":"CBSKP","cubeapp_token":"JUMP2503212006","user_token":"JUMP2503212006","pdate":"Mon 09\/14\/26","ptime":"07:51","name":"Everyday AI Guy","userId":2006,"username":"EverydayAIGuy","usertype":"3","profile_photo":"https:\/\/cubesnack-seller.s3.amazonaws.com\/products\/2606260631105720.jpg","cover_photo":"https:\/\/cubesnack-seller.s3.amazonaws.com\/products\/2405251033093397.jpg","
973is_verified":"1","is_reposted":"0","is_quote":"0","hideLike":"0","commentsoff":"0","source":"1","about_us":"Helping everyday people effectively integrate artificial intelligence into their daily personal and professional lives. 🤖","about_us_full":"Helping everyday people effectively integrate artificial intelligence into their daily personal and professional lives. 🤖"},{"postFiles":[{"imagepath":"https:\/\/cubesnack-seller.s3.amazonaws.com\/products\/1109260229016298.jpg","type":"1","altText":"Jumpspree","link":"","profanity":"0","thumb":null,"aspectRatio":"1"}],"postFilesAspectClass":"Vertical","postMap":[],"likes":1,"comments":0,"shares":0,"viewcount":"4","reposted_count":"0","quoteDetails":null,"reposted_by":null,"is_poll":false,"poll_options":[],"has_voted":2,"user_voted_option_id":null,"poll_closed":0,"poll_duration":0,"poll_start_time":null,"poll_end_time":null,"poll_time_remaining":null,"block":"0","mute":0,"is_follow":"0","followers":3,"followings":40,"session":0,"self":0,"is_wishlist":"0","liked":"0","bluetick":0,"online_status":0,"private":0,"is_reposted_version":false,"is_reposted_by_user":false,"user_repost_type":null,"user_repost_id":null,"user_reposted_at":null,"postId":4322,"postText":"🌱 Keep Going! You don’t have to achieve everything at once. Just take one small step every day. Believe in yourself, stay positive, and don’t give up. Your hard work will pay off. 💪","postTitle":"","is_blog":"0","postkey":"CBSKP","cubeapp_token":"JUMP2412311966","user_token":"JUMP2412311966","pdate":"Fri 09\/11\/26","ptime":"02:29","name":"Junior Firefighter","userId":1966,"username":"codecrafted","usertype":"3","profile_photo":"https:\/\/cubesnack-seller.s3.amazonaws.com\/products\/0809261010074079.jpg","cover_photo":"https:\/\/cubesnack-seller.s3.amazonaws.com\/products\/c5.png","is_verified":"1","is_reposted":"0","is_quote":"0","hideLike":"0","commentsoff":"0","source":"2","about_us":"Great features start with great ideas. Great products protect them. Hey everyone 👋","about_us_full":"Great features start with great ideas. Great products protect them. Hey everyone 👋"},{"postFiles":[{"imagepath":"https:\/\/cubesnack-seller.s3.amazonaws.com\/products\/1409260849545517.jpg","type":"1","altText":"","link":"","profanity":"0","thumb":"","aspectRatio":"1.2229299363057"},{"imagepath":"https:\/\/cubesnack-seller.s3.amazonaws.com\/products\/1409260849547116.jpg","type":"1","altText":"","link":"","profanity":"0","thumb":"","aspectRatio":"0.84955752212389"}],"postFilesAspectClass":"Landscape","postMap":[],"likes":0,"comments":0,"shares":0,"viewcount":"4","reposted_count":"1","quoteDetails":null,"reposted_by":null,"is_poll":false,"poll_options":[],"has_voted":2,"user_voted_option_id":null,"poll_closed":0,"poll_duration":0,"poll_start_time":null,"poll_end_time":null,"poll_time_remaining":null,"block":"0","mute":0,"is_follow":"0","followers":1,"followings":5,"session":0,"self":0,"is_wishlist":"0","liked":"0","bluetick":0,"online_status":0,"private":0,"is_reposted_version":false,"is_reposted_by_user":false,"user_repost_type":null,"user_repost_id":null,"user_reposted_at":null,"postId":4344,"postText":"Ai is taking over our jobs soon, I know this because I have a full inbox asking me to apply to help Ai learn simple at home tasks and from work \u0026 get paid 4 every recording, now tell me different?? Comment AI for more info","postTitle":"","is_blog":"0","postkey":"CBSKP","cubeapp_token":"JUMP2607232371","user_token":"JUMP2607232371","pdate":"Mon 09\/14\/26","ptime":"08:49","name":"Josefina Martinez","userId":2371,"username":"jsanchez5984","usertype":"3","profile_photo":"https:\/\/cubesnack-seller.s3.amazonaws.com\/products\/2307261241335859.jpg","cover_photo":null,"is_verified":"0","is_reposted":"1","is_quote":"0","hideLike":"0","commentsoff":"0","source":"1","about_us":"","about_us_full":""},{"postFiles":[],"postFilesAspectClass":"Vertical","postMap":[],"likes":4,"comments":0,"shares":0,"viewcount":"4","reposted_count":"3","quoteDetails":null,"reposted_by":{"user_token":"JUMP2503212006","username":"EverydayAIGuy","name":"Everyday AI Guy","profile_photo":"https:\/\/cubesnack-seller.s3.amazonaws.com\/products\/2606260631105720.jpg","is_verified":"1","is_self":false},"is_poll":false,"poll_options":[],"has_voted":2,"user_voted_option_id":null,"poll_closed":0,"poll_duration":0,"poll_start_time":null,"poll_end_time":null,"poll_time_remaining":null,"block":"0","mute":0,"is_follow":"0","followers":211,"followings":243,"session":0,"self":0,"is_wishlist":"0","liked":"0","bluetick":0,"online_status":0,"private":0,"is_reposted_version":true,"is_reposted_by_user":false,"user_repost_type":null,"user_repost_id":null,"user_reposted_at":null,"postId":4287,"postText":"“Skills” matter.\u003Cbr \/\u003E\n\u003Cbr \/\u003E\n“Starting” matters more.","postTitle":"","is_blog":"0","postkey":"CBSKP","cubeapp_token":"CSB221009375","user_token":"CSB221009375","pdate":"Mon 09\/14\/26","ptime":"07:51","name":"Vic","userId":375,"username":"Vic","usertype":"1","profile_photo":"https:\/\/cubesnack-seller.s3.amazonaws.com\/products\/1908260555398244.jpg","cover_photo":"https:\/\/cubesnack-seller.s3.amazonaws.com\/products\/c6.png","is_verified":"1","is_reposted":"1","is_quote":"0","hideLike":"0","commentsoff":"0","source":"1","about_us":"Founder of @jumpspree. Currently also shipping @cent and @pageraise.","about_us_full":"Founder of @jumpspree. Currently also shipping @cent and @pageraise.","repost_id":"2473","repost_created_at":"2026-09-14 07:51:39"},{"postFiles":[{"imagepath":"https:\/\/cubesnack-seller.s3.amazonaws.com\/products\/1409260849545517.jpg","type":"1","altText":"","link":"","profanity":"0","thumb":"","aspectRatio":"1.2229299363057"},{"imagepath":"https:\/\/cubesnack-seller.s3.amazonaws.com\/products\/1409260849547116.jpg","type":"1","altText":"","link":"","profanity":"0","thumb":"","aspectRatio":"0.84955752212389"}],"postFilesAspectClass":"Landscape","postMap":[],"likes":0,"comments":0,"shares":0,"viewcount":"4","reposted_count":"1","quoteDetails":null,"reposted_by":{"user_token":"JUMP2607232371","username":"jsanchez5984","name":"Josefina Martinez","profile_photo":"https:\/\/cubesnack-seller.s3.amazonaws.com\/products\/2307261241335859.jpg","is_verified":"0","is_self":false},"is_poll":false,"poll_options":[],"has_voted":2,"user_voted_option_id":null,"poll_closed":0,"poll_duration":0,"poll_start_time":null,"poll_end_time":null,"poll_time_remaining":null,"block":"0","mute":0,"is_follow":"0","followers":1,"followings":5,"session":0,"self":0,"is_wishlist":"0","liked":"0","bluetick":0,"online_status":0,"private":0,"is_reposted_version":true,"is_reposted_by_user":false,"user_repost_type":null,"user_repost_id":null,"user_reposted_at":null,"postId":4344,"postText":"Ai is taking over our jobs soon, I know this because I have a full inbox asking me to apply to help Ai learn simple at home tasks and from work \u0026 get paid 4 every recording, now tell me different?? Comment AI for more info","postTitle":"","is_blog":"0","postkey":"CBSKP","cubeapp_token":"JUMP2607232371","user_token":"JUMP2607232371","pdate":"Mon 09\/14\/26","ptime":"08:50","name":"Josefina Martinez","userId":2371,"username":"jsanchez5984","usertype":"3","profile_photo":"https:\/\/cubesnack-seller.s3.amazonaws.com\/products\/2307261241335859.jpg","cover_photo":null,"is_verified":"0","is_reposted":"1","is_quote":"0","hideLike":"0","commentsoff":"0","source":"1","about_us":"","about_us_full":"","repost_id":"2475","repost_created_at":"2026-09-14 08:50:27"},{"postFiles":[{"imagepath":"https:\/\/cubesnack-seller.s3.amazonaws.com\/products\/1409260852473627.jpg","type":"1","altText":"","link":"","profanity":"0","thumb":"","aspectRatio":"0.84567901234568"},{"imagepath":"https:\/\/cubesnack-seller.s3.amazonaws.com\/products\/1409260852475151.png","type":"1","altText":"","link":"","profanity":"0","thumb":"","aspectRatio":"0.5"},{"imagepath":"https:\/\/cubesnack-seller.s3.amazonaws.com\/products\/1409260852471118.png","type":"1","altText":"","link":"","profanity":"0","thumb":"","aspectRatio":"0.5"}],"postFilesAspectClass":"Vertical","postMap":[],"likes":1,"comments":0,"shares":0,"viewcount":"8","reposted_count":"0","quoteDetails":null,"reposted_by":null,"is_poll":false,"poll_options":[],"has_voted":2,"user_voted_option_id":null,"poll_closed":0,"poll_duration":0,"poll_start_time":null,"poll_end_time":null,"poll_time_remaining":null,"block":"0","mute":0,"is_follow":"0","followers":1,"followings":5,"session":0,"self":0,"is_wishlist":"0","liked":"0","bluetick":0,"online_status":0,"private":0,"is_reposted_version":false,"is_reposted_by_user":false,"user_repost_type":null,"user_repost_id":null,"user_reposted_at":null,"postId":4345,"postText":"","postTitle":"","is_blog":"0","postkey":"CBSKP","cubeapp_token":"JUMP2607232371","user_token":"JUMP2607232371","pdate":"Mon 09\/14\/26","ptime":"08:52","name":"Josefina Martinez","userId":2371,"username":"jsanchez5984","usertype":"3","profile_photo":"https:\/\/cubesnack-seller.s3.amazonaws.com\/products\/2307261241335859.jpg","cover_photo":null,"is_verified":"0","is_reposted":"0","is_quote":"0","hideLike":"0","commentsoff":"0","source":"1","about_us":"","about_us_full":""},{"postFiles":[{"imagepath":"https:\/\/cubesnack-seller.s3.amazonaws.com\/products\/1109260224224244.jpg","type":"1","altText":"Jumpspree","link":"","profanity":"0","thumb":null,"aspectRatio":"1"}],"postFilesAspectClass":"Vertical","postMap":[],"likes":2,"comments":0,"shares":0,"viewcount":"4","reposted_count":"1","quoteDetails":null,"reposted_by":{"user_token":"JUMP2503212006","username":"EverydayAIGuy","name":"Everyday AI Guy","profile_photo":"https:\/\/cubesnack-seller.s3.amazonaws.com\/products\/2606260631105720.jpg","is_verified":"1","is_self":false},"is_poll":false,"poll_options":[],"has_voted":2,"user_voted_option_id":null,"poll_closed":0,"poll_duration":0,"poll_start_time":null,"poll_end_time":null,"poll_time_remaining":null,"block":"0","mute":0,"is_follow":"0","followers":3,"followings":40,"session":0,"self":0,"is_wishlist":"0","liked":"0","bluetick":0,"online_status":0,"private":0,"is_reposted_version":true,"is_reposted_by_user":false,"user_repost_type":null,"user_repost_id":null,"user_reposted_at":null,"postId":4321,"postText":"🌟 Small Steps, Big Dreams 🌟\u003Cbr \/\u003E\r\nSuccess doesn’t happen overnight. It is built through small steps, consistent effort, and the courage to keep going even when things get difficult.There will be days when you feel tired, uncertain, or discouraged. That’s okay. What matters is that you don’t give up on yourself.💪 Keep going.🌱 Believe in y
973ourself.🎯 Focus on progress, not perfection","postTitle":"","is_blog":"0","postkey":"CBSKP","cubeapp_token":"JUMP2412311966","user_token":"JUMP2412311966","pdate":"Mon 09\/14\/26","ptime":"07:51","name":"Junior Firefighter","userId":1966,"username":"codecrafted","usertype":"3","profile_photo":"https:\/\/cubesnack-seller.s3.amazonaws.com\/products\/0809261010074079.jpg","cover_photo":"https:\/\/cubesnack-seller.s3.amazonaws.com\/products\/c5.png","is_verified":"1","is_reposted":"1","is_quote":"0","hideLike":"0","commentsoff":"0","source":"2","about_us":"Great features start with great ideas. Great products protect them. Hey everyone 👋","about_us_full":"Great features start with great ideas. Great products protect them. Hey everyone 👋","repost_id":"2474","repost_created_at":"2026-09-14 07:51:48"}];
974var _preloadedDrafts   = [];
975var _preloadedUserData = [];
976var _hashtagPage = 1; // separate page counter for hashtag feed — reset on each new hashtag selection
977</script>
977
978<!--<link href="https://fonts.googleapis.com/css2?family=Rubik:ital,wght@0,300..900;1,300..900&display=swap" rel="stylesheet">-->
979
980
981
982  <!-- Demo styles -->
983  <style>
984
985    .bookmark-active{
986        filter: invert(0);
987    }
988
989    .bookmark-inactive{
990        filter: invert(1);
991    }
992
993    /* Add to your CSS */
994.repost-success-animation {
995    animation: repostPulse 0.5s ease-in-out;
996}
997
998@keyframes repostPulse {
999    0% { transform: scale(1); }
1000    50% { transform: scale(1.3); }
1001    100% { transform: scale(1); }
1002}
1003
1004.fa-spin {
1005    animation: fa-spin 1s infinite linear;
1006}
1007
1008@keyframes fa-spin {
1009    0% { transform: rotate(0deg); }
1010    100% { transform: rotate(360deg); }
1011}
1012
1013
1014      .repost-btn.share-post .drop-down-menu-share ul li:last-child {
1015    display: block !important;
1016}
1017/*    Bookmark  */
1018.hgi.hgi-stroke.hgi-bookmark-02:before {
1019    content: "" !important;
1020    background: url(https://www.jumpspree.com/public/images/bookmark-02.png?ver:1.03) no-repeat !important;
1021    width: 19px;
1022    height: 19px;
1023    display: block;
1024    /* position: absolute; */
1025    background-size: contain !important;
1026}     
1027.hgi-stroke.hgi-bookmark-check-02:before {
1028    content: "" !important;
1029    background: url(https://www.jumpspree.com/public/images/bookmark-check-02.png?ver:1.02) no-repeat !important;
1030    width: 19px;
1031    height: 19px;
1032    display: block;
1033    /* position: absolute; */
1034    background-size: contain !important;
1035} 
1036 
1037/*    Bookmark  */
1038      
1039    .swiper-slide,    .link-carousel .swiper-slide {
1040    width: 100%;
1041}
1042#posts-container .movie-trailer .link-preview a {
1043    margin-top: 20px;
1044    border: none;
1045}      
1046    .hide{
1047        display: none;
1048    }
1049
1050    .swiper {
1051      width: 100%;
1052      height: 100%;
1053    }
1054    .swiper-slide a {
1055    cursor: grab;
1056}  
1057
1058    .swiper-slide {
1059    text-align: center;
1060    font-size: 18px;
1061    background: transparent;
1062    display: flex;
1063    justify-content: center;
1064    align-items: center;
1065    width: auto;
1066    height: auto
1067}
1068/*
1069.swiper-slide img {
1070    max-height: 259px !important;
1071}      
1072*/
1073
1074.swiper-wrapper.all-horizontal {
1075  border: 3px solid blue;
1076}
1077
1078.swiper-wrapper.all-vertical {
1079  border: 3px solid green;
1080}
1081
1082.swiper-wrapper.mixed-orientation {
1083  border: 3px solid orange;
1084}
1085  </style>
1086  
1087<style>
1088/* Image size    */
1089    .post-text a{cursor: pointer !important}   
1090
1091.owl-carousel-home-feed .owl-item img {
1092    max-height: 390px;
1093    height: 390px !important;
1094    object-fit: cover !important;
1095}     
1096body.dark-mode .blog-main-image .item a {
1097    border: none !important;
1098}
1099.blog-main-image.mb-10.movie-trailer span img {
1100    width: 100% !important;
1101    filter: none !important;
1102}
1103.blog-main-image.mb-10.movie-trailer.alt-link .item.link-preview + div img {
1104    max-height: none;
1105}
1106.repost-wrapper .blog-main-image img {
1107    max-height: inherit;
1108    width: auto !important;
1109    max-width: inherit;
1110}    
1111.email-box .post-text + .blog-main-image {
1112    margin-top: 15px;
1113}
1114/* .blog-main-image a{display: inline-block !important;}*/
1115.blog-main-image img {
1116    border-radius: 11px !important;
1117}    
1118.post-text p:last-child {
1119    margin-bottom: 0;
1120}    
1121    
1122@media screen and (min-width: 768px) {
1123    .swiper-slide.item {
1124    width: auto !important;
1125}
1126#social-popup .swiper-wrapper.singleImage-added .swiper-slide.item {
1127        width: 80% !important;
1128    }   
1129}
1130@media screen and (max-width: 767px) {
1131.swiper-slide {
1132    width: auto !important;
1133}    
1134.three-images .swiper-slide {
1135        min-width: 42% !important;
1136        max-width: 80% !important;
1137        height: 180px;
1138        border-radius: 12px !important;
1139        overflow: hidden;
1140    }
1141.three-images .swiper-slide {
1142        min-width: 42% !important;
1143        max-width: 80% !important;
1144        height: 180px;
1145        border-radius: 12px !important;
1146        overflow: hidden;
1147    }    
1148.hgi.hgi-stroke.hgi-bookmark-02:before {
1149    width: 16px;
1150    height: 16px;
1151}     
1152.hgi-stroke.hgi-bookmark-check-02:before {
1153    width: 16px;
1154    height: 16px;
1155}     
1156div#add-post-top {
1157        position: static !important; 
1158    }    
1159.post-single-image .swiper-slide {
1160    justify-content: left;
1161}    
1162.repost-social {
1163    margin-bottom: 15px;
1164}
1165.email-verification.after-login .email-box {
1166    padding: 25px 15px 20px;
1167}    
1168    .blog-main-image img {
1169        max-height: 440px;
1170    }
1171    .owl-carousel.owl-carousel-home-feed .owl-stage-outer {
1172        overflow-x: auto;
1173        scrollbar-width: none;
1174        -ms-overflow-style: none;
1175        overflow: auto;
1176    } 
1177.owl-carousel.owl-carousel-home-feed .owl-item {
1178    min-width: 40vw;
1179    max-width: 80vw;
1180}
1181    .owl-carousel.owl-carousel-home-feed .owl-item img {
1182        height: 200px !important;
1183        max-width: 100%;
1184        object-fit: cover;
1185    }    
1186    
1187}    
1188/* Image size    */
1189    i.fa-bookmark.fa-solid {
1190    color: #ff44a8;
1191}
1192.email-verification.after-login  .email-box {
1193    border-bottom: 1px solid #ddd;
1194    padding: 25px 25px 20px;
1195}
1196body.light-mode .email-verification.after-login .email-box {
1197    border-bottom: 1px solid #ebebeb;
1198}
1199.blog-main-image.mb-10 {
1200    width: 100%;
1201}  
1202div#posts-container {
1203    width: 100%;
1204}     
1205div#posts-container-product {
1206    width: 100%;
1207}    
1208.social-popup, .social-popup-create-account {
1209    background: #000000c9 !important;
1210}    
1211.hashtag-link {
1212    color: #4859f2;
1213    text-decoration: none;
1214    margin-right: 5px;
1215}
1216.hashtag-link:hover {
1217    color: #5566ff;
1218}
1219
1220body.dark-mode a.profile-link:hover {
1221    color: #fff;
1222}    
1223 
1224.date.ogl li a {
1225    margin: 0;
1226}
1227/* .owl-carousel {
1228    display: block !important;
1229} */
1230 
1231.header-wrapper{z-index: 9 !important;}  
1232.email-box .profile-drop-down ul {
1233       max-width: 320px;
1234    width: 265px;
1235}
1236.email-box .profile-drop-down ul li a {
1237    text-align: left !important;
1238    justify-content: flex-start;
1239}
1240.email-box .profile-drop-down ul li a i {
1241    margin-right: 13px;
1242}
1243
1244.email-box .profile-drop-down ul li a {
1245    text-align: left !important;
1246    justify-content: flex-start;
1247    padding: 7px 0;
1248}
1249.email-box .profile-drop-down ul li a i {
1250    margin-right: 0px;
1251    font-size: 14px;
1252} 
1253.fnc-title a {
1254    margin-right: 0 !important;
1255}    
1256@media screen and (max-width:767px){
1257  
1258 .logo img.logo-hide-on-mob, .hamburger {
1259    opacity: 0 !important;
1260} 
1261    header {
1262        margin-top: 0px;
1263        background: #0a0a0a !important;
1264    }    
1265    
1266/* Padding    */
1267.swiper.mySwiper {
1268    width: 100vw;
1269    margin-left: -25px;
1270    padding: 0 25px;
1271}    
1272
1273/* Padding    */
1274.col-md-3.col-sm-2.left_section {
1275        z-index: 9999999999 !important;
1276    }    
1277.row.justify-content-center.annoucement {
1278        padding-top: 6px !important;
1279    }    
1280body.dark-mode .email-box .date {
1281    border-top: 1px solid #3241585c !important;
1282    border-bottom: 1px solid #3241585c !important;
1283}
1284body.dark-mode .email-verification.after-login .email-box {
1285    border-bottom: 1px solid #3241585c !important;
1286}    
1287    }   
1288
1289
1290.header-wrapper {
1291    z-index: 999 !important;
1292}    
1293body.dark-mode .header-wrapper {
1294    background: #171717 !important;
1295} 
1296    body.dark-mode .post-area{border: none !important}
1297    .email-verification.after-login{
1298    border-left: 1px solid #373737;
1299    border-right: 1px solid #373737;
1300    border-radius: 0;
1301    }    
1302.post-area {
1303    background: #171717;
1304}
1305.email-box {
1306    min-height: 200px;
1307}    
1308/*
1309#posts-container .email-box:last-child .date.ogl {
1310    padding-bottom: 210px;
1311}
1312*/
1313#posts-container .email-box:last-child .drop-down-menu-share {
1314    position: absolute;
1315    bottom: 63px;
1316    border: 1px solid #32415852;
1317    padding: 19px 12px;
1318    border-radius: 16px;
1319    background: #171717;
1320    z-index: 99;
1321    top: inherit;
1322}    
1323/*
1324.email-verification.after-login {
1325    height: 100vh;
1326}    
1327*/
1328    
1329</style>
1330
1331
1332<div class="row justify-content-center annoucement"> 
1333     <!-- left panel START -->  
1334     
1335
1336 
1337 
1338<link rel="stylesheet" href="https://www.jumpspree.com/public/css/all-style.css?ver:2.80">
1339<!--<link rel="stylesheet" href="https://www.jumpspree.com/public/css/Newstyle.css?ver:1.102069101094">-->
1340 
1341<!--<link rel="stylesheet" href="https://www.jumpspree.com/public/css/owl.carousel.min.css">-->
1342<!--<link href="https://www.jumpspree.com/public/css/lightgallery.css?ver:1.05" rel="stylesheet">-->
1343<!--<link rel="stylesheet" href="https://www.jumpspree.com/public/css/jumpspree-app.min.css?ver%3A1002396=v.46">-->
1344<!--<link rel="stylesheet" href="https://www.jumpspree.com/public/css/responsive-cube.css?ver%3A1002102123="> -->
1345<!--<link rel="stylesheet" href="https://cdn.hugeicons.com/font/hgi-stroke-rounded.css" />-->
1346<!--<link rel="stylesheet" href="https://www.jumpspree.com/public/css/commen-left-panel.css?ver%3A1002396=v.52">-->
1347<!-- 23-06-2025  Line 1 to 596 -->
1348
1349<!-- 23-06-2025  Line 1 to 596 -->
1350
1351<div class="social-popup" id="search-box-popup" style="display: none;">
1352    <div class="add-post-inner">
1353        <div class="popup-header">
1354            <h2>Search Coming Soon!</h2>
1355<!--
1356            <div class="cross">
1357                <a href="javascript:void(0)" onclick="$('#search-box-popup').fadeOut('fast')">
1358                    <img src="https://www.jumpspree.com/public/images/cross-icon.png" alt="">
1359                </a>
1360            </div>
1361-->
1362        </div>
1363
1364        <div class="pop-inner">
1365            <p>We’re giving our search a little upgrade to make finding things smoother and faster. It’ll be ready in just a few days! In the meantime, feel free to browse the feed and keep the good vibes going. Thanks for bearing with us!</p>
1366        </div>
1367
1368        <div class="report-foot d-flex justify-content-between">
1369            <div class="send">
1370                <button type="button" class="send"  onclick="$('#search-box-popup').fadeOut('fast')">Sounds good</button>
1371            </div>
1372        </div>
1373    </div>
1374</div>
1375
1376<div class="social-popup" id="feed-refresh-popup" style="display: none;">
1377    <div class="add-post-inner">
1378        <div class="popup-header">
1379            <h2>Feed Refresh, Coming Right Up!</h2>
1380<!--
1381            <div class="cross">
1382                <a href="javascript:void(0)" onclick="$('#feed-refresh-popup').fadeOut('fast')">
1383                    <img src="https://www.jumpspree.com/public/images/cross-icon.png" alt="">
1384                </a>
1385            </div>
1386-->
1387        </div>
1388
1389        <div class="pop-inner">
1390            <p>We’re cooking up a refreshed feed experience to keep things crisp, relevant, and on point. It’ll roll out in the next few days—just a little patience while we make it awesome. Until then, hang tight and enjoy the current vibes!</p>
1391        </div>
1392
1393        <div class="report-foot d-flex justify-content-between">
1394            <div class="send">
1395                <button type="button" class="send" onclick="$('#feed-refresh-popup').fadeOut('fast')">Can’t wait</button>
1396            </div>
1397        </div>
1398    </div>
1399</div> 
1400
1401<div class="animated-line">
1402    <div class="line-inside"></div>
1403</div>
1404 
1405<!-- 23-06-2025  Line 601 to 1024 commen-left-panel.css -->
1406
1407
1408<!-- 23-06-2025  Line 601 to 1024 commen-left-panel.css -->
1409 
1410
1411<!-- 23-06-2025  Line 1038 to 1438 commen-left-panel.css -->
1412
1413
1414<!-- 23-06-2025  Line 1038 to 1438 commen-left-panel.css -->
1415
1416
1417
1418<!-- 23-06-2025  Line 142 to 2447 commen-left-panel.css -->
1419
1420<!-- 23-06-2025  Line 142 to 2447 commen-left-panel.css -->
1421
1422
1423<!-- 23-06-2025  Line 1442 to 2447 commen-left-panel.css -->
1424
1425<!-- 23-06-2025  Line 1442 to 2447 commen-left-panel.css -->
1426
1427
1428
1429<!-- 23-06-2025  Line 2452 to 2830 commen-left-panel.css -->
1430
1431
1432<!-- 23-06-2025  Line 2452 to 2830 commen-left-panel.css -->
1433
1434
1435
1436<!-- 23-06-2025  Line 2834 to 3034 commen-left-panel.css -->
1437
1438
1439<!-- 23-06-2025  Line 2834 to 3034 commen-left-panel.css -->
1440
1441
1442
1443
1444<!--get the app-->
1445
1446<!--get the app-->
1447<script src="https://kit.fontawesome.com/5ad83a3d4f.js"></script>
1447
1448
1449
1450<script>
1451    var base_url = 'https://www.jumpspree.com';  
1452</script>
1452
1453 
1454<!-- BOOT: intercept getCartCount before scripts.js registers its $(document).ready — 2026-05-15
1455     ROLLBACK: remove this block and the one below (get-online-status defer) -->
1456<script>
1457(function () {
1458    if (!window.JumpSocialBoot || !window.$) { return; }
1459    var _orig = $.ajax;
1460    $.ajax = function (opts) {
1461        if (opts && opts.url && String(opts.url).indexOf('getCartCount') !== -1) {
1462            $.ajax = _orig; // restore immediately
1463            window.JumpSocialBoot.defer(function () { _orig(opts); }, 'high');
1464            return;
1465        }
1466        $.ajax = _orig;
1467        return _orig.apply($, arguments);
1468    };
1469}());
1470</script>
vendor: 1 bytes, line 1470
1470
1471<script src="https://www.jumpspree.com/public/js/scripts.js?ver%3A2_20="></script>
1471
1472    
1473
1474<script>
1475$('#shop-entry').click(function() {
1476        $('.profile-menu').hide();
1477        console.log("Shop is activated");
1478        //setActivePage('shop');
1479        // Update active tab
1480        $('#shop-entry').addClass('active');
1481        $('#postlink').removeClass('active');
1482        $('#social-entry').removeClass('active');
1483        sessionStorage.setItem('activeTab', 'shop');
1484        const baseUrl = 'https://www.jumpspree.com';
1485        if (window.location.href !== baseUrl && window.location.href !== baseUrl + '/' && window.location.href !== baseUrl + '/social') {
1486            window.location.href = baseUrl;
1487        }
1488    });
1489    
1490$(document).ready(function() {
1491
1492    // BOOT: defer get-online-status until after feed renders — 2026-05-15
1493    // ROLLBACK: remove the JumpSocialBoot.defer() wrapper and call loadOnlineStatus() directly
1494    var loadOnlineStatus = function () {
1495                // Fetch the current online status when the page loads
1496                $.ajax({
1497                    url: '/get-online-status',
1498                    type: 'GET',
1499                    success: function (response) {
1500                        console.log('Current Status:', response);  
1501                        if (response.status) {
1502                            if (response.onlineStatus == 0) {
1503                                $('#toggle-online-status, #toggle-online-status2').addClass('active').attr('aria-pressed', 'true');
1504                                $('#online-dot').addClass('online-dot');  
1505                                $('#anyone').prop('checked', true);
1506                            } else {
1507                                $('#online-dot').removeClass('online-dot');  
1508                                $('#No-one').prop('checked', true);
1509
1510                                $('#toggle-online-status, #toggle-online-status2').removeClass('active').attr('aria-pressed', 'false');
1511                            }
1512                        } else {
1513                            console.log('Error:', response.message);
1514                        }
1515                    },
1516                    error: function (xhr, status, error) {
1517                        console.error('AJAX Error:', error); // Debug log
1518                    }
1519                });
1520    }; // end loadOnlineStatus
1521    window.JumpSocialBoot ? window.JumpSocialBoot.defer(loadOnlineStatus, 'high') : loadOnlineStatus();
1522
1523                // Toggle online status when button is clicked
1524                $('#toggle-online-status,#toggle-online-status2').on('click', function () {
1525                        $(this).toggleClass('active');
1526                        const onlineDotElement = $('#online-dot');
1527
1528                        const isActive = $(this).hasClass('active');
1529                        const onlineStatus = isActive ? 0 : 2; // Ensure it's a number
1530
1531                        if (onlineStatus === 0) { // Compare as number, not string
1532                            onlineDotElement.addClass('online-dot');  
1533                        } else if (onlineStatus === 2) {
1534                            onlineDotElement.removeClass('online-dot');  
1535                        }
1536
1537                    console.log('Selected onlineStatus:', onlineStatus); // Debug log
1538
1539                    // Send AJAX request to update the online status
1540                    $.ajax({
1541                        url: '/update-online-status',
1542                        type: 'POST',
1543                        data: { onlineStatus: onlineStatus },
1544                        success: function (response) {
1545                            console.log('Server Response:', response); // Debug log
1546                           
1547                            
1548                            
1549                            if (response.status) {
1550                                showNotification('success', response.message);
1551                            } else {
1552                                showNotification('error', response.message);
1553                            }
1554                        },
1555                        error: function (xhr, status, error) {
1556                            console.error('AJAX Error:', error); // Debug log
1557                            showNotification('error', 'An error occurred. Please try again.');
1558                        }
1559                    });
1560                });
1561          
1562        
1563        // Fetch the current online status when the page loads
1564        /* $.ajax({
1565            url: '/get-online-status',
1566            type: 'GET',
1567            success: function(response) {
1568                console.log('Current Status:', response); // Debug: Log the server response
1569                if (response.status) {
1570                    // Set the online-dot class based on the current online status
1571                    if (response.onlineStatus == 0) {
1572                        $('#online-dot').addClass('online-dot'); // Add the class for online status
1573                        // Select the "Anyone" radio button
1574                        $('#anyone').prop('checked', true);
1575                    } else {
1576                        $('#online-dot').removeClass('online-dot'); // Remove the class for offline status
1577                        // Select the "No one" radio button
1578                        $('#No-one').prop('checked', true);
1579                    }
1580                } else {
1581                    console.log('Error:', response.message);
1582                }
1583            },
1584            error: function(xhr, status, error) {
1585                console.error('AJAX Error:', error); // Debug: Log the error
1586            }
1587        }); */
1588    
1589    $('#more-resources a').click(function(e){
1590        e.stopPropagation();
1591        $(this).addClass('active');
1592        $('#more-resources a').next().toggleClass('more-settings');
1593        $('#more-stting a').next().removeClass('more-settings');
1594    })
1595    $('body').click(function(){
1596        $('.more-setting-pop1').removeClass('more-settings');
1597        $('#more-resources a').removeClass('active');
1598        $('#moresetting').removeClass('active')
1599    })
1600    });
1601
1602     document.addEventListener("DOMContentLoaded", function () {
1603        const mainLinks = document.querySelectorAll(".sidebar.target-link");
1604        const allLinks = document.querySelectorAll("a"); // includes submenu <a> too
1605
1606        // Remove existing active classes from main sidebar
1607        mainLinks.forEach(link => link.classList.remove("active"));
1608
1609        // Loop through all <a> tags to find which matches current URL
1610        allLinks.forEach(link => {
1611            const href = link.getAttribute("href");
1612            if (href && href !== "javascript:void(0)" && window.location.href.includes(href)) {
1613                link.classList.add("active");
1614
1615                // Check if it's inside the settings dropdown
1616                const isInSettings = link.closest('.more-setting-pop');
1617                if (isInSettings) {
1618                    const settingsTrigger = document.querySelector("#moresetting");
1619                    if (settingsTrigger) settingsTrigger.classList.add("active");
1620
1621                    // Optional: auto-show dropdown
1622                    const settingsBox = document.querySelector(".more-setting-pop");
1623                    if (settingsBox) settingsBox.style.display = "block";
1624                }
1625
1626                // Similar logic if you have other dropdowns like more resources
1627                const isInResources = link.closest('.more-setting-pop1');
1628                if (isInResources) {
1629                    const resourcesTrigger = document.querySelector("#more-resources > a.sidebar");
1630                    if (resourcesTrigger) resourcesTrigger.classList.add("active");
1631
1632                    const resourcesBox = document.querySelector(".more-setting-pop1");
1633                    if (resourcesBox) resourcesBox.style.display = "block";
1634                }
1635            }
1636        });
1637    });  
1638
1639     // 13 jun riaz below commented code is used for child level active class should be applied on sidebar links
1640   
1641    /* document.addEventListener("DOMContentLoaded", function () {
1642        const sidebarLinks = document.querySelectorAll(".sidebar.target-link");
1643        const allLinks = document.querySelectorAll("a");
1644
1645        // Remove existing active classes
1646        allLinks.forEach(link => link.classList.remove("active"));
1647
1648        // Loop through all <a> tags
1649        allLinks.forEach(link => {
1650            const href = link.getAttribute("href");
1651
1652            if (href && href !== "javascript:void(0)" && window.location.href.includes(href)) {
1653                // Mark only the matched link as active
1654                link.classList.add("active");
1655
1656                // Optional: if link is inside a dropdown, show the dropdown
1657                const moreSettingPop = link.closest('.more-setting-pop');
1658                if (moreSettingPop) {
1659                    moreSettingPop.style.display = 'block'; // show settings dropdown
1660                }
1661
1662                const moreSettingPop1 = link.closest('.more-setting-pop1');
1663                if (moreSettingPop1) {
1664                    moreSettingPop1.style.display = 'block'; // show resources dropdown
1665                }
1666            }
1667        });
1668
1669        // Sidebar click — toggle active manually on top-level items
1670        sidebarLinks.forEach(link => {
1671            link.addEventListener("click", function () {
1672                sidebarLinks.forEach(el => el.classList.remove("active"));
1673                this.classList.add("active");
1674            });
1675        });
1676    }); */
1677
1678
1679</script>
1679
1680
1681<script>
1682
1683$(document).ready(function(){
1684
1685    if (localStorage.getItem('showsigninpopup') == '1') {
1686  $('#signup-new-process').hide();$('#signin-new-process').fadeIn('fast'); $('body').addClass('overflow-hidden');
1687   localStorage.removeItem('showsigninpopup');
1688}
1689 if (localStorage.getItem('showsignuppopup') == '1') {
1690 $('#signup-new-process').fadeIn(); $('body').addClass('overflow-hidden')
1691   localStorage.removeItem('showsignuppopup');
1692}
1693
1694
1695});
1696
1697
1698
1699</script>
1699        
1700    
1701<div class="col-md-3 col-sm-2 left_section" style="position: sticky; top: 90px;">
1702    <div class="left-panel">
1703       <div class="logo-left-new">
1704<!--           <a href=""><img src="https://www.jumpspree.com/public/images/Jumpspree---Logo.png?ver:1.008" alt=""></a>-->
1705<!--           <a href="https://www.jumpspree.com"><img src="https://www.jumpspree.com/public/images/logo-white-jumpspree.png?ver:1.008" loading="lazy" alt="jumspree logo" title=""></a>-->
1706           <a href="https://www.jumpspree.com"><img src="https://www.jumpspree.com/public/images/logo-left.png?ver:1.008" loading="lazy" alt="jumspree logo" title=""></a>
1707       </div>
1708        <div>
1709        
1710
1711
1712            <div class="navigation">
1713                              <ul class="hide-on-mob">  
1714<!--                 <a href="javascript:void(0)" onclick="$('#signup-new-process').hide();$('#signin-new-process').fadeIn('fast'); $('body').addClass('overflow-hidden');" -->
1715                  <li><a href="https://www.jumpspree.com/sign-in" 
1716                  style="background: transparent !important; border-top: none;border-left: none; border-right: none;display: flex;align-items: center;"><span><i class="hgi hgi-stroke hgi-sharp hgi-login-01" style="transform:rotate(180deg);margin-left: -7px;margin-right: 11px;"></i> Sign in</span> <i class="hgi hgi-stroke hgi-arrow-right-01"></i></a></li>
1717<!--                   <li><a href="https://www.jumpspree.com/sign-up" style="    display: flex;align-items: center;"><span><i class="hgi hgi-stroke hgi-at"></i> Sign up</span> <i class="hgi hgi-stroke hgi-arrow-right-01"></i></a></li>-->
1718<!--                <a href="javascript:void(0)" onclick="$('#signup-new-process').fadeIn(); $('body').addClass('overflow-hidden')"-->
1719                      <li><a href="https://www.jumpspree.com/sign-up" style="display: flex;align-items: center;"><span><i class="hgi hgi-stroke hgi-at"></i> Sign up</span> <i class="hgi hgi-stroke hgi-arrow-right-01"></i></a></li>      
1720                       
1721<!--                       <li><a href="https://www.jumpspree.com/download-the-official-jumpspree-app-for-ios-and-android" style="    display: flex;align-items: center;"><span><img src="https://www.jumpspree.com/public/images/Jumpspree-ico.png" class="get-the-app" alt="Get the app" title="Get the app"> Get the app</span> <i class="hgi hgi-stroke hgi-arrow-right-01"></i></a></li>-->
1722                        <li><a href="https://www.jumpspree.com/download-the-official-jumpspree-app-for-ios-and-android" style="    display: flex;align-items: center;"><span><img src="https://www.jumpspree.com/public/images/grad-new.png" style="border-radius: 5px;" class="get-the-app" alt="Get the app" title="Get the app"> Get the app</span> <i class="hgi hgi-stroke hgi-arrow-right-01"></i></a></li>
1723               </ul>
1724                 
1725                <ul class="home-navigation">
1726                    
1727                    <li id="social-entry">
1728                        <a href="javascript:void(0)" id="postlink" class="sidebar target-link active" onclick="getSocialFeed('3','1','1')">
1729                            <span class="route_title">
1730<!--                            <i class="hgi hgi-stroke hgi-home-01"></i>-->
1731                            <img src="https://www.jumpspree.com/public/images/home-outline.png" class="home-icon-outline"  alt="Home" title="Home">
1732                            <img style="display:none" src="https://www.jumpspree.com/public/images/home-fill.png" class="home-icon-fill"  alt="Home" title="Home">
1733                              <span class="bottom-menu-text">Home</span></span>
1734<!--                            <span class="route_title"><i class="fa-regular fa-sparkles"></i> Social</span>-->
1735                        </a>
1736                    </li>
1737                    <li id="shop-entry">
1738                        <a href="/shop" class="sidebar target-link" id="shoplinkforweb">
1739                            <span class="route_title">
1740                                <img src="https://www.jumpspree.com/public/images/shopping-outlinw.png" class="shop-icon-outline" alt="Shop" title="Shop">
1741                                <img style="display:none" src="https://www.jumpspree.com/public/images/shopping-fill.png" loading="lazy" class="shop-icon-fill" alt="Shop" title="Shop">
1742                                <span class="bottom-menu-text">Shop</span>
1743                            </span>
1744                        </a>
1745
1746                                        <input type="hidden" name="dashboard" id="dashboard"> 
1747                                         <input type="hidden" name="productType" id="productType" value="1">
1748                                         <input type="hidden" name="subcategory" id="subcategory" value="0">
1749                                         <input type="hidden" name="category" id="category" value="0">
1750                                         <input type="hidden" name="datatype" id="datatype" value="0">
1751                                         <input type="hidden" name="pageCount" id="pageCount" value="2">
1752                    </li>
1753                   
1754<!--
1755                   <li>
1756                        <a href="https://www.jumpspree.com/shop">
1757                        <span class="route_title">
1758                        <img src="https://www.jumpspree.com/public/images/shopping-outlinw.png" class="shop-icon-outline"  alt="Shop" title="Shop">
1759                            <img style="display:none" src="https://www.jumpspree.com/public/images/shopping-fill.png" class="shop-icon-fill"  alt="Shop" title="Shop">  <span class="bottom-menu-text" style="color:#fff">Shop</span></span></a>
1760                    </li>
1761-->
1762                    
1763                    <li id="live-stream-btn">
1764                        <a href="https://www.jumpspree.com/start-streaming">
1765                        <span class="route_title">
1766                        <img src="https://www.jumpspree.com/public/images/sellerpad/live-streaming.png" class="home-icon-outline"  alt="Home" title="Home">  <span class="bottom-menu-text">Livestreams</span></span></a>
1767                    </li>
1768                      
1769                       <li id="live-stream-btn">
1770                        <a href="https://www.jumpspree.com/seller-pad/live-streams">
1771                        <span class="route_title">
1772                        <img src="https://www.jumpspree.com/public/images/sellerpad_new.png" class="home-icon-outline sellerpad-icon"  alt="Home" title="Home">  <span class="bottom-menu-text">Seller Pad</span></span></a>
1773                    </li>
1774                       
1775                    <li id="feed-btn" style="display:none">
1776                        <a href="https://www.jumpspree.com/">
1777                        <span class="route_title">
1778                        <img src="https://www.jumpspree.com/public/images/user-list-stroke-rounded.png" class="home-icon-outline" style="filter:invert()" alt="Home" title="Home" loading="lazy">  <span class="bottom-menu-text">Feed</span></span></a>
1779                    </li>
1780                    
1781                    <li class="create-button-footer">
1782                                                 <a href="javascript:void(0)" onclick="$('#signin-new-process').fadeIn('fast')"  id="shoplinkforweb"  class="sidebar target-link">
1783                            <span class="route_title"><i class="hgi hgi-stroke hgi-plus-sign-square"></i> <span class="bottom-menu-text">Create</span></span>
1784                        </a>
1785                          
1786                    </li>
1787                   
1788                    <li class="message-btn-left">
1789                        <a href="javascript:void(0)"
1790                            onclick="$('#signin-new-process').fadeIn('fast'); $('body').addClass('overflow-hidden');" id="shoplinkforweb"  class="sidebar target-link">
1791                            <span class="route_title" style="position:relative;"><i class="hgi hgi-stroke hgi-message-02" aria-hidden="true"></i> <span class="bottom-menu-text">Messages</span><span id="msg-unread-badge" style="display:none;position:absolute;top:-9px;right:-13px;background:#e74c3c;color:#fff;border-radius:50%;font-size:9px;min-width:16px;height:16px;line-height:16px;text-align:center;padding:0 3px;"></span></span>
1792                        </a>
1793                    </li>
1794
1795                    <li class="js-more" style="display:none">
1796                        <a href="https://www.jumpspree.com/signin"  class="sidebar target-link">
1797                            <span class="route_title"><img src="https://www.jumpspree.com/public/images/more-icon-check.png" loading="lazy" alt="Jumpspree More" title="Jumpspree More" style="width:18px; margin-right:5px"> Jumpspree More</span>
1798                        </a>
1799                    </li>
1800                        
1801                    <li style="display:none">
1802                        <a href="javascript:void(0)" id="postlink" class="sidebar target-link active" onclick="getSocialFeed('3','1','1')">
1803                            <span class="route_title"><i class="fa-regular fa-sparkles"></i> Refer and Eran </span>
1804                        </a>
1805                    </li>
1806                        <li style="display:none">
1807                        <a href="javascript:void(0)" id="postlink" class="sidebar target-link active" onclick="getSocialFeed('3','1','1')">
1808                            <span class="route_title"><i class="fa-regular fa-sparkles"></i> Refer &amp; Eran </span>
1809                        </a>
1810                    </li>
1811                    <li id="message-icon-footer">
1812                        <a onclick="$('.profile-menu').hide();" href="javascript:void(0)" class="sidebar target-link">
1813                            <span class="route_title"><i class="fa-regular fa-message-lines"></i> Messages</span>
1814                        </a>
1815                    </li>
1816                    
1817                    <!-- <li id="profile-icon-footer">
1818                        <a onclick="$('.profile-menu').show(); $('.add-more-post').addClass('hide-plus')" href="javascript:void(0)" class="sidebar target-link">
1819                            <span class="route_title">
1820                                
1821                            <i class="fa-sharp fa-regular fa-circle-user"></i> Profile</span>
1822                        </a>
1823                    </li> -->
1824
1825                                            <li id="profile-icon-footer">
1826                                                   <a  href="javascript:void(0)" onclick="$('#signin-new-process').fadeIn('fast')" class="sidebar target-link">
1827                            <span class="route_title">
1828                                <img src="https://www.jumpspree.com/public/images/user-icon.png" alt="Profile" title="Profile" style="width: 30px; height: 30px; border-radius: 50%; object-fit: cover;">
1829                                <span class="bottom-menu-text"> Profile</span>
1830                            </span>
1831                        </a>
1832                    </li>
1833                        
1834
1835
1836<!--
1837                    <ul style="display:none">
1838                        <li id="light-mode-on" class="light-mode">
1839                            <a href="javascript:void(0)" class="sidebar" onclick="toggleMode('light')">
1840                                <span class="route_title"><i class="fa-solid fa-brightness-low"></i>Switch to Light Mode</span>
1841                            </a>
1842                        </li>
1843                        <li id="dark-mode-on" class="dark-mode">
1844                            <a href="javascript:void(0)" class="sidebar" onclick="toggleMode('dark')">
1845                                <span class="route_title"><i class="fa-solid fa-moon"></i> Switch to Night Mode</span>
1846                            </a>
1847                        </li>
1848                    </ul>
1849-->
1850
1851
1852                </ul>
1853                                
1854                       
1855
1856                
1857                <li id="more-resources">
1858                        <a class="sidebar"  href="javascript:void(0)"> 
1859                            <span class="route_title" style="    display: flex !important;align-items: center !important;">
1860                                <img src="https://www.jumpspree.com/public/images/information-circle-stroke.png?ver:1.02" class="left-info-icon" alt="Resources" title="Resources"> 
1861                            Resources 
1862                            </span>
1863                        </a>
1864                                                
1865                        <div class="more-setting-pop1">
1866                            <ul style="margin-bottom:0">
1867                                 <li><a href="https://www.jumpspree.com/frequently-asked-questions" target="_blank">FAQs</a></li>
1868                                 <li><a href="https://www.jumpspree.com/blog"  target="_blank">Blog</a></li>
1869                                 <li><a href="https://www.jumpspree.com/selling-fees"  target="_blank">Selling Fees  </a></li>
1870<!--                            <li><a href="#"  target="_blank">Seller Resources</a></li>-->
1871<!--                            <li><a href="https://www.jumpspree.com/selling-fees"  target="_blank">Shipping Guidelines</a></li>-->
1872                            <li><a href="https://www.jumpspree.com/livestream-returns"  target="_blank">Livestream Returns</a></li>
1873                            <li><a href="https://www.jumpspree.com/return-policy"  target="_blank">Return Policy</a></li>
1874                            <li><a href="https://www.jumpspree.com/terms-of-use"  target="_blank">Terms of Use</a></li>
1875                            <li><a href="https://www.jumpspree.com/privacy-policy"  target="_blank">Privacy Policy</a></li>
1876                                    <!--    <li class="logout-btn"><a href="#">Log Out</a></li>-->
1877                            </ul>
1878                        </div>
1879                    </li>
1880                                <li style="opacity: 0; display:none">
1881                    <a href="javascript:void(0)" id="postlink" class="sidebar target-link active" onclick="$('#jumpspree-more').fadeIn('fast')">
1882                        <span class="route_title"><i class="fa-regular fa-sparkles"></i>  Jumpspree More</span>
1883                    </a>
1884                </li>
1885            </div>
1886        </div>
1887
1888<!--
1889        <div class="login login-sm">
1890            <div class="login_signup_btn">
1891                <a href="javascript:void(0)" onclick="openSignInWrapper()">Sign In</a>
1892                <a href="https://www.jumpspree.app/signup" class="create-accont-btn">Sign Up</a>
1893            </div>
1894        </div>
1895-->
1896    </div>
1897
1898    <div class="add-post" style="display:none">
1899       Create
1900        <div class="plus-wrapper">
1901          
1902            <img src="https://www.jumpspree.com/public/images/add-post.png?ver%3A1_2=" alt="Add Post" title="Add Post" loading="lazy">
1903        </div>
1904        <div class="add-post-drop-box">
1905            <ul>
1906<!--
1907                <li>
1908                    <span><i class="fa-solid fa-feather"></i></span>
1909                    <a href="javascript:void(0)">Product Listing</a>
1910                </li>
1911-->
1912                <!-- <li>
1913                    <span onclick="$('#social-popup').fadeIn('fast'); $('body').addClass('overflow-hidden'); $('.add-post-drop-box').hide(); $('.social-shadow').hide(); $('.add-post').removeClass('add-post-opened');"><img src="https://www.jumpspree.com/public/images/social.png?ver%3A1_2=" alt=""></span>
1914                    <a href="javascript:void(0)" onclick="$('#social-popup').fadeIn('fast'); $('body').addClass('overflow-hidden'); $('.add-post-drop-box').hide(); $('.social-shadow').hide(); $('.add-post').removeClass('add-post-opened');">Social Post</a>
1915                </li>  -->
1916<!--
1917                <li>
1918                    <a href="javascript:void(0)" onclick="$('#blog-post').fadeIn('fast'); $('body').addClass('overflow-hidden'); $('.add-post-drop-box').hide(); $('.social-shadow').hide(); $('.plus-wrapper').removeClass('add-post-opened')">Write an Article</a>
1919                    <span><i class="fa-regular fa-calendar-lines-pen"></i></span>
1920                </li>
1921-->
1922                <!-- <li>
1923                    <span onclick="window.location.href='href="https://www.jumpspree.com/add-article"'"><img src="https://www.jumpspree.com/public/images/article.png?ver%3A1_2=" alt="blank" title="blank"></span>
1924                    <a href="https://www.jumpspree.com/add-article">Article</a>
1925                </li> -->
1926                
1927
1928            <li> 
1929                 
1930                    <span><a href="javascript:void(0)" onclick="$('#signup-new-process').hide();$('#signin-new-process').fadeIn('fast')"><img src="https://www.jumpspree.com/public/images/social.png?ver%3A1_2=" alt="Social Post" title="Social Post"></a></span>
1931                    <a href="javascript:void(0)" onclick="$('#signup-new-process').hide();$('#signin-new-process').fadeIn('fast')">Social Post</a>
1932
1933
1934                            </li>
1935
1936            <li style="display:none">
1937                <span><a 
1938  href="javascript:void(0);" 
1939  onclick="$('#signup-new-process').hide(); $('#signin-new-process').fadeIn('fast');">
1940  <img src="https://www.jumpspree.com/public/images/article.png?ver%3A1_2=" alt="Article" title="Article">
1941</a></span>
1942                <a href="javascript:void(0);" 
1943      onclick="$('#signup-new-process').hide(); $('#signin-new-process').fadeIn('fast');"
1944  >
1945  Article
1946</a>
1947            </li>
1948
1949
1950
1951            </ul>
1952        </div>
1953    </div> 
1954    <div class="add-post">
1955                              <a href="javscript:void(0)" onclick="$('#signup-new-process').hide();$('#signin-new-process').fadeIn('fast')" style="display: block;width: 100%;text-align: left;">
1956                        <span style="width: 100%;text-align: left;">
1957                            Create </span></a> <div class="plus-wrapper" style="flex-shrink: 0;">
1958          <a href="javascript:void(0)" onclick="$('#signup-new-process').hide();$('#signin-new-process').fadeIn('fast')">
1959            <img src="https://www.jumpspree.com/public/images/plus-icon.png?ver%3A1_2=" alt="Add Post" title="Add Post">
1960        </a>
1961        </div>
1962                           
1963                        
1964        
1965        <div class="add-post-drop-box">
1966            <ul>
1967<!--
1968                <li>
1969                    <span><i class="fa-solid fa-feather"></i></span>
1970                    <a href="javascript:void(0)">Product Listing</a>
1971                </li>
1972-->
1973                <!-- <li>
1974                    <span onclick="$('#social-popup').fadeIn('fast'); $('body').addClass('overflow-hidden'); $('.add-post-drop-box').hide(); $('.social-shadow').hide(); $('.add-post').removeClass('add-post-opened');"><img src="" alt=""></span>
1975                    <a href="javascript:void(0)" onclick="$('#social-popup').fadeIn('fast'); $('body').addClass('overflow-hidden'); $('.add-post-drop-box').hide(); $('.social-shadow').hide(); $('.add-post').removeClass('add-post-opened');">Social Post</a>
1976                </li>  -->
1977<!--
1978                <li>
1979                    <a href="javascript:void(0)" onclick="$('#blog-post').fadeIn('fast'); $('body').addClass('overflow-hidden'); $('.add-post-drop-box').hide(); $('.social-shadow').hide(); $('.plus-wrapper').removeClass('add-post-opened')">Write an Article</a>
1980                    <span><i class="fa-regular fa-calendar-lines-pen"></i></span>
1981                </li>
1982-->
1983                <!-- <li>
1984                    <span onclick="window.location.href='href="https://www.jumpspree.com/add-article"'"><img src="https://www.jumpspree.com/public/images/article.png?ver%3A1_2=" alt=""></span>
1985                    <a href="https://www.jumpspree.com/add-article">Article</a>
1986                </li> -->
1987                
1988
1989            <li> 
1990                 
1991                    <span><a href="javascript:void(0)" onclick="$('#signup-new-process').hide();$('#signin-new-process').fadeIn('fast')"><img src="https://www.jumpspree.com/public/images/social.png?ver%3A1_2=" alt="Social" title="Social"></a></span>
1992                    <a href="javascript:void(0)" onclick="$('#signup-new-process').hide();$('#signin-new-process').fadeIn('fast')">Social Post</a>
1993
1994
1995                            </li>
1996
1997            <li style="display:none">
1998                <span><a 
1999  href="javascript:void(0);" 
2000  onclick="$('#signup-new-process').hide(); $('#signin-new-process').fadeIn('fast');">
2001  <img src="https://www.jumpspree.com/public/images/article.png?ver%3A1_2=" alt="Article" title="Article">
2002</a></span>
2003                <a 
2004  href="javascript:void(0);" 
2005  onclick="$('#signup-new-process').hide(); $('#signin-new-process').fadeIn('fast');">
2006  Article
2007</a>
2008
2009            </li>
2010
2011
2012
2013            </ul>
2014        </div>
2015    </div> 
2016    
2017    <div class="social-shadow"></div>
2018</div>
2019
2020
2021<style>
2022/* Top nav bar    */
2023.post-area .top-nav-bar{
2024    margin-top: -50px;
2025    z-index: 9999;
2026    position: relative;
2027    display: none !important;
2028}
2029.product-section .date.ogl.pt-0 {
2030    padding: 0px 0px 0px !important;
2031}    
2032.product-section .date.ogl.pt-0 span.c-img{
2033    margin-bottom: 0;
2034    }
2035.post-area .curved-box {
2036/*    top: 139px;*/
2037    top: 90px;
2038}    
2039.annoucement .email-verification.after-login {
2040/*    margin-top: 45px !important;*/
2041    margin-top: 0px !important;
2042}    
2043.top-nav-bar .left-curve img {
2044    width: 100px;
2045}   
2046.top-nav-bar .right-curve img {
2047    height: 18px;
2048}    
2049.top-nav-bar .right-curve {
2050    gap: 20px;
2051    display: flex;
2052    margin-top: 1px;
2053}
2054.top-nav-bar  a.refresh-icon {
2055    border: 1px solid #19212c;
2056    border-radius: 50%;
2057    width: 37px;
2058    height: 37px;
2059    text-align: center;
2060    display: flex;
2061    align-items: center;
2062    justify-content: center;
2063}
2064/* Top nav bar    */
2065@media screen and (max-width:767px){
2066    body.dark-mode {
2067    background: #0a0a0a !important;
2068}
2069.annoucement .email-verification.after-login {
2070    margin-top: 0px !important;
2071}    
2072    }
2073</style>
2074
2075     
2076    
2077<!--
2078<div class="get-app-qr-code-wrapper" id="getstart-popup" style="display: none;"> 
2079    <div class="email-verification after-login">
2080       <div class="close-getstart" onclick="$('#getstart-popup').fadeOut('fast');">&times;</div>
2081        <div class="email-box">
2082          <div class="getstart-icon">
2083                <img src="https://www.jumpspree.com/public/images/mob-icon.png" alt="Graphic" title="Graphic">
2084           </div>
2085            <h4 class="text-center">Jumpspree works best <br>in the app.</h4>
2086
2087
2088            
2089
2090            
2091
2092            <div class="note-line">
2093                <p class="mb-0">Enjoy a premium experience with advanced <br>features and even more exciting content on <br>the Jumpspree app.</p>
2094            </div>
2095
2096           <div class="download-btn">
2097               <a  class="get-app-btn" href="javascript:void(0)" onclick="$('#getstart-popup').fadeOut('fast');$('#ios-app').fadeIn('fast')"><img src="https://www.jumpspree.com/public/images/ios-download.png" alt="IOS icon" title="IOS icon"></a>
2098                <a  href="javascript:void(0)" onclick="$('#getstart-popup').fadeOut('fast');$('#android-app').fadeIn('fast')"><img src="https://www.jumpspree.com/public/images/download-android.png" alt="Download" title="Download"></a>
2099            </div>
2100
2101
2102
2103        </div>
2104      
2105    </div>
2106</div>
2107-->
2108  <!-- //onclick="$('#search-box-popup').fadeIn()" -->
2109    <!-- Center panel START POST BLOG POLL--> 
2110    <div style="display:block"  id="postBlogDiv"   class="col-md-6">
2111       <h1 class="sr-only" style="position: absolute;
2112    width: 1px;
2113    height: 1px;
2114    padding: 0;
2115    margin: -1px;
2116    overflow: hidden;
2117    clip: rect(0, 0, 0, 0);
2118    white-space: nowrap;
2119    border-width: 0;">Social Shopping Platform to Share, Shop, & Earn</h1>  
2120        <div  class="post-area">
2121         <div class="curve-area-top">
2122            <div class="search-ben"><a href="javascript:void(0)" onclick="$('#search-popup-wrapper-new').fadeIn('fast'); $('body').addClass('overflow-hidden');" ><img src="https://www.jumpspree.com/public/images/lense--search.png" alt="Search" title="Search"></a></div>
2123             <div class="get-more-class get-more-mob"><a class="share-url" href="javascript:void(0)" onclick="getmorepopup()" style="    border-radius: 53px;
2124    padding: 0px 20px;
2125    margin-right: 0;
2126    border: none;
2127    background: #111;
2128    height: 35px;
2129    display: flex;
2130    align-items: center;
2131    justify-content: center;
2132    padding: 0 9px;
2133    font-size: 12px"><img src="https://www.jumpspree.com/public/images/blue-cube-3d.png" alt="blue-cube" title="blue cube" style="margin-right: 5px;
2134    color: #fff;
2135    filter: invert(0) !important;
2136    width: 16px !important;
2137    margin-top: 0px;"> Get MORE</a></div>
2138        
2139        <!-- <div class="reload"><a href="javascript:void(0)" onclick="$('#feed-refresh-popup').fadeIn()" class="refresh-icon"><img src="https://www.jumpspree.com/public/images/refresh.png" alt="Jumpspree"></a></div> -->
2140         <div class="reload"><a href="javascript:void(0)" onclick="getSocialFeed('3','1','0','')" class="refresh-icon"><img src="https://www.jumpspree.com/public/images/refresh.png" alt="refresh" title="refresh"></a></div>
2141         </div>
2142          <div id="fixed-heading-hashTag" style="display:none" class="curved-box fixed-heading">
2143                    <div style="display:none" id="hashTagsDiv" class="hashTagsDiv">
2144                    
2145                        <div class="back-btn">
2146                               <!--  <a href="#" onclick="$('#step2-wrapper').hide(); $('#step1-wrapper').fadeIn(); ">
2147                                    <i class="fa-solid fa-arrow-left-long" aria-hidden="true"></i></a> -->
2148                                    <a href="javascript:void(0);" onclick="handleBackButtonClick()">
2149                                        <img src="https://www.jumpspree.com/public/images/arrow-left.png" alt="Back" title="Back" style="filter:invert(0); height: auto; width:13px">
2150                                    </a>
2151                        </div>
2152                                <input type="hidden" value="" id="hashTagValue" name="hashTagValue" /> 
2153                                <h2 id="currentHashTag">#Inspiration</h2>
2154                        
2155                                <div class="cancel"><span onclick="window.location.href='https://www.jumpspree.com/social'">Cancel</span></div>
2156                            
2157                        </div>
2158                   </div>
2159                 
2160                   
2161           <div class="curved-box">
2162               <div class="top-nav-bar d-flex justify-content-between align-items-center">
2163                                <div class="left-curve">
2164
2165                                <a class="share-url" href="javascript:void(0)" onclick="$('#jumpspree-more-popup').fadeIn('fast')"><img src="https://www.jumpspree.com/public/images/more-icon-check.png" alt="Get MORE" title="Get MORE"> Get MORE</a>
2166
2167                                <a class="share-url" href="javascript:void(0)" onclick="copyLink(event)">
2167<img src="https://www.jumpspree.com/public/images/share-url.png" alt="Share Jumpspree" title="Share Jumpspree" style="width: 16px !important;"> Share Jumpspree</a>
2168                                <span style="display:none" class="form-label copySuccessMsg" id="copySuccessMsg"><img src="https://www.jumpspree.com/public/images/copy-check.png" alt="Copy" title="Copy" style="width: 13px !important;">  Link copied! paste it anywhere to share.</span> 
2169
2170                                </div>
2171
2172                                <div class="right-curve" style="opacity:1">
2173                                    <a href="#" class="refresh-icon" onclick="refreshFeed(event)"><img src="https://www.jumpspree.com/public/images/refresh-icon.png" alt="refresh" title="refresh" loading="lazy"></a>
2174                                </div>
2175                                </div>
2176
2177                                
2178                <!--
2179                            <div class="left-curve"></div>
2180                            <div class="right-curve"></div>
2181                -->
2182           </div>
2183                        <div class="email-verification after-login">
2184                   
2185                      
2186                <div class="add-post-top" id="add-post-top"> 
2187                    <!--  <div class="search-main-top"> 
2188                        <input type="text" placeholder="Search"> 
2189                    </div> -->
2190                <div class="d-flex align-items-center justify-content-between wts-jumping">
2191                    <div class="user-wrapper">
2192
2193                    
2194                                
2195                                <div class="user-icon"> 
2196                                 
2197                                <div id="online-dot-" class="user-online"></div>
2198
2199                                    <img src="https://www.jumpspree.com/public/images/user-icon.png" alt="User-Icon" title="User-Icon">
2200                                </div>
2201                                                           <div class="user-name" onclick="$('#signup-new-process').hide();$('#signin-new-process').fadeIn('fast'); $('body').addClass('overflow-hidden');">Create a new post</div>
2202                                
2203
2204                        </div>
2205                        
2206                            <div class="create"><a   href="javascript:void(0)" onclick="$('#signin-new-process').fadeIn('fast'); $('body').addClass('overflow-hidden');"   >Create</a>
2207                            </div>
2208                           
2209
2210
2211                </div>
2212            </div>
2213            
2214            
2215            <div id="feed-and-stream-switcher" style="display:none">
2216                <ul>
2217                    <li><a href="https://www.jumpspree.com/start-streaming">Livestreams</a></li>
2218                    <li><a href="https://www.jumpspree.com/start-streaming" class="activel">Feed</a></li>
2219                </ul>
2220            </div>
2221            
2222 
2223            <div id="posts-container" class="product-section"> <!-- here all email-box div dynamically added from JS -->
2224                <!-- Posts will be appended here dynamically -->
2225     
2226            </div>  
2227            <div id="posts-container-product"> <!-- here all email-box div dynamically added from JS -->
2228                <!-- Posts will be appended here dynamically -->
2229     
2230            </div>  
2231
2232            
2233            <div id="posts-container-hashTags"> <!-- here all email-box div dynamically added from JS -->
2234                <!-- Posts will be appended here dynamically -->
2235     
2236            </div> 
2237           <!--  <div id="loader" style="display: none;">Loading... 
2238            
2239            </div>-->
2240            <div id="skeleton-container" style="display: block; width: 100%;">
2241                <div class="skeleton-loader">
2242                    <!-- Repeat this block for as many skeletons as you want -->
2243                    <div class="email-box">
2244                        <div class="row">
2245                            <div class="col-md-12">
2246                                <div class="fnc mt-0 justify-content-between mb-9 align-items-start">
2247                                    <div class="d-flex">
2248                                        <div class="fig">
2249                                            <div class="skeleton-circle"></div>
2250                                        </div>
2251                                        <div class="fnc-title">
2252                                            <div class="skeleton-title"></div>
2253                                            <div class="skeleton-username"></div>
2254                                        </div>
2255                                    </div>
2256                                </div>
2257                            </div>
2258                        </div>
2259                        <div class="row">
2260                            <div class="col-md-12">
2261                                <div class="skeleton-title-feed"></div>
2262                                <div class="skeleton-image"></div>
2263                            </div>
2264                        </div>
2265                    </div>
2266                    
2267                    
2268<!--
2269                    <div class="hello">
2270                         <div class="swiper mySwiper">
2271    <div class="swiper-wrapper">
2272      <div class="swiper-slide">Slide 1</div>
2273      <div class="swiper-slide">Slide 2</div>
2274      <div class="swiper-slide">Slide 3</div>
2275      <div class="swiper-slide">Slide 4</div>
2276      <div class="swiper-slide">Slide 5</div>
2277      <div class="swiper-slide">Slide 6</div>
2278      <div class="swiper-slide">Slide 7</div>
2279      <div class="swiper-slide">Slide 8</div>
2280      <div class="swiper-slide">Slide 9</div>
2281    </div>
2282    <div class="swiper-pagination"></div>
2283  </div>
2284                    </div>
2285-->
2286                    <!-- End of skeleton block -->
2287                    <div class="email-box">
2288                        <div class="row">
2289                            <div class="col-md-12">
2290                                <div class="fnc mt-0 justify-content-between mb-9 align-items-start">
2291                                    <div class="d-flex">
2292                                        <div class="fig">
2293                                            <div class="skeleton-circle"></div>
2294                                        </div>
2295                                        <div class="fnc-title">
2296                                            <div class="skeleton-title"></div>
2297                                            <div class="skeleton-username"></div>
2298                                        </div>
2299                                    </div>
2300                                </div>
2301                            </div>
2302                        </div>
2303                        <div class="row">
2304                            <div class="col-md-12">
2305                                <div class="skeleton-title-feed"></div>
2306                                <div class="skeleton-image"></div>
2307                            </div>
2308                        </div>
2309                    </div>
2310                    <div class="email-box">
2311                        <div class="row">
2312                            <div class="col-md-12">
2313                                <div class="fnc mt-0 justify-content-between mb-9 align-items-start">
2314                                    <div class="d-flex">
2315                                        <div class="fig">
2316                                            <div class="skeleton-circle"></div>
2317                                        </div>
2318                                        <div class="fnc-title">
2319                                            <div class="skeleton-title"></div>
2320                                            <div class="skeleton-username"></div>
2321                                        </div>
2322                                    </div>
2323                                </div>
2324                            </div>
2325                        </div>
2326                        <div class="row">
2327                            <div class="col-md-12">
2328                                <div class="skeleton-title-feed"></div>
2329                                <div class="skeleton-image"></div>
2330                            </div>
2331                        </div>
2332                    </div>
2333                    <div class="email-box">
2334                        <div class="row">
2335                            <div class="col-md-12">
2336                                <div class="fnc mt-0 justify-content-between mb-9 align-items-start">
2337                                    <div class="d-flex">
2338                                        <div class="fig">
2339                                            <div class="skeleton-circle"></div>
2340                                        </div>
2341                                        <div class="fnc-title">
2342                                            <div class="skeleton-title"></div>
2343                                            <div class="skeleton-username"></div>
2344                                        </div>
2345                                    </div>
2346                                </div>
2347                            </div>
2348                        </div>
2349                        <div class="row">
2350                            <div class="col-md-12">
2351                                <div class="skeleton-title-feed"></div>
2352                                <div class="skeleton-image"></div>
2353                            </div>
2354                        </div>
2355                    </div>
2356                    <div class="email-box">
2357                        <div class="row">
2358                            <div class="col-md-12">
2359                                <div class="fnc mt-0 justify-content-between mb-9 align-items-start">
2360                                    <div class="d-flex">
2361                                        <div class="fig">
2362                                            <div class="skeleton-circle"></div>
2363                                        </div>
2364                                        <div class="fnc-title">
2365                                            <div class="skeleton-title"></div>
2366                                            <div class="skeleton-username"></div>
2367                                        </div>
2368                                    </div>
2369                                </div>
2370                            </div>
2371                        </div>
2372                        <div class="row">
2373                            <div class="col-md-12">
2374                                <div class="skeleton-title-feed"></div>
2375                                <div class="skeleton-image"></div>
2376                            </div>
2377                        </div>
2378                    </div>
2379                </div>
2380            </div>
2381
2382
2383
2384        </div>
2385 
2386    </div>
2387    <!-- Center panel END POST BLOG POLL --> 
2388
2389
2390
2391
2392
2393
2394    
2395</div>
2396    <style>
2397    .trending-post-skeleton {
2398        width: 150px;
2399        height: 150px;
2400    }
2401
2402    .skeleton-image {
2403        width: 100%;
2404        height: 75%;
2405        background-color: #e0e0e0;
2406        border-radius: 8px;
2407        position: relative;
2408        overflow: hidden;
2409    }
2410
2411    /* Animated shimmer effect */
2412    .animated-skeleton {
2413        background: linear-gradient(90deg, #3b3b3b 25%, #4b4b4b 50%, #3b3b3b 75%);
2414        background-size: 200% 100%;
2415        animation: shimmer 1.5s infinite;
2416    }
2417
2418    @keyframes shimmer {
2419        0% {
2420            background-position: -200% 0;
2421        }
2422        100% {
2423            background-position: 200% 0;
2424        }
2425    }
2426
2427    /* Optional: Adjust the flexbox gap to space out skeletons */
2428    .trending-skeleton {
2429        display: flex;
2430        gap: 15px;
2431    }
2432    .footer-copyright a:hover{text-decoration: underline;}
2433   
2434body.dark-mode .trend ul li a {
2435    color: #b8b8b8;
2436}
2437body.dark-mode .trend ul li a img{
2438    filter: invert(1) brightness(2)
2439}    
2440    .trend{padding-left: 5px}    
2441.trend h4 {
2442    font-size: 18px;
2443    font-weight: 500;
2444}
2445.trend ul li a {
2446    padding: 5px 0;
2447    display: block;
2448    color: #324158;
2449    font-size: 13px;
2450    padding: 4px 0;
2451    font-weight: 400;
2452}
2453 .trend ul li a img {
2454    margin-left: 5px;
2455    width: 11px !important;
2456     }   
2457body.light-mode .input-box input {
2458    border: 1px solid #b1b1b1 !important;
2459    color: #000 !important;
2460}    
2461</style>
2462<!-- right panel START --> 
2463<div class="col-md-3" style="top: 25px;height: 100%; position:sticky">
2464
2465<div class="recomendation">
2466       <h4><b>Popular Profiles</b><span style="opacity:0" onclick="$('#signup-new-process').fadeIn();">btnsss</span></h4>
2467       <div class="add-listing followers" style="flex:1">
2468       <div class="owl-carousel owl-theme" id="recomendation-box">
2469
2470     
2471       <div class="carousel-items">
2472                       <div class="followers-box">
2473                <div class="follow-inner">
2474                    <div class="d-flex justify-content-between align-items-center">
2475                        <div class="d-flex align-items-center">
2476                            <div class="user-image">
2477                               <a href="https://www.jumpspree.com/Jumpspree" target="_blank">
2478                                <img src="https://cubesnack-seller.s3.amazonaws.com/products/0106260241236164.png" alt="user Image" title="user Image" width="30" height="30">
2479                                </a>
2480                            </div>
2481
2482                            <div class="user-name mb-0 notranslate">
2483                                <h2 style="display:none"><a href="https://www.jumpspree.com/Jumpspree" target="_blank">Jumpspree</a><img src="https://www.jumpspree.com/public/images/blue-cube.png" class="blue-cube-icon" alt="Verified Icon" title="Verified Icon"></h2>
2484                                <h2 class="notranslate"><a href="https://www.jumpspree.com/Jumpspree" target="_blank"><span style="">@Jumpspree</span><img src="https://www.jumpspree.com/public/images/blue-cube.png" class="blue-cube-icon" alt="Verified Icon" title="Verified Icon"></a></h2>
2485                            </div>
2486                        </div>
2487                                                             <div class="follow-btn"><a class="" id="recommended1" href="javascript:void(0)" onclick="$('#signup-new-process').hide();$('#signin-new-process').fadeIn('fast'); $('body').addClass('overflow-hidden');">Follow</a></div>
2488                            
2489                                </div>
2490                </div>
2491                </div>
2492              
2493
2494                                <div class="followers-box">
2495                <div class="follow-inner">
2496                    <div class="d-flex justify-content-between align-items-center">
2497                        <div class="d-flex align-items-center">
2498                            <div class="user-image">
2499                               <a href="https://www.jumpspree.com/Vic" target="_blank">
2500                                <img src="https://cubesnack-seller.s3.amazonaws.com/products/1908260555398244.jpg" alt="user Image" title="user Image" width="30" height="30">
2501                                </a>
2502                            </div>
2503
2504                            <div class="user-name mb-0 notranslate">
2505                                <h2 style="display:none"><a href="https://www.jumpspree.com/Vic" target="_blank">Vic</a><img src="https://www.jumpspree.com/public/images/blue-cube.png" class="blue-cube-icon" alt="Verified Icon" title="Verified Icon"></h2>
2506                                <h2 class="notranslate"><a href="https://www.jumpspree.com/Vic" target="_blank"><span style="">@Vic</span><img src="https://www.jumpspree.com/public/images/blue-cube.png" class="blue-cube-icon" alt="Verified Icon" title="Verified Icon"></a></h2>
2507                            </div>
2508                        </div>
2509                                                             <div class="follow-btn"><a class="" id="recommended2" href="javascript:void(0)" onclick="$('#signup-new-process').hide();$('#signin-new-process').fadeIn('fast'); $('body').addClass('overflow-hidden');">Follow</a></div>
2510                            
2511                                </div>
2512                </div>
2513                </div>
2514              
2515
2516                                <div class="followers-box">
2517                <div class="follow-inner">
2518                    <div class="d-flex justify-content-between align-items-center">
2519                        <div class="d-flex align-items-center">
2520                            <div class="user-image">
2521                               <a href="https://www.jumpspree.com/More" target="_blank">
2522                                <img src="https://cubesnack-seller.s3.amazonaws.com/products/3006250813495263.jpg" alt="user Image" title="user Image" width="30" height="30">
2523                                </a>
2524                            </div>
2525
2526                            <div class="user-name mb-0 notranslate">
2527                                <h2 style="display:none"><a href="https://www.jumpspree.com/More" target="_blank">Jumpspree More</a><img src="https://www.jumpspree.com/public/images/blue-cube.png" class="blue-cube-icon" alt="Verified Icon" title="Verified Icon"></h2>
2528                                <h2 class="notranslate"><a href="https://www.jumpspree.com/More" target="_blank"><span style="">@More</span><img src="https://www.jumpspree.com/public/images/blue-cube.png" class="blue-cube-icon" alt="Verified Icon" title="Verified Icon"></a></h2>
2529                            </div>
2530                        </div>
2531                                                             <div class="follow-btn"><a class="" id="recommended3" href="javascript:void(0)" onclick="$('#signup-new-process').hide();$('#signin-new-process').fadeIn('fast'); $('body').addClass('overflow-hidden');">Follow</a></div>
2532                            
2533                                </div>
2534                </div>
2535                </div>
2536              
2537
2538                                <div class="followers-box">
2539                <div class="follow-inner">
2540                    <div class="d-flex justify-content-between align-items-center">
2541                        <div class="d-flex align-items-center">
2542                            <div class="user-image">
2543                               <a href="https://www.jumpspree.com/Mashintoc" target="_blank">
2544                                <img src="https://cubesnack-seller.s3.amazonaws.com/products/1408260828473176.jpg" alt="user Image" title="user Image" width="30" height="30">
2545                                </a>
2546                            </div>
2547
2548                            <div class="user-name mb-0 notranslate">
2549                                <h2 style="display:none"><a href="https://www.jumpspree.com/Mashintoc" target="_blank">Mashintoc</a><img src="https://www.jumpspree.com/public/images/blue-cube.png" class="blue-cube-icon" alt="Verified Icon" title="Verified Icon"></h2>
2550                                <h2 class="notranslate"><a href="https://www.jumpspree.com/Mashintoc" target="_blank"><span style="">@Mashintoc</span><img src="https://www.jumpspree.com/public/images/blue-cube.png" class="blue-cube-icon" alt="Verified Icon" title="Verified Icon"></a></h2>
2551                            </div>
2552                        </div>
2553                                                             <div class="follow-btn"><a class="" id="recommended4" href="javascript:void(0)" onclick="$('#signup-new-process').hide();$('#signin-new-process').fadeIn('fast'); $('body').addClass('overflow-hidden');">Follow</a></div>
2554                            
2555                                </div>
2556                </div>
2557                </div>
2558              
2559
2560                                <div class="followers-box">
2561                <div class="follow-inner">
2562                    <div class="d-flex justify-content-between align-items-center">
2563                        <div class="d-flex align-items-center">
2564                            <div class="user-image">
2565                               <a href="https://www.jumpspree.com/ZappyLaunch" target="_blank">
2566                                <img src="https://cubesnack-seller.s3.amazonaws.com/products/2610250706119109.jpg" alt="user Image" title="user Image" width="30" height="30">
2567                                </a>
2568                            </div>
2569
2570                            <div class="user-name mb-0 notranslate">
2571                                <h2 style="display:none"><a href="https://www.jumpspree.com/ZappyLaunch" target="_blank">ZappyLaunch (formerly We Web Pro)</a><img src="https://www.jumpspree.com/public/images/blue-cube.png" class="blue-cube-icon" alt="Verified Icon" title="Verified Icon"></h2>
2572                                <h2 class="notranslate"><a href="https://www.jumpspree.com/ZappyLaunch" target="_blank"><span style="">@ZappyLaunch</span><img src="https://www.jumpspree.com/public/images/blue-cube.png" class="blue-cube-icon" alt="Verified Icon" title="Verified Icon"></a></h2>
2573                            </div>
2574                        </div>
2575                                                             <div class="follow-btn"><a class="" id="recommended5" href="javascript:void(0)" onclick="$('#signup-new-process').hide();$('#signin-new-process').fadeIn('fast'); $('body').addClass('overflow-hidden');">Follow</a></div>
2576                            
2577                                </div>
2578                </div>
2579                </div>
2580              </div><div class="carousel-items">
2581
2582                                <div class="followers-box">
2583                <div class="follow-inner">
2584                    <div class="d-flex justify-content-between align-items-center">
2585                        <div class="d-flex align-items-center">
2586                            <div class="user-image">
2587                               <a href="https://www.jumpspree.com/SellerPad" target="_blank">
2588                                <img src="https://cubesnack-seller.s3.amazonaws.com/products/2508260908262982.jpg" alt="user Image" title="user Image" width="30" height="30">
2589                                </a>
2590                            </div>
2591
2592                            <div class="user-name mb-0 notranslate">
2593                                <h2 style="display:none"><a href="https://www.jumpspree.com/SellerPad" target="_blank">Jumpspree Seller Pad</a><img src="https://www.jumpspree.com/public/images/blue-cube.png" class="blue-cube-icon" alt="Verified Icon" title="Verified Icon"></h2>
2594                                <h2 class="notranslate"><a href="https://www.jumpspree.com/SellerPad" target="_blank"><span style="">@SellerPad</span><img src="https://www.jumpspree.com/public/images/blue-cube.png" class="blue-cube-icon" alt="Verified Icon" title="Verified Icon"></a></h2>
2595                            </div>
2596                        </div>
2597                                                             <div class="follow-btn"><a class="" id="recommended6" href="javascript:void(0)" onclick="$('#signup-new-process').hide();$('#signin-new-process').fadeIn('fast'); $('body').addClass('overflow-hidden');">Follow</a></div>
2598                            
2599                                </div>
2600                </div>
2601                </div>
2602              
2603
2604                                <div class="followers-box">
2605                <div class="follow-inner">
2606                    <div class="d-flex justify-content-between align-items-center">
2607                        <div class="d-flex align-items-center">
2608                            <div class="user-image">
2609                               <a href="https://www.jumpspree.com/pageraise" target="_blank">
2610                                <img src="https://cubesnack-seller.s3.amazonaws.com/products/2407261030585661.jpg" alt="user Image" title="user Image" width="30" height="30">
2611                                </a>
2612                            </div>
2613
2614                            <div class="user-name mb-0 notranslate">
2615                                <h2 style="display:none"><a href="https://www.jumpspree.com/pageraise" target="_blank">pageraise</a><img src="https://www.jumpspree.com/public/images/blue-cube.png" class="blue-cube-icon" alt="Verified Icon" title="Verified Icon"></h2>
2616                                <h2 class="notranslate"><a href="https://www.jumpspree.com/pageraise" target="_blank"><span style="">@pageraise</span><img src="https://www.jumpspree.com/public/images/blue-cube.png" class="blue-cube-icon" alt="Verified Icon" title="Verified Icon"></a></h2>
2617                            </div>
2618                        </div>
2619                                                             <div class="follow-btn"><a class="" id="recommended7" href="javascript:void(0)" onclick="$('#signup-new-process').hide();$('#signin-new-process').fadeIn('fast'); $('body').addClass('overflow-hidden');">Follow</a></div>
2620                            
2621                                </div>
2622                </div>
2623                </div>
2624              
2625
2626                                <div class="followers-box">
2627                <div class="follow-inner">
2628                    <div class="d-flex justify-content-between align-items-center">
2629                        <div class="d-flex align-items-center">
2630                            <div class="user-image">
2631                               <a href="https://www.jumpspree.com/TeslaAIGuy" target="_blank">
2632                                <img src="https://cubesnack-seller.s3.amazonaws.com/products/2306250229069516.jpg" alt="user Image" title="user Image" width="30" height="30">
2633                                </a>
2634                            </div>
2635
2636                            <div class="user-name mb-0 notranslate">
2637                                <h2 style="display:none"><a href="https://www.jumpspree.com/TeslaAIGuy" target="_blank">Tesla AI Guy</a><img src="https://www.jumpspree.com/public/images/blue-cube.png" class="blue-cube-icon" alt="Verified Icon" title="Verified Icon"></h2>
2638                                <h2 class="notranslate"><a href="https://www.jumpspree.com/TeslaAIGuy" target="_blank"><span style="">@TeslaAIGuy</span><img src="https://www.jumpspree.com/public/images/blue-cube.png" class="blue-cube-icon" alt="Verified Icon" title="Verified Icon"></a></h2>
2639                            </div>
2640                        </div>
2641                                                             <div class="follow-btn"><a class="" id="recommended8" href="javascript:void(0)" onclick="$('#signup-new-process').hide();$('#signin-new-process').fadeIn('fast'); $('body').addClass('overflow-hidden');">Follow</a></div>
2642                            
2643                                </div>
2644                </div>
2645                </div>
2646              
2647
2648                                <div class="followers-box">
2649                <div class="follow-inner">
2650                    <div class="d-flex justify-content-between align-items-center">
2651                        <div class="d-flex align-items-center">
2652                            <div class="user-image">
2653                               <a href="https://www.jumpspree.com/emmacollins12" target="_blank">
2654        
2654                        <img src="https://cubesnack-seller.s3.amazonaws.com/products/1812240451324569.jpg" alt="user Image" title="user Image" width="30" height="30">
2655                                </a>
2656                            </div>
2657
2658                            <div class="user-name mb-0 notranslate">
2659                                <h2 style="display:none"><a href="https://www.jumpspree.com/emmacollins12" target="_blank">Emma Collins</a><img src="https://www.jumpspree.com/public/images/blue-cube.png" class="blue-cube-icon" alt="Verified Icon" title="Verified Icon"></h2>
2660                                <h2 class="notranslate"><a href="https://www.jumpspree.com/emmacollins12" target="_blank"><span style="">@emmacollins12</span><img src="https://www.jumpspree.com/public/images/blue-cube.png" class="blue-cube-icon" alt="Verified Icon" title="Verified Icon"></a></h2>
2661                            </div>
2662                        </div>
2663                                                             <div class="follow-btn"><a class="" id="recommended9" href="javascript:void(0)" onclick="$('#signup-new-process').hide();$('#signin-new-process').fadeIn('fast'); $('body').addClass('overflow-hidden');">Follow</a></div>
2664                            
2665                                </div>
2666                </div>
2667                </div>
2668              
2669
2670                                <div class="followers-box">
2671                <div class="follow-inner">
2672                    <div class="d-flex justify-content-between align-items-center">
2673                        <div class="d-flex align-items-center">
2674                            <div class="user-image">
2675                               <a href="https://www.jumpspree.com/catsmax" target="_blank">
2676                                <img src="https://cubesnack-seller.s3.amazonaws.com/products/1006250707077855.jpg" alt="user Image" title="user Image" width="30" height="30">
2677                                </a>
2678                            </div>
2679
2680                            <div class="user-name mb-0 notranslate">
2681                                <h2 style="display:none"><a href="https://www.jumpspree.com/catsmax" target="_blank">Ava</a><img src="https://www.jumpspree.com/public/images/blue-cube.png" class="blue-cube-icon" alt="Verified Icon" title="Verified Icon"></h2>
2682                                <h2 class="notranslate"><a href="https://www.jumpspree.com/catsmax" target="_blank"><span style="">@catsmax</span><img src="https://www.jumpspree.com/public/images/blue-cube.png" class="blue-cube-icon" alt="Verified Icon" title="Verified Icon"></a></h2>
2683                            </div>
2684                        </div>
2685                                                             <div class="follow-btn"><a class="" id="recommended10" href="javascript:void(0)" onclick="$('#signup-new-process').hide();$('#signin-new-process').fadeIn('fast'); $('body').addClass('overflow-hidden');">Follow</a></div>
2686                            
2687                                </div>
2688                </div>
2689                </div>
2690              </div><div class="carousel-items">
2691
2692                                <div class="followers-box">
2693                <div class="follow-inner">
2694                    <div class="d-flex justify-content-between align-items-center">
2695                        <div class="d-flex align-items-center">
2696                            <div class="user-image">
2697                               <a href="https://www.jumpspree.com/EverydayAIGuy" target="_blank">
2698                                <img src="https://cubesnack-seller.s3.amazonaws.com/products/2606260631105720.jpg" alt="user Image" title="user Image" width="30" height="30">
2699                                </a>
2700                            </div>
2701
2702                            <div class="user-name mb-0 notranslate">
2703                                <h2 style="display:none"><a href="https://www.jumpspree.com/EverydayAIGuy" target="_blank">Everyday AI Guy</a><img src="https://www.jumpspree.com/public/images/blue-cube.png" class="blue-cube-icon" alt="Verified Icon" title="Verified Icon"></h2>
2704                                <h2 class="notranslate"><a href="https://www.jumpspree.com/EverydayAIGuy" target="_blank"><span style="">@EverydayAIGuy</span><img src="https://www.jumpspree.com/public/images/blue-cube.png" class="blue-cube-icon" alt="Verified Icon" title="Verified Icon"></a></h2>
2705                            </div>
2706                        </div>
2707                                                             <div class="follow-btn"><a class="" id="recommended11" href="javascript:void(0)" onclick="$('#signup-new-process').hide();$('#signin-new-process').fadeIn('fast'); $('body').addClass('overflow-hidden');">Follow</a></div>
2708                            
2709                                </div>
2710                </div>
2711                </div>
2712              
2713
2714                                <div class="followers-box">
2715                <div class="follow-inner">
2716                    <div class="d-flex justify-content-between align-items-center">
2717                        <div class="d-flex align-items-center">
2718                            <div class="user-image">
2719                               <a href="https://www.jumpspree.com/nate_peterson" target="_blank">
2720                                <img src="https://cubesnack-seller.s3.amazonaws.com/products/1812240444033674.jpg" alt="user Image" title="user Image" width="30" height="30">
2721                                </a>
2722                            </div>
2723
2724                            <div class="user-name mb-0 notranslate">
2725                                <h2 style="display:none"><a href="https://www.jumpspree.com/nate_peterson" target="_blank">Nate 🤙</a><img src="https://www.jumpspree.com/public/images/blue-cube.png" class="blue-cube-icon" alt="Verified Icon" title="Verified Icon"></h2>
2726                                <h2 class="notranslate"><a href="https://www.jumpspree.com/nate_peterson" target="_blank"><span style="">@nate_peterson</span><img src="https://www.jumpspree.com/public/images/blue-cube.png" class="blue-cube-icon" alt="Verified Icon" title="Verified Icon"></a></h2>
2727                            </div>
2728                        </div>
2729                                                             <div class="follow-btn"><a class="" id="recommended12" href="javascript:void(0)" onclick="$('#signup-new-process').hide();$('#signin-new-process').fadeIn('fast'); $('body').addClass('overflow-hidden');">Follow</a></div>
2730                            
2731                                </div>
2732                </div>
2733                </div>
2734              
2735
2736                                <div class="followers-box">
2737                <div class="follow-inner">
2738                    <div class="d-flex justify-content-between align-items-center">
2739                        <div class="d-flex align-items-center">
2740                            <div class="user-image">
2741                               <a href="https://www.jumpspree.com/truthspeaker" target="_blank">
2742                                <img src="https://cubesnack-seller.s3.amazonaws.com/products/0104260600547895.jpg" alt="user Image" title="user Image" width="30" height="30">
2743                                </a>
2744                            </div>
2745
2746                            <div class="user-name mb-0 notranslate">
2747                                <h2 style="display:none"><a href="https://www.jumpspree.com/truthspeaker" target="_blank">Truth Speaker</a><img src="https://www.jumpspree.com/public/images/blue-cube.png" class="blue-cube-icon" alt="Verified Icon" title="Verified Icon"></h2>
2748                                <h2 class="notranslate"><a href="https://www.jumpspree.com/truthspeaker" target="_blank"><span style="">
2748@truthspeaker</span><img src="https://www.jumpspree.com/public/images/blue-cube.png" class="blue-cube-icon" alt="Verified Icon" title="Verified Icon"></a></h2>
2749                            </div>
2750                        </div>
2751                                                             <div class="follow-btn"><a class="" id="recommended13" href="javascript:void(0)" onclick="$('#signup-new-process').hide();$('#signin-new-process').fadeIn('fast'); $('body').addClass('overflow-hidden');">Follow</a></div>
2752                            
2753                                </div>
2754                </div>
2755                </div>
2756              
2757
2758                                <div class="followers-box">
2759                <div class="follow-inner">
2760                    <div class="d-flex justify-content-between align-items-center">
2761                        <div class="d-flex align-items-center">
2762                            <div class="user-image">
2763                               <a href="https://www.jumpspree.com/noah_can" target="_blank">
2764                                <img src="https://cubesnack-seller.s3.amazonaws.com/products/2512240139532531.jpg" alt="user Image" title="user Image" width="30" height="30">
2765                                </a>
2766                            </div>
2767
2768                            <div class="user-name mb-0 notranslate">
2769                                <h2 style="display:none"><a href="https://www.jumpspree.com/noah_can" target="_blank">Noah</a><img src="https://www.jumpspree.com/public/images/blue-cube.png" class="blue-cube-icon" alt="Verified Icon" title="Verified Icon"></h2>
2770                                <h2 class="notranslate"><a href="https://www.jumpspree.com/noah_can" target="_blank"><span style="">@noah_can</span><img src="https://www.jumpspree.com/public/images/blue-cube.png" class="blue-cube-icon" alt="Verified Icon" title="Verified Icon"></a></h2>
2771                            </div>
2772                        </div>
2773                                                             <div class="follow-btn"><a class="" id="recommended14" href="javascript:void(0)" onclick="$('#signup-new-process').hide();$('#signin-new-process').fadeIn('fast'); $('body').addClass('overflow-hidden');">Follow</a></div>
2774                            
2775                                </div>
2776                </div>
2777                </div>
2778              
2779
2780                                <div class="followers-box">
2781                <div class="follow-inner">
2782                    <div class="d-flex justify-content-between align-items-center">
2783                        <div class="d-flex align-items-center">
2784                            <div class="user-image">
2785                               <a href="https://www.jumpspree.com/kirkling" target="_blank">
2786                                <img src="https://cubesnack-seller.s3.amazonaws.com/products/2706250857582410.jpg" alt="user Image" title="user Image" width="30" height="30">
2787                                </a>
2788                            </div>
2789
2790                            <div class="user-name mb-0 notranslate">
2791                                <h2 style="display:none"><a href="https://www.jumpspree.com/kirkling" target="_blank">Kirk</a><img src="https://www.jumpspree.com/public/images/blue-cube.png" class="blue-cube-icon" alt="Verified Icon" title="Verified Icon"></h2>
2792                                <h2 class="notranslate"><a href="https://www.jumpspree.com/kirkling" target="_blank"><span style="">@kirkling</span><img src="https://www.jumpspree.com/public/images/blue-cube.png" class="blue-cube-icon" alt="Verified Icon" title="Verified Icon"></a></h2>
2793                            </div>
2794                        </div>
2795                                                             <div class="follow-btn"><a class="" id="recommended15" href="javascript:void(0)" onclick="$('#signup-new-process').hide();$('#signin-new-process').fadeIn('fast'); $('body').addClass('overflow-hidden');">Follow</a></div>
2796                            
2797                                </div>
2798                </div>
2799                </div>
2800              
2801
2802                 
2803
2804       </div>
2805     
2806       </div>
2807       </div>
2808   </div>
2809 
2810    
2811    
2812<!--
2813<div class="promotion"  style="background:url('https://www.jumpspree.com/public/images/promo-bg.png')">
2814        <div class="d-flex shape">
2815            <figure><img src="https://www.jumpspree.com/public/images/blue-cube-3d.png" alt="blue cube" title="blue cube"></figure>
2816            <div class="text">
2817                <h4>A little MORE goes a long way. <br>For less. Yes.</h4>
2818                <p>Limited-time upgrade: Get 50% off Jumpspree More for your first year when you subscribe annually in the Jumpspree app. Offer available in the United States only. Limited spots available.</p>
2819                <a href="https://www.jumpspree.com/download-the-official-jumpspree-app-for-ios-and-android" class="btn-group">Upgrade now in the app <img src="https://www.jumpspree.com/public/images/up-arrow.png" alt="Upgrade Now" title="Upgrade Now"></a>
2820            </div>
2821        </div>
2822    </div>
2823-->
2824       
2825    
2826        
2827
2828    <div class="trend" style="padding-bottom:0px;">
2829    
2830    <!-- <div class="widget-feed">
2831        <div id="div-badge-A4J9VE1O"  data-attribute="A4J9VE1O">
2831<script src="https://www.tipnchip.com/widget/support-widget.js" data-badgeid="A4J9VE1O" ></script>
2831 </div>
2832
2833    </div> -->
2834
2835    <div class="widget-feed">
2836        <div id="div-badge-A4J9VE1O" data-attribute="A4J9VE1O"></div>
2837    </div>
2838    
2838<script>
2839    window.onload = function() {
2840        var script = document.createElement("script");
2841        script.src = "https://www.jumpspree.com/public/js/support-widget.js";
2842        script.setAttribute("data-badgeid", "A4J9VE1O");
2843        document.getElementById("div-badge-A4J9VE1O").appendChild(script);
2844    };
2845    </script>
2845
2846
2847
2848
2849<!--        <h4><b>Resources</b></h4>-->
2850         
2851<!--    <p class="footer-copyright" style="color: #474747;font-size: 11px;">© Copyright 2025, <a style="color:#474747;" href="https://www.jumpspree.com">Jumpspree.com</a> a Cubesnack, Inc. company. All rights reserved.</p>                    -->
2852<p class="footer-copyright" style="color: #474747;font-size: 11px;">©Copyright 2026, Jumpspree from <br>Nexa Platforms, Inc.</p>                    
2853
2854 <!-- DESKTOP: segmented pill toggle -->
2855  <div class="theme-desktop">
2856<!--    <h3>Theme</h3>-->
2857    <div class="segmented" id="segmented" data-active="dark">
2858<!--      <div class="thumb"></div>-->
2859      <button type="button" id="btnLight"><img src="https://www.cent.social/public/web1901-assets/images/sun-01-stroke-rounded.png" alt=""></button>
2860      <button type="button" id="btnDark" class="active"><img src="https://www.cent.social/public/web1901-assets/images/moon-02-stroke-rounded.png" alt=""></button>
2861    </div>
2862  </div>
2863 
2864
2865<!--
2866<div id="light-and-dark-mode">
2867<h4>Theme</h4>
2868<ul>
2869                            <li id="light-mode-on" class="light-mode">
2870                                <a href="javascript:void(0)" class="sidebar" onclick="toggleMode('light')">
2871                                    Light
2872                                </a>
2873                            </li>
2874                            <li id="dark-mode-on" class="dark-mode actived">
2875                                <a href="javascript:void(0)" class="sidebar" onclick="toggleMode('dark')">
2876                                     Dark
2877                                </a>
2878                            </li>
2879                            <li class="light-dark-bg"></li>
2880                        </ul> 
2881                        
2882                        </div>  
2883-->
2884         
2885    </div>
2886
2887    <!-- Footer -->
2888<!--
2889    <div class="footer mt-lg-4" style="bottom: 0; z-index: 999; background: #fff!important; width: none;">
2890        <p class="mb-0"> © 2024 Cubesnack, Inc. All rights reserved.<br></p> 
2891    </div>
2892-->
2893</div> 
2894<!-- right panel END -->
2895
2896<!-- Add jQuery for handling the tab switching -->
2897<!--
2897<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
2897-->
2898<script>
2899    $(document).ready(function() {
2900        // Handle click on "People" tab
2901        $('#showPeople').click(function(e) {
2902            e.preventDefault();
2903            $('#pro-wrapper').hide();
2904            $('#people-wrapper').fadeIn();
2905            $('#protab').removeClass('active');
2906            $('#peopletag').addClass('active');
2907        });
2908
2909        // Handle click on "Products" tab
2910        $('#showProducts').click(function(e) {
2911            e.preventDefault();
2912            $('#people-wrapper').hide();
2913            $('#pro-wrapper').fadeIn();
2914            $('#peopletag').removeClass('active');
2915            $('#protab').addClass('active');
2916        });
2917    });
2918</script>
2918
2919<script>
2920    $(document).ready(function() {
2921        
2922$('#recomendation-box').owlCarousel({
2923    loop:true,
2924    margin:0,
2925    nav:true,
2926    autoplay: false,
2927        //autoPlaySpeed: 50000,
2928        //stopOnHover : true,
2929        //autoPlayTimeout: 50000,
2930        //autoplayHoverPause: true,
2931    responsive:{
2932        0:{
2933            items:1,
2934            autoplay:false
2935        },
2936        600:{
2937            items:1,
2938            autoplay:false
2939        },
2940        1000:{
2941            items:1,
2942            autoplay:false 
2943        }
2944    }
2945}) 
2946        
2947        // Handle click on "People" tab
2948        $('#showPeople').click(function(e) {
2949            e.preventDefault();
2950            $('#pro-wrapper').hide();
2951            $('#people-wrapper').fadeIn();
2952            $('#protab').removeClass('active');
2953            $('#peopletag').addClass('active');
2954        });
2955
2956        // Handle click on "Products" tab
2957        $('#showProducts').click(function(e) {
2958            e.preventDefault();
2959            $('#people-wrapper').hide();
2960            $('#pro-wrapper').fadeIn();
2961            $('#peopletag').removeClass('active');
2962            $('#protab').addClass('active');
2963        });
2964    });
2965</script>
2965
2966
2967 
2968  
2969<!-- Footer code START     for test footer_new_test -->
2970<!-- Footer code START -->
2971<script type="module" src="https://cdn.jsdelivr.net/npm/[email protected]/index.js"></script>
2971
2972<link rel="preload" href="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css" as="style" onload="this.onload=null;this.rel='stylesheet'">
2973<noscript><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css"></noscript>
2974<script defer src="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.js"></script>
2974
2975
2976
2977<style>
2978/* signup_process.css */
2979.follow-btn.following {
2980  background-color: #007bff;
2981  color: white;
2982  padding: 6px 14px;
2983  border-radius: 4px;
2984}
2985
2986</style>
2987
2988
2989<script>
2990// signup_process.js
2991
2992// Global variables
2993var base_url = 'https://www.jumpspree.com/';
2994var token = '';
2995var full_name = '';
2996var user_name = '';
2997var avtar = '';
2998var loader = '<div class="loader"><div class="loader__inner"><div class="loader__content"><span class="loaderspinner"></span></div></div></div>';
2999
3000$(document).ready(function() {
3001    // Initialize form validation and event handlers
3002    initSignupForm();
3003    
3004    // Password toggle functionality
3005    $(document).on('click', '.toggle-password', function() {
3006        var input = $("#password");
3007        if (input.attr('type') === 'password') {
3008            input.attr('type', 'text');
3009            $(this).html('<i class="fa-regular fa-eye-slash"></i>');
3010        } else {
3011            input.attr('type', 'password');
3012            $(this).html('<i class="fa-regular fa-eye"></i>');
3013        }
3014    });
3015
3016    // Disable submit button by default
3017    $('#submitbtnstep1').addClass('disabled').prop('disabled', true);
3018});
3019
3020
3021function initSignupForm() {
3022    // Custom validation method for minimum age
3023    $.validator.addMethod(
3024        "minAge",
3025        function(value, element, minAge) {
3026            if (!value) return false;
3027            var inputDate = new Date(value);
3028            var today = new Date();
3029            var age = today.getFullYear() - inputDate.getFullYear();
3030            var m = today.getMonth() - inputDate.getMonth();
3031            if (m < 0 || (m === 0 && today.getDate() < inputDate.getDate())) {
3032                age--;
3033            }
3034            return age >= minAge;
3035        },
3036        "You must be at least 13 years old."
3037    );
3038
3039    // Custom method to allow only letters, numbers, and spaces
3040    $.validator.addMethod(
3041        "validName",
3042        function(value, element) {
3043            return /^[a-zA-Z0-9 ]+$/.test(value);
3044        },
3045        "Name can only contain letters, numbers, and spaces."
3046    );
3047
3048    //new
3049    $.validator.addMethod(
3050        "validUsername",
3051        function(value, element) {
3052            if (!value) return false;
3053            // Cannot be only numbers, 3-15 chars, only letters/numbers/underscore
3054            return /^(?![0-9]+$)[A-Za-z0-9_]{3,15}$/.test(value);
3055        },
3056        "Username must be 3-15 characters, cannot be only numbers, only letters/numbers/underscores allowed."
3057    );
3058
3059
3060    $("#signupform").validate({
3061        errorClass: 'error_regitration',
3062        errorElement: 'span',
3063        onfocusout: false,
3064        onkeyup: false,
3065        rules: {
3066            fullname: {
3067                required: true,
3068                maxlength: 20,
3069                validUsername: true
3070            },
3071            email: {
3072                required: true,
3073                email: true
3074            },
3075            password: {
3076                required: true,
3077                minlength: 8
3078            },
3079            dob: {
3080                required: true,
3081                minAge: 13
3082            }
3083        },
3084        errorPlacement: function(error, element) {
3085            var name = $(element).attr("name");
3086            error.appendTo($("#" + name + "_validate"));
3087        },
3088        submitHandler: function(form, e) {
3089            e.preventDefault();
3090            checkSignup();
3091        }
3092    });
3093
3094    $('.form-control').on('input change', function () {
3095        var field = $(this);
3096        $("#signupform").validate().element(field);
3097        validateStep1();
3098    });
3099
3100    $('.form-control').on('blur', function() {
3101        $(this).valid();
3102    });
3103
3104    $('.datepicker').datepicker({
3105        format: 'yyyy-mm-dd',
3106        endDate: new Date(),
3107        autoclose: true
3108    });
3109}
3110
3111
3112function validateStep1() {
3113    const fullName = $('#fullname').val().trim();
3114    const email = $('#email').val().trim();
3115    const password = $('#password').val().trim();
3116    const dob = $('#dob').val().trim();
3117
3118    const allFilled = fullName && email && password && dob;
3119
3120    // Handle active field or fallback if no field is focused (like datepicker)
3121    const activeField = $('.form-control:focus');
3122    let currentFieldValid = true;
3123
3124    if (activeField.length > 0) {
3125        currentFieldValid = activeField.valid();
3126    }
3127
3128    // If all fields filled and either active field is valid or no active field
3129    if (allFilled && currentFieldValid) {
3130        $('#submitbtnstep1').removeClass('disabled').prop('disabled', false);
3131    } else {
3132        $('#submitbtnstep1').addClass('disabled').prop('disabled', true);
3133    }
3134}
3135
3136
3137
3138
3139function checkSignup() {
3140    var fullname = $('#fullname').val();
3141    full_name = fullname; // Store full name globally
3142    var password = $('#password').val();
3143    var email = $('#email').val();
3144    var dob = $('#dob').val();
3145    var stext = $('#submitbtnstep1').text();
3146    
3147    // First validate the form manually
3148    var form = $("#signupform");
3149    form.validate().form();
3150    
3151    if (!form.valid()) {
3152        // Show all errors if form is invalid
3153        $('.form-control').each(function() {
3154            $(this).valid();
3155        });
3156        return false;
3157    }
3158    
3159    $('#errorregmessage').text('').fadeOut();
3160    
3161    $.ajax({
3162        method: 'POST',
3163        url: base_url + '/checkRegister', 
3164        data: {
3165            fullname: fullname,
3166            email: email,
3167            password: password,
3168            dob: dob
3169        },
3170        dataType: "json",
3171        beforeSend: function() {
3172            $('#submitbtnstep1').html('<span class="jloader"></span>');
3173        },
3174        success: function(response) {
3175            if (response.status) {
3176                // Store the token if provided
3177                if (response.token) {
3178                    token = response.token;
3179                }
3180                
3181                // Proceed to step 2
3182                $('#step01').hide();
3183                $('#step02').fadeIn();
3184                $(window).scrollTop(0);
3185                
3186                // Update email in step 2
3187                $('#step02 .email-box h2').text('Verify your email');
3188                $('#helper-text').html('We just sent you a code to your email <b>' + email + '</b>. Pop it in below so we know you\'re real.');
3189                
3190                // Initialize OTP validation
3191                initOTPValidation();
3192            } else {
3193                // Show API error message
3194                $('#errorregmessage').text(response.message).fadeIn();
3195            }
3196        },
3197        error: function(xhr, status, error) {
3198            var errorMessage = 'An error occurred. Please try again.';
3199            if (xhr.responseJSON && xhr.responseJSON.message) {
3200                errorMessage = xhr.responseJSON.message;
3201            }
3202            $('#errorregmessage').text(errorMessage).fadeIn();
3203        },
3204        complete: function() {
3205            $('#submitbtnstep1').html(stext + '<img src="https://www.jumpspree.com/public/images/form-arrow.png" alt="Arrow" title="Arrow" class="arrow-right">');
3206            setTimeout(function() {
3207                $('#errorregmessage').fadeOut();
3208            }, 5000);
3209        }
3210    });
3211}
3212
3213// Rest of your functions (initOTPValidation, validateOTP, etc.) remain the same...
3214
3215
3216// STEOP 2: OTP Validation
3217
3218function initOTPValidation() {
3219    const otpInput = document.getElementById("otp1");
3220
3221    otpInput.addEventListener("input", function () {
3222        const sanitized = this.value.replace(/\D/g, '').slice(0, 6);
3223        this.value = sanitized;
3224
3225        if (sanitized.length === 6) {
3226            $("#submitbtn").removeClass("disabled").addClass("activebtn");
3227        } else {
3228            $("#submitbtn").addClass("disabled").removeClass("activebtn");
3229        }
3230    });
3231
3232    // Submit button click handler for verifying OTP
3233    $(document).on('click', '#submitbtn', function () {
3234        if ($('#submitbtn').hasClass('disabled')) return;
3235        verifyRegOtp();
3236    });
3237
3238    // Resend code handler
3239    $(document).on('click', '.resend a', function (e) {
3240        e.preventDefault();
3241        resendVerificationCode();
3242    });
3243}
3244
3245function verifyRegOtp() {
3246    const regotp = $('#otp1').val();
3247    const stext = $('#submitbtn').html();
3248    $('#errorotpmessage').text('').fadeOut();
3249
3250    $.ajax({
3251        method: 'POST',
3252        url: 'https://www.jumpspree.com/VerifyRegOtp',
3253        data: {
3254            regotp: regotp,
3255            token: token
3256        },
3257        dataType: "json",
3258        beforeSend: function () {
3259            $('#submitbtn').html('<span class="jloader"></span>');
3260        },
3261        success: function(responseText) {
3262        let response = null;
3263            console.log('Response Text:', responseText);
3264        try {
3265            // If response is string and double JSON is returned
3266            if (typeof responseText === 'string') {
3267                const parts = responseText.split('}{');
3268                if (parts.length === 2) {
3269                    // Join the second part properly
3270                    response = JSON.parse('{' + parts[1]);
3271                } else {
3272                    response = JSON.parse(responseText);
3273                }
3274            } else {
3275                response = responseText;
3276            }
3277
3278            if (response.status) {
3279                // Proceed to next step
3280                $('#step01').hide();
3281                $('#step02').hide();
3282                $('#step03').fadeIn();
3283            } else {
3284                $('#errorotpmessage').text(response.message || 'Invalid code.').fadeIn();
3285            }
3286        } catch (e) {
3287            console.error('Invalid response format', e);
3288            $('#errorotpmessage').text('Something went wrong.').fadeIn();
3289        }
3290    },
3291
3292        complete: function () {
3293            $('#submitbtn').html(stext);
3294            setTimeout(function () {
3295                $('#errorotpmessage').fadeOut();
3296            }, 5000);
3297        }
3298    });
3299}
3300
3301
3302function resendVerificationCode() {
3303    const stext = $('#submitbtn').html();
3304    $.ajax({
3305        method: 'POST',
3306        url: 'https://www.jumpspree.com/resendVerificationCode',
3307        data: { token: token },
3308        dataType: "json",
3309        beforeSend: function () {
3310            $('#submitbtn').html('<span class="jloader"></span>');
3311        },
3312        success: function (response) {
3313            if (!response.status) {
3314                $('#errorotpmessage').text(response.message).fadeIn();
3315            }
3316               showNotification('success', 'Code sent!');
3317        },
3318        complete: function () {
3319            $('#submitbtn').html(stext);
3320            setTimeout(function () {
3321                $('#errorotpmessage').fadeOut();
3322            }, 5000);
3323        }
3324    });
3325}
3326function initOTPValidation() {
3327    const otpInput = document.getElementById("otp1");
3328
3329    otpInput.addEventListener("input", function () {
3330        const sanitized = this.value.replace(/\D/g, '').slice(0, 6);
3331        this.value = sanitized;
3332
3333        if (sanitized.length === 6) {
3334            $("#submitbtn").removeClass("disabled").addClass("activebtn");
3335        } else {
3336            $("#submitbtn").addClass("disabled").removeClass("activebtn");
3337        }
3338    });
3339
3340    // Submit button click handler for verifying OTP
3341    $(document).on('click', '#submitbtn', function () {
3342        if ($('#submitbtn').hasClass('disabled')) return;
3343        verifyRegOtp();
3344    });
3345
3346    // Resend code handler
3347    $(document).on('click', '.resend a', function (e) {
3348        e.preventDefault();
3349        resendVerificationCode();
3350    });
3351}
3352 
3353 
3354
3355// END OF STEP 2: OTP Validation
3356
3357// STEP 03 avtar upload and user name selection 
3358  
3359$(document).ready(function () {
3360
3361    // LIVE CHECK on each keyup or input
3362    $('#username').on('keyup input', function () {
3363        console.log('Username input changed');
3364        const username = $(this).val().trim();
3365
3366        $('#errorusernameemessage').hide();
3367        $('.available-name, .not-available').hide();
3368
3369        if (username.length >= 4 && username !== "@") {
3370            checkUserName(username); // Call API
3371            $('#submitbtnstep3').removeClass('disabled').addClass('activebtn');
3372        } else {
3373            $('#submitbtnstep3').addClass('disabled').removeClass('activebtn');
3374        }
3375    });
3376
3377    // Submit check
3378    $("#submitbtnstep3").on("click", function () {
3379        const regusername = $("#username").val().trim();
3380        const stext = $(this).text();
3381
3382        if (regusername.length < 4 || regusername === "@") {
3383            $("#errorusernameemessage").text("Please enter a valid username").fadeIn();
3384            return;
3385        }
3386
3387        $(this).html('<span class="jloader"></span>');
3388
3389        $.ajax({
3390            method: "POST",
3391            url: "https://www.jumpspree.com/checkRegisterUsername",
3392            data: { username: regusername },
3393            dataType: "json",
3394            success: function (response) {
3395                if (response.status) {
3396                    user_name = regusername; // Store username globally
3397                     $("#hidden_username").val(regusername); 
3398                     $('#userNewName').text('@' + user_name);
3399                      
3400                                        
3401                    const fullUrl = `https://www.jumpspree.com/${user_name}`;
3402                                $('#copy-url-container').text(fullUrl);
3403
3404                                // ✅ Setup copy button click
3405                                $('#copyBtn').off('click').on('click', function (e) {
3406                                    e.preventDefault();
3407                                    console.log('Copy button clicked on 437');
3408                                    const message = `I’m on this new app called Jumpspree—it’s part social, part shopping, all community. It’s where people post, shop, sell, and vibe. C
3408ome check it out and follow me:\n\n${fullUrl}`;
3409
3410                                    // Copy text logic
3411                                    const $temp = $('<textarea>');
3412                                    $('body').append($temp);
3413                                    $temp.val(message).select();
3414                                    document.execCommand("copy");
3415                                    $temp.remove(); 
3416  
3417                                    // Show success message
3418                                     showNotification('success', 'Copied successfully!');
3419                                    $('#errorotpmessageStep6').text('Copied successfully!').fadeIn().delay(2000).fadeOut();
3420                                });
3421
3422
3423
3424
3425
3426
3427
3428
3429                    $(".not-available").hide();
3430                    $(".available-name").fadeIn();
3431
3432                    // Proceed to next step
3433                    $("#step03").hide();
3434                    loadTopics(); // fetch topics only when step 4 actually opens
3435                    $("#step04").fadeIn();
3436                    $(window).scrollTop(0);
3437                } else {
3438                    $(".not-available").fadeIn();
3439                    $(".available-name").hide();
3440                }
3441            },
3442            complete: function () {
3443                $("#submitbtnstep3").html(stext);
3444                setTimeout(() => {
3445                    $("#errorusernameemessage").fadeOut();
3446                }, 5000);
3447            }
3448        });
3449    });
3450
3451
3452    function checkUserName(username) {
3453        $.ajax({
3454            method: "POST",
3455            url: "https://www.jumpspree.com/check-username",
3456            data: { username: username },
3457            dataType: "json",
3458            success: function (response) {
3459                if (response.status) {
3460                    $('.not-available').hide();
3461                    $('.available-name').fadeIn();
3462
3463                    // Enable button
3464                    $('#submitbtnstep3')
3465                        .removeClass('disabled')
3466                        .addClass('activebtn')
3467                        .prop('disabled', false); // <--- remove disabled attribute
3468                } else {
3469                    $('.not-available').fadeIn();
3470                    $('.available-name').hide();
3471
3472                    // Disable button
3473                    $('#submitbtnstep3')
3474                        .addClass('disabled')
3475                        .removeClass('activebtn')
3476                        .prop('disabled', true); // <--- add disabled attribute
3477                }
3478            }
3479        });
3480    }
3481
3482
3483    // Avatar upload functionality
3484    $("#imageUpload").on("change", function () {
3485        const fileInput = this.files[0];
3486
3487        if (fileInput) {
3488            const formData = new FormData();
3489            formData.append("logo", fileInput);
3490            formData.append("name", full_name);
3491
3492            $.ajax({
3493                url: "https://www.jumpspree.com/update-profile",
3494                type: "POST",
3495                data: formData,
3496                processData: false,
3497                contentType: false,
3498                success: function (response) {
3499                    $("#photo-status").text("Photo added ✅").fadeIn();
3500                     avtar = URL.createObjectURL(fileInput);
3501                        updateStep8ProfileUI(); // ✅ Bind avatar
3502                    setTimeout(() => {
3503                        $("#photo-status").fadeOut();
3504                    }, 3000);
3505                },
3506                error: function () {
3507                    $("#photo-status").text("Photo upload failed ❌").css("color", "red").fadeIn();
3508                }
3509            });
3510        }
3511    });
3512
3513
3514});
3515function updateStep8ProfileUI() {
3516    if (user_name) {
3517        $('#userNewName').text('@' + user_name);
3518    }
3519
3520    if (avtar) {
3521        $('#userAvtar img').attr('src', avtar);
3522    }
3523}
3524
3525
3526
3527// step 4 topic selection
3528// ✅ Declare global vars
3529let selectedTopics = []; 
3530$(document).ready(function () {
3531  // loadTopics() is now called lazily when #step04 becomes visible (see line ~458)
3532  // This prevents a redundant get-topic-list call on every page load
3533
3534  // ✅ Button click handler inside ready block
3535  $(document).on('click', '#submitbtnstep4', function () {
3536    if (selectedTopics.length < 3) {
3537      $('#errorotpmessage')
3538        .text("Please select at least 3 topics.")
3539        .fadeIn()
3540        .delay(4000)
3541        .fadeOut();
3542      return;
3543    }
3544
3545    // ✅ Save selected topics
3546    $.post("https://www.jumpspree.com/save-topic-for-user", {
3547      token: token,
3548      topic_ids: selectedTopics
3549    }, function (res) {
3550      if (res.status) {
3551        
3552        $('#step04').hide();
3553        fetchRecommendedUsers(); // fetch only when step 5 actually opens
3554        $('#step05').fadeIn();
3555        $(window).scrollTop(0);
3556      } else {
3557        $('#errorotpmessage').text(res.message || 'Something went wrong.').fadeIn();
3558      }
3559    });
3560  });
3561});
3562
3563// ✅ Load topics dynamically
3564function loadTopics() {
3565  $.get("https://www.jumpspree.com/get-topic-list", function (res) {
3566    if (res.status) {
3567      $('#trendingTopics').empty();
3568      $('#otherTopics').empty();
3569
3570      res.trending.forEach(topic => {
3571        $('#trendingTopics').append(createTopicBtn(topic));
3572      });
3573      res.others.forEach(topic => {
3574        $('#otherTopics').append(createTopicBtn(topic));
3575      });
3576
3577      bindTopicClickEvents();
3578    }
3579  });
3580}
3581
3582// ✅ Render individual topic buttons
3583function createTopicBtn(topic) {
3584  return `<button class="btn topic-btn" data-id="${topic.topic_id}">${topic.topic_name}</button>`;
3585}
3586
3587// ✅ Bind selection events
3588function bindTopicClickEvents() {
3589  $('.topic-btn').off('click').on('click', function () {
3590    const id = $(this).data('id');
3591
3592    if ($(this).hasClass('active')) {
3593      $(this).removeClass('active');
3594      selectedTopics = selectedTopics.filter(tid => tid != id);
3595    } else {
3596      $(this).addClass('active');
3597      selectedTopics.push(id);
3598    }
3599
3600    validateTopicSelection();
3601  });
3602}
3603
3604// ✅ Enable button only after 3+ topics selected
3605function validateTopicSelection() {
3606  const btn = $('#submitbtnstep4');
3607  if (selectedTopics.length >= 3) {
3608    btn.removeAttr('disabled').removeClass('disabled').addClass('activebtn');
3609  } else {
3610    btn.attr('disabled', true).addClass('disabled').removeClass('activebtn');
3611  }
3612}
3613
3614// END OF STEP 4: Topic Selection
3615let followedUsers = [];
3616
3617// Load recommended users
3618function fetchRecommendedUsers() {
3619  $.get(`/get-recommended-list`, function(res) {
3620    if (res.status && res.data.length > 0) {
3621      $('#recommendedUsersContainer').empty();
3622
3623      res.data.forEach(user => {
3624        const isFollowing = followedUsers.includes(user.user_id);
3625        const userCard = `
3626          <div class="users-profie" data-id="${user.user_id}">
3627            <div class="d-flex align-items-center">
3628              <div class="fig">
3629                <img src="${user.image}" alt="${user.username}">
3630              </div>
3631              <div>
3632                <div class="user-profil-detail-box align-items-center">
3633                  <div class="user">
3634                    @${user.username}
3635                    ${user.bluetick == 1 ? '<img src="https://www.jumpspree.com/public/images/blue-cube.png" class="blue-cube-icon" alt="Verified Icon">' : ''}
3636                  </div>
3637                </div>
3638                <p class="mb-0">${user.postViews} total post views</p>
3639              </div> 
3640            </div>
3641            <div class="follow-unfollow">
3642              <a id="follow-btn-${user.user_id}" onClick="followunfollows(${user.user_id}, this)" href="javascript:void(0)" 
3643                 class="follow-btn ${isFollowing ? 'following' : 'not-following'}" 
3644                 data-userid="${user.user_id}">${isFollowing ? 'Following' : 'Follow'}</a>
3645            </div>
3646          </div>
3647        `;
3648        $('#recommendedUsersContainer').append(userCard);
3649      });
3650
3651      // ✅ Bind click to each follow button
3652      /* $('.follow-btn').off('click').on('click', function () {
3653        handleFollowClick(this);
3654      }); */
3655    }
3656  });
3657}
3658
3659
3660
3661
3662// function followunfollows(id, el) {
3663//     const $el = $(el);
3664//     const isFollowing = $el.hasClass('following');
3665
3666//     if (!isFollowing) {
3667//         $.post('/followUser', { whom: id, private: 0 }, function (res) {
3668//             if (res) {
3669//                 $el.text(res.text || 'Following')
3670//                     .removeClass('not-following')
3671//                     .addClass('following');
3672
3673//                 if (!followedUsers.includes(id)) {
3674//                     followedUsers.push(id);
3675//                 }
3676
3677//                 updateStep5ButtonState();
3678//             }
3679//         });
3680//     } else {
3681//         $.post('/unfollow', { whom: id, whomtype: 3 }, function (res) {
3682//             if (res) {
3683//                 $el.text('Follow')
3684//                     .removeClass('following')
3685//                     .addClass('not-following');
3686
3687//                 followedUsers = followedUsers.filter(userId => userId !== id);
3688
3689//                 updateStep5ButtonState();
3690//             }
3691//         });
3692//     }
3693// }
3694
3695
3696function followunfollows(id, el) {
3697    const $el = $(el);
3698    const isFollowing = $el.hasClass('following');
3699
3700    // FOLLOW
3701    if (!isFollowing) {
3702
3703        // Don't allow more than 3 users
3704        if (followedUsers.length >= 3) {
3705           // alert('You can follow only 3 users.');
3706
3707             showNotification('error', 'You can follow only 3 users.');
3708            return;
3709        }
3710
3711        $.post('/followUser', { whom: id, private: 0 }, function (res) {
3712            if (res) {
3713                $el.text(res.text || 'Following')
3714                    .removeClass('not-following')
3715                    .addClass('following');
3716
3717                if (!followedUsers.includes(id)) {
3718                    followedUsers.push(id);
3719                }
3720
3721                updateStep5ButtonState();
3722            }
3723        });
3724
3725    // UNFOLLOW
3726    } else {
3727
3728        $.post('/unfollow', { whom: id, whomtype: 3 }, function (res) {
3729            if (res) {
3730                $el.text('Follow')
3731                    .removeClass('following')
3732                    .addClass('not-following');
3733
3734                followedUsers = followedUsers.filter(userId => userId !== id);
3735
3736                updateStep5ButtonState();
3737            }
3738        });
3739    }
3740}
3741 
3742 
3743// Update next button state
3744// function updateStep5ButtonState() {
3745//    const $submitBtn = $('#submitbtnstep5');
3746//   const hasEnoughFollows = followedUsers.length >= 3;
3747  
3748//   $submitBtn.prop('disabled', !hasEnoughFollows)
3749//             .toggleClass('disabled', !hasEnoughFollows)
3750//             .toggleClass('activebtn', hasEnoughFollows); 
3751// }
3752
3753
3754// $(document).on('click', '#submitbtnstep5', function (e) {
3755//     e.preventDefault();
3756
3757//     if (followedUsers.length >= 3) {
3758//         // Hide current step
3759//         $('#step05').hide();
3760
3761//         // Show next step
3762//         $('#step06').show();
3763//     } else {
3764//         // Optional safety (shouldn't happen)
3765//         console.log('Please follow at least 3 users to continue.');
3766//     }
3767// });
3768
3769function updateStep5ButtonState() {
3770    const $submitBtn = $('#submitbtnstep5');
3771    const hasExactlyThreeFollows = followedUsers.length === 3;
3772
3773    $submitBtn
3774        .prop('disabled', !hasExactlyThreeFollows)
3775        .toggleClass('disabled', !hasExactlyThreeFollows)
3776        .toggleClass('activebtn', hasExactlyThreeFollows);
3777}
3778
3779
3780$(document).on('click', '#submitbtnstep5', function (e) {
3781    e.preventDefault();
3782
3783    if (followedUsers.length === 3) {
3784        $('#step05').hide();
3785        $('#step06').show();
3786    } else {
3787        console.log('Please follow exactly 3 users to continue.');
3788    }
3789});
3790
3791// Initial setup when page loads
3792$(document).ready(function() {
3793  // fetchRecommendedUsers() is now called lazily when #step05 becomes visible (line ~577)
3794  // This prevents a redundant get-recommended-list call on every page load
3795
3796
3797  if (user_name) {
3798    $('.share-post-feed .user-name').text('@' + user_name);
3799  }
3800
3801  if (avtar) {
3802    $('.share-post-feed .fig img').attr('src', avtar);
3803  }
3804// end of step 5: Follow users
3805
3806
3807// start of step 6: id="step06" user name bind 
3808   
3809    
3810}); // end of document ready
3811/* 
3812document.getElementById('copyBtn').addEventListener('click', function (e) {
3813    e.preventDefault();
3814    console.log('Copy button clicked 775');
3815    // Clone the node to avoid modifying original
3816    const original = document.getElementById('textToCopy').cloneNode(true);
3817
3818    // Remove the copy button div from the clone
3819    const copyLink = original.querySelector('.copy-link');
3820    if (copyLink) {
3821        copyLink.remove();
3822    }
3823
3824    // Convert <br> tags to newlines
3825    original.innerHTML = original.innerHTML.replace(/<br\s*\/?>/gi, '\n');
3826
3827    // Extract only the visible text
3828    const text = original.innerText.trim();
3829
3830    // Copy to clipboard
3831    navigator.clipboard.writeText(text).then(function () {
3832       $('#errorotpmessageStep6')
3833        .text('Copied successfully!')
3834        .fadeIn()
3835        .delay(2000)
3836        .fadeOut();
3837    }).catch(function (err) {
3838    });
3839}); */
3840// end of step 6: id="step06" user name bind 
3841
3842
3843// step 08 started
3844 
3845
3846// step 08 end 
3847
3848
3849//Login code started 
3850  
3851
3852    $(document).ready(function () {
3853        $("#loginform").validate({
3854            errorClass: 'error_regitration',
3855            errorElement: 'span',
3856            rules: {
3857                loginname: 'required',
3858                loginpassword: 'required'
3859            },
3860
3861            // Disable default error placement
3862            errorPlacement: function () {
3863                return false;
3864            },
3865
3866            // Fully custom error rendering
3867            showErrors: function (errorMap, errorList) {
3868                // First, clear all previous errors
3869                $('#loginname_validate').text('');
3870                $('#loginpassword_validate').text('');
3871
3872                // Now, loop through and set errors manually
3873                $.each(errorList, function (i, errorObj) {
3874                    const fieldName = errorObj.element.name;
3875                    const $target = $("#" + fieldName + "_validate");
3876
3877                    if ($target.length) {
3878                        $target.text(errorObj.message).addClass('error_regitration');
3879                    }
3880                });
3881
3882                // Also highlight invalid fields if needed
3883                this.defaultShowErrors(); // optional for adding 'error' class to inputs
3884            },
3885
3886            submitHandler: function (form, e) {
3887                e.preventDefault();
3888                checkLogin();
3889            }
3890        });
3891
3892
3893        // Toggle password
3894        $(document).on('click', '.toggle-password', function () {
3895            var input = $("#loginpassword");
3896            if (input.attr('type') === 'password') {
3897                input.attr('type', 'text');
3898                $(this).html('<i class="fa-regular fa-eye-slash"></i>');
3899            } else {
3900                input.attr('type', 'password');
3901                $(this).html('<i class="fa-regular fa-eye"></i>');
3902            }
3903        });
3904
3905        // Toggle Email/Username mode
3906         $(document).on('click', '#emailusername', function () {
3907            var logintype = $('#emailusername').data('type');
3908
3909            if (logintype == 2) {
3910                $("#emaillabel").text('Email');
3911                $("#emailusername").text('Use username instead');
3912                $('#loginname').attr("placeholder", "[email protected]").removeClass("padleft");
3913                $("#emailimage").hide();
3914                $('#emailusername').data('type', '1');
3915            } else {
3916                $("#emaillabel").text('Username');
3917                $("#emailusername").text('Use email instead');
3918                $('#loginname').attr("placeholder", "Username").addClass("padleft");
3919                $("#emailimage").show();
3920                $('#emailusername').data('type', '2');
3921            }
3922        });  
3923        
3924        
3925    $(document).on('click', '.use-user-name a', function (e) {
3926            e.preventDefault();
3927
3928            const $this = $(this);
3929            const type = $this.attr('data-type'); // use attr instead of .data()
3930
3931        if (type === '2') {
3932            $("#emaillabel").text('Email');
3933            $this.text('Use username instead').attr('data-type', '1');
3934            $('#forgotemail').attr("placeholder", "[email protected]").removeClass("padleft");
3935            $("#emailimage2").hide();
3936        } else {
3937            $("#emaillabel").text('Username');
3938            $this.text('Use email instead').attr('data-type', '2');
3939            $('#forgotemail').attr("placeholder", "Username").addClass("padleft");
3940            $("#emailimage2").show();
3941        }
3942    });
3943
3944
3945
3946         /* $(document).on('click', '#emailusername', function () {
3947                const $toggle = $('#emailusername');
3948                const logintype = $toggle.data('type'); // 1=email, 2=username
3949                const $input = $('#forgotemail');
3950                const $icon = $('#login-icon');
3951
3952                if (logintype == 2) {
3953                    // Switch to Email
3954                    $('#emaillabel').text('Email');
3955                    $toggle.text('Use username instead').data('type', 1);
3956                    $input.attr('placeholder', '[email protected]')
3957                        .removeClass('with-icon');
3958                    $icon.hide();
3959                } else {
3960                    // Switch to Username
3961                    $('#emaillabel').text('Username');
3962                    $toggle.text('Use email instead').data('type', 2);
3963                    $input.attr('placeholder', 'Username')
3964                        .addClass('with-icon');
3965                    $icon.show();
3966                }
3967            }); */
3968    });
3969
3970   /*  function checkLogin() {
3971        var loginname = $('#loginname').val();
3972        var loginpassword = $('#loginpassword').val();
3973        var logintype = $('#emailusername').data('type');
3974        var stext = $('#submitbtn').text();
3975
3976        $('#errormessage').text('').fadeOut();
3977
3978        $.ajax({
3979            method: 'POST',
3980            url: 'https://www.jumpspree.com/checkLogin',
3981            data: {
3982                loginname: loginname,
3983                loginpassword: loginpassword,
3984                logintype: logintype
3985            },
3986            dataType: "json",
3987            beforeSend: function () {
3988                $('#submitbtn').html('<span class="jloader"></span>');
3989            },
3990            success: function (response) {
3991                var msg = response.message;
3992                var userflag = response.userflag;
3993
3994                if (response.status) {
3995                    if (userflag === '0') {
3996                        window.location.href = 'https://www.jumpspree.com/pick-a-username';
3997                    } else {
3998                        window.location.href = 'https://www.jumpspree.com';
3999                    }
4000                } else {
4001                    $('#errormessage').text(msg).fadeIn();
4002                }
4003            },
4004            complete: function () {
4005                $('#submitbtn').html(stext);
4006                setTimeout(function () {
4007                    $('#errormessage').fadeOut();
4008                }, 5000);
4009            }
4010        });
4011    }  
4012 */
4013
4014function checkLogin() {
4015        let loginname = $('#loginname').val();
4016        let loginpassword = $('#loginpassword').val();
4017        let logintype = $('#emailusername').attr('data-type');
4018        var $signinBtn = $('#signinSubmitBtn');
4019
4020        console.log('=== LOGIN DEBUG START ===');
4021        console.log('Input values - loginname:', loginname, 'logintype:', logintype);
4022
4023        $('#errormessage').text('').fadeOut();
4024
4025        $.ajax({
4026            method: 'POST',
4027            url: 'https://www.jumpspree.com/checkLogin',
4028            data: {
4029                loginname: loginname,
4030                loginpassword: loginpassword,
4031                logintype: logintype
4032            },
4033            dataType: "json",
4034            beforeSend: function() {
4035                console.log('AJAX request started...');
4036                $signinBtn.prop('disabled', true).html('<span class="jloader"></span>');
4037            },
4038            success: function(response) {
4039                console.log('=== AJAX SUCCESS RESPONSE ===');
4040                console.log('Full response:', response);
4041                console.log('Response status:', response.status);
4042                console.log('Response message:', response.message);
4043                console.log('Response userflag:', response.userflag);
4044                console.log('Response redirect:', response.redirect);
4045                console.log('Response token:', response.token);
4046                
4047                let msg = response.message;
4048                let userflag = response.userflag;
4049                
4050                if (response.status) {
4051                    console.log('Login SUCCESS - Processing redirect...');
4052                    console.log('Userflag value:', userflag);
4053                    
4054                    if (userflag == '0') {
4055                        console.log('Userflag is 0 - Redirecting to pick username page');
4056                        window.location.href = 'https://www.jumpspree.com/pick-a-username';
4057                    } else {
4058                        console.log('Userflag is 1 - Checking server redirect...');
4059                        
4060                        if (response.redirect) {
4061                            const redirectUrl = 'https://www.jumpspree.com' + response.redirect;
4062                            console.log('Server redirect found:', response.redirect);
4063                            console.log('Full redirect URL:', redirectUrl);
4064                            console.log('Attempting redirect now...');
4065                            window.location.href = redirectUrl;
4066                        } else {
4067                            console.log('No server redirect provided - Using fallback to home');
4068                            window.location.href = 'https://www.jumpspree.com';
4069                        }
4070                    }
4071                } else {
4072                    console.log('Login FAILED - Showing error message');
4073                    $('#errormessage').text(msg).fadeIn();
4074                }
4075            },
4076            error: function(xhr, status, error) {
4077                console.log('=== AJAX ERROR ===');
4078                console.log('XHR status:', xhr.status);
4079                console.log('Error:', error);
4080                console.log('Response text:', xhr.responseText);
4081            },
4082            complete: function() {
4083                console.log('=== AJAX COMPLETE ===');
4084                $signinBtn.prop('disabled', false).html('Sign In');
4085                setTimeout(() => $('#errormessage').fadeOut(), 5000);
4086            }
4087        });
4088        
4089        console.log('=== LOGIN DEBUG END ===');
4090    }
4091
4092
4093// Login code end
4094
4095 // rest code start 
4096$(document).ready(function () {
4097   // Toggle between Email / Username
4098    $('.use-user-name a, #emailusername').on('click', function () {
4099        const label = $('#emaillabel').text();
4100        $('#emaillabel').text(label === 'Email' ? 'Username' : 'Email');
4101        $('#forgotemail').attr('placeholder', label === 'Email' ? '@username' : '[email protected]');
4102    });
4103
4104        // Live validate email/username
4105    $('#forgotemail').on('input', function () {
4106        const val = $(this).val();
4107        const isEmail = /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(val);
4108        const isUsername = val.startsWith('@');
4109        if (!val) {
4110            $('#forgotemail_validate').text('This field is required');
4111        } else if (!isEmail && !isUsername) {
4112            $('#forgotemail_validate').text('Enter a valid email or username');
4113        } else {
4114            $('#forgotemail_validate').text('');
4115        }
4116    });
4117
4118    // Step 1: Send reset link
4119    $('#send-reset-btn').on('click', function () {
4120        const val = $('#forgotemail').val().trim();
4121        if (!val) {
4122            $('#forgotemail_validate').text('Please enter your email or username.');
4123            return;
4124        }
4125
4126        $('#forgotemail_validate, #errorforgotpassword').text('');
4127
4128        const formData = new FormData();
4129        formData.append('forgotemail', val);
4130
4131        $.ajax({
4132            url: base_url + '/forgotpassword',
4133            method: 'POST',
4134            data: formData,
4135            contentType: false,
4136            processData: false,
4137            dataType: 'json',
4138            beforeSend: () => $(this).text('Sending...').prop('disabled', true),
4139            success: function (res) {
4140                if (res.status) {
4141                    resetEmail = res.email;
4142                    resetKey = res.key;
4143                      showNotification('success', 'OTP sent!');
4144                    $('#helper-text').html(`We just sent you a code to your email <b>${resetEmail}</b>`);
4145                    $('#reset-new-process').hide();
4146                    $('#verifyreset-new-process').fadeIn();
4147                } else {
4148                    $('#errorforgotpassword').text(res.message || 'Something went wrong');
4149                }
4150            },
4151            complete: () => $('#send-reset-btn').text('Send').prop('disabled', false)
4152        });
4153    });
4154
4155    $('#verify-otp-btn').on('click', function (e) {
4156    e.preventDefault();
4157
4158    const $otpInput = $('#otpforreset');
4159    const otp = $otpInput.val().trim();
4160
4161    // Remove all previous messages related to this field
4162    $otpInput
4163        .removeClass('error') // remove red border if added by jQuery Validate
4164        .nextAll('.otp-error-message, label.error').remove();
4165
4166    // Validate
4167    if (!otp || otp.length !== 6) {
4168        $otpInput
4169            .addClass('error')
4170            .after('<span class="otp-error-message myerror" style="color:red; font-size:13px;">Enter a valid 6-digit code</span>');
4171        return;
4172    }
4173
4174    // Make API call
4175    $.post(base_url + '/verifyresetpasswordotp', { email: resetEmail, otp }, function (res) {
4176        $otpInput.nextAll('.otp-error-message, label.error').remove(); // clean again before showing
4177
4178        if (res.status) {
4179            $('#verifyreset-new-process').hide();
4180            $('#enter-new-password').fadeIn();
4181        } else {
4182            $otpInput.after(`<span class="otp-error-message myerror" style="color:red; font-size:13px;">${res.message || 'This OTP is invalid.'}</span>`);
4183        }
4184    }, 'json');
4185});
4186
4187   
4188    $('#reset-password-btn').on('click', function (e) {
4189            e.preventDefault();
4190
4191            const newPassword = $('#forgotnewpassword').val().trim();
4192            const confirmPassword = $('#forgotconnewpassword').val().trim();
4193
4194            let isValid = true;
4195
4196            // Clear previous messages
4197            $('#forgotnewpassword_validate, #forgotconnewpassword_validate').hide().text('');
4198
4199            // Validate new password
4200            if (!newPassword) {
4201                $('#forgotnewpassword_validate').text('New password is required').show();
4202                isValid = false;
4203            } else if (newPassword.length < 8 || !/[A-Z]/.test(newPassword) || !/\d/.test(newPassword)) {
4204                $('#forgotnewpassword_validate').text('Must be 8+ chars, include a number and an uppercase letter.').show();
4205                isValid = false;
4206            }
4207
4208            // Validate confirm password
4209            if (!confirmPassword) {
4210                $('#forgotconnewpassword_validate').text('Please confirm your password').show();
4211                isValid = false;
4212            } else if (newPassword !== confirmPassword) {
4213                $('#forgotconnewpassword_validate').text('Passwords do not match').show();
4214                isValid = false;
4215            }
4216
4217            if (!isValid) return;
4218
4219            // All good – call reset API
4220            const payload = {
4221                email: resetEmail,
4222                newpassword: newPassword,
4223                confirmnewpassword: confirmPassword,
4224                key: resetKey
4225            };
4226
4227            $.ajax({
4228                method: 'POST',
4229                url: base_url + '/resetwewpassword',
4230                data: payload,
4231                dataType: "json",
4232                beforeSend: function () {
4233                    $('#createpasswordbox').append('<div class="loader"><div class="loader__inner"><div class="loader__content"><span class="loaderspinner"></span></div></div></div>');
4234                },
4235                success: function (response) {
4236                    if (response.status) {
4237                      //  showNotification('success', response.message || 'Password reset successfully.');
4238
4239                        $('#enter-new-password').fadeOut('fast', function () {
4240                            $('#password-change-success').fadeIn();
4241                        });
4242                    } else {
4243                        showNotification('error', response.message || "Some error occurred, please try again");
4244                    }
4245                },
4246                complete: function () {
4247                    $('#createpasswordbox .loader').remove();
4248                }
4249            });
4250    });
4251    
4252    // Step 4: Resend code - simply trigger the same function
4253    $('.resend a').on('click', function (e) {
4254        e.preventDefault();
4255        $('#send-reset-btn').trigger('click');
4256    });
4257
4258
4259    // Final Close
4260    $('.close a').on('click', function () {
4261        $('#password-change-success').hide();
4262        $('#sign-in-box').fadeIn();
4263    });
4264
4265 
4266
4267     
4268});
4269
4270
4271document.addEventListener('DOMContentLoaded', function () {
4272    const newPassInput = document.getElementById('forgotnewpassword');
4273    const confirmPassInput = document.getElementById('forgotconnewpassword');
4274    const resetBtn = document.getElementById('reset-password-btn');
4275
4276    const newPassError = document.getElementById('forgotnewpassword_validate');
4277    const confirmPassError = document.getElementById('forgotconnewpassword_validate');
4278
4279    function validateFields() {
4280        const newPass = newPassInput.value.trim();
4281        const confirmPass = confirmPassInput.value.trim();
4282
4283        let isValid = true;
4284
4285        // Validate new password field
4286        if (newPass === '') {
4287            newPassError.textContent = 'New password is required';
4288            newPassError.style.display = 'block';
4289            isValid = false;
4290        } else {
4291            newPassError.textContent = '';
4292            newPassError.style.display = 'none';
4293        }
4294
4295        // Validate confirm password field
4296        if (confirmPass === '') {
4297            confirmPassError.textContent = 'Please confirm your password';
4298            confirmPassError.style.display = 'block';
4299            isValid = false;
4300        } else if (newPass !== confirmPass) {
4301            confirmPassError.textContent = 'Passwords do not match';
4302            confirmPassError.style.display = 'block';
4303            isValid = false;
4304        } else {
4305            confirmPassError.textContent = '';
4306            confirmPassError.style.display = 'none';
4307        }
4308
4309        // Enable or disable reset button
4310        if (isValid) {
4311            resetBtn.removeAttribute('disabled');
4312            resetBtn.classList.add('active');
4313        } else {
4314            resetBtn.setAttribute('disabled', 'true');
4315            resetBtn.classList.remove('active');
4316        }
4317    }
4318
4319    newPassInput.addEventListener('input', validateFields);
4320    confirmPassInput.addEventListener('input', validateFields);
4321});
4322
4323// password re typr screen 
4324
4325// Password Toggle Logic
4326   $(document).on('click', '.toggle-password', function () {
4327        const inputSelector = $(this).attr('data-target');
4328        const input = $(inputSelector);
4329
4330        // Toggle icon
4331        $(this).toggleClass('fa-eye fa-eye-slash');
4332
4333        // Toggle type
4334        const type = input.attr('type') === 'password' ? 'text' : 'password';
4335        input.attr('type', type);
4336    });
4337
4338     
4339 
4340
4341   $(document).on('click', '.toggle-password', function () {
4342        const input = $($(this).data('target'));
4343        const icon = $(this).find('i');
4344
4345        if (input.length === 0 || icon.length === 0) return;
4346
4347        // Toggle password visibility
4348        const isPassword = input.attr('type') === 'password';
4349        input.attr('type', isPassword ? 'text' : 'password');
4350
4351        // Toggle eye / eye-slash icon
4352        icon.toggleClass('fa-eye fa-eye-slash');
4353    });
4354
4355
4356 
4357</script>
4357
4358
4359
4360
4361<style>
4362.remove-report-attachment{
4363    position: absolute;
4364    top: 10px;
4365    right: 5px;
4366}
4367
4368.search-suggestion-list li.active {
4369    background: #f1f1f1;
4370}
4371
4372.search-suggestion-list li.active a {
4373    color: #000;
4374}    
4375    h2.signinpopup{font-size: 26px;
4376    font-weight: 600;
4377    line-height: 33px;}    
4378    
4379 @media screen and (min-width:768px){    
4380/* Chrome, Edge, Safari */
4381#social-popup .add-post-inside-wrapper::-webkit-scrollbar{
4382    width:10px;
4383}
4384
4385/* Track */
4386#social-popup .add-post-inside-wrapper::-webkit-scrollbar-track{
4387    background:#1f262b;
4388    border-radius:10px;
4389}
4390
4391/* Thumb */
4392#social-popup .add-post-inside-wrapper::-webkit-scrollbar-thumb{
4393    background:#5c6369;
4394    border-radius:10px;
4395}
4396
4397/* Hover thumb */
4398#social-popup .add-post-inside-wrapper::-webkit-scrollbar-thumb:hover{
4399    background:#777;
4400}
4401
4402/* TOP ARROW */
4403#social-popup .add-post-inside-wrapper::-webkit-scrollbar-button:single-button:vertical:decrement{
4404    height:16px;
4405    background-color:#1f262b;
4406    background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12'><polygon points='6,3 10,9 2,9' fill='%23aaa'/></svg>");
4407    background-repeat:no-repeat;
4408    background-position:center;
4409}
4410
4411/* BOTTOM ARROW */
4412#social-popup .add-post-inside-wrapper::-webkit-scrollbar-button:single-button:vertical:increment{
4413    height:16px;
4414    background-color:#1f262b;
4415    background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12'><polygon points='2,3 10,3 6,9' fill='%23aaa'/></svg>");
4416    background-repeat:no-repeat;
4417    background-position:center;
4418}
4419#social-popup .add-post-inside {
4420    padding-right: 0;
4421}    
4422
4423/* Firefox */
4424.agreement-body {
4425    scrollbar-width: thin;
4426    scrollbar-color: #999 #f1f1f1;
4427}    
4428#social-popup .swiper-wrapper.singleImage-added .swiper-slide {
4429/*    width: 100% !important;*/
4430/*    margin: 0 !important;*/
4431}
4432#social-popup div#imagePreviewBox .close-btn.closeThisImg{
4433    right: 5px;
4434    background: #1f1f1fd4;
4435    top: 5px;
4436}    
4437#social-popup .swiper-wrapper.double-imageadded .swiper-slide:last-child {
4438    margin: 0 !important;
4439}
4440
4441#social-popup .swiper-wrapper.double-imageadded .swiper-slide {
4442    flex: 1;
4443}  
4444#social-popup div#imagePreviewBox {
4445    max-width: 100%;
4446}    
4447    #social-popup .swiper-wrapper.double-imageadded .swiper-slide img{
4448    height: 250px !important;
4449    width: 100% !important;
4450    object-fit: cover;
4451    }    
4452.create-post-bottom-icons.d-flex.align-items-center {
4453    background: #161616;
4454    padding-top: 10px;
4455}    
4456#social-popup .swiper-wrapper.singleImage-added .swiper-slide img {
4457    height: auto !important;
4458    width: 100% !important;
4459}    
4460.light-mode .create-post-bottom-icons.d-flex.align-items-center {
4461    background: #f1f1f1 !important;
4462    padding-top: 10px;
4463}     
4464    }
4465 @media screen and (max-width:767px){
4466#social-popup div#imagePreviewBox .close-btn.closeThisImg{
4467    right: 5px;
4468    background: #1f1f1fd4;
4469    top: 5px;
4470}
4471#social-popup .swiper.mySwiper {
4472    padding: 0 20px;
4473}     
4474 .create-post-bottom-icons.d-flex.align-items-center {
4475    background: #000;
4476    padding-top: 10px;
4477}
4478.light-mode .create-post-bottom-icons.d-flex.align-items-center {
4479    background: #f1f1f1 !important;
4480    padding-top: 10px;
4481}
4482    }      
4483#social-popup .swiper-slide {
4484    width: auto;
4485}
4486
4487#social-popup div#imageCarousel {
4488    border: none
4489}
4490
4491.link-favicon {
4492    width: 16px !important;
4493    height: 16px !important;
4494    margin-right: 6px !important;
4495    vertical-align: middle !important;
4496    border-radius: 3px !important;
4497}
4498
4499.user-avatar-placeholder {
4500    width: 40px;
4501    height: 40px;
4502    border-radius: 50%;
4503    background: #007bff;
4504    /* blue background (can change) */
4505    color: #fff;
4506    display: flex;
4507    align-items: center;
4508    justify-content: center;
4509    font-weight: bold;
4510    font-size: 18px;
4511    text-transform: uppercase;
4512}
4513
4514button.select-plan.active {
4515    background-color: #582fdb !important;
4516    color: white;
4517}
4518
4519.iconspin {
4520    animation: iconspin 1s linear infinite;
4521}
4522
4523@keyframes iconspin {
4524    from {
4525        transform: rotate(0deg);
4526    }
4527
4528    to {
4529        transform: rotate(360deg);
4530    }
4531}
4532
4533.spinner {
4534    width: 26px;
4535    height: 26px;
4536    border: 2px solid #f3f3f3;
4537    border-top: 2px solid #333;
4538    border-radius: 50%;
4539    animation: spin 0.6s linear infinite;
4540    display: inline-block;
4541}
4542
4543@keyframes spin {
4544    0% {
4545        transform: rotate(0deg);
4546    }
4547
4548    100% {
4549        transform: rotate(360deg);
4550    }
4551}
4552
4553emoji-picker {
4554    --emoji-picker-search-input-width: 30px !important;
4555    --emoji-picker-search-input-padding: 16px;
4556    --emoji-picker-search-input-font-size: 18px;
4557    --emoji-picker-search-input-border-radius: 10px;
4558    --emoji-picker-search-input-border: 2px solid #5f9ea0;
4559    --emoji-picker-search-input-background: #eef6f8;
4560    --emoji-picker-search-input-color: #333;
4561}
4562
4563emoji-picker {
4564    --emoji-picker-search-input-width: 30px !important;
4565    --emoji-picker-search-input-padding: 16px;
4566    --emoji-picker-search-input-font-size: 18px;
4567    --emoji-picker-search-input-border-radius: 10px;
4568    --emoji-picker-search-input-border: 2px solid #5f9ea0;
4569    --emoji-picker-search-input-background: #eef6f8;
4570    --emoji-picker-search-input-color: #333;
4571}
4572
4573.btnisenable {
4574    background-color: #28a745;
4575    color: white;
4576    cursor: pointer;
4577}
4578
4579.btnisdisable {
4580    background-color: #ccc;
4581    color: #666;
4582    cursor: not-allowed;
4583}
4584
4585.hide {
4586    display: none;
4587}
4588
4589.highlight-hashtag {
4590    color: #007bff;
4591    /* font-weight: bold; */
4592}
4593
4594.highlight-mention {
4595    color: #007bff;
4596    /*  font-weight: bold; */
4597}
4598
4599/*  .mention-link {
4600        color: #007bff !important;
4601       
4602    } */
4603
4604.post-text {
4605    cursor: pointer;
4606}
4607
4608.post-text a {
4609    cursor: default;
4610    /* Keep default cursor for links */
4611}
4612
4613#addPostTextarea {
4614    min-height: 48px;
4615    padding: 8px;
4616
4617    border-radius: 6px;
4618    width: 100%;
4619    font-size: 16px;
4620    overflow-y: auto;
4621    white-space: pre-wrap;
4622}
4623
4624#addPostTextarea:empty:before {
4625    content: attr(data-placeholder);
4626    color: #888;
4627    font-size: 15px;
4628    font-weight: 300;
4629
4630}
4631
4632.highlight {
4633    color: #007BFF;
4634}
4635
4636
4637.getstart-icon img {
4638    width: 60px;
4639}
4640
4641.getstart-icon {
4642    text-align: center;
4643    margin-bottom: 40px !important;
4644
4645}
4646
4647.get-app-qr-code-wrapper .email-verification.after-login {
4648    border: 1px solid #333333;
4649    border-radius: 42px;
4650}
4651
4652.close-getstart {
4653    position: absolute;
4654    right: 40px;
4655    font-size: 33px;
4656    color: #555555;
4657    top: 20px;
4658    font-weight: 100;
4659    cursor: pointer;
4660}
4661
4662div#getstart-popup p {
4663    color: #adadad;
4664    font-size: 14px;
4665    font-weight: 300;
4666}
4667
4668div#getstart-popup .download-btn {
4669    display: flex;
4670    padding: 0;
4671    margin: 0;
4672    width: 100%;
4673    gap: 15px;
4674    justify-content: center;
4675    padding: 0 25px;
4676    margin-bottom: 25px !important;
4677    margin-top: 25px;
4678}
4679
4680div#getstart-popup .email-verification.after-login {
4681    border: 1px solid #333333;
4682    border-radius: 42px;
4683    padding: 15px 0;
4684    padding-top: 40px !important;
4685}
4686
4687.getstart-icon {
4688    text-align: center;
4689    margin-bottom: 20px !important;
4690}
4691
4692.mention-popup {
4693    display: none;
4694    /* position: absolute; */
4695    left: 0;
4696    bottom: 50px;
4697    width: 100%;
4698    max-height: 200px;
4699    overflow-y: auto;
4700    background: white;
4701    border: 1px solid #ccc;
4702    border-radius: 4px;
4703    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
4704    z-index: 1000;
4705}
4706
4707.user-item {
4708    display: flex;
4709    align-items: center;
4710    padding: 8px;
4711    cursor: pointer;
4712    color: white;
4713    background-color: #373737;
4714}
4715
4716.user-item:hover {
4717    background: #3b3b3b;
4718}
4719
4720.user-avatar {
4721    width: 30px;
4722    height: 30px;
4723    border-radius: 50%;
4724    margin-right: 10px;
4725}
4726
4727.user-info {
4728    display: flex;
4729    flex-direction: column;
4730}
4731
4732.user-name {
4733    font-size: 14px;
4734    font-weight: 500;
4735    margin-bottom: 2px;
4736}
4737
4738.user-username {
4739    font-size: 12px;
4740    color: #d4d4d4;
4741}
4742
4743
4744.jloader {
4745    display: inline-block;
4746    width: 16px;
4747    height: 16px;
4748    border: 2px solid #fff;
4749    /* White border */
4750    border-top: 2px solid #007bff;
4751    /* Blue border for animation */
4752    border-radius: 50%;
4753    animation: spin 1s linear infinite;
4754}
4755
4756@keyframes spin {
4757    from {
4758        transform: rotate(0deg);
4759    }
4760
4761    to {
4762        transform: rotate(360deg);
4763    }
4764}
4765
4766.top-shim {
4767    display: flex;
4768    flex-direction: row-reverse;
4769    justify-content: space-between;
4770    margin-bottom: 18px;
4771}
4772
4773.shimmercomment.shimmerbr.shimmeranimate.shimmerw80 {
4774    width: 90%;
4775    margin-top: 16px;
4776}
4777
4778.shimmerdiv {
4779    margin-top: 20px;
4780}
4781
4782.shimmerbr {
4783    border-radius: 2px;
4784}
4785
4786.shimmerw80 {
4787    width: 60%;
4788}
4789
4790
4791.shimmerprofilePic {
4792    height: 35px;
4793    width: 35px;
4794    border-radius: 50%;
4795
4796}
4797
4798.shimmercomment {
4799    height: 5px;
4800    background: #777;
4801    margin-top: 10px;
4802}
4803
4804@keyframes fullView {
4805    100% {
4806        width: 100%;
4807    }
4808}
4809
4810.shimmerw60 {
4811    width: 70%;
4812}
4813
4814.shimmeranimate {
4815    animation: shimmer 2s infinite linear;
4816    background: linear-gradient(to right, #525252 4%, #616161 25%, #616161 36%);
4817    background-size: 1000px 100%;
4818}
4819
4820@keyframes shimmer {
4821    0% {
4822        background-position: -1000px 0;
4823    }
4824
4825    100% {
4826        background-position: 1000px 0;
4827    }
4828}
4829
4830
4831.character-count-container {
4832    display: flex;
4833    align-items: center;
4834    gap: 10px;
4835}
4836
4837.progress-circle {
4838    position: relative;
4839    width: 50px;
4840    height: 50px;
4841}
4842
4843.progress-circle svg {
4844    transform: rotate(-90deg);
4845    width: 100%;
4846    height: 100%;
4847}
4848
4849.progress-circle circle {
4850    fill: none;
4851    stroke-width: 4;
4852}
4853
4854.progress-circle .bg {
4855    stroke: #e0e0e0;
4856}
4857
4858.progress-circle .progress {
4859    stroke: #4caf50;
4860    stroke-dasharray: 138.2;
4861    /* Circumference of the circle (2 * π * r) */
4862    stroke-dashoffset: 138.2;
4863    transition: stroke-dashoffset 0.3s ease;
4864}
4865
4866.disabled {
4867    background: gray;
4868    cursor: not-allowed;
4869}
4870
4871.blue-bg {
4872    background: blue;
4873    color: white;
4874}
4875
4876
4877
4878
4879
4880
4881input#gifSearchForAddPost {
4882    font-size: 15px;
4883    background: #3a3a3a !important;
4884    width: 100%;
4885    padding: 0 15px;
4886    border-radius: 10px;
4887    color: #fff;
4888}
4889
4890button#gifSearchBtnForAddPost {
4891    position: absolute;
4892    right: 16px;
4893    top: 0;
4894    padding: 0;
4895    color: #bbb;
4896    font-size: 24px;
4897}
4898
4899#imagePreviewContainer {
4900    max-width: 55% !important;
4901}
4902
4903.gif-modal {
4904    position: fixed;
4905    top: 10%;
4906    left: 50%;
4907    transform: translate(-50%, 0);
4908    width: 80%;
4909    background: #fff;
4910    border: 1px solid #ddd;
4911    padding: 20px;
4912    z-index: 1000;
4913    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
4914    display: none;
4915    flex-direction: column;
4916}
4917
4918.gif-search {
4919    display: flex;
4920    gap: 10px;
4921    margin-bottom: 10px;
4922}
4923
4924.gif-results {
4925    display: flex;
4926    flex-wrap: wrap;
4927    gap: 10px;
4928    max-height: 400px;
4929    overflow-y: auto;
4930}
4931
4932.gif-results img {
4933    width: 100px;
4934    cursor: pointer;
4935    transition: transform 0.2s;
4936}
4937
4938.gif-results img:hover {
4939    transform: scale(1.1);
4940}
4941
4942.search-icon-btn {
4943    background: none;
4944    border: none;
4945    cursor: pointer;
4946    font-size: 18px;
4947    padding: 5px;
4948    color: #333;
4949}
4950
4951.search-icon-btn i {
4952    font-size: 20px;
4953}
4954
4955.search-icon-btn:hover i {
4956    color: #007bff;
4957    /* Change color on hover */
4958}
4959
4960@media screen and (max-width:767px) {
4961    #social-popup .add-post-inner span.discard-button {
4962        font-size: 12px;
4963    }
4964
4965    #getstart-popup .email-verification.after-login {
4966        width: 90%;
4967    }
4968
4969    div#getstart-popup .download-btn {
4970        padding: 0 10px;
4971    }
4972
4973    div#getstart-popup .email-verification.after-login .email-box {
4974        border-bottom: none !important;
4975    }
4976
4977    div#getstart-popup .download-btn {
4978        margin-bottom: 15px !important;
4979    }
4980
4981    div#getstart-popup p br {
4982        display: none;
4983    }
4984
4985    .close-getstart {
4986        right: 20px;
4987        top: 10px;
4988    }
4989
4990    .upload-snackbar {
4991        position: fixed;
4992        bottom: 20px;
4993        right: 20px;
4994        width: 300px;
4995        background: #333;
4996        color: white;
4997        border-radius: 4px;
4998        padding: 15px;
4999        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
5000        display: none;
5001        z-index: 10000;
5002    }
5003
5004    .upload-progress-container {
5005        width: 100%;
5006        height: 4px;
5007        background: #555;
5008        border-radius: 2px;
5009        margin-bottom: 8px;
5010        overflow: hidden;
5011    }
5012
5013    .upload-progress-bar {
5014        height: 100%;
5015        width: 0%;
5016        background: #4CAF50;
5017        border-radius: 2px;
5018        transition: width 0.3s ease;
5019    }
5020
5021    .upload-message {
5022        margin-bottom: 5px;
5023        font-size: 14px;
5024    }
5025
5026    .upload-percentage {
5027        text-align: right;
5028        font-size: 12px;
5029        color: #aaa;
5030    }
5031
5032    #uploadProgressBar {
5033        transition: width 0.3s ease-in-out;
5034    }
5035
5036
5037}
5038</style>
5039<style>
5040#addPostTextarea {
5041    margin-top: 10px;
5042}
5043
5044.add-post-inside-wrapper {
5045    height: auto;
5046    max-height: 49vh;
5047    overflow-y: auto;
5048    min-height: auto;
5049}
5050
5051.post-foot.add-post-foot .post-setting-box {
5052    padding: 0;
5053    border: none;
5054}
5055
5056div#post-setting-dropup,
5057div#post-setting-dropup-poll {
5058    position: absolute;
5059    bottom: 60px;
5060    background: #262525;
5061    width: 290px;
5062    padding: 0px;
5063    border-radius: 20px;
5064}
5065
5066#post-setting-dropup .post-setting-box-list,
5067#post-setting-dropup-poll .post-setting-box-list {
5068    border: none;
5069    padding: 0;
5070    margin: 0 !important;
5071}
5072
5073.post-setting-box-list {
5074    padding: 3px 13px !important;
5075    border-bottom: 1px solid #3241585c !important;
5076    border-radius: 0 !important;
5077}
5078
5079.post-setting-box-list:last-child {
5080    border-bottom: none !important;
5081}
5082
5083#post-setting-dropup,
5084#post-setting-dropup-poll {
5085    transform: scale(0);
5086    transition: all 0.3s ease;
5087    transform-origin: left bottom;
5088    opacity: 0;
5089}
5090
5091div#post-setting-dropup.show-popup,
5092div#post-setting-dropup-poll.show-popup {
5093    transform: scale(1.0);
5094    opacity: 1;
5095}
5096
5097.post-foot.add-post-foot .post-setting-box h3 {
5098    margin: 0;
5099    cursor: pointer;
5100}
5101
5102div#social-popup .header-post.social-add-header {
5103    min-height: 544px;
5104}
5105
5106#social-popup .popup-top-header {
5107    border-bottom: 1px solid #3241585c;
5108}
5109
5110#social-popup .popup-top-header .draft a {
5111    display: flex;
5112    align-items: center;
5113    justify-content: center;
5114    font-size: 14px !important;
5115    font-weight: 600;
5116}
5117
5118#social-popup .add-post-inner .post-btn a {
5119    right: inherit;
5120    left: 4px;
5121    color: #fff;
5122}
5123
5124#social-popup .post-btn {
5125    padding-right: 0;
5126}
5127
5128div#social-popup .post-foot.add-post-foot .send-post button {
5129    border-left: 2px solid #3241585c !important;
5130    padding-right: 9px;
5131    margin-right: 0;
5132    padding-left: 6px;
5133    width: 42px;
5134    float: right;
5135    margin-left: 24px;
5136    border-right: none !important;
5137    margin: 3px 0;
5138    padding: 4px 5px;
5139}
5140
5141.post-foot.add-post-foot .post-setting-box h3 {
5142        /* font-weight: 700 !important; */
5143    /* color: #fff !important; */
5144    cursor: pointer;
5145    /* font-weight: 700; */
5146    font-weight: 500;
5147    font-size: 14px;
5148    color: #757575;
5149}
5150
5151#social-popup .add-post-inner .post-btn a i {
5152    color: #fff;
5153}
5154
5155#social-popup .post-btn {
5156    padding-left: 7px;
5157}
5158
5159#social-popup .post-btn {
5160    width: 90px;
5161}
5162
5163#social-popup .popup-top-header {
5164    border-bottom: 1px solid #3241585c;
5165    padding: 10px 25px;
5166}
5167
5168div#social-popup .post-btn.addPost-form-submit.active {
5169    background: none !important;
5170}
5171
5172.post-btn.addPost-form-submit.disabled i {
5173    opacity: 0.5;
5174}
5175
5176.post-btn.addPost-form-submit.active i {
5177    opacity: 1;
5178}
5179
5180.social-popup .add-post-inner a.discard-button,
5181.social-popup .add-post-inner span.discard-button {
5182    color: #b8b8b8 !important;
5183}
5184
5185.social-popup .add-post-inner span.discard-button {
5186    color: #b8b8b8 !important;
5187    font-size: 14px;
5188}
5189
5190.post-foot.add-post-foot .post-setting-box h3 {
5191    color: #b8b8b8;
5192    font-size: 14px;
5193    font-weight: 500;
5194}
5195
5196#social-popup span.post-creation-divider {
5197    margin: 0 7px;
5198    color: #b8b8b8;
5199}
5200
5201#social-popup span.post-creation-username {
5202    color: #b8b8b8;
5203}
5204
5205#social-popup .header-add-post .fnc {
5206    margin-bottom: 5px !important;
5207}
5208
5209.search-box-add-topic.d-flex.align-items-center.gap-4 a {
5210    font-size: 15px !important;
5211}
5212
5213.search-box-add-topic input {
5214    border: 1px solid #3241585c !important;
5215    background: none !important;
5216    padding-left: 40px;
5217}
5218
5219.search-box-add-topic {
5220    justify-content: space-between;
5221}
5222
5223.search-input-topic i {
5224    position: absolute;
5225    color: #fff;
5226    left: 16px;
5227    z-index: 9;
5228    top: 12px;
5229}
5230
5231.search-input-topic {
5232    position: relative;
5233}
5234
5235.search-input-topic {
5236    flex: 1;
5237}
5238
5239#social-popup .add-a-topic a {
5240    color: #fff !important;
5241    font-size: 14px !important;
5242}
5243
5244.search-topic-dropdown-row {
5245    justify-content: space-between;
5246    display: flex;
5247    color: #fff;
5248    padding: 5px 0;
5249    align-items: center;
5250    font-size: 12px;
5251    font-weight: 600;
5252}
5253
5254.social-popup .search-topic-dropdown-row a:hover {
5255    background: #222;
5256}
5257
5258.social-popup .search-topic-dropdown-row a {
5259    font-size: 12px !important;
5260    /* opacity: 0; */
5261    border-radius: 50px;
5262    border: 1px solid #3241585c !important;
5263    padding: 6px 15px;
5264    color: #fff !important;
5265    font-size: 11px !important;
5266}
5267
5268.search-topic-dropdown {
5269    padding: 20px 0;
5270}
5271
5272.add-a-topic img {
5273    width: 20px;
5274    filter: invert(1);
5275}
5276
5277#social-popup .add-a-topic a {
5278    color: #fff !important;
5279    font-size: 12px !important;
5280}
5281
5282#social-popup .add-a-topic a {
5283    color: #fff !important;
5284    font-size: 11px !important;
5285    display: flex;
5286    align-items: center;
5287    gap: 3px;
5288}
5289
5290#social-popup .image-preview-box {
5291    margin-bottom: 20px;
5292}
5293
5294#social-popup .embed-link a,
5295#social-popup .add-alt-text a {
5296    /*        font-size: 0px !important;*/
5297}
5298
5299#social-popup .embed-link,
5300#social-popup .add-alt-text {
5301    padding: 0;
5302    width: 33px;
5303    height: 33px;
5304    justify-content: center;
5305    align-items: center;
5306    display: flex;
5307}
5308
5309#social-popup .embed-link i.hgi.hgi-stroke.hgi-link-05 {
5310    font-size: 18px;
5311}
5312
5313#social-popup div#draft-box {
5314    border-radius: 25px;
5315    background: #161616;
5316}
5317
5318#social-popup .add-post-inner.draft-open {
5319    /*    height: auto !important;*/
5320}
5321
5322#social-popup img#gifPreviewAddPost {
5323    max-height: calc(100vh - 350px);
5324}
5325
5326#social-popup .add-post-inside-wrapper {
5327    height: auto;
5328    max-height: none;
5329    overflow-y: inherit;
5330    min-height: inherit;
5331}
5332
5333#social-popup .post-btn {
5334    border: 1px solid #32415866 !important;
5335}
5336
5337div#social-popup .post-foot.add-post-foot .send-post button {
5338    border-left: 1px solid #3241585c !important;
5339    margin: 6px 0;
5340    padding: 5px 5px;
5341}
5342
5343div#social-popup .post-foot.add-post-foot .send-post button {
5344    display: flex;
5345    align-items: center;
5346    justify-content: center;
5347}
5348
5349.post-btn.addPost-form-submit i {
5350    font-size: 20px;
5351}
5352
5353#social-popup .add-post-inner .post-btn a i {
5354    font-size: 22px;
5355}
5356
5357.post-setting-box-list label {
5358    color: #fff;
5359    font-size: 15px;
5360}
5361
5362.add-a-topic {
5363    display: none;
5364}
5365
5366#social-popup .video-preview-box video {
5367
5368    margin-bottom: 0;
5369    margin-left: 8px;
5370}
5371
5372.embed-inner>.d-flex {
5373    flex-direction: column;
5374}
5375
5376#social-popup #add-alt-tag .input-embed {
5377    margin: 15px 0;
5378    flex-direction: column;
5379}
5380
5381#social-popup .c-count {
5382    color: #d8d8d8;
5383    font-size: 10px;
5384    margin-bottom: 15px;
5385    margin-top: 5px;
5386}
5387
5388#social-popup #add-alt-tag button.copy-embed:disabled {
5389    margin-left: 0;
5390    background: #303030;
5391    border-radius: 10px;
5392    color: #000;
5393}
5394
5395#social-popup #add-alt-tag button.copy-embed {
5396    margin-left: 0;
5397    background: #6e12ff;
5398    border-radius: 10px;
5399    color: #fff;
5400}
5401
5402#social-popup div#embed-link .input-embed input {
5403    border: 1px solid #3241585c;
5404    background: none !important;
5405    padding: 14px;
5406    border-radius: 10px;
5407    margin-bottom: 10px;
5408}
5409
5410#social-popup div#embed-link button.copy-embed:disabled {
5411    margin-left: 0;
5412    background: #303030;
5413    border-radius: 10px;
5414    color: #000;
5415}
5416 
5417#social-popup div#embed-link button.copy-embed {
5418    margin-left: 0;
5419    background: #6e12ff;
5420    border-radius: 10px;
5421    color: #fff;
5422}
5423
5424#social-popup #embed-link .input-embed {
5425    flex-direction: column;
5426}
5427
5428#social-popup div#embed-link h3 {
5429    width: 100%;
5430    text-align: left;
5431    align-items: center;
5432    display: flex;
5433    gap: 7px;
5434}
5435
5436#social-popup .Schedule-message-wrapper h3,
5437#schedule-social-popup .Schedule-message-wrapper h3,
5438#social-popup .ReSchedule-message-wrapper h3 {
5439    color: #fff;
5440    font-size: 18px;
5441    margin-bottom: 30px;
5442}
5443
5444#social-popup .add-post-inner .post-btn a {
5445    padding-left: 8px;
5446}
5447
5448#social-popup .Schedule-message-wrapper {
5449    background: #161616;
5450}
5451
5452#social-popup .schedule-footer button.btn.schedule-message {
5453    background: #09090900;
5454}
5455
5456.post-setting-box-list label span:last-child {
5457    opacity: 0;
5458}
5459
5460.show-popup .post-setting-box-list label span:last-child {
5461    transition-delay: 1s;
5462    opacity: 1;
5463}
5464
5465@media screen and (max-width:767px) {
5466    #social-popup .Schedule-message-wrapper {
5467        background: #000;
5468    }
5469
5470    #social-popup .schedule-footer.d-flex.justify-content-end {
5471        justify-content: flex-end !important;
5472    }
5473
5474    #add-alt-tag button.copy-embed {
5475        margin-left: 0;
5476    }
5477
5478    #addPostTextarea {
5479        margin-top: 0;
5480    }
5481
5482    #social-popup #draft-container .no-drafts {
5483        margin-top: 0;
5484    }
5485
5486    #social-popup div#add-alt-tag,
5487    #social-popup div#embed-link {
5488        background: #171717;
5489        border-radius: 25px 25px 0 0 !important;
5490    }
5491
5492    #social-popup div#embed-link {
5493        padding-bottom: 40px !important;
5494    }
5495
5496    .post-setting-box-list label span:last-child {
5497        opacity: 0;
5498    }
5499
5500    .show-popup .post-setting-box-list label span:last-child {
5501        transition-delay: 1s;
5502        opacity: 1;
5503    }
5504
5505    div#gifModalForAddPost {
5506        background: #000000;
5507    }
5508
5509    #social-popup .post-foot.add-post-foot .post-setting-box h3 {
5510        font-weight: 700;
5511    }
5512
5513    #social-popup .add-post-inner.draft-open {
5514        /*    height: 100vh !important;*/
5515        /*    top: 0 !important;*/
5516    }
5517
5518    div#social-popup {
5519        background: #000000 !important;
5520    }
5521
5522    #draft-box .close.delete-all {
5523        display: flex !important;
5524        align-items: center;
5525        justify-content: center;
5526    }
5527
5528    #social-popup div#draft-box {
5529        border-radius: 0;
5530        background: #000;
5531    }
5532
5533    #social-popup .add-post-inner {
5534        background: #0a0a0a;
5535    }
5536
5537    div#social-popup .post-foot.add-post-foot.d-flex.justify-content-between {
5538        background: #0a0a0a;
5539    }
5540
5541    #social-popup .popup-top-header {
5542        border-bottom: none;
5543    }
5544
5545    #social-popup .popup-top-header {
5546        padding: 10px 15px;
5547    }
5548
5549    .search-topic-dropdown-row {
5550        padding: 5px 0;
5551    }
5552
5553    div#add-topic-box {
5554        padding: 15px 15px !important;
5555        background: #0f0f0f;
5556    }
5557
5558    #social-popup .popup-top-header h2 {
5559        font-size: 14px;
5560        font-weight: 700;
5561    }
5562
5563    #social-popup #addPostTextarea {
5564        font-size: 14px;
5565    }
5566
5567    #social-popup .add-image img {
5568        width: 15px !important;
5569    }
5570
5571    #social-popup .add-post-inner {
5572        border: none;
5573        background: #000000;
5574    }
5575
5576    #social-popup .post-foot.add-post-foot .post-setting-box {
5577        position: static;
5578        padding: 0;
5579        margin: 0 !important;
5580    }
5581
5582    #social-popup .add-image {
5583        padding: 0 15px;
5584    }
5585
5586    .add-post-inside-wrapper {
5587        height: auto;
5588    }
5589
5590    div#social-popup .post-foot.add-post-foot {
5591        padding: 10px 15px;
5592    }
5593
5594    div#social-popup .post-foot.add-post-foot.d-flex.justify-content-between {
5595        background: #000000;
5596    }
5597
5598    #social-popup .popup-top-header .draft a {
5599        font-size: 13px !important;
5600    }
5601
5602    .social-popup .add-post-inner a.discard-button {
5603        font-size: 13px !important;
5604    }
5605
5606    #social-popup .post-btn {
5607        border: 1px solid #32415866 !important;
5608        width: 87px;
5609    }
5610
5611    div#social-popup .post-foot.add-post-foot .send-post button {
5612        border-left: 1px solid #3241585c !important;
5613        display: flex;
5614        align-items: center;
5615        justify-content: center;
5616    }
5617
5618    div#social-popup .post-foot.add-post-foot .send-post button {
5619        width: 42px;
5620        margin: 6px 3px;
5621        padding: 3px 5px;
5622    }
5623
5624    #social-popup .add-post-inner .post-btn a {
5625        left: 2px;
5626    }
5627
5628
5629    #social-popup .post-btn.addPost-form-submit i {
5630        font-size: 20px;
5631    }
5632
5633    #social-popup .add-post-inner .post-btn a i {
5634        font-size: 22px;
5635    }
5636
5637    .post-setting-box-list label {
5638        padding: 10px 0;
5639    }
5640
5641    #social-popup .add-image img {
5642        width: 18px !important;
5643    }
5644
5645    #social-popup .add-image ul li {
5646        margin-right: 3px;
5647    }
5648
5649    #social-popup div#add-alt-tag p {
5650        font-size: 11px !important;
5651    }
5652
5653    #social-popup #add-alt-tag .alt-header>.d-flex {
5654        margin-bottom: 10px !important;
5655    }
5656
5657    #social-popup #add-alt-tag .input-embed {
5658        margin: 15px 0;
5659        flex-direction: column;
5660    }
5661
5662    #social-popup .c-count {
5663        color: #d8d8d8;
5664        font-size: 10px;
5665        margin-bottom: 15px;
5666        margin-top: 5px;
5667    }
5668
5669    #social-popup #add-alt-tag button.copy-embed {
5670        margin-left: 0;
5671        background: #303030;
5672        border-radius: 7px;
5673        color: #000;
5674    }
5675
5676    #social-popup #add-alt-tag .input-embed textarea {
5677        border: 1px solid #3241585c;
5678        background: none !important;
5679        padding: 14px;
5680        border-radius: 20px;
5681    }
5682
5683    #social-popup div#embed-link h3 img,
5684    #social-popup div#add-alt-tag h3 img {
5685        width: 30px;
5686        margin-right: 4px;
5687    }
5688
5689    #social-popup div#embed-link h3,
5690    #social-popup div#add-alt-tag h3,
5691    #social-popup div#add-alt-preview h3 {
5692        font-size: 17px;
5693        font-weight: 700;
5694    }
5695
5696    #social-popup .alt-header .close a {
5697        color: #fff !important;
5698        font-weight: 500 !important;
5699    }
5700
5701    #social-popup #embed-link .input-embed {
5702        flex-direction: column;
5703    }
5704
5705/*
5706   body.light-mode #social-popup div#embed-link button.copy-embed {
5707        margin-left: 0;
5708        background: #303030;
5709        border-radius: 10px;
5710        color: #000;
5711    }
5712*/
5713
5714    #social-popup div#embed-link .input-embed input {
5715        border: 1px solid #3241585c;
5716        background: none !important;
5717        padding: 14px;
5718        border-radius: 10px;
5719        margin-bottom: 10px;
5720    }
5721
5722    #social-popup #embed-link .input-embed {
5723        margin-top: 15px;
5724    }
5725
5726    #social-popup div#embed-link p {
5727        font-size: 11px !important;
5728    }
5729
5730    #social-popup .embed-link-header {
5731        display: flex;
5732        align-items: center;
5733    }
5734
5735    #social-popup .embed-link-header i {
5736        font-size: 20px;
5737        margin-right: 7px;
5738        font-weight: 500;
5739    }
5740
5741    #social-popup #embed-link .embed-header h3.embed-link-header {
5742        margin-bottom: 0;
5743    }
5744
5745    #social-popup #embed-link .embed-header .d-flex.align-items-center.mb-3 {
5746        margin-bottom: 10px !important;
5747    }
5748
5749    #social-popup .video-preview-box video {
5750        margin-left: 21px;
5751    }
5752
5753    #social-popup .add-image img.video-icon {
5754        width: 18px !important;
5755    }
5756
5757    #social-popup .add-image img {
5758        width: 15px !important;
5759    }
5760}
5761</style>
5762
5763<!--26-06-2025-->
5764<link rel="preload" href="https://fonts.googleapis.com/css2?family=Rubik:ital,wght@0,300..900;1,300..900&display=swap" as="style" onload="this.onload=null;this.rel='stylesheet'">
5765<noscript><link href="https://fonts.googleapis.com/css2?family=Rubik:ital,wght@0,300..900;1,300..900&display=swap" rel="stylesheet"></noscript>
5766
5767<style>
5768#gifModalForAddPost div#gifResults-outer {
5769    height: 486px;
5770    overflow-y: auto;
5771    border-radius: 0 0 15px 15px;
5772}
5773#gifModalForAddPost .gif-list {
5774    display: flex;
5775    flex-wrap: wrap;
5776    gap: 10px;
5777    margin-top: 10px;
5778    max-height: none;
5779    overflow-y: auto;
5780    height: 100%;
5781    height: 400px;
5782    visibility: visible;
5783    padding-left: 0;
5784    height: auto;
5785    display: block;
5786    column-width: 130px;
5787    column-gap: 10px;
5788}
5789div#gifModalForAddPost .gif-list img {
5790    max-width: 100%;
5791    height: auto;
5792    object-fit: cover;
5793    width: 100%;
5794    margin-bottom: 10px;
5795}    
5796/*
5797.announcement-popup + header {
5798    margin-top: 0px;
5799    display: none;
5800}
5801    footer{display: none;}   
5802    
5803html, body.dark-mode {
5804    background: #0a0a0a !important;
5805}    
5806*/
5807#signup-new-process #step07 .step-inside-row,
5808#signup-new-process #step09 .step-inside-row {
5809    width: 100%;
5810}
5811
5812#signup-new-process form#signupform {
5813    margin-bottom: 5px;
5814    /*    border: 1px solid #3241585c !important;*/
5815    border: 1px solid #2a2a2a !important;
5816    background: #1a1a1a;
5817}
5818
5819/*
5820.body-container {
5821    margin-top: 0;
5822}   
5823*/
5824#signup-new-processp.login-sub-head {
5825    font-size: 12px;
5826    color: #bbbbbb;
5827}
5828
5829#signup-new-process .email-verification.mob-height.app-install {
5830    color: #d4d4d4 !important;
5831    margin-bottom: 5px;
5832    /*    border: 1px solid #3241585c !important;*/
5833    /*    border: 1px solid #3241585c !important;*/
5834    border: 1px solid #2a2a2a !important;
5835    background: #1a1a1a;
5836    padding: 30px 30px;
5837    border-radius: 25px;
5838}
5839
5840#signup-new-process .add-profile-photo {
5841    border: 1px solid #3241585c;
5842    border-radius: 22px;
5843    padding: 10px;
5844    margin-bottom: 15px;
5845}
5846
5847#signup-new-process .user-profil-detail-box {
5848    display: flex;
5849    align-items: start;
5850}
5851
5852#signup-new-process .users-profie {
5853    display: flex;
5854    justify-content: space-between;
5855    align-items: center;
5856    margin-bottom: 20px;
5857}
5858
5859#signup-new-process .follow-unfollow a {
5860    border: 1px solid #324158;
5861    color: #111222;
5862    padding: 8px 11px;
5863    border-radius: 35px;
5864    background: #fff;
5865    font-size: 12px;
5866    font-weight: 900;
5867}
5868
5869#signup-new-process .user-profil-detail-box .user-count {
5870    font-size: 10px;
5871}
5872
5873#signup-new-process .users-profie .user-profil-detail-box .user {
5874    margin-right: 7px;
5875    font-size: 15px;
5876    font-weight: 600;
5877    color: #fff;
5878}
5879
5880#signup-new-process .user-profil-detail-box .user-count img+img {
5881    margin-left: -5px;
5882}
5883
5884#signup-new-process .user-profil-detail-box .user-count img {
5885    width: 20px;
5886    height: 20px;
5887    border: 1px solid #000;
5888    border-radius: 50%;
5889}
5890
5891#signup-new-process .user-profil-detail-box .user-count {
5892    display: flex;
5893}
5894
5895#signup-new-process .form-box {
5896    max-width: 450px;
5897    margin: 0 auto;
5898}
5899
5900#signup-new-process button.Share-jumpspree {
5901    background: none;
5902    border: 1px solid #3241585c;
5903    width: 100%;
5904    border-radius: 20px;
5905    color: #fff;
5906    padding: 10px 0;
5907    margin-bottom: 25px;
5908    font-size: 14px;
5909    font-weight: 400;
5910}
5911
5912#signup-new-process button.Share-jumpspree img {
5913    width: 17px;
5914    margin-right: 5px;
5915}
5916
5917#signup-new-process .email-verification {
5918    height: auto;
5919}
5920
5921#signup-new-process .logo-signup,
5922#verifyreset-new-process .logo-signup,
5923#enter-new-password .logo-signup {
5924    margin-bottom: 20px;
5925}
5926
5927#signup-new-process .pick-intrest-buttons {
5928    display: flex;
5929    flex-wrap: wrap;
5930    gap: 12px;
5931}
5932
5933#signup-new-process .pick-intrest-buttons button {
5934    background: transparent;
5935    color: #fff;
5936    font-size: 12px;
5937    border: 1px solid #3241585c;
5938    padding: 8px 14px;
5939    border-radius: 25px;
5940}
5941
5942#signup-new-process .prifile-image img {
5943    width: 100%;
5944    opacity: 0.7;
5945}
5946
5947#signup-new-process .prifile-image {
5948    width: 60px;
5949}
5950
5951#signup-new-process button.add-profile {
5952    background: none;
5953    border: 1px solid #3241585c;
5954    color: #555;
5955    font-size: 12px;
5956    border-radius: 25px;
5957}
5958
5959#signup-new-process button.add-profile img {
5960    width: 17px !important;
5961}
5962
5963#signup-new-process button.add-profile {
5964    background: none;
5965    border: 1px solid #3241585c;
5966    color: #555;
5967    font-size: 12px;
5968    border-radius: 25px;
5969    padding: 5px 9px;
5970    margin-left: 10px;
5971    margin-right: 13px;
5972}
5973
5974#signup-new-process p.mb-0.optional {
5975    color: #555;
5976    font-size: 12px;
5977}
5978
5979#signup-new-process .add-profile-photo {
5980    border: 1px solid #3241585c;
5981    border-radius: 22px;
5982    padding: 10px;
5983    margin-bottom: 15px;
5984    background: #1e1e1e5c;
5985}
5986
5987#signup-new-process .search-user-name input {
5988    background: none !important;
5989    border: 1px solid #3241585c !important;
5990}
5991
5992#signup-new-process .search-user-name input {
5993    background: none !important;
5994    */ border: 1px solid #3241585c !important;
5995    border-radius: 16px;
5996    background: #1e1e1e5c !important;
5997}
5998
5999#signup-new-process .see-guidline a {
6000    font-size: 12px;
6001    color: #555;
6002    text-decoration: underline;
6003}
6004
6005#signup-new-process .see-guidline {
6006    text-align: right;
6007}
6008
6009#signup-new-process .verify-email-input,
6010#verifyreset-new-process .verify-email-input,
6011#enter-new-password .verify-email-input {
6012    width: 100%;
6013}
6014
6015#signup-new-process .verify-email-input input {
6016    background: none !important;
6017    border-radius: 12px !important;
6018}
6019
6020#signup-new-process .verify-email-input,
6021#verifyreset-new-process .verify-email-input,
6022#enter-new-password .verify-email-input {
6023    width: 100%;
6024    margin-bottom: 25px;
6025}
6026
6027#signup-new-process .verify-email-input {
6028    margin-bottom: 15px;
6029
6030}
6031
6032#signup-new-process .color555 {
6033    color: #fff !important;
6034    font-size: 12px;
6035}
6036
6037#signup-new-process .color555 {
6038    color: #555 !important;
6039    font-size: 12px;
6040    font-weight: 400;
6041    line-height: 16px;
6042}
6043
6044#signup-new-process .or-change a {
6045    border: none !important;
6046    padding: 0 !important;
6047    color: #bbb;
6048    font-size: 13px;
6049}
6050
6051#signup-new-process .or-change {
6052    margin-top: 20px;
6053}
6054
6055#signup-new-process .or-change.sign-in-instead+button {
6056    margin-top: 20px !important;
6057}
6058
6059#signup-new-process .or-change.sign-in-instead {
6060    margin-top: 30px;
6061}
6062
6063#signup-new-process .btn.btn-success.mt-4.white-btn.disabled {
6064    background: #333333 !important;
6065}
6066
6067#signup-new-process .arrow-right,
6068#verifyreset-new-process .arrow-right,
6069#enter-new-password .arrow-right {
6070    width: 25px
6071}
6072
6073#signup-new-process .btn.btn-success.mt-4.white-btn.disabled {
6074    background: #333333 !important;
6075    color: #808080;
6076    font-size: 14px;
6077    font-weight: 600;
6078    margin-top: 10px !important;
6079}
6080
6081#signup-new-process .skip-and-finish+button {
6082    margin-top: 20px !important;
6083}
6084
6085#signup-new-process .skip-and-finish a {
6086    color: #bbbbbb;
6087    text-align: center;
6088    display: block;
6089    font-size: 12px;
6090}
6091
6092#signup-new-process .skip-and-finish a {
6093    color: #bbbbbb;
6094    text-align: center;
6095    display: block;
6096    font-size: 12px;
6097}
6098
6099#signup-new-process .header-wrapper+.container {
6100    margin-bottom: 0
6101}
6102
6103#signup-new-process form#signupform {
6104    border-radius: 25px;
6105}
6106
6107#signup-new-process .form-control {
6108    background-color: transparent !important;
6109    /*    border: 1px solid #3241585c !important;*/
6110    border: 1px solid #333 !important;
6111    color: #d4d4d4 !important;
6112    border-radius: 15px !important;
6113
6114}
6115
6116#signup-new-process .password-icon input {
6117    padding-left: 35px;
6118}
6119
6120#signup-new-process .password-icon i {
6121    position: absolute;
6122    top: 9px;
6123    left: 11px;
6124}
6125
6126#signup-new-process .or-change a:hover {
6127    background: none;
6128}
6129
6130#signup-new-process span.field_icon.toggle-password {
6131    font-size: 12px;
6132}
6133
6134#signup-new-process .disabled {
6135    pointer-events: all !important;
6136}
6137
6138#signup-new-process div#lottie-animation,
6139div#lottie-animation2 {
6140    margin: 0 auto
6141}
6142
6143#signup-new-process div#step07 {
6144    text-align: center;
6145    color: #fff;
6146}
6147
6148#signup-new-process .all-set,
6149#signup-new-process .setup-account {
6150    margin: 0 auto;
6151    margin-top: -40px;
6152
6153}
6154
6155#signup-new-process .all-set h3,
6156#signup-new-process .setup-account h3 {
6157    font-size: 18px;
6158    margin-top: -20px;
6159    color: #fff;
6160}
6161
6162#signup-new-process .textfor-copy {
6163    font-size: 12px;
6164    border: 1px solid #3241585c;
6165    border-radius: 20px;
6166    padding: 20px;
6167    position: relative;
6168}
6169
6170#signup-new-process .textfor-copy .copy-link {
6171    position: absolute;
6172    right: 15px;
6173    bottom: 20px;
6174    background: none;
6175    padding: 0;
6176}
6177
6178#signup-new-process .textfor-copy .copy-link img {
6179    width: 19px;
6180}
6181
6182#signup-new-process .dob,
6183#signup-new-process .user-name,
6184#signup-new-process .mail-icon,
6185#signup-new-process .password-icon {
6186    position: relative
6187}
6188
6189#signup-new-process .user-name input,
6190#signup-new-process .mail-icon input,
6191#signup-new-process .dob input {
6192    padding-left: 36px;
6193}
6194
6195
6196
6197#signup-new-process .password-icon img {
6198    width: 20px;
6199    position: absolute;
6200    top: 50%;
6201    left: 10px;
6202    transform: translateY(-50%);
6203}
6204
6205#signup-new-process .note {
6206    background: none;
6207    padding: 0;
6208    display: block;
6209    margin: 0;
6210}
6211
6212#signup-new-process .note p {
6213    color: #808080 !important;
6214    font-size: 12px;
6215    font-weight: 400;
6216}
6217
6218#signup-new-process .user-name img,
6219#signup-new-process .mail-icon img,
6220#signup-new-process .dob img {
6221    position: absolute;
6222    z-index: 9999;
6223    width: 20px;
6224    position: absolute;
6225    top: 50%;
6226    left: 10px;
6227    transform: translateY(-50%);
6228}
6229
6230#signup-new-process .helper-text {
6231    font-size: 12px !important;
6232    color: #bbbbbb;
6233    margin-bottom: 15px;
6234}
6235
6236#signup-new-process .pick-intrest-buttons button:hover {
6237    background: #2222227a;
6238    border-color: #ffffff4a;
6239}
6240
6241#signup-new-process button.btn.btn-success {
6242    border-radius: 12px;
6243}
6244
6245#signup-new-process .follow-unfollow a:hover {
6246    background: #2222227a;
6247    border-color: #ffffff4a;
6248}
6249
6250#signup-new-process .share-post-feed {
6251    border: 1px solid #3241585c;
6252    border-radius: 25px;
6253    padding: 20px;
6254    margin-top: 20px;
6255    background: #1f1e1e;
6256}
6257
6258#signup-new-process .share-post-feed .text p {
6259    color: #fff;
6260    font-size: 14px;
6261}
6262
6263#signup-new-process .share-post-feed .text {
6264    margin-top: 20px;
6265}
6266
6267#signup-new-process .share-post-feed .user-name {
6268    font-weight: 800;
6269    color: #fff;
6270    font-size: 14px;
6271    margin-bottom: 0;
6272}
6273
6274#signup-new-process .share-post-feed .first-post {
6275    font-size: 12px;
6276    font-weight: 600;
6277    margin-bottom: 3px;
6278    color: #696969 !important;
6279}
6280
6281#signup-new-process .share-post-feed .first-post img {
6282    width: 15px;
6283}
6284
6285#signup-new-process .share-post-feed .fig {
6286    width: 40px;
6287    margin-right: 10px;
6288}
6289
6290#signup-new-process .share-post-feed {
6291    border: 1px solid #3241585c;
6292    border-radius: 25px 25px 0 0;
6293    padding: 20px;
6294    margin-top: 20px;
6295}
6296
6297#signup-new-process .share-post {
6298    justify-content: flex-end;
6299    display: flex;
6300    padding-top: 20px;
6301    border: 1px solid #3241585c;
6302    border-top: none;
6303    padding: 20px;
6304    border-radius: 0 0 25px 25px;
6305    background: #1f1e1e;
6306    gap: 15px;
6307}
6308
6309#signup-new-process #step08 .fig img {
6310    width: 100%;
6311    background: #1f1e1e;
6312}
6313
6314#signup-new-process .share-post a.btn.white-btn {
6315    background: #fff;
6316    border-radius: 35px;
6317}
6318
6319#signup-new-process .share-post a {
6320    color: #fff;
6321    font-size: 14px;
6322}
6323
6324#signup-new-process .share-post a.btn.white-btn {
6325    background: #fff;
6326    border-radius: 35px;
6327    color: #000;
6328}
6329
6330#signup-new-process .user-profil-detail-box .user-count img:last-child {
6331    margin-right: 5px;
6332}
6333
6334#signup-new-process #step08 form#signupform {
6335    padding: 40px 30px;
6336    min-height: 530px;
6337}
6338
6339#signup-new-process #step09 h3 {
6340    text-align: center;
6341    font-weight: 800;
6342    font-size: 27px;
6343    margin: 16px 0;
6344    transform: translateY(-20px);
6345    opacity: 0;
6346    transition: all 1s ease 0.5s;
6347}
6348
6349#signup-new-process #step09 p {
6350    text-align: center;
6351    color: #bbbbbb;
6352    margin-bottom: 0;
6353    font-size: 13px;
6354    transform: translateY(-20px);
6355    opacity: 0;
6356    transition: all 1s ease 1.0s;
6357}
6358
6359#signup-new-process .share-post a:first-child:hover {
6360    color: #fff;
6361}
6362
6363#signup-new-process .share-post a {
6364    box-shadow: none !important;
6365    background: none;
6366    border: none;
6367    padding: 10px 25px;
6368    font-weight: 400;
6369}
6370
6371#signup-new-process #step09.show-anim h3 {
6372    transform: translateY(0px);
6373    opacity: 1;
6374}
6375
6376#signup-new-process #step09.show-anim p {
6377    transform: translateY(0px);
6378    opacity: 1;
6379}
6380
6381#signup-new-process #step09 .email-verification .all-set {
6382    margin-top: 0;
6383}
6384
6385#signup-new-process .signup-footer .arrow-right {
6386    width: 25px;
6387    position: relative;
6388    top: -1px;
6389}
6390
6391#signup-new-process div#lottie-animation3 {
6392    text-align: center;
6393    margin: 0 auto;
6394}
6395
6396#signup-new-process #step09 .email-verification {
6397    display: flex;
6398    align-items: center;
6399    justify-content: center;
6400}
6401
6402#signup-new-process div#step08 p {
6403    font-family: "Inter";
6404    color: #bbb;
6405}
6406
6407#signup-new-process div#step05 .users-profie p {
6408    color: #bbb;
6409    font-size: 10px;
6410}
6411
6412#signup-new-process .app-install.email-verification h1 {
6413    margin-bottom: 0px !important;
6414    font-size: 20px;
6415}
6416
6417#signup-new-process #step04 .trending h3 {
6418    font-size: 15px;
6419    font-weight: 600;
6420    color: #fff;
6421}
6422
6423#signup-new-process #step04 h1 span {
6424    background: #00ffb5;
6425    color: #000;
6426    font-size: 11px;
6427    font-weight: 600;
6428    border-radius: 35px;
6429    padding: 3px 6px;
6430    margin-left: 4px;
6431}
6432
6433#signup-new-process #step04 h1 span {
6434    background: #00ffb5;
6435    color: #000;
6436    font-size: 10px;
6437    font-weight: 600;
6438    border-radius: 35px;
6439    padding: 3px 6px;
6440    margin-left: 9px;
6441    height: 20px;
6442    line-height: 15px;
6443}
6444
6445#signup-new-process #step04 textarea {
6446    height: 100px;
6447    width: 100%;
6448    resize: none;
6449    background: none;
6450    background: #1e1e1e;
6451    border-radius: 15px 15px 0 0;
6452    padding: 14px;
6453    font-size: 12px;
6454    border: 1px solid #3241585c;
6455    padding: 15px;
6456}
6457
6458#signup-new-process #step04 .share-text h5 {
6459    font-size: 15px;
6460    font-weight: 600;
6461    color: #fff;
6462    margin-bottom: 10px;
6463}
6464
6465#signup-new-process #step04 h2 {
6466    margin-bottom: 0 !important;
6467    padding-bottom: 0;
6468}
6469
6470#signup-new-process #step04 .share-text {
6471    margin-top: 20px;
6472}
6473
6474#signup-new-process #step04 .email-verification.mob-height.app-install {
6475    padding-bottom: 120px;
6476}
6477
6478#signup-new-process #step04 .resend.text-center a {
6479    font-size: 12px;
6480    padding: 12px 0;
6481    display: block;
6482}
6483
6484#signup-new-process #step04 .verify-btn {
6485    bottom: 0px;
6486}
6487
6488#signup-new-process .email-verification.mob-height.app-install,
6489#verifyreset-new-process .email-verification.mob-height.app-install,
6490#enter-new-password .email-verification.mob-height.app-install {
6491    margin-bottom: 45px;
6492}
6493
6494#signup-new-process #step04 .share-text {
6495    position: relative
6496}
6497
6498#signup-new-process #step04 .share-text button.btn.btn-save {
6499    background: #fff;
6500    padding: 0;
6501    font-weight: 600;
6502    border-radius: 20px;
6503    padding: 3px 10px;
6504    font-size: 12px;
6505    /*    position: absolute;*/
6506    right: 12px;
6507    bottom: 14px;
6508}
6509
6510#signup-new-process #step04 textarea {
6511    height: 70px;
6512    width: 100%;
6513    resize: none;
6514    background: none;
6515    background: #1e1e1e;
6516    border-radius: 9px 9px 0 0;
6517    padding: 8px;
6518    font-size: 12px;
6519    border: 1px solid #3241585c;
6520    color: #fff;
6521    outline: none;
6522    float: left;
6523    border-bottom: none !important;
6524}
6525
6526#signup-new-process .save-input {
6527    background: #1e1e1e;
6528    text-align: right;
6529    padding: 6px;
6530    float: left;
6531    width: 100%;
6532    border: 1px solid #3241585c;
6533    border-radius: 0 0 15px 15px;
6534    border-top: 1px solid #1e1e1e !important;
6535}
6536
6537#signup-new-process .save-input {
6538    background: #1e1e1e;
6539    text-align: right;
6540    padding: 6px;
6541    float: left;
6542    width: 100%;
6543    border: 1px solid #3241585c;
6544    border-radius: 0 0 15px 15px;
6545}
6546
6547#signup-new-process .pick-intrest-buttons button.active {
6548    background: #fff;
6549    color: #000 !important;
6550    font-weight: 500 !important;
6551    padding: 8px 13px;
6552}
6553
6554#signup-new-process .pick-intrest-buttons button:hover {
6555    box-shadow: none !important;
6556    color: #fff;
6557}
6558
6559#signup-new-process #step04 h1.d-flex.align-items-center {
6560    margin-bottom: 15px !important;
6561}
6562
6563#signup-new-processn #step04 .trending {
6564    margin-top: 40px;
6565    margin-bottom: 40px;
6566}
6567
6568#signup-new-processn #step04 .share-text h5 {
6569    font-size: 15px;
6570    font-weight: 600;
6571    margin-bottom: 15px;
6572}
6573
6574#signup-new-processn #step04 .trending h3,
6575#step04 .trending h5 {
6576    font-size: 15px;
6577    font-weight: 600;
6578    margin-bottom: 15px;
6579}
6580
6581#signup-new-process .signup-title {
6582    font-size: 20px !important;
6583    color: #fff !important;
6584    margin-bottom: 0px !important;
6585    font-weight: 600;
6586}
6587
6588#step03 p.login-sub-head.helper-text {
6589    margin-bottom: 15px;
6590}
6591
6592#signup-new-process .form-box h2.signup-title,
6593#signin-new-process .form-box h2.signup-title,
6594#reset-new-process .form-box h2.signup-title,
6595#verifyreset-new-process .form-box h2.signup-title,
6596#enter-new-password .form-box h2.signup-title {
6597    /* font-size: 20px !important;
6598    color: #fff !important;
6599    margin-bottom: 10px !important;
6600    font-weight: 500;*/
6601
6602    font-size: 35px !important;
6603    color: #fff !important;
6604    margin-bottom: 30px !important;
6605    font-weight: 600;
6606    margin-top: 30px;
6607}
6608
6609#signin-new-process .form-box h2.signup-title {
6610    font-weight: 800;
6611}
6612
6613#signup-new-process #step02 .form-box h2.signup-title {
6614    margin-top: 0;
6615    margin-bottom: 10px !important;
6616}
6617
6618#signup-new-process .verify-email-input img,
6619#verifyreset-new-process .verify-email-input img,
6620#enter-new-password .verify-email-input img {
6621    width: 20px;
6622    position: absolute;
6623    left: 8px;
6624    top: 10px;
6625}
6626
6627#step03 h2.signup-title {
6628    margin-bottom: 0 !important;
6629}
6630
6631#signup-new-process .verify-email-input,
6632#verifyreset-new-process .verify-email-input,
6633#enter-new-password .verify-email-input {
6634    position: relative;
6635}
6636
6637#signup-new-process .verify-email-input input#otp1,
6638#verifyreset-new-process .verify-email-input input#otp1,
6639#enter-new-password .verify-email-input input#otp1 {
6640    padding-left: 35px;
6641    width: 100% !important;
6642    font-size: 14px;
6643}
6644
6645#signup-new-process .verify-email-input input#otp1 {
6646    padding-left: 15px;
6647}
6648
6649#signup-new-process #step01 button#submitbtn {
6650    margin-top: 15px !important;
6651}
6652
6653#signup-new-process #signup-new-process .follow-unfollow a:hover {
6654    background: #ccc;
6655}
6656
6657.avatar-upload {
6658    position: relative;
6659    /*  max-width: 205px;*/
6660    /*  margin: 50px auto;*/
6661}
6662
6663.avatar-upload .avatar-edit {
6664    position: absolute;
6665    right: 12px;
6666    z-index: 1;
6667    top: 10px;
6668}
6669
6670.avatar-upload .avatar-edit input {
6671    display: none;
6672}
6673
6674.avatar-upload .avatar-edit input+label {
6675    display: inline-block;
6676    width: 34px;
6677    height: 34px;
6678    margin-bottom: 0;
6679    border-radius: 100%;
6680    background: #FFFFFF;
6681    border: 1px solid transparent;
6682    box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.12);
6683    cursor: pointer;
6684    font-weight: normal;
6685    transition: all 0.2s ease-in-out;
6686}
6687
6688.avatar-upload .avatar-edit input+label:hover {
6689    background: #f1f1f1;
6690    border-color: #d6d6d6;
6691}
6692
6693.avatar-upload .avatar-edit input+label:after {
6694    content: "\f040";
6695    font-family: 'FontAwesome';
6696    color: #757575;
6697    position: absolute;
6698    top: 10px;
6699    left: 0;
6700    right: 0;
6701    text-align: center;
6702    margin: auto;
6703}
6704
6705.avatar-upload .avatar-preview {
6706    width: 70px;
6707    height: 70px;
6708    position: relative;
6709    border-radius: 100%;
6710    /*  border: 6px solid #F8F8F8;*/
6711    /*  box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.1);*/
6712}
6713
6714.add-file {
6715    position: relative;
6716    overflow: hidden;
6717}
6718
6719.avatar-edit {
6720    position: absolute;
6721    top: 0;
6722    left: 13px;
6723    width: 140px;
6724    height: 30px;
6725    opacity: 0;
6726
6727}
6728
6729.avatar-upload .avatar-preview>div {
6730    width: 100%;
6731    height: 100%;
6732    border-radius: 100%;
6733    background-size: cover;
6734    background-repeat: no-repeat;
6735    background-position: center;
6736}
6737
6738.avatar-edit input {
6739    font-size: 0;
6740    cursor: pointer;
6741    opacity: 1;
6742    width: 100%;
6743    height: 100%;
6744    top: 0;
6745    float: left;
6746}
6747
6748@media screen and (min-width:768px) {
6749    #signup-new-process .user-name input {
6750        background: #333 !important
6751    }
6752
6753    #signup-new-process .form-control {
6754        background-color: #333 !important;
6755    }
6756
6757    #signup-new-process .textfor-copy {
6758        font-size: 13px;
6759    }
6760
6761    #signup-new-process .note p,
6762    #signup-new-process .note a {
6763        font-size: 12px;
6764    }
6765
6766    #signup-new-process .note p {
6767        line-height: 16px;
6768    }
6769
6770    #signup-new-process #step07 .email-verification.mob-height.app-install {
6771        align-items: center;
6772        justify-content: center;
6773    }
6774
6775    #signup-new-process .email-verification.mob-height,
6776    #verifyreset-new-process .email-verification.mob-height,
6777    #enter-new-password .email-verification.mob-height {
6778        min-height: 530px;
6779        justify-content: flex-start;
6780    }
6781
6782    #signup-new-process .email-verification.mob-height.long-height {
6783        min-height: 700px;
6784    }
6785
6786    #signup-new-process .verify-btn,
6787    #verifyreset-new-process .verify-btn,
6788    #enter-new-password .verify-btn {
6789        position: absolute;
6790        bottom: 30px;
6791        left: 50%;
6792        width: 90%;
6793        transform: translateX(-50%);
6794    }
6795
6796    #signup-new-process #step03 .verify-btn,
6797    #signup-new-process #step04 .verify-btn,
6798    #signup-new-process #step05 .verify-btn {
6799        position: absolute;
6800        bottom: 30px;
6801        left: 50%;
6802        width: 90%;
6803        transform: translateX(-50%);
6804        position: sticky;
6805        bottom: 0;
6806        left: inherit;
6807        transform: inherit;
6808        width: 100%;
6809        padding: 16px 0;
6810        /*        background: #171717;*/
6811        background: #1a1a1a;
6812    }
6813    body.light-mode #signup-new-process #step03 .verify-btn,
6814    body.light-mode #signup-new-process #step04 .verify-btn,
6815    body.light-mode #signup-new-process #step05 .verify-btn {
6816       
6817        background: #fff;
6818    }
6819
6820    #signup-new-process #step04 .helper-text {
6821        line-height: 17px;
6822        margin-top: 5px;
6823        padding-bottom: 10px;
6824    }
6825
6826    #signup-new-process #step03 .verify-btn button {
6827        margin-top: 0 !important
6828    }
6829
6830    #signup-new-process #step04 .verify-btn button {
6831        margin-top: 0 !important
6832    }
6833
6834    #signup-new-process #step03 .share-text h5 {
6835        margin-top: 15px;
6836        font-size: 15px;
6837        color: #d4d4d4;
6838        margin-bottom: 10px;
6839    }
6840
6841    #signup-new-process .email-verification {
6842        margin-top: 0;
6843    }
6844
6845    #signup-new-process #step04 .email-verification.mob-height.app-install {
6846        padding-bottom: 0;
6847    }
6848
6849    #signup-new-process #step03 .form-box h2.signup-title,
6850    #signup-new-process #step04 .form-box h2.signup-title,
6851    #signup-new-process #step05 .form-box h2.signup-title,
6852    #signup-new-process #step06 .form-box h2.signup-title,
6853    #signup-new-process #step02 .form-box h2.signup-title {
6854        font-size: 20px !important;
6855        margin-bottom: 0px !important;
6856        margin-top: 0;
6857    }
6858
6859    #signup-new-process #step03 p.login-sub-head.helper-text,
6860    #signup-new-process #step06 p.login-sub-head.helper-text {
6861        line-height: 16px;
6862    }
6863
6864}
6865
6866@media screen and (max-width:767px) {
6867#gifModalForAddPost div#gifResults-outer {
6868    height: calc(100vh - 73px);
6869        overflow-y: auto;
6870        margin-top: 10px;
6871}    
6872    .notification-alert.show-notification {
6873        bottom: 62px;
6874    }
6875
6876    #signup-new-process #step05 .email-verification h2,
6877    .email-verification h2 {
6878        line-height: 23px;
6879    }
6880
6881    #signup-new-process #step04 .share-text.add-your-own {
6882        margin-top: 40px;
6883    }
6884
6885    #signup-new-process #step04 .trending+.share-text {
6886        margin-top: 25px;
6887    }
6888
6889    #signup-new-process #step05 .form-box {
6890        margin: 0 !important;
6891        height: 100vh;
6892    }
6893
6894    #signup-new-process .step-inside-row {
6895        padding: 0 25px;
6896    }
6897
6898    #signup-new-process #step04 .verify-btn.mb-0.w100 {
6899        position: sticky;
6900        bottom: 0px;
6901        background: #000;
6902    }
6903
6904    #signup-new-process div#lottie-animation,
6905    div#lottie-animation2 {
6906        margin: 0 auto;
6907        margin-top: -100px;
6908    }
6909
6910    #signup-new-process #step05 .fig {
6911        width: 35px;
6912        margin-right: 9px;
6913        height: 35px;
6914    }
6915
6916    #signup-new-process .verify-email-input img {
6917        width: 20px;
6918        position: absolute;
6919        left: 8px;
6920        top: 10px;
6921    }
6922
6923    #signup-new-process .verify-email-input {
6924        position: relative;
6925    }
6926
6927    #signup-new-process .verify-email-input input#otp1,
6928    #verifyreset-new-process .verify-email-input input#otp1,
6929    #enter-new-password .verify-email-input input#otp1 {
6930        padding-left: 35px;
6931    }
6932
6933    #signup-new-process .signup-title {
6934        font-size: 16px !important;
6935    }
6936
6937    #signup-new-process .share-post-feed .fig {
6938        width: 35px;
6939        margin-right: 15px;
6940    }
6941
6942    #signup-new-process .share-post {
6943        padding: 15px;
6944    }
6945
6946    #signup-new-process .share-post-feed .user-name {
6947        font-weight: 800;
6948        color: #fff;
6949        font-size: 12px;
6950        margin-bottom: 0;
6951    }
6952
6953    #signup-new-process #step05 .fig img {
6954        width: 100%;
6955        height: 100%;
6956        object-fit: cover
6957    }
6958
6959    #signup-new-process .all-set,
6960    .setup-account {
6961        margin: 0 auto;
6962        margin-top: 0px;
6963
6964    }
6965
6966    #signup-new-process #step01 .signup-footer .or-change.sign-in-instead+button {
6967        margin-top: 13px !important;
6968    }
6969
6970    #signup-new-process #step04 .email-box {
6971        margin-bottom: 40px;
6972    }
6973
6974    /*
6975html, body {
6976    height: 100vh;
6977}
6978*/
6979    /*
6980.body-container {
6981    display: none;
6982}     
6983*/
6984    #signup-new-process .container,
6985    #signup-new-process .signup-wrapper,
6986    #signup-new-process .form-box,
6987    #signup-new-process #signupform {
6988        height: 100%;
6989    }
6990
6991    #signup-new-process form#signupform {
6992        border: none !important;
6993        padding: 20px 0px !important;
6994        height: 100vh;
6995    }
6996
6997    #signup-new-process .email-verification.mob-height.app-install {
6998        border: none !important;
6999        padding: 0;
7000        border-radius: 0px;
7001        height: auto
7002    }
7003
7004    #signup-new-process .users-profie .user-profil-detail-box .fig {
7005        width: 30px;
7006        margin-right: 9px;
7007        height: 30px;
7008    }
7009
7010    #signup-new-process .users-profie .user-profil-detail-box.fig img {
7011        width: 100%;
7012        height: 100%;
7013        object-fit: cover;
7014    }
7015
7016    #signup-new-process .users-profie .user-profil-detail-box .user {
7017        margin-right: 7px;
7018        font-size: 12px;
7019
7020    }
7021
7022    #signup-new-process .follow-unfollow a {
7023        padding: 7px 9px;
7024        font-size: 10px;
7025    }
7026
7027    #signup-new-process .user-profil-detail-box .user-count img:last-child {
7028        margin-right: 5px;
7029    }
7030
7031    #signup-new-process .user-profil-detail-box .user-count {
7032        font-size: 10px;
7033        align-items: center;
7034    }
7035
7036    #signup-new-process .user-profil-detail-box .user-count img {
7037        width: 18px;
7038        height: 18px;
7039        border: 1px solid #000;
7040    }
7041
7042    #signup-new-process .signup-footer {
7043        position: fixed;
7044        bottom: 20px;
7045        left: 0;
7046        right: 0;
7047        background: #000000;
7048    }
7049
7050    #signup-new-process .signup-footer .or-change.sign-in-instead {
7051        margin-top: 10px;
7052    }
7053
7054    #signup-new-process .form-box {
7055        margin: 0 !important;
7056    }
7057
7058    #signup-new-process .email-verification.mob-height.app-install {
7059        margin: 0;
7060        height: 100%;
7061        justify-content: flex-start;
7062        padding: 20px 0;
7063    }
7064
7065    #signup-new-process .email-box p {
7066        font-size: 10px;
7067        line-height: 16px;
7068        color: #bbb;
7069    }
7070
7071    #signup-new-process .verify-btn.mb-0.w100 {
7072        position: fixed;
7073        bottom: 10px;
7074    }
7075
7076    #signup-new-process .row.justify-content-center {
7077        height: 100%;
7078    }
7079
7080    #signup-new-process .col-md-7 {
7081        height: 100%;
7082    }
7083
7084    #signup-new-process .share-text h5 {
7085        font-size: 15px;
7086        color: #bbbbbb;
7087    }
7088
7089    #signup-new-process .pick-intrest-buttons {
7090        gap: 10px;
7091    }
7092
7093    #signup-new-process .pick-intrest-buttons button {
7094        font-size: 10px;
7095    }
7096
7097    #signup-new-process #step04 .share-text {
7098        margin-top: 20px;
7099    }
7100
7101    #signup-new-process .share-text h5 {
7102        font-size: 15px;
7103    }
7104
7105    #signup-new-process #step07 .form-box {
7106        margin: 0 !important;
7107        display: flex;
7108        align-items: center;
7109        justify-content: center;
7110    }
7111
7112    #signup-new-process #step07 .form-box .email-verification.mob-height.app-install {
7113        height: auto;
7114    }
7115
7116    #signup-new-process .all-set h3,
7117    #signup-new-process .setup-account h3 {
7118        font-size: 16px;
7119        margin-top: -30px;
7120        color: #fff;
7121    }
7122
7123    #signup-new-process .email-verification.mob-height.app-install {
7124        background: #000000;
7125    }
7126
7127    /*html, body.dark-mode {
7128    background: #000000 !important;
7129}*/
7130    #signup-new-process form#signupform {
7131        background: #000;
7132    }
7133
7134    #signup-new-process .app-install.email-verification h1 {
7135        font-weight: 800;
7136        margin-bottom: 10px !important;
7137
7138    }
7139
7140    #signup-new-process .app-install.email-verification a {
7141        color: #7d7eff;
7142    }
7143
7144    #signup-new-process .textfor-copy {
7145        font-size: 12px;
7146    }
7147
7148    #signup-new-process .helper-text {
7149        font-size: 12px !important;
7150        line-height: 17px !important;
7151    }
7152
7153    #signup-new-process .follow-unfollow a {
7154        color: #111222 !important;
7155    }
7156
7157    #signup-new-process #step03 .app-install.email-verification a {
7158        color: #555555;
7159    }
7160
7161    #signup-new-process .see-guidline {
7162        text-align: right;
7163        margin-bottom: 20px;
7164    }
7165
7166    #signup-new-process div#lottie-animation3 {
7167        text-align: center;
7168        margin: 0 auto;
7169        margin-top: -80px;
7170    }
7171
7172    #signup-new-process #step09 h3 {
7173        font-size: 23px;
7174        margin-top: 0;
7175    }
7176
7177    #signup-new-process #step09 p {
7178        font-size: 11px;
7179    }
7180
7181    #signup-new-process .form-box h1.signup-title {
7182        font-size: 18px !important;
7183        color: #fff !important;
7184        margin-bottom: 15px !important;
7185    }
7186
7187    #signup-new-process .signup-title {
7188        font-size: 18px !important;
7189    }
7190
7191    #signup-new-process .cancel-signup.hide-on-desktop a {
7192        color: #bbb;
7193        font-size: 12px;
7194    }
7195
7196    #signup-new-process .cancel-signup.hide-on-desktop {
7197        display: block;
7198        position: absolute;
7199        right: 15px;
7200        top: 22px;
7201    }
7202
7203    #signup-new-process .form-box h2.signup-title,
7204    #signin-new-process .form-box h2.signup-title,
7205    #reset-new-process .form-box h2.signup-title,
7206    #verifyreset-new-process .form-box h2.signup-title,
7207    #enter-new-password .form-box h2.signup-title {
7208        font-size: 20px !important;
7209    }
7210
7211}
7212</style>
7213
7214<div class="signup-new-process" id="signup-new-process" style="display:none">
7215    <div id="step01" class="signup-wrapper">
7216
7217
7218        <!--             <div id="lottie-animation" style="width: 300px; height: 300px;"></div>-->
7219        <!--             <div id="lottie-animation2" style="width: 300px; height: 300px;"></div>-->
7220
7221        <div class="step-inside-row">
7222
7223            <!--
7224               <div class="col-md-5"><div class="mob floating">
7225                   <img src="/public/images/app-screen-n.png" alt="Jumpspree">
7226               </div>
7227               <div class="shadow-mob">
7227<img src="https://www.jumpspree.com/public/images/shadow.png" alt="Jumpspree"></div>
7228               </div>
7229              -->
7230            <div class="step-inside-row-inner">
7231                <div class="form-box">
7232
7233                    <!--
7234                      <div class="text-center login-logo">
7235                          <img style="width: 50px;border-radius: 10px;margin-bottom: 20px;" src="https://www.jumpspree.com/public/images/J-icon.png?ver:1.03" alt="Jumpspree">
7236                      </div>
7237              -->
7238                    <!--                   <p class="signup-note">The Jumpspree platform is currently available only in the Apple App Store and Google Play Store. You can still sign up here and then sign in to the Jumpspree app to start buying, selling, and posting content.</p>-->
7239                    <form action="" name="signupform" id="signupform">
7240                        <div class="logo-signup">
7241                            <a href="https://www.jumpspree.com/social">
7242<!--
7243                                <img src="https://www.jumpspree.com/public/images/logo-left.png?ver:1.08"
7244                                    loading="lazy" width="30px" alt="jumspree logo" title="jumspree logo">
7245-->
7246                                     <img src="https://www.jumpspree.com/public/images/logo-left.png?ver:1.08"
7247                                    loading="lazy" width="30px" alt="jumspree logo" title="jumspree logo">
7248                            </a>
7249                        </div>
7250                        <div class="cancel-signup">
7251                            <span style="cursor:pointer"
7252                                onclick="$('#signup-new-process').fadeOut('fast');$('body').removeClass('overflow-hidden');"><img
7253                                    src="https://www.jumpspree.com/public/images/close-signup.png" loading="lazy"
7254                                    alt="Close" title=""></span>
7255                        </div>
7256
7257                        <h2 class="text-left mb-2 signup-title">Sign Up</h2>
7258                        <p class="login-sub-head helper-text">Takes less than a minute. We’ll never spam you. Pinky
7259                            promise.</p>
7260
7261                        <div class="form-group">
7262                            <div class="user-name">
7263                                <img src="https://www.jumpspree.com/public/images/user-iconn.png" alt="user icon"
7264                                    title="user icon">
7265                                <input type="text" class="form-control" tabindex="1" name="fullname" id="fullname"
7266                                    placeholder="Full name">
7267                            </div>
7268                            <div id="fullname_validate" class="myerror"></div>
7269                        </div>
7270
7271                        <div class="form-group">
7272                            <div class="mail-icon">
7273                                <img src="https://www.jumpspree.com/public/images/mail-iconn.png" alt="mail icon"
7274                                    title="mail icon">
7275                                <input autocomplete="off" tabindex="1" type="text" name="email" id="email"
7276                                    class="form-control" placeholder="Email">
7277                            </div>
7278                            <div id="email_validate" class="myerror"></div>
7279                        </div>
7280
7281                        <div class="form-group">
7282                            <div class="d-flex justify-content-between tooltip-top">
7283                                <div class="tooltip-wrapper" style="display:none">
7284                                    <a href="#" style="font-size: 14px; color:#c8c7c7">Requirements</a>
7285                                    <div class="tooltip2">
7286                                        <ul>
7287                                            <li><img src="https://www.jumpspree.com/public/images/plan-tick-icon.svg"
7288                                                    alt="Plan tick" title="Password must be at least 8 characters long">
7289                                                Password must be at least 8 characters long</li>
7290                                            <li><img src="https://www.jumpspree.com/public/images/plan-tick-icon.svg"
7291                                                    alt="Plan tick" title="One lowercase character"> One lowercase
7292                                                character</li>
7293                                            <li><img src="https://www.jumpspree.com/public/images/plan-tick-icon.svg"
7294                                                    alt="Plan tick" title="One uppercase character"> One uppercase
7295                                                character</li>
7296                                            <li><img src="https://www.jumpspree.com/public/images/plan-tick-icon.svg"
7297                                                    alt="Plan tick" title="One number or special character"> One number
7298                                                or special character</li>
7299                                        </ul>
7300                                    </div>
7301                                </div>
7302                            </div>
7303
7304                            <div style="position:relative">
7305                                <div class="password-icon">
7306                                    <input autocomplete="off" tabindex="2" type="password" name="password" id="password"
7307                                        class="form-control" placeholder="Password">
7308                                    <img src="https://www.jumpspree.com/public/images/pass.png" alt="Lock"
7309                                        title="Password">
7310                                </div>
7311                                <span toggle="#password-field"
7312                                    style="position: absolute;top: 50%;right: 14px;transform: translateY(-50%);cursor:pointer"
7313                                    class="field_icon toggle-password"><i class="fa-regular fa-eye"></i></span>
7314                            </div>
7315                            <div id="password_validate" class="myerror"></div>
7316                        </div>
7317
7318                        <div class="form-group">
7319                            <div class="dob">
7320                                <img src="https://www.jumpspree.com/public/images/cake.png" alt="cake" title="cake">
7321                                <input autocomplete="off2" type="text" name="dob" id="dob"
7322                                    class="form-control datepicker" placeholder="Date of Birth" readonly>
7323                            </div>
7324                            <div id="dob_validate" class="myerror"></div>
7325                        </div>
7326
7327                        <div class="note">
7328                            <p>
7329                                Just need to make sure you’re 13 or older to hang with us. It won’t be shown anywhere.
7330                                <br><br>
7331
7332                            </p>
7333                        </div>
7334
7335                        <div class="signup-footer">
7336
7337
7338                            <!-- ✅ FIXED BUTTON HERE -->
7339                            <button class="btn btn-success mt-4 white-btn disabled" type="button"
7340                                onclick="checkSignup()" name="submitbtnstep1" style="position:relative;"
7341                                id="submitbtnstep1">
7342                                Next <img src="https://www.jumpspree.com/public/images/form-arrow.png" alt="Arrow"
7343                                    title="Arrow" class="arrow-right">
7344                            </button>
7345
7346                            <div id="errorregmessage" class="myerror"></div>
7347                            <div class="or-change d-flex justify-content-between sign-in-instead">
7348                                <div class="tnc"><a style="color:#808080; text-decoration:underline" target="_blank"
7349                                        href="https://www.jumpspree.com/terms-of-use">Terms</a> and
7350                                    <a target="_blank" href="https://www.jumpspree.com/privacy-policy"
7351                                        style="color:#808080; text-decoration:underline">Privacy</a>
7352                                </div>
7353
7354
7355                                <a href="javascript:void(0)"
7356                                    onclick="$('#signup-new-process').hide();$('#signin-new-process').fadeIn('fast')">Sign
7357                                    in instead</a>
7358                            </div>
7359                        </div>
7360
7361
7362                    </form>
7363
7364                </div>
7365            </div>
7366        </div>
7367    </div>
7368
7369    <div id="step02" class="signup-wrapper" style="display:none">
7370        <div class="step-inside-row">
7371            <div class="step-inside-row-inner">
7372                <div class="form-box">
7373                    <div class="email-verification mob-height app-install">
7374                        <div class="logo-signup">
7375                            <a href="https://www.jumpspree.com/"><img
7376                                    src="https://www.jumpspree.com/public/images/logo-left.png?ver:1.08"
7377                                    loading="lazy" width="30px" alt="jumspree logo" title="jumspree logo"></a>
7378                        </div>
7379                        <div class="cancel-signup">
7380                            <span style="cursor:pointer"
7381                                onclick="$('#signup-new-process').fadeOut('fast');$('body').removeClass('overflow-hidden');"><img
7382                                    src="https://www.jumpspree.com/public/images/close-signup.png" loading="lazy"
7383                                    alt="Close" title=""></span>
7384                        </div>
7385                        <div class="email-box">
7386                            <h2 class="signup-title">Verify your email</h2>
7387                            <p class="login-sub-head helper-text">We just sent you a code to your email. Pop
7388                                it in below so we know you're real.</p>
7389
7390                            <div class="d-flex justify-content-between">
7391                                <form method="get" class="digit-group" data-group-name="digits" data-autosubmit="false"
7392                                    autocomplete="off">
7393                                    <!--                        <div class="cross"><a href="https://www.jumpspree.com/"><img src="https://www.jumpspree.com/public/images/cross-icon.png" alt="Jumpspree"></a></div>-->
7394                                    <div class="verify-email-input"><img
7395                                            src="https://www.jumpspree.com/public/images/otp.png" loading="lazy"
7396                                            alt="OTP" title="OTP"><input style="width: 100%; text-align:left;"
7397                                            placeholder="Enter your 6-digit code here" maxlength="6" required
7398                                            class="otp-input form-control" id="otp1" /></div>
7399
7400
7401                                    <!--<input type="number" maxlength="1" pattern="\d" class="otp-input" id="otp1">
7402                                        <input type="number" maxlength="1" pattern="\d" class="otp-input" id="otp2">
7403                                        <input type="number" maxlength="1" pattern="\d" class="otp-input" id="otp3">
7404                                        <input type="number" maxlength="1" pattern="\d" class="otp-input" id="otp4">
7405                                        <input type="number" maxlength="1" pattern="\d" class="otp-input" id="otp5">
7406                                        <input type="number" maxlength="1" pattern="\d" class="otp-input" id="otp6">  -->
7407                                </form>
7408
7409                            </div>
7410                            <p class="login-sub-head color555">Didn’t get the code? Sometimes it can take up to 2
7411                                minutes for your code to arrive. If you still didn’t get it, you can request a new one.
7412                            </p>
7413                            <div class="resend">
7414                                <a href="#">Request a new code</a>
7415                            </div>
7416                        </div>
7417
7418                        <div class="verify-btn mb-0 w100">
7419                            <!--                            <button class="btn btn-success mt-4 white-btn disabled" onclick="$('#step02').hide();$('#step03').fadeIn();$(window).scrollTop(0);"  type="submit" name="submitbtn" style="position:relative;" id="submitbtn" >Next <img src="https://www.jumpspree.com/public/images/form-arrow.png" alt="Jumpspree" class="arrow-right"></button>-->
7420                            <button class="btn btn-success mt-4 white-btn disabled" type="button" name="submitbtn"
7421                                style="position:relative;" id="submitbtn">
7422                                Next <img src="https://www.jumpspree.com/public/images/form-arrow.png" alt="Arrow"
7423                                    title="Arrow" class="arrow-right">
7424                            </button>
7425                            <!--                       <div class="resend text-center"><a style="color:#fff" href="javascript:void(0)" onClick="resendVerificationCode()">Send a new code</a></div>-->
7426                        </div>
7427                        <div id="errorotpmessage" class="myerror"></div>
7428
7429
7430
7431                    </div>
7432                </div>
7433            </div>
7434        </div>
7435    </div>
7436
7437
7438    <div id="step03" class="signup-wrapper" style="display:none">
7439        <div class="step-inside-row">
7440            <div class="step-inside-row-inner">
7441                <div class="form-box">
7442                    <div class="email-verification mob-height app-install long-height">
7443                        <div class="logo-signup">
7444                            <a href="https://www.jumpspree.com/"><img
7445                                    src="https://www.jumpspree.com/public/images/logo-left.png?ver:1.08"
7446                                    loading="lazy" width="30px" alt="jumspree logo" title="jumspree logo"></a>
7447                        </div>
7448                        <div class="cancel-signup">
7449                            <span style="cursor:pointer"
7450                                onclick="$('#signup-new-process').fadeOut('fast');$('body').removeClass('overflow-hidden');"><img
7451                                    src="https://www.jumpspree.com/public/images/close-signup.png" loading="lazy"
7452                                    alt="Close" title=""></span>
7453                        </div>
7454                        <div class="email-box">
7455                            <h2 class="signup-title">Choose username + profile picture</h2>
7456                            <p class="login-sub-head helper-text">This is how the world will know you. Pick a name that
7457                                feels right, and upload a profile photo when you’re ready—you can always change it
7458                                later.</p>
7459
7460                            <div class="d-flex justify-content-start align-items-center add-profile-photo">
7461                                <!--
7462                        <div class="prifile-image">
7463                            <img src="https://www.jumpspree.com/public/images/profile-icon.png" width="30px" alt="Jumpspree">
7464                        </div>
7465-->
7466
7467                                <div class="avatar-upload">
7468
7469                                    <div class="avatar-preview">
7470                                        <div id="imagePreview"
7471                                            style="background-image: url('https://www.jumpspree.com/public/images/profile-icon.png');">
7472                                        </div>
7473                                    </div>
7474                                </div>
7475
7476                                <div class="add-file">
7477                                    <button class="add-profile"><img
7478                                            src="https://www.jumpspree.com/public/images/upload-img.png" alt="Upload"
7479                                            title="Upload" style="width:30px"> Add profile image</button>
7480                                    <div class="avatar-edit">
7481                                        <input type='file' id="imageUpload" accept=".png, .jpg, .jpeg" />
7482                                        <label for="imageUpload"></label>
7483                                    </div>
7484                                </div>
7485                                <p class="mb-0 optional">Optional</p>
7486
7487                            </div>
7488
7489                            <!-- <div class="search-user-name">
7490                           <input type="text" placeholder="@ Search your username" value="" class="form-control">
7491                       </div> -->
7492                            <div class="search-user-name">
7493                                <div class="seach-user-name-wrapper"><input maxlength="20" type="text"
7494                                        placeholder="@ Search your username" value="" class="form-control"
7495                                        id="username">
7496                                    <span class="at-sign">@</span>
7497                                </div>
7498                                <div id="errorusernameemessage" class="myerror"></div>
7499                                <div class="available-name" style="color:green; display:none;">Available <img
7500                                        src="https://www.jumpspree.com/public/images/green-check5.png" width="10"
7501                                        alt="Green Check" title="Green Check"></div>
7502                                <div class="not-available" style="color:red; display:none;">Unavailable <img
7503                                        src="https://www.jumpspree.com/public/images/cross-red.png" width="10"
7504                                        alt="Cross red" title="Cross red"></div>
7505                            </div>
7506
7507
7508
7509
7510                            <div class="see-guidline"><a href="javascript:void(0)">See guidelines</a>
7511
7512                                <div class="tooltip">
7513                                    <ul>
7514                                        <li>Username must be 3–15 characters.</li>
7515                                        <li>Special characters are not allowed.</li>
7516                                        <li>Only letters, numbers, and underscores (_) are allowed.</li>
7517                                    </ul>
7518                                </div>
7519
7520                            </div>
7521
7522                            <!--
7523                                                    <div class="resend">
7524                                                        <a href="#">Request a new code</a>
7525                                                    </div>  
7526                                                    
7527                                                    
7528                                -->
7529                            <div class="share-text">
7530                                <h5>Choosing Your Username</h5>
7531                                <p style="color:#bbb">We want you to pick a username that feels right for you! Once your
7532                                    profile is created, you’ll be able to change your username one time. After that, you
7533                                    can update it again every 30 days.</p>
7534                                <p style="color:#bbb">Just a heads-up: usernames are subject to availability and
7535                                    approval. To keep things fair for everyone, Jumpspree may transfer, reassign,
7536                                    disable, or reject usernames that infringe on someone else’s intellectual property
7537                                    rights.</p>
7538                            </div>
7539                        </div>
7540
7541                        <div class="verify-btn mb-0 w100">
7542                            <button class="btn btn-success mt-4 white-btn disabled"
7543                                onclick="$('#step03').hide();$('#step04').fadeIn();$(window).scrollTop(0);"
7544                                type="submit" name="submitbtnstep3" style="position:relative;" id="submitbtnstep3">Next
7545                                <img src="https://www.jumpspree.com/public/images/form-arrow.png" alt="Form Arrow"
7546                                    title="Form Arrow" class="arrow-right"></button>
7547                            <!--                       <div class="resend text-center"><a style="color:#fff" href="javascript:void(0)" onClick="resendVerificationCode()">Send a new code</a></div>-->
7548                        </div>
7549                        <div id="errorotpmessage" class="myerror"></div>
7550
7551
7552
7553                    </div>
7554                </div>
7555            </div>
7556        </div>
7557    </div>
7558
7559    <div id="step04" class="signup-wrapper" style="display:none">
7560        <div class="scoller-step-4">
7561            <div class="inside-bar"></div>
7562        </div>
7563        <div class="step-inside-row">
7564            <div class="step-inside-row-inner">
7565                <div class="form-box">
7566                    <div class="email-verification mob-height app-install">
7567                        <div class="logo-signup">
7568                            <a href="https://www.jumpspree.com/">
7569                                <img src="https://www.jumpspree.com/public/images/logo-left.png?ver:1.08"
7570                                    loading="lazy" width="30px" alt="jumspree logo" title="jumspree logo">
7571                            </a>
7572                        </div>
7573                        <div class="cancel-signup">
7574                            <span style="cursor:pointer"
7575                                onclick="$('#signup-new-process').fadeOut('fast');$('body').removeClass('overflow-hidden');"><img
7576                                    src="https://www.jumpspree.com/public/images/close-signup.png" loading="lazy"
7577                                    alt="Close" title=""></span>
7578                        </div>
7579                        <h2 class="d-flex align-items-center signup-title">Pick your interests <span
7580                                class="new">New</span></h2>
7581                        <p class="login-sub-head helper-text mb-0">What’s your vibe? We’ll use this to personalize your
7582                            feed. Pick 3 from the list.</p>
7583                        <div class="email-box">
7584                            <div class="trending">
7585                                <h3>Trending right now on Jumpspree</h3>
7586                                <div class="pick-intrest-buttons" id="trendingTopics"></div>
7587                            </div>
7588
7589                            <div class="share-text">
7590                                <h5>Other topics of interest</h5>
7591                                <div class="pick-intrest-buttons" id="otherTopics"></div>
7592                            </div>
7593                        </div>
7594
7595                        <div class="verify-btn mb-0 w100">
7596                            <button disabled class="btn btn-success mt-4 white-btn disabled" id="submitbtnstep4"
7597                                type="submit" style="position:relative;">
7598                                Next <img src="https://www.jumpspree.com/public/images/form-arrow.png" alt="Arrow"
7599                                    title="Arrow" class="arrow-right">
7600                            </button>
7601                        </div>
7602                        <div id="errorotpmessage" class="myerror"></div>
7603                    </div>
7604                </div>
7605            </div>
7606        </div>
7607    </div>
7608
7609
7610    <div id="step05" class="signup-wrapper" style="display:none">
7611        <div class="scoller-step-5">
7612            <div class="inside-bar"></div>
7613        </div>
7614        <div class="step-inside-row">
7615            <div class="step-inside-row-inner">
7616                <div class="form-box">
7617                    <div class="email-verification mob-height app-install">
7618                        <div class="logo-signup">
7619                            <a href="https://www.jumpspree.com/"><img
7620                                    src="https://www.jumpspree.com/public/images/logo-left.png?ver:1.08"
7621                                    loading="lazy" width="30px" alt="jumspree logo" title="jumspree logo"></a>
7622                        </div>
7623                        <div class="cancel-signup">
7624                            <span style="cursor:pointer"
7625                                onclick="$('#signup-new-process').fadeOut('fast');$('body').removeClass('overflow-hidden');"><img
7626                                    src="https://www.jumpspree.com/public/images/close-signup.png" loading="lazy"
7627                                    alt="Close" title="Close"></span>
7628                        </div>
7629
7630                        <div class="email-box">
7631                            <h2 class="signup-title">Follow at least 3 people to get started</h2>
7632                            <p class="login-sub-head helper-text">Your feed is better with friends...</p>
7633                            <div id="recommendedUsersContainer"></div> <!-- ✅ inject users here -->
7634
7635                            <div class="verify-btn mb-0 w100">
7636                                <button class="btn btn-success mt-4 white-btn disabled" disabled type="submit"
7637                                    name="submitbtn" style="position:relative;" id="submitbtnstep5">
7638                                    Next <img src="https://www.jumpspree.com/public/images/form-arrow.png" alt="Arrow"
7639                                        title="Arrow" class="arrow-right">
7640                                </button>
7641
7642                            </div>
7643                            <div id="errorotpmessage" class="myerror"></div>
7644                        </div>
7645
7646
7647
7648
7649                    </div>
7650                </div>
7651            </div>
7652        </div>
7653    </div>
7654
7655    <div id="step06" class="signup-wrapper" style="display:none">
7656        <div class="step-inside-row">
7657            <div class="step-inside-row-inner">
7658                <div class="form-box">
7659                    <div class="email-verification mob-height app-install">
7660                        <div class="logo-signup">
7661                            <a href="https://www.jumpspree.com/"><img
7662                                    src="https://www.jumpspree.com/public/images/logo-left.png?ver:1.08"
7663                                    loading="lazy" width="30px" alt="jumspree logo" title="jumspree logo"></a>
7664                        </div>
7665                        <div class="cancel-signup">
7666                            <span style="cursor:pointer"
7667                                onclick="$('#signup-new-process').fadeOut('fast');$('body').removeClass('overflow-hidden');"><img
7668                                    src="https://www.jumpspree.com/public/images/close-signup.png" loading="lazy"
7669                                    alt="Close" title="Close"></span>
7670                        </div>
7671                        <input type="hidden" id="hidden_username" value="username">
7672                        <div class="email-box">
7673                            <h2 class="signup-title">Finally, bring your friends with you</h2>
7674                            <p class="login-sub-head helper-text">Jumpspree is better with friends—invite your crew to
7675                                scroll, shop, post, and vibe with you on Jumpspree. Simply copy the link and message
7676                                below, and share it away!</p>
7677
7678                            <div class="textfor-copy" style="font-family:Rubik">I’m on this new app called
7679                                Jumpspree—it’s part social, part shopping, all community. It’s where people post, shop,
7680                                sell, and vibe. Come check it out and follow me:
7681
7682                                <br>
7683                                <br>
7684
7685                                <div id="copy-url-container">www.jumpspree.com/username</div>
7686                                <div class="copy-link">
7687                                    <a href="#" id="copyBtn">
7688                                        <img src="https://www.jumpspree.com/public/images/copy-link-icon.png" width="10"
7689                                            alt="Copy" title="Copy" loading="lazy">
7690                                    </a>
7691                                </div>
7692                            </div>
7693                            <div id="errorotpmessagestep6" class="success green-text"></div>
7694                        </div>
7695
7696                        <div class="verify-btn mb-0 w100 mt-50">
7697                            <!--
7698                     <div class="skip-and-finish">
7699                         <a href="#">Skip this and finish sign up</a>
7700                     </div>
7701-->
7702                            <button class="btn btn-success mt-4 white-btn"
7703                                onclick="$('#step06').hide();$('#step07').fadeIn(); animationstart()" type="submit"
7704                                name="submitbtn" style="position:relative;" id="submitbtnstep6">Finish <img
7705                                    src="https://www.jumpspree.com/public/images/form-arrow.png" alt="Arrow"
7706                                    title="Arrow" class="arrow-right"></button>
7707                            <!--                       <div class="resend text-center"><a style="color:#fff" href="javascript:void(0)" onClick="resendVerificationCode()">Send a new code</a></div>-->
7708                        </div>
7709                        <div id="errorotpmessage" class="myerror"></div>
7710
7711
7712
7713                    </div>
7714                </div>
7715            </div>
7716        </div>
7717    </div>
7718    <div id="step07" class="signup-wrapper" style="display:none">
7719        <div class="step-inside-row">
7720            <div class="step-inside-row-inner">
7721                <div class="form-box">
7722                    <div class="email-verification mob-height app-install">
7723
7724                        <div class="setup-account">
7725                            <div id="lottie-animation" style="width: 300px; height: 300px;"></div>
7726                            <h3>Setting up your profile..</h3>
7727                        </div>
7728
7729                        <div class="all-set" style="display:none">
7730                            <div id="lottie-animation2" style="width: 300px; height: 300px;"></div>
7731                            <h3>All set! Let's jump right in.</h3>
7732                        </div>
7733
7734
7735                    </div>
7736                </div>
7737            </div>
7738        </div>
7739
7740    </div>
7741
7742    <div id="step08" class="signup-wrapper" style="display:none">
7743        <div class="step-inside-row">
7744            <div class="step-inside-row-inner">
7745                <div class="form-box">
7746
7747                    <!--
7748                      <div class="text-center login-logo">
7749                          <img style="width: 50px;border-radius: 10px;margin-bottom: 20px;" src="https://www.jumpspree.com/public/images/J-icon.png?ver:1.03" alt="Jumpspree">
7750                      </div>
7751              -->
7752                    <!--                   <p class="signup-note">The Jumpspree platform is currently available only in the Apple App Store and Google Play Store. You can still sign up here and then sign in to the Jumpspree app to start buying, selling, and posting content.</p>-->
7753                    <form action="" name="signupform" id="signupform" novalidate="novalidate">
7754                        <div class="logo-signup">
7755                            <a href="https://www.jumpspree.com/"><img
7756                                    src="https://www.jumpspree.com/public/images/logo-left.png?ver:1.08"
7757                                    loading="lazy" width="30px" alt="jumspree logo" title="jumspree logo"></a>
7758                        </div>
7759                        <div class="cancel-signup">
7760                            <span style="cursor:pointer"
7761                                onclick="$('#signup-new-process').fadeOut('fast');$('body').removeClass('overflow-hidden');"><img
7762                                    src="https://www.jumpspree.com/public/images/close-signup.png" loading="lazy"
7763                                    alt="Close" title=""></span>
7764                        </div>
7765                        <div class="cross"><a href="https://www.jumpspree.com/"><img
7766                                    src="https://www.jumpspree.com/public/images/cross-icon.png" alt="Cross"
7767                                    title="Cross"></a></div>
7768                        <h2 class="text-left mb-2">Share your first post! 🎉</h2>
7769                        <div class="share-post-feed">
7770                            <div class="user-profil-detail-box d-flex align-items-center">
7771                                <div id="userAvtar" class="fig"><img
7772                                        src="https://www.jumpspree.com/public/images/profile-icon.png"
7773                                        alt="Profile icon" title="Profile icon">
7774                                </div>
7775                                <div class="user">
7776                                    <!--
7777                                    <div class="first-post"><img
7778                                            src="https://www.jumpspree.com/public/images/first-post.png" alt="Jumpspree"> First
7779                                        Post</div>
7780-->
7781                                    <div id="userNewName" class="user-name">@ChrisRay</div>
7782                                </div>
7783
7784                            </div>
7785
7786                            <div class="text">
7787                                <p>Just joined Jumpspree 🎉</p>
7788                                <p>Excited to see what this new space is all about. Follow me and say hey—I'm new here
7789                                    👋</p>
7790                                <p class="mb-0"><a style="color:#5b5dff" href="#">#Jumpspree</a> <a
7791                                        style="color:#5b5dff" href="#">#JustJoined</a> <a style="color:#5b5dff"
7792                                        href="#">#NewHere</a></p>
7793                            </div>
7794                        </div>
7795
7796                        <div class="share-post">
7797                            <a href="#" class="btn" onclick="showmaybelater()">Maybe later</a>
7798                            <a href="javascript:void(0)" class="btn white-btn" id="shareFirstPostBtn"
7799                                onclick="showAnimation()">Share <img
7800                                    src="https://www.jumpspree.com/public/images/plane.png" style="width: 20px;"
7801                                    alt="Plane" title="Plane" loading="lazy"></a>
7802                        </div>
7803
7804
7805
7806
7807                    </form>
7808                </div>
7809            </div>
7810        </div>
7811
7812    </div>
7813
7814    <div id="step09" class="signup-wrapper" style="display:none">
7815        <div class="step-inside-row">
7816            <div class="step-inside-row-inner">
7817                <div class="form-box">
7818                    <div class="email-verification mob-height app-install">
7819                        <div class="all-set">
7820                            <div id="lottie-animation3" style="width: 300px; height: 300px;display:none"></div>
7821                            <h3>Welcome to Jumpspree</h3>
7822                            <p>We’re hyped to see what you bring to the spree! 🙌</p>
7823                        </div>
7824                    </div>
7825
7826                </div>
7827            </div>
7828        </div>
7829
7830    </div>
7831
7832</div>
7833
7834<div class="signin-new-process" id="signin-new-process" style="display:none">
7835    <div id="sign-in-box" class="signup-wrapper">
7836        <div class="signin-inner">
7837            <div class="form-box">
7838                <!--
7839                  <div class="text-center login-logo">
7840                      <img style="width: 50px;border-radius: 10px;margin-bottom: 20px;" src="https://www.jumpspree.com/public/images/J-icon.png?ver:1.03" alt="Jumpspree">
7841                                </div>
7842                -->
7843                <form action="" id="loginform" name="loginform">
7844                   
7845                    <div class="logo xl">
7846
7847                        <a href="https://www.jumpspree.com"><img
7848                                src="https://www.jumpspree.com/public/images/logo-left.png?ver:1.08" class=""
7849                                alt="jumpspree-logo" title="jumpspree-logo"></a>
7850
7851
7852
7853
7854
7855                    </div>
7856                            <!--                    onclick="cancelSignupProcess()"-->
7857                    <div class="cancel-signup"><span style="cursor:pointer" onclick="$('#signin-new-process').fadeOut('fast');"><img src="https://www.jumpspree.com/public/images/close-signup.png" alt="Close" title=""></span></div> 
7858                    <h2 class="text-left mb-2 signup-title signinpopup" style="margin-bottom:0;">Sign In</h2>
7859                    <!--                   <p class="login-sub-head">Get back in your account and pick up where you left off.</p>-->
7860                    <!--
7861                       <div class="form-group">
7862                           <label for="">Full Name</label>
7863                           <input type="text" class="form-control" placeholder="Matt Smith">
7864                       </div>
7865                        -->
7866                    <div class="form-group">
7867                        <div class="d-flex justify-content-between align-items-start">
7868                            <label for=""><span id="emaillabel">Email or username</span></label>
7869                            <div class="freset username" style="opacity:1"><a href="javascript:void(0)" style="visibility: hidden;" data-type="1"
7870                                    id="emailusername">Use username instead</a></div>
7871                        </div>
7872                        <div class="mail-icon">
7873                            <input type="text" autocomplete="username" class="form-control" tabindex="1"
7874                                name="loginname" id="loginname" placeholder="[email protected]">
7875                            <img src="https://www.jumpspree.com/public/images/at.png" id="emailimage" alt="at" title="at"
7876                                style="display:none; filter:invert(1) brightness(0.7); width:20px; height:20px;">
7877                        </div>
7878                        <div id="loginname_validate" class="myerror"></div>
7879                    </div>
7880                    <div class="form-group mb-1">
7881                        <div class="d-flex justify-content-between align-items-start">
7882                            <label for="">Password</label>
7883                            <div class="freset"><a href="https://www.jumpspree.com/reset-password">Reset
7884                                    Password</a></div>
7885                        </div>
7886                        <div style="position:relative">
7887                            <div class="password-icon">
7888                                <input type="password" 
7889                                    autocomplete="current-password"
7890                                    tabindex="2"
7891                                    class="form-control"
7892                                    name="loginpassword"
7893                                    id="loginpassword"
7894                                    placeholder="Enter password">
7895                            </div>
7896
7897                            <span data-target="#loginpassword"
7898                                style="position: absolute; top: 50%; right: 14px; transform: translateY(-50%); cursor: pointer;"
7899                                class="field_icon toggle-password2"><i class="fa-regular fa-eye"></i></span>
7900                        </div>
7901
7902                        <div id="loginpassword_validate" class="myerror"></div>
7903                    </div>
7904
7905
7906                    <div class="sign-in-verify">
7907                        
7908                        <button class="btn btn-success" type="submit" id="signinSubmitBtn">Sign In</button>
7909                        <!--                        <button class="btn btn-success" type="submit" onClick="window.location.href='after-logged-in.php'">Sign In</button>
7910                           -->
7911                        <div id="errormessage" class="myerror"></div>
7912                        
7913                        <div class="or-change d-flex justify-content-between">
7914                        <div class="tnc">
7915                           <a href="https://www.jumpspree.com/terms-of-use" target="_blank">Terms</a> and <a href="https://www.jumpspree.com/privacy-policy" target="_blank">Privacy</a>  
7916                        </div>   
7917                            <a class="pb-0" href="https://www.jumpspree.com/sign-up">Sign up instead</a>
7918                            <!--                       <a href="">Sign in with a social account</a>-->
7919                        </div>
7920                        <!--                       <div class="or"><span>or continue with</span></div>-->
7921                    </div>
7922
7923                    <div class="social-login" style="display:none">
7924                        <ul>
7925                            <li><a href=""><span><img
7926                                            src="https://www.jumpspree.com/public/images/google.png" alt="google" title="google"> </span></a>
7927                            </li>
7928                            <li><a href="javascript:void(0)" style="position:relative"><span><img
7929                                            style="filter:invert(1)" id="appleid-signin"
7930                                            src="https://www.jumpspree.com/public/images/apple.png" alt="apple" title="apple"><img
7931                                            style="filter:invert(1)"
7932                                            src="https://www.jumpspree.com/public/images/apple.png" alt="apple" title="apple"></span></a>
7933                            </li>
7934                            <!--<li><a href="#"><img src="https://www.jumpspree.com/public/images/fb.png" alt=""></a></li>
7935                               <li><a href="#"><img src="https://www.jumpspree.com/public/images/x.png" alt=""></a></li>-->
7936                        </ul>
7937                    </div>
7938                    <!--                       <div class="or-change">New to Jumpspree? <a href="">Sign Up</a>.</div>-->
7939
7940
7941                    <!--
7942                       <div class="sign-up-foot">
7943                           <p>Starting 01/01/25, Jumpspree will no longer support social logins. If you previously signed up using a social account, you can sign back in and create a new password for future logins by tapping on "Reset Password" in your Profile Settings.</p>
7944                                        </div>
7945                    -->
7946
7947
7948                </form>
7949                
7950
7951
7952
7953
7954
7955
7956
7957
7958
7959
7960
7961
7962                <!--
7963                   <div class="copyright-p">
7964                                        <p>Copyright © 2025 Jumpspree by Cubesnack, Inc. <br>All rights reserved.</p>
7965                                    </div>
7966                    -->
7967            </div>
7968        </div>
7969    </div>
7970    <div class="signin-new-process" id="reset-new-process" style="display:none">
7971        <div class="reset-inner signin-inner">
7972            <div class="form-box">
7973                <form action="" id="loginform" name="loginform">
7974                    <div class="rest-pass">
7975                        <div class="logo xl">
7976
7977                            <a href="https://www.jumpspree.com"><img
7978                                    src="https://www.jumpspree.com/public/images/logo-left.png?ver:1.08"
7979                                    loading="lazy" class="" alt="jumpspree-logo" title="jumpspree-logo"></a>
7980                        </div>
7981                        <div class="cancel-signup"><span style="cursor:pointer"
7982                                onclick="$('#reset-new-process').fadeOut();$('#sign-in-box').fadeIn();"><img
7983                                    src="https://www.jumpspree.com/public/images/close-signup.png" loading="lazy"
7984                                    alt="Close" title=""></span></div>
7985                        <div class="email-box">
7986                            <h2 class="text-left mb-2 signup-title">Reset Password <img style="display:none"
7987                                    src="https://www.jumpspree.com/public/images/lock-black.png" alt="Lock"
7988                                    title="Lock"></h2>
7989                            <p class="login-sub-head">Enter your @username or the email related to your Jumpspree
7990                                account and hit "Send" to receive the reset link in your email.</p>
7991                            <!--                       <p>Enter your @username or the email related to your Jumpspree account and hit "Send" to receive the reset link in your email.</p>-->
7992                            <div class="form">
7993                                <!-- Add data-type to track toggle state -->
7994                                <div class="use-user-name">
7995                                    <a href="#" class="active" data-type="1">Use username instead</a>
7996                                </div>
7997
7998
7999                                <div class="form-group">
8000                                    <!--        <label id="emaillabel">Email</label>-->
8001                                    <input type="text" class="form-control" name="forgotemail" id="forgotemail"
8002                                        placeholder="[email protected]">
8003                                    <img src="https://www.jumpspree.com/public/images/at.png" id="emailimage2" alt="at"
8004                                        title="at"
8005                                        style="filter: invert(1) brightness(0.7); width: 20px; height: 20px; display: none">
8006                                    <div id="forgotemail_validate" class="myerror"></div>
8007                                </div>
8008
8009                                <button class="btn btn-success" type="button" id="send-reset-btn">Send</button>
8010
8011                                <div id="errorforgotpassword" class="myerror"></div>
8012
8013                                <div class="or-change">
8014                                    <a class="back-to-sign-i" href="javascript:void(0)"
8015                                        onclick="$('#reset-new-process').fadeOut(); $('#sign-in-box').fadeIn();">
8016                                        Back to sign in
8017                                    </a>
8018                                </div>
8019                            </div>
8020
8021
8022                        </div>
8023
8024
8025                    </div>
8026                </form>
8027            </div>
8028        </div>
8029    </div>
8030    <div class="signin-new-process" id="verifyreset-new-process" style="display:none">
8031        <div class="reset-inner signin-inner">
8032            <div class="step-inside-row">
8033                <div class="step-inside-row-inner">
8034                    <div class="form-box">
8035                        <div class="email-verification mob-height app-install">
8036                            <div class="logo-signup">
8037                                <a href="https://www.jumpspree.com/" class="active"><img
8038                                        src="https://www.jumpspree.com/public/images/logo-left.png?ver:1.08"
8039                                        loading="lazy" width="30px" alt="jumspree logo" title="jumspree logo"></a>
8040                            </div>
8041                            <div class="cancel-signup"><span style="cursor:pointer"
8042                                    onclick="$('#verifyreset-new-process').hide();$('#reset-new-process').fadeIn();"><img
8043                                        src="https://www.jumpspree.com/public/images/close-signup.png" loading="lazy"
8044                                        alt="Close" title=""></span></div>
8045                            <div class="email-box">
8046                                <h2 class="signup-title">Verify your email</h2>
8047                                <p id="helper-text" class="login-sub-head helper-text">We just sent you a code to your
8048                                    email.
8049                                    Pop it in below so we know you're real.</p>
8050
8051                                <div class="d-flex justify-content-between">
8052                                    <form method="get" class="digit-group" data-group-name="digits"
8053                                        data-autosubmit="false" autocomplete="off">
8054                                        <!--                        <div class="cross"><a href="https://www.jumpspree.com/"><img src="https://www.jumpspree.com/public/images/cross-icon.png" alt="Jumpspree"></a></div>-->
8055                                        <div class="verify-email-input"><img
8056                                                src="https://www.jumpspree.com/public/images/otp.png" loading="lazy"
8057                                                alt="OTP" title="OTP"><input style="width: 100%; text-align:left;"
8058                                                type="number" placeholder="Enter your 6-digit code here"
8059                                                class="otp-input form-control" id="otpforreset"></div>
8060
8061
8062                                        <!--<input type="number" maxlength="1" pattern="\d" class="otp-input" id="otp1">
8063                                        <input type="number" maxlength="1" pattern="\d" class="otp-input" id="otp2">
8064                                        <input type="number" maxlength="1" pattern="\d" class="otp-input" id="otp3">
8065                                        <input type="number" maxlength="1" pattern="\d" class="otp-in
8065put" id="otp4">
8066                                        <input type="number" maxlength="1" pattern="\d" class="otp-input" id="otp5">
8067                                        <input type="number" maxlength="1" pattern="\d" class="otp-input" id="otp6">  -->
8068                                    </form>
8069
8070                                </div>
8071                                <p class="login-sub-head color555" style="line-height: 17px;">Did not get the code?
8072                                    Sometimes it can take up to 2
8073                                    minutes for your code to arrive. If you still didn’t get it, you can request a new
8074                                    one.</p>
8075                                <div class="resend">
8076                                    <a href="#">Request a new code</a>
8077                                </div>
8078                            </div>
8079
8080                            <div class="verify-btn mb-0 w100">
8081                                <!-- <button class="btn btn-success mt-4 white-btn"
8082                                    onclick="$('#verifyreset-new-process').hide();$('#enter-new-password').fadeIn('fast');"
8083                                    type="submit" name="submitbtn" style="position:relative;" id="submitbtn">Next <img
8084                                        src="https://www.jumpspree.com/public/images/form-arrow.png" alt="Jumpspree"
8085                                        class="arrow-right"></button> -->
8086
8087                                <button class="btn btn-success mt-4 white-btn" id="verify-otp-btn">Next
8088                                    <img src="https://www.jumpspree.com/public/images/form-arrow.png" alt="Form Arrow"
8089                                        title="Form Arrow" class="arrow-right">
8090                                </button>
8091
8092                                <!--                       <div class="resend text-center"><a style="color:#fff" href="javascript:void(0)" onClick="resendVerificationCode()">Send a new code</a></div>-->
8093                            </div>
8094                            <div id="errorotpmessage" class="myerror"></div>
8095
8096
8097
8098                        </div>
8099                    </div>
8100                </div>
8101            </div>
8102        </div>
8103    </div>
8104
8105
8106    <div class="signin-new-process" id="enter-new-password" style="display:none">
8107        <div class="reset-inner signin-inner">
8108            <div class="step-inside-row">
8109                <div class="step-inside-row-inner">
8110                    <div class="form-box">
8111                        <div class="email-verification mob-height app-install">
8112                            <div class="logo-signup">
8113                                <a href="https://www.jumpspree.com/" class="active"><img
8114                                        src="https://www.jumpspree.com/public/images/logo-left.png?ver:1.08"
8115                                        loading="lazy" width="30px" alt="jumspree logo" title="jumspree logo"></a>
8116                            </div>
8117                            <div class="cancel-signup"><span style="cursor:pointer"
8118                                    onclick="$('#enter-new-password').hide();$('#verifyreset-new-process').fadeIn();"><img
8119                                        src="https://www.jumpspree.com/public/images/close-signup.png" loading="lazy"
8120                                        alt="Close" title=""></span></div>
8121                            <div id="createpasswordbox">
8122                                <h2 class="signup-title">Reset Password</h2>
8123                                <p class="login-sub-head helper-text">Let's secure your Jumpspree account by creating a
8124                                    new password.</p>
8125                                <div class="form-group">
8126                                    <!--                                  <label for="">New Password</label>-->
8127                                    <div style="position:relative">
8128
8129                                        <input type="password" class="form-control" id="forgotnewpassword"
8130                                            name="forgotnewpassword" placeholder="New password"
8131                                            autocomplete="new-password" autocorrect="off" spellcheck="false"
8132                                            aria-autocomplete="none">
8133                                        <!-- Use only this: -->
8134                                        <span data-target="#forgotnewpassword"
8135                                            style="position: absolute; top: 50%; right: 14px; transform: translateY(-50%); cursor: pointer;"
8136                                            class="field_icon toggle-password"><i class="fa-regular fa-eye"></i></span>
8137
8138
8139
8140                                    </div>
8141                                    <div id="forgotnewpassword_validate" class="myerror"></div>
8142                                </div>
8143                                <div class="form-group mb-0">
8144                                    <!--                                  <label for="">Confirm New Password</label>-->
8145                                    <div style="position:relative">
8146                                        <input type="password" class="form-control" id="forgotconnewpassword"
8147                                            name="forgotconnewpassword" placeholder="Confirm new password">
8148                                        <span data-target="#forgotconnewpassword"
8149                                            style="position: absolute; top: 50%; right: 14px; transform: translateY(-50%); cursor: pointer;"
8150                                            class="field_icon toggle-password2"><i class="fa-regular fa-eye"></i></span>
8151
8152                                    </div>
8153                                    <div id="forgotnewpassword_validate" class="myerror" style="display:none"></div>
8154                                    <div id="forgotconnewpassword_validate" class="myerror" style="display:none"></div>
8155
8156                                </div>
8157
8158                                <div class="note">
8159                                    <p>Secure Password Guidelines:</p>
8160                                    <ul>
8161                                        <li>Must be minimum 8 characters long.</li>
8162                                        <li>Must be a mix of letters and numbers.</li>
8163                                        <li>Must have at least one uppercase letter.</li>
8164                                        <li>Must be easy for you to remember and hard for others to guess.</li>
8165                                    </ul>
8166                                    <!-- <ul>
8167                                           <li><img src="https://www.jumpspree.com/public/images/plan-tick-icon.svg" alt="Jumpspree"> Password must be at least 8 characters long</li>
8168                                           <li><img src="https://www.jumpspree.com/public/images/plan-tick-icon.svg" alt="Jumpspree"> One lowercase character</li>
8169                                           <li><img src="https://www.jumpspree.com/public/images/plan-tick-icon.svg" alt="Jumpspree"> One uppercase character</li>
8170                                           <li><img src="https://www.jumpspree.com/public/images/plan-tick-icon.svg" alt="Jumpspree"> One number or special character</li>
8171                                       </ul> -->
8172                                </div>
8173
8174
8175                                <button class="btn btn-success" type="submit" id="reset-password-btn">Reset
8176                                    Password</button>
8177
8178                            </div>
8179
8180
8181                            <div id="errorotpmessage" class="myerror"></div>
8182
8183
8184
8185                        </div>
8186                    </div>
8187                </div>
8188            </div>
8189        </div>
8190    </div>
8191
8192    <div class="signin-new-process" id="password-change-success" style="display:none">
8193        <div class="reset-inner">
8194            <div class="step-inside-row">
8195                <div class="step-inside-row-inner">
8196                    <div class="form-box">
8197                        <div class="email-verification mob-height app-install">
8198                            <div class="check-s">
8199                                <img src="https://www.jumpspree.com/public/images/blue-check.png" alt="Blue Check"
8200                                    title="Blue Check">
8201                            </div>
8202                            <h4>It's done✨</h4>
8203                            <p>Your changes have been saved.</p>
8204
8205                            <div class="close"><a href="javascript:void(0)"
8206                                    onclick="$('#signin-new-process').fadeOut();$('#password-change-success').hide();$('#sign-in-box').fadeIn('slow');">Close</a>
8207                            </div>
8208                        </div>
8209                    </div>
8210                </div>
8211            </div>
8212        </div>
8213    </div>
8214</div>
8215
8216
8217
8218
8219
8220
8221<!--26-06-2025-->
8222
8223<!-- <link href="https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.4/assets/owl.carousel.min.css" rel="stylesheet">
8224<link href="https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.4/assets/owl.theme.default.min.css" rel="stylesheet">
8225<link href="https://cdnjs.cloudflare.com/ajax/libs/lightbox2/2.11.3/css/lightbox.min.css" rel="stylesheet">
8226
8227<script src="https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.4/owl.carousel.min.js"></script>
8227
8228<script src="https://cdnjs.cloudflare.com/ajax/libs/lightbox2/2.11.3/js/lightbox.min.js"></script>
8228 -->
8229<div id="uploadProgressContainer" style="display: none; margin-top: 10px; position: fixed;bottom: 0px;z-index: 1222;">
8230    <div style="height: 20px; background: #eee; border-radius: 10px; overflow: hidden;">
8231        <div id="uploadProgressBar"
8232            style="height: 100%; width: 0%; background: #4caf50; text-align: center; color: white; line-height: 20px;">
8233        </div>
8234    </div>
8235</div>
8236
8237
8238<div id="uploadSnackbar" class="upload-snackbar" style="display: none;">
8239    <div class="upload-progress-container">
8240        <div class="upload-progress-bar"></div>
8241    </div>
8242    <div class="upload-message">Uploading files...</div>
8243    <div class="upload-percentage">0%</div>
8244</div>
8245
8246<input type="hidden" value="" id="hashTagValue" name="hashTagValue" />
8247<div class="notification-alert" id="post-sent">
8248    <div class="alert-inner">
8249        <div class="left-bar"><img src="https://www.jumpspree.com/public/images/green-check001.png" alt="Green check"
8250                title="Green check"> Post sent
8251        </div>
8252        <div class="right-bar"><a href="#">View</a></div>
8253    </div>
8254</div>
8255
8256<div class="notification-alert" id="post-delete">
8257    <div class="alert-inner">
8258        <div class="left-bar"><img src="https://www.jumpspree.com/public/images/green-check001.png" alt="Green check"
8259                title="Green check"> Post deleted
8260        </div>
8261    </div>
8262</div>
8263
8264<div class="notification-alert" id="post-updated">
8265    <div class="alert-inner">
8266        <div class="left-bar"><img src="https://www.jumpspree.com/public/images/green-check001.png" alt="Green check"
8267                title="Green check"> Post updated
8268        </div>
8269    </div>
8270</div>
8271
8272<div class="notification-alert" id="post-added-to-bookmarks">
8273    <div class="alert-inner">
8274        <div class="left-bar"><img src="https://www.jumpspree.com/public/images/green-check001.png" alt="Green check"
8275                title="Green check"> Added to
8276            Bookmarks</div>
8277    </div>
8278</div>
8279
8280<div class="notification-alert" id="post-remove-to-bookmarks">
8281    <div class="alert-inner">
8282        <div class="left-bar"><img src="https://www.jumpspree.com/public/images/green-check001.png" alt="Green check"
8283                title="Green check"> Removed from
8284            Bookmarks</div>
8285    </div>
8286</div>
8287<div class="notification-alert" id="post-Link-copied">
8288    <div class="alert-inner">
8289        <div class="left-bar"><img src="https://www.jumpspree.com/public/images/green-check001.png" alt="Green check"
8290                title="Green check"> Link copied
8291        </div>
8292    </div>
8293</div>
8294<div class="notification-alert" id="post-text-copied">
8295    <div class="alert-inner">
8296        <div class="left-bar"><img src="https://www.jumpspree.com/public/images/green-check001.png" alt="Green check"
8297                title="Green check"> Text copied
8298        </div>
8299    </div>
8300</div>
8301
8302<div class="notification-alert" id="post-under-review">
8303    <div class="alert-inner">
8304        <div class="left-bar"><img src="https://www.jumpspree.com/public/images/notifications.png" alt="Green check"
8305                title="Green check"> Your listing
8306            is in review.</div>
8307    </div>
8308</div>
8309
8310<div class="notification-alert" id="post-followed-you">
8311    <div class="alert-inner">
8312        <div class="left-bar"><img src="https://www.jumpspree.com/public/images/follower.png" alt="Green check"
8313                title="Green check"> {{username}}
8314            followed you.</div>
8315        <div class="right-bar"><a href="#">Follow Back</a></div>
8316    </div>
8317</div>
8318
8319<div class="notification-alert" id="post-changes-saved">
8320    <div class="alert-inner">
8321        <div class="left-bar"><img src="https://www.jumpspree.com/public/images/green-check001.png" alt="Green check"
8322                title="Green check"> Changes
8323            saved</div>
8324    </div>
8325</div>
8326
8327<div class="notification-alert" id="post-sending">
8328    <div class="alert-inner">
8329        <div class="left-bar"><img src="https://www.jumpspree.com/public/images/loader.png" alt="Loader"
8330                title="Sending"> Sending</div>
8331    </div>
8332</div>
8333
8334
8335<div class="notification-alert " id="message-notification" style="width: auto">
8336    <!--this is general alert message added by sagar on 1jan -->
8337    <div class="alert-inner">
8338        <div class="left-bar"><img src="" id="message-notification-image" alt="blank" title="blank"><span
8339                id="message-notification-text"></span></div>
8340
8341    </div>
8342</div>
8343
8344
8345
8346<div class="social-popup" id="comment-on-post">
8347    <input type="hidden" id="post-id-hidden" value="">
8347 <!-- Hidden input for postId this will filled in JS  -->
8348
8349    <div class="add-post-inner">
8350        <div class="header-post social-add-header">
8351            <div class="header-add-post">
8352                <div class="fnc mt-0 justify-content-between mb-5 align-items-center">
8353                    <div class="d-flex">
8354                        <div class="fig">
8355                            <img id="profile-img"
8356                                src="https://cubesnack-seller.s3.amazonaws.com/products/2610240610366368.jpg"
8357                                style="border-radius:50%" alt="logo" title="logo">
8358                        </div>
8359                        <div class="fnc-title">
8360                            <h4 id="user-name">Jumpspree</h4>
8361                            <p id="user-handle">@vic</p>
8362                            <p class="replying-to">Replying to <a href="#" id="reply-handle">@Tom_Holland</a></p>
8363                        </div>
8364                    </div>
8365
8366                    <div class="drop-down-blog">
8367                        <span class="discard-button" style="cursor:pointer"
8368                            onclick="$('#comment-on-post').fadeOut();">Discard</span>
8369                    </div>
8370                </div>
8371            </div>
8372
8373            <div class="post-area-inside">
8374                <textarea
8375                    oninput="this.style.height = &quot;&quot;;this.style.height = this.scrollHeight + &quot;px&quot;"
8376                    name="repostTextarea" id="repostTextarea" placeholder="What's up?"></textarea>
8377            </div>
8378
8379            <div class="post-foot add-post-foot d-flex justify-content-between">
8380                <div class="add-image">
8381                    <ul class="d-flex p-0 m-0">
8382                        <li>
8383                            <a href="#">
8384                                <input type="file" id="image-input"><i class="fa-regular fa-image"></i>
8385                            </a>
8386                        </li>
8387                        <li>
8388                            <a href="#">
8389                                <input type="file" id="video-input"><i class="fa-regular fa-video"></i>
8390                            </a>
8391                        </li>
8392                        <!-- <li>
8393                            <a id="gif-trigger" href="#">
8394                                <input type="file" id="gif-input"><i class="fa-regular fa-gif"></i>
8395                            </a>
8396                        </li> -->
8397
8398                        <li>
8399                            <a href="#" id="gif-trigger">
8400                                <i class="fa-regular fa-gif"></i>
8401                            </a>
8402                        </li>
8403
8404                    </ul>
8405                </div>
8406
8407                <div class="send-post">
8408                    <button type="button" id="submit-comment">Post</button>
8409                </div>
8410            </div>
8411        </div>
8412 
8413    </div> <!-- End of add-post-inner  -->
8414</div> <!-- End of comment-on-post  -->
8415
8416<!-- 
8417    <div class="social-popup" id="report-on-more-option">
8418        <div class="add-post-inner">
8419            <div class="popup-header">
8420                <h2>What’s happening?</h2>
8421                <div class="cross">
8422                    <a href="javascript:void(0)" onclick="$('#report-on-more-option').fadeOut('fast')">
8423                        <img src="https://www.jumpspree.com/public/images/cross-icon.png" alt="Jumpspree">
8424                    </a>
8425                </div>
8426            </div>
8427        
8428            <div class="pop-inner">
8429                <textarea id="problem_text" placeholder="Please include as many details as possible so that we can get to the problem quickly. Your report will remain anonymous."></textarea>
8430            </div>
8431        
8432            <div class="report-foot d-flex justify-content-between">
8433                <div class="attach">
8434                    <img src="https://www.jumpspree.com/public/images/attach.png" alt="Jumpspree">
8435                    <input type="file" id="attachment">
8436                </div>
8437                <div class="send">
8438                    <button type="button" class="send" id="sendReport">Send</button>
8439                </div>
8440                
8441            </div>
8442        </div>
8443    </div> -->
8444
8445<!--
8446<div class="social-popup" id="report-on-more-option">
8447    <div class="add-post-inner">
8448        <div class="popup-header">
8449            <h2>What’s happening?</h2>
8450            <div class="cross">
8451                <a href="javascript:void(0)" onclick="$('#report-on-more-option').fadeOut('fast')">
8452                    <img src="https://www.jumpspree.com/public/images/cross-icon.png" alt="Cross" title="Cross">
8453                </a>
8454            </div>
8455        </div>
8456
8457        <div class="pop-inner">
8458            <textarea id="problem_text"
8459                placeholder="Please include as many details as possible so that we can get to the problem quickly. Your report will remain anonymous."></textarea>
8460        </div>
8461
8462        <div id="attachment-preview-container" style="display: none;">
8463            <button type="button" class="close-btn" id="remove-attachment">&times;</button>
8464            <div id="attachment-preview">
8465            </div>
8466        </div>
8467
8468        <div class="report-foot d-flex justify-content-between">
8469            <div class="attach">
8470                <img src="https://www.jumpspree.com/public/images/attach.png" loading="lazy" alt="Attach"
8471                    title="Attach">
8472                <input type="file" id="attachmentForReport" accept="image/*,video/*">
8473            </div>
8474            <div class="send">
8475                <button type="button" class="send" id="sendReport" disabled>Send</button>
8476            </div>
8477        </div>
8478    </div>
8479</div>
8480-->
8481
8482 
8483
8484<div class="social-popup" id="report-on-more-option">
8485    <div class="add-post-inner">
8486        <div class="popup-header">
8487            <h2>Report a Bug</h2>
8488            
8489            <div class="cross">
8490                <a href="javascript:void(0)" onclick="$('#report-on-more-option').fadeOut('fast')">
8491                    <img src="https://www.jumpspree.com/public/images/cross-icon.png" alt="Cross" title="Cross">
8492                </a>
8493            </div>
8494        </div>
8495
8496        <div class="pop-inner">
8497           <div class="title mb-4">
8498                <input type="text" id="bug-report-title" placeholder="Title" maxlength="100">
8499            </div>
8500            <textarea id="problem_text"
8501                placeholder="Description" maxlength="1000"></textarea>
8502        </div>
8503
8504         
8505        <div id="attachment-preview-container" style="display: none;">
8506            <div id="attachment-preview-inner" style="display: flex;">
8507            </div>
8508        </div>
8509
8510        <div class="report-foot d-flex justify-content-between">
8511            <div class="attach">
8512                <img src="https://www.jumpspree.com/public/images/attach.png" loading="lazy" alt="Attach"
8513                    title="Attach">
8514                <input type="file" multiple id="attachmentForReport" accept="image/*">
8515            </div>
8516            <div class="send">
8517                <button type="button" class="send" id="sendReport" disabled>Send</button>
8518            </div>
8519        </div>
8520    </div>
8521</div>
8522
8523
8524  
8525
8526<div class="social-popup" id="follow-card-box">
8527    <div class="follow-card">
8528        <div class="card-top">
8529            <div class="user-icon">
8530                <img src="https://www.jumpspree.com/public/images/card-image.png" alt="User icon" title="User icon">
8531            </div>
8532            <img src="https://www.jumpspree.com/public/images/top-banner-card.png" alt="Banner" title="Banner">
8533        </div>
8534        <div class="card-inside">
8535            <div class="user-name-section d-flex justify-content-between">
8536                <div class="name">
8537                    <h2>Pat Brown</h2>
8538                    <p>@patbrown</p>
8539                </div>
8540                <div class="follow-btn">
8541                    <a href="#">
8541Follow</a>
8542                </div>
8543            </div>
8544            <div class="stats d-flex justify-content-strat">
8545                <div class="stat" style="cursor:pointer"
8546                    onclick="window.location.href='https://www.jumpspree.com/brandfollowers/vicsbrandpage'">
8547                    <a href="#">101 Followers</a>
8548                </div>
8549                <div class="stat">
8550                    •
8551                </div>
8552                <!--
8553                               <div class="stat" onclick="window.location.href='https://www.jumpspree.com/following'">
8554                                   <h5></h5>
8555                                   <p>Following</p>
8556                               </div>
8557                               <div class="stat">
8558                                   &bull;
8559                               </div>
8560-->
8561
8562                <div class="stat">
8563                    <a href="#">865 Following</a>
8564                </div>
8565            </div>
8566
8567            <div class="bio">
8568                <p>This is the bio. This is the bio. This is the bio. This is the bio. This is the bio. This is the bio.
8569                    This is the bio. This is the bio. This is the bio. </p>
8570            </div>
8571        </div>
8572    </div>
8573</div>
8574
8575
8576<div class="social-popup" id="write-article-popup">
8577    <input type="hidden" id="post-id-hidden" value=""> <!-- Hidden input for postId this will filled in JS  -->
8578
8579    <div class="add-post-inner">
8580        <div class="header-post social-add-header">
8581            <div class="create-poll-head">
8582                <div class="back-post" onclick="$('#discard').addClass('show-discard')"><i
8583                        class="fa-regular fa-arrow-left" aria-hidden="true"></i></div>
8584                <h2>Write your article</h2>
8585
8586                <div class="save-article"><a href="#">Save</a></div>
8587                <div class="drop-down-blog">
8588                    <a class="discard-button" href="javascript:void(0)"
8589                        onclick="$('#discard').addClass('show-discard')">Discard</a>
8590                </div>
8591            </div>
8592
8593
8594            <div class="post-area-inside">
8595                <textarea
8596                    oninput="this.style.height = &quot;&quot;;this.style.height = this.scrollHeight + &quot;px&quot;"
8597                    name="repostTextarea" id="repostTextarea" placeholder="What's up?"></textarea>
8598            </div>
8599
8600            <div class="post-foot add-post-foot d-flex justify-content-between">
8601                <div class="add-image">
8602                    <img src="https://www.jumpspree.com/public/images/icon.png" alt="footer" title="footer">
8603                </div>
8604
8605                <div class="send-post">
8606                    <button type="button" id="submit-comment">Save</button>
8607                </div>
8608            </div>
8609        </div>
8610    </div>
8611</div>
8612
8613<!-- ADD POST  start here  -->
8614
8615<div class="social-popup" data-id="addPostFunctionality" id="social-popup">
8616
8617    <div class="add-post-inner">
8618
8619        <div class="genrate-with-ai" id="genrate-with-ai-step01" style="display:none">
8620            <div class="genrate-ai-inner">
8621                <div class="cross"><a href="javascript:void(0)" onclick="$('#genrate-with-ai-step01').fadeOut();"><img
8622                            src="https://www.jumpspree.com/public/images/cross-ga.png" alt="Cross" title="Cross"></a>
8623                </div>
8624                <div class="stars"><img src="https://www.jumpspree.com/public/images/starss.png" alt="Star"
8625                        title="Star"></div>
8626                <h2>What would you like to generate?</h2>
8627                <p>Type your instructions below and let AI magically create a post for you.</p>
8628                <div class="credits-wrapper">
8629                    <p><span id="creditremainingstats">-/-</span> daily tokens remaining. <a href="javascript:void(0)"
8630                            onclick="getAIPlans()">Buy additional tokens starting at only
8631                            $5.</a></p>
8632                </div>
8633                <div class="whats-on-your-mind">
8634                    <!--                <h3>What’s on your mind?</h3>-->
8635                    <div class="whats-on-your-mind-text">
8636                        <textarea name="generatebox" id="generatebox" cols="30" rows="10"
8637                            placeholder="What’s on your mind?"></textarea>
8638                    </div>
8639                    <div class="copy-link" style="cursor:pointer;">
8639<img onclick="copyPost()"
8640                            src="https://www.jumpspree.com/public/images/copy-link23.png" alt="Copy" title="Copy">
8641                    </div>
8642                </div>
8643
8644                <div id="g-ai-button">
8645                    <div class="g-ai-button d-flex">
8646                        <button id="generateBtn" class="generate disabled" onclick="regenerateText('1')">
8647
8648                            <span id="spinner" class="spinner-border spinner-border-sm" style="display:none;"
8649                                role="status" aria-hidden="true"></span>
8650                            <span id="generateText"><img style="width:20px" id="regenerateicon"
8651                                    src="https://www.jumpspree.com/public/images/restore.png" alt="Generate"
8652                                    title="Generate"> Generate</span>
8653
8654                        </button>
8655                    </div>
8656                </div>
8657
8658                <div id="g-ai-btn" style="display:none">
8659                    <div class="g-ai-button d-flex">
8660                        <button class="keep-this" onclick="keepPost()"><img
8661                                src="https://www.jumpspree.com/public/images/thumbsup.png" loading="lazy" alt="thumbsup"
8662                                title="thumbsup"> Keep this response</button>
8663                        <button class="regenerate" onclick="regenerateText('2')"><img id="regenerateicon"
8664                                src="https://www.jumpspree.com/public/images/restore.png" alt="Regenerate"
8665                                title="Regenerate"> Regenerate</button>
8666                    </div>
8667                </div>
8668
8669                <div class="note">
8670                    <p>We currently do not generate images. This feature is still in beta and the responses might not
8671                        always be accurate. Do not enter any personal or sensitive information.</p>
8672                </div>
8673            </div>
8674        </div>
8675
8676
8677        <div class="genrate-with-ai" id="genrate-with-ai-step02" style="display:none">
8678            <div class="genrate-ai-inner">
8679                <div class="cross"><a href="javascript:void(0)" onclick="$('#genrate-with-ai-step02').fadeOut();"><img
8680                            src="https://www.jumpspree.com/public/images/cross-ga.png" alt="Cross" title="Cross"></a>
8681                </div>
8682                <div class="stars"><img src="https://www.jumpspree.com/public/images/starss.png" alt="Stars"
8683                        title="Stars"></div>
8684                <h2>How many tokens would you like to purchase?</h2>
8685                <p>Once purchased, your tokens will be saved until you’ve use them all.</p>
8686                <div class="credits-wrapper">
8687                    <p>5/5 daily tokens remaining. <a href="javascript:void(0)">Buy additional tokens starting at only
8688                            $5.</a></p>
8689                </div>
8690
8691                <div class="payment-option">
8692
8693
8694                    <ul id="planlist">
8695
8696                        <li>
8697                            <span><b>Loading Plans</b> please wait...</span>
8698
8699                        </li>
8700                         
8701                    </ul>
8702                </div>
8703
8704                <div class="g-ai-button d-flex">
8705                    <button class="buy" type="button" onclick="buyaiplan()"><img
8706                            src="https://www.jumpspree.com/public/images/lock-buynow2.png" alt="Lock" title="Lock">
8707                        <span class="buy-btn-text">Buy now</span>
8708                    </button>
8709                </div>
8710
8711                <div class="note">
8712                    <p>By purchasing tokens you are agreeing to our terms of use and privacy policy. Tokens cannot be
8713                        refunded once purchased, and cannot be transferred to another account. Additional taxes and fees
8714                        may apply at checkout.</p>
8715                </div>
8716            </div>
8717        </div>
8718
8719        <div class="genrate-with-ai" id="genrate-with-ai-step03" style="display:none">
8720            <div class="genrate-ai-inner">
8721                <div class="cross"><a href="javascript:void(0)" onclick="$('#genrate-with-ai-step03').fadeOut();"><img
8722                            src="https://www.jumpspree.com/public/images/cross-ga.png" alt="Cross" title="Cross"></a>
8723                </div>
8724                <div class="check"><img src="https://www.jumpspree.com/public/images/new-check.png" alt="Check"
8725                        title="Check"></div>
8726                <h2>You’re all set!</h2>
8727                <p>Your credits are now applied to your account and are ready to use! Can’t wait to see what your
8728                    generate with the power of AI.</p>
8729
8730
8731
8732
8733                <div class="g-ai-button d-flex">
8734                    <button class="buy" onclick="$('#genrate-with-ai-step03').fadeOut();">Create a post</button>
8735                </div>
8736
8737
8738            </div>
8739        </div>
8740
8741
8742
8743        <div class="genrate-with-ai" id="genrate-with-ai-step04" style="display:none">
8744            <div class="genrate-ai-inner">
8745                <div class="cross"><a href="javascript:void(0)" onclick="$('#genrate-with-ai-step04').fadeOut();"><img
8746                            src="https://www.jumpspree.com/public/images/cross-ga.png" alt="Cross" title="Cross"></a>
8747                </div>
8748                <div class="check"><img src="https://www.jumpspree.com/public/images/new-check.png" alt="Check"
8749                        title="Check"></div>
8750                <h2>Transaction Cancelled</h2>
8751                <p>The transaction was aborted at your request. No payment has been taken. Please restart the process
8752                    when you’re ready.</p>
8753
8754
8755
8756
8757                <!-- <div class="g-ai-button d-flex">
8758                    <button class="buy" onclick="generatewithai()">Restart</button>
8759                </div> -->
8760
8761
8762            </div>
8763        </div>
8764
8765        <!-- Embed Link Popup -->
8766        <!-- Embed Link Popup -->
8767        <div id="embed-link" class="">
8768            <div class="embed-header">
8769                <div class="d-flex align-items-center mb-3">
8770                    <div class="back-btn">
8771                        <a href="javascript:void(0)" onclick="closeEmbedLinkPopup()"> <i
8772                                class="fa-solid fa-arrow-left-long"></i> </a>
8773                    </div>
8774                    <h3 class="embed-link-header"><i class="hgi hgi-stroke hgi-link-05"></i> Embed Link</h3>
8775                    <div class="close">
8776                        <span class="cancel" onclick="closeEmbedLinkPopup()">Cancel</span>
8777                    </div>
8778                </div>
8779            </div>
8780            <div class="embed-inner">
8781                <p>
8782                    This link will be embedded in your media. Users can click the image to open the embedded link.
8783                    Jumpspree More subscribers can edit this link for 30 minutes after publishing the post.</p>
8784                <div class="input-embed">
8785                    <input id="embedInput" type="text" aria-label="HTML embed code" value=""
8786                        placeholder="Enter your link here">
8787                    <button class="copy-embed" id="saveEmbedButton" type="button">Save</button>
8788                </div>
8789            </div>
8790        </div>
8791
8792        <!-- Alt Text Popup -->
8793        <div id="add-alt-tag" class="">
8794            <div class="alt-header">
8795                <div class="d-flex align-items-center mb-3">
8796                    <h3><img src="https://www.jumpspree.com/public/images/alt.png" alt="Alt" title="Alt"> Alt Text</h3>
8797                    <div class="close">
8798                        <span class="cancel" onclick="closeAltTextPopup()">Cancel</span>
8799                    </div>
8800                </div>
8801            </div>
8802            <div class="embed-inner">
8803                <p>
8804                    Alt text, or "alternative text," is a written description added to images on websites or digital
8805                    content to describe what the image shows. It's primarily used to improve accessibility for people
8806                    with visual impairments, as screen readers can read the alt text aloud. Alt text also helps search
8807                    engines understand the image content, which can improve search ranking and visibility.</p>
8808                <div class="d-flex">
8809                    <div class="input-embed flex1 mt-0 mb-0">
8810                        <textarea id="altTextInput" maxlength="1000"
8811                            placeholder="Example: This image shows..."></textarea>
8812                        <div class="text-right">
8813                            <div id="altTextLiveCounter" class="c-count">0/1000</div>
8814                        </div>
8815                    </div>
8816                    <button class="copy-embed" id="saveAltTextButton" type="button">Save</button>
8817                </div>
8818            </div>
8819        </div>
8820
8821
8822
8823        <div id="draft-box" onclick="window.event.cancelBubble = true;">
8824            <div class="embed-header">
8825                <div class="d-flex align-items-center mb-0">
8826                    <div class="back-btn">
8827                        <a href="javascript:void(0)"
8828                            onclick="$('#social-popup .add-post-inner').removeClass('draft-open');$('#draft-box').hide()"><img
8829                                src="https://www.jumpspree.com/public/images/arrow-left.png" alt="Arrow" title="Arrow"
8830                                style="filter:invert(0); height: auto; width:13px"></a>
8831                    </div>
8832                    <h3>Drafts</h3>
8833                    <div id="deleteAllDraftBtn" class="close delete-all"><a href="javascript:void(0)"
8834                            onclick="$('#discard-save-draft').show();">Delete All</a></div>
8835                </div>
8836                <div class="draft-switcher">
8837                    <a href="#" id="draft-btn" class="active"
8838                        onclick="$(this).addClass('active');$('#schedued-btn').removeClass('active');$('#draft-container').fadeIn(); $('#schedule-container').hide()">Drafts</a>
8839                    <a href="#" id="schedued-btn" onclick="showScheduler(this)">Scheduled</a>
8840                </div>
8841            </div>
8842            <div class="draft-outer" id="draft-container">
8843                <div class="no-drafts">
8844                    <p id="noDraft">No drafts available</p>
8845                </div>
8846                <!-- Dynamic content will be appended here 22 jan -->
8847            </div>
8848
8849            <div class="draft-outer" id="schedule-container" style="">
8850                <div class="schedule-list mt-0" id="scheduledPostArticleList">
8851
8852
8853                </div>
8854            </div>
8855
8856
8857            <!-- <div class="no-drafts">
8858             <p>No drafts available</p>
8859         </div> -->
8860        </div>
8861
8862
8863        <div id="add-topic-box" onclick="window.event.cancelBubble = true;">
8864
8865            <div class="search-box-add-topic d-flex align-items-center gap-4">
8866                <div class="search-input-topic">
8867                    <i class="hgi hgi-stroke hgi-search-01"></i>
8868                    <input type="text" class="form-control" placeholder="Search">
8869                </div>
8870                <span onclick="$('#add-topic-box').hide();" style="color:#fff !important">Cancel</span>
8871            </div>
8872
8873            <div class="search-topic-dropdown">
8874                <div class="search-topic-dropdown-row">
8875                    <span>Information</span>
8876                    <a href="#">Add new topic</a>
8877                </div>
8878                <div class="search-topic-dropdown-row">
8879                    <span>Information</span>
8880                    <a href="#">Add new topic</a>
8881                </div>
8882                <div class="search-topic-dropdown-row">
8883                    <span>Information</span>
8884                    <a href="#">Add new topic</a>
8885                </div>
8886            </div>
8887
8888
8889
8890
8891        </div>
8892
8893
8894
8895
8896        
8897 
8898        <!-- add post with repost preview new dec 10 update start -->
8899        <div class="header-post social-add-header" id="add-post-div">
8900            <div class="d-flex" style="flex-direction:column;">
8901                <!-- Add repost indicator in header -->
8902                <div class="popup-top-header d-flex justify-content-between align-items-center">
8903                    <div id="discard-for-post" class="dicard">
8904                        <span class="discard-button" style="cursor:pointer" onclick="handleDiscardAction()">
8905                            <i class="fa-light fa-angle-left"></i> Cancel
8906                        </span>
8907                    </div>
8908                    <div id="discard-for-poll" class="dicard" style="display:none">
8909                        <span style="cursor:pointer" class="discard-button" onclick="handleDiscardPollAction()">Cancel</span>
8910                    </div>
8911                    
8912                    <!-- Dynamic title - changes when reposting -->
8913                    <h2 id="popup-title">Create Post</h2>
8914                    
8915                    <!-- Repost indicator badge -->
8916                    <!-- <div id="repost-indicator" style="display:none; margin-left: 10px;">
8917                        <span style="color: #1d9bf0; font-size: 12px; display: flex; align-items: center; background: rgba(29, 155, 240, 0.1); padding: 3px 8px; border-radius: 12px;">
8918                            <i class="fa-solid fa-retweet" style="margin-right: 5px; font-size: 10px;"></i> Reposting
8919                        </span>
8920                    </div> -->
8921                    
8922                    <div class="draft">
8923                        <a href="javascript:void(0)"
8924                            style="color:#b8b8b8; display: flex;align-items: center;justify-content: center;"
8925                            onclick="$('#social-popup .add-post-inner').addClass('draft-open');$('#draft-box').show();$('#draft-container').show();$('#schedule-container').hide();">
8926                            Drafts
8927                        </a>
8928                    </div>
8929                </div>
8930                
8931                <!-- Hidden input for repost ID -->
8932                <form id="repost-form" style="display:none;">
8933                    <input type="hidden" id="repostId" name="repostId" value="">
8934                </form>
8935                
8936                <div class="add-post-inside">
8937                    <div class="schedule-done updated-version" id="scheduledone" style="display:none">
8938                        <p id="scheduledfor"
8939                            onclick="$('#social-popup > .add-post-inner').addClass('schedule-box-opened');$('.Schedule-message-wrapper').show();">
8940                        </p>
8941                        <div class="unschedule-close" onclick="$('#unschedule').fadeIn('fast')">&times;</div>
8942                        <div class="action" style="display:none"><a href="javascript:void(0)"
8943                                onclick="$('#social-popup > .add-post-inner').addClass('schedule-box-opened');$('.Schedule-message-wrapper').show();">Change</a>
8944                            <a href="javascript:void(0)" onclick="$('#unschedule').fadeIn('fast')">Unschedule</a>
8945                        </div>
8946                    </div>
8947                    
8948                  
8949                    
8950                    <!-- Original Post Creator Section -->
8951                    <div class="header-add-post">
8952                        <div class="fnc mt-0 justify-content-between mb-5 align-items-start">
8953                            <div class="d-flex align-items-center">
8954                                <div class="fig">
8955                                    <div id="online-dot-"
8956                                        class="user-online">
8957                                    </div>
8958                                    <img id="currentprofile" src="https://www.jumpspree.com/public/images/user-icon.png?ver:1.023"
8959                                        style="border-radius:50%" alt="Profile Photo" title="Profile Photo">
8960                                </div>
8961
8962                                <div class="fnc-title">
8963                                    <h4 class="currentUser d-flex gap-2 align-items-center">
8964                                        <span class="d-flex">
8965                                            <div style="display:none">
8966                                                Guest User                                                <span class="post-creation-divider">&bull;</span> 
8967                                            </div>
8968                                            <span class="post-creation-username notranslate">
8969                                                @Guest                                            </span>
8970                                        </span>
8971                                                                            </h4>
8972                                    <div class="add-a-topic"><a href="javascript:void(0)"
8973                                            onclick="$('#add-topic-box').show();"><img
8974                                                src="https://www.jumpspree.com/public/images/add-topic.png"
8975                                                style="filter:invert()" alt="Add topic" title="Add topic"> Add a topic
8976                                            <i class="hgi hgi-stroke hgi-arrow-right-01"></i></a></div>
8977                                    <p class="currentUserName" style="display:none">
8978                                        @Guest                                    </p>
8979                                </div>
8980                            </div>
8981
8982                            <div class="drop-down-blog" style="display:none">
8983                                <a class="discard-button" href="javascript:void(0)"
8984                                    onclick="handleDiscardAction()">Discard</a>
8985                            </div>
8986                        </div>
8987                    </div>
8988                    
8989                    <!-- Rest of your existing code remains exactly the same -->
8990                    <div id="gifModalForAddPost" class="gif-modal">
8991                        <div class="gif-modal-content">
8992                            <input type="text" id="gifSearchForAddPost" placeholder="Search GIFs">
8993                            <button style="opacity: 0;" id="gifSearchBtnForAddPost" class="search-icon-btn">
8994                                <i class="fa fa-search" aria-hidden="true"></i>
8995                            </button>
8996                            <div id="gifResults-outer">
8997                            <div id="gifResultsForAddPost" class="gif-list"></div>
8998                            </div>
8999                        </div>
9000                    </div>
9001                    
9002                    <div id="add-post-full-container">
9003                        <div class="add-post-inside-wrapper">
9004                            <div class="post-area-inside">
9005                                <div id="addPostTextarea" contenteditable="true"
9006                                    data-placeholder="What’s jumping in your head?" oninput="highlightText(this)"></div>
9007                                <div class="mention-popup" id="mention-popup"></div>
9008                                <div id="hashTags-popup" class="hashTags-popup"></div>
9009                            </div>
9010
9011                              <!-- Repost Preview Container -->
9012                                <div id="repost-preview-container" style="display:none; margin-bottom: 20px; padding: 15px; background: rgba(255, 255, 255, 0.05); border-radius: 8px; border: 1px solid rgba(255, 255, 255, 0.1);">
9013                                    <div class="repost-preview-header" style="margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between;">
9014                                        <div style="font-size: 12px; color: #8d8c8c;">
9015                                            <i class="fa-solid fa-retweet" style="margin-right: 5px;"></i> Reposting this post
9016                                        </div>
9017                                        <button onclick="clearRepost()" style="background: none; border: none; color: #8d8c8c; cursor: pointer; font-size: 12px; padding: 2px 8px;">
9018                                            <i class="fa-solid fa-xmark"></i> Clear
9019                                        </button>
9020                                    </div>
9021                                    <div class="post-for-repost">
9022                                        <div class="fnc mt-0 justify-content-between mb-3 align-items-start">
9023                                            <div class="d-flex align-items-center">
9024                                                <div class="fig" style="width: 30px; height: 30px;">
9025                                                    <img id="currentpostprofile" src="" alt="Profile" style="border-radius:50%; width: 100%; height: 100%; object-fit: cover;">
9026                                                </div>
9027                                                <div class="fnc-title" style="margin-left: 10px;">
9028                                                    <h4 class="postUser" style="font-size: 14px; margin: 0; color: #fff;"></h4>
9029                                                    <p class="postUserName" style="font-size: 12px; margin: 0; color: #8d8c8c;"></p>
9030                                                </div>
9031                                            </div>
9032                                        </div>
9033                                        <div class="post-data">
9034                                            <p id="repost-preview-content" style="font-size: 14px;
9034 color: #e0e0e0; margin: 0; line-height: 1.4;"></p>
9035                                        </div>
9036                                    </div>
9037                                </div>
9038
9039                            <div class="image-preview-box" id="imagePreviewBox" style="display: none;">
9040                                <button style="display: none;" onclick="closePreview()" class="close-btn">&times;</button>
9041                                <div class="addpostImagePreview swiper mySwiper" id="imageCarousel">
9042                                    <div class="swiper-wrapper"></div>
9043                                    <div class="swiper-pagination"></div>
9044                                </div>
9045                            </div>
9046
9047                            <div class="video-preview-box" id="videoPreviewBox" style="display: none;">
9048                                <div class="video-preview" id="videoPreviewContainer">
9049                                    <div class="close-video-preview" onclick="closeVideoPreview()">&times;</div>
9050                                    <video id="videoPreview" controls>
9051                                        <source id="videoSource" src="" type="video/mp4">
9052                                    </video>
9053                                </div>
9054                            </div>
9055
9056                            <div class="gif-preview-box" id="gifPreviewBox" style="display: none;">
9057                                <div class="gif-preview" id="gifPreviewContainer">
9058                                    <div class="close-gif-preview" onclick="clearGifPreview()">&times;</div>
9059                                    <img id="gifPreviewAddPost" src="" alt="GIF">
9060                                </div>
9061                                <div style="display: none !important;" class="embed-and-alt d-flex">
9062                                    <div class="embed-link"><a href="javascript:void(0)"
9063                                            onclick="window.event.cancelBubble = true; $('#embed-link').addClass('show-embed-link');$('#add-alt-tag').removeClass('embed-in'); $('#add-alt-tag').removeClass('show-add-alt-tag'); $('.drop-down-menu-share').hide(); $('#share-site-link').removeClass('share-in-open');"><img
9064                                                src="https://www.jumpspree.com/public/images/copy-link.png"
9065                                                alt="Copy Link" title="Copy Link"> Embed
9066                                            link</a></div>
9067                                    <div class="add-alt-text"><a href="javascript:void(0)"
9068                                            onclick="window.event.cancelBubble = true; $('#add-alt-tag').addClass('show-add-alt-tag'); $('.drop-down-menu-share').hide(); $('#share-site-link').removeClass('share-in-open');$('#embed-link').removeClass('embed-in'); $('#embed-link').removeClass('show-embed-link');"><img
9069                                                src="https://www.jumpspree.com/public/images/alt.png" alt="Add alt text"
9070                                                title="Add alt text"> Add alt text</a>
9071                                    </div>
9072                                </div>
9073                            </div>
9074                        </div>
9075
9076                        <div class="create-post-bottom-icons d-flex align-items-center">
9077                            <div class="all-btn-wrapper-box d-flex align-items-center">
9078                                <div class="add-image">
9079                                    <ul class="d-flex p-0 m-0">
9080                                        <li class="emozibtn-post"><button id="myemojiBtn">😊</button>
9081                                            <div id="emojiPickerWrapper"
9082                                                style="display: none; position: absolute; z-index: 999;">
9083                                                <div style="text-align: right;">
9084                                                    <button id="closeEmojiPicker"
9085                                                        style="border: none; background: none; font-size: 18px; cursor: pointer;">❌</button>
9086                                                </div>
9087                                                <emoji-picker id="emojiPicker" style="width: 320px; height: 300px;">
9088                                                </emoji-picker>
9089                                            </div>
9090                                        </li>
9091                                        <li>
9092                                            <a href="javascript:void(0)"
9093                                                style="display: flex;align-items: center;justify-content: center;">
9094                                                <input type="file" multiple accept="image/*" id="imageInput">
9095                                                <img src="https://www.jumpspree.com/public/images/image-upload-stroke-rounded.png"
9096                                                    alt="Upload" title="Upload" style="width: 17px;">
9097                                            </a>
9098                                        </li>
9099                                        <li>
9100                                            <a href="javascript:void(0)"
9101                                                style="display: flex;align-items: center;justify-content: center;">
9102                                                <input type="file" id="videoInput">
9103                                                <img src="https://www.jumpspree.com/public/images/video-01-stroke-rounded.png"
9104                                                    class="video-icon" alt="video" title="video" style="width: 20p
9104x;">
9105                                            </a>
9106                                        </li>
9107                                        <li onclick="openGifModalForAddPost()">
9108                                            <a href="javascript:void(0)" id="gif-trigger-for-addpost"
9109                                                style="display: flex;align-items: center;justify-content: center;">
9110                                                <img src="https://www.jumpspree.com/public/images/gif-02-stroke-rounded.png"
9111                                                    alt="Gif" title="Gif" style="width: 17px;">
9112                                            </a>
9113                                        </li>
9114                                        <li class="create-poll"
9115                                            onclick="$('#create-poll-main-box, #post-footer-for-poll').slideDown(); $('#post-footer-for-post').hide(); $('#add-post-full-container').hide(); $('#discard-for-poll').show(); $('#discard-for-post').hide(); ">
9116                                            <a href="javascript:void(0)">
9117<!--
9118                                                <i class="hgi hgi-stroke hgi-analytics-01"
9119                                                    style="transform: rotate(90deg);display: inline-block;"></i>
9120-->
9121                                           <img src="https://www.jumpspree.com/public/images/analytics-01.png?ver:1.02" alt="">
9122                                            </a>
9123                                        </li>
9124                                         
9125                                    </ul>
9126                                </div>
9127
9128                                                            </div>
9129
9130<!--
9131                            <div class="btn-ai-wrapper">
9132                                <button class="btn btn-ai glow-btn" id="btn-ai" style="margin-top:0"
9133                                    onclick="generatewithai()"><span class="ai-btn-inner"><img
9134                                            src="https://www.jumpspree.com/public/images/starss.png" alt="Stars"
9135                                            title="Stars" width="20"> Try Jumpspree AI</span></button>
9136                            </div>
9137-->
9138                        </div> 
9139                        
9140
9141                        <div class="write-article-and-tag-a-product member-guidlines" style="display: none;">
9142                                <ul>
9143                                    <li><a href="javascript:void(0)" onclick="$('#members-box').fadeIn('fast');"><span class="d-flex flex-direction-column members" style="flex-direction:column"><span>Members</span>
9144                                    <span class="desc">Add or edit people who can see and reply to this post. Only members you add can see and interact with Private Posts.</span>
9145                                </span> <span>›</span></a></li>
9146                                                                <li><a href="javascript:void(0)" onclick="$('#guidlines-box').fadeIn('fast'); $('.guidlines-textaea textarea').focus()"><span class="d-flex flex-direction-column members" style="flex-direction:column"><span>Guidelines</span>
9147                                                                        <span class="desc">Create guidelines that you want your post members to adhere to. You 
9148                                can edit your guidelines anytime.</span>
9149                                </span> <span>›</span></a></li>
9150                                </ul>
9151                        </div>
9152
9153                        
9154                        <p class="typingondesktio" style="margin: 0;
9155                                text-align: left;
9156                                width: 100%;
9157                                font-size: 12px;
9158                                color: #8d8c8c;
9159                            margin-top: 0;position: static;bottom: 0;padding-left: 5px;margin-bottom: 1px;">
9160                            <small>Typing on desktop? <b>Shift + Return</b> to add a new line.</small>
9161                        </p>
9162                    </div>
9163                </div>
9164                
9165                
9166                <div class="members-box" id="members-box">
9167                    <div  class="add-product" style="">
9168                <div class="add-product-header d-flex justify-content-between">
9169                    <div class="cancel-product" onclick="$('#members-box').fadeOut('fast')">Close</div>
9170                    <div class="heading">Add Members</div>
9171                    <div class="product-done" onclick="$('#members-box').fadeOut('fast')">Done</div>
9172                </div>
9173                
9174                <div class="search-product">
9175                   <div class="search-product-title">
9176                    <i class="hgi hgi-stroke hgi-search-01"></i>
9177                    <input type="text" placeholder="Search by name or @username">
9178                   </div>
9179                    
9180                    <div class="added-list">
9181                        <ul>
9182                            
9183                            <!-- <li>
9184                                <img loading="lazy" src="https://cubesnack-seller.s3.amazonaws.com/products/1612250530282918.jpg" style="border-radius:50%" alt="Profile Photo" title="Profile Photo">
9185                                <div class="close-added">&times;</div>
9186                                <p>Autumnwind</p>
9187                            </li> -->
9188                            
9189                        </ul>
9190                    </div>
9191                    
9192                      <div class="product-drop">
9193                       <ul>
9194
9195                            <!-- <li class="d-flex justify-content-between">
9196                                <div class="d-flex align-items-center">
9197                                    
9198                                        <a href="/mattcorr675" class="fig">
9199                                            <div id="online-dot-3860" class=" online-green"></div>
9200                                            <img loading="lazy" src="https://cubesnack-seller.s3.amazonaws.com/products/1612250530282918.jpg" style="border-radius:50%" alt="Profile Photo" title="Profile Photo">
9201                                        </a>
9202                                        <div class="fnc-title">
9203                                            <h4 class="notranslate">
9204                                                <a href="/mattcorr675" class="profile-link">autumnwind</a>
9205                                                <div class="user">@autumnwind</div>
9206
9207                                            </h4>
9208                                            <p style="display:none"><a href="/mattcorr675" class="profile-link">@mattcorr675</a></p>
9209                                                
9210                                        </div>
9211                                    </div>
9212                                
9213                                <div class="add"><a href="#">Add</a></div>
9214                            </li> -->
9215                        
9216                        </ul> 
9217                    </div>
9218                    
9219                    
9220                </div>
9221                
9222            </div>
9223                </div>
9224                
9225                
9226                <div class="members-box" id="guidlines-box">
9227                    <div  class="add-product" style="">
9228                <div class="add-product-header d-flex justify-content-between">
9229                    <div class="cancel-product" onclick="$('#guidlines-box').fadeOut('fast')">Cancel</div>
9230                    <div class="heading">Guidelines</div>
9231                    <div class="product-done" onclick="$('#members-box').fadeOut('fast')">Done</div>
9232                </div>
9233                
9234                <div class="search-product">
9235                      <div class="guidlines-textaea">
9236                          <textarea name="" id="private-guidelines" cols="30" rows="10" autofocus></textarea>
9237                      </div>
9238                    
9239                    
9240                </div>
9241                
9242            </div>
9243                </div>
9244
9245                <!-- Poll section remains exactly the same -->
9246                <div id="create-poll-main-box" style="display:none">
9247                    <div class="create-poll-wrrapper-main">
9248                        <div class="poll-created-by pb-2 pt-0">
9249                            <div class="fnc mt-0 justify-content-between mb-0">
9250                                <div class="d-flex flex1">
9251                                    <div class="fnc-title flex1">
9252                                        <textarea id="pollDescription"
9253                                            oninput="this.style.height = &quot;&quot;;this.style.height = this.scrollHeight + &quot;px&quot;"
9254                                            placeholder="What’s jumping in your head?"></textarea>
9255                                    </div>
9256                                </div>
9257                            </div>
9258                        </div>
9259
9260                        <div class="post-area-inside mb-0">
9261                            <div class="create-poll-option" id="pollOptionsContainer">
9262                                <div class="option">
9263                                    <input type="text" class="poll-option-input" placeholder="Option 1">
9264                                    <button class="delete-option" type="button" style="display: none;">
9265                                        <img src="https://www.jumpspree.com/public/images/trash.png" alt="Delete"
9266                                            title="Delete">
9267                                    </button>
9268                                </div>
9269                                <div class="option">
9270                                    <input type="text" class="poll-option-input" placeholder="Option 2">
9271                                    <button class="delete-option" type="button" style="display: none;">
9272                                        <img src="https://www.jumpspree.com/public/images/trash.png" alt="Delete"
9273                                            title="Delete">
9274                                    </button>
9275                                </div>
9276                                <div class="option add-another-option">
9277                                    <input type="text" id="newPollOptionInput" class="poll-option-input"
9278                                        placeholder="Add more">
9279                                    <button class="delete-option" type="button" style="display: none;">
9280                                        <img src="https://www.jumpspree.com/public/images/trash.png" alt="Delete"
9281                                            title="Delete">
9282                                    </button>
9283                                </div>
9284                            </div>
9285
9286                            <div class="poll-time d-flex justify-content-between">
9287                                <div class="end-poll hide">
9288                                    Ends in <input type="number" id="pollDuration" value="" min="1" max="336">h
9289                                </div>
9290                            </div>
9291
9292                            <div class="poll-ending-time">
9293                                <h3>How long will this poll last? <span class="tooltip-wrapper">i <span
9294                                            class="tooltip-wrapper-inner">
9295                                            Decide how long this poll will last. Once your poll ends, no one will be
9296                                            able to cast votes.</span></span></h3>
9297                                <ul>
9298                                    <li><button class="duration-btn selected">1 day</button></li>
9299                                    <li><button class="duration-btn">3 days</button></li>
9300                                    <li><button class="duration-btn">5 days</button></li>
9301                                    <li><button class="duration-btn">7 days</button></li>
9302                                    <li><button class="duration-btn">14 days</button></li>
9303                                </ul>
9304                            </div>
9305                            <div class="remove-poll"><a href="javascript:void(0)"
9306                                    onclick="$('#create-poll-main-box, #post-footer-for-poll').hide(); $('#post-footer-for-post').show(); $('#add-post-full-container').show();$('#discard-for-poll').hide(); $('#discard-for-post').show();">Remove
9307                                    poll</a>
9308                            </div>
9309                        </div>
9310                    </div>
9311                </div>
9312            </div>
9313            
9314            <!-- Footer sections remain exactly the same -->
9315            <div id="post-footer-for-poll" style="display:none">
9316                <div class="post-foot add-post-foot d-flex justify-content-between">
9317                    <div class="post-setting-box" id="post-setting-box">
9318                        <div id="post-setting-dropup-poll" onclick="window.event.cancelBubble = true;">
9319                            <div style="display: none;" class="post-setting-box-list"><label><span>Create a private group post</span>
9320                                <span><input id="privateCheckbox" type="checkbox"></span></label></div>
9321                               <div class="post-setting-box-list"><label><span>Turn off comments and replies</span>
9322                                <span><input id="commentsOff" type="checkbox"></span></label></div>
9323                            <div class="post-setting-box-list"><label><span>Hide like counts</span> <span><input
9324                                        id="hideLike" type="checkbox"></span></label></div>  
9325                        </div>
9326                        <h3
9327                            onclick="event.stopPropagation(); $(this).parents('.post-setting-box').find('#post-setting-dropup-poll').toggleClass('show-popup')">
9328                            Post settings</h3>
9329                    </div>
9330
9331                    <div class="send-post">
9332                        <div class="character-count-container">
9333                            <span id="char-count-poll">260</span>
9334                            <div class="progress-circle">
9335                                <div class="progress-circle">
9336                                    <svg width="50" height="50">
9337                                        <circle class="bg" cx="25" cy="25" r="22"></circle>
9338                                        <circle class="progress" cx="25" cy="25" r="22"></circle>
9339                                    </svg>
9340                                </div>
9341                            </div>
9342                            <div id="submitPollForm" class="post-btn addPost-form-submit">
9343                                <a href="javascript:void(0)" onclick="" class=""><i style="color:#fff; opacity:0.5"
9344                                        class="hgi hgi-stroke hgi-time-schedule"></i></a>
9345                                <input type="hidden" id="scheduletime" value="">
9346                                <input type="hidden" id="scheduledate" value="">
9347                                <input type="hidden" id="scheduled" value="0">
9348                                <button type="button" id="createPollSubmit" class="blue-bg"><i
9349                                        class="fa-sharp fa-solid fa-paper-plane-top" aria-hidden="true"></i></button>
9350                            </div>
9351                        </div>
9352                    </div>
9353                </div>
9354            </div>
9355
9356            <div id="post-footer-for-post">
9357                <div class="post-foot add-post-foot d-flex justify-content-between">
9358                    <div class="post-setting-box" id="post-setting-box">
9359                        <div id="post-setting-dropup" onclick="window.event.cancelBubble = true;">
9360
9361                            <div style="display: none;" class="post-setting-box-list"><label><span>Create a private group post</span>
9362                                <span><input id="privatepostbtn" type="checkbox"></span></label></div>
9363
9364                               <div class="post-setting-box-list"><label><span>Turn off comments and replies</span>
9365                                <span><input id="commentsOff" type="checkbox"></span></label></div>
9366                            <div class="post-setting-box-list"><label><span>Hide like counts</span> <span><input
9367                                        id="hideLike" type="checkbox"></span></label></div>
9368                        </div>
9369                        <h3
9370                            onclick="event.stopPropagation(); $(this).parents('.post-setting-box').find('#post-setting-dropup').toggleClass('show-popup')">
9371                            Post settings</h3>
9372                    </div>
9373
9374                    <div class="send-post">
9375                        <div class="character-count-container">
9376                            <span id="char-count">260</span>
9377                            <div class="progress-circle">
9378                                <div class="progress-circle">
9379                                    <svg width="50" height="50">
9380                                        <circle class="bg" cx="25" cy="25" r="22"></circle>
9381                                        <circle class="progress" cx="25" cy="25" r="22"></circle>
9382                                    </svg>
9383                                </div>
9384                            </div>
9385                            <div id="submitBtnForm" style="width: 90px;" class="post-btn addPost-form-submit disabled">
9386                                <a href="javascript:void(0)"
9387                                    onclick="$('#social-popup > .add-post-inner').addClass('schedule-box-opened');$('.Schedule-message-wrapper').show();"><i
9388                                        class="hgi hgi-stroke hgi-time-schedule"></i></a>
9389                                <input type="hidden" id="scheduletime" value="">
9390                                <input type="hidden" id="scheduledate" value="">
9391                                <input type="hidden" id="scheduled" value="
93910">
9392                                <button id="addPost-form-submit"><i
9393                                        class="fa-sharp fa-solid fa-paper-plane-top"></i></button>
9394                            </div>
9395                        </div>
9396                    </div>
9397                </div>
9398            </div>
9399        </div>
9400
9401
9402
9403        <!-- add post with repost preview new dec 10 update end -->
9404  
9405
9406        <div class="Schedule-message-wrapper" style="display:none">
9407            <div class="schedule-inner">
9408                <h3>Schedule Post</h3>
9409
9410                <div class="close-popup"
9411                    onclick="$('#social-popup > .add-post-inner').removeClass('schedule-box-opened');$('.Schedule-message-wrapper').hide()">
9412                    <img src="https://www.jumpspree.com/public/images/cross-icon.png" alt="Cross" title="Cross">
9413                </div>
9414
9415                <div class="schedule-message-input">
9416                    <div class="date">
9417                        <input type="text" class="form-control" value="Date" id="datepicker">
9418                        <!--                <i class="fa-light fa-calendar-days"></i>-->
9419                        <img src="https://www.jumpspree.com/public/images/llr.png" alt="Calendar" title="Calendar"
9420                                                    style="width: 20px;position: absolute;top: 50%;left: 11px;
9421                            transform: translateY(-50%);">
9422                        <i class="fa-regular fa-angle-down" aria-hidden="true"></i>
9423                    </div>
9424                    <div class="time">
9425                        <input type="text" class="form-control timepicker" value="Time" id="timepicker">
9426                        <img src="https://www.jumpspree.com/public/images/clock25.png" loading="lazy" alt="Clock"
9427                                                    title="Clock" style="width: 20px;position: absolute;top: 50%;left: 9px;
9428                            transform: translateY(-50%);">
9429                        <i class="fa-regular fa-angle-down" aria-hidden="true"></i>
9430                    </div>
9431                </div>
9432
9433                <div class="schedule-footer d-flex justify-content-end">
9434                    <button type="button" class="btn cancel-Schedule" onclick="handleAddPost(1);">Save to
9435                        drafts</button>
9436                    <button class="btn schedule-message" onclick="schedulePost()">Schedule</button>
9437                </div>
9438
9439            </div>
9440        </div>
9441
9442
9443        <div class="ReSchedule-message-wrapper" id="reschedulediv" style="display:none;">
9444            <div class="schedule-inner">
9445                <h3>Reschedule</h3>
9446
9447                <div class="close-popup"
9448                    onclick="$('#social-popup > .add-post-inner').removeClass('schedule-box-opened');$('#reschedulediv').fadeOut('fast');">
9449                    <img src="https://www.jumpspree.com/public/images/cross-icon.png" alt="Cross" title="Cross">
9450                </div>
9451
9452                <div class="schedule-message-input">
9453                    <div class="date">
9454                        <input type="text" class="form-control" value="Today" id="scheduledatepicker">
9455                        <i class="fa-light fa-calendar-days" aria-hidden="true"></i>
9456                        <i class="fa-regular fa-angle-down" aria-hidden="true"></i>
9457                    </div>
9458                    <div class="time">
9459                        <input type="text" class="form-control " id="scheduletimepicker" value="">
9460                        <i class="fa-regular fa-clock" aria-hidden="true"></i>
9461                        <i class="fa-regular fa-angle-down" aria-hidden="true"></i>
9462                    </div>
9463                </div>
9464
9465                <div class="schedule-footer d-flex justify-content-end">
9466                    <input type="hidden" id="changeschedulepostid" value="0">
9467                    <button type="button" class="btn cancel-Schedule"
9468                        onclick="$('#reschedulediv').fadeOut('fast');">Cancel</button>
9469                    <button class="btn schedule-message" onclick="changeSchedule(this)">Schedule</button>
9470                </div>
9471
9472            </div>
9473        </div>
9474
9475        <div class="discard-conformation" id="unscheduleMyPost" onclick="window.event.cancelBubble = true;">
9476            <div class="save-draft">
9477                <div class="d-flex align-items-center">
9478                    <div class="flex-direction-column">
9479                        <h3>Unschedule</h3>
9480                        <p>Are you sure you want to unschedule this post?</p>
9481                    </div>
9482                </div>
9483                <div class="save-cancel">
9484                    <button class="copy-embed" type="button"
9485                        onclick="$('#unscheduleMyPost').fadeOut('fast')">No</button>
9486                    <input type="hidden" id="unschedulepostid" value="
94860">
9487                    <button class="copy-embed" type="button" id="unschedulebtn" onclick="movetodraft(this)">Yes</button>
9488
9489                </div>
9490            </div>
9491        </div>
9492
9493    </div>
9494
9495
9496</div>
9497
9498
9499<!--comment-popup-new-->
9500<!--
9501<div class="social-popup" data-id="addPostFunctionality" id="comment-popup-new">
9502    <div class="add-post-inner">
9503        <div id="draft-box" onclick="window.event.cancelBubble = true;">
9504            <div class="embed-header">
9505                <div class="d-flex align-items-center mb-0">
9506                    <div class="back-btn">
9507                        <a href="javascript:void(0)"
9508                            onclick="$('#social-popup .add-post-inner').removeClass('draft-open');$('#draft-box').hide()"><img
9509                                src="https://www.jumpspree.com/public/images/arrow-left.png" alt="Arrow" title="Arrow"
9510                                style="filter:invert(0); height: auto; width:13px"></a>
9511                    </div>
9512                    <h3>Drafts</h3>
9513                    <div id="deleteAllDraftBtn" class="close delete-all"><a href="javascript:void(0)"
9514                            onclick="$('#discard-save-draft').show();">Delete All</a></div>
9515                </div>
9516                <div class="draft-switcher">
9517                    <a href="#" id="draft-btn" class="active"
9518                        onclick="$(this).addClass('active');$('#schedued-btn').removeClass('active');$('#draft-container').fadeIn(); $('#schedule-container').hide()">Drafts</a>
9519                    <a href="#" id="schedued-btn" onclick="showScheduler(this)">Scheduled</a>
9520                </div>
9521            </div>
9522            <div class="draft-outer" id="draft-container">
9523                <div class="no-drafts">
9524                    <p id="noDraft">No drafts available</p>
9525                </div>
9526            </div>
9527
9528            <div class="draft-outer" id="schedule-container" style="">
9529                <div class="schedule-list mt-0" id="scheduledPostArticleList">
9530
9531
9532                </div>
9533            </div>
9534
9535
9536        </div>
9537
9538
9539        
9540 
9541        <div class="header-post social-add-header" id="add-post-div">
9542            <div class="d-flex" style="flex-direction:column;">
9543                <div class="popup-top-header d-flex justify-content-between align-items-center">
9544                    <div id="discard-for-post" class="dicard">
9545                        <span class="discard-button" style="cursor:pointer" onclick="handleDiscardAction()">
9546                            <i class="fa-light fa-angle-left"></i> Cancel
9547                        </span>
9548                    </div>
9549                    <div id="discard-for-poll" class="dicard" style="display:none">
9550                        <span style="cursor:pointer" class="discard-button" onclick="handleDiscardPollAction()">Cancel</span>
9551                    </div>
9552                    
9553                    <h2 id="popup-title">Create Post</h2>
9554                    
9555                    
9556                    <div class="draft">
9557                        <a href="javascript:void(0)"
9558                            style="color:#b8b8b8; display: flex;align-items: center;justify-content: center;"
9559                            onclick="$('#social-popup .add-post-inner').addClass('draft-open');$('#draft-box').show();$('#draft-container').show();$('#schedule-container').hide();">
9560                            Drafts
9561                        </a>
9562                    </div>
9563                </div>
9564                
9565                <form id="repost-form" style="display:none;">
9566                    <input type="hidden" id="repostId" name="repostId" value="">
9567                </form>
9568                
9569                <div class="add-post-inside">
9570                    <div class="schedule-done updated-version" id="scheduledone" style="display:none">
9571                        <p id="scheduledfor"
9572                            onclick="$('#social-popup > .add-post-inner').addClass('schedule-box-opened');$('.Schedule-message-wrapper').show();">
9573                        </p>
9574                        <div class="unschedule-close" onclick="$('#unschedule').fadeIn('fast')">&times;</div>
9575                        <div class="action" style="display:none"><a href="javascript:void(0)"
9576                                onclick="$('#social-popup > .add-post-inner').addClass('schedule-box-opened');$('.Schedule-message-wrapper').show();">Change</a>
9577                            <a href="javascript:void(0)" onclick="$('#unschedule').fadeIn('fast')">Unschedule</a>
9578                        </div>
9579                    </div>
9580                    
9581                  
9582                    
9583                    <div class="header-add-post">
9584                        <div class="fnc mt-0 justify-content-between mb-5 align-items-start">
9585                            <div class="d-flex align-items-center">
9586                                <div class="fig">
9587                                    <div id="online-dot-"
9588                                        class="user-online">
9589                                    </div>
9590                                    <img id="currentprofile" src="https://www.jumpspree.com/public/images/user-icon.png?ver:1.023"
9591                                        style="border-radius:50%" alt="Profile Photo" title="Profile Photo">
9592                                </div>
9593
9594                                <div class="fnc-title">
9595                                    <h4 class="currentUser d-flex gap-2 align-items-center">
9596                                        <span class="d-flex">
9597                                            <div style="display:none">
9598                                                Guest User                                                <span class="post-creation-divider">&bull;</span> 
9599                                            </div>
9600                                            <span class="post-creation-username notranslate">
9601                                                @Guest                                            </span>
9602                                        </span>
9603                                                                            </h4>
9604                                    <div class="add-a-topic"><a href="javascript:void(0)"
9605                                            onclick="$('#add-topic-box').show();"><img
9606                                                src="https://www.jumpspree.com/public/images/add-topic.png"
9607                                                style="filter:invert()" alt="Add topic" title="Add topic"> Add a topic
9608                                            <i class="hgi hgi-stroke hgi-arrow-right-01"></i></a></div>
9609                                    <p class="currentUserName" style="display:none">
9610                                        @Guest                                    </p>
9611                                </div>
9612                            </div>
9613
9614                            <div class="drop-down-blog" style="display:none">
9615                                <a class="discard-button" href="javascript:void(0)"
9616                                    onclick="handleDiscardAction()">Discard</a>
9617                            </div>
9618                        </div>
9619                    </div>
9620                    
9621                    <div class="comment-post-text">
9622                        <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Sit dicta assumenda harum, provident beatae incidunt mollitia, asperiores expedita porro eum laborum! Temporibus odit quasi exercitationem sit, ipsa autem ex esse.</p>
9623                    </div>
9624                     
9625                    <div class="header-add-post">
9626                        <div class="fnc mt-0 justify-content-between mb-5 align-items-start">
9627                            <div class="d-flex align-items-center">
9628                                <div class="fig">
9629                                    <div id="online-dot-" class="user-online">
9630                                    </div>
9631                                    <img id="currentprofile" src="https://cubesnack-seller.s3.amazonaws.com/products/0506251028303132.jpg" style="border-radius:50%" alt="Profile Photo" title="Profile Photo">
9632                                </div>
9633
9634                                <div class="fnc-title">
9635                                    <h4 class="currentUser d-flex gap-2 align-items-center">
9636                                        <span class="d-flex">
9637                                            <div style="display:none">
9638                                                autumn wind                                                <span class="post-creation-divider">•</span> 
9639                                            </div>
9640                                            <span class="post-creation-username notranslate">
9641                                                @autumnwind                                            </span>
9642                                        </span>
9643                                                                                <img src="https://www.jumpspree.com/public/images/blue-cube.png" class="blue-cube-icon" alt="Verified Icon" title="Verified Icon">
9644                                                                            </h4>
9645                                    <div class="add-a-topic"><a href="javascript:void(0)" onclick="$('#add-topic-box').show();"><img src="https://www.jumpspree.com/public/images/add-topic.png" style="filter:invert()" alt="Add topic" title="Add topic"> Add a topic
9646                                            <i class="hgi hgi-stroke hgi-arrow-right-01"></i></a></div>
9647                                    <p class="currentUserName" style="display:none">
9648                                        @autumnwind                                    </p>
9649                                </div>
9650                            </div>
9651
9652                            <div class="drop-down-blog" style="display:none">
9653                                <a class="discard-button" href="javascript:void(0)" onclick="handleDiscardAction()">Discard</a>
9654                            </div>
9655                        </div>
9656                    </div> 
9657                    
9658                    <div id="gifModalForAddPost" class="gif-modal">
9659                        <div class="gif-modal-content">
9660                            <input type="text" id="gifSearchForAddPost" placeholder="Search GIFs">
9661                            <button style="opacity: 0;" id="gifSearchBtnForAddPost" class="search-icon-btn">
9662                                <i class="fa fa-search" aria-hidden="true"></i>
9663                            </button>
9664                            <div id="gifResults-outer">
9665                            <div id="gifResultsForAddPost" class="gif-list"></div>
9666                            </div>
9667                        </div>
9668                    </div>
9669                    
9670                    <div id="add-post-full-container">
9671                        <div class="add-post-inside-wrapper">
9672                            <div class="post-area-inside">
9673                                <div id="addPostTextarea" contenteditable="true"
9674                                    data-placeholder="What’s jumping in your head?" oninput="highlightText(this)"></div>
9675                                <div class="mention-popup" id="mention-popup"></div>
9676                                <div id="hashTags-popup" class="hashTags-popup"></div>
9677                            </div>
9678
9679                                <div id="repost-preview-container" style="display:none; margin-bottom: 20px; padding: 15px; background: rgba(255, 255, 255, 0.05); border-radius: 8px; border: 1px solid rgba(255, 255, 255, 0.1);">
9680                                    <div class="repost-preview-header" style="margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between;">
9681                                        <div style="font-size: 12px; color: #8d8c8c;">
9682                                            <i class="fa-solid fa-retweet" style="margin-right: 5px;"></i> Reposting this post
9683                                        </div>
9684                                        <button onclick="clearRepost()" style="background: none; border: none; color: #8d8c8c; cursor: pointer; font-size: 12px; padding: 2px 8px;">
9685                                            <i class="fa-solid fa-xmark"></i> Clear
9686                                        </button>
9687                                    </div>
9688                                    <div class="post-for-repost">
9689                                        <div class="fnc mt-0 justify-content-between mb-3 align-items-start">
9690                                            <div class="d-flex align-items-center">
9691                                                <div class="fig" style="width: 30px; height: 30px;">
9692                                                    <img id="currentpostprofile" src="" alt="Profile" style="border-radius:50%; width: 100%; height: 100%; object-fit: cover;">
9693                                                </div>
9694                                                <div class="fnc-title" style="margin-left: 10px;">
9695                                                    <h4 class="postUser" style="font-size: 14px; margin: 0; color: #fff;"></h4>
9696                                                    <p class="postUserName" style="font-size: 12px; margin: 0; color: #8d8c8c;"></p>
9697                                                </div>
9698                                            </div>
9699                                        </div>
9700                                        <div class="post-data">
9701                                            <p id="repost-preview-content" style="font-size: 14px;
9701 color: #e0e0e0; margin: 0; line-height: 1.4;"></p>
9702                                        </div>
9703                                    </div>
9704                                </div>
9705
9706                            <div class="image-preview-box" id="imagePreviewBox" style="display: none;">
9707                                <button style="display: none;" onclick="closePreview()" class="close-btn">&times;</button>
9708                                <div class="addpostImagePreview swiper mySwiper" id="imageCarousel">
9709                                    <div class="swiper-wrapper"></div>
9710                                    <div class="swiper-pagination"></div>
9711                                </div>
9712                            </div>
9713
9714                            <div class="video-preview-box" id="videoPreviewBox" style="display: none;">
9715                                <div class="video-preview" id="videoPreviewContainer">
9716                                    <div class="close-video-preview" onclick="closeVideoPreview()">&times;</div>
9717                                    <video id="videoPreview" controls>
9718                                        <source id="videoSource" src="" type="video/mp4">
9719                                    </video>
9720                                </div>
9721                            </div>
9722
9723                            <div class="gif-preview-box" id="gifPreviewBox" style="display: none;">
9724                                <div class="gif-preview" id="gifPreviewContainer">
9725                                    <div class="close-gif-preview" onclick="clearGifPreview()">&times;</div>
9726                                    <img id="gifPreviewAddPost" src="" alt="GIF">
9727                                </div>
9728                                <div style="display: none !important;" class="embed-and-alt d-flex">
9729                                    <div class="embed-link"><a href="javascript:void(0)"
9730                                            onclick="window.event.cancelBubble = true; $('#embed-link').addClass('show-embed-link');$('#add-alt-tag').removeClass('embed-in'); $('#add-alt-tag').removeClass('show-add-alt-tag'); $('.drop-down-menu-share').hide(); $('#share-site-link').removeClass('share-in-open');"><img
9731                                                src="https://www.jumpspree.com/public/images/copy-link.png"
9732                                                alt="Copy Link" title="Copy Link"> Embed
9733                                            link</a></div>
9734                                    <div class="add-alt-text"><a href="javascript:void(0)"
9735                                            onclick="window.event.cancelBubble = true; $('#add-alt-tag').addClass('show-add-alt-tag'); $('.drop-down-menu-share').hide(); $('#share-site-link').removeClass('share-in-open');$('#embed-link').removeClass('embed-in'); $('#embed-link').removeClass('show-embed-link');"><img
9736                                                src="https://www.jumpspree.com/public/images/alt.png" alt="Add alt text"
9737                                                title="Add alt text"> Add alt text</a>
9738                                    </div>
9739                                </div>
9740                            </div>
9741                        </div>
9742
9743                        
9744                        
9745
9746                        
9747
9748                        
9749                        <p class="typingondesktio" style="margin: 0;
9750                                text-align: left;
9751                                width: 100%;
9752                                font-size: 12px;
9753                                color: #8d8c8c;
9754                            margin-top: 0;position: static;bottom: 0;padding-left: 5px;margin-bottom: 1px;">
9755                            <small>Typing on desktop? <b>Shift + Return</b> to add a new line.</small>
9756                        </p>
9757                    </div>
9758                </div>
9759                
9760                
9761                
9762                
9763                
9764
9765                <div id="create-poll-main-box" style="display:none">
9766                    <div class="create-poll-wrrapper-main">
9767                        <div class="poll-created-by pb-2 pt-0">
9768                            <div class="fnc mt-0 justify-content-between mb-0">
9769                                <div class="d-flex flex1">
9770                                    <div class="fnc-title flex1">
9771                                        <textarea id="pollDescription"
9772                                            oninput="this.style.height = &quot;&quot;;this.style.height = this.scrollHeight + &quot;px&quot;"
9773                                            placeholder="What’s jumping in your head?"></textarea>
9774                                    </div>
9775                                </div>
9776                            </div>
9777                        </div>
9778
9779                        <div class="post-area-inside mb-0">
9780                            <div class="create-poll-option" id="pollOptionsContainer">
9781                                <div class="option">
9782                                    <input type="text" class="poll-option-input" placeholder="Option 1">
9783                                    <button class="delete-option" type="button" style="display: none;">
9784                                        <img src="https://www.jumpspree.com/public/images/trash.png" alt="Delete"
9785                                            title="Delete">
9786                                    </button>
9787                                </div>
9788                                <div class="option">
9789                                    <input type="text" class="poll-option-input" placeholder="Option 2">
9790                                    <button class="delete-option" type="button" style="display: none;">
9791                                        <img src="https://www.jumpspree.com/public/images/trash.png" alt="Delete"
9792                                            title="Delete">
9793                                    </button>
9794                                </div>
9795                                <div class="option add-another-option">
9796                                    <input type="text" id="newPollOptionInput" class="poll-option-input"
9797                                        placeholder="Add more">
9798                                    <button class="delete-option" type="button" style="display: none;">
9799                                        <img src="https://www.jumpspree.com/public/images/trash.png" alt="Delete"
9800                                            title="Delete">
9801                                    </button>
9802                                </div>
9803                            </div>
9804
9805                            <div class="poll-time d-flex justify-content-between">
9806                                <div class="end-poll hide">
9807                                    Ends in <input type="number" id="pollDuration" value="" min="1" max="336">h
9808                                </div>
9809                            </div>
9810
9811                            <div class="poll-ending-time">
9812                                <h3>How long will this poll last? <span class="tooltip-wrapper">i <span
9813                                            class="tooltip-wrapper-inner">
9814                                            Decide how long this poll will last. Once your poll ends, no one will be
9815                                            able to cast votes.</span></span></h3>
9816                                <ul>
9817                                    <li><button class="duration-btn selected">1 day</button></li>
9818                                    <li><button class="duration-btn">3 days</button></li>
9819                                    <li><button class="duration-btn">5 days</button></li>
9820                                    <li><button class="duration-btn">7 days</button></li>
9821                                    <li><button class="duration-btn">14 days</button></li>
9822                                </ul>
9823                            </div>
9824                            <div class="remove-poll"><a href="javascript:void(0)"
9825                                    onclick="$('#create-poll-main-box, #post-footer-for-poll').hide(); $('#post-footer-for-post').show(); $('#add-post-full-container').show();$('#discard-for-poll').hide(); $('#discard-for-post').show();">Remove
9826                                    poll</a>
9827                            </div>
9828                        </div>
9829                    </div>
9830                </div>
9831            </div>
9832            
9833            <div id="post-footer-for-poll" style="display:none">
9834                <div class="post-foot add-post-foot d-flex justify-content-between">
9835                    <div class="post-setting-box" id="post-setting-box">
9836                        
9837                        
9838                    </div>
9839
9840                    <div class="send-post">
9841                        <div class="character-count-container">
9842                            <span id="char-count-poll">260</span>
9843                            <div class="progress-circle">
9844                                <div class="progress-circle">
9845                                    <svg width="50" height="50">
9846                                        <circle class="bg" cx="25" cy="25" r="22"></circle>
9847                                        <circle class="progress" cx="25" cy="25" r="22"></circle>
9848                                    </svg>
9849                                </div>
9850                            </div>
9851                            <div id="submitPollForm" class="post-btn addPost-form-submit">
9852                                <a href="javascript:void(0)" onclick="" class=""><i style="color:#fff; opacity:0.5"
9853                                        class="hgi hgi-stroke hgi-time-schedule"></i></a>
9854                                <input type="hidden" id="scheduletime" value="">
9855                                <input type="hidden" id="scheduledate" value="">
9856                                <input type="hidden" id="scheduled" value="0">
9857                                <button type="button" id="createPollSubmit" class="blue-bg"><i
9858                                        class="fa-sharp fa-solid fa-paper-plane-top" aria-hidden="true"></i></button>
9859                            </div>
9860                        </div>
9861                    </div>
9862                </div>
9863            </div>
9864
9865            <div id="post-footer-for-post">
9866                <div class="post-foot add-post-foot d-flex justify-content-between">
9867                   
9868
9869                    <div class="send-post">
9870                        <div class="character-count-container">
9871                            <span id="char-count">260</span>
9872                            <div class="progress-circle">
9873                                <div class="progress-circle">
9874                                    <svg width="50" height="50">
9875                                        <circle class="bg" cx="25" cy="25" r="22"></circle>
9876                                        <circle class="progress" cx="25" cy="25" r="22"></circle>
9877                                    </svg>
9878                                </div>
9879                            </div>
9880                            <div id="submitBtnForm" style="width: 90px;" class="post-btn addPost-form-submit disabled">
9881                                <a href="javascript:void(0)"
9882                                    onclick="$('#social-popup > .add-post-inner').addClass('schedule-box-opened');$('.Schedule-message-wrapper').show();"><i
9883                                        class="hgi hgi-stroke hgi-time-schedule"></i></a>
9884                                <input type="hidden" id="scheduletime" value="">
9885                                <input type="hidden" id="scheduledate" value="">
9886                                <input type="hidden" id="scheduled" value="0">
9887                                <button id="addPost-form-submit"><i
9888                                        class="fa-sharp fa-solid fa-paper-plane-top"></i></button>
9889                            </div>
9890                        </div>
9891                    </div>
9892                </div>
9893            </div>
9894        </div>
9895
9896
9897
9898  
9899
9900        
9901
9902        
9903
9904        
9905
9906    </div>
9907
9908
9909</div>
9910-->
9911
9912
9913<style>
9914div#daily-post-limit-wrapper {
9915    position: fixed;
9916    background: #0000007a;
9917    z-index: 999999;
9918    height: 100vh;
9919    left: 0;
9920    right: 0;
9921    bottom: 0;
9922    top: 0;
9923        
9924}
9925.daily-limit-box {
9926    background: #2b2b2b;
9927    border: 1px solid #494949;
9928    margin: 0 78px 20px;
9929    border-radius: 45px;
9930    color: #999;
9931    padding: 28px;
9932    font-size: 12px;
9933    max-width: 450px;
9934    left: 50%;
9935    position: absolute;
9936    top: 50%;
9937    width: 450px;
9938    transform: translate(-50%, -50%);
9939}
9940.daily-limit-box{
9941    margin: 0 !important;
9942    
9943}
9944.daily-limit-box p {
9945    font-size: 13px;
9946    line-height: 17px;
9947    color: #ccc;
9948}
9949.daily-limit-box button {
9950    width: 100%;
9951    border: none;
9952    border-radius: 35px;
9953    padding: 14px 0;
9954    font-weight: 600;
9955    font-size: 14px;
9956}    
9957button.close-btn {
9958    background: #555;
9959    color: #fff;
9960    margin-top: 10px;
9961}
9962.plusicon img {
9963    width: 50px;
9964}    
9965.plusicon {
9966    margin-bottom: 20px;
9967}
9968#daily-post-limit-wrapper h3 {
9969    color: #fff;
9970    margin-bottom: 10px;
9971    font-size: 25px;
9972}   
9973</style>
9974<div id="daily-post-limit-wrapper" style="display:none">
9975        <div class="daily-limit-box"> 
9976            <div class="plusicon">
9977                    <img src="https://www.centrrl.com/public/web1901-assets/images/daily-post.png" alt="">
9978            </div>
9979            <h3>Daily posting limit</h3>
9980            <p>To maintain a high-quality public square and help prevent spam and abuse, new accounts are limited to 3 posts per day during their first 14 days. Accounts demonstrating authentic participation may have this limit removed sooner, while limits may remain in place for low-quality activity. You can remove posting restrictions permanently by getting your account verified with Centrrl+ Enhanced anytime.</p>
9981            
9982            <button type="button" class="upgrade-btn" onclick="window.location.href='https://www.jumpspree.com/jumpspree-more'">Upgrade</button>
9983            <button type="button" class="close-btn" onclick="$('#daily-post-limit-wrapper').fadeOut('fast')">Close</button>
9984        </div>
9985    </div>
9986
9987<!--
9988<div class="social-popup" id="launch">
9989    <div class="add-post-inner">
9990        <div class="live-soon">
9991            <div class="live-now-head">
9992                <img src="https://www.jumpspree.com/public/images/live-now.gif" alt="Jumpspree">
9993            </div>
9994            <div class="live-now-heading">
9995                <h3>Welcome to the all new <br>
9995Jumpspree web platform</h3>
9996            </div>
9997            <div class="live-now-body">
9998                <p>On 01/25, after months of tireless effort from our team, we’re excited to publicly launch the
9999                    Jumpspree web platform!</p>
10000                <p>As you explore the platform, please note that not all features from the Jumpspree app are currently
10001                    available on the web. Our team is working diligently to enhance the platform and will be rolling out
10002                    new features and functionalities in the coming weeks to ensure a seamless experience.</p>
10003                <p>We hope you enjoy the new web experience! If you have any feedback, feel free to send us a DM
10004                    @Jumpspree. We’d love to hear from you!</p>
10005
10006                <button type="button">Try it</button>
10007            </div>
10008        </div>
10009
10010    </div>
10011</div>
10012-->
10013
10014
10015<!--
10016<div class="get-app-qr-code-wrapper" id="getstart-popup" style="display: none;"> 
10017    <div class="email-verification after-login">
10018       <div class="close-getstart" onclick="$('#getstart-popup').fadeOut('fast');">&times;</div>
10019        <div class="email-box">
10020          <div class="getstart-icon">
10021                <img src="https://www.jumpspree.com/public/images/mob-icon.png" alt="Jumpspree">
10022           </div>
10023            <h4 class="text-center">Jumpspree works best <br>in the app.</h4>
10024
10025
10026            
10027
10028            
10029
10030            <div class="note-line">
10031                <p class="mb-0">Enjoy a premium experience with advanced <br>features and even more exciting content on <br>the Jumpspree app.</p>
10032            </div>
10033
10034           <div class="download-btn">
10035               <a  class="get-app-btn" href="javascript:void(0)" onclick="$('#getstart-popup').fadeOut('fast');$('#ios-app').fadeIn('fast')"><img src="https://www.jumpspree.com/public/images/ios-download.png" alt="Jumpspree"></a>
10036                <a  href="javascript:void(0)" onclick="$('#getstart-popup').fadeOut('fast');$('#android-app').fadeIn('fast')"><img src="https://www.jumpspree.com/public/images/download-android.png" alt="Jumpspree"></a>
10037            </div>
10038
10039
10040
10041        </div>
10042      
10043    </div>
10044</div>
10045-->
10046
10047
10048<div class="social-popup" id="activity">
10049    <div class="add-post-inner">
10050        <h3>Activity</h3>
10051        <div class="activity-wrapper">
10052            <div class="follow-inner">
10053                <div class="d-flex justify-content-between align-items-center fnc">
10054                    <div class="d-flex" style="flex-direction:column">
10055                        <div class="d-flex">
10056                            <div class="user-image">
10057                                <a href="https://www.jumpspree.com/Jumpspree" target="_blank">
10058                                    <img src="https://cubesnack-seller.s3.amazonaws.com/products/1109250220132879.jpg"
10059                                        alt="logo" title="logo">
10060                                    <span class="heart"><img
10061                                            src="https://www.jumpspree.com/public/images/pink-heart.png" alt="Like"
10062                                            title="Like"></span>
10063                                </a>
10064                            </div>
10065
10066
10067
10068                            <div class="user-name fnc-title">
10069
10070                                <h2><a href="#">Jumpspree
10071                                        <img src="https://www.jumpspree.com/public/images/blue-cube.png"
10072                                            class="blue-cube-icon" alt="Verified Icon" title="Verified Icon">
10073                                    </a></h2>
10074                                <p>@Jumpspree</p>
10075
10076
10077
10078                            </div>
10079                        </div>
10080                    </div>
10081
10082
10083
10084                    <div class="follow-btn"><a href="javascript:void(0)" id="rec2635">Follow</a></div>
10085
10086
10087
10088
10089
10090
10091
10092
10093
10094                </div>
10095            </div>
10096
10097            <div class="follow-inner">
10098                <div class="d-flex justify-content-between align-items-center fnc">
10099                    <div class="d-flex" style="flex-direction:column">
10100                        <div class="d-flex">
10101                            <div class="user-image">
10102                                <a href="https://www.jumpspree.com/Jumpspree" target="_blank">
10103                                    <img src="https://cubesnack-seller.s3.amazonaws.com/products/1109250220132879.jpg"
10104                                        alt="logo" title="logo">
10105                                    <span class="heart"><img src="https://www.jumpspree.com/public/images/talk.png"
10106                                            alt="Talk" title="Talk"></span>
10107                                </a>
10108                            </div>
10109
10110
10111
10112                            <div class="user-name fnc-title">
10113
10114                                <h2><a href="#">Pat Brown
10115                                        <img src="https://www.jumpspree.com/public/images/blue-cube.png"
10116                                            class="blue-cube-icon" alt="Verified Icon" title="Verified Icon">
10117                                    </a></h2>
10118                                <p>@patbrown</p>
10119
10120
10121
10122                            </div>
10123                        </div>
10124                    </div>
10125
10126
10127
10128                    <div class="follow-btn"><a href="javascript:void(0)" id="rec2635">Follow</a></div>
10129
10130
10131
10132
10133
10134
10135
10136
10137
10138                </div>
10139            </div>
10140        </div>
10141    </div>
10142</div>
10143
10144
10145<script>
10146var selectedImageFiles = []; // For image input
10147var imageIndex = 0; // Global index to maintain unique IDs across uploads
10148
10149function deleteOwnPostPoll(el, postId, feedType = 'post') {
10150    console.log("deleteOwnPostPoll :   " + feedType);
10151
10152
10153    $('#dpbtn').data('id', postId).data('feed', 1);
10154
10155    // Set the confirmation message
10156    document.getElementById('delete-confirmation-text').innerText = `Are you sure you want to delete this ${feedType}?`;
10157
10158    // ✅ Set cancel button text based on feed type
10159    const cancelBtn = document.getElementById('deleteCancleBtn');
10160    cancelBtn.innerText = feedType === 'poll' ? 'Keep it' : 'Cancel';
10161
10162    // Show modal
10163    $('#dp-confirmation').fadeIn('fast');
10164    $('.social-shadow').show();
10165    $('body').addClass('overflow-hidden');
10166}
10167
10168function socialFeedDeletePost(el, postId, feedType = 'post') {
10169    console.log("socialFeedDeletePost____________" + feedType);
10170
10171
10172    $('#dpbtn').data('id', postId).data('feed', 1);
10173
10174    // Set the confirmation message
10175    document.getElementById('delete-confirmation-text').innerText = `Are you sure you want to delete this ${feedType}?`;
10176
10177    // ✅ Set cancel button text based on feed type
10178    const cancelBtn = document.getElementById('deleteCancleBtn');
10179    cancelBtn.innerText = feedType === 'poll' ? 'Keep it' : 'Cancel';
10180
10181    // Show modal
10182    $('#dp-confirmation').fadeIn('fast');
10183    $('.social-shadow').show();
10184    $('body').addClass('overflow-hidden');
10185}
10186
10187
10188function deleteUserPost() {
10189    const postId = $('#dpbtn').data('id');
10190    const feed = $('#dpbtn').data('feed');
10191    const $btn = $('#dpbtn');
10192    const originalHTML = $btn.html();
10193
10194    $.ajax({
10195        url: base_url + '/deleteUserPost',
10196        type: 'POST',
10197        data: {
10198            postId: postId
10199        },
10200        dataType: "json",
10201        beforeSend: function() {
10202            $btn.html('<span class="jloader"></span>');
10203        },
10204        success: function(response) {
10205            const msg = response.message;
10206
10207            $('#dp-confirmation').fadeOut('fast');
10208            $('body').removeClass('overflow-hidden');
10209            $btn.html('Delete');
10210            if (response.status) {
10211                showNotification('success', msg);
10212                if (feed == '1') {
10213                    $('.dp' + postId).fadeOut('fast');
10214                } else {
10215                    window.location.href = base_url + 'social';
10216                }
10217            } else {
10218                showNotification('error', msg);
10219                $btn.html(originalHTML); // ✅ Restore button text on failure
10220            }
10221        },
10222        error: function() {
10223            $('#dp-confirmation').fadeOut('fast');
10224            $btn.html(originalHTML); // ✅ Restore on AJAX error
10225        }
10226    });
10227}
10228
10229
10230document.addEventListener('DOMContentLoaded', function() {
10231    const textarea = document.getElementById('altTextInput');
10232    const counter = document.getElementById('altTextLiveCounter');
10233    const saveBtn = document.getElementById('saveAltTextButton');
10234
10235    function updateUI() {
10236        const length = textarea.value.length;
10237
10238        // Clamp text if too long
10239        if (length > 1000) {
10240            textarea.value = textarea.value.slice(0, 1000);
10241        }
10242
10243        const currentLength = textarea.value.length;
10244        counter.textContent = `${currentLength}/1000`;
10245
10246        const isEnabled = currentLength > 0 && currentLength <= 1000;
10247
10248        saveBtn.disabled = !isEnabled;
10249
10250        // Toggle classes
10251        saveBtn.classList.toggle('buttonEnabled', isEnabled);
10252        saveBtn.classList.toggle('buttonDisabled', !isEnabled);
10253    }
10254
10255    textarea.addEventListener('input', updateUI);
10256
10257    // Initial state on page load
10258    updateUI();
10259});
10260//end counter    
10261$('#social-popup .add-post-inner').click(function() {
10262    $('#post-setting-dropup').removeClass('show-popup');
10263})
10264
10265
10266
10267
10268
10269// new May 26 poll added in draft 
10270function appendDrafts(drafts) {
10271
10272    const previewBox2 = document.getElementById('imagePreviewBox');
10273    if (previewBox2) {
10274        previewBox2.style.display = 'none';
10275    }
10276
10277    const draftContainer = $('#draft-container');
10278    draftContainer.empty();
10279    drafts = drafts.filter(d => d.is_blog != "1"); // ❌ Exclude article drafts (is_blog == "1")
10280    console.log("appendDrafts called with drafts:", drafts);
10281
10282    drafts.forEach((draft, index) => {
10283        const postText = draft.postText || draft.postTitle || "";
10284        const postDate = draft.pdate || "N/A";
10285        const postTime = draft.ptime || "N/A";
10286        const postId = draft.postId || "N/A";
10287        const postorpoll = draft.is_blog == 2 ? 'classpoll' : 'classpost';
10288
10289        const draftHtml = `
10290            <div id="draftDiv-${postId}" class="drafts ${postorpoll}" data-index="${index}">
10291                <div class="poll-head-pop">
10292                    <label class="${postorpoll}">Poll</label>
10293                    <p id="draftCTextClick-${postId}" class="draftPostText">${postText}</p>
10294                </div>
10295                
10296                ${draft.postFiles && draft.postFiles.length > 0 ? appendMedia(draft.postFiles) : ''}
10297
10298                <div class="draftPostText-and-del d-flex justify-content-between">
10299                    <p class="draftDateTime">
10300                        <span>${postDate}</span>
10301                        <span> &bull; </span>
10302                        <span>${postTime}</span>
10303                    </p> 
10304                    <p onclick="window.event.cancelBubble = true; deleteAllDraftsSingle('${postId}')" class="delete-draft">
10305                        <a href="#"><i class="hgi hgi-stroke hgi-delete-02"></i></a>
10306                    </p> 
10307                </div>
10308            </div>
10309        `;
10310        draftContainer.append(draftHtml);
10311    });
10312
10313    function appendMedia(postMedia) {
10314
10315        if (!postMedia) {
10316            return '';
10317        }
10318
10319        const count = postMedia.length;
10320
10321        if (count === 0) {
10322            return '';
10323        }
10324
10325        let div = '';
10326        const id = Math.floor(100000 + Math.random() * 900000);
10327
10328        if (count > 1) {
10329
10330            div = `<div class="swiper mySwiper">
10331                            <div class="swiper-wrapper mtw-images Vertical">
10332
10333                                ${postMedia.map((img) => `
10334                                    <div class="swiper-slide">
10335                                        <a href="javascript:void(0);">
10336                                            <img width="300" height="300" loading="lazy" src="${img.imagepath}" alt="Post Image">
10337                                        </a>
10338                                    </div>
10339
10340                                `).join('')}
10341    
10342                            </div>
10343                            <div class="swiper-pagination"></div>
10344                        </div>`;
10345        } else {
10346
10347            if(Number(postMedia[0].type) === 2){
10348
10349                div = `
10350                        <div class="single-image">
10351                            <video autoplay muted playsinline controls width="640" height="360">
10352                                <source src="javascript:void(0);" type="video/mp4">
10353                                Your browser does not support the video tag.
10354                            </video>
10355                        </div>
10356                    `;
10357        
10358
10359            }else{
10360                div = `
10361                        <div class="single-image">
10362                            <a href="javascript:void(0);">
10363                                <img width="300" height="300" loading="lazy" src="${postMedia[0].imagepath}" alt="Post Image" title="">
10364                            </a>
10365                        </div>
10366                    `;
10367            }   
10368
10369        }
10370
10371        return `<div class="draft-media-div">${div}</div>`;
10372    }
10373
10374    // $('.addpostImagePreview').owlCarousel({
10375    //     loop: false,
10376    //     margin: 10,
10377    //     nav: false,
10378    //     dots: true,
10379    //     autoplay: false,
10380    //     responsive: {
10381    //         0: { items: 1 },
10382    //         600: { items: 1 },
10383    //         1000: { items: 1 },
10384    //     },
10385    // });
10386
10387    draftContainer.off('click', '.drafts');
10388
10389
10390    draftContainer.on('click', '.drafts', function() {
10391        const index = $(this).data('index');
10392        const selectedDraft = drafts[index];
10393
10394        if (selectedDraft.is_blog == 2) {
10395            // Show poll UI
10396            $('#create-poll-main-box').show();
10397            $('#add-post-full-container').hide(); // Hide post UI
10398            $('#post-footer-for-post').hide();
10399            $('#post-footer-for-poll').show();
10400            $('#discard-for-post').hide();
10401            $('#discard-for-poll').show();
10402
10403            // Prefill poll description
10404            $('#pollDescription').val(decodeHTMLEntities(selectedDraft.postTitle || selectedDraft.postText));
10405
10406            // Clear old poll options
10407            // Clear all previous poll options (except the add button)
10408            $('#pollOptionsContainer .option').not('.add-another-option').remove();
10409
10410
10411            // Set poll duration button
10412            const poll_duration = selectedDraft.poll_duration || 1440;
10413            const days = Math.round(poll_duration / 1440);
10414            const validDurations = [1, 3, 5, 7, 14];
10415            const selectedDay = validDurations.includes(days) ? days : 1;
10416
10417            $('.duration-btn').removeClass('selected');
10418            $('.duration-btn').each(function() {
10419                if ($(this).text().includes(`${selectedDay} day`)) {
10420                    $(this).addClass('selected');
10421                }
10422            });
10423
10424            // Append poll options (or 2 default empty ones if none exist)
10425            const pollOptions = selectedDraft.poll_options || [];
10426
10427            if (pollOptions.length > 0) {
10428                pollOptions.forEach((opt, idx) => {
10429                    const optionHTML = `
10430                        <div class="option">
10431                            <input type="text" class="poll-option-input" value="${opt.option || ''}" placeholder="Option ${idx + 1}">
10432                            <button class="delete-option" type="button" style="display: none;">
10433                                <img src="https://www.jumpspree.com/public/images/trash.png" alt="Delete" title="Delete">
10434                            </button>
10435                        </div>
10436                    `;
10437                    $('.add-another-option').before(optionHTML);
10438                });
10439            } else {
10440                for (let i = 0; i < 2; i++) {
10441                    const optionHTML = `
10442                        <div class="option">
10443                            <input type="text" class="poll-option-input" placeholder="Option ${i + 1}">
10444                            <button class="delete-option" type="button" style="display: none;">
10445                                <img src="https://www.jumpspree.com/public/images/trash.png" alt="Delete" title="Delete">
10446                            </button>
10447                        </div>
10448                    `;
10449                    $('.add-another-option').before(optionHTML);
10450                }
10451            }
10452
10453            // Set post type
10454            $('#postType').val('poll');
10455
10456            // ✅ Validate poll and toggle button
10457            validatePollSubmission();
10458
10459        } else {
10460            // Show post UI
10461            $('#add-post-full-container').show();
10462            $('#create-poll-main-box').hide();
10463            $('#post-footer-for-post').show();
10464            $('#post-footer-for-poll').hide();
10465            $('#discard-for-post').show();
10466            $('#discard-for-poll').hide();
10467
10468            // $('#postTextArea').val(selectedDraft.postText || '');
10469            $('#addPostTextarea').html(decodeHTMLEntities(selectedDraft.postText || ''));
10470
10471            $('#postType').val('post');
10472
10473            // Textarea default check
10474            if ($('#addPostTextarea').text().trim() !== '') {
10475                $('.addPost-form-submit').removeClass('disabled').addClass('active');
10476            } else {
10477                $('.addPost-form-submit').addClass('disabled').removeClass('active');
10478            }
10479
10480            // Event listener for post textarea
10481            $('#addPostTextarea').on('input', function() {
10482                const hasText = $(this).val().trim() !== '';
10483                const hasImage = $('#imageInput-repost')[0].files.length > 0;
10484                const hasVideo = $('#videoInput-repost')[0].files.length > 0;
10485                const hasGif = $('#gifPreviewBox').is(':visible') && $('#gifPreviewAddPost').attr(
10486                'src');
10487
10488                if (hasText || hasImage || hasVideo || hasGif) {
10489                    $('.addPost-form-submit').removeClass('disabled').addClass('active');
10490                } else {
10491                    $('.addPost-form-submit').addClass('disabled').removeClass('active');
10492                }
10493            });
10494
10495            // Handle media preview
10496            const files = selectedDraft.postFiles || [];
10497            // const imageCarousel = $('.addpostImagePreview');
10498            const imageCarousel = $('#imageCarousel');
10499
10500            const previewBox = $('#imagePreviewBox');
10501
10502            $('#videoSource').attr('src', '');
10503            $('#videoPreviewBox').hide();
10504            $('#gifPreviewAddPost').attr('src', '');
10505            $('#gifPreviewBox').hide();
10506
10507            // imageCarousel.trigger('destroy.owl.carousel');
10508            // imageCarousel.empty();
10509
10510            if (swiperInstance && imageCarousel.hasClass('swiper-loaded')) {
10511                imageCarousel.removeClass('swiper-loaded');
10512                swiperInstance.removeAllSlides();
10513                swiperInstance.slideTo(0, 0);
10514                swiperInstance.update();
10515            }
10516
10517
10518            previewBox.hide();
10519
10520            if (files.length > 0) {
10521                files.forEach((file, index) => {
10522                    if (file.type === '1') {
10523
10524                        selectedImageFiles.push({ index, file });
10525
10526                        const imageItem = `
10527                            <div id="image-preview-${index}" class="swiper-slide item" data-index="${index}">
10528                                <button onclick="closeThisImg(this)" class="close-btn closeThisImg"><svg viewBox="0 0 24 24" aria-hidden="true" class="r-4qtqp9 r-yyyyoo r-dnmrzs r-bnwqim r-lrvibr r-m6rgpd r-1hjwoze r-12ym1je" style="color: rgb(255, 255, 255);margin: 0;filter: invert(1);"><g><path d="M10.59 12L4.54 5.96l1.42-1.42L12 10.59l6.04-6.05 1.42 1.42L13.41 12l6.05 6.04-1.42 1.42L12 13.41l-6.04 6.05-1.42-1.42L10.59 12z"></path></g></svg></button>
10529
10530                                <img class="multi-image-wrapper" src="${file.imagepath}" alt="${file.alttext || 'Uploaded Image'}" style="width: 100%; height: auto;"
10531                                    data-embeded-link="${file.link || ''}" data-alt="${file.alttext || ''}" />
10532                                <div class="embed-and-alt d-flex mt-3">
10533                                    <div class="embed-link">
10534                                        <a href="javascript:void(0)" onclick="openEmbedLinkPopup(event, ${index})">
10535                                            <i class="hgi hgi-stroke hgi-link-05"></i>
10536                                        </a>
10537                                    </div>
10538                                    <div class="add-alt-text">
10539                                        <a href="javascript:void(0)" onclick="openAltTextPopup(event, ${index})">
10540                                             <span class="alt-icon">Alt</span>
10541                                        </a>
10542                                    </div>
10543                                </div>
10544                            </div>`;
10545                        // imageCarousel.append(imageItem);
10546                        swiperInstance.appendSlide(imageItem);
10547
10548                    } else if (file.type == '2') {
10549                        $('#videoSource').attr('src', file.imagepath);
10550                        const videoElement = $('#videoPreview')[0];
10551                        videoElement.load();
10552                        videoElement.play();
10553                        $('#videoPreviewBox').show();
10554                    } else if (file.type == '3') {
10555                        $('#gifPreviewAddPost').attr('src', file.imagepath);
10556                        $('#gifPreviewBox').show();
10557                    }
10558                });
10559
10560                setTimeout(() => {
10561                    const imgFilesCount = files.filter(file => file.type === '1').length;
10562                    if (imgFilesCount > 1) {
10563                        // imageCarousel.addClass('owl-carousel owl-theme');
10564                        // imageCarousel.owlCarousel({
10565                        //     loop: false,
10566                        //     margin: 10,
10567                        //     nav: false,
10568                        //     dots: true,
10569                        //     autoplay: false,
10570                        //     responsive: {
10571                        //         0: { items: 1 },
10572                        //         600: { items: 1 },
10573                        //         1000: { items: 1 },
10574                        //     },
10575                        // });
10576
10577                        imageCarousel.addClass('swiper-loaded');
10578                        swiperInstance.update();
10579
10580                    } else {
10581                        $('.addpostImagePreview').removeClass('owl-carousel owl-theme');
10582                        $('#imagePreviewBox').addClass('single-image-preview');
10583                    }
10584
10585                    if(imgFilesCount > 0) {
10586                        modfiyImgCountClass(imgFilesCount);
10587                        imageIndex = imgFilesCount+1;
10588                    } 
10589
10590                    previewBox.show();
10591                }, 500);
10592            }
10593        }
10594
10595        $('#draft-box').hide();
10596        $('#social-popup .add-post-inner').removeClass('draft-open');
10597    });
10598
10599
10600
10601    // submitBtnForm
10602    // ✅ Poll validation function
10603
10604
10605    // ✅ Attach real-time validation for poll input fields
10606    $('#pollDescription').on('input', validatePollSubmission);
10607    $('#pollOptionsContainer').on('input', '.poll-option-input', validatePollSubmission);
10608
10609
10610
10611}
10612
10613//for article  
10614
10615function appendArticleDrafts(drafts) {
10616    console.log(drafts);
10617    const previewBox2 = document.getElementById('imagePreviewBox');
10618    if (previewBox2) {
10619        previewBox2.style.display = 'none';
10620    }
10621
10622    const draftContainer = $('#draft-container-article');
10623    draftContainer.empty();
10624
10625    // Check if drafts array is empty
10626    if (!drafts || drafts.length === 0) {
10627        draftContainer.html(`
10628            <div class="no-drafts-article">
10629                <p>No drafts available</p>
10630            </div>
10631        `);
10632        return; // Exit early
10633    }
10634
10635
10636    drafts.forEach((draft, index) => {
10637        const postText = draft.postTitle || "N/A";
10638        const postDate = draft.pdate || "N/A";
10639        const postTime = draft.ptime || "N/A";
10640        const postId = draft.postId || "N/A";
10641        const postorpoll = draft.is_blog == 2 ? 'classpoll' : 'classpost';
10642
10643        const draftHtml = `
10644            <div id="draftDiv-${postId}" class="drafts ${postorpoll}" data-index="${index}">
10645                <div class="poll-head-pop">
10646                    <label class="${postorpoll}">${draft.is_blog == 2 ? 'Poll' : 'Article'}</label>
10647                    <p id="draftCTextClick-${postId}" class="draftPostText">${postText}</p>
10648                </div>
10649                <div class="draftPostText-and-del d-flex justify-content-between">
10650                    <p class="draftDateTime">
10651                        <span>${postDate}</span>
10652                        <span> &bull; </span>
10653                        <span>${postTime}</span>
10654                    </p> 
10655                    <p onclick="window.event.cancelBubble = true; deleteAllDraftsSingle('${postId}')" class="delete-draft">
10656                        <a href="#"><i class="hgi hgi-stroke hgi-delete-02"></i></a>
10657                    </p> 
10658                </div>
10659            </div>
10660        `;
10661        draftContainer.append(draftHtml);
10662    });
10663
10664    draftContainer.off('click', '.drafts');
10665
10666    draftContainer.on('click', '.drafts', function() {
10667        const index = $(this).data('index');
10668        const selectedDraft = drafts[index];
10669
10670        // Reset form first
10671        $('#article-title').val('');
10672        $('#article-image').val('');
10673        // $('#image-preview').hide().empty();
10674        articleImageFile = null;
10675        hashtags = [];
10676        mentionedUsers = [];
10677        $('#hashtag-list').empty();
10678        $('#mention-list').empty();
10679        $('#hashtags-container').empty();
10680        $('#mentions-container').empty();
10681        $('#article-content-preview').empty();
10682        $('#scheduled_date').val('');
10683        $('#scheduled_time').val('');
10684        $('#scheduleBox').hide();
10685        // $('#imageInfo').hide(); // hide image imageInfo when image was bind 
10686
10687
10688        $('.write-your-article').hide();
10689        // Set title
10690        $('#article-title').val(selectedDraft.postTitle || '');
10691
10692        // Set content in Quill editor
10693        if (selectedDraft.postText) {
10694            if (quillInstance) {
10695                quillInstance.root.innerHTML = selectedDraft.postText;
10696            }
10697            // Also set in preview
10698            $('#article-content-preview').html(selectedDraft.postText);
10699            $('#article-preview').show();
10700        }
10701
10702        // Set image if available
10703        if (selectedDraft.postFiles && selectedDraft.postFiles.length > 0) {
10704            const imgFile = selectedDraft.postFiles.find(f => f.type == '1');
10705            if (imgFile) {
10706
10707
10708                $('#preview-img').attr('src', imgFile.imagepath);
10709                $('#image-preview').show();
10710                $('#imageInfo').hide();
10711                // Set up remove image button
10712                /* $('#remove-image-btn').on('click', function(e) {
10713                    e.preventDefault(); 
10714                    $('#imageInfo').show(); 
10715                    $('#image-preview').hide().empty();
10716                    $('#article-image').val('');
10717                    articleImageFile = null;
10718                }); */
10719            }
10720        }
10721
10722        // Restore hashtags
10723        if (selectedDraft.hashtags) {
10724            hashtags = selectedDraft.hashtags.split(' ').filter(tag => tag.trim() !== '');
10725            hashtags.forEach((tag, index) => {
10726                if (tag.startsWith('#')) {
10727                    tag = tag.substring(1);
10728                }
10729                $('#hashtags-container').append(`
10730                    <span class="tag tag-hashtag">
10731                        #${tag}
10732                        <span class="remove-tag" onclick="removeHashtag(${index})">&times;</span>
10733                    </span>
10734                `);
10735            });
10736        }
10737
10738        // Restore mentions
10739        if (selectedDraft.mentions) {
10740            mentionedUsers = selectedDraft.mentions.split('@')
10741                .map(user => user.trim())
10742                .filter(user => user !== '');
10743
10744            mentionedUsers.forEach((user, index) => {
10745                $('#mentions-container').append(`
10746                    <span class="tag tag-mention">
10747                        @${user}
10748                        <span class="remove-tag" onclick="removeMention(${index})">&times;</span>
10749                    </span>
10750                `);
10751            });
10752        }
10753
10754        // Restore scheduled date/time if available
10755        if (selectedDraft.scheduledate && selectedDraft.scheduletime) {
10756            $('#scheduled_date').val(selectedDraft.scheduledate);
10757            $('#scheduled_time').val(selectedDraft.scheduletime);
10758
10759            // Format and show the schedule box
10760            const formattedDate = new Date(`${selectedDraft.scheduledate} ${selectedDraft.scheduletime}`)
10761                .toLocaleString();
10762            $('#scheduledText').text(`Scheduled for ${formattedDate}`);
10763            $('#scheduleBox').show();
10764        }
10765
10766        // Show the article form and hide other views
10767        $('.draftListPopup').hide();
10768        $('#add-post-full-container').hide();
10769        $('#create-poll-main-box').hide();
10770        $('#article-box').show();
10771
10772        // Show the post actions
10773        $('#post-actions').show();
10774
10775        // Update title counter
10776        $('#title-counter').text(`${selectedDraft.postTitle ? selectedDraft.postTitle.length : 0}/100`);
10777    });
10778}
10779
10780
10781
10782function validatePollSubmission() {
10783    const descFilled = $('#pollDescription').val().trim() !== '';
10784    const filledOptions = $('#pollOptionsContainer .poll-option-input').filter(function() {
10785        return $(this).val().trim() !== '';
10786    }).length;
10787
10788    if (descFilled && filledOptions >= 2) {
10789        $('#submitBtnForm').removeClass('disabled').addClass('active');
10790        $('#submitPollForm').removeClass('disabled').addClass('active');
10791        $('#createPollSubmit').removeClass('disabled').addClass('activated');
10792    } else {
10793        $('#submitBtnForm').addClass('disabled').removeClass('active');
10794        $('#submitPollForm').addClass('disabled').removeClass('active');
10795        $('#createPollSubmit').addClass('disabled').removeClass('activated');
10796    }
10797}
10798
10799
10800
10801// new on jun 24
10802function getAllMyDrafts() {
10803    const deleteAllDraftBtn = document.getElementById('deleteAllDraftBtn');
10804
10805    $.ajax({
10806        url: base_url + '/getAllDraftByToken',
10807        type: 'GET',
10808        dataType: "Json",
10809        success: function(response) {
10810            $('#loader').hide();
10811            setTimeout(() => {
10812                $('#skeleton-container').hide(); // Hide skeleton loader after 2 seconds
10813            }, 2000);
10814
10815            if (response.status) {
10816                const drafts = response.draftArray || [];
10817
10818                const articleDrafts = drafts.filter(d => d.is_blog == "1");
10819                const otherDrafts = drafts.filter(d => d.is_blog != "1");
10820
10821                if (drafts.length > 0) {
10822                    deleteAllDraftBtn.style.display = 'block';
10823
10824                    if (articleDrafts.length > 0) {
10825                        appendArticleDrafts(articleDrafts);
10826                    } else {
10827                        $('#draft-container-article').html(`
10828                            <div class="no-drafts-article">
10829                                <p>No drafts available</p>
10830                            </div>
10831                        `);
10832                    }
10833
10834                    if (otherDrafts.length > 0) {
10835                        appendDrafts(otherDrafts);
10836                    } else {
10837                        $('#draft-container').html(`
10838                            <div class="no-drafts-post">
10839                                <p>No drafts available</p>
10840                            </div>
10841                        `);
10842                    }
10843                } else {
10844                    deleteAllDraftBtn.style.display = 'none';
10845
10846                    // No drafts at all
10847                    $('#draft-container-article').html(`
10848                        <div class="no-drafts-article">
10849                            <p>No drafts available</p>
10850                        </div>
10851                    `);
10852                    $('#draft-container').html(`
10853                        <div class="no-drafts-post">
10854                            <p>No drafts available</p>
10855                        </div>
10856                    `);
10857                }
10858
10859            } else {
10860                // Handle failed status if needed
10861            }
10862        },
10863        error: function(xhr, status, error) {
10864            $('#loader').hide();
10865            console.error("Error fetching drafts:", error);
10866        }
10867    });
10868}
10869
10870
10871
10872
10873
10874var swiperInstance = null;
10875document.addEventListener('DOMContentLoaded', function() {
10876    swiperInstance = new Swiper("#imageCarousel", {
10877        slidesPerView: 'auto',
10878        spaceBetween: 15,
10879        freeMode: true,
10880        pagination: {
10881            el: ".swiper-pagination",
10882            clickable: true,
10883        },
10884        breakpoints: {
10885            // When window width is <= 767px (mobile)
10886            0: {
10887                spaceBetween: 10,
10888            }
10889        }
10890    });
10891});
10892
10893
10894$(document).ready(function() {
10895
10896    // BOOT: defer getAllDraftByToken until after feed renders — 2026-05-15
10897    // ROLLBACK: replace the line below with: getAllMyDrafts();
10898    window.JumpSocialBoot ? window.JumpSocialBoot.defer(getAllMyDrafts, 'medium') : getAllMyDrafts();
10899
10900    let isCarouselInitialized = false;
10901    let imageDetails = [];
10902
10903
10904    $('#imageInput').on('change', function(event) {
10905        const files = event.target.files;
10906        const imageCarousel = $('#imageCarousel');
10907        const previewBox = $('#imagePreviewBox');
10908
10909        clearPreviews(true);
10910
10911        if (files.length > 0) {
10912            $('.addPost-form-submit')
10913                .removeClass('disabled')
10914                .addClass('active');
10915
10916
10917            Array.from(files).forEach((file) => {
10918                const reader = new FileReader();
10919                reader.onload = function(e) {
10920                    const originalDataUrl = e.target.result;
10921
10922                    function renderPreview(compressedFile, previewSrc) {
10923                        const currentIndex = imageIndex++;
10924                        selectedImageFiles.push({ index: currentIndex, file: compressedFile });
10925                        const imageItem = `
10926                            <div id="image-preview-${currentIndex}" class="swiper-slide item" data-index="${currentIndex}">
10927                                <button onclick="closeThisImg(this)" class="close-btn closeThisImg"><svg viewBox="0 0 24 24" aria-hidden="true" class="r-4qtqp9 r-yyyyoo r-dnmrzs r-bnwqim r-lrvibr r-m6rgpd r-1hjwoze r-12ym1je" style="color: rgb(255, 255, 255);margin: 0;filter: invert(1);"><g><path d="M10.59 12L4.54 5.96l1.42-1.42L12 10.59l6.04-6.05 1.42 1.42L13.41 12l6.05 6.04-1.42 1.42L12 13.41l-6.04 6.05-1.42-1.42L10.59 12z"></path></g></svg></button>
10928                                <img id="preview-img-${currentIndex}" class="multi-image-wrapper" src="${previewSrc}" alt="Uploaded Image" style="width: 100%; height: auto;"
10929                                    data-embeded-link="" data-alt
10929="Jumpspree" />
10930                                <div class="embed-and-alt d-flex mt-3">
10931                                    <div class="embed-link">
10932                                        <a href="javascript:void(0)" onclick="openEmbedLinkPopup(event, ${currentIndex})">
10933                                            <i class="hgi hgi-stroke hgi-link-05"></i>
10934                                        </a>
10935                                    </div>
10936                                    <div class="add-alt-text">
10937                                        <a href="javascript:void(0)" onclick="openAltTextPopup(event, ${currentIndex})">
10938                                            <span class="alt-icon">Alt</span>
10939                                        </a>
10940                                    </div>
10941                                </div>
10942                            </div>`;
10943                        swiperInstance.appendSlide(imageItem);
10944                    }
10945
10946                    // GIFs skip compression (canvas would strip animation)
10947                    if (file.type === 'image/gif') {
10948                        renderPreview(file, originalDataUrl);
10949                        return;
10950                    }
10951
10952                    // Compress via canvas: resize to max 1920px, export as JPEG 82% quality
10953                    const img = new Image();
10954                    img.onload = function() {
10955                        const MAX = 1920;
10956                        let w = img.width, h = img.height;
10957                        if (w > MAX) { h = Math.round(h * MAX / w); w = MAX; }
10958                        if (h > MAX) { w = Math.round(w * MAX / h); h = MAX; }
10959                        const canvas = document.createElement('canvas');
10960                        canvas.width = w;
10961                        canvas.height = h;
10962                        canvas.getContext('2d').drawImage(img, 0, 0, w, h);
10963                        canvas.toBlob(function(blob) {
10964                            const compressed = new File(
10965                                [blob],
10966                                file.name.replace(/\.[^.]+$/, '.jpg'),
10967                                { type: 'image/jpeg', lastModified: Date.now() }
10968                            );
10969                            renderPreview(compressed, URL.createObjectURL(compressed));
10970                        }, 'image/jpeg', 0.82);
10971                    };
10972                    img.src = originalDataUrl;
10973                };
10974                reader.readAsDataURL(file);
10975            });
10976
10977            // Show the preview box after a slight delay to ensure layout renders
10978            setTimeout(() => {
10979                previewBox.show();
10980                imageCarousel.addClass('swiper-loaded');
10981                swiperInstance.update();
10982                modfiyImgCountClass(selectedImageFiles.length);
10983                // imageCarousel.trigger('refresh.owl.carousel');
10984            }, 300);
10985        } else {
10986            $('.addPost-form-submit')
10987                .addClass('disabled')
10988                .removeClass('active');
10989        }
10990    });
10991
10992
10993});
10994
10995function closeThisImg(btn) {
10996    const $slide = $(btn).closest('.swiper-slide.item');
10997    const index = $slide.attr('data-index');
10998
10999    selectedImageFiles = selectedImageFiles.filter(f => Number(f.index) !== Number(index));
11000    console.log(selectedImageFiles);
11001
11002    $('#image-preview-' + index).remove();
11003
11004    const count = $('#imageCarousel .swiper-wrapper').children('div').length;
11005    modfiyImgCountClass(count);
11006
11007    if (count === 0) {
11008        closePreview();
11009    }else{
11010        setTimeout(() => {
11011            swiperInstance.update();
11012        }, 300);
11013    }
11014} 
11015
11016function modfiyImgCountClass(count){
11017    const div = $('#imageCarousel .swiper-wrapper');
11018
11019    div.removeClass('singleImage-added');
11020    div.removeClass('double-imageadded');
11021    div.removeClass('multiple-imageadded');
11022
11023    if(count === 1){
11024        div.addClass('singleImage-added');
11025    }else if(count === 2){
11026        div.addClass('double-imageadded');
11027    }else if(count > 2){
11028        div.addClass('multiple-imageadded');
11029    }
11030}
11031
11032function checkButtonEnableDisabled() {
11033    // Check media + text status
11034    // let postText = $('#addPostTextarea').val().trim();
11035    let postText = $('#addPostTextarea').text().trim();
11036    const imageInput = document.getElementById('imageInput');
11037    const videoInput = document.getElementById('videoInput');
11038    const gifBox = document.getElementById('gifPreviewBox');
11039    const gifPreview = document.getElementById('gifPreviewAddPost');
11040
11041    const hasImage = imageInput && imageInput.files.length > 0;
11042    const hasVideo = $('#videoSource').attr('src')?.trim() !== '';
11043    //const hasVideo = videoInput && videoInput.files.length > 0;
11044    const hasGif = gifBox && gifBox.style.display !== 'none' && gifPreview && gifPreview.getAttribute('src');
11045
11046    const shouldEnable = postText.length > 0 || hasImage || hasVideo || hasGif;
11047
11048    console.log("cleared: postText =", postText);
11049    console.log("hasImage:", hasImage, "| hasVideo:", hasVideo, "| hasGif:", hasGif);
11050    console.log("Button should be enabled after clearing?", shouldEnable);
11051
11052    if (shouldEnable) {
11053        $('.addPost-form-submit').removeClass('disabled').addClass('active');
11054    } else {
11055        $('.addPost-form-submit').removeClass('active').addClass('disabled');
11056    }
11057}
11058
11059
11060// Define the function in the global scope
11061function closePreview_old_17Jun() {
11062    const imageCarousel = document.getElementById('imageCarousel'); // Carousel container
11063    const previewBox = document.getElementById('imagePreviewBox'); // Preview box
11064    const fileInput = document.getElementById('imageInput'); // File input
11065
11066    console.log("Close button clicked");
11067
11068
11069    // Clear the carousel content
11070    if (imageCarousel) {
11071        imageCarousel.innerHTML = ''; // Clear all items
11072    }
11073
11074    // Hide the preview box
11075    if (previewBox) {
11076        previewBox.style.display = 'none'; // Hide the preview box
11077    }
11078
11079    // Reset the file input
11080    if (fileInput) {
11081        fileInput.value = ''; // Reset the input
11082    }
11083    //clearAllImageSources(); try on 17 jun 
11084    checkButtonEnableDisabled();
11085
11086}
11087
11088function closePreview() {
11089    const $imageCarousel = $('#imageCarousel');
11090    const previewBox = document.getElementById('imagePreviewBox');
11091    const fileInput = document.getElementById('imageInput');
11092
11093    console.log("Close button clicked");
11094
11095    // Destroy Owl Carousel properly before clearing
11096    if ($imageCarousel.hasClass('owl-loaded')) {
11097        $imageCarousel.trigger('destroy.owl.carousel');
11098        $imageCarousel.removeClass('owl-loaded owl-carousel owl-theme');
11099        $imageCarousel.find('.owl-stage-outer').children().unwrap(); // unwrap inner structure
11100        $imageCarousel.html(''); // Clear all items
11101    }
11102
11103    if (swiperInstance && $imageCarousel.hasClass('swiper-loaded')) {
11104        $imageCarousel.removeClass('swiper-loaded');
11105        swiperInstance.removeAllSlides();
11106        swiperInstance.slideTo(0, 0); // move back to first slide
11107        swiperInstance.update();
11108    }
11109
11110    // Hide preview box
11111    if (previewBox) {
11112        previewBox.style.display = 'none';
11113    }
11114
11115    // Reset input
11116    if (fileInput) {
11117        fileInput.value = '';
11118    }
11119
11120    checkButtonEnableDisabled();
11121}
11122
11123
11124
11125//for repost
11126// Define the function in the global scope
11127function closePreviewRepost() {
11128    const imageCarousel = document.getElementById('imageCarousel-repost'); // Carousel container
11129    const previewBox = document.getElementById('imagePreviewBox-repost'); // Preview box
11130    const fileInput = document.getElementById('imageInput-repost'); // File input
11131
11132    console.log("Close button clicked");
11133
11134    // Clear the carousel content
11135    if (imageCarousel) {
11136        imageCarousel.innerHTML = ''; // Clear all items
11137    }
11138
11139    // Hide the preview box
11140    if (previewBox) {
11141        previewBox.style.display = 'none'; // Hide the preview box
11142    }
11143
11144    // Reset the file input
11145    if (fileInput) {
11146        fileInput.value = ''; // Reset the input
11147    }
11148}
11149
11150
11151function openEmbedLinkPopup(event, index) {
11152    console.log();
11153    $('#social-popup > .add-post-inner').addClass('embedlink-box-opened');
11154    event.stopPropagation();
11155
11156    const embedLinkValue = $(`#preview-img-${index}`).attr('data-embeded-link') || '';
11157    const $popup = $(event.currentTarget).closest('.social-popup').find('#embed-link');
11158    const $input = $popup.find('#embedInput');
11159    const $saveButton = $popup.find('#saveEmbedButton'); // make sure you have this button ID in your HTML
11160
11161    $input.val(embedLinkValue);
11162    $popup.data('index', index).addClass('show-embed-link');
11163    $('#add-alt-tag').removeClass('show-add-alt-tag');
11164
11165    const urlRegex = /^(https?:\/\/|www\.)[^\s/$.?#].[^\s]*$/i;
11166
11167    // Initial button state
11168    toggleEmbedButtonState($input.val(), $saveButton, urlRegex);
11169
11170    // Remove existing event listener if needed to avoid duplication
11171    $input.off('input');
11172
11173    $input.on('input', function() {
11174        const value = this.value.trim();
11175        if (!urlRegex.test(value)) {
11176            setError(this, "Please enter a valid URL");
11177        } else {
11178            clearError(this);
11179        }
11180        toggleEmbedButtonState(value, $saveButton, urlRegex);
11181    });
11182}
11183
11184// Helper to toggle Save button state & classes
11185function toggleEmbedButtonState(value, $button, regex) {
11186    const isValid = regex.test(value);
11187
11188    $button.prop('disabled', !isValid);
11189    $button.toggleClass('buttonEnabled', isValid);
11190    $button.toggleClass('buttonDisabled', !isValid);
11191}
11192
11193
11194
11195// Function to open Alt Text popup
11196function openAltTextPopup(event, index) {
11197    $('#social-popup > .add-post-inner').addClass('alttag-box-opened');
11198    const embedTextValue = $(`#preview-img-${index}`).attr('data-alt') || '';
11199
11200    $('#altTextInput').val(embedTextValue);
11201    event.stopPropagation(); // Prevent click event from propagating
11202    $('#add-alt-tag').data('index', index); // Store the image index
11203
11204    //$('#add-alt-tag').addClass('show-add-alt-tag');
11205    $(event.currentTarget).closest('.social-popup').find('#add-alt-tag').addClass('show-add-alt-tag');
11206    $('#embed-link').removeClass('show-embed-link'); // Close the Embed Link popup if it's open
11207
11208}
11209
11210// Function to close Embed Link and Alt Text popups
11211function closePopup(event) {
11212    event.stopPropagation(); // Prevent click event from propagating
11213
11214    // Find the closest social-popup and remove active classes
11215    $(event.currentTarget).closest('.social-popup').find('#embed-link, #add-alt-tag').removeClass(
11216        'show-embed-link show-add-alt-tag');
11217}
11218
11219
11220
11221// Function to save Embed Link
11222$('#saveEmbedButton').on('click', function() {
11223    $('#social-popup > .add-post-inner').removeClass('embedlink-box-opened');
11224    $('#social-popup > .add-post-inner').removeClass('alttag-box-opened');
11225    const index = $('#embed-link').data('index'); // Get the index of the image
11226    const enteredUrl = $('#embedInput').val(); // Get the entered embed link
11227
11228    // Validate the URL before saving it
11229    if (isValidUrl(enteredUrl)) {
11230        console.log(`Embed link for image ${index}: ${enteredUrl}`);
11231
11232        // Find the image element using the index and update its data-embeded-link attribute
11233        const imageItem = $('#imageCarousel').find(`.item[data-index="${index}"] img`);
11234        imageItem.attr('data-embeded-link', enteredUrl); // Set the embed link
11235        //$('#embedInput').val(enteredUrl);
11236        $('#embed-link').removeClass('show-embed-link');
11237        showNotification('success', 'Link added!');
11238    } else {
11239        //alert('Please enter a valid URL for embedding.');
11240        showNotification('error', 'Please enter a valid URL.');
11241    }
11242});
11243
11244// Function to save Alt Text
11245$('#saveAltTextButton').on('click', function() {
11246    $('#social-popup > .add-post-inner').removeClass('embedlink-box-opened');
11247    $('#social-popup > .add-post-inner').removeClass('alttag-box-opened');
11248    const index = $('#add-alt-tag').data('index'); // Get the index of the image
11249    const altText = $('#altTextInput').val(); // Get the entered alt text
11250
11251    if (altText !== '') {
11252        console.log(`Alt text for image ${index}: ${altText}`);
11253
11254        // Find the image element using the index and update its data-alt attribute
11255        const imageItem = $('#imageCarousel').find(`.item[data-index="${index}"] img`);
11256        imageItem.attr('data-alt', altText); // Set the alt text
11257        $('#altTextInput').val(altText);
11258        showNotification('success', 'Alt text added!');
11259
11260        setTimeout(() => {
11261            $('#add-alt-tag').removeClass('show-add-alt-tag');
11262        }, 500);
11263
11264        // Close the Alt Text popup
11265        //$('#add-alt-tag').removeClass('show-add-alt-tag');
11266    } else {
11267        //alert('Please enter alt text.');
11268        showNotification('error', 'Please enter alt text');
11269    }
11270
11271});
11272
11273// Function to save Embed Link
11274function saveEmbedLink(button) {
11275
11276    const popupSelector = $(button).closest('.social-popup'); // Find the nearest popup
11277    const index = popupSelector.data('index'); // Get the index of the image
11278    const enteredUrl = popupSelector.find('.embed-input').val(); // Get the entered embed link
11279
11280    if (isValidUrl(enteredUrl)) {
11281        console.log(`Embed link for image ${index}: ${enteredUrl}`);
11282
11283        // Find the image element using the index and update its data-embeded-link attribute
11284        const imageItem = $(`.item[data-index="${index}"] img`);
11285        imageItem.attr('data-embeded-link', enteredUrl);
11286
11287        popupSelector.removeClass('show-embed-link'); // Hide popup
11288        showNotification('success', 'Link added!');
11289    } else {
11290        showNotification('error', 'Please enter a valid URL.');
11291    }
11292}
11293
11294// Function to save Alt Text
11295/* function saveAltText(button) {
11296    const popupSelector = $(button).closest('.social-popup'); // Find the nearest popup
11297    const index = popupSelector.data('index'); // Get the index of the image
11298    const altText = popupSelector.find('.alt-text-input').val(); // Get the entered alt text
11299
11300    if (altText !== '') {
11301        console.log(`Alt text for image ${index}: ${altText}`);
11302
11303        // Find the image element using the index and update its data-alt attribute
11304        const imageItem = $(`.item[data-index="${index}"] img`);
11305        imageItem.attr('data-alt', altText); 
11306
11307        showNotification('success', 'Alt text added!');
11308        
11309        setTimeout(() => {
11310            popupSelector.removeClass('show-add-alt-tag'); // Hide popup after delay
11311        }, 500);
11312    } else {
11313        showNotification('error', 'Please enter alt text');
11314    }
11315} */
11316function saveAltText(event) {
11317    event.stopPropagation(); // Stop bubbling
11318
11319    const popup = event.currentTarget.closest('#add-alt-tag');
11320    if (!popup) {
11321        console.error('Popup not found!');
11322        return;
11323    }
11324
11325    const index = popup.getAttribute('data-index'); // Get the image index
11326    const altTextInput = popup.querySelector('#altTextInput');
11327
11328    if (!altTextInput) {
11329        console.error('Alt Text Input not found!');
11330        return;
11331    }
11332
11333    const altText = altTextInput.value.trim();
11334
11335    if (altText !== '') {
11336        console.log(`Alt text for image ${index}: ${altText}`);
11337
11338        // Find and update the correct image attribute
11339        const imageItem = document.querySelector(`#imageCarousel .item[data-index="${index}"] img`);
11340        if (imageItem) {
11341            imageItem.setAttribute('data-alt', altText);
11342        } else {
11343            console.error('Image not found!');
11344        }
11345
11346        // Show success notification
11347        showNotification('success', 'Alt text added!');
11348
11349        // Close the popup after 500ms
11350        setTimeout(() => {
11351            popup.classList.remove('show-add-alt-tag');
11352        }, 500);
11353    } else {
11354        showNotification('error', 'Please enter alt text');
11355    }
11356
11357
11358}
11359
11360
11361// Attach event listeners using event delegation
11362$(document).on('click', '#saveEmbedButton', function() {
11363    saveEmbedLink(this);
11364});
11365
11366$(document).on('click', '#saveAltTextButton', function() {
11367    saveAltText(this);
11368});
11369//try to save alt in repost by class ID 
11370$(document).on('click', '.save-alt-text', function(event) {
11371    const popup = $(event.currentTarget).closest('#add-alt-tag');
11372    const index = popup.data('index'); // Get the image index
11373    const altText = popup.find('#altTextInput').val().trim(); // Get input value
11374
11375    if (altText !== '') {
11376        console.log(`Alt text for image ${index}: ${altText}`);
11377
11378        // Find and update the correct image attribute
11379        const imageItem = $('#imageCarousel').find(`.item[data-index="${index}"] img`);
11380        imageItem.attr('data-alt', altText);
11381
11382        // Show success notification
11383        showNotification('success', 'Alt text added!');
11384
11385        // Close the popup after 500ms
11386        setTimeout(() => {
11387            popup.removeClass('show-add-alt-tag');
11388        }, 500);
11389    } else {
11390        showNotification('error', 'Please enter alt text');
11391    }
11392});
11393
11394// Function to check if URL is valid
11395function isValidUrl(url) {
11396    const urlRegex = /^(https?:\/\/|www\.)[^\s/$.?#].[^\s]*$/i;
11397    return urlRegex.test(url);
11398}
11399
11400// Function to set error message
11401function setError(inputElement, message) {
11402    $(inputElement).addClass('error');
11403    $(inputElement).next('.error-message').text(message).show();
11404}
11405
11406// Function to clear error message
11407function clearError(inputElement) {
11408    $(inputElement).removeClass('error');
11409    $(inputElement).next('.error-message').hide();
11410}
11411
11412// Close Popups
11413$('.close').on('click', function() {
11414    $('#embed-link').removeClass('show-embed-link');
11415    $('#add-alt-tag').removeClass('show-add-alt-tag');
11416    $('#social-popup > .add-post-inner').removeClass('embedlink-box-opened');
11417    $('#social-popup > .add-post-inner').removeClass('alttag-box-opened');
11418});
11419
11420
11421
11422
11423 
11424
11425var isNewPost = false;
11426
11427function closeVideoPreview() {
11428    clearPreviews();
11429    const videoElement = document.getElementById('videoPreview');
11430    if (videoElement) {
11431        videoElement.pause(); // Pause the video
11432        videoElement.currentTime = 0; // Reset the playback to the beginning (optional)
11433    }
11434    $('#videoPreviewBox').hide(); // Hide the video preview box
11435}
11436 
11437
11438function clearAllImageSources() {
11439    const images = document.querySelectorAll('[id^="image-preview-"] img');
11440    images.forEach((img) => {
11441        img.src = ''; // Reset src for each image
11442    });
11443}
11444
11445// Clear all previews and reset states
11446function clearPreviews_old() {
11447    // Clear images
11448    $('#imageCarousel').empty().removeClass('owl-carousel owl-theme').trigger('destroy.owl.carousel');
11449    $('#imagePreviewBox').hide();
11450
11451
11452    //let postText = $('#addPostTextarea').val();
11453    let postText = $('#addPostTextarea').text();
11454    console.log("cleared 2634 : = " + postText);
11455    if (postText) {
11456        $('.addPost-form-submit')
11457            .removeClass('disabled')
11458            .addClass('active');
11459    } else {
11460        $('.addPost-form-submit')
11461            .removeClass('disabled')
11462            .addClass('active');
11463    }
11464
11465    // Clear video
11466    const videoElement = $('#videoPreview')[0];
11467    $('#videoSource').attr('src', '');
11468    if (videoElement) {
11469        videoElement.pause();
11470        videoElement.load();
11471    }
11472    $('#videoPreviewBox').hide();
11473
11474    // Clear GIF
11475    $('#gifPreviewBox').hide();
11476    $('#gifPreviewAddPost').attr('src', '');
11477}
11478
11479// 30 april
11480function clearPreviews(appendImage=false) {
11481    // Clear images
11482
11483    if(!appendImage){
11484        const imgCar = $('#imageCarousel');
11485        if (imgCar.hasClass('owl-loaded')) {
11486            $('#imageCarousel').empty().removeClass('owl-carousel owl-theme').trigger('destroy.owl.carousel');
11487        }
11488    
11489        if (imgCar.hasClass('swiper-loaded') && swiperInstance) {
11490            imgCar.removeClass('swiper-loaded');
11491            swiperInstance.removeAllSlides();
11492            swiperInstance.slideTo(0, 0);
11493            swiperInstance.update();
11494        }
11495
11496        selectedImageFiles.length = 0;
11497        $('#imagePreviewBox').hide();
11498    }
11499
11500    // Clear video
11501    const videoElement = $('#videoPreview')[0];
11502    $('#videoSource').attr('src', '');
11503    if (videoElement) {
11504        videoElement.pause();
11505        videoElement.load();
11506    }
11507    $('#videoPreviewBox').hide();
11508
11509    // Clear GIF
11510    $('#gifPreviewBox').hide();
11511    $('#gifPreviewAddPost').attr('src', '');
11512
11513    // Check media + text status
11514    //let postText = $('#addPostTextarea').val().trim();
11515    let postText = $('#addPostTextarea').text().trim();
11516    const imageInput = document.getElementById('imageInput');
11517    const videoInput = document.getElementById('videoInput');
11518    const gifBox = document.getElementById('gifPreviewBox');
11519    const gifPreview = document.getElementById('gifPreviewAddPost');
11520
11521    const hasImage = imageInput && imageInput.files.length > 0;
11522    const hasVideo = $('#videoSource').attr('src')?.trim() !== '';
11523    //const hasVideo = videoInput && videoInput.files.length > 0;
11524    const hasGif = gifBox && gifBox.style.display !== 'none' && gifPreview && gifPreview.getAttribute('src');
11525
11526    const shouldEnable = postText.length > 0 || hasImage || hasVideo || hasGif;
11527
11528    console.log("cleared: postText =", postText);
11529    console.log("hasImage:", hasImage, "| hasVideo:", hasVideo, "| hasGif:", hasGif);
11530    console.log("Button should be enabled after clearing?", shouldEnable);
11531
11532    if (shouldEnable) {
11533        $('.addPost-form-submit').removeClass('disabled').addClass('active');
11534    } else {
11535        $('.addPost-form-submit').removeClass('active').addClass('disabled');
11536    }
11537}
11538
11539function clearGifPreview() {
11540    $('#gifPreviewBox').hide();
11541    $('#gifPreviewAddPost').attr('src', '');
11542
11543    // Check if any content exists to keep the button active
11544    //const postText = $('#addPostTextarea').val().trim();
11545    const postText = $('#addPostTextarea').text().trim();
11546    const hasImage = $('#imageInput-repost')[0]?.files.length > 0;
11547    const hasVideo = $('#videoSource').attr('src')?.trim() !== '';
11548    const hasGif = $('#gifPreviewBox').is(':visible') && $('#gifPreviewAddPost').attr('src')?.trim() !== '';
11549
11550    const shouldEnable = postText.length > 0 || hasImage || hasVideo || hasGif;
11551
11552    if (shouldEnable) {
11553        $('.addPost-form-submit').removeClass('disabled').addClass('active');
11554    } else {
11555        $('.addPost-form-submit').removeClass('active').addClass('disabled');
11556    }
11557}
11558
11559
11560$('#videoInput').on('change', function(e) {
11561    clearPreviews();
11562    clearAllImageSources();
11563    const file = e.target.files[0];
11564    if (file && file.type.startsWith('video/')) {
11565        // Reset image and GIF
11566
11567
11568        $('#gifPreviewBox').hide();
11569        $('#gifPreviewAddPost').attr('src', '');
11570        const reader = new FileReader();
11571        reader.onload = function() {
11572            $('#videoSource').attr('src', reader.result);
11573            const videoElement = $('#videoPreview')[0]; // Get the video element
11574            videoElement.load(); // Reload the video source
11575            videoElement.play(); // Optionally play the video
11576            $('#videoPreviewBox').show();
11577
11578
11579
11580            //30 april 
11581            // Check for media/text and enable button if needed
11582            //const postText = $('#addPostTextarea').val().trim();
11583            const postText = $('#addPostTextarea').text().trim();
11584            const hasImage = $('#imageInput-repost')[0]?.files.length > 0;
11585            const hasVideo = $('#videoSource').attr('src')?.trim() !== '';
11586            const hasGif = $('#gifPreviewBox').is(':visible') && $('#gifPreviewAddPost').attr('src')
11587            ?.trim() !== '';
11588            const shouldEnable = postText.length > 0 || hasImage || hasVideo || hasGif;
11589
11590            if (shouldEnable) {
11591                $('.addPost-form-submit').removeClass('disabled').addClass('active');
11592            } else {
11593                $('.addPost-form-submit').removeClass('active').addClass('disabled');
11594            }
11595
11596        };
11597        reader.readAsDataURL(file);
11598    }
11599});
11600
11601//for re-post 
11602$('#videoInput-repost').on('change', function(e) {
11603    console.log("yeah, repost vdo clicked ");
11604    //clearPreviews(); 
11605    //clearAllImageSources();
11606    const file = e.target.files[0];
11607    if (file && file.type.startsWith('video/')) {
11608        // Reset image and GIF 
11609        $('#gifPreviewBox').hide();
11610        $('#gifPreviewAddPost').attr('src', '');
11611        const reader = new FileReader();
11612        reader.onload = function() {
11613            $('#repost-videoSource').attr('src', reader.result);
11614            const videoElement = $('#repost-videoPreview')[0]; // Get the video element
11615            videoElement.load(); // Reload the video source
11616            videoElement.play(); // Optionally play the video
11617            $('#repost-videoPreviewBox').show();
11618        };
11619        reader.readAsDataURL(file);
11620    }
11621});
11622// Select GIF and show preview with a close button
11623// below function is not worked remove it if not worked 
11624function selectGIF(url) {
11625
11626    $('#videoPreviewBox').hide();
11627    $('#videoSource').attr('src', '');
11628    $('#videoPreview')[0].load(); // Reset video player
11629
11630    $('#gifPreviewAddPost').attr('src', url);
11631    $('#gifPreviewBox').show();
11632}
11633
11634$('#gif-trigger-addpost').on('click', function(e) {
11635    e.preventDefault();
11636    $('.add-image').hide();
11637
11638    fetch('https://api.giphy.com/v1/gifs/trending?api_key=uGguGjuTdE4Zqe3SFEah6hTQHb3E4mkG&limit=10&rating=g')
11639        .then(response => response.json())
11640        .then(data => {
11641            let gifHTML = '<div class="gif-list">';
11642            data.data.forEach(gif => {
11643                gifHTML +=
11644                    `<img src="${gif.images.original.url}" class="gif-item" onclick="selectGIF('${gif.images.original.url}')">`;
11645            });
11646            gifHTML += '</div>';
11647            document.getElementById('preview').innerHTML = gifHTML;
11648
11649        });
11650    setTimeout(function() {
11651        $('.gif-list').append('<span class="close-x">&times;</span>');
11652        $('.gif-list span.close-x').click(function() {
11653            $('.gif-list').hide();
11654        })
11655    }, 1000)
11656});
11657
11658
11659
11660// Simulate progress bar without sending request
11661function simulateUploadProgress_sample() {
11662    let progress = 0;
11663    $('#uploadProgressBar').css('width', '0%').text('0%');
11664    $('#uploadProgressContainer').fadeIn();
11665
11666    let interval = setInterval(function() {
11667        progress += 1;
11668        $('#uploadProgressBar').css('width', progress + '%').text(progress + '%');
11669
11670        if (progress >= 100) {
11671            clearInterval(interval);
11672            setTimeout(() => {
11673                $('#uploadProgressContainer').fadeOut();
11674                showNotification('success', 'Post sent successfully. (Simulated)');
11675                $('#addPostTextarea').text('');
11676            }, 400);
11677        }
11678    }, 30); // Smaller step and faster interval for smoothness
11679}
11680
11681
11682var addedPrivateMembers = [];
11683
11684function handleAddPost(isDraft = 0) {
11685    // Hide the schedule popup when click on draft 
11686    $('#social-popup > .add-post-inner').removeClass('schedule-box-opened');
11687    $('.Schedule-message-wrapper').hide();
11688
11689    // Check if this is a repost
11690    let repostId = $('#repostId').val();
11691    let isRepost = repostId ? 1 : 0;
11692
11693    // Fetch scheduled data
11694    let scheduled = $('#scheduled').val();
11695    let scheduledate = $('#scheduledate').val();
11696    let scheduletime = $('#scheduletime').val();
11697
11698    // Get post text content
11699    let postText = $('#addPostTextarea').text();
11700
11701    // Initialize media type
11702    let mediatype = 0;
11703    let alreadyAsMedia = false;
11704    let mediaUrl = '';
11705    let imagesData = [];
11706
11707    // Get checkbox values
11708    let commentsOff = $('#post-setting-box input[type="checkbox"]:eq(0)').is(':checked') ? 1 : 0;
11709    let hideLike = $('#post-setting-box input[type="checkbox"]:eq(1)').is(':checked') ? 1 : 0;
11710
11711    let formData = new FormData();
11712
11713    // Add repost ID if this is a repost
11714    if (isRepost) {
11715        formData.append('repostId', repostId); //Controler name: repostId  old name : repost_id
11716        formData.append('is_repost', isRepost);
11717    }
11718
11719    // Detect media type
11720    // if ($('#imageInput')[0].files.length > 0) {
11721    if (selectedImageFiles.length > 0) {
11722        mediatype = 1;
11723    } else if ($('#videoInput')[0].files.length > 0) {
11724        mediatype = 2;
11725    } else if ($('#gifPreviewBox').is(':visible')) {
11726        mediatype = 3;
11727        mediaUrl = $('#gifPreviewAddPost').attr('src');
11728    }
11729
11730    // Validate
11731    if (!postText && mediatype === 0) {
11732        showNotification('error', 'Please add some content before posting.');
11733        return;
11734    }
11735
11736    // Handle images
11737    $('#imageCarousel .item').each(function(index) {
11738        let embeddedLink = $(this).find('img').attr('data-embeded-link') || '';
11739        let embeddedText = $(this).find('img').attr('data-alt') || '';
11740        // let imageFile = $('#imageInput')[0].files[index] || null;
11741
11742        const ind = $(this).attr('data-index');
11743        const fileObj = selectedImageFiles.find(f => Number(f.index) === Number(ind));
11744        const imageFile = fileObj ? fileObj.file : null;
11745
11746        imagesData.push({
11747            embeddedLink: embeddedLink,
11748            embeddedText: embeddedText,
11749            fileName: imageFile ? imageFile.name : ''
11750        });
11751    });
11752
11753    // Append image data
11754    if (mediatype === 1) {
11755        // const files = $('#imageInput')[0].files;
11756        // Array.from(files).forEach((file, index) => {
11757        //     formData.append('repost-images[]', file);
11758        //     formData.append('repost-embeddedLink[]', imagesData[index]?.embeddedLink || '');
11759        //     formData.append('repost-altText[]', imagesData[index]?.embeddedText || '');
11760        // });
11761
11762        selectedImageFiles.forEach((obj, index) => {
11763            const file = obj.file;
11764
11765            formData.append('repost-images[]', file);
11766            formData.append('repost-embeddedLink[]', imagesData[index]?.embeddedLink || '');
11767            formData.append('repost-altText[]', imagesData[index]?.embeddedText || '');
11768        });
11769
11770        console.log(selectedImageFiles);
11771    }
11772
11773    // Append video file
11774    if (mediatype === 2 && $('#videoInput')[0].files.length > 0) {
11775        formData.append('repost-video', $('#videoInput')[0].files[0]);
11776    }
11777
11778    // If video already present
11779    if ($('#videoSource').length > 0 && $('#videoSource').attr('src')) {
11780        alreadyAsMedia = true;
11781        mediatype = 2;
11782        const videoUrl = $('#videoSource').attr('src');
11783        formData.append('repost-video', videoUrl);
11784    }
11785
11786    // GIF
11787    if (mediatype === 3 && mediaUrl) {
11788        alreadyAsMedia = true;
11789        formData.append('media_url', mediaUrl);
11790    }
11791
11792    // Schedule and metadata
11793    formData.append('scheduled', scheduled);
11794    formData.append('scheduledate', scheduledate);
11795    formData.append('scheduletime', scheduletime);
11796    formData.append('alreadyAsMedia', alreadyAsMedia);
11797    formData.append('postText', postText);
11798    formData.append('media_type', mediatype);
11799    formData.append('media_url', mediaUrl);
11800    formData.append('duration', 0);
11801    formData.append('is_draft', isDraft);
11802    formData.append('IsCommentBlocked', commentsOff);
11803    formData.append('hideLike', hideLike);
11804
11805    const isPrivate = $('#privatepostbtn').prop('checked');
11806    formData.append('isPrivate', (isPrivate ? 1 : 0));
11807
11808    if(isPrivate){
11809        const privateGuidelines = $('#private-guidelines').val().trim();
11810        if(privateGuidelines && privateGuidelines.length > 0){
11811            formData.append('privateGuidelines', privateGuidelines);
11812        }
11813
11814        addedPrivateMembers.forEach(token => {
11815            formData.append('privateUserTokens[]', token);
11816        })
11817    }
11818
11819    // Show progress container
11820    $('#uploadProgressBar').css('width', '0%').text('0%');
11821    $('#uploadProgressContainer').fadeIn();
11822
11823    let fakeProgress = 0;
11824    let fakeInterval = setInterval(() => {
11825        if (fakeProgress < 90) {
11826            fakeProgress += 1;
11827            $('#uploadProgressBar').css('width', fakeProgress + '%').text(fakeProgress + '%');
11828        }
11829    }, 50);
11830
11831    // AJAX Upload
11832    $.ajax({
11833        url: base_url + 'addPost', // This same endpoint should handle both posts and reposts
11834        type: 'POST',
11835        data: formData,
11836        processData: false,
11837        contentType: false,
11838        xhr: function() {
11839            let xhr = new window.XMLHttpRequest();
11840            xhr.upload.addEventListener("progress", function(evt) {
11841                if (evt.lengthComputable) {
11842                    let percentComplete = Math.round((evt.loaded / evt.total) * 100);
11843                    $('#uploadProgressBar').css('width', percentComplete + '%').text(
11844                        percentComplete + '%');
11845                }
11846            }, false);
11847            return xhr;
11848        },
11849        beforeSend: function() {
11850            $('#addPost-form-submit')
11851                .prop('disabled', true)
11852                .data('original-text', $('#addPost-form-submit').text())
11853                .html('<span class="jloader"></span>');
11854        },
11855        success: function(response) {
11856            clearInterval(fakeInterval);
11857            $('#uploadProgressBar').css('width', '100%').text('100%');
11858
11859            setTimeout(() => {
11860                $('#uploadProgressContainer').fadeOut();
11861            }, 500);
11862
11863            $('#addPost-form-submit')
11864                .prop('disabled', false)
11865                .html('<i class="fa-sharp fa-solid fa-paper-plane-top" aria-hidden="true"></i>');
11866            $('.post-btn.addPost-form-submit').removeClass('active').addClass('disabled');
11867
11868            let result = JSON.parse(response);
11869            if (result.status) {
11870                showNotification('success', isDraft ? 'Draft Saved' : 'Post sent successfully.');
11871                $('body').removeClass('overflow-hidden');
11872                
11873                // Reset form and clear repost state
11874                resetRepostForm(false);
11875                clearRepost(); // Clear the repost preview and state
11876                
11877                isNewPost = true;
11878                $('#addPostTextarea').text('');
11879                $('#imageInput').val('');
11880                $('#videoInput').val('');
11881                $('#previewGifsForAddPost').empty();
11882                $('#post-setting-box input[type="checkbox"]').prop('checked', false);
11883                $('#repostId').val(''); // Clear repost ID
11884                $('#popup-title').text('Create Post'); // Reset title
11885                $('#repost-indicator').hide(); // Hide repost indicator
11886                $('#repost-preview-container').hide(); // Hide preview
11887
11888                // Close the popup
11889                $('.social-popup').fadeOut('fast');
11890                $('.social-shadow').hide();
11891                $('.add-post').removeClass('add-post-opened');
11892
11893               
11894                // Get current URL details safely
11895                const currentUrl = window.location.href;
11896                const urlObj = new URL(currentUrl);
11897
11898                // Extract pathname & search
11899                const pathname = urlObj.pathname;   // "/" OR "/social"
11900                const search = urlObj.search;        // "?page=1" OR ""
11901
11902                // Debug logs (optional – remove later)
11903                console.log("Current URL:", currentUrl);
11904                console.log("Pathname:", pathname);
11905                console.log("Search:", search);
11906
11907                // Define pages where feed should refresh
11908                const feedPages = ['/', '/social'];
11909
11910                // Check if current page is feed page (without query params)
11911                const isFeedPage =
11912                    feedPages.includes(pathname) &&
11913                    search.length === 0;
11914
11915                console.log("isFeedPage:", isFeedPage);
11916                console.log("formData:", formData);
11917
11918                // Main logic
11919                if (isDraft != 0) {
11920                    getAllMyDrafts();
11921                } else {
11922                    if (isFeedPage) {
11923                        // Refresh feed only on / or /social
11924                        getSocialFeed('3', '1', '1', '');
11925                    }
11926                }
11927
11928
11929
11930
11931            } else {
11932
11933            
11934                showNotification(result.message || 'An error occurred while processing the request.');
11935                $('#uploadProgressContainer').fadeOut();
11936            }
11937        },
11938        error: function(xhr, status, error) {
11939            clearInterval(fakeInterval);
11940            $('#uploadProgressBar').css('width', '100%').text('100%');
11941            $('#uploadProgressContainer').fadeOut();
11942
11943            showNotification('error', 'Failed to process the request. Please try again.');
11944            console.error('Error:', error);
11945        }
11946    });
11947}
11948
11949 
11950
11951
11952
11953
11954</script>
11954
11955
11956<script>
11957$(function() {
11958    // $('#getstart-popup').fadeIn();
11959})
11960</script>
11960
11961
11962<!-- ADD POST ARTICLE END here  -->
11963<div id="analytics-panel" onclick="window.event.cancelBubble = true;" style="display:none">
11964    <div class="embed-header">
11965        <div class="d-flex align-items-center mb-3">
11966            <h3>Analytics</h3>
11967        </div>
11968    </div>
11969    <div class="embed-inner">
11970        <p>Views: The number of times people open and view a product listing or social post.</p>
11971        <p>We're adding more analytics data to provide better insight into the performance of each product listing and
11972            social
11973            post.</p>
11974    </div>
11975
11976    <button class="copy-embed" type="button"
11977        onclick="$('#analytics-panel').fadeOut('fast').removeClass('show-analytics-panel');">Close</button>
11978</div>
11979
11980<div id="analytics-panel-shadow" style="display:none"
11981    onclick="$('#analytics-panel').fadeOut('fast').removeClass('show-analytics-panel');">
11982
11983</div>
11984 
11985
11986<div class="social-popup" id="repost-popup-product">
11987    <div class="add-post-inner">
11988        <div class="header-post social-add-header">
11989            <div class="header-add-post">
11990                <div class="fnc mt-0 justify-content-between mb-5 align-items-start">
11991                    <div class="d-flex">
11992                        <div class="fig"><img
11993                                src="https://cubesnack-seller.s3.amazonaws.com/products/2610240610366368.jpg"
11994                                style="border-radius:50%" alt="logo" title="logo"></div>
11995                        <div class="fnc-title">
11996                            <h4>Jumpspree</h4>
11997                            <p>@vic</p>
11998                        </div>
11999                    </div>
12000
12001                    <div class="drop-down-blog">
12002                        <!--                    <a class="discard-button" href="javascript:void(0)" onclick="$(this).parents('.social-popup').fadeOut('fast'); $('body').removeClass('overflow-hidden'); $('.social-shadow').hide()">Discard</a>-->
12003
12004                        <a class="discard-button" href="javascript:void(0)"
12005                            onclick="$('#save-draft').show();">Discard</a>
12006
12007                    </div>
12008                </div>
12009
12010
12011            </div>
12012
12013            <div class="post-area-inside">
12014                <textarea id="posdAddTextArea"
12015                    oninput='this.style.height = "";this.style.height = this.scrollHeight + "px"'
12016                    placeholder="What's up?">
12017                    </textarea>
12018            </div>
12019
12020            <div class="post-for-repost pb-0">
12021                <div class="email-box">
12022                    <div class="row">
12023                        <div class="col-md-12">
12024                            <div class="fnc mt-0 justify-content-between mb-9 align-items-start">
12025                                <div class="d-flex">
12026                                    <a href="#" class="fig">
12027                                        <img src="https://cubesnack-seller.s3.amazonaws.com/products/1611230151525540.jpg"
12028                                            style="border-radius:50%" alt="Profile Photo" title="Profile Photo">
12029                                    </a>
12030                                    <div class="fnc-title" style="display: flex;align-items: center;">
12031                                        <h4>
12032                                            <a href="#" class="profile-link">melissa52</a>
12033                                            <img src="https://www.jumpspree.com/public/images/blue-cube.png"
12034                                                class="blue-cube-icon" alt="Verified Icon" title="Verified Icon">
12035                                        </h4>
12036                                        <p style="margin: 0; margin-left: 7px;"><a href="#" class="profile-link"
12037                                                style="color: #bbb;font-size: 12px !important;">@melissa52</a>
12038                                        </p>
12039                                    </div>
12040                                </div>
12041                                <!-- Dropdown menu code -->
12042                                <div class="product-label">Product</div>
12043                            </div>
12044                        </div>
12045                    </div>
12046                    <div class="row mob-m-0">
12047                        <div class="post-text">
12048                            <a href="#">
12049                                <p>Rosary Beautiful handmade Rosary .</p>
12050                            </a>
12051                            <div class="price-wrapper">
12052                                <div class="price">$8.00</div>
12053                                <div class="was">Was $10.00</div>
12054                            </div>
12055                        </div>
12056                        <div class="col-md-12 p-0">
12057
12058                            <div class="blog-main-image mb-0 movie-trailer">
12059                                <div class="">
12060                                    <div class="item lightgallery">
12061                                        <div data-src="undefined">
12062                                            <a style="border:none" href="#"><img
12063                                                    src="https://cubesnack-seller.s3.amazonaws.com/products/0512231244061803.png"
12064                                                    alt="Post Image" title="Post Image"></a>
12065                                        </div>
12066                                    </div>
12067                                </div>
12068                            </div>
12069
12070                        </div>
12071                    </div>
12072                    <div style="display:none" class="row">
12073                        <div class="col-md-12">
12074                            <div class="date">
12075                                <ul class="d-flex m-0">
12076                                    <li></li>
12077                                    <li><span>•</span></li>
12078                                    <li></li>
12079                                </ul>
12080                            </div>
12081                        </div>
12082                    </div>
12083
12084                </div>
12085
12086            </div>
12087
12088
12089            <div class="post-foot add-post-foot d-flex justify-content-between">
12090
12091                <div class="add-image">
12092                    <ul class="d-flex p-0 m-0">
12093                        <li>
12094                            <a href="#">
12095                                <input type="file"><i class="fa-regular fa-image"></i></a>
12096                        </li>
12097                        <li>
12098                            <a href="#">
12099                                <input type="file"><i class="fa-regular fa-video"></i></a>
12100                        </li>
12101
12102                        <!-- <li>
12103                            <a href="#">
12104                                <input type="file"><i class="fa-regular fa-gif"></i></a>
12105                        </li> -->
12106
12107                        <li>
12108                            <a href="#" id="gif-trigger">
12109                                <i class="fa-regular fa-gif"></i>
12110                            </a>
12111                        </li>
12112                        <li id="draft-popup">
12113                            <a href="javascript:void(0)" onclick="$('#draft-box').addClass('draft-box-show')">
12114                                <i class="fa-regular fa-paste" aria-hidden="true"></i></a>
12115                        </li>
12116
12117                        <!--                        <li class="create-poll" onclick="$('#create-poll').fadeIn(); $('#social-popup').hide()"><a href="#"><img src="https://www.jumpspree.com/public/images/poll.png" style="width:16px" alt="Jumpspree"></a></li>-->
12118                    </ul>
12119                </div>
12120
12121                <div class="send-post">
12122                    <button type="button">Post</button>
12123                </div>
12124            </div>
12125
12126        </div>
12127    </div>
12128</div>
12129
12130
12131<div class="social-popup" id="search-popup">
12132    <div class="add-post-inner">
12133        <div class="header-post social-add-header">
12134            <h2>Search</h2>
12135            <span style="cursor:pointer" onclick="$('#search-popup').fadeOut('fast')" class="cancel">Cancel</span>
12136        </div>
12137
12138        <div class="search-box">
12139            <form action="">
12140                <i class="fa-regular fa-magnifying-glass"></i>
12141                <input type="text" placeholder="Search by product name or brand name">
12142            </form>
12143        </div>
12144    </div>
12145</div>
12146
12147
12148
12149<div class="social-popup" id="update-username">
12150    <div class="add-post-inner">
12151        <div class="header-post social-add-header">
12152            <div class="header-add-post">
12153                <div class="fnc mt-0 justify-content-between mb-5 align-items-start">
12154
12155                    <div class="d-flex">
12156                        <img src="https://www.jumpspree.com/public/images/Jumpspree-logo.png?ver:1.02"
12157                            alt="Jumpspree Logo" title="Jumpspree Logo">
12158                    </div>
12159
12160                    <div class="cancel"><span class="cancel" style="cursor:pointer; color:#b8b8b8; font-size:13px"
12161                            onclick="$('#update-username').fadeOut('fast')">Cancel</span></div>
12162                </div>
12163
12164
12165            </div>
12166
12167
12168        </div>
12169
12170
12171        <div class="update-section">
12172            <h3>Update username</h3>
12173            <p>Create a unique username for your profile. Usernames can be minimum 3 and maximum 15 characters, and can
12174                contain letters, numbers, and underscores only. You can change it later in your profile settings.</p>
12175            <div class="d-flex claum-user-input">
12176                <form action="" name="clainform" id="claimform" style="position:relative" novalidate="novalidate">
12177                    <div class="claim-user">
12178                        <input type="text" autocomplete="new-password" data-initial="@" name="claimusername"
12179                            id="claimusername" maxlength="15" minlength="1" placeholder="Enter your @username" value="">
12180                        <span class="placeholderprefilled">@</span>
12181                    </div>
12182                    <div class="sugested">
12183                        <a href="#">developee01</a>
12184                        <a href="#">developee785</a>
12185                        <a href="#">developee60</a>
12186                        <a href="#">developee50</a>
12187                    </div>
12188                    <button class="claim-button" name="submitbtn" id="submitbtn" type="button" disabled=""
12189                        onclick="window.location.href='https://www.jumpspree.com/sign-up'">Claim it</button>
12190                    <p><span class="tnc">Usernames are subject to availability and approval. You can change your
12191                            username only once every 14 days. Jumpspree reserves the right to transfer, reassign,
12192                            disable, or disapprove any username that infringes on intellectual property rights. <br>
12193                            <a href="#">Terms of Use</a> and <a href="#">Privacy Policy</a>.</span></p>
12194
12195                </form>
12196
12197            </div>
12198        </div>
12199
12200
12201
12202
12203    </div>
12204</div>
12205
12206<div class="social-popup" id="brand-verification">
12207    <div class="add-post-inner">
12208        <div class="header-post social-add-header">
12209            <div class="header-add-post">
12210                <div class="fnc mt-0 justify-content-between mb-5 align-items-start">
12211
12212                    <div class="d-flex">
12213                        <img src="https://www.jumpspree.com/public/images/Jumpspree-logo.png?ver:1.02"
12214                            alt="Jumpspree Logo" title="Jumpspree Logo">
12215                    </div>
12216
12217                    <div class="cancel"><span style="cursor:pointer; color:#b8b8b8; font-size:13px"
12218                            onclick="$('#brand-verification').fadeOut('fast'); $('body').removeClass('overflow-hidden');">Cancel</span>
12219                    </div>
12220                </div>
12221
12222
12223            </div>
12224
12225
12226        </div>
12227
12228
12229        <div class="update-section">
12230            <h3>Brand Verifications</h3>
12231            <p>List the brands you plan to offer on Jumpspree and upload the manufacturer's authorization documents,
12232                such as the official reseller certificate or the original letter of authorization for each brand.</p>
12233            <div class="b-verification">
12234                <div class="upload-article-image">
12235
12236                    <div class="upload"><i class="fa-light fa-cloud-arrow-up" aria-hidden="true"></i>
12237                        <p>Upload Image</p>
12238                        <p><small>1920 x 1080 resolutions works best</small></p>
12239                    </div>
12240
12241                    <input type="file" class="uplaod-blog">
12242                </div>
12243                <div class="form-group">
12244                    <input type="text" name="userfullname" id="userfullname" class="form-control" value=""
12245                        placeholder="Enter brand name">
12246                </div>
12247            </div>
12248            <div class="add-more-brand">
12249                <a href="#"><i class="fa-solid fa-plus"></i> Add another brand</a>
12250            </div>
12251            <div class="save-brand">
12252                <button class="btn btn-blue-bg btn-block" type="button" style="    border-radius: 8px;width: auto;margin-left:  auto;padding-left: 50px;
12253                                                             padding-right: 50px;"
12254                    onclick="$('#step1-wrapper').hide(); $('#step2-wrapper').fadeIn();">Save</button>
12255            </div>
12256        </div>
12257
12258
12259
12260
12261    </div>
12262</div>
12263
12264<div class="social-popup" id="update-emailid">
12265    <div class="add-post-inner">
12266        <div class="header-post social-add-header">
12267            <div class="header-add-post">
12268                <div class="fnc mt-0 justify-content-between mb-5 align-items-start">
12269
12270                    <div class="cancel"><a href="javascript:void(0)" onclick="$('#update-emailid').fadeOut('fast')"><i
12271                                class="fa-solid fa-arrow-left-long"></i></a></div>
12272
12273                    <div class="d-flex">
12274                        <h3>Email</h3>
12275                    </div>
12276
12277                </div>
12278
12279
12280            </div>
12281
12282
12283        </div>
12284
12285
12286        <div class="update-section">
12287            <form action="">
12288                <div class="c-email">
12289                    <label for="">Current Email</label>
12290                    <input type="text">
12291                </div>
12292                <div class="c-email">
12293                    <label for="">New Email</label>
12294                    <input type="text">
12295                </div>
12296
12297                <div class="send-code">
12298                    <button class="claim-button" name="submitbtn" id="submitbtn" type="button">Send Code</button>
12299                </div>
12300            </form>
12301        </div>
12302
12303
12304
12305
12306    </div>
12307</div>
12308
12309<div class="social-popup" id="update-phoneno">
12310    <div class="add-post-inner">
12311        <div class="header-post social-add-header">
12312            <div class="header-add-post">
12313                <div class="fnc mt-0 justify-content-between mb-5 align-items-start">
12314
12315                    <div class="cancel"><a href="javascript:void(0)" onclick="$('#update-phoneno').fadeOut('fast')"><i
12316                                class="fa-solid fa-arrow-left-long"></i></a></div>
12317
12318                    <div class="d-flex">
12319                        <h3>Phone</h3>
12320                    </div>
12321
12322                </div>
12323
12324
12325            </div>
12326
12327
12328        </div>
12329
12330
12331        <div class="update-section">
12332            <form action="">
12333                <div class="c-email">
12334                    <label for="">Current Phone Number</label>
12335                    <input type="text" value="+1 2222222222">
12336                </div>
12337                <div class="c-email">
12338                    <label for="">New Phone Number</label>
12339                    <input type="text" class="mb-0">
12340                    <div class="note">We'll send a verification code to your new phone number to verify
12341                        that it belongs to you. Message and data rates may apply.</div>
12342                </div>
12343
12344                <div class="send-code">
12345                    <button class="claim-button" name="submitbtn" id="submitbtn" type="button">Send Code</button>
12346                </div>
12347            </form>
12348        </div>
12349
12350
12351
12352
12353    </div>
12354</div>
12355
12356<div class="social-popup" id="update-password">
12357    <div class="add-post-inner">
12358        <div class="header-post social-add-header">
12359            <div class="header-add-post">
12360                <div class="fnc mt-0 justify-content-between mb-5 align-items-start">
12361
12362                    <div class="cancel"><a href="javascript:void(0)" onclick="$('#update-password').fadeOut('fast')"><i
12363                                class="fa-solid fa-arrow-left-long"></i></a></div>
12364
12365                    <div class="d-flex">
12366                        <h3>Update Password</h3>
12367                    </div>
12368
12369                </div>
12370
12371
12372            </div>
12373
12374
12375        </div>
12376
12377
12378        <div class="update-section">
12379            <form action="">
12380                <div class="c-email">
12381                    <label for="">Current Phone Number</label>
12382                    <input type="text">
12383                </div>
12384                <div class="c-email">
12385                    <label for="">New Phone Number</label>
12386                    <input type="text">
12387                </div>
12388
12389                <div class="send-code">
12390                    <button class="claim-button" name="submitbtn" id="submitbtn" type="button">Send Code</button>
12391                </div>
12392            </form>
12393        </div>
12394
12395
12396
12397
12398    </div>
12399</div>
12400
12401<div class="social-popup" id="sendmessage-popup">
12402    <div class="add-post-inner">
12403        <div class="header-post social-add-header">
12404            <div class="header-add-post">
12405                <div class="fnc mt-0 justify-content-between mb-5 align-items-start">
12406                    <div class="back-btn-message">
12407                        <a href="#"><i class="fa-regular fa-arrow-left-long"></i></a>
12408                    </div>
12409                    <div class="d-flex">
12410                        <div class="fig"><img
12411                                src="https://cubesnack-seller.s3.amazonaws.com/products/2610240610366368.jpg"
12412                                style="border-radius:50%" alt="logo" title="logo"></div>
12413                        <div class="fnc-title">
12414                            <h4>Jumpspree</h4>
12415                            <p>@vic</p>
12416                        </div>
12417                    </div>
12418
12419                    <div class="drop-down-blog">
12420                        <div class="profile-drop-down">
12421                            <a href="javascript:void(0)"><i class="fa-regular fa-ellipsis" aria-hidden="true"></i></a>
12422                            <ul style="display: none;">
12423                                <li><a href="javascript:void(0)"
12424                                        onclick="$('#report-brand').fadeIn('fast'); $('body').addClass('overflow-hidden');">Report
12425                                        item <i class="fa-sharp fa-regular fa-circle-exclamation"
12426                                            aria-hidden="true"></i></a></li>
12427                                <li><a href="javascript:void(0)"
12428                                        onclick="$('#feedback-popup').fadeIn('fast'); $('body').addClass('overflow-hidden');">feedback
12429                                        <i class="fa-light fa-comment-lines" aria-hidden="true"></i></a></li>
12430                            </ul>
12431                        </div>
12432
12433                    </div>
12434                </div>
12435
12436
12437            </div>
12438
12439
12440        </div>
12441
12442        <div id="message-box">
12443            <div class="message-wrapper">
12444                <div class="admin">
12445                    <div class="message-box">
12446                        <div class="message">Hello</div>
12447                        <p>Fri, Nov 1 15:23 pm</p>
12448                    </div>
12449                    <div class="profile-logo"><img
12450                            src="https://cubesnack-seller.s3.amazonaws.com/products/2610240610366368.jpg" alt="Logo"
12451                            title="logo"></div>
12452                </div>
12453
12454                <div class="reply-admin">
12455                    <div class="profile-logo"><img
12456                            src="https://cubesnack-seller.s3.amazonaws.com/products/2610240610366368.jpg" alt="Logo"
12457                            title="logo"></div>
12458                    <div class="message-box">
12459                        <div class="message">hi</div>
12460                        <p>Fri, Nov 1 15:23 pm</p>
12461                    </div>
12462                </div>
12463            </div>
12464        </div>
12465
12466        <div id="comment-section">
12467            <div class="date ogl align-items-center">
12468                <div class="input-box">
12469                    <input type="text" placeholder="Type your message..">
12470                    <!--  <div class="close">&times;</div>  -->
12471                    <div id="preview" class="preview-box">
12472
12473                    </div> <!-- Preview in the comment box -->
12474                    <div class="plus-comment"> <a href="#" class="add-graphic"><i class="fa-regular fa-plus"
12475                                aria-hidden="true"></i></a></div>
12476                    <div class="action-comment">
12477                        <!--                                            <a href="#"><i class="fa-regular fa-paper-plane-top"></i></a>-->
12478                        <a href="#"><i class="fa-regular fa-arrow-up" aria-hidden="true"></i></a>
12479                    </div>
12480
12481                </div>
12482            </div>
12483
12484            <div class="add-image" style="display:none">
12485                <ul class="d-flex">
12486                    <li><a href="#" id="image-trigger"><i class="fa-regular fa-image" aria-hidden="true"></i></a>
12486<input
12487                            type="file" id="image-input" accept="image/*" style="display:none;"></li>
12488                    <li><a href="#" id="video-trigger"><i class="fa-regular fa-video" aria-hidden="true"></i></a><input
12489                            type="file" id="video-input" accept="video/*" style="display:none;"></li>
12490                </ul>
12491            </div>
12492        </div>
12493    </div>
12494</div>
12495<div class="social-popup" id="report-brand">
12496    <div class="add-post-inner">
12497        <div class="report-container">
12498            <div class="header-report-brand">
12499                <!--
12500                    <div class="back-arrow"><a href="javascript:void(0)"
12501                            onclick='$("#report-brand").fadeOut("fast"); $("body").removeClass("overflow-hidden")'><i
12502                                class="fa-regular fa-arrow-left-long"></i></a></div>
12503                -->
12504            </div>
12505            <div class="report-heading">
12506                <div class="report-header d-flex justify-content-between">
12507                    <h3>Report</h3>
12508                    <div class="cross">
12509                    <a href="javascript:void(0)" onclick="$('#report-brand').removeAttr('data-postid'); $('#report-brand').fadeOut('fast')">
12510                        <img src="https://www.jumpspree.com/public/images/cross-icon.png" alt="Cross" title="Cross">
12511                    </a>
12512                                </div>
12513                </div>
12514                <p>Trouble? Tell us what you’re experiencing or seeing. This helps us resolve the issue quickly and
12515                    effectively.</p>
12516            </div>
12517            <div class="report-scroll">
12518                <div class="report-scroll-inner">
12519                    <div class="product-for-report">
12520                        <div class="product-image" id="report-user-img">
12521                            <img src="https://www.jumpspree.com/public/images/user-icon.png?ver:1.023" alt="User" title="User">
12522                        </div>
12523                        <div class="product-description" id="report-user-desc">
12524                            <!-- <h3>Guest User</h3> -->
12525                            <div class="username">
12526                                <span id="report-username-txt">Guest</span>
12527                                <span id="report-username-check" style="display: none;">
12528                                    <img src="https://www.jumpspree.com/public/images/blue-cube.png" class="blue-cube-icon" alt="Verified Icon" title="Verified Icon">
12529                                </span>
12530                            </div>
12531
12532                            <div id="report-post-txt">
12533                            </div>
12534
12535                        </div>
12536                    </div>
12537
12538                    <div class="report-reason">
12539                        <h4>What’s going on with this post?</h4>
12540                        
12541
12542                        <ul>
12543                                                        <li>
12544                                <label>
12545                                    <div class="d-flex"><span class="custom-radio"><input name="post-report-reason-check"
12546                                            type="radio" value="7"  onchange="showAdditionalReportDiv(this.value)" ><span class="checkmark" ></span></span> Spam or Theft</div>
12547                                    <p>Unwanted promotional content or attempts to steal data, funds, or identities.</p>
12548                                </label>
12549                            </li>
12550                                                       <li>
12551                                <label>
12552                                    <div class="d-flex"><span class="custom-radio"><input name="post-report-reason-check"
12553                                            type="radio" value="2"  onchange="showAdditionalReportDiv(this.value)" ><span class="checkmark" ></span></span> Hateful conduct</div>
12554                                    <p>Content that promotes hatred, discrimination, or violence against individuals or groups.
12554</p>
12555                                </label>
12556                            </li>
12557                                                       <li>
12558                                <label>
12559                                    <div class="d-flex"><span class="custom-radio"><input name="post-report-reason-check"
12560                                            type="radio" value="5"  onchange="showAdditionalReportDiv(this.value)" ><span class="checkmark" ></span></span> Sale of illegal goods</div>
12561                                    <p>Attempting to sell items that are banned or illegal under the law.</p>
12562                                </label>
12563                            </li>
12564                                                       <li>
12565                                <label>
12566                                    <div class="d-flex"><span class="custom-radio"><input name="post-report-reason-check"
12567                                            type="radio" value="1"  onchange="showAdditionalReportDiv(this.value)" ><span class="checkmark" ></span></span> Misleading information</div>
12568                                    <p>Sharing false or deceptive information intended to mislead others.</p>
12569                                </label>
12570                            </li>
12571                                                       <li>
12572                                <label>
12573                                    <div class="d-flex"><span class="custom-radio"><input name="post-report-reason-check"
12574                                            type="radio" value="3"  onchange="showAdditionalReportDiv(this.value)" ><span class="checkmark" ></span></span> Act of violence or threat</div>
12575                                    <p>Content promoting or threatening physical harm or violence.</p>
12576                                </label>
12577                            </li>
12578                                                       <li>
12579                                <label>
12580                                    <div class="d-flex"><span class="custom-radio"><input name="post-report-reason-check"
12581                                            type="radio" value="4"  onchange="showAdditionalReportDiv(this.value)" ><span class="checkmark" ></span></span> Nudity and sexual content</div>
12582                                    <p>Explicit sexual content or nudity that isn’t suitable for all audiences.</p>
12583                                </label>
12584                            </li>
12585                                                       <li>
12586                                <label>
12587                                    <div class="d-flex"><span class="custom-radio"><input name="post-report-reason-check"
12588                                            type="radio" value="6"  onchange="showAdditionalReportDiv(this.value)" ><span class="checkmark" ></span></span> Intellectual property infringement</div>
12589                                    <p>Use of copyrighted material without permission, violating intellectual property rights.</p>
12590                                </label>
12591                            </li>
12592                                                       <li>
12593                                <label>
12594                                    <div class="d-flex"><span class="custom-radio"><input name="post-report-reason-check"
12595                                            type="radio" value="8"  onchange="showAdditionalReportDiv(this.value)" ><span class="checkmark" ></span></span> Something else</div>
12596                                    <p>Describe any other issue that’s not listed above. Such as impersonation, privacy, or child safety.</p>
12597                                </label>
12598                            </li>
12599                           
12600
12601                            <li id="additional-comment-all" style="display:none">
12602                                <label>Additional comments (optional)</label>
12603                                <textarea name="report-additional-message" id="report-additional-message" placeholder="Additional details about your report will be helpful."></textarea>
12604                                <div class="count" id="remaining-report-count">0/300</div>
12605                            </li>
12606                        </ul>
12607
12608                        <!--
12609                                            <div class="report-note">
12610                                                <p><img src="https://www.jumpspree.com/public/images/clock-padlock.png" alt="Jumpspree"> Your report will remain private and confidential. We do not
12611                            share any information in this report with anyone.</p>
12612                                            </div>
12613                            -->
12614                    </div>
12615                </div>
12616
12617                <div class="post-foot add-post-foot d-flex justify-content-between">
12618
12619
12620
12621                    <div class="send-post">
12622                        <button type="button" id="report-post-btn" onclick="reportPost()">Submit</button>
12623                        <div class="cancel-btn" style="text-align: center;color: #fff;">
12624                            <span style="display: block; padding: 8px 0; cursor:pointer"  onclick="$('#report-brand').fadeOut(); $('body').removeClass('overflow-hidden');  $('#report-brand').removeAttr('data-postid');">Cancel</span>
12625                        </div>
12626                    </div>
12627                </div>
12628
12629            </div>
12630
12631        </div>
12632    </div>
12633</div>
12634
12635<div class="social-popup" id="report-brand-success">
12636    <div class="add-post-inner">
12637        <div class="report-container">
12638
12639            <h2>Got it!</h2>
12640            <p>Thanks for bringing this to our attention. Your reports help us improve the Jumpspree experience for you
12641                and our entire community. Thank you!</p>
12642
12643            <div class="post-foot add-post-foot d-flex justify-content-between">
12644                <div class="send-post">
12645                    <button type="button"
12646                        onclick="$('#report-brand-success').fadeOut(); $('body').removeClass('overflow-hidden')">Close</button>
12647
12648                </div>
12649            </div>
12650        </div>
12651    </div>
12652</div>
12653<div class="social-popup" id="report-product">
12654    <div class="add-post-inner">
12655        <div class="report-container">
12656            <div class="header-report-brand">
12657                <div class="back-arrow"><a href="javascript:void(0)"
12658                        onclick='$("#report-brand").fadeOut("fast"); $("body").removeClass("overflow-hidden")'><i
12659                            class="fa-regular fa-arrow-left-long"></i></a></div>
12660            </div>
12661            <div class="report-heading">
12662                <h3>Report</h3>
12663                <!--
12664                <p>Trouble? Tell us what you’re experiencing or seeing. This helps us resolve the issue quickly and
12665                    effectively.</p>
12666-->
12667            </div>
12668
12669            <div class="report-scroll">
12670                <div class="report-scroll-inner">
12671
12672                    <div class="product-for-report">
12673                        <div class="product-image">
12674                            <img src="https://cubesnack-seller.s3.amazonaws.com/products/2510230901007278.webp"
12675                                alt="Product" title="Product">
12676                        </div>
12677                        <div class="product-description">
12678                            <h3>This is the product title</h3>
12679                            <!--                    <div class="seller-name"><span>Sold by :</span> We Web Pro Shop</div>-->
12680                            <div class="price">$99.99</div>
12681                        </div>
12682                    </div>
12683
12684                    <div class="report-reason">
12685                        <h4>What’s going on with this item?</h4>
12686
12687                        <ul>
12688                            <li><label>
12689                                    <div class="d-flex"><span class="custom-radio"><input name="reason"
12690                                                type="radio"><span class="checkmark"></span></span> Spam or Theft</div>
12691                                    <p>Unwanted promotional content or attempts to steal data, funds, or identities.</p>
12692                                </label>
12693                            </li>
12694                            <li><label>
12695                                    <div class="d-flex"><span class="custom-radio"><input name="reason"
12696                                                type="radio"><span class="checkmark"></span></span> Hateful Conduct
12697                                    </div>
12698                                    <p>Content that promotes hatred, discrimination, or violence against individuals or
12699                                        groups.</p>
12700                                </label></li>
12701                            <li><label>
12702                                    <div class="d-flex"><span class="custom-radio"><input name="reason"
12703                                                type="radio"><span class="checkmark"></span></span> Sale of Illegal
12704                                        Goods</div>
12705                                    <p>Attempting to sell items that are banned or illegal under the law.</p>
12706                                </label></li>
12707                            <li><label>
12708                                    <div class="d-flex"><span class="custom-radio"><input name="reason"
12709                                                type="radio"><span class="checkmark"></span></span> Misleading
12710                                        information</div>
12711                                    <p>Sharing false or deceptive information intended to mislead others.</p>
12712                                </label></li>
12713                            <li><label>
12714                                    <div class="d-flex"><span class="custom-radio"><input name="reason"
12715                                                type="radio"><span class="checkmark"></span></span> Act of Violence or
12716                                        Threat</div>
12717                                    <p>Content promoting or threatening physical harm or violence.</p>
12718                                </label></li>
12719                            <li><label>
12720                                    <div class="d-flex"><span class="custom-radio"><input name="reason"
12721                                                type="radio"><span class="checkmark"></span></span> Nudity and Sexual
12722                                        Content</div>
12723                                    <p>Explicit sexual content or nudity that isn’t suitable for all audiences.</p>
12724                                </label></li>
12725                            <li><label>
12726                                    <div class="d-flex"><span class="custom-radio"><input name="reason"
12727                                                type="radio"><span class="checkmark"></span></span>Intellectual Property
12728                                        Infringement</div>
12729                                    <p>Use of copyrighted material without permission, violating intellectual property
12730                                        rights.</p>
12731                                </label></li>
12732                            <li id="something-else"><label>
12733                                    <div class="d-flex"><span class="custom-radio"><input name="reason"
12734                                                type="radio"><span class="checkmark"></span></span> Something Else</div>
12735                                    <p>Describe any other issue that’s not listed above. Such as impersonation, privacy,
12736                                        or child safety.</p>
12737                                </label></li>
12738                            <li id="additional-comment" style="display:none">
12739                                <label>Additional comments (optional)</label>
12740                                <textarea name="" id=""
12741                                    placeholder="Additional details about your report will be helpful."></textarea>
12742                                <div class="count">0/300</div>
12743                            </li>
12744                        </ul>
12745
12746                        <!--
12747                <div class="report-note">
12748                    <p><img src="https://www.jumpspree.com/public/images/clock-padlock.png" alt="Jumpspree"> Your report will remain private and confidential. We do not
12749share any information in this report with anyone.</p>
12750                </div>
12751-->
12752                    </div>
12753                </div>
12754                <div class="post-foot add-post-foot d-flex justify-content-between">
12755
12756
12757
12758                    <div class="send-post">
12759                        <button type="button"
12760                            onclick="$('#report-brand-success').fadeIn('fast'); $('#report-product').hide();">Submit</button>
12761                        <div class="cancel-btn">
12762                            <span
12763                                onclick="$('#report-product').fadeOut(); $('body').removeClass('overflow-hidden')">Cancel</span>
12764                        </div>
12765                    </div>
12766                </div>
12767
12768            </div>
12769
12770        </div>
12771    </div>
12772</div>
12773
12774
12775
12776
12777<div class="social-popup" id="send-message-popup">
12778    <div class="add-post-inner">
12779        <div class="report-container">
12780            <div class="header-report-brand">
12781                <div class="back-arrow"><a href="javascript:void(0)"
12782                        onclick='$("#report-brand").fadeOut("fast"); $("body").removeClass("overflow-hidden")'><i
12783                            class="fa-regular fa-arrow-left-long"></i></a></div>
12784                <h3>Report</h3>
12785            </div>
12786
12787            <div class="product-for-report">
12788                <div class="product-image">
12789                    <img src="https://cubesnack-seller.s3.amazonaws.com/products/2510230901007278.webp" alt="Product"
12790                        title="Product">
12791                </div>
12792                <div class="product-description">
12793                    <h3>Air Jordan 3 NRG “Free Throw Line</h3>
12794                    <div class="seller-name"><span>Sold by :</span> We Web Pro Shop</div>
12795                    <div class="price"><span>Price : </span> $22.88</div>
12796                </div>
12797            </div>
12798
12799            <div class="report-reason">
12800                <h4>Why are you repoting this item?</h4>
12801                <p>We take reports seriously and ensure that proper measures are taken to create a safer experience on
12802                    Jumpspree.</p>
12803
12804                <ul>
12805                    <li><label>Misleading information <input name="reason" type="radio"></label></li>
12806                    <li><label>Hateful conduct <input name="reason" type="radio"></label></li>
12807                    <li><label>Act of violence or threat <input name="reason" type="radio"></label></li>
12808                    <li><label>Nudity and sexual content <input name="reason" type="radio"></label></li>
12809                    <li><label>Sale of illegal goods <input name="reason" type="radio"></label></li>
12810                    <li><label>Intellectual property infringement <input name="reason" type="radio"></label></li>
12811                    <li><label>Spam <input name="reason" type="radio"></label></li>
12812                    <li><label>Something else <input name="reason" type="radio"></label></li>
12813                </ul>
12814
12815                <div class="report-note">
12816                    <p>Your report will remain private and confidential. We do not
12817                        share any information in this report with anyone.</p>
12818                </div>
12819            </div>
12820
12821            <div class="post-foot add-post-foot d-flex justify-content-between">
12822
12823
12824
12825                <div class="send-post">
12826                    <button type="button">Submit</button>
12827                </div>
12828            </div>
12829
12830        </div>
12831    </div>
12832</div>
12833
12834<div class="social-popup" id="feedback-popup">
12835    <div class="add-post-inner">
12836        <div class="feedback-container">
12837            <div class="header-report-brand">
12838                <h3>Feedback</h3>
12839                <div class="back-arrow"><span class="cancel" style="color: #b8b8b8 !important; cursor:pointer"
12840                        onclick='$("#feedback-popup").fadeOut("fast"); $("body").removeClass("overflow-hidden")'>Cancel</span>
12841                </div>
12842            </div>
12843
12844
12845
12846            <div class="Feedback-sec">
12847                <p>How was your shopping experience with Jumpspree?</p>
12848
12849                <ul>
12850                    <li><label><input name="reason" type="radio"> <i class="fa-regular fa-face-grin-hearts"></i></label>
12851                        <p>Love it</p>
12852                    </li>
12853                    <li><label><input name="reason" type="radio"> <i class="fa-regular fa-face-smile"></i></label>
12854                        <p>Like it</p>
12855                    </li>
12856                    <li><label><input name="reason" type="radio"> <i class="fa-regular fa-face-frown"></i></label>
12857                        <p>Need work</p>
12858                    </li>
12859                </ul>
12860
12861                <div class="other-feedback">
12862                    <p>Any comments or suggestions for us? - (Optional)</p>
12863                    <textarea name="" id="" placeholder="Tell us what we can do differently or better"></textarea>
12864                </div>
12865            </div>
12866
12867            <div class="post-foot add-post-foot d-flex justify-content-between">
12868
12869
12870
12871                <div class="send-post">
12872                    <button type="button">Submit</button>
12873                </div>
12874            </div>
12875
12876        </div>
12877    </div>
12878</div>
12879
12880
12881<div class="social-popup" id="blog-post">
12882    <div class="add-post-inner">
12883        <div class="header-post social-add-header">
12884            <div class="header-add-post">
12885                <div class="fnc mt-0 justify-content-between mb-5">
12886                    <div class="d-flex">
12887                        <div class="fig"><img
12888                                src="https://cubesnack-seller.s3.amazonaws.com/products/2610240610366368.jpg"
12889                                style="border-radius:50%" alt="Product" title="Product"></div>
12890                        <div class="fnc-title">
12891                            <h4>Jumpspree</h4>
12892                            <p>@vic</p>
12893                        </div>
12894                    </div>
12895
12896                    <div class="drop-down-blog"><a class="discard-button" href="javascript:void(0)"
12897                            onclick="$(this).parents('.social-popup').fadeOut('fast'); $('body').removeClass('overflow-hidden');">Discard</a>
12898
12899                    </div>
12900                </div>
12901
12902
12903            </div>
12904
12905            <div class="post-area-inside">
12906                <div class="add-title">
12907                    <input type="text" placeholder="Add title">
12908                </div>
12909
12910                <div class="upload-article-image">
12911                    <div class="upload"><i class="fa-light fa-cloud-arrow-up"></i>
12912                        <p>Upload Image</p>
12913                        <p><small>1920 x 1080 resolutions works best</small></p>
12914                    </div>
12915
12916                    <input type="file" class="uplaod-blog">
12917                </div>
12918
12919                <div class="add-title">
12920                    <input type="text" placeholder="Add upto 20 @mentions here">
12921                </div>
12922                <div class="add-title">
12923                    <input type="text" placeholder="Add upto 20 #hashtags here">
12924                </div>
12925
12926                <div class="add-title">
12927                    <span><i class="fa-regular fa-circle-plus"></i></span> <span>Start typing your article
12928                        content</span>
12929                </div>
12930            </div>
12931
12932
12933            <div class="post-foot add-post-foot d-flex justify-content-between">
12934
12935                <!--
12936                                  <div class="add-image">
12937                                       <ul class="d-flex p-0 m-0">
12938                                           <li><a href="#"><input type="file"><i class="fa-regular fa-image"></i></a></li>
12939                                           <li><a href="#"><input type="file"><i class="fa-regular fa-video"></i></a></li>
12940                                           <li><a href="#"><input type="file"><i class="fa-regular fa-gif"></i></a></li>
12941                                       </ul>
12942                                   </div>
12943                    -->
12944
12945                <div class="send-post w100">
12946                    <button type="button" class="blue-bg">Publish</button>
12947                </div>
12948            </div>
12949
12950        </div>
12951    </div>
12952</div>
12953
12954
12955<!-- POLL START HERE -->
12956<!-- POLL START HERE -->
12957<div class="social-popup" id="create-poll">
12958    <div class="add-post-inner">
12959        <div class="header-post social-add-header">
12960            <div class="create-poll-head">
12961                <div class="back-post" onclick="$('#create-poll').hide(); $('#social-popup').fadeIn('fast');"><i
12962                        class="fa-regular fa-arrow-left"></i></div>
12963                <h2>Create Poll1</h2>
12964            </div>
12965
12966            <!--
12967            <div id="create-poll-main-box">
12968            <div class="create-poll-wrrapper-main">
12969                <div class="poll-created-by pb-2 pt-0">
12970                    <div class="fnc mt-0 justify-content-between mb-0">
12971                        <div class="d-flex flex1">
12972                            <div class="fig"><img
12973                                    src="https://cubesnack-seller.s3.amazonaws.com/products/2610240610366368.jpg"
12974                                    style="border-radius:50%" alt="Jumpspree"></div>
12975                            <div class="fnc-title flex1">
12976                                <h4>Jumpspree</h4>
12977                                <textarea id="pollDescription"
12978                                    oninput="this.style.height = &quot;&quot;;this.style.height = this.scrollHeight + &quot;px&quot;"
12979                                    placeholder="What's new?"></textarea>
12980                            </div>
12981                        </div>
12982                    </div>
12983                </div>
12984
12985                <div class="post-area-inside mb-0">
12986                    <div class="create-poll-option" id="pollOptionsContainer">
12987                        <div class="option">
12988                            <input type="text" class="poll-option-input" placeholder="Yes">
12989                        </div>
12990                        <div class="option">
12991                            <input type="text" class="poll-option-input" placeholder="No">
12992                        </div>
12993                        <div class="option add-another-option">
12994                            <input type="text" id="newPollOptionInput" placeholder="Add another option">
12995                             <button type="button" id="addPollOptionBtn">+</button> 
12996                        </div>
12997                    </div>
12998                    <div class="poll-time d-flex justify-content-between">
12999                        <div class="end-poll">
13000                            Ends in <input type="number" id="pollDuration" value="" min="1" max="168">h
13001                        </div>
13002                        <div class="remove-poll"><a href="javascript:void(0)"
13003                                onclick="$('#create-poll').hide(); $('#social-popup').fadeIn('fast');">Remove poll</a>
13004                        </div>
13005                    </div>
13006                </div>
13007            </div>
13008
13009            <div class="post-foot add-post-foot d-flex justify-content-between">
13010                <div class="any-one-can-reply">Anyone can reply, quote and vote</div>
13011                <div class="send-post">
13012                    <button type="button" id="createPollSubmit" class="blue-bg">Post</button>
13013                </div>
13014            </div>
13015            </div>
13016-->
13017        </div>
13018    </div>
13019</div>
13020<!-- POLL FORM ENDS HERE -->
13021
13022<div class="social-popup" id="search-popup-wrapper-new">
13023          <div class="add-post-inner">
13024      <div id="search-popup-wrapper">
13025            <h3>Search</h3> <div class="close" onclick="$('#search-popup-wrapper-new').fadeOut();$('body').removeClass('overflow-hidden');">&times;</div>
13026           <div class="search-box-inner-mix">
13027                 <div class="search-box">
13028                    <input type="text" placeholder="Search Jumpspree" id="search-main-input" autocomplete="off">
13029                    <i class="fa-regular fa-magnifying-glass" aria-hidden="true"></i>
13030                </div>
13031                <div class="search-suggestion-list" id="search-suggestion-list" style="display:none">
13032                    <ul id="search-suggestion-list-ul">
13033                    </ul>
13034                </div>
13035            </div>  
13036              </div>
13037              
13038            <div class="search-entry" id="search-entry" style="display:none">
13039                <div class="add-post-inner">
13040                    <h3>Results</h3> 
13041                    <div class="close" onclick="$('#search-entry').hide();$('#search-popup-wrapper').show();$('#search-popup-wrapper-new').removeClass('search-res-visible');">&times;</div>
13042
13043                    <div class="search-category">
13044                        <div class="d-flex justify-content-between">
13045                            <div class="ctg-group" id="ctg-filter" data-filter="relevance">
13046                                <button class="ctg active" data-tab="Posts" onclick="setSearchActiveCategory(this)">Posts</button>
13047                                <button class="ctg" data-tab="People" onclick="setSearchActiveCategory(this)">People</button>
13048                                <button class="ctg" data-tab="Articles" onclick="setSearchActiveCategory(this)">Articles</button>
13049                                <button class="ctg" data-tab="Products" onclick="setSearchActiveCategory(this)">Products</button>
13050                                <button class="ctg" style="display:none;" data-tab="Brands" onclick="setSearchActiveCategory(this)">Brands</button>
13051                            </div>
13052                            <div class="filter-menu">
13053                                <div class="profile-drop-down">
13054                                    <a href="javascript:void(0)" onclick="window.event.cancelBubble = true;$('.more-setting-pop').removeClass('more-settings');
13054$('.status .profile-drop-down &gt; ul').hide();$(this).parents('.email-box').siblings().find('.profile-drop-down &gt; ul').hide();$(this).next().slideToggle('fast');"><i class="hgi hgi-stroke hgi-preference-vertical"></i></a>
13055
13056
13057                                    <ul style="display: none;">
13058                                        <li id="recent-filter">
13059                                            <a href="javascript:void(0)" onclick="setSearchFilter('recent')">
13060                                                <span>Most recent</span>
13061                                                <i class="hgi hgi-stroke hgi-clock-03"></i>
13062                                            </a>
13063                                        </li>
13064
13065                                        <li id="relevance-filter">
13066                                            <a href="javascript:void(0)" onclick="setSearchFilter('relevance')">
13067                                                <span>Most relevant <i class="fa-solid fa-check" aria-hidden="true"></i></span>
13068                                                <i class="hgi hgi-stroke hgi-sparkles"></i>
13069                                            </a>
13070                                        </li>
13071                                        <li style="display: none;">
13072                                            <a href="javascript:void(0)"><span>
13073                                                    Clear filters</span>
13074                                                <i class="hgi hgi-stroke hgi-cancel-circle"></i>
13075                                            </a>
13076                                        </li>
13077
13078                                    </ul>
13079
13080
13081                                </div>
13082                            </div>
13083                        </div>
13084                    </div>
13085
13086                    <div class="search-results" id="search-results" style="width: 100%">
13087                        <div id="tab-posts" class="ctg-content">
13088                        </div>
13089
13090                        <div id="tab-posts-recent" class="ctg-content" style="display: none;">
13091                        </div>
13092                        
13093                        <div id="tab-people" class="ctg-content" style="display: none; width: 100%">
13094                        </div>
13095
13096                        <div id="tab-people-recent" class="ctg-content" style="display: none; width: 100%">
13097                            
13098                        </div>
13099
13100                        <div id="tab-articles" class="ctg-content" style="display: none; width: 100%">
13101                            
13102                        </div>
13103
13104                        <div id="tab-articles-recent" class="ctg-content" style="display: none; width: 100%">
13105                        </div>
13106
13107
13108                        <div id="tab-products" class="ctg-content" style="display: none; width: 100%">
13109                        </div>
13110
13111                        <div id="tab-products-recent" class="ctg-content" style="display: none; width: 100%">
13112                        </div>
13113
13114                        <div id="tab-brands" class="ctg-content" style="display: none; width: 100%">
13115                        </div>
13116
13117                        <div id="tab-brands-recent" class="ctg-content" style="display: none; width: 100%">
13118                        </div>
13119
13120                    </div>
13121                                
13122                </div>
13123
13124            </div>
13125
13126            <div class="recommended-for-you serch-box-searchpage" id="search-history-div" style="display: none;">
13127                <div class="d-flex align-items-center justify-content-between">
13128                    <h2>Search history</h2>
13129                    <a href="javascript:void(0)" onclick="deleteAllSearch()">Clear search results</a>
13130                </div>
13131                <p>What you searched in the last 30 days.</p>
13132
13133                <div id="search-history-results">
13134                </div>
13135            </div>
13136
13137      </div>
13138</div>
13139
13140
13141<script>
13142function draftButtonForPollCalled() {
13143    let deleteAllDraftBtn = document.getElementById('deleteAllDraftBtn');
13144    $('#areyousureDraft').prop('disabled', false).text('Yes');
13145    console.log('Draft button clicked!');
13146
13147    // Gather poll data
13148    let postText = $('#pollDescription').val().trim();
13149    let pollOptions = [];
13150    $('.poll-option-input').each(function() {
13151        const optionValue = $(this).val().trim();
13152        if (optionValue) {
13153            pollOptions.push(optionValue);
13154        }
13155    });
13156
13157    let pollDuration = $('#pollDuration').val().trim();
13158    if (pollDuration === '') {
13159        pollDuration = '24'; // Default if user didn’t select anything
13160    }
13161
13162    let formData = new FormData();
13163    formData.append('postText', postText);
13164    formData.append('pollOptions', JSON.stringify(pollOptions));
13165    formData.append('duration', pollDuration);
13166    formData.append('is_blog', '2');
13167    formData.append('is_draft', '1'); // Indicates draft mode
13168
13169    $.ajax({
13170        url: base_url + '/addPost', // this save polls As a DRAFT
13171        type: 'POST',
13172        data: formData,
13173        processData: false,
13174        contentType: false,
13175        success: function(response) {
13176            let result = JSON.parse(response);
13177            if (result.status) {
13178                // Success! Now reset UI like add-post
13179                // setTimeout(function () {
13180                let message = 'Draft Saved!';
13181                deleteAllDraftBtn.style.display = 'block';
13182                showNotification('success', message);
13183
13184                // Close modal
13185                $('#save-draft').fadeOut('fast');
13186                $('#poll-save-draft').fadeOut('fast');
13187                $('.social-popup').fadeOut('fast');
13188                $('body').removeClass('overflow-hidden');
13189                $('.social-shadow').hide();
13190                $('.add-post').removeClass('add-post-opened');
13191                $('.add-post-drop-box').hide();
13192
13193                // Reset poll form
13194                $('#pollDescription').val('');
13195                $('#pollDuration').val(''); // or '24'
13196                $('#pollOptionsContainer .option:not(:last-child)').remove(); // remove all but "Add more"
13197                $('#newPollOptionInput').val('');
13198                $('.duration-btn').removeClass('selected');
13199                $('#createPollSubmit').removeClass('activated').addClass('disabled');
13200                // }, 1000);
13201                handleDiscardPollActionFinal();
13202                getSocialFeed('3', '1', '1', '');
13203            } else {
13204                showNotification('error', result.message || 'Error saving draft.');
13205            }
13206        },
13207        error: function() {
13208            showNotification('error', 'Failed to save draft. Please try again.');
13209        }
13210    });
13211}
13212
13213
13214// Define the function and attach it to the global `window` object
13215window.draftButtonCalled = function() {
13216
13217    let deleteAllDraftBtn = document.getElementById('deleteAllDraftBtn');
13218    $('#areyousureDraft').prop('disabled', false).text('Yes');
13219    console.log('Draft button clicked!');
13220    handleAddPost(1); // Save as draft
13221    setTimeout(function() {
13222        let message = 'Draft Saved!';
13223        deleteAllDraftBtn.style.display = 'block';
13224        showNotification('success', message);
13225        $('#save-draft').fadeOut('fast');
13226        $('.social-popup').fadeOut('fast');
13227        $('#post-setting-box input[type="checkbox"]').prop('checked', false);
13228        $('body').removeClass('overflow-hidden');
13229        $('.social-shadow').hide();
13230        $('.add-post').removeClass('add-post-opened');
13231        $('.add-post-drop-box').hide();
13232    }, 2000)
13233    // Perform UI updates
13234
13235};
13236
13237$(document).ready(function() {
13238    // Handle normal post submission
13239    $('#addPost-form-submit').on('click', function(e) {
13240        e.preventDefault();
13241        handleAddPost(0); // Normal post
13242    });
13243    $('#repost-form-submit').on('click', function(e) {
13244        e.preventDefault();
13245        handleAddRePost(0); // re post handeling
13246    });
13247
13248
13249
13250});
13251
13252//30 april 
13253document.getElementById('addPostTextarea').addEventListener('input', function() {
13254    let maxChars = 260;
13255    const isVerified = null;
13256    if (isVerified != 0 && isVerified != '0') {
13257        maxChars = 880;
13258    }
13259
13260    const circleRadius = 22;
13261    const circleCircumference = 2 * Math.PI * circleRadius;
13262
13263    const buttonContainerClass = $('.addPost-form-submit');
13264    const progressCircle = $('.progress');
13265    //const postText = this.value.trim();
13266    const postText = this.innerText.trim();
13267
13268    const currentLength = postText.length;
13269    const remainingChars = maxChars - currentLength;
13270
13271    const charCountDisplay = $('#char-count');
13272    charCountDisplay.text(`${remainingChars}`);
13273    charCountDisplay.css('color', remainingChars < 0 ? 'red' : '');
13274
13275    const percentage = Math.min(currentLength / maxChars, 1);
13276    const offset = circleCircumference * (1 - percentage);
13277    progressCircle.css('stroke-dasharray', `${circleCircumference}`);
13278    progressCircle.css('stroke-dashoffset', offset);
13279
13280    // 🔍 Check for media
13281    const imageInput = document.getElementById('imageInput');
13282    const videoInput = document.getElementById('videoInput');
13283    const gifBox = document.getElementById('gifPreviewBox');
13284    const gifPreview = document.getElementById('gifPreviewAddPost');
13285
13286    const hasImage = imageInput && imageInput.files.length > 0;
13287    const hasVideo = videoInput && videoInput.files.length > 0;
13288    const hasGif = gifBox && gifBox.style.display !== 'none' && gifPreview && gifPreview.getAttribute('src');
13289
13290    console.log('Text Length:', currentLength);
13291    console.log('Has Image:', hasImage);
13292    console.log('Has Video:', hasVideo);
13293    console.log('Has GIF:', hasGif);
13294
13295    // ✅ Final decision for button
13296    const shouldEnable =
13297        (currentLength > 0 && currentLength <= maxChars) ||
13298        hasImage || hasVideo || hasGif;
13299
13300    console.log('Button should be enabled?', shouldEnable);
13301
13302    if (shouldEnable) {
13303        buttonContainerClass.removeClass('disabled').addClass('active');
13304    } else {
13305        buttonContainerClass.removeClass('active').addClass('disabled');
13306    }
13307});
13308
13309
13310$(document).ready(function() {
13311
13312
13313
13314
13315    // Function to check the validity of the poll form
13316    function checkPollFormValidity() {
13317        let postText = $('#pollDescription').val().trim();
13318        let pollOptions = [];
13319        $('.poll-option-input').each(function() {
13320            const optionValue = $(this).val().trim();
13321            if (optionValue) {
13322                pollOptions.push(optionValue);
13323            }
13324        });
13325        let pollDuration = $('#pollDuration').val().trim();
13326
13327        if (postText && pollOptions.length >= 2) {
13328            $('#createPollSubmit').removeClass('disabled').addClass('activated');
13329        } else {
13330            $('#createPollSubmit').removeClass('active').addClass('disabled');
13331        }
13332    }
13333
13334    // Add new poll option
13335    /*  $('#addPollOptionBtn').on('click', function () {
13336         const newOptionValue = $('#newPollOptionInput').val().trim();
13337         if (newOptionValue) {
13338             $('#pollOptionsContainer').append(`
13339                 <div class="option">
13340                     <input type="text" class="poll-option-input" value="${newOptionValue}" readonly>
13341                 </div>
13342             `);
13343             $('#newPollOptionInput').val('');
13344             checkPollFormValidity();  // Check form validity after adding a new option
13345         } else {
13346             alert('Option text cannot be empty.');
13347         }
13348     }); */
13349
13350    // Poll description or options change
13351    $('#pollDescription, .poll-option-input, #pollDuration').on('input', function() {
13352        checkPollFormValidity(); // Check form validity whenever any input changes
13353    });
13354
13355    // Submit poll form
13356    const dayToHours = {
13357        '1 day': 24,
13358        '3 days': 72,
13359        '5 days': 120,
13360        '7 days': 168,
13361        '14 days': 336
13362    };
13363    $('.duration-btn').on('click', function() {
13364        // Remove 'selected' class from all and add to current
13365        $('.duration-btn').removeClass('selected');
13366        $(this).addClass('selected');
13367
13368        // Get text and convert to hours
13369        const selectedText = $(this).text().trim();
13370        const hours = dayToHours[selectedText];
13371
13372        if (hours) {
13373            $('#pollDuration').val(hours); // Set to input
13374        }
13375    });
13376    $('#createPollSubmit').on('click', function(e) {
13377        e.preventDefault();
13378
13379        // Get the state of the checkboxes 
13380        let commentsOff = $('#post-setting-dropup-poll input[type="checkbox"]:eq(0)').is(':checked') ?
13381            1 : 0;
13382        let hideLike = $('#post-setting-dropup-poll input[type="checkbox"]:eq(1)').is(':checked') ? 1 :
13383            0;
13384
13385
13386        let postText = $('#pollDescription').val().trim();
13387        let pollOptions = [];
13388        $('.poll-option-input').each(function() {
13389            const optionValue = $(this).val().trim();
13390            if (optionValue) {
13391                pollOptions.push(optionValue);
13392            }
13393        });
13394        let pollDuration = $('#pollDuration').val().trim();
13395        if (pollDuration === '') {
13396            pollDuration = '24'; // Default to 24 hours if empty
13397        }
13398        /* if (!pollDuration || isNaN(pollDuration) || parseInt(pollDuration) < 1) {
13399            showNotification('error', 'Please select a valid poll duration (minimum 1 hour).');
13400            return;
13401        } */
13402
13403        if (!postText || pollOptions.length < 2) {
13404            showNotification('error', 'Please add a description and at least two options.');
13405            return;
13406        }
13407
13408        let formData = new FormData();
13409        formData.append('postText', postText);
13410        formData.append('pollOptions', JSON.stringify(pollOptions));
13411        formData.append('duration', pollDuration);
13412        formData.append('is_blog', '2');
13413        formData.append('IsCommentBlocked', commentsOff);
13414        formData.append('hideLike', hideLike);
13415
13416        $.ajax({
13417            url: base_url + '/addPost', // this will save data in add post poll
13418            type: 'POST',
13419            data: formData,
13420            processData: false,
13421            contentType: false,
13422            success: function(response) {
13423                let result = JSON.parse(response);
13424                if (result.status) {
13425                    showNotification('success', 'Poll Created Successfully!');
13426                    /*  $('#create-poll').hide();
13427                     $('#pollDescription').val('');
13428                     $('#pollOptionsContainer .option:not(:last-child)').remove();
13429                     $('#pollDuration').val('24'); */
13430                    getSocialFeed('3', '1', '1', '');
13431
13432                    $('.social-popup').fadeOut('fast');
13433                    $('body').removeClass('overflow-hidden');
13434                    $('.social-shadow').hide();
13435                    $('.add-post').removeClass('add-post-opened');
13436                    $('.add-post-drop-box').hide();
13437
13438                    // Reset poll form
13439                    $('#pollDescription').val('');
13440                    $('#pollDuration').val(''); // or '24'
13441                    $('#pollOptionsContainer .option:not(:last-child)')
13442                .remove(); // remove all but "Add more"
13443                    $('#newPollOptionInput').val('');
13444                    $('.duration-btn').removeClass('selected');
13445                    $('#createPollSubmit').removeClass('activated').addClass('disabled');
13446
13447                    handleDiscardPollActionFinal();
13448
13449                    // $('#create-poll').hide();       
13450                    checkPollFormValidity(); // Ensure the button is disabled after success
13451                    // window.location.reload();
13452                } else {
13453                    showNotification('error', result.message ||
13454                        'An error occurred while creating the poll.');
13455                }
13456            },
13457            error: function(xhr, status, error) {
13458                //console.error('Error:', error);
13459                showNotification('error', 'Failed to create poll. Please try again.');
13460            }
13461        });
13462    });
13463
13464    // Initial check on page load in case of pre-filled data
13465    checkPollFormValidity();
13466});
13467</script>
13467
13468<!-- POLL ENDS HERE -->
13469
13470<div class="social-popup" id="edit-address">
13471    <div class="add-post-inner">
13472        <div class="header-post social-add-header">
13473            <div class="create-poll-head">
13474
13475                <h2>Edit Address</h2>
13476            </div>
13477
13478            <div id="step4-wrapper">
13479                <div class="add-credit-card">
13480                    <div class="card-detail" style="display:flex !important">
13481                        <div class="name-on-card">
13482                            <input type="text" placeholder="Full Name" value="vic">
13483                        </div>
13484                        <div class="name-on-card">
13485                            <input type="text" placeholder="Address Line 1" value="3 Audrey Avenue, 5 Audrey Ave">
13486                        </div>
13487
13488                        <div class="name-on-card">
13489                            <input type="text" placeholder="Address Line 2 (optional)">
13490                        </div>
13491
13492                        <div class="d-flex gap-10">
13493                            <div class="flex-1"><input type="text" placeholder="City" value="Oyster Bay"></div>
13494                            <div class="flex-1"><input type="text" placeholder="State" value="NY"></div>
13495                        </div>
13496
13497
13498
13499                        <div class="name-on-card">
13500                            <input type="text" placeholder="Zip Code" value="11771">
13501                        </div>
13502
13503                        <div class="name-on-card">
13504                            <input type="text" placeholder="Phone Number" value="+1 9177405450">
13505                        </div>
13506
13507                        <div class="save">
13508                            <button class="add-card">Save</button>
13509                        </div>
13510                        <!--
13511                                    <div class="apply-to-all">
13512                                   <label class="apply-to-all"><input type="checkbox"> Save this as my default payment method</label>
13513                               </div>
13514-->
13515                    </div>
13516                </div>
13517
13518            </div>
13519
13520
13521
13522
13523        </div>
13524    </div>
13525</div>
13526
13527<div id="embed-code" onclick="window.event.cancelBubble = true;" style="display:none !important">
13528    <h3>Embed</h3>
13529    <div class="close"><span style="cursor:pointer; color:#b8b8b8; font-size:13px"
13530            onclick="$('#embed-code').removeClass('embed-in')">Cancel</span></div>
13531    <div class="embed-inner">
13532        <h5>HTML embed code</h5>
13533        <div id="embeded-code">
13534            <div class="email-box">
13535                <div class="row">
13536                    <div class="col-md-12">
13537                        <div class="fnc mt-0 justify-content-between mb-9 align-items-start">
13538                            <div class="d-flex">
13539                                <a href="#" class="fig">
13540                                    <img src="https://cubesnack-seller.s3.amazonaws.com/products/1911240817124814.jpg"
13541                                        style="border-radius:50%" alt="Profile Photo" title="Profile Photo">
13542                                </a>
13543                                <div class="fnc-title">
13544                                    <h4>
13545                                        <a href="#" class="profile-link">Vic 🇺🇸</a>
13546                                        <img src="https://www.jumpspree.com/public/images/blue-cube.png"
13547                                            class="blue-cube-icon" alt="Verified Icon" title="Verified Icon">
13548                                    </h4>
13549                                    <p><a href="#" class="profile-link">@Vic</a></p>
13550                                </div>
13551                            </div>
13552                            <!-- Dropdown menu code -->
13553                            <div class="follow-us">
13554                                <a href="javascript:void(0)" onclick="$(this).next().slideToggle('fast')">Follow</a>
13555
13556                            </div>
13557                        </div>
13558                    </div>
13559                </div>
13560
13561                <div class="row">
13562                    <div class="col-md-12">
13563                        <div class="post-text">
13564                            <p>This is the post content. This is the post content. This is the post content. This is the
13565                                post content. This is the post content. This is the post content. This is the post
13566                                content.</p>
13567
13568                        </div>
13569
13570                    </div>
13571                </div>
13572
13573                <div class="row">
13574                    <div class="col-md-12">
13575                        <div class="d-flex justify-content-between align-items-end mt-2">
13576                            <div class="heart">
13577                                <img src="https://www.jumpspree.com/public/images/liked-heart.png" alt="Like"
13578                                    title="Like" loading="lazy">
13579                                <p>45k</p>
13580                            </div>
13581
13582                            <div class="jumpspree">
13583                                <p>Jumpspree.com <img
13584                                        src="https://www.jumpspree.com/public/images/fav-icon.png?ver:1.026"
13585                                        loading="lazy" alt="Like" title="Like"></p>
13586                            </div>
13587                        </div>
13588                    </div>
13589                </div>
13590
13591
13592
13593            </div>
13594        </div>
13595        <div class="input-embed">
13596            <input id=":r3p9:0" class="s_JGcg fFOiLQ eoXdOg" dir="auto" spellcheck="false" type="text" readonly=""
13597                aria-label="HTML embed code" value="<div style=&quot;position: relative; width: 100%; height: 0; padding-top: 216.3551%;
13598                                                        padding-bottom: 0; box-shadow: 0 2px 8px 0 rgba(63,69,81,0.16); margin-top: 1.6em; margin-bottom: 0.9em; overflow: hidden;
13599                                                        border-radius: 8px; will-change: transform;&quot;>
13600                                                        <iframe loading=&quot;lazy&quot; style=&quot;position: absolute; width: 100%; height: 100%; top: 0; left: 0; border: none; padding: 0;margin: 0;&quot;
13601                                                            src=&quot;https://www.jumpspree.com/social&quot; allowfullscreen=&quot;allowfullscreen&quot; allow=&quot;fullscreen&quot;>
13602                                                        </iframe>
13603                                                    </div>">
13604            <button class="copy-embed" type="button">Copy</button>
13605        </div>
13606    </div>
13607</div>
13608
13609<div id="share-site-link" onclick="window.event.cancelBubble = true;">
13610    <h3>Share with..</h3>
13611    <div class="close">
13612        <span style="cursor:pointer" onclick="$('#share-site-link').removeClass('share-in-open')"
13613            class="cancel">Cancel</span>
13614    </div>
13615    <div class="embed-inner share-dialog-s">
13616        <div class="link mb-5">
13617            <div class="pen-url" id="share-url">https://www.jumpspree.com/social</div>
13618            <button type="button" class="copy-link" aria-label="copy" onclick="copyToClipboard('#share-url')">
13619                <i class="fa-regular fa-copy"></i>
13620            </button>
13621        </div>
13622        <div class="targets" id="social-share-buttons">
13623            <!-- Social buttons will be dynamically inserted here -->
13624        </div>
13625    </div>
13626</div>
13627
13628
13629<div id="discard">
13630
13631    <div class="discard-box">
13632        <p>Are you sure you want to go back? Your progress is not saved yet. You can tap on Save to save your progress
13633            insted.</p>
13634        <div class="action-btn">
13635            <a href="javascript:void(0)"
13636                onclick="$('.social-popup').hide(); $('#discard').removeClass('show-discard').fadeOut(); $('body').removeClass('overflow-hidden')">Yes</a>
13637            <a href="javascript:void(0)" onclick="$('#discard').hide()">Never mind</a>
13638        </div>
13639    </div>
13640
13641</div>
13642
13643
13644
13645<div id="add-alt-tag-preview" onclick="window.event.cancelBubble = true;">
13646    <div class="d-flex align-items-center">
13647        <h3>Image Description</h3>
13648        <div class="close"><span class="cancel" style="cursor:pointer"
13649                onclick="$('#add-alt-tag').removeClass('embed-in')">Cancel</span>
13650        </div>
13651    </div>
13652    <div class="embed-inner">
13653        <p>Alt text, or "alternative text," is a written description added to images on websites or digital content to
13654            describe what the image shows. It is primarily used to improve accessibility for people with visual
13655            impairments, as screen readers can read the alt text aloud. Alt text also helps search engines understand
13656            the image content, which can improve search ranking and visibility.</p>
13657
13658        <button class="copy-embed" type="button">Close</button>
13659    </div>
13660</div>
13661
13662
13663
13664
13665<div class="discard-conformation" id="save-draft" onclick="window.event.cancelBubble = true;">
13666    <div class="save-draft">
13667        <div class="d-flex align-items-center">
13668            <h3>Save to draft?</h3>
13669        </div>
13670        <div class="save-cancel">
13671            <button id="draft-save-btn2" class="copy-embed" type="button" onClick="draftButtonCalled()">Save</button>
13672            <!-- <button class="copy-embed discard-btn" type="button"
13673                onclick="$(this).parents('.discard-conformation').fadeOut('fast');$('.social-popup').fadeOut('fast'); $('body').removeClass('overflow-hidden'); $('.social-shadow').hide();$('.add-post').removeClass('add-post-opened');$('.add-post-drop-box').hide()">Discard</button> -->
13674            <button onclick="handleClearAll()" class="copy-embed discard-btn" type="button" >Discard</button>
13675
13676        </div>
13677    </div>
13678</div>
13679
13680<div class="discard-conformation" id="poll-save-draft" onclick="window.event.cancelBubble = true;">
13681    <div class="save-draft">
13682        <div class="d-flex align-items-center">
13683            <h3>Save Poll to draft?</h3>
13684        </div>
13685        <div class="save-cancel">
13686            <button id="draft-poll-btn2" class="copy-embed" type="button"
13687                onClick="draftButtonForPollCalled()">Save</button>
13688            <!-- <button class="copy-embed discard-btn" type="button"
13689                onclick="$(this).parents('.discard-conformation').fadeOut('fast');$('.social-popup').fadeOut('fast'); $('body').removeClass('overflow-hidden'); $('.social-shadow').hide();$('.add-post').removeClass('add-post-opened');$('.add-post-drop-box').hide()">Discard</button> -->
13690            <button class="copy-embed discard-btn" type="button"
13691                onclick="handleDiscardPollActionFinal()">Discard</button>
13692
13693        </div>
13694    </div>
13695</div>
13696
13697
13698<div class="discard-conformation" id="unschedule" onclick="window.event.cancelBubble = true;">
13699    <div class="save-draft">
13700        <div class="d-flex align-items-center">
13701            <div class="flex-direction-column">
13702                <h3>Unschedule</h3>
13703                <p>Are you sure you want to unschedule this post?</p>
13704            </div>
13705        </div>
13706        <div class="save-cancel">
13707            <button class="copy-embed" type="button" onclick="$('#unschedule').fadeOut('fast')">No</button>
13708            <!-- <button class="copy-embed discard-btn" type="button"
13709                onclick="$(this).parents('.discard-conformation').fadeOut('fast');$('.social-popup').fadeOut('fast'); $('body').removeClass('overflow-hidden'); $('.social-shadow').hide();$('.add-post').removeClass('add-post-opened');$('.add-post-drop-box').hide()">Discard</button> -->
13710            <button class="copy-embed" type="button" onclick="unschedulePost()">Yes</button>
13711
13712        </div>
13713    </div>
13714</div>
13715
13716
13717<!-- Jumpspree More HTML Popup START  from here Feb 5 riaz  -->
13718
13719
13720
13721
13722
13723<div class="social-popup" id="jumpspree-more">
13724    <div class="add-post-inner">
13725
13726
13727        <div id="jpm-step1">
13728            <div id="jumpspree-more-wrapper">
13729                <div class="curved-box fixed-heading">
13730                    <div class="back-btn">
13731                        <a href="#" onclick="$('#step2-wrapper').hide(); $('#step1-wrapper').fadeIn(); ">
13732                            <img src="https://www.jumpspree.com/public/images/arrow-left.png" alt="Arrow" title="Arrow"
13733                                style="filter:invert(0); height: auto; width:13px">
13734                        </a>
13735                    </div>
13736                    <h2>Jumpspree More</h2>
13737                    <div class="terms"><a href="https://www.jumpspree.com/termsofuse" target="_blank">Terms</a></div>
13738                </div>
13739                <div class="account-setting-inner">
13740                    <div class="jumpspree-more-intro">
13741                        <div class="route_title">
13742                            <img src="https://www.jumpspree.com/public/images/logo-left.png?ver:1.06"
13743                                loading="lazy" alt="jumspree logo" title="jumspree logo"> MORE
13744                        </div>
13745                        <p>Get verified* and enhance your experience with Jumpspree More. Pick a plan to get started.
13746                        </p>
13747                    </div>
13748                    <div class="subscription-plan" id="subscription-plans"></div>
13749                    <h3>Included with Jumpspree More</h3>
13750                    <div class="jumpspree-more-wrapper mob-bot-0">
13751                        <div class="more-title">
13752                            <ul id="subscription-benefits">
13753                                <li><span class="check"><img
13754                                            src="https://www.jumpspree.com/public/images/white-check.png" alt="Check"
13755                                            title="Get a verified badge on your profile and brand page"></span>Get a
13756                                    verified badge on your profile and brand page</li>
13757                                <li><span class="check"><img
13758                                            src="https://www.jumpspree.com/public/images/white-check.png" alt="Check"
13759                                            title="Get a verified badge on your profile and brand page"></span>Publish
13760                                    long-form dynamic articles &amp; social posts</li>
13761                                <li><span class="check"><img
13762                                            src="https://www.jumpspree.com/public/images/white-check.png" alt="Check"
13763                                            title="Get a verified badge on your profile and brand page"></span>Get a
13764                                    higher character limit for social posts</li>
13765                                <li><span class="check"><img
13766                                            src="https://www.jumpspree.com/public/images/white-check.png" alt="Check"
13767                                            title="Get a verified badge on your profile and brand page"></span>Edit your
13768                                    social posts and articles for 30 minutes after
13769                                    publishing</li>
13770                                <li><span class="check"><img
13771                                            src="https://www.jumpspree.com/public/images/white-check.png" alt="Check"
13772                                            title="Get a verified badge on your profile and brand page"></span>Get
13773                                    priority placement in search and feed (beta)</li>
13774                                <li><span class="check"><img
13775                                            src="https://www.jumpspree.com/public/images/white-check.png" alt="Check"
13776                                            title="Get a verified badge on your profile and brand page"></span>Verified
13777                                    sellers get up to $200 in coverage with Jumpspree
13778                                    Purchase Protection</li>
13779                                <li><span class="check"><img
13780                                            src="https://www.jumpspree.com/public/images/white-check.png" alt="Check"
13781                                            title="Get a verified badge on your profile and brand page"></span>Get
13782                                    priority access to new features</li>
13783                                <li><span class="check"><img
13784                                            src="https://www.jumpspree.com/public/images/white-check.png" alt="Check"
13785                                            title="Get a verified badge on your profile and brand page"></span>Increased
13786                                    account security with identity verification powered
13787                                    by Stripe</li>
13788                                <li><span class="check"><img
13789                                            src="https://www.jumpspree.com/public/images/white-check.png" alt="Check"
13790                                            title="Get a verified badge on your profile and brand page"></span>Get
13791                                    priority support via chat and email</li>
13792
13793                            </ul>
13794                        </div>
13795                    </div>
13796                    <div id="payment-method" class="payment-method-outer mb-0 pb-0" style="display:none">
13797                        <div class="pro-sec">
13798                            <div class="probox">
13799                                <div class="select-business-type">
13800                                    <ul class="payment-method-select" id="payment-options"></ul>
13801                                </div>
13802                            </div>
13803                        </div>
13804                    </div>
13805                    <div class="continue-payment">
13806                        <!--  <button class="btn btn-continue deactivate" onclick="$('#jpm-step1').hide();$('#jpm-step4').fadeIn('fast');">
13807                            <i class="fa-solid fa-lock-keyhole"></i> Subscribe
13808                        </button> -->
13809                        <button class="btn btn-continue deactivate" onclick="redirectToStripe()">
13810                            <i class="fa-solid fa-lock-keyhole"></i> Subscribe
13811                        </button>
13812
13813                        <div class="subscribe-note">
13814                            <p><small>To receive a verified badge on your profile, you’ll need to complete your identity
13815                                    verification using a government-issued photo ID after you have purchased your
13816                                    subscription. Jumpspree partners with Stripe to verify your identity. Learn more
13817                                    about Stripe’s privacy policy.</small></p>
13818                        </div>
13819                    </div>
13820                </div>
13821            </div>
13822        </div>
13823
13824        <div id="jpm-step2" style="display:none">
13825            <div id="jumpspree-more-wrapper">
13826                <div class="curved-box fixed-heading">
13827                    <div class="back-btn">
13828                        <a href="#" onclick="$('#step2-wrapper').hide(); $('#step1-wrapper').fadeIn(); "><img
13829                                src="https://www.jumpspree.com/public/images/arrow-left.png" alt="Arrow" title="Arrow"
13830                                style="filter:invert(0); height: auto; width:13px"></a>
13831                    </div>
13832                    <h2>Cancel Subscription</h2>
13833                    <div class="terms"><a href="https://www.jumpspree.com/termsofuse" target="_blank">Terms</a></div>
13834
13835                </div>
13836                <div class="account-setting-inner">
13837
13838                    <div class="jumpspree-more-intro d-flex align-items-center justify-content-between mb-15">
13839                        <div class="route_title"><img
13840                                src="https://www.jumpspree.com/public/images/logo-left.png?ver:1.06"
13841                                loading="lazy" alt="jumspree logo" title="jumspree logo"> MORE
13842                        </div>
13843                        <div class="Subscribed">Subscribed</div>
13844                    </div>
13845                    <div class="your-plan">
13846                        <div class="user-details">
13847                            <div class="user-image">
13848                                <a href="#" class=""><img class="user-image"
13849                                        src="https://cubesnack-seller.s3.amazonaws.com/products/1710240254409095.jpg"
13850                                        alt="logo" title="logo"></a>
13851                            </div>
13852                            <div class="text-left profile_text">
13853                                <h4 class="icon-box-title">Vic 🇺🇸 <img
13854                                        src="https://www.jumpspree.com/public/images/blue-cube.png"
13855                                        class="blue-cube-icon" alt="Verified Icon" title="Verified Icon">
13856                                    <div>
13857                                        <small style="vertical-align:top">@vic</small>
13858                                    </div>
13859                                </h4>
13860                            </div>
13861                        </div>
13862
13863                        <div class="subscription-plan">
13864                            <div class="plan flex-dirextion-column bg-hover-off" onclick="$('#payment-method').hide()">
13865                                <div class="current-plan">
13866                                    <div class="d-flex justify-content-between">
13867                                        <div class="save"><i class="fa-solid fa-circle-check" aria-hidden="true"></i>
13868                                            Your current plan</div>
13869                                        <div class="renue"></div>
13870                                    </div>
13871                                </div>
13872                                <div class="left-plan flex-direction-column">
13873                                    <div class="d-flex justify-content-between align-items-center">
13874                                        <div class="price">Monthly - $8</div>
13875                                        <div class="plan-checked"><img
13876                                                src="https://www.jumpspree.com/public/images/white-check2.png"
13877                                                alt="Check" title="Check">
13878                                        </div>
13879                                    </div>
13880                                    <div class="plan-name">Renews on Oct 16, 2024</div>
13881                                </div>
13882                            </div>
13883                        </div>
13884                        <div class="are-you-sure">
13885                            <h3>Are you sure you want to cancel <br>your subscription?</h3>
13886                            <p>
13886By canceling your subscription you will permanently lose access to the following
13887                                features:</p>
13888                        </div>
13889                    </div>
13890                    <div class="jumpspree-more-wrapper">
13891                        <div class="more-title">
13892                            <!--                            <div class="route_title"><img src="https://www.jumpspree.com/public/images/Jumpspree-logo.png?ver:1.02" alt="Jumpspree"> More</div>-->
13893
13894                            <!--                        <h3>What’s More?</h3>-->
13895                            <ul>
13896                                <li><span class="check"><img
13897                                            src="https://www.jumpspree.com/public/images/white-check.png" alt="Check"
13898                                            title="Get a verified badge on your profile and brand page"></span>Get a
13899                                    verified badge on your profile and brand page</li>
13900                                <li><span class="check"><img
13901                                            src="https://www.jumpspree.com/public/images/white-check.png" alt="Check"
13902                                            title="Get a verified badge on your profile and brand page"></span>Publish
13903                                    long-form dynamic articles &amp; social posts</li>
13904                                <li><span class="check"><img
13905                                            src="https://www.jumpspree.com/public/images/white-check.png" alt="Check"
13906                                            title="Get a verified badge on your profile and brand page"></span>Get a
13907                                    higher character limit for social posts</li>
13908                                <li><span class="check"><img
13909                                            src="https://www.jumpspree.com/public/images/white-check.png" alt="Check"
13910                                            title="Get a verified badge on your profile and brand page"></span>Edit your
13911                                    social posts and articles for 30 minutes after
13912                                    publishing</li>
13913                                <li><span class="check"><img
13914                                            src="https://www.jumpspree.com/public/images/white-check.png" alt="Check"
13915                                            title="Get a verified badge on your profile and brand page"></span>Get
13916                                    priority placement in search and feed (beta)</li>
13917                                <li><span class="check"><img
13918                                            src="https://www.jumpspree.com/public/images/white-check.png" alt="Check"
13919                                            title="Get a verified badge on your profile and brand page"></span>Verified
13920                                    sellers get up to $200 in coverage with Jumpspree
13921                                    Purchase Protection</li>
13922                                <li><span class="check"><img
13923                                            src="https://www.jumpspree.com/public/images/white-check.png" alt="Check"
13924                                            title="Get a verified badge on your profile and brand page"></span>Get
13925                                    priority access to new features</li>
13926                                <li><span class="check"><img
13927                                            src="https://www.jumpspree.com/public/images/white-check.png" alt="Check"
13928                                            title="Get a verified badge on your profile and brand page"></span>Increased
13929                                    account security with identity verification powered
13930                                    by Stripe</li>
13931                                <li><span class="check"><img
13932                                            src="https://www.jumpspree.com/public/images/white-check.png" alt="Check"
13933                                            title="Get a verified badge on your profile and brand page"></span>Get
13934                                    priority support via chat and email</li>
13935                            </ul>
13936
13937                        </div>
13938                    </div>
13939                    <div class="continue-payment">
13940                        <div class="restore-note" style="display:none">
13941                            <h3>Are you sure you want to restore your subscription?</h3>
13942                            <p>Restoring your Jumpspree Verified subscription is super easy. You will not be required to
13943                                verify your email, phone number, and identity again. Your billing will begin starting
13944                                today. Cancel anytime.</p>
13945                        </div>
13946
13947                        <button class="btn btn-continue" type="button"
13948                            onclick="$('#jpm-step3').fadeIn('fast'); $('#jpm-step2').hide()">Proceed to cancel</button>
13949                        <div class="text-center text-white cancel-subscription">
13950                            <a href="javascript:void(0)"
13951                                onclick="$('#jpm-step2').hide(); $('#jpm-step4').fadeIn('fast');">I don’t want to
13952                                cancel</a>
13953                        </div>
13954                    </div>
13955                </div>
13956            </div>
13957        </div>
13958        <div id="jpm-step3" style="display:none">
13959            <div id="jumpspree-more-wrapper">
13960                <div class="curved-box fixed-heading">
13961                    <div class="back-btn">
13962                        <a href="javascript:void(0)" onclick="$('#jumpspree-more).fadeOut();"><img
13963                                src="https://www.jumpspree.com/public/images/arrow-left.png" alt="Arrow" title="Arrow"
13964                                style="filter:invert(0); height: auto; width:13px"></a>
13965                    </div>
13966                    <h2>Subscription</h2>
13967                    <div class="terms"><a href="https://www.jumpspree.com/termsofuse" target="_blank">Terms</a></div>
13968
13969                </div>
13970                <div class="account-setting-inner">
13971                    <div class="your-plan">
13972                        <div class="user-details mb-15">
13973                            <div class="user-image">
13974                                <a href="#" class=""><img class="user-image"
13975                                        src="https://cubesnack-seller.s3.amazonaws.com/products/1710240254409095.jpg"
13976                                        alt="logo" title="logo"></a>
13977                            </div>
13978                            <div class="text-left profile_text">
13979                                <h4 class="icon-box-title">Vic 🇺🇸 <img
13980                                        src="https://www.jumpspree.com/public/images/blue-cube.png"
13981                                        class="blue-cube-icon" alt="Verified Icon" title="Verified Icon">
13982
13983                                    <div>
13984                                        <small style="vertical-align:top">@vic</small>
13985                                    </div>
13986                                </h4>
13987                            </div>
13988                        </div>
13989
13990                        <div class="subscription-plan">
13991                            <div class="plan current-plan flex-dirextion-column bg-hover-off"
13992                                onclick="$('#payment-method').hide()">
13993                                <div class="current-plan">
13994                                    <div class="d-flex justify-content-between">
13995                                        <div class="save"><i class="fa-solid fa-circle-check" aria-hidden="true"></i>
13996                                            Your plan has been cancelled successfully.</div>
13997                                        <div class="renue"></div>
13998                                    </div>
13999                                </div>
14000                                <div class="left-plan flex-direction-column">
14001                                    <div class="price">Monthly - $8</div>
14002                                    <div class="plan-name">Renews monthly. Cancel anytime.</div>
14003                                </div>
14004
14005                            </div>
14006                        </div>
14007                        <div class="are-you-sure">
14008                            <h3>Sorry</h3>
14009                            <p>
14010                                Your Jumpspree Verified subscription has been canceled successfully. You will not be
14011                                billed further. </p>
14012                            <p>If you canceled this subscription by accident or would like to subscribe again, you can
14013                                always restore your subscription at any time. </p>
14014                            <p>Your subscription will be restored at the current pricing. Terms apply.</p>
14015                        </div>
14016                    </div>
14017                    <div class="continue-payment">
14018                        <!--
14019                        <div class="restore-note" style="display:none">
14020                            <h3>Are you sure you want to restore your subscription?</h3>
14021                            <p>Restoring your Jumpspree Verified subscription is super easy. You will not be required to
14022                                verify your email, phone number, and identity again. Your billing will begin starting
14023                                today. Cancel anytime</p>
14024                        </div>
14025-->
14026
14027                        <button class="btn btn-continue">Restore Subscription</button>
14028                        <div class="text-center text-white cancel-subscription">
14029                            <a href="#">Not now</a>
14030                        </div>
14031                    </div>
14032                </div>
14033            </div>
14034        </div>
14035
14036        <div id="jpm-step4" style="display:none">
14037            <div id="jumpspree-more-wrapper">
14038                <div class="curved-box fixed-heading">
14039                    <div class="back-btn">
14040                        <a href="javascript:void(0)" onclick="$('#jumpspree-more).fadeOut();"><img
14041                                src="https://www.jumpspree.com/public/images/arrow-left.png" alt="Back" title="Back"
14042                                style="filter:invert(0); height: auto; width:13px"></a>
14043                    </div>
14044                    <h2>Subscription</h2>
14045                    <div class="terms"><a href="https://www.jumpspree.com/termsofuse" target="_blank">Terms</a></div>
14046
14047                </div>
14048                <div class="account-setting-inner">
14049
14050                    <div class="jumpspree-more-intro d-flex align-items-center justify-content-between mb-15">
14051                        <div class="route_title"><img
14052                                src="https://www.jumpspree.com/public/images/logo-left.png?ver:1.06"
14053                                loading="lazy" alt="More" title="More"> MORE
14054                        </div>
14055
14056                        <div class="Subscribed">Subscribed</div>
14057
14058                    </div>
14059
14060                    <div class="your-plan">
14061                        <div class="subscription-plan">
14062                            <div class="plan current-plan flex-dirextion-column bg-hover-off"
14063                                onclick="$('#payment-method').hide()">
14064                                <div class="current-plan">
14065                                    <div class="d-flex justify-content-between">
14066                                        <div class="save"><i class="fa-solid fa-circle-check" aria-hidden="true"></i>
14067                                            Your current plan</div>
14068                                        <div class="renue"></div>
14069                                    </div>
14070                                </div>
14071                                <div class="left-plan flex-direction-column">
14072                                    <div class="price">Monthly - $8</div>
14073                                    <div class="plan-name">Renews on Oct 16, 2024</div>
14074                                </div>
14075
14076                            </div>
14077                            <div class="plan align-items-center  mb-0" onclick="$('#payment-method').hide()">
14078                                <label>
14079                                    <div class="left-plan flex-direction-column">
14080                                        <div class="d-flex mb-2 align-items-center">
14081                                            <div class="price">Yearly - $80</div>
14082                                            <div class="best-value">BEST VALUE</div>
14083                                        </div>
14084                                        <div class="plan-name">Save up to <span class="percent-off">17%</span> with the
14085                                            yearly plan. Renews annually.
14086                                            <br>Cancel anytime.
14087                                        </div>
14088                                    </div>
14089                                    <div class="get-plan checkbox">
14090                                        <input type="checkbox" name="get-more">
14091                                    </div>
14092                                </label>
14093                            </div>
14094                        </div>
14095                        <div class="are-you-sure">
14096                            <h3>Included with Jumpspree More</h3>
14097                            <div class="jumpspree-more-wrapper">
14098                                <div class="more-title">
14099                                    <ul>
14100                                        <li><span class="check"><img
14101                                                    src="https://www.jumpspree.com/public/images/white-check.png"
14102                                                    alt="Check"
14103                                                    title="Get a verified badge on your profile and brand page"></span>Get
14104                                            a verified badge on your profile and brand page
14105                                        </li>
14106                                        <li><span class="check"><img
14107                                                    src="https://www.jumpspree.com/public/images/white-check.png"
14108                                                    alt="Check"
14109                                                    title="Publish long-form dynamic articles &amp; social posts"></span>Publish
14110                                            long-form dynamic articles &amp; social posts
14111                                        </li>
14112                                        <li><span class="check"><img
14113                                                    src="https://www.jumpspree.com/public/images/white-check.png"
14114                                                    alt="Checked"
14115                                                    title="Get a higher character limit for social posts"></span>Get a
14116                                            higher character limit for social posts</li>
14117                                        <li><span class="check"><img
14118                                                    src="https://www.jumpspree.com/public/images/white-check.png"
14119                                                    alt="Checked" title="Edit your social posts and articles for 30 minutes
14120                                            after publishing"></span>Edit your social posts and articles for 30 minutes
14121                                            after publishing</li>
14122                                        <li><span class="check"><img
14123                                                    src="https://www.jumpspree.com/public/images/white-check.png"
14124                                                    alt="Checked"
14125                                                    title="Get priority placement in search and feed (beta)"></span>Get
14126                                            priority placement in search and feed (beta)</li>
14127                                        <li><span clas
14127s="check"><img
14128                                                    src="https://www.jumpspree.com/public/images/white-check.png"
14129                                                    alt="Checked" title="Verified sellers get up to $200 in coverage with
14130                                            Jumpspree Purchase Protection"></span>Verified sellers get up to $200 in
14131                                            coverage with
14132                                            Jumpspree Purchase Protection</li>
14133                                        <li><span class="check"><img
14134                                                    src="https://www.jumpspree.com/public/images/white-check.png"
14135                                                    alt="Checked" title="Get priority access to new features"></span>Get
14136                                            priority access to new features</li>
14137                                        <li><span class="check"><img
14138                                                    src="https://www.jumpspree.com/public/images/white-check.png"
14139                                                    alt="Checked" title="Increased account security with identity verification
14140                                            powered by Stripe"></span>Increased account security with identity
14141                                            verification
14142                                            powered by Stripe</li>
14143                                        <li><span class="check"><img
14144                                                    src="https://www.jumpspree.com/public/images/white-check.png"
14145                                                    alt="Checked"
14146                                                    title="Get priority support via chat and email"></span>Get priority
14147                                            support via chat and email</li>
14148                                    </ul>
14149
14150                                </div>
14151                            </div>
14152                        </div>
14153                    </div>
14154                    <div class="continue-payment">
14155                        <div class="restore-note" style="display:none">
14156                            <h3>Are you sure you want to restore your subscription?</h3>
14157                            <!--
14158                            <p>Restoring your Jumpspree Verified subscription is super easy. You will not be required to
14159                                verify your email, phone number, and identity again. Your billing will begin starting
14160                                today. Cancel anytime.</p>
14161-->
14162                        </div>
14163                        <button class="btn btn-continue">Switch Plan</button>
14164                        <div class="text-center text-white cancel-subscription">
14165                            <a href="javascript:void(0)"
14166                                onclick="$('#jpm-step4').hide(); $('#jpm-step2').fadeIn('fast');">Cancel
14167                                Subscription</a>
14168                        </div>
14169                    </div>
14170                </div>
14171            </div>
14172        </div>
14173
14174
14175    </div>
14176</div>
14177
14178<script>
14179function loadSubscriptionPlans() {
14180    $.ajax({
14181        url: 'subscription/plans',
14182        type: "GET",
14183        dataType: "json",
14184        success: function(response) {
14185            if (response.status === "success" && Array.isArray(response.plans)) {
14186                let plansHtml = "";
14187                response.plans.forEach((plan) => {
14188                    let bestValueBadge = plan.bestValue == "1" ?
14189                        '<div class="best-value">BEST VALUE</div>' : '';
14190
14191                    plansHtml += `
14192                        <div class="plan align-items-center">
14193                            <label onclick="handlePlanSelection('${plan.stripe_plan_id}', '${plan.stripe_price_id}', '${plan.amount}', '${plan.duration}', '${plan.body}')">
14194                                <div class="left-plan flex-direction-column">
14195                                    <div class="d-flex mb-2">
14196                                        <div class="price">${plan.duration} - $${plan.amount}</div>
14197                                        ${bestValueBadge}
14198                                    </div>
14199                                    <div class="plan-name">${plan.body}</div>
14200                                </div>
14201                                <div class="get-plan checkbox">
14202                                    <input type="radio" name="get-more" value="${plan.id}">
14203                                </div>
14204                            </label>
14205                        </div>`;
14206                });
14207
14208                $(".subscription-plan").html(plansHtml);
14209            } else {
14210                $(".subscription-plan").html(
14211                    "<p>Failed to load subscription plans. Please try again later.</p>");
14212            }
14213        },
14214        error: function(xhr, status, error) {
14215            // console.error("Error fetching plans:", error);
14216            $(".subscription-plan").html("<p>Something went wrong. Please try again later.</p>");
14217        }
14218    });
14219}
14220// Load plans lazily on first open of the Jumpspree More modal
14221var _socialPlansLoaded = false;
14222$(document).ready(function () {
14223    $(document).on('click', '[onclick*="jumpspree-more"]', function () {
14224        if (!_socialPlansLoaded) {
14225            _socialPlansLoaded = true;
14226            loadSubscriptionPlans();
14227        }
14228    });
14229});
14230
14231
14232
14233
14234
14235/* 
14236$(document).ready(function () {
14237    // Fetch subscription plans
14238    $.ajax({
14239        url: 'subscription/plans', // Replace with your actual API endpoint
14240        type: "GET",
14241        dataType: "json",
14242        success: function (response) {
14243            if (response.status === "success" && Array.isArray(response.plans)) {
14244                let plansHtml = "";
14245                response.plans.forEach((plan) => {
14246                    let bestValueBadge = plan.bestValue == "1" ? '<div class="best-value">BEST VALUE</div>' : '';
14247                    
14248                    plansHtml += `
14249                        <div class="plan align-items-center">
14250                            <label onclick="handlePlanSelection('${plan.stripe_plan_id}', '${plan.stripe_price_id}', '${plan.amount}', '${plan.duration}', '${plan.body}')">
14251                                <div class="left-plan flex-direction-column">
14252                                    <div class="d-flex mb-2">
14253                                        <div class="price">${plan.duration} - $${plan.amount}</div>
14254                                        ${bestValueBadge}
14255                                    </div>
14256                                    <div class="plan-name">${plan.body}</div>
14257                                </div>
14258                                <div class="get-plan checkbox">
14259                                    <input type="radio" name="get-more" value="${plan.id}">
14260                                </div>
14261                            </label>
14262                        </div>`;
14263                });
14264
14265                $(".subscription-plan").html(plansHtml);
14266            } else {
14267                $(".subscription-plan").html("<p>Failed to load subscription plans. Please try again later.</p>");
14268            }
14269        },
14270        error: function (xhr, status, error) {
14271            console.error("Error fetching plans:", error);
14272            $(".subscription-plan").html("<p>Something went wrong. Please try again later.</p>");
14273        }
14274    });
14275}); */
14276
14277function handlePlanSelection(planId, stripePriceId, amount, duration, body) {
14278    $('.continue-payment .btn.btn-continue').removeClass('deactivate');
14279    $('.btn.btn-continue').data('plan', {
14280        planId,
14281        stripePriceId,
14282        amount,
14283        duration,
14284        body
14285    });
14286}
14287
14288function redirectToStripe() {
14289    const planDetails = $('.btn.btn-continue').data('plan');
14290    if (!planDetails) {
14291        showNotification('error', 'Please select a plan first.');
14292        return;
14293    }
14294
14295    fetch('create-checkout-session', {
14296            method: 'POST',
14297            headers: {
14298                'Content-Type': 'application/json'
14299            },
14300            body: JSON.stringify(planDetails)
14301        })
14302        .then(response => response.json())
14303        .then(session => {
14304            console.log(session); // Debug response
14305            if (session.url) {
14306                window.location.href = session.url; // Redirect to Stripe Checkout
14307            } else {
14308                console.error('Stripe session URL is missing:', session);
14309            }
14310
14311        })
14312        .catch(error => {
14313            console.error('Error creating checkout session:', error);
14314            showNotification('error', 'Something went wrong, please try again.');
14315        });
14316}
14317</script>
14317
14318
14319<!-- Jumpree MORE END  -->
14320
14321
14322<div class="discard-conformation" id="jumpspree-more-popup" onclick="window.event.cancelBubble = true;">
14323    <div class="save-draft">
14324        <div class="d-flex align-items-center">
14325            <img src="https://www.jumpspree.com/public/images/more.png?ver=1_20008" alt="More" title="More" loading="lazy">
14326            <h3>Jumpspree More</h3>
14327            <p>Get verified and enhance your experience with Jumpspree More. While we’re working on bringing Jumpspree
14328                More to the Web, it is currently available in the Jumpspree App for iOS and Android only.</p>
14329        </div>
14330        <div class="save-cancel">
14331            <a href="https://www.jumpspree.com/download-the-official-jumpspree-app-for-ios-and-android">Open
14332                Jumpspree</a>
14333            <!-- <button class="copy-embed discard-btn" type="button"
14334                onclick="$(this).parents('.discard-conformation').fadeOut('fast');$('.social-popup').fadeOut('fast'); $('body').removeClass('overflow-hidden'); $('.social-shadow').hide();$('.add-post').removeClass('add-post-opened');$('.add-post-drop-box').hide()">Discard</button> -->
14335            <button class="copy-embed discard-btn" type="button">Maybe later</button>
14336
14337        </div>
14338    </div>
14339</div>
14340
14341<div class="discard-conformation" id="qrcode-popup" onclick="window.event.cancelBubble = true;">
14342    <div class="save-draft">
14343        <div class="d-flex align-items-center">
14344            <img src="https://www.jumpspree.com/public/images/qrcode.png?ver=1_20008" alt="QR Code" title="QR Code">
14345            <h3>Create your personalized QR code</h3>
14346            <p>Currently you can create your QR code in the Jumpspree app only. We’re working on building this
14347                functionality on the website as quickly as possible.</p>
14348        </div>
14349        <div class="save-cancel">
14350            <a href="https://www.jumpspree.com/download-the-official-jumpspree-app-for-ios-and-android">Open
14351                Jumpspree</a>
14352            <!-- <button class="copy-embed discard-btn" type="button"
14353                onclick="$(this).parents('.discard-conformation').fadeOut('fast');$('.social-popup').fadeOut('fast'); $('body').removeClass('overflow-hidden'); $('.social-shadow').hide();$('.add-post').removeClass('add-post-opened');$('.add-post-drop-box').hide()">Discard</button> -->
14354            <button class="copy-embed discard-btn" type="button" onclick="$('#qrcode-popup').fadeOut('fast');">Maybe later</button>
14355
14356        </div>
14357    </div>
14358</div>
14359
14360<div class="discard-conformation" id="unfollow-confirmation" onclick="window.event.cancelBubble = true;">
14361    <div class="save-draft">
14362        <div class="d-flex align-items-center">
14363            <h3>Are you sure you want to unfollow <span id="unfollowusernamefooter"></span>?</h3>
14364        </div>
14365        <div class="save-cancel">
14366            <button class="copy-embed" type="button"
14367                onclick="$(this).parents('.discard-conformation').fadeOut('fast');$('.fcb').removeClass('show-tip');$('.social-popup').fadeOut('fast'); $('body').removeClass('overflow-hidden'); $('.social-shadow').hide();$('.add-post').removeClass('add-post-opened');$('.add-post-drop-box').hide();">Cancel</button>
14368
14369            <button class="copy-embed discard-btn unfollow-btn" data-rec="0" data-feed="0" data-user="0" data-type="0"
14370                id="footerunfollowbtn" type="button" onclick="unfollow()">Unfollow</button>
14371
14372        </div>
14373    </div>
14374</div>
14375<div class="discard-conformation" id="bu-confirmation" onclick="window.event.cancelBubble = true;">
14376    <div class="save-draft">
14377        <div class="d-flex align-items-center">
14378            <h3>Are you sure you want to <span id="butype"></span> <span id="buusername"></span>?</h3>
14379        </div>
14380        <div class="save-cancel">
14381            <button class="copy-embed" type="button"
14382                onclick="$(this).parents('.discard-conformation').fadeOut('fast');$('.fcb').removeClass('show-tip');$('.social-popup').fadeOut('fast'); $('body').removeClass('overflow-hidden'); $('.social-shadow').hide();$('.add-post').removeClass('add-post-opened');$('.add-post-drop-box').hide();">Cancel</button>
14383
14384            <button class="copy-embed discard-btn" data-rec="0" data-user="0" data-type="0" id="bubtn" type="button"
14385                onclick="blockUserFromFeed(this)"></button>
14386
14387        </div>
14388    </div>
14389</div>
14390
14391
14392<div class="discard-conformation" id="dp-confirmation" onclick="window.event.cancelBubble = true;">
14393    <div class="save-draft">
14394        <div class="d-flex align-items-center">
14395            <h3 id="delete-confirmation-text">Are you sure you want to delete this post?</h3>
14396        </div>
14397        <div class="save-cancel">
14398            <button id="deleteCancleBtn" class="copy-embed" type="button"
14399                onclick="$(this).parents('.discard-conformation').fadeOut('fast');$('.fcb').removeClass('show-tip');$('.social-popup').fadeOut('fast'); $('body').removeClass('overflow-hidden'); $('.social-shadow').hide();$('.add-post').removeClass('add-post-opened');$('.add-post-drop-box').hide();">Keep
14400                it</button>
14401
14402            <button class="copy-embed discard-btn" data-rec="0" data-id="0" data-feed="0" id="dpbtn" type="button"
14403                onclick="deleteUserPost(this)">Delete</button>
14404
14405        </div>
14406    </div>
14407</div>
14408
14409<div class="discard-conformation" id="discard-save-draft" onclick="window.event.cancelBubble = true;">
14410    <div class="save-draft">
14411        <div class="d-flex align-items-center">
14412            <h3>Are you sure you want to delete all drafts?</h3>
14413        </div>
14414        <div class="save-cancel">
14415            <!-- <button class="copy-embed" type="button"
14416                onclick="$('.draft-outer .drafts').remove(); $(this).parents('.discard-conformation').fadeOut('fast'); $('.no-drafts').addClass('no-draft-show')">Yes</button> -->
14417            <button id='areyousureDraft' class="copy-embed" type="button" onclick="deleteAllDrafts()">Yes</button>
14418
14419            <!-- <button id = "discard-btn" class="copy-embed discard-btn" type="button"
14420                onclick="$(this).parents('.discard-conformation').fadeOut('fast');" style="color:#bbb !important">Never
14421                mind</button> -->
14422            <button id="discard-btn-deleteall" class="copy-embed discard-btn" onclick="handleDiscardPollActionFinal()"
14423                type="button">Discard</button>
14424
14425        </div>
14426    </div>
14427</div>
14428
14429
14430
14431<div class="share-shadow"></div>
14432
14433<div class="get-app-qr-code-wrapper" id="ios-app">
14434    <div class="email-verification after-login">
14435        <div class="close-getstart" onclick="$('#ios-app').fadeOut('fast');">×</div>
14436        <div class="email-box">
14437            <h4 class="text-center">Get Jumpspree <br>for iOS</h4>
14438
14439
14440            <div class="scanner">
14441                <a target="_blank"
14442                    href="https://apps.apple.com/us/app/jumpspree-make-friends-shop/id1558701442?ign-itscg=30200&ign-itsct=apps_box_link&mttnsubad=1558701442"><img
14443                        src="https://www.jumpspree.com/public/images/Jumpspree-for-iOS-n.png?ver:1.02" alt="Jumpspree-for-iOS" title="Jumpspree-for-iOS"></a>
14444            </div>
14445
14446            <div class="download-btn">
14447                <a target="_blank"
14448                    href="https://apps.apple.com/us/app/jumpspree-make-friends-shop/id1558701442?ign-itscg=30200&ign-itsct=apps_box_link&mttnsubad=1558701442"><img
14449                        src="https://www.jumpspree.com/public/images/ios-download.png" alt="Download"
14450                        title="Download"></a>
14451            </div>
14452
14453
14454            <div class="note-line">
14455                <p class="mb-0">Scan the QR code with your smartphone or tablet to download the Jumpspree app for iOS,
14456                    or simply tap the button on your mobile device.</p>
14457            </div>
14458
14459            <div class="get-androd-app">
14460                <a href="javascript:void(0);" onclick="$('#android-app').fadeIn(); $('#ios-app').hide()">Get Jumpspree
14461                    for Android instead</a>
14462            </div>
14463
14464
14465
14466        </div>
14467        <!--
14468                       <div class="action-wrapper">
14469                           <button class="btn btn-success">Claim Username</button>
14470                       </div>
14471        -->
14472    </div>
14473</div>
14474
14475<div class="get-app-qr-code-wrapper" id="android-app">
14476    <div class="email-verification after-login">
14477        <div class="close-getstart" onclick="$('#android-app').fadeOut('fast');">×</div>
14478
14479        <div class="email-box" style="border: none !important;">
14480            <h4 class="text-center">Get Jumpspree <br>for Android</h4>
14481
14482
14483            <div class="scanner">
14484                <a target="_blank" href="https://play.google.com/store/apps/details?id=com.blueastral.cubesnack&hl=en">
14485                    <img src="https://www.jumpspree.com/public/images/Jumpspree-for-Android-n.png?ver:1.028"
14486                        alt="Jumpspree for Android" title="Jumpspree for Android"></a>
14487            </div>
14488
14489            <div class="download-btn">
14490                <a target="_blank"
14491                    href="https://play.google.com/store/apps/details?id=com.blueastral.cubesnack&hl=en"><img
14492                        src="https://www.jumpspree.com/public/images/download-android.png" alt="Download"
14493                        title="Download"></a>
14494            </div>
14495
14496
14497            <div class="note-line">
14498                <p class="mb-0">Scan the QR code with your smartphone or tablet to download the Jumpspree app for
14499                    Android, or simply tap the button on your mobile device..</p>
14500            </div>
14501
14502            <div class="get-androd-app">
14503                <a href="javascript:void(0);" onclick="$('#android-app').hide(); $('#ios-app').fadeIn()">Get Jumpspree
14504                    for iOS instead</a>
14505            </div>
14506
14507
14508
14509        </div>
14510        <!--
14511                       <div class="action-wrapper">
14512                           <button class="btn btn-success">Claim Username</button>
14513                       </div>
14514        -->
14515    </div>
14516</div>
14517
14518
14519<div class="profile-menu" style="display: none;">
14520    <div class="profile-heading">
14521        <div class="d-flex justify-content-between w100 align-items-center">
14522            <h2>Profile</h2>
14523            <div class="d-flex gap-3">
14524
14525                <li class="share-post uplad hide-on-desktop">
14526                    <a href="javascript:void(0)"
14527                        onclick="$('#theme-mobile').fadeIn('fast'); setTimeout(function(){
14528                        $('#theme-inside').addClass('showMe');
14529                        },300)">
14530                        <span class="c-img">
14531                            <img src="https://www.jumpspree.com/public/images/sun-01.png" alt="">
14532                        </span>
14533                    </a> 
14534                </li>
14535
14536
14537                   
14538                   <li class="share-post uplad hide-on-desktop"> 
14539                    <a href="javascript:void(0)"
14540                        onclick="window.event.cancelBubble = true; openShareDialog('profile-https://www.jumpspree.com'); $('.drop-down-menu-share').hide(); $('#embed-code').removeClass('embed-in');">
14541                        <span class="c-img">
14542                            <i class="hgi hgi-stroke hgi-sent"></i>
14543                        </span>
14544                    </a>
14545                </li>
14546
14547                <li class="share-post uplad hide-on-desktop">
14548                    <a href="javascript:void(0)" onclick="$('#qrcode-popup').fadeIn('fast')"><span class="c-img"><i
14549                                class="hgi hgi-stroke hgi-qr-code" aria-hidden="true"></i></span></a>
14550                </li>
14551            </div>
14552        </div>
14553        <div class="screen-mode" style="display:none">
14554
14555            <li onclick="$('.screen-mode-footer').addClass('show-mode');" class="light-mode active"><a href="#"
14556                    class="sidebar"><span class="route_title"><span><i
14557                                class="fa-regular fa-brightness"></i></span></span> </a></li>
14558            <!--                    <li onclick="$('body').addClass('dark-mode'); $(this).addClass('active'); $('.light-mode').removeClass('active')" class="dark-mode"><a  href="#"  class="sidebar"><span class="route_title"><span><i class="fa-solid fa-moon"></i></span> </span> </a></li>-->
14559
14560        </div>
14561    </div>
14562
14563
14564        <div class="profile-sign-in"
14565        data-name="none"
14566        style="">
14567        <button class="btn btn-primary"
14568            onclick="$('#signup-new-process').hide();$('#signin-new-process').fadeIn('fast'); $('body').addClass('overflow-hidden');">Sign
14569            in</button>
14570        <button class="btn btn-outline" onclick="window.location.href='https://www.jumpspree.com/sign-up'">Create
14571            Account</button>
14572    </div>
14573
14574    <div class="profile-menu-inner">
14575        <div class="meu-tabbing d-flex" style="display:none !important">
14576            <h5 id="menu-tab1"
14577                onclick="$('#app-menu').hide(); $('#account-setting').fadeIn(); $(this).addClass('active'); $('#menu-tab2').removeClass('active'); $('#menu-tab3').removeClass('active'); $('#about-menu').hide();"
14578                class="active">General Settings</h5>
14579            <!--
14580                                <h5 id="menu-tab2"
14581                                    onclick="$('#app-menu').fadeIn(); $('#account-setting, #about-menu').hide(); $(this).addClass('active'); $('#menu-tab1, #menu-tab3').removeClass('active')">
14582                                    Seller Settings</h5>
14583                    -->
14584            <h5 id="menu-tab3"
14585                onclick="$('#account-setting, #app-menu').hide(); $('#about-menu').fadeIn(); $(this).addClass('active'); $('#menu-tab1, #menu-tab2').removeClass('active')">
14586                About</h5>
14587
14588        </div>
14589
14590        <!--        New section  -->
14591        <!--
14592         <style>
14593            .profile-menu div#account-setting.creator-settings .arrow
14594           {
14595                opacity: 1 !important;
14596            }
14597            .profile-menu div#account-setting.creator-settings p{color: #999;
14598    margin-bottom: 0;
14599    font-size: 12px;
14600    line-height: 14px;
14601    padding-left: 30px; }
14602.suer-creator-new-sec {
14603    background: #141414;
14604    border: 1px solid #1f1f1f;
14605    padding: 20px;
14606    background: #0e0e0e;
14607    border: 1px solid #141414;
14608    border-radius: 25px;
14609    margin-bottom: 20px;
14610}
14611.super-creator-text .gradient-text span {
14612    font-size: 10px;
14613    padding: 2px 7px;
14614}            
14615.suer-creator-new-sec .action-btn img {
14616    width: 10px;
14617}
14618.suer-creator-new-sec .action-btn {
14619    gap: 15px;
14620    margin-top: 15px;
14621}
14622.suer-creator-new-sec .text {
14623    font-size: 12px;
14624    line-height: 15px;
14625    color: #fff;
14626}            
14627.suer-creator-new-sec .action-btn button.btn {
14628    margin: 0;
14629    flex: 1;
14630    max-width: 50%;
14631    font-size: 10px;
14632    border-radius: 35px;
14633    padding: 10px 7px;
14634} 
14635.suer-creator-new-sec .image-icon {
14636    max-width: 30px;
14637}            
14638.suer-creator-new-sec .super-creator-text {
14639    padding: 0;
14640}            
14641.suer-creator-new-sec .super-creator-text .gradient-text {
14642    font-size: 23px;
14643}
14644.suer-creator-new-sec{position: relative;}            
14645.suer-creator-new-sec .cross-syper-creator {
14646    max-width: 20px;
14647    position: absolute;
14648    right: 19px;
14649    top: 19px;
14650    pointer-events: none;
14651}           
14652div#account-setting.creator-settings li {
14653    padding-right: 0px;
14654}            
14655div#account-setting.creator-settings li a {
14656    padding-right: 15px;
14657}            
14658 .close-super-creator-account span{color: #ff004d}  
14659 .close-super-creator-account i {
14660    color: #ff004d !important;
14661}
14662div#account-setting.creator-settings {
14663    margin-bottom: 25px;
14664}            
14665            @media screen(max-width:767px){
14666                div#account-setting.creator-settings i.hgi.hgi-stroke {
14667        position: relative;
14668        top: 0;
14669        float: left;
14670    }    
14671                div#account-setting.creator-settings {
14672                    padding: 30px 20px;
14673                }
14674            }    
14675        </style>
14676-->
14677
14678
14679        <div class="suer-creator-new-sec" style="display:none">
14680            <div class="cross-syper-creator-btn" onclick="$('.suer-creator-new-sec').hide();"><img
14681                    src="https://www.jumpspree.com/public/images/cros.png" alt=""></div>
14682            <div class="image-icon"><img src="https://www.jumpspree.com/public/images/super-creator-icon.png" alt="">
14683            </div>
14684            <div class="super-creator-text">
14685                <div class="sc-head gradient-text">Super Creator <span>New</span></div>
14686            </div>
14687            <div class="text">An invite-only, performance-based program for social-first creators on Jumpspree who
14688                consistently drive views, engagement, and build community.</div>
14689
14690            <div class="action-btn">
14691                <button class="btn" type="button"
14692                    onclick="window.location.href='https://www.jumpspree.com/super-creator'">Learn More <img
14693                        src="https://www.jumpspree.com/public/images/tilt-arrow.png" alt=""></button>
14694                <button class="btn" type="button" onclick="checkSuperCreatorEligibility()">Check your eligibility <i
14695                        style="color:#000;margin-left: 0;
14696    margin-right: 0;" class="hgi hgi-stroke hgi-arrow-right-01"></i></button>
14697            </div>
14698        </div>
14699
14700
14701        <h2 style="display:none">Creator Settings</h2>
14702        <div id="account-setting" class="creator-settings" style="display:none">
14703            <ul>
14704
14705                <li><a href="#"
14706                        onclick="$('#engagement-and-insights').show(); $('body').addClass('overflow-hidden'); getEngagementStats();"><span><i
14707                                class="hgi hgi-stroke hgi-analytics-01"></i> <span>Engagement Insights</span>
14708                            <br>
14709                            <p>Understand how your content is performing with advanced AI insights and recommendations.
14710                            </p>
14711                        </span></a>
14712                </li>
14713                <li><a href="#"
14714                        onclick="$('#payments-and-transactions').show();$('body').addClass('overflow-hidden'); getEarningsData(); getConnectedBanks();"><span><i
14715                                class="hgi hgi-stroke hgi-credit-card-pos"></i> <span>Earnings and Transactions</span>
14716                            <br>
14717                            <p>Manage your payment methods, see transactions and control how you receive funds.</p>
14718                        </span></a>
14719                </li>
14720                <li><a href="#"
14721                        onclick="$('#tips-and-donations').show(); $('body').addClass('overflow-hidden'); getAllTipsDetails()"><span><i
14722                                class="hgi hgi-stroke hgi-tips"></i> <span>Tips and Donations</span>
14723                            <br>
14724                            <p>Manage all your tips and donations settings to maximize community support.</p>
14725                        </span></a>
14726                </li>
14727                <li><a href="#"><span><i class="fa-regular fa-bag-shopping"></i> <span>Manage Merch</span>
14728                            <br>
14729                            <p>Create and manage your listings seamlessly in one place.</p>
14730                        </span> </a>
14731                </li>
14732                <li><a href="#"
14733                        onclick="$('#check-eligibility').show(); $('body').addClass('overflow-hidden'); checkSuperCreatorEligibility();"><span><i
14734                                class="hgi hgi-stroke hgi-eye"></i> <span>Eligibility Status</span>
14735                            <br>
14736                            <p>Keep an eye on your eligibility status to ensure you’re eligible at all times.</p>
14737                        </span> </a>
14738                </li>
14739                <li class="close-super-creator-account"><a href="#"
14740                        onclick="$('#close-creator-account').show(); $('body').addClass('overflow-hidden');"><span><i
14741                                class="hgi hgi-stroke hgi-cancel-circle"></i> <span>Close Creator Account</span>
14742                            <br>
14743                            <p>We don’t want you to leave but if you have to, we’re here to help securely close your
14744                                account.</p>
14745                        </span></a>
14746                </li>
14747
14748
14749            </ul>
14750
14751        </div>
14752
14753
14754
14755       <div id="account-setting" style="margin-bottom:20px; padding-bottom: 20px !important;">
14756        <ul style="padding-bottom: 0px !important;">
14757         <li>
14757<a href="javascript:void(0)" onclick="$('#account-setting-slider').addClass('showAccountSlider')"><span><i class="hgi hgi-stroke hgi-pencil-edit-02"
14758                                aria-hidden="true"></i> <span>Account Settings</span></span></a>
14759                </li>
14760         <li><a href="javascript:void(0)"
14761                        onclick="$('#add-intrest').show(); $('body').addClass('overflow-hidden'); setTimeout(function(){$('#add-intrest .inner-topics-links').addClass('showMe')},200); displayUserInterests();"><span><i
14762                                class="hgi hgi-stroke hgi-align-box-bottom-center"></i> <span>Topics and
14763                                Interests</span></span></a>
14764                </li>  
14765        <li><a href="javascript:void(0)" style="padding-bottom: 0;"
14766                        onclick="$('#add-links').show(); $('body').addClass('overflow-hidden'); setTimeout(function(){$('#add-links .inner-topics-links').addClass('showMe')},200); displayUserLinks();"><span><i
14767                                class="hgi hgi-stroke hgi-link-05" aria-hidden="true"></i> <span>Manage
14768                                Links</span></span></a>
14769                </li>                
14770        </ul>
14771        </div>
14772
14773       
14774        <!--        New section  -->
14775
14776        <h2>Profile Settings</h2>
14777        <div id="account-setting">
14778            <ul>
14779
14780                <!--
14781                                <li><a href="#"><span><i class="fa-regular fa-bag-shopping"></i> <span>Change Theme</span></span> <span
14782                                            class="arrow"><i class="fa-regular fa-angle-right"></i></span></a></li>
14783                -->
14784                <!--
14785                                <li><a href="#"><span><i class="fa-light fa-gift"></i> <span>Refer a Friend</span></span> <span
14786                                            class="arrow"><i class="fa-regular fa-angle-right"></i></span></a></li>
14787                -->
14788                <!--
14789                                <li><a href="#"><span><i class="fa-regular fa-envelope"></i> <span>Change Email</span></span> <span
14790                                            class="arrow"><i class="fa-regular fa-angle-right"></i></span></a></li>
14791                                <li><a href="#"><span><i class="fa-regular fa-at"></i> <span>Change Username</span></span> <span
14792                                            class="arrow"><i class="fa-regular fa-angle-right"></i></span></a></li>
14793                                <li><a href="#"><span><i class="fa-light fa-key"></i> <span>Change Password</span></span> <span
14794                                            class="arrow"><i class="fa-regular fa-angle-right"></i></span></a></li>            
14795
14796                                <li><a href="#"><span><i class="fa-regular fa-bookmark"></i> <span>Bookmarks</span></span> <span
14797                                            class="arrow"><i class="fa-regular fa-angle-right"></i></span></a></li>
14798                                <li><a href="#"><span><i class="fa-regular fa-browsers"></i> <span>Browsing History</span></span> <span
14799                                            class="arrow"><i class="fa-regular fa-angle-right"></i></span></a></li>  
14800                                <li><a href="#"><span><i class="fa-regular fa-bag-shopping"></i> <span>Manage Purchases</span></span> <span
14801                                            class="arrow"><i class="fa-regular fa-angle-right"></i></span></a></li>                        
14802                -->
14803                <!--
14804                                <li><a href="#"><span><i class="fa-regular fa-bells"></i> <span>Notification Settings</span></span>
14805                                        <span class="arrow"><i class="fa-regular fa-angle-right"></i></span></a></li>
14806                -->
14807                <!--
14808                                <li><a href="#"><span><i class="fa-regular fa-users"></i> <span>Follower Settings</span></span>
14809                                        <span class="arrow"><i class="fa-regular fa-angle-right"></i></span></a></li> 
14810                                <li><a href="#"><span><i class="fa-regular fa-lock"></i> <span>Online Status</span></span>
14811                                        <span class="arrow"><i class="fa-regular fa-angle-right"></i></span></a></li>
14812                                <li><a href="#"><span><i class="fa-regular fa-stars"></i> <span>Rate Jumpspree</span></span>
14813                                        <span class="arrow"><i class="fa-regular fa-angle-right"></i></span></a></li> 
14814                                <li><a href="#"><span><i class="fa-regular fa-thumbs-up"></i> <span>Help Us Improve</span></span>
14815                                        <span class="arrow"><i class="fa-regular fa-angle-right"></i></span></a></li> 
14816                -->
14817                <li><a href="https://www.jumpspree.com/profile-edit"><span><i class="hgi hgi-stroke hgi-pencil-edit-02"
14818                                aria-hidden="true"></i> <span>Edit Profile</span></span></a>
14819                </li>
14820                <li><a href="javascript:void(0)"
14821                        onclick="$('#add-intrest').show(); $('body').addClass('overflow-hidden'); setTimeout(function(){$('#add-intrest .inner-topics-links').addClass('showMe')},200); displayUserInterests();"><span><i
14822                                class="hgi hgi-stroke hgi-align-box-bottom-center"></i> <span>Topics and
14823                                Interests</span></span></a>
14824                </li>
14825                <li><a href="javascript:void(0)"
14826                        onclick="$('#add-links').show(); $('body').addClass('overflow-hidden'); setTimeout(function(){$('#add-links .inner-topics-links').addClass('showMe')},200); displayUserLinks();"><span><i
14827                                class="hgi hgi-stroke hgi-link-05" aria-hidden="true"></i> <span>Manage
14828                                Links</span></span></a>
14829                </li>
14830                <li><a href="javascript:void(0)"
14831                        onclick="window.event.cancelBubble = true; openShareDialog('profile-https://www.jumpspree.com'); $('.drop-down-menu-share').hide(); $('#embed-code').removeClass('embed-in');"><span><i
14832                                class="hgi hgi-stroke hgi-sent"></i> <span>Share Profile</span></span></a>
14833                </li>
14834                <li><a href="https://www.jumpspree.com/change-username"><span><i class="hgi hgi-stroke hgi-at"
14835                                aria-hidden="true"></i> <span>Change Username</span></span></a></li>
14836                <li><a href="https://www.jumpspree.com/change-password"><span><i
14837                                class="hgi hgi-stroke hgi-lock-password" aria-hidden="true"></i> <span>Change
14838                                Password</span></span></a></li>
14839                <!--
14840                <li><a href="https://www.jumpspree.com/follower-settings"><span><i class="hgi hgi-stroke hgi-user-group"
14841                                aria-hidden="true"></i> <span>Follower Settings</span></span></a></li>
14842-->
14843                <!--
14844                <li><a href="https://www.jumpspree.com/bookmarks"><span><i class="hgi hgi-stroke hgi-bookmark-02"
14845                                aria-hidden="true"></i> <span>Bookmarks</span></span></a></li>
14846-->
14847                <!--
14848                <li><a href="https://www.jumpspree.com/online-status"><span><i class="hgi hgi-stroke hgi-user-lock-01"
14849                                aria-hidden="true"></i> <span>Online Status</span></span></a></li>
14850-->
14851                <!--
14852                <li><a href="mailto:[email protected]"><span><i class="hgi hgi-stroke hgi-sharp hgi-bubble-chat"></i>
14853                            <span>Contact Support</span></span>
14854                        <span class="arrow"><i class="hgi hgi-stroke hgi-square-lock-02"></i></span></a></li>
14855-->
14856                <!--
14857                <li><a href="https://www.jumpspree.com/privacypolicy"><span><i class="hgi hgi-stroke hgi-square-lock-02"></i>
14858                            <span>Privacy Policy</span></span>
14859                        <span class="arrow"><i class="hgi hgi-stroke hgi-filter-mail-square"></i></span></a></li>
14860-->
14861                <!--
14862                <li><a href="https://www.jumpspree.com/termsofuse"><span><i class="hgi hgi-stroke hgi-filter-mail-square"></i>
14863                            <span>Terms of Use</span></span>
14864                        <span class="arrow"><i class="fa-regular fa-angle-right"></i></span></a></li>
14865-->
14866                <!--
14867                <li><a href="https://www.jumpspree.com/frequently-asked-questions"><span><i
14868                                class="fa-regular fa-circle-question"></i> <span>FAQ</span></span>
14869                        <span class="arrow"><i class="fa-regular fa-angle-right"></i></span></a></li>
14870-->
14871
14872
14873                <!--                    <li><a href="#"><span><i class="fa-regular fa-user"></i> <span>Manage Profile</span></span> <span class="arrow"><i class="fa-regular fa-angle-right"></i></span></a></li>-->
14874
14875
14876
14877
14878                <!--                    <li><a href="#"><span><i class="fa-regular fa-bookmark"></i> <span>Wishlist</span></span> <span class="arrow"><i class="fa-regular fa-angle-right"></i></span></a></li> -->
14879
14880                <!--                    <li><a href="#"><span><span class="jv-btn"><img src="https://www.jumpspree.app/public/images/blue---tick.png" width="20" alt="Jumpspree"></span> <span>Jumpspree Verified</span></span> <span class="arrow"><i class="fa-regular fa-angle-right"></i></span></a></li> -->
14881                <!--                    <li><a href="#"><span><i class="fa-regular fa-tags"></i> <span>Sell with Jumpspree</span></span> <span class="arrow"><i class="fa-regular fa-angle-right"></i></span></a></li> -->
14882            </ul>
14883            <ul>
14884                <li class="bluecube-icon" style="display: none">
14885                    <a href="#" class="sidebar">
14886                        <div class="lock-icon">
14887                            <img src="https://www.jumpspree.com/public/images/lock-icon.png" loading="lazy"
14888                                style="width:20px !important" alt="Lock icon" title="Lock icon">
14889                        </div>
14890                        <div class="jumpspree-more">
14891                            <span class="route_title">Unlock more with Jumpspree More</span>
14892                            <p>Upgrade to Jumpspree More and get premium benefits at a lower price.</p>
14893                        </div>
14894                        <div class="manage-btn">Upgrade Now</div>
14895                    </a>
14896                </li>
14897
14898                <!--
14899                                    <li class="bluecube-icon">
14900                                        <a href="#" class="sidebar">
14901                                            <div class="lock-icon">
14902                                                <img src="https://www.jumpspree.com/public/images/check-white.png" style="width:20px;filter: invert(0) !important;" alt="Jumpspree">
14903                                            </div>
14904                                            <div class="jumpspree-more">
14905                                                <span class="route_title"><img src="https://www.jumpspree.com/public/images/Jumpspree-logo.png?ver:1.02" alt="Jumpspree" style="filter: invert(1);width: 120px !important;display: inline-block;margin: 0 !important;margin-right: 5px !important;"> <span class="more">More</span></span>
14906                                                <p>You are currently subscribed to Jumpspree More.</p>
14907                                            </div>
14908                                            <div class="manage-btn">Manage</div>
14909                                        </a>
14910                                    </li>
14911                    -->
14912            </ul>
14913        </div>
14914        <br>
14915        <h2>General Settings</h2>
14916        <div id="account-setting">
14917            <ul>
14918
14919
14920<!--
14921                <li id="change-theme-btn"><a href="javascript:void(0)">
14922                <span><i class="hgi hgi-stroke hgi-sun-03"></i> <span>Change Theme</span></span></a></li>  
14923-->
14924                               
14925                <li><a href="https://www.jumpspree.com/bookmarks"><span style="display:flex;align-items:center"><i style="top: 0;" class="hgi hgi-stroke hgi-bookmark-02"
14926                                aria-hidden="true"></i> <span>Bookmarks</span></span></a></li> 
14927                <li><a href="https://www.jumpspree.com/browsing-history"><span style="display: flex;align-items: center;"><i class="hgi hgi-stroke hgi-layers-02"></i> <span>Browsing History</span></span></a></li>                                
14928                                
14929                <li><a href="https://www.jumpspree.com/follower-settings"><span><i class="hgi hgi-stroke hgi-user-group"
14930                                aria-hidden="true"></i> <span>Follower Settings</span></span></a></li>
14931                
14932                
14933
14934                <li><a href="https://www.jumpspree.com/online-status"><span><i class="hgi hgi-stroke hgi-user-lock-01"
14935                                aria-hidden="true"></i> <span>Online Status</span></span></a></li>
14936                <!--
14937                <li><a href="mailto:[email protected]"><span><i class="hgi hgi-stroke hgi-sharp hgi-bubble-chat"></i>
14938                            <span>Contact Support</span></span>
14939                        <span class="arrow"><i class="hgi hgi-stroke hgi-square-lock-02"></i></span></a></li>
14940-->
14941                <!--
14942                <li><a href="https://www.jumpspree.com/privacypolicy"><span><i class="hgi hgi-stroke hgi-square-lock-02"></i>
14943                            <span>Privacy Policy</span></span>
14944                        <span class="arrow"><i class="hgi hgi-stroke hgi-filter-mail-square"></i></span></a></li>
14945-->
14946                <!--
14947                <li><a href="https://www.jumpspree.com/termsofuse"><span><i class="hgi hgi-stroke hgi-filter-mail-square"></i>
14948                            <span>Terms of Use</span></span>
14949                        <span class="arrow"><i class="fa-regular fa-angle-right"></i></span></a></li>
14950-->
14951                <!--
14952                <li><a href="https://www.jumpspree.com/frequently-asked-questions"><span><i
14953                                class="fa-regular fa-circle-question"></i> <span>FAQ</span></span>
14954                        <span class="arrow"><i class="fa-regular fa-angle-right"></i></span></a></li>
14955-->
14956
14957
14958                <!--                    <li><a href="#"><span><i class="fa-regular fa-user"></i> <span>Manage Profile</span></span> <span class="arrow"><i class="fa-regular fa-angle-right"></i></span></a></li>-->
14959
14960
14961
14962
14963                <!--                    <li><a href="#"><span><i class="fa-regular fa-bookmark"></i> <span>Wishlist</span></span> <span class="arrow"><i class="fa-regular fa-angle-right"></i></span></a></li> -->
14964
14965                <!--                    <li><a href="#"><span><span class="jv-btn"><img src="https://www.jumpspree.app/public/images/blue---tick.png" width="20" alt="Jumpspree"></span> <span>Jumpspree Verified</span></span> <span class="arrow"><i class="fa-regular fa-angle-right"></i></span></a></li> -->
14966                <!--                    <li><a href="#"><span><i class="fa-regular fa-tags"></i> <span>Sell with Jumpspree</span></span> <span class="arrow"><i class="fa-regular fa-angle-right"></i></span></a></li> -->
14967            </ul>
14968            <ul>
14969                <li class="bluecube-icon" style="display: none">
14970                    <a href="#" class="sidebar">
14971                        <div class="lock-icon">
14972                            <img src="https://www.jumpspree.com/public/images/lock-icon.png" loading="lazy"
14973                                style="width:20px !important" alt="lock icon" title="lock icon">
14974                        </div>
14975                        <div class="jumpspree-more">
14976                            <span class="route_title">Unlock more with Jumpspree More</span>
14977                            <p>Upgrade to Jumpspree More and get premium benefits at a lower price.</p>
14978                        </div>
14979                        <div class="manage-btn">Upgrade Now</div>
14980                    </a>
14981                </li>
14982
14983                <!--
14984                                    <li class="bluecube-icon">
14985                                        <a href="#" class="sidebar">
14986                                            <div class="lock-icon">
14987                                                <img src="https://www.jumpspree.com/public/images/check-white.png" style="width:20px;filter: invert(0) !important;" alt="Jumpspree">
14988                                            </div>
14989                                            <div class="jumpspree-more">
14990                                                <span class="route_title"><img src="https://www.jumpspree.com/public/images/Jumpspree-logo.png?ver:1.02" alt="Jumpspree" style="filter: invert(1);width: 120px !important;display: inline-block;margin: 0 !important;margin-right: 5px !important;"> <span class="more">More</span></span>
14991                                                <p>You are currently subscribed to Jumpspree More.</p>
14992                                            </div>
14993                                            <div class="manage-btn">Manage</div>
14994                                        </a>
14995                                    </li>
14996                    -->
14997            </ul>
14998        </div>
14999
15000        <br>
15001        <h2>Resources</h2>
15002        <div id="account-setting">
15003            <ul>
15004
15005
15006
15007                <li><a href="mailto:[email protected]"><span><i class="hgi hgi-stroke hgi-sharp hgi-bubble-chat"></i>
15008                            <span>Contact Support</span></span>
15009                        <span class="arrow"><i class="hgi hgi-stroke hgi-square-lock-02"></i></span></a></li>
15010                <li><a href="https://www.jumpspree.com/privacypolicy"><span><i
15011                                class="hgi hgi-stroke hgi-square-lock-02"></i>
15012                            <span>Privacy Policy</span></span>
15013                        <span class="arrow"><i class="hgi hgi-stroke hgi-filter-mail-square"></i></span></a></li>
15014                <li><a href="https://www.jumpspree.com/termsofuse"><span><i
15015                                class="hgi hgi-stroke hgi-filter-mail-square"></i>
15016                            <span>Terms of Use</span></span>
15017                        <span class="arrow"><i class="fa-regular fa-angle-right"></i></span></a></li>
15018
15019            </ul>
15020            <ul>
15021                <li class="bluecube-icon" style="display: none">
15022                    <a href="#" class="sidebar">
15023                        <div class="lock-icon">
15024                            <img src="https://www.jumpspree.com/public/images/lock-icon.png" loading="lazy"
15025                                style="width:20px !important" alt="Lock" title="Lock">
15026                        </div>
15027                        <div class="jumpspree-more">
15028                            <span class="route_title">Unlock more with Jumpspree More</span>
15029                            <p>Upgrade to Jumpspree More and get premium benefits at a lower price.</p>
15030                        </div>
15031                        <div class="manage-btn">Upgrade Now</div>
15032                    </a>
15033                </li>
15034
15035                <!--
15036                                    <li class="bluecube-icon">
15037                                        <a href="#" class="sidebar">
15038                                            <div class="lock-icon">
15039                                                <img src="https://www.jumpspree.com/public/images/check-white.png" style="width:20px;filter: invert(0) !important;" alt="Jumpspree">
15040                                            </div>
15041                                            <div class="jumpspree-more">
15042                                                <span class="route_title"><img src="https://www.jumpspree.com/public/images/Jumpspree-logo.png?ver:1.02" alt="Jumpspree" style="filter: invert(1);width: 120px !important;display: inline-block;margin: 0 !important;margin-right: 5px !important;"> <span class="more">More</span></span>
15043                                                <p>You are currently subscribed to Jumpspree More.</p>
15044                                            </div>
15045                                            <div class="manage-btn">Manage</div>
15046                                        </a>
15047                                    </li>
15048                    -->
15049            </ul>
15050        </div>
15051
15052        <div class="logout-btn">
15053            <a href="https://www.jumpspree.com/logout"><i class="hgi hgi-stroke hgi-logout-03"></i> Logout</a>
15054        </div>
15055
15056        <!--
15057                        <ul id="app-menu" style="display:none">
15058                            <li><a href="#"><span><i class="fa-regular fa-square-plus"></i> <span>Add Listing</span></span> <span
15059                                        class="arrow"><i class="fa-regular fa-angle-right"></i></span></a></li>
15060                            <li><a href="#"><span><i class="fa-regular fa-credit-card"></i> <span>Manage Listing</span></span> <span
15061                                        class="arrow"><i class="fa-regular fa-angle-right"></i></span></a></li>
15062                            <li><a href="#"><span><i class="fa-regular fa-box-taped"></i> <span>Manage Orders</span></span> <span
15063                                        class="arrow"><i class="fa-regular fa-angle-right"></i></span></a></li>
15064                            <li><a href="#"><span><i class="fa-regular fa-credit-card"></i> <span>Business Detail</span></span> <span
15065                                        class="arrow"><i class="fa-regular fa-angle-right"></i></span></a></li>
15066                            <li><a href="#"><span><i class="fa-regular fa-credit-card"></i> <span>Payment Methods</span></span> <span
15067                                        class="arrow"><i class="fa-regular fa-angle-right"></i></span></a></li>
15068                            <li><a href="#"><span><i class="fa-regular fa-building-columns"></i> <span>Linked Accounts</span></span>
15069                                    <span class="arrow"><i class="fa-regular fa-angle-right"></i></span></a></li>
15070                            <li><a href="#"><span><i class="fa-regular fa-wallet"></i> <span>Wallet</span></span> <span class="arrow"><i
15071                                            class="fa-regular fa-angle-right"></i></span></a></li>
15072
15073                        </ul>
15074                -->
15075
15076        <ul id="about-menu" style="display:none">
15077            <li><a href="#"><span><i class="fa-regular fa-sparkles"></i> <span>Rate Jumpspree</span></span> <span
15078                        class="arrow"><i class="fa-regular fa-angle-right"></i></span></a></li>
15079            <li><a href="#"><span><i class="fa-regular fa-thumbs-up"></i> <span>Help Us Imporove</span></span> <span
15080                        class="arrow"><i class="fa-regular fa-angle-right"></i></span></a></li>
15081            <li><a href="#"><span><i class="fa-regular fa-comment-dots"></i> <span>Contact Support</span></span> <span
15082                        class="arrow"><i class="fa-regular fa-angle-right"></i></span></a></li>
15083            <li><a href="#"><span><i class="fa-regular fa-lock-keyhole"></i> <span>Privacy Policy</span></span> <span
15084                        class="arrow"><i class="fa-regular fa-angle-right"></i></span></a></li>
15085            <li><a href="#"><span><i class="fa-light fa-clipboard-list-check"></i> <span>Terms of Use</span></span>
15086                    <span class="arrow"><i class="fa-regular fa-angle-right"></i></span></a></li>
15087            <li><a href="#"><span><i class="fa-regular fa-circle-question"></i> <span>FAQ</span></span> <span
15088                        class="arrow"><i class="fa-regular fa-angle-right"></i></span></a></li>
15089        </ul>
15090    </div>
15091
15092
15093
15094
15095</div>
15096
15097<div class="edit-profile-mobile">  
15098<div class="user-profile my-profile profile-edit-page">
15099                <div class="form-wizard-seller-registration">
15100                    <form id="profileform" enctype="multipart/form-data">
15101                             <input type="hidden" id="user_type_hidden" value="1">
15102                        <div class="cover-image">
15103                            
15104
15105                            <span class="back-arrow" onclick="$('.edit-profile-mobile').removeClass('showMeNow'); $('.profile-menu').removeClass('dissable-me')">
15106                                 <img src="https://www.jumpspree.com/public/images/arrow-left.png" alt="" style="filter:invert(0); height: auto;">
15107                            </span> 
15108                            <div class="dropZoneContainer" id="dzc">
15109                                <div class="dropZoneOverlay">
15110                                 
15111                                    <img id="dropc" src="https://www.jumpspree.com/public/images/cover-placeholdernew.png?ver:1.02" alt="" class="cover-back">
15112                                </div>
15113                            </div>
15114                            <div class="smal-cam-upload">
15115                                <a href="javascript:void(0)" class="upload_dp a-upimg" onclick="event.stopPropagation();$(this).next('ul').slideToggle('fast'); $('.drop-user-image, .profile-drop-down ul').hide();"><img class="upimg" src="https://www.jumpspree.com/public/images/small-cam-icon.png" alt="">
15116                                </a>
15117                                <ul style="display: none;">
15118                                    <li><a href="javascript:void(0)">Open gallery <i class="fa-regular fa-image"></i> <input  type="file" name="store_cover_image" id="drop_zone_cover" class="FileUpload fake" accept=".jpg,.png,.gif" onchange="handleImageSelect('c', '')"></a></li>
15119                                    <li id="delc" style="display:none;"><a href="javascript:void(0)" style="color:#ff0026" onclick="removeImage('cover')">Delete <i class="fa-regular fa-trash-can"></i></a></li>
15120
15121                                </ul>
15122                            </div>
15123                         
15124                            <div class="d-flex justify-content-start" id="profile-edit-image">
15125                            <div class="user-profile-wrapper">
15126                                    <div class="user-image uploadImg" onclick="event.stopPropagation();$('.drop-user-image').slideToggle('fast');$('.smal-cam-upload ul, .profile-drop-down ul').hide()">
15127
15128
15129                                        <div class="dropZoneContainer" id="dzl">
15130                                            <div class="dropZoneOverlay">
15131                                              
15132                                                <a href="#"><img id="dropl" src="" alt=""></a>
15133                                             
15134
15135                                            </div>
15136                                            
15137                                            <ul style="display:none" class="drop-user-image">
15138                                                <li><a href="javascript:void(0)">Open gallery <i class="fa-regular fa-image" aria-hidden="true"></i> <input type="file" name="store_logo" id="drop_zone_logo" class="FileUpload" accept=".jpg,.png,.gif" onchange="handleImageSelect('l', '') "></a></li>
15139                                                
15140                                                <li id="dell"  style="display:none;"><a href="javascript:void(0)" style="color:#ff0026;"  onclick="removeImage('profile')">Delete <i class="fa-regular fa-trash-can" aria-hidden="true"></i></a></li>
15141
15142                                            </ul>
15143                                        </div>
15144
15145                                    </div>
15146
15147                                </div>
15148
15149                                <div class="profile-detail">
15150                                    <div class="name notranslate">
15151                                        <h3>
15152                                                                                                                                </h3>
15153                                    </div>
15154                                    <p class="notranslate">@</p>
15155                                </div>
15156                             </div>
15157                        </div>
15158
15159                        <div class="stats d-flex justify-content-start">
15160                            <div class="stat">
15161                                <h5>0</h5>
15162                                <p style="cursor:pointer;" onclick="window.location.href='https://www.jumpspree.com/followers/'">Followers</p>
15163                            </div>
15164                            <div class="stat">&bull;</div>
15165                            <div class="stat">
15166                                <h5>0 </h5>
15167                                <p style="cursor:pointer;" onclick="window.location.href='https://www.jumpspree.com/followings/'">Followings</p>
15168                            </div>
15169                            <div class="stat">&bull;</div>
15170                            <div class="stat">
15171                                <h5>0</h5>
15172                                <p>Profile Views</p>
15173                            </div>
15174                        </div>
15175                        
15176                        
15177                        
15178
15179                        
15180                        <div class="mob-p4"> 
15181                            <div class="row mb-0 profile-edit-row">
15182                                <div class="col-12 col-lg-12 col-xs-12 col-sm-12 mb-2">
15183                                    <div class="form-group">
15184                                                                                <label for="">Name</label>
15185                                        <input type="text" name="useruserfullname" id="useruserfullname" class="form-control" value="">
15186                                    </div>
15187                                </div>
15188
15189                                <!-- NATURE OF BUSINESS FIELD (Only for Business - profile_type = 3) -->
15190                                
15191                                <!-- PROFESSION FIELD (Only for Professional - profile_type = 2) -->
15192                                
15193                                <!-- LOCATION FIELD (Only for Business - profile_type = 3) -->
15194                                
15195                                <!-- Phone Section (Hidden as per your co
15195de) -->
15196                                <div class="col-12 col-lg-12 col-xs-12 col-sm-12 mb-2" style="display:none">
15197                                    <div class="form-group">
15198                                        <label for="">Phone</label>
15199                                        <div class="change">
15200                                            <input readonly="" name="useruserphone" id="useruserphone" placeholder="+1 XXX-XXX-XXXX" type="text" class="form-control" value="">
15201                                            <a href="javascript:void(0)" onclick="$('#update-phoneno').fadeIn('fast')">Change</a>
15202                                        </div>
15203                                    </div>
15204                                </div>
15205
15206                                <!-- Website Field -->
15207                                                                <div class="col-12 col-lg-12 col-xs-12 col-sm-12 mb-2">
15208                                    <div class="form-group">
15209                                        <label for="">Website</label>
15210                                        <input placeholder="www.example.com" name="useruserwebsite" id="useruserwebsite" type="text" value="" class="form-control">
15211                                    </div>
15212                                </div>
15213                                
15214                                <!-- Bio Field -->
15215                                <div class="col-12 col-lg-12 col-xs-12 col-sm-12 mb-0">
15216                                    <div class="form-group">
15217                                        <label for="">Bio</label>
15218                                        <textarea name="useruseraboutus" id="useruseraboutus" placeholder="Say something awesome about yourself.." class="form-control br11" maxlength="160"></textarea>
15219                                        <div id="aboutuscount" class="count">0/160</div>
15220                                    </div>
15221                                </div>
15222
15223                                <!-- Date of Birth -->
15224                                <div class="col-12 col-lg-12 col-xs-12 col-sm-12 mb-2">
15225                                    <div class="form-group">
15226                                        <label for="">Date of birth</label>
15227                                        <div class="dob-lock">
15228                                            <input name="useruserdob" id="useruserdob" type="text" placeholder="5/14/1995" value="" class="form-control" readonly>
15229                                            <i class="fa-solid fa-lock"></i>
15230                                        </div>
15231                                    </div>
15232                                    <div class="form-group">
15233                                        <p class="dob-note">You will not be able to change your date of birth later. We use your date of birth for account verification only and it will not be shown publicly.</p>
15234                                    </div>
15235                                </div>
15236
15237                                <!-- Buttons -->
15238                                <div class="profile-footer">
15239                                    <div class="col-12 col-lg-12 col-xs-12 col-sm-12 mb-0">
15240                                        <div class="form-button text-center" style="padding-top: 20px;">
15241                                            <button id="updateuserProfile" class="btn btn-blue-bg btn-block mb-2 deactivated" type="button" style="border-radius: 8px;width: auto;margin-left: auto;padding-left: 50px;padding-right: 50px;">
15242                                                Save Changes
15243                                            </button>
15244                                            <button class="btn btn-blue-bg-outline btn-block" id="preview_btn" onclick="window.location.href='https://www.jumpspree.com/u/'" type="button" style="border-radius: 8px;width: auto;margin-left: auto;padding-left: 50px;padding-right: 50px;">
15245                                                Preview Profile
15246                                            </button>
15247                                        </div>
15248                                    </div>
15249                                </div>
15250                            </div>
15251                        </div>
15252
15253
15254
15255
15256
15257
15258                    </form>
15259                 </div>
15260            </div>
15261</div>
15262
15263
15264<div id="account-setting-slider">
15265    <h3>Account Settings  <div class="close-account-slide" onclick="$('#account-setting-slider').removeClass('showAccountSlider')"><span>&times;</span></div></h3>
15266       <ul>
15267        <li><a href="https://www.jumpspree.com/change-email"><i class="hgi hgi-stroke hgi-mail-01"></i> Change Email</a></li>
15268        <li><a href="https://www.jumpspree.com/change-username"><i class="hgi hgi-stroke hgi-at"></i> Change Username</a></li>
15269        <li><a href="https://www.jumpspree.com/change-password"><i class="hgi hgi-stroke hgi-lock-password"></i> Change Password</a></li>
15270        <li><a href="https://www.jumpspree.com/online-status"><i class="hgi hgi-stroke hgi-user-lock-01"></i> Online Status</a></li>
15271        <li><a href="https://www.jumpspree.com/follower-settings"><i class="hgi hgi-stroke hgi-user-group"></i> Follower Settings</a></li>
15272    </ul>
15273</div>
15274
15275
15276<!--
15277<style>
15278
15279/*==========================
15280    THEME POPUP
15281===========================*/
15282
15283#themeSettingsPopup {
15284    width: 100%;
15285    max-width: 520px;
15286    margin: 40px auto;
15287    background: #1f1f1f;
15288    border-radius: 25px;
15289    padding: 30px;
15290    transition: .3s;
15291    position: fixed;
15292    height: 100%;
15293    z-index: 9999999999999999999999999999 !important;
15294    top: 0;
15295}
15296
15297body.light-mode #themeSettingsPopup{
15298    background:#fff;
15299}
15300
15301#themeSettingsPopup *{
15302    box-sizing:border-box;
15303}
15304
15305#themeSettingsPopup .themeDrag{
15306    width:80px;
15307    height:7px;
15308    background:#d8d8d8;
15309    border-radius:50px;
15310    margin:0 auto 35px;
15311}
15312
15313#themeSettingsPopup .themeTitle{
15314    text-align:center;
15315    font-size:40px;
15316    font-weight:700;
15317    margin-bottom:40px;
15318}
15319
15320#themeSettingsPopup .themeRow{
15321    display:flex;
15322    align-items:center;
15323    justify-content:space-between;
15324    margin-bottom:45px;
15325}
15326
15327#themeSettingsPopup .themeLabel{
15328    font-size:30px;
15329    font-weight:600;
15330}
15331
15332#themeSettingsPopup .themeDescription{
15333    color:#999;
15334    font-size:18px;
15335    line-height:28px;
15336}
15337
15338/*==========================
15339        SWITCH
15340===========================*/
15341
15342#themeSettingsPopup .themeSwitch{
15343    position:relative;
15344    width:72px;
15345    height:40px;
15346    display:inline-block;
15347}
15348
15349#themeSettingsPopup .themeSwitch input{
15350    display:none;
15351}
15352
15353#themeSettingsPopup .themeSlider{
15354    position:absolute;
15355    inset:0;
15356    background:#444;
15357    border-radius:40px;
15358    cursor:pointer;
15359    transition:.3s;
15360}
15361
15362#themeSettingsPopup .themeSlider:before{
15363    content:"";
15364    position:absolute;
15365    width:32px;
15366    height:32px;
15367    left:4px;
15368    top:4px;
15369    background:#fff;
15370    border-radius:50%;
15371    transition:.3s;
15372}
15373
15374#themeSettingsPopup input:checked + .themeSlider{
15375    background:#32d158;
15376}
15377
15378#themeSettingsPopup input:checked + .themeSlider:before{
15379    transform:translateX(32px);
15380}
15381</style>
15382-->
15383<!--
15384<div id="themeSettingsPopup" style="display:none">
15385
15386    <div class="themeDrag"></div>
15387
15388    <div class="themeTitle">Theme</div>
15389
15390    <div class="themeRow">
15391        <div class="themeLabel">Light mode</div>
15392
15393        <label class="themeSwitch">
15394            <input type="checkbox" id="themeLight">
15395            <span class="themeSlider"></span>
15396        </label>
15397    </div>
15398
15399    <div class="themeRow">
15400        <div class="themeLabel">Night mode</div>
15401
15402        <label class="themeSwitch">
15403            <input type="checkbox" id="themeDark">
15404            <span class="themeSlider"></span>
15405        </label>
15406    </div>
15407
15408    <div class="themeRow">
15409        <div class="themeLabel">Use system settings</div>
15410
15411        <label class="themeSwitch">
15412            <input type="checkbox" id="themeSystem">
15413            <span class="themeSlider"></span>
15414        </label>
15415    </div>
15416
15417    <div class="themeDescription">
15418        Automatically set your theme based on the selection in your device's Display and Brightness section.
15419    </div>
15420
15421</div>
15422-->
15423
15424 <!-- MOBILE: settings-style switches -->
15425  <div class="theme-mobile" id="theme-mobile" style="display:none">
15426    <div id="theme-inside">
15427<!--        <div class="drag-handle"></div>-->
15428        <h3>Theme</h3>
15429        <div class="mode-row">
15430          <span>Light mode</span>
15431          <button type="button" class="switch" id="switchLight" aria-label="Toggle light mode"><div class="knob"></div></button>
15432        </div>
15433        <div class="mode-row">
15434          <span>Night mode</span>
15435          <button type="button" class="switch on" id="switchNight" aria-label="Toggle night mode"><div class="knob"></div></button>
15436        </div>
15437    </div>
15438  </div>
15439
15440<style>
15441.links-and-topics-popup {
15442    position: fixed;
15443    top: 0;
15444    right: 0;
15445    bottom: 0;
15446    left: 0;
15447    background: #00000000;
15448    z-index: 9;
15449}
15450
15451.links-and-topics-popup .inner-topics-links {
15452    max-width: 566px;
15453    background: #1f1f1f;
15454    position: absolute;
15455    left: 50%;
15456    transform: translateX(-50%);
15457    width: 100%;
15458    top: 62px;
15459    bottom: 0;
15460    border-radius: 25px 25px 0 0;
15461}
15462
15463.links-and-topics-popup .inn-header {
15464    display: flex;
15465    justify-content: center;
15466    align-items: center;
15467    justify-content: space-between;
15468    padding: 15px 24px;
15469    border-bottom: 1px solid #3241585c;
15470    /*transition: all 0.5s ease;
15471    height: 54px;*/
15472}
15473
15474/*#add-intrest .inner-topics-links .links-wall > p {
15475    height: 110px;
15476    transition: all 0.5s ease;
15477}    
15478.inner-topics-links.add-topic-active .links-wall > p {
15479    height: 0 !important;
15480    opacity: 0;
15481    padding: 0;
15482    margin: 0;
15483}*/
15484
15485/*.inner-topics-links.add-topic-active .inn-header {
15486    height: 0;
15487    opacity: 0;
15488}   */
15489.links-and-topics-popup .inn-header a {
15490    color: #adadad;
15491}
15492
15493.links-and-topics-popup .inn-header h2 {
15494    margin-bottom: 0;
15495    font-size: 16px;
15496    color: #fff;
15497}
15498
15499.links-wall h3,
15500.links-wall p {
15501    color: #fff;
15502}
15503
15504.links-wall {
15505    padding: 30px 30px;
15506    color: #fff;
15507}
15508
15509.links-wall .add-links a {
15510    display: block;
15511    border: 1px solid #3241585c;
15512    border-radius: 15px;
15513    padding: 12px 17px;
15514    display: flex;
15515    justify-content: space-between;
15516}
15517
15518.links-wall h3 {
15519    font-size: 20px;
15520    margin: 0 0 10px 0px;
15521    font-weight: 900;
15522}
15523
15524.links-wall .add-links a:hover {
15525    background: #0f0f0f;
15526    color: #fff;
15527}
15528
15529div#add-links-popup {
15530    position: fixed;
15531    z-index: 9;
15532    width: 100%;
15533    right: 0;
15534    bottom: 0;
15535    top: 0;
15536    left: 0;
15537    background: #0000008f;
15538    backdrop-filter: blur(7px);
15539    -webkit-backdrop-filter: blur(7px);
15540}
15541
15542#add-links-popup .inner-link-section {
15543    width: 100%;
15544    max-width: calc(calc(calc(100vh - 0px - var(--one-column-top-content-height, 0px) - var(--one-column-item-bottom-content-height, 0px)) - (1rem * 2)) * 0.5700) !important;
15545    left: 50%;
15546    position: absolute;
15547    transform: translate(-50%, -50%);
15548    background: #161616;
15549    top: 50%;
15550    padding: 30px;
15551    border-radius: 25px;
15552}
15553
15554.add-custom-link-header h2 {
15555    color: #fff;
15556    font-size: 18px;
15557}
15558
15559.close-link {
15560    position: absolute;
15561    right: 25px;
15562    top: 33px;
15563    color: #ccc;
15564    font-size: 12px;
15565    cursor: pointer;
15566}
15567
15568.add-link-form .form-inner {
15569    border: 1px solid #3241585c;
15570    border-radius: 17px;
15571    padding: 8px 15px;
15572    margin-bottom: 15px;
15573    padding-right: 0;
15574}
15575
15576.add-link-form input {
15577    background: none;
15578    border-bottom: 1px solid #3241585c;
15579    width: 100%;
15580    padding: 7px 0;
15581    color: #fff;
15582    font-size: 14px;
15583}
15584
15585#add-link-new-popup .add-link-form .form-inner {
15586    border: 1px solid #6a717c94;
15587}
15588
15589#add-link-new-popup .add-link-form input {
15590    border-bottom: 1px solid #6a717c94;
15591}
15592
15593.add-link-form button.btn.btn-save {
15594    width: 100%;
15595    opacity: 1;
15596    border-radius: 15px;
15597    font-size: 13px;
15598    box-shadow: none;
15599}
15600
15601.your-links .link-logo {
15602    width: 40px;
15603}
15604
15605.your-links .link-logo img {
15606    width: 100%
15607}
15608
15609.your-links {
15610    margin-top: 20px;
15611}
15612
15613.your-links h3 {
15614    font-size: 14px;
15615}
15616
15617.your-links .link-left {
15618    display: flex;
15619}
15620
15621.your-links .link-desc {
15622    display: flex;
15623    flex-direction: column;
15624}
15625
15626.your-links .link-logo {
15627    width: 40px;
15628    margin-right: 10px;
15629}
15630
15631.your-links .link-desc span.url {
15632    font-size: 12px;
15633}
15634
15635.your-links .link-detail {
15636    display: flex;
15637    justify-content: space-between;
15638    border: 1px solid #3241585c;
15639    border-radius: 13px;
15640    align-items: center;
15641    padding: 10px;
15642    margin-bottom: 12px;
15643}
15644
15645.your-links .right-link {
15646    display: flex;
15647    gap: 12px;
15648    font-size: 19px;
15649}
15650
15651.your-links .right-link a {
15652    padding: 0 4px;
15653}
15654
15655.your-links .right-link a.delete-btn {
15656    color: #ff0000;
15657}
15658
15659.add-custom-link-header h2 {
15660    color: #fff;
15661    font-size: 18px;
15662    margin: 0;
15663    line-height: 20px;
15664}
15665
15666.add-custom-link-header {
15667    margin-bottom: 15px;
15668}
15669
15670.add-custom-link-header .close-link {
15671    position: absolute;
15672    right: 30px;
15673    top: 31px;
15674    color: #ccc;
15675    font-size: 12px;
15676    cursor: pointer;
15677}
15678
15679span.plus {
15680    font-size: 20px;
15681    float: right;
15682    line-height: 15px;
15683    height: 19px;
15684    margin-top: 4px;
15685}
15686
15687.add-links a:hover {
15688    background: #242424 !important;
15689}
15690
15691#add-link-new-popup h2 {
15692    font-size: 15px;
15693}
15694
15695.right-link a:hover {
15696    color: #fff;
15697}
15698
15699.your-topics {
15700    margin-top: 20px;
15701    border: 1px solid #3241585c;
15702    border-radius: 25px;
15703    padding: 20px;
15704}
15705
15706.your-topics ul {
15707    padding: 0;
15708}
15709
15710.your-topics .all-topics ul {
15711    margin: 0;
15712}
15713
15714.your-topics .all-topics li {
15715    padding: 4px 0;
15716}
15717
15718.your-topics .all-topics li a.delete-btn {
15719    color: #ff004d;
15720}
15721
15722.your-topics-header.d-flex.justify-content-between .delete-all {
15723    font-size: 12px;
15724    color: #c8c8c8;
15725    font-weight: 500;
15726}
15727
15728.your-topics-header.d-flex.justify-content-between h3 {
15729    margin: 0;
15730}
15731
15732.your-topics-header.d-flex.justify-content-between {
15733    align-items: center;
15734}
15735
15736.your-topics-header.d-flex.justify-content-between {
15737    align-items: center;
15738    margin-bottom: 10px;
15739}
15740
15741.your-topics .all-topics li:last-child {
15742    border: none;
15743}
15744
15745.your-topics .all-topics li:last-child {
15746    border: none;
15747    padding-bottom: 0;
15748}
15749
15750.your-topics .all-topics li {
15751    padding: 4px 0;
15752    border-bottom: 1px solid #3241585c;
15753    padding: 13px 0;
15754}
15755
15756.add-intrest-main {
15757    border: 1px solid #3241585c;
15758    border-radius: 15px;
15759    padding: 0;
15760    display: flex;
15761    align-items: center;
15762    position: relative;
15763}
15764
15765.dropdwn-intrest {
15766    position: absolute;
15767    background: #141414;
15768    width: 100%;
15769    z-index: 9;
15770    border-radius: 14px;
15771    top: 47px;
15772    border: 1px solid #3241585c;
15773    padding: 14px;
15774    display: none;
15775}
15776
15777.dropdwn-intrest ul {
15778    padding: 0;
15779    margin: 0;
15780}
15781
15782.dropdwn-intrest li a {
15783    font-size: 13px;
15784    padding: 7px 0;
15785    display: block;
15786    color: #ccc;
15787}
15788
15789.add-intrest-main .plus {
15790    margin: 0;
15791    padding: 0 19px;
15792    height: 40px;
15793    display: flex;
15794    cursor: pointer;
15795    align-items: center;
15796    font-size: 18px;
15797    font-weight: 800;
15798}
15799
15800.add-intrest-main>div:first-child input {
15801    width: 100%;
15802    background: transparent;
15803    padding: 10px 14px;
15804    color: #fff;
15805}
15806
15807.add-intrest-main>div:first-child {
15808    width: 100%;
15809    display: block;
15810}
15811
15812.inner-topic-full-wrapper.add-topic-active {
15813    /*    display: none;*/
15814}
15815
15816/*    .inner-topic-search{display: none;} */
15817.inner-topic-search {
15818    padding: 25px 25px;
15819    top: 0;
15820    position: absolute;
15821    width: 100%;
15822    background: #0f0f0f;
15823    border-radius: 25px 25px 0 0;
15824    top: 70px;
15825    visibility: hidden;
15826    opacity: 0;
15827    transition: all 0.5s ease;
15828}
15829
15830.inner-topic-search.inner-topic-search-active {
15831    visibility: visible;
15832    top: 0;
15833    opacity: 1;
15834}
15835
15836.inner-topic-search {
15837    padding: 25px 25px;
15838}
15839
15840.inner-topic-search .search-topic-header.d-flex input {
15841    width: 100%;
15842    background: none;
15843    border: 1px solid #3241585c;
15844    padding: 9px 16px;
15845    border-radius: 12px;
15846    padding-left: 34px;
15847}
15848
15849.dropdown-serach-result ul {
15850    padding: 0;
15851    margin: 0;
15852}
15853
15854.search-topic-header.d-flex {
15855    align-items: center;
15856    gap: 15px;
15857    padding-bottom: 10px;
15858    position: relative;
15859}
15860
15861.dropdown-serach-result li a {
15862    color: #ccc;
15863    padding: 13px 7px;
15864    display: block;
15865    font-size: 14px;
15866
15867}
15868
15869.dropdown-serach-result li {
15870    display: flex;
15871    justify-content: space-between;
15872    width: 100%;
15873    align-items: center;
15874    border-bottom: 1px solid #3241585c;
15875}
15876
15877.dropdown-serach-result ul {
15878    padding: 0;
15879    margin: 0;
15880}
15881
15882.add-topic:hover {
15883    cursor: pointer;
15884    background: #222;
15885}
15886
15887/*.dropdown-serach-result {
15888    height: calc(100vh - 131px);
15889    overflow-y: auto;
15890}*/
15891
15892
15893.search-topic-header.d-flex a {
15894    color: #5566FF;
15895    font-weight: 600;
15896
15897}
15898
15899.inner-topic-search .search-topic input {
15900    color: #fff;
15901
15902}
15903
15904.dropdown-serach-result ul {
15905    padding: 0;
15906    margin: 0;
15907    margin-top: 0px;
15908}
15909
15910.add-topic {
15911    color: #fff;
15912    font-size: 10px;
15913    border: 1px solid #3241585c;
15914    padding: 7px 15px;
15915    display: inline-block;
15916    border-radius: 25px;
15917    background: #22222273;
15918    white-space: nowrap;
15919}
15920
15921#add-intrest .links-wall>p {
15922    color: #c8c8c8;
15923}
15924
15925.add-intrest-main>div:first-child input::placeholder {
15926    color: #c8c8c8 !important;
15927    opacity: 1 !important;
15928    font-weight: 500;
15929}
15930
15931.add-intrest-main>div:first-child input::-webkit-input-placeholder {
15932    color: #c8c8c8 !important;
15933    opacity: 1 !important;
15934    font-weight: 500;
15935}
15936
15937.dropdown-serach-result,
15938#add-links .links-wall {
15939    scrollbar-width: none;
15940    /* Firefox */
15941    -ms-overflow-style: none;
15942    /* IE and Edge */
15943}
15944
15945.dropdown-serach-result::-webkit-scrollbar,
15946#add-links .links-wall::-webkit-scrollbar {
15947    display: none;
15948    /* or */
15949    width: 0;
15950    height: 0;
15951}
15952
15953#add-links .links-wall {
15954    height: 100vh;
15955    overflow-y: auto;
15956}
15957
15958.dropdown-serach-result li a {
15959    width: 100%
15960}
15961
15962.your-topics {
15963    padding-right: 0;
15964}
15965
15966.your-topics .your-topics-header {
15967    padding-right: 20px;
15968}
15969
15970.your-topics .all-topics li {
15971    padding-right: 20px;
15972}
15973
15974#add-intrest .links-wall {
15975    scrollbar-width: none;
15976    /* Firefox */
15977    -ms-overflow-style: none;
15978    /* IE and Edge */
15979}
15980
15981#add-intrest .links-wall::-webkit-scrollbar {
15982    display: none;
15983    width: 0;
15984    height: 0;
15985}
15986
15987.your-topics .all-topics li span {
15988    color: #c8c8c8;
15989}
15990
15991.search-topic img.search {
15992    position: absolute;
15993    width: 18px;
15994    opacity: 0.5;
15995    left: 10px;
15996}
15997    body.light-mode .add-intrest-main>div:first-child input::-webkit-input-placeholder { /* WebKit, Blink, Edge */
15998    color:    #000 !important;
15999}
16000
16001body.light-mode .add-intrest-main>div:first-child input::placeholder { /* Most modern browsers support this now. */
16002   color:    #000 !important;
16003}
16004
16005@media screen and (min-width:768px) {
16006    #add-links-popup .inner-link-section {
16007        transform: translate(-50%, -50%) scale(0.9);
16008        opacity: 0;
16009        transition: all 0.5s ease;
16010    }
16011
16012    #add-links-popup .inner-link-section.showMe {
16013        opacity: 1;
16014        transform: translate(-50%, -50%) scale(1);
16015    }
16016
16017    #add-intrest .links-wall {
16018        padding-bottom: 50px;
16019        height: 100vh;
16020        overflow-y: auto;
16021    }
16022
16023    .your-topics {
16024        margin-bottom: 150px;
16025        padding-right: 0;
16026    }
16027
16028    .dropdown-serach-result {
16029        height: 100vh;
16030        overflow-y: auto;
16031    }
16032
16033    .dropdown-serach-result ul li:last-child {
16034        margin-bottom: 250px !important;
16035    }
16036}
16037
16038@media screen and (max-width:767px) {
16039    .inner-topic-search {
16040        background: #000;
16041        border-radius: 0px 0px 0 0;
16042    }
16043
16044    .your-topics .all-topics li a.delete-btn {
16045        font-size: 25px;
16046    }
16047
16048    .links-and-topics-popup .inner-topics-links {
16049        background: #000;
16050    }
16051
16052    #add-links .your-links {
16053        margin-bottom: 110px;
16054    }
16055
16056    .links-and-topics-popup {
16057        z-index: 99999999999;
16058    }
16059
16060    .your-topics .your-topics-header h3 {
16061        font-size: 18px;
16062    }
16063
16064    .your-topics .all-topics li span {
16065        font-size: 14px;
16066    }
16067
16068    .your-topics .all-topics li a.delete-btn {
16069        font-size: 18px;
16070        width: 30px;
16071        display: inline-block;
16072        text-align: right;
16073    }
16074
16075    .links-wall h3 {
16076        font-size: 25px;
16077        font-weight: 900;
16078    }
16079
16080    .links-and-topics-popup .inner-topics-links {
16081        top: 0;
16082        border-radius: 0;
16083    }
16084
16085    div#add-links-popup {
16086        position: fixed;
16087        z-index: 9999999999;
16088    }
16089
16090    .links-wall {
16091        padding: 20px 20px;
16092    }
16093
16094    #add-intrest .links-wall>p {
16095        color: #c8c8c8;
16096        font-size: 13px;
16097        line-height: 18px;
16098    }
16099
16100    .links-and-topics-popup .inn-header h2 {
16101        font-size: 14px;
16102        font-weight: 600;
16103    }
16104
16105    .links-and-topics-popup .inn-header a {
16106        font-size: 13px;
16107    }
16108
16109    .links-and-topics-popup .inn-header {
16110        padding: 15px 15px;
16111    }
16112
16113    .links-wall {
16114        padding: 20px 15px;
16115    }
16116
16117    .your-topics .all-topics li {
16118        padding: 10px 0;
16119        padding-right: 20px;
16120    }
16121
16122    #add-intrest .links-wall {
16123        height: 100vh;
16124        overflow-y: auto;
16125    }
16126
16127    #add-intrest .your-topics {
16128        margin-bottom: 150px;
16129    }
16130
16131    .inner-topic-search {
16132        padding: 15px 15px;
16133    }
16134
16135    .search-topic-header.d-flex a {
16136        font-size: 13px;
16137    }
16138
16139    .dropdown-serach-result li a {
16140        font-size: 14px;
16141    }
16142
16143    .dropdown-serach-result {
16144        height: 100vh;
16145        overflow-y: auto;
16146    }
16147
16148    /*.search-topic-header.d-flex {
16149    position: fixed;
16150    width: 100%;
16151    left: 0;
16152    right: 0;
16153    padding: 15px 15px;
16154    background: #0f0f0f;
16155    top: 0;
16156}*/
16157    .search-topic-header.d-flex {
16158        position: sticky;
16159        width: 100%;
16160        left: 0;
16161        right: 0;
16162        padding: 0;
16163        background: #000;
16164        top: 0;
16165    }
16166
16167    /*.dropdown-serach-result ul {
16168    margin-top: 60px;
16169    margin-bottom: 70px;
16170}*/
16171    .dropdown-serach-result ul {
16172        margin-top: 10px;
16173        margin-bottom: 70px;
16174    }
16175
16176    .add-intrest-main>div:first-child input {
16177        font-size: 14px;
16178    }
16179
16180    #add-links .links-wall p br {
16181        display: none;
16182    }
16183
16184    #add-links .links-wall p {
16185        color: #c8c8c8;
16186        font-size: 13px;
16187        line-height: 18px;
16188    }
16189    body.light-mode #add-links .links-wall p {
16190        color: #222;
16191    }
16192
16193    #add-links .add-links a span:first-child {
16194        font-size: 14px;
16195    }
16196
16197    #add-links .add-links a span:last-child.plus {
16198        font-size: 18px;
16199        font-weight: 800;
16200        line-height: 15px;
16201        /*    height: 40px;*/
16202        display: flex;
16203        cursor: pointer;
16204        align-items: center;
16205        margin-top: 0px;
16206        padding: 0 0px;
16207    }
16208
16209    #add-links-popup .inner-link-section {
16210        width: 100%;
16211        max-width: 330px;
16212        left: 50%;
16213        position: fixed;
16214        transform: none;
16215        background: #161616;
16216        top: auto;
16217        padding: 30px;
16218        border-radius: 25px 25px 0 0;
16219        left: 0;
16220        right: 0;
16221        width: 100%;
16222        max-width: 100%;
16223        bottom: -270px;
16224        height: auto;
16225        padding-bottom: 20px;
16226        opacity: 0;
16227        transition: all 0.5s ease;
16228    }
16229
16230    #add-links-popup .inner-link-section.showMe {
16231        bottom: 0;
16232        opacity: 1;
16233    }
16234
16235    .add-link-form button.btn.btn-save {
16236        width: 100%;
16237        opacity: 1;
16238        border-radius: 18px;
16239        font-size: 13px;
16240        padding: 13px 0;
16241    }
16242
16243    /*.add-link-form .form-inner {
16244    border: none;
16245    padding: 8px 9px;
16246} */
16247    div#add-links-popup {
16248        background: #0000008f;
16249        backdrop-filter: none;
16250        -webkit-backdrop-filter: none;
16251    }
16252
16253    .add-link-form input {
16254        padding: 10px 0;
16255        font-size: 13px;
16256        border-radius: 0;
16257    }
16258
16259    .profile-menu-inner h2 {
16260        font-size: 18px;
16261        margin-bottom: 15px;
16262    }
16263
16264    .dropdown-serach-result ul li:last-child {
16265        margin-bottom: 145px;
16266    }
16267
16268    .inner-topic-search {
16269        top: 100%;
16270        visibility: hidden;
16271        opacity: 0;
16272        transition: all 0.5s ease;
16273    }
16274
16275    .links-and-topics-popup .inn-header {
16276        padding-bottom: 0 !important;
16277        border-bottom: none;
16278        
16279    }
16280    
16281body.light-mode .links-and-topics-popup .inn-header {
16282        padding-bottom: 15px !important;
16283        border-bottom: 1px solid #dadada;        
16284    }
16285
16286    .add-intrest-main>div:first-child input {
16287        padding: 12px 14px;
16288    }
16289
16290    .links-wall .add-links a {
16291        padding: 15px 17px;
16292    }
16293
16294    .add-custom-link-header .close-link {
16295        font-weight: 500;
16296        color: #adadad;
16297    }
16298
16299    .your-links h3 {
16300        font-size: 15px;
16301    }
16302
16303    #add-links-popup .inner-link-section {
16304        background: #141414;
16305    }
16306
16307    #add-intrest,
16308    #add-links {
16309        background: #000;
16310    }
16311
16312    #add-intrest .inner-topics-links.showMe,
16313    #add-links .inner-topics-links.showMe {
16314        transform: translateX(-50%) scale(1);
16315        opacity: 1;
16316    }
16317
16318    #add-intrest .inner-topics-links,
16319    #add-links .inner-topics-links {
16320        transform: translateX(-50%) scale(0.9);
16321        transition: all 0.3s ease;
16322        opacity: 0;
16323    }
16324}
16325</style>
16326
16327<div id="add-links" class="links-and-topics-popup" style="display:none">
16328    <div class="inner-topics-links">
16329        <div class="inn-header">
16330            <div class="close-in"
16331                onclick="deleteLinks=[]; newlyCreatedLinks = []; updatedLinks=[]; $('#add-links .inner-topics-links').removeClass('showMe');setTimeout(function(){ $('#add-links').hide();$('body').removeClass('overflow-hidden')},200)">
16332                <a href="#">Close</a></div>
16333            <h2>Links</h2>
16334            <div class="save-in" id="add-links-save" onclick="handleAddLinksSave()"><a href="#">Save</a></div>
16335        </div>
16336        <div class="links-wall">
16337            <h3>The Link Wall</h3>
16338            <p>Show more of who you are and create a link wall with up <br>to 8 external links.</p>
16339
16340            <div class="add-links">
16341                <a href="javascript:void(0)" onclick="handleAddLinksButtonClick()"><span>Add a link</span> <span
16342                        class="plus"><i class="hgi hgi-stroke hgi-plus-sign"></i></span></a>
16343            </div>
16344
16345
16346            <div id="add-link-new-popup">
16347                <div class="inner-link-section">
16348                    <div class="add-custom-link-header" style="display: none;">
16349                        <h2 style="visibility: hidden;">Add a link</h2>
16350                        <div class="close-link" onclick="$('#add-link-new-popup').slideUp()">Cancel</div>
16351                    </div>
16352
16353                    <div class="add-link-form">
16354                        <form action="">
16355                            <div class="form-inner">
16356                                <input type="text" maxlength="30" placeholder="Title">
16357                                <input type="text" maxlength="150" placeholder="Link" style="border-bottom:none">
16358                            </div>
16359                            <button id="save-link-btn" class="btn btn-save">Add</button>
16360                        </form>
16361                    </div>
16362                </div>
16363            </div>
16364
16365
16366            <div class="your-links">
16367                <h3>Your links</h3>
16368
16369                <div class="all-links">
16370
16371                    <!-- <div class="link-detail">
16372                        <div class="link-left">
16373                            <div class="link-logo"><img src="https://www.jumpspree.com/public/images/jumpspreefavicon.png?ver:1.027" alt=""></div>
16374                            <div class="link-desc">
16375                                <span>Jumpspree</span>
16376                                <span class="url">www.jumpspree.com</span>
16377                            </div>
16378                        </div>
16379                        <div class="right-link">
16380                            <a href="javascript:void(0)" onclick="$('#add-links-popup').fadeIn('fast')"><i class="hgi hgi-stroke hgi-pencil-edit-02"></i></a>
16381                            <a href="#" class="delete-btn"><i class="hgi hgi-stroke hgi-delete-02"></i></a>
16382                        </div>
16383                    </div> -->
16384
16385                </div>
16386            </div>
16387
16388        </div>
16389    </div>
16390</div>
16391
16392
16393<div id="add-intrest" class="links-and-topics-popup" style="display:none">
16394    <div class="inner-topics-links">
16395        <div class="inner-topic-full-wrapper">
16396            <div class="inn-header">
16397                <div class="close-in"><a href="javascript:void(0)"
16398                        onclick="$('#add-intrest .inner-topics-links').removeClass('showMe'); setTimeout(function(){$('body').removeClass('overflow-hidden'); $('#add-intrest').hide()},200); newlyCreatedInterests=[]; deleteInterests=[];">Close</a>
16399                </div>
16400                <h2>Topics</h2>
16401                <div class="save-in" onclick="handleAddInterestsSave()"><a href="#">Save</a></div>
16402            </div>
16403            <div class="links-wall">
16404                <p>Add topics to your profile to let people know what you’re into. You’ll be able to jump to your chosen
16405                    topics directly from your profile and see what other people with similar interests are posting. This
16406                    is a beta feature and we’re currently working on improving it.</p>
16407
16408                <div class="add-intrest-main">
16409                    <div><input type="text" placeholder="Add a new topic" class="add-intrest-input" readonly>
16410                        <div class="dropdwn-intrest">
16411                            <ul>
16412                                <li><a href="#">Topic 01</a></li>
16413                                <li><a href="#">Topic 02</a></li>
16414                                <li><a href="#">Topic 03</a></li>
16415                                <li><a href="#">Topic 04</a></li>
16416                                <li><a href="#">Topic 05</a></li>
16417                                <li><a href="#">Topic 06</a></li>
16418                            </ul>
16419                        </div>
16420
16421                    </div>
16422                    <div class="plus"><i class="hgi hgi-stroke hgi-plus-sign"></i></div>
16423                </div>
16424
16425
16426                <div class="your-topics">
16427                    <div class="your-topics-header d-flex justify-content-between">
16428                        <h3>Your topics</h3>
16429                        <div style="cursor: pointer;" onclick="handleInterestAllDelete()" class="delete-all">Delete all
16430                        </div>
16431                    </div>
16432
16433                    <div class="all-topics">
16434                        <ul>
16435                            <!-- <li class="d-flex justify-content-between">
16436                            <span>Startups</span>
16437                            <span><a href="#" class="delete-btn"><i class="hgi hgi-stroke hgi-delete-02"></i></a></span>
16438                        </li> -->
16439                        </ul>
16440                    </div>
16441
16442                </div>
16443
16444            </div>
16445        </div>
16446
16447        <div class="inner-topic-search">
16448            <div class="search-topic">
16449                <div class="search-topic-header d-flex">
16450                    <img src="https://www.jumpspree.com/public/images/lense--search.png" class="search" alt="">
16451                    <input type="text" maxlength="40" placeholder="Search"> <a href="#" class="cancel-topic">Cancel</a>
16452                </div>
16453                <div class="dropdown-serach-result">
16454                    <ul>
16455                        <!-- <li><a href="#">Topic01</a>  <div class="add-topic">Add new topic</div></li> -->
16456                        <!-- <li><a href="#">Sopic01</a></li> -->
16457                    </ul>
16458                </div>
16459            </div>
16460        </div>
16461    </div>
16462</div>
16463
16464
16465
16466
16467<div id="add-links-popup" class="add-links" style="display:none">
16468    <div class="inner-link-section">
16469        <div class="add-custom-link-header">
16470            <h2>Add a link</h2>
16471            <div class="close-link"
16472                onclick="$('#add-links-popup .inner-link-section').removeClass('showMe'); setTimeout(function(){$('#add-links-popup').fadeOut().removeAttr('data-edit-id');},200)">
16473                Cancel</div>
16474        </div>
16475
16476        <div class="add-link-form">
16477            <form action="">
16478                <div class="form-inner">
16479                    <input type="text" maxlength="30" placeholder="Title">
16480                    <input type="text" maxlength="150" placeholder="Link" style="border-bottom:none">
16481                </div>
16482                <button id="save-link-btn" class="btn btn-save">Save</button>
16483            </form>
16484        </div>
16485    </div>
16486</div>
16487
16488
16489<div id="change-theme" class="change-theme social-popup" style="display:none">
16490    <div class="inner-section add-post-inner">
16491        <h2>Theme</h2>
16492        <ul>
16493            <li>
16494                    <span>Light mode</span> 
16495                   <span> <input type="checkbox" id="switch-light">
16496                        <label for="switch-light"><i></i></label></span>
16497            </li>
16498            <li>
16499                    <span>Night mode</span> 
16500                    <span>
16501                    <input type="checkbox" id="switch-dark">
16502                    <label for="switch-dark"><i></i></label></span>
16503            </li>
16504        </ul>
16505    </div>
16506</div>
16507
16508
16509
16510
16511
16512
16513
16514<script defer src="https://www.jumpspree.com/public/js/myfunctions.js?ver=1_200013"></script>
16514
16515
16516<script defer src="https://www.jumpspree.com/public/js/notify.js"></script>
16516
16517<script defer src="https://www.jumpspree.com/public/js/clipboard.min.js"></script>
16517
16518<script defer src="https://www.jumpspree.com/public/js/owl.carousel.min.js"></script>
16518
16519<script defer src="https://www.jumpspree.com/public/js/lightgallery.min.js"></script>
16519
16520<script>
16521function openPostShareDialog(postId, username) {
16522    // Check if the postId starts with "product-" or "post-"
16523    let shareUrl = "";
16524    shareUrl = `${base_url}/ps/${username}/jumpid${postId}`;
16525
16526    // Update the share link displayed in the dialog
16527    document.getElementById('share-url').textContent = shareUrl;
16528
16529    // Social share URLs
16530    const socialLinks = [{
16531            ic: "fa-brands fa-facebook",
16532            platform: "Facebook",
16533            url: `https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(shareUrl)}`,
16534            img: "facebook2.png"
16535        },
16536        //{ platform: "Instagram", url: "#", img: "instagram-icon.png" }, // Instagram sharing is limited to apps
16537        {
16538            ic: "fa-brands fa-x-twitter",
16539            platform: "Twitter",
16540            url: `https://twitter.com/intent/tweet?url=${encodeURIComponent(shareUrl)}`,
16541            img: "twitter-icon.png"
16542        },
16543        {
16544            ic: "fa-brands fa-linkedin",
16545            platform: "LinkedIn",
16546            url: `https://www.linkedin.com/shareArticle?mini=true&url=${encodeURIComponent(shareUrl)}`,
16547            img: "linkedin2.png"
16548        },
16549        //{ platform: "Tiktok", url: "#", img: "tiktok.png?ver:1.02" }, // TikTok sharing is limited to apps
16550        {
16551            ic: "fa-solid fa-envelope",
16552            platform: "Email",
16553            url: `mailto:?subject=Check this out!&body=${encodeURIComponent(shareUrl)}`,
16554            img: "message.png"
16555        }
16556    ];
16557
16558    // Populate the social buttons dynamically
16559    const shareButtonsContainer = document.getElementById('social-share-buttons');
16560    shareButtonsContainer.innerHTML = ""; // Clear existing buttons
16561    socialLinks.forEach(link => {
16562        const listItem = `
16563            <li>
16564                <a href="${link.url}" target="_blank" class="button"> 
16565                    <i class="${link.ic}"></i>
16566                    <span>${link.platform}</span>
16567                </a>
16568            </li>
16569        `;
16570        shareButtonsContainer.insertAdjacentHTML('beforeend', listItem);
16571    });
16572
16573    // Show the share dialog
16574    $('#share-site-link').addClass('share-in-open');
16575}
16576
16577
16578
16579
16580
16581
16582
16583
16584
16585
16586
16587
16588
16589
16590
16591//dec 17 
16592function openShareDialog(postId) {
16593    // Check if the postId starts with "product-" or "post-"
16594    let shareUrl = "";
16595    if (postId.startsWith("product-")) {
16596        const productId = postId.split("-")[1]; // Extract numeric ID
16597        shareUrl = `${base_url}/product/${productId}`;
16598    } else if (postId.startsWith("post-")) {
16599        const postIdNumber = postId.split("-")[1]; // Extract numeric ID
16600        shareUrl = `${base_url}/post/${postIdNumber}`;
16601    } else if (postId.startsWith("profile-")) {
16602        const userName = postId.split("-")[1]; // Extract userName 
16603        shareUrl = `${userName}`;
16604    } else {
16605        console.error("Invalid postId format");
16606        return;
16607    }
16608
16609    // Update the share link displayed in the dialog
16610    document.getElementById('share-url').textContent = shareUrl;
16611
16612    // Social share URLs
16613    const socialLinks = [{
16614            ic: "fa-brands fa-facebook",
16615            platform: "Facebook",
16616            url: `https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(shareUrl)}`,
16617            img: "facebook2.png"
16618        },
16619        //{ platform: "Instagram", url: "#", img: "instagram-icon.png" }, // Instagram sharing is limited to apps
16620        {
16621            ic: "fa-brands fa-x-twitter",
16622            platform: "Twitter",
16623            url: `https://twitter.com/intent/tweet?url=${encodeURIComponent(shareUrl)}`,
16624            img: "twitter-icon.png"
16625        },
16626        {
16627            ic: "fa-brands fa-linkedin",
16628            platform: "LinkedIn",
16629            url: `https://www.linkedin.com/shareArticle?mini=true&url=${encodeURIComponent(shareUrl)}`,
16630            img: "linkedin2.png"
16631        },
16632        //{ platform: "Tiktok", url: "#", img: "tiktok.png?ver:1.02" }, // TikTok sharing is limited to apps
16633        {
16634            ic: "fa-solid fa-envelope",
16635            platform: "Email",
16636            url: `mailto:?subject=Check this out!&body=${encodeURIComponent(shareUrl)}`,
16637            img: "message.png"
16638        }
16639    ];
16640
16641    // Populate the social buttons dynamically
16642    const shareButtonsContainer = document.getElementById('social-share-buttons');
16643    shareButtonsContainer.innerHTML = ""; // Clear existing buttons
16644    socialLinks.forEach(link => {
16645        const listItem = `
16646            <li>
16647                <a href="${link.url}" target="_blank" class="button">
16648                    <i class="${link.ic}"></i>
16649                    <span>${link.platform}</span>
16650                </a>
16651            </li>
16652        `;
16653        shareButtonsContainer.insertAdjacentHTML('beforeend', listItem);
16654    });
16655
16656    // Show the share dialog
16657    $('#share-site-link').addClass('share-in-open');
16658}
16659
16660
16661// Function to copy the URL to clipboard
16662function copyToClipboard(element) {
16663    const text = document.querySelector(element).textContent;
16664    navigator.clipboard.writeText(text).then(() => {
16665        //alert('Link copied to clipboard!');
16666        //showNotification('success', 'Link copied to clipboard!'); 
16667        //$('#post-Link-copied').css({'display': 'flex'});
16668        $('#post-Link-copied').addClass('show-notification');
16669        setTimeout(function() {
16670            $('#post-Link-copied').removeClass('show-notification');
16671        }, 5000)
16672    });
16673
16674    $('.profile-drop-down ul').hide();
16675}
16676
16677/* $(document).ready(function () {
16678    
16679    let optionCount = 2; 
16680    
16681     // Function to update delete button visibility
16682    function updateDeleteButtonVisibility() {
16683        if (optionCount > 2) {
16684           // $('.delete-option').show(); // Show delete buttons if more than 2 options
16685        } else {
16686           // $('.delete-option').hide(); // Hide delete buttons if 2 or fewer options
16687        }
16688    }
16689
16690    $('.add-more-option').on('click', function () {
16691        
16692        // Check if the current number of options is less than 4
16693        if (optionCount < 4) {
16694            optionCount++;
16695            // Create a new option input element
16696            //const newOption = `<div class="option"><input type="text" placeholder="Option ${optionCount}"></div>`;
16697            const newOption = `<div class="option">
16698                <input type="text" placeholder="Option ${optionCount}">
16699                    <span class="delete-option"><i class="fa-solid fa-xmark" aria-hidden="true"></i></span></div>`;
16700            // Insert the new option before the add-more-option button
16701            // Insert the new option before the add-more-option button
16702            $(newOption).insertBefore('.add-more-option');
16703            updateDeleteButtonVisibility();
16704        }
16705
16706        // Disable the add-more button if options reach 4
16707        if (optionCount === 4) {
16708            $('.add-more-option').hide();
16709        }
16710    });
16711    
16712    
16713     $('.create-poll-option').on('click', '.delete-option', function () {
16714        $(this).parent('.option').remove(); // Remove the option div
16715        optionCount--; // Decrease option count
16716         updateDeleteButtonVisibility();
16717
16718        // Show add-more-option button if options are below 4 again
16719        if (optionCount < 4) {
16720            $('.add-more-option').show();
16721        }
16722
16723        // Update placeholders for remaining options
16724        $('.create-poll-option .option input[type="text"]').each(function (index) {
16725            $(this).attr('placeholder', `Option ${index + 1}`);
16726        });
16727    });
16728    
16729    // Initial call to hide delete buttons
16730    updateDeleteButtonVisibility();
16731}); */
16732document.addEventListener("DOMContentLoaded", function() {
16733    const container = document.getElementById("pollOptionsContainer");
16734
16735    container.addEventListener("input", function(e) {
16736        if (e.target.classList.contains("poll-option-input")) {
16737            let value = e.target.value;
16738
16739            // Disallow special characters and limit to 50 characters
16740            value = value.replace(/[@$#%^&*()!]/g, "").substring(0, 50);
16741
16742            e.target.value = value;
16743        }
16744    });
16745});
16746
16747$(document).ready(function() {
16748    let optionCount = $('.create-poll-option .option').length;
16749
16750    function updateDeleteButtonVisibility() {
16751        if (optionCount > 2) {
16752            $('.create-poll-option .delete-option').show();
16753        } else {
16754            $('.create-poll-option .delete-option').hide();
16755        }
16756
16757        // Update placeholders
16758        $('.create-poll-option .option input[type="text"]').each(function(index) {
16759            $(this).attr('placeholder', `Option ${index + 1}`);
16760        });
16761    }
16762
16763    // Add new option on typing in the last input
16764    $(document).on('input', '.add-another-option input', function() {
16765        const value = $(this).val().trim();
16766        optionCount = $('.create-poll-option .option').length;
16767
16768        if (value !== "" && optionCount < 4 && !$(this).closest('.option').next('.add-another-option')
16769            .length) {
16770            const newOption = `
16771                        <div class="option add-another-option">
16772                            <input type="text" class="poll-option-input" placeholder="Add more">
16773                            <button class="delete-option" type="button">
16774                                <img src="https://www.jumpspree.com/public/images/trash.png" alt="Delete" title="Delete">
16775                            </button>
16776                        </div>`;
16777
16778
16779            $(this).closest('.option').after(newOption);
16780            optionCount++;
16781            updateDeleteButtonVisibility();
16782        }
16783
16784        // Remove extra empty add-another fields
16785        $('.add-another-option input').each(function() {
16786            if ($(this).val().trim() === "" && $(this).closest('.option').next(
16787                    '.add-another-option').length) {
16788                $(this).closest('.option').remove();
16789                optionCount--;
16790                updateDeleteButtonVisibility();
16791            }
16792        });
16793    });
16794
16795    // Delete option
16796    $('.create-poll-option').on('click', '.delete-option', function() {
16797        $(this).closest('.option').remove();
16798        optionCount--;
16799
16800        if (optionCount < 4 && $('.add-another-option').length === 0) {
16801            // Always keep one empty add-another-option at end
16802            const newOption = `
16803                <div class="option add-another-option">
16804                    <input type="text" placeholder="Add more">
16805                    <button class="delete-option" type="button">
16806                        <img src="https://www.jumpspree.com/public/images/trash.png" alt="Delete" title="Delete">
16807                    </button>
16808                </div>`;
16809            $('.create-poll-option').append(newOption);
16810            optionCount++;
16811        }
16812
16813        updateDeleteButtonVisibility();
16814    });
16815
16816    // Init
16817    updateDeleteButtonVisibility();
16818
16819
16820    //logic to enabled dsiable buttons 
16821    function validatePollSubmitButton() {
16822        let filledOptions = $('#pollOptionsContainer .option input[type="text"]').filter(function() {
16823            return $(this).val().trim() !== '';
16824        }).length;
16825
16826        let descriptionFilled = $('#pollDescription').val().trim() !== '';
16827
16828        if (filledOptions >= 2 && descriptionFilled) {
16829            $('#createPollSubmit').removeClass('disabled').addClass('activateBtn');
16830            $('#submitPollForm').removeClass('disabled').addClass('active');
16831        } else {
16832            $('#createPollSubmit').addClass('disabled').removeClass('activateBtn');
16833            $('#submitPollForm').addClass('disabled').removeClass('active');
16834        }
16835
16836
16837    }
16838
16839    // Listen to changes in poll options and description
16840    $(document).on('input', '#pollOptionsContainer .option input[type="text"], #pollDescription', function() {
16841        validatePollSubmitButton();
16842    });
16843
16844    // Also call it after deleting an option
16845    $(document).on('click', '.delete-option', function() {
16846        setTimeout(validatePollSubmitButton, 100); // small delay to allow DOM update
16847    });
16848
16849});
16850
16851
16852
16853$(function() {
16854
16855    $('.owl-carousel').owlCarousel({
16856        loop: false,
16857        margin: 10,
16858        nav: false,
16859        dots: false,
16860        autoplay: false,
16861        //autoplayTimeout: 5000,
16862        responsive: {
16863            0: {
16864                items: 1
16865            },
16866            600: {
16867                items: 1
16868            },
16869            1000: {
16870                items: 1
16871            }
16872        }
16873    })
16874
16875    $('body').click(function() {
16876        $('.drop-down-blog ul').hide();
16877        $('.share-icons').hide();
16878        $('.more-setting-pop').removeClass('more-settings');
16879        $('#embed-code').removeClass('embed-in');
16880        //$('#embed-link').removeClass('embed-in');
16881        //$('#add-alt-tag').removeClass('embed-in');
16882        $('.drop-down-menu-share').hide();
16883        $('#share-site-link').removeClass('share-in-open');
16884        // $('.profile-drop-down ul').hide();
16885        $('.profile-drop-down ul').hide();
16886    })
16887
16888
16889    $('a.refresh-icon').click(function() {
16890        $(this).addClass('refresh-me');
16891        setTimeout(function() {
16892            $('a.refresh-icon').removeClass('refresh-me');
16893        }, 1000)
16894    })
16895
16896
16897
16898    $('.drop-down-blog a').click(function(e) {
16899        e.stopPropagation();
16900    })
16901
16902    $('.social-popup').click(function() {
16903        $(this).fadeOut();
16904        $('body').removeClass('overflow-hidden');
16905    })
16906
16907    $('.add-post-inner').click(function(e) {
16908        e.stopPropagation();
16909    })
16910    $('.like-post a').click(function(e) {
16911        e.preventDefault();
16912        // $(this).toggleClass('liked')
16913    })
16914    //    $('.social-shadow').click(function(){
16915    //    })   
16916
16917    $('.share-button').click(function() {
16918        $('.share-dialog').addClass('is-open')
16919    })
16920
16921    $('.add-post').click(function() {
16922        //$(this).toggleClass('add-post-opened');
16923        //$('.add-post-drop-box').slideToggle('fast');
16924        $('.social-shadow').fadeToggle('fast');
16925        $('body').addClass('overflow-hidden');
16926    })
16927    $('.social-shadow').click(function() {
16928        $('.share-dialog').removeClass('is-open');
16929        $('.add-post-drop-box').fadeOut('fast');
16930        $('.social-shadow').fadeOut('fast');
16931        $('.add-post').removeClass('add-post-opened');
16932        $('body').removeClass('overflow-hidden');
16933    })
16934    $('.share-button-desktop').click(function(e) {
16935        e.stopPropagation();
16936        $(this).next().fadeToggle('fast');
16937    })
16938
16939    $('#moresetting').click(function(e) {
16940        e.stopPropagation();
16941        $(this).addClass('active');
16942        $('.profile-drop-down ul').hide();
16943        $('.more-setting-pop').toggleClass('more-settings');
16944        $('#more-resources a').next().removeClass('more-settings');
16945    })
16946
16947    /*$('.get-app-btn a').click(function(e) {
16948        e.preventDefault();
16949        $('#ios-app').fadeIn('fast');
16950    })*/
16951    $('.get-app-qr-code-wrapper').click(function() {
16952        $(this).fadeOut('fast')
16953    })
16954    $('.get-app-qr-code-wrapper > div').click(function(e) {
16955        e.stopPropagation();
16956    })
16957
16958
16959    // Add Another Option
16960
16961
16962    /* 
16963        $(document).on('input', '.add-another-option input', function() {
16964            let value = $(this).val().trim();
16965            let optionCount = $('.create-poll-option .option').length;
16966
16967            // Add a new input if there is text and the total options are less than 5
16968            if (value !== "" && optionCount < 4 && !$(this).closest('.option').next('.add-another-option')
16969                .length) {
16970                const newOption = `
16971                    <div class="option add-another-option">
16972                        <input type="text" placeholder="Add more">
16973    <button class="delete-option" type="button" style="visibility: hidden;"><img src="https://www.jumpspree.com/public/images/trash.png" alt="Jumpspree"></button>
16974                    </div>`;
16975                $(this).closest('.option').after(newOption);
16976            }
16977
16978            // Remove empty "Add another option" fields except the last one
16979            $('.add-another-option input').each(function() {
16980                if ($(this).val().trim() === "" && $(this).closest('.option').next(
16981                        '.add-another-option').length) {
16982                    $(this).closest('.option').remove();
16983                }
16984            });
16985        }); */
16986
16987
16988
16989
16990
16991
16992    // Poll Timer
16993    function populateOptions(id, max) {
16994        const selectOptions = document.querySelector(`#${id} .select-options`);
16995        if (!selectOptions) return;
16996        selectOptions.innerHTML = ""; // Clear any existing options
16997        for (let i = 1; i <= max; i++) {
16998            const option = document.createElement('div');
16999            option.textContent = i;
17000            selectOptions.appendChild(option);
17001        }
17002    }
17003
17004    function getUnitLabel(id, value) {
17005        if (id === 'day') {
17006            return value === '1' ? '1 day' : `${value} days`;
17007        } else if (id === 'hours') {
17008            return value === '1' ? '1 hour' : `${value} hours`;
17009        } else if (id === 'minutes') {
17010            return value === '1' ? '1 minute' : `${value} minutes`;
17011        }
17012        return value;
17013    }
17014
17015    function closeAllDropdowns(exceptId) {
17016        const dropdowns = document.querySelectorAll('.select-options');
17017        dropdowns.forEach(dropdown => {
17018            if (dropdown.parentElement.id !== exceptId) {
17019                dropdown.style.display = 'none';
17020            }
17021        });
17022    }
17023
17024    function setupSelect(id) {
17025        const selectBtn = document.querySelector(`#${id} .select-btn`);
17026        const selectOptions = document.querySelector(`#${id} .select-options`);
17027
17028        if (!selectBtn || !selectOptions) return;
17029
17030        selectBtn.addEventListener('click', () => {
17031            // Close other dropdowns except the current one
17032            closeAllDropdowns(id);
17033            // Toggle the current dropdown
17034            selectOptions.style.display = selectOptions.style.display === 'block' ? 'none' : 'block';
17035        });
17036
17037        selectOptions.addEventListener('click', (event) => {
17038            if (event.target.tagName === 'DIV') {
17039                const selectedValue = event.target.textContent;
17040                selectBtn.textContent = getUnitLabel(id, selectedValue);
17041                selectOptions.style.display = 'none';
17042            }
17043        });
17044    }
17045
17046    // Populate each dropdown with its respective range
17047    populateOptions('day', 7); // Days: 1 to 7
17048    populateOptions('hours', 23); // Hours: 1 to 23
17049    populateOptions('minutes', 59); // Minutes: 1 to 59
17050
17051    // Setup dropdown behavior
17052    setupSelect('day');
17053    setupSelect('hours');
17054    setupSelect('minutes');
17055
17056    // Close dropdowns if clicked outside of any dropdown
17057    document.addEventListener('click', (event) => {
17058        if (!event.target.closest('.custom-select')) {
17059            closeAllDropdowns();
17060        }
17061    });
17062
17063
17064
17065    // Poll timer end  
17066
17067
17068
17069
17070
17071})
17072$(document).keyup(function(e) {
17073    if (e.key === "Escape") { // Check if the pressed key is "Escape"
17074        $('.get-app-qr-code-wrapper').fadeOut('fast');
17075    }
17076});
17077</script>
17077
17078<script>
17079$(function() {
17080    $('body').click(function() {
17081        $('.drop-down-blog ul').hide();
17082    })
17083    $('.drop-down-blog a').click(function(e) {
17084        e.stopPropagation();
17085    })
17086    $('.report-reason li label').click(function() {
17087        $('#additional-comment').hide();
17088    })
17089    $('.report-reason li#something-else label').click(function() {
17090        $('#additional-comment').show();
17091    })
17092})
17093</script>
17093
17094
17095<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.min.js"></script>
17095
17096<script>
17097$(document).ready(function() {
17098
17099    function getCookie(cname) {
17100        let name = cname + "=";
17101        let ca = document.cookie.split(';');
17102        for (let i = 0; i < ca.length; i++) {
17103            let c = ca[i];
17104            while (c.charAt(0) == ' ') {
17105                c = c.substring(1);
17106            }
17107            if (c.indexOf(name) == 0) {
17108                return c.substring(name.length, c.length);
17109            }
17110        }
17111        return "";
17112    }
17113
17114
17115
17116    // Cookies.set('popupShown', 'true', { expires: 10, path: '/' }); // Cookie expires in 1 day
17117
17118
17119    //   $('#launch').fadeIn('fast');
17120    //     $('#launch button').click(function(){
17121    //   $('#launch').fadeOut('fast');
17122    //     })
17123    // Check if the popup has been shown before
17124    if (getCookie("popupShown") == '') {
17125        // Show the popup
17126        $('#launch').fadeIn();
17127
17128        // Set a cookie to remember the user has seen the popup
17129        document.cookie = "popupShown=John Doe; expires=Thu, 18 Dec 2033 12:00:00 UTC";
17130    } else {
17131        $('#launch').fadeOut();
17132
17133    }
17134
17135    // Close button functionality
17136    $('#close-popup').click(function() {
17137        $('#launch').fadeOut();
17138    });
17139
17140    $('#launch button').click(function() {
17141        $('#launch').fadeOut('fast');
17142    })
17143
17144
17145});
17146
17147/*$(document).ready(function() {
17148    // Check if the cookie exists and apply the class
17149    var bodyClass = $.cookie('bodyClass');
17150    if (bodyClass == 'light-mode') {
17151        //$('body').removeAttr();
17152        $('body').addClass('light-mode');
17153        $('body').removeClass('dark-mode');
17154        $('#light-mode-on').addClass('actived');
17155        $('#dark-mode-on').removeClass('actived');
17156    }
17157
17158    // Event handler to add class and set cookie
17159    $('#dark-mode-on, #switch2').on('click', function() {
17160        alert('hi');
17161        var newClass = 'dark-mode';
17162        $('body').removeClass('light-mode');
17163        $('body').addClass(newClass);
17164        $(this).addClass('actived');
17165        // $('#light-mode-on').removeClass('active');
17166        $('#light-mode-on').removeClass('actived');
17167        $('#dark-mode-on').addClass('actived');
17168        // Set a cookie to remember the class for 7 days
17169        $.cookie('bodyClass', newClass, {
17170            expires: 7,
17171            path: '/'
17172        });
17173    });
17174
17175    $('#light-mode-on, #switch1').on('click', function() {
17176        var newClass = 'light-mode';
17177        $('body').removeClass('dark-mode');
17178        $('body').addClass(newClass);
17179        //$(this).addClass('active');
17180        $(this).addClass('actived');
17181         $('#light-mode-on').addClass('actived');
17182        $('#dark-mode-on').removeClass('actived');
17183        //$('#dark-mode-on').removeClass('active');
17184       // $('#dark-mode-on').show();
17185        // Set a cookie to remember the class for 7 days
17186        $.cookie('bodyClass', newClass, {
17187            expires: 7,
17188            path: '/'
17189        });
17190    });
17191
17192});*/
17193    
17194/*$(document).ready(function () {
17195
17196   
17197    var bodyClass = $.cookie('bodyClass');
17198    
17199    if (bodyClass == 'light-mode') {
17200         $('body').addClass('light-mode');
17201        $('body').removeClass('dark-mode');
17202        $('#switch-dark').prop('checked', false);
17203        $('#switch-light').prop('checked', true);
17204    } else {
17205        //$('body').addClass('light-mode').removeClass('dark-mode');
17206        $('#switch-light').prop('checked', false);
17207        $('#switch-dark').prop('checked', true);
17208    }
17209
17210    // Light Mode
17211    $('#switch-light').on('change', function () {
17212
17213        // ❌ Already active → toggle nahi hoga
17214        if ($('body').hasClass('light-mode')) {
17215            $(this).prop('checked', true);
17216            return;
17217        }
17218
17219        $('body').addClass('light-mode').removeClass('dark-mode');
17220        $('#switch-dark').prop('checked', false);
17221
17222        $.cookie('bodyClass', 'light-mode', {
17223            expires: 7,
17224            path: '/'
17225        });
17226    });
17227
17228    // Dark Mode
17229    $('#switch-dark').on('change', function () {
17230
17231        // ❌ Already active → toggle nahi hoga
17232        if ($('body').hasClass('dark-mode')) {
17233            $(this).prop('checked', true);
17234            return;
17235        }
17236
17237        $('body').addClass('dark-mode').removeClass('light-mode');
17238        $('#switch-light').prop('checked', false);
17239
17240        $.cookie('bodyClass', 'dark-mode', {
17241            expires: 7,
17242            path: '/'
17243        });
17244    });
17245
17246    
17247    $('#change-theme-btn').click(function(){
17248        $('#change-theme').fadeIn();
17249    })
17250});   */ 
17251</script>
17251
17252<script>
17253// Trigger file input when clicking the icons
17254document.getElementById('image-trigger').addEventListener('click', function(e) {
17255    e.preventDefault();
17256    document.getElementById('image-input').click();
17257});
17258
17259document.getElementById('video-trigger').addEventListener('click', function(e) {
17260    e.preventDefault();
17261    document.getElementById('video-input').click();
17262
17263});
17264
17265// Trigger file input when clicking the icons
17266$('#image-trigger-repost').on('click', function(e) {
17267    e.preventDefault();
17268    document.getElementById('repost-image').click(); // Triggers file input dialog
17269});
17270
17271$('#video-trigger-repost').on('click', function(e) {
17272    e.preventDefault();
17273    document.getElementById('repost-video').click(); // Triggers file input dialog
17274});
17275
17276// Image Preview
17277document.getElementById('image-input').addEventListener('change', function(e) {
17278    const file = e.target.files[0];
17279    if (file && file.type.startsWith('image/')) {
17280        const reader = new FileReader();
17281        reader.onload = function(event) {
17282            document.getElementById('preview').innerHTML = '<img src="' + event.target.result +
17283                '" alt="Image Preview">';
17284        };
17285        reader.readAsDataURL(file);
17286    }
17287
17288    $('#comment-section').addClass('media-added');
17289});
17290
17291// Video Preview
17292document.getElementById('video-input').addEventListener('change', function(e) {
17293
17294    const file = e.target.files[0];
17295    if (file && file.type.startsWith('video/')) {
17296        const reader = new FileReader();
17297        reader.onload = function(event) {
17298            document.getElementById('preview').innerHTML = '<video controls><source src="' + event.target
17299                .result + '" type="' + file.type + '"></video>';
17300        };
17301        reader.readAsDataURL(file);
17302    }
17303    $('#comment-section').addClass('media-added');
17304});
17305
17306// GIF selection from Giphy API
17307// GIF selection from Giphy API
17308document.getElementById('gif-trigger').addEventListener('click', function(e) {
17309    e.preventDefault();
17310    $('.add-image').hide();
17311
17312    fetch('https://api.giphy.com/v1/gifs/trending?api_key=uGguGjuTdE4Zqe3SFEah6hTQHb3E4mkG&limit=10&rating=g')
17313        .then(response => response.json())
17314        .then(data => {
17315            let gifHTML = '<div class="gif-list">';
17316            data.data.forEach(gif => {
17317                gifHTML +=
17318                    `<img src="${gif.images.original.url}" class="gif-item" onclick="selectGIF('${gif.images.original.url}')">`;
17319            });
17320            gifHTML += '</div>';
17321            document.getElementById('preview').innerHTML = gifHTML;
17322
17323        });
17324    setTimeout(function() {
17325        $('.gif-list').append('<span class="close-x">&times;</span>');
17326        $('.gif-list span.close-x').click(function() {
17327            $('.gif-list').hide();
17328        })
17329    }, 1000)
17330});
17331
17332// Select GIF and show preview with a close button
17333function selectGIF(url) {
17334
17335    document.getElementById('preview').innerHTML = `
17336            <div class="preview-content">
17337                <img src="${url}" alt="GIF Preview" class="gif-preview">
17338                <div class="close">&times;</div>
17339            </div>
17340        `;
17341    $('#comment-section').addClass('media-added');
17342}
17343
17344// Event delegation for the close button
17345document.getElementById('preview').addEventListener('click', function(e) {
17346    if (e.target.classList.contains('close')) {
17347        // Clear the preview box when the close button is clicked
17348        document.getElementById('preview').innerHTML = '';
17349        $('#comment-section').removeClass('media-added');
17350    }
17351});
17352
17353function copyText(postId) {
17354    // Get the text content from the div
17355    const postTextElement = document.getElementById(`post-text-${postId}`);
17356    const textToCopy = postTextElement.innerText || postTextElement.textContent;
17357
17358    // Copy the text to the clipboard
17359    navigator.clipboard.writeText(textToCopy)
17360        .then(() => {
17361            //alert('Text copied to clipboard!');
17362            //showNotification('success', 'Text copied to clipboard!');
17363            $('#post-text-copied').addClass('show-notification');
17364            setTimeout(function() {
17365                $('#post-text-copied').removeClass('show-notification');
17366            }, 5000)
17367
17368        })
17369        .catch(err => {
17370            //console.error('Failed to copy text: ', err);
17371            showNotification('error', 'Failed to copy text!');
17372
17373        });
17374}
17375
17376function htmlEntityDecode_old(text) {
17377    const tempElement = document.createElement('textarea');
17378    tempElement.innerHTML = text;
17379    return tempElement.value;
17380}
17381
17382
17383function hashTagOnClick(tag) {
17384    const hashTagContainer = document.getElementById('posts-container-hashTags');
17385    const fixedHashTagsDiv = document.getElementById('fixed-heading-hashTag');
17386    if (hashTagContainer) {
17387        hashTagContainer.innerHTML = ''; // Clear the content
17388        console.log('Cleared content of posts-container-hashTags');
17389    } else {
17390        console.error('Element with ID "posts-container-hashTags" not found.');
17391    }
17392
17393    fixedHashTagsDiv.style.display = 'block';
17394    // Call getSocialFeed after clearing content
17395    $('body').addClass('hashtag-active');
17396    $('html, body').animate({
17397        scrollTop: 0
17398    }, 500);
17399
17400    getSocialFeed('3', '1', '1', tag);
17401}
17402
17403
17404
17405
17406
17407function convertHashtagsToLinks(text) {
17408    $('.post-area').addClass('hashtagopen');
17409    text = decodeHTMLEntities(text);
17410
17411    // Enhanced URL regex that properly handles URLs containing @ and #
17412    const urlRegex = /(https?:\/\/[^\s<>()"']+|www\.[^\s<>()"']+|\b[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}\/[^\s<>()"']*)/g;
17413
17414    // First, protect URLs by replacing them with temporary markers
17415    const urlMap = {};
17416    let urlCounter = 0;
17417
17418    text = text.replace(urlRegex, function(match) {
17419        const key = `[[URL_${urlCounter++}]]`;
17420        urlMap[key] = match;
17421        return key;
17422    });
17423
17424    // Now process mentions (only standalone ones)
17425    const mentionRegex = /(^|\s)@(\w+)(?=\s|$)/g;
17426    text = text.replace(mentionRegex, function(match, prefix, username) {
17427        return `${prefix}<a href="https://www.jumpspree.com/${username}" class="mention-link">@${username}</a>`;
17428    });
17429
17430    // Process hashtags (only standalone ones)
17431    const hashtagRegex = /(^|\s)#(\w+)(?=\s|$)/g;
17432    text = text.replace(hashtagRegex, function(match, prefix, tag) {
17433        return `${prefix}<a href="javascript:void(0)" class="hashtag-link" onclick="hashTagOnClick('${tag}')">#${tag}</a>`;
17434    });
17435
17436    // Finally, restore the original URLs
17437    for (const [key, url] of Object.entries(urlMap)) {
17438        let displayUrl = url;
17439        let href = url;
17440
17441        // Handle "www." links
17442        if (/^www\./i.test(displayUrl)) {
17443            displayUrl = `https://${displayUrl}`;
17444            href = `https://${url}`;
17445        }
17446
17447        // Ensure URL has protocol
17448        if (!/^https?:\/\//i.test(href)) {
17449            href = 'http://' + href;
17450        }
17451
17452        text = text.replace(key,
17453            `<a href="${href}" class="dynamicPostLink" target="_blank">${displayUrl}</a>`);
17454    }
17455
17456    return text;
17457}
17458
17459function decodeHTMLEntities(text) {
17460    var textarea = document.createElement('textarea');
17461    textarea.innerHTML = text;
17462    return textarea.value;
17463}
17464
17465
17466// Function to count YouTube links in the post text
17467function countYouTubeLinks(postText) {
17468    const youtubeRegex = /https?:\/\/(www\.)?(youtube\.com\/watch\?v=|youtu\.be\/)([a-zA-Z0-9_-]{11})/g;
17469    const matches = postText.match(youtubeRegex);
17470    return matches ? matches.length : 0;
17471}
17472
17473function extractUrls(text) {
17474    // Remove <br> and other unwanted HTML tags from the text
17475    const sanitizedText = text.replace(/<br\s*\/?>/g, '').replace(/<[^>]+>/g, '');
17476
17477    // Regular expression to match URLs
17478    const regex = /(https?:\/\/[^\s]+)/g;
17479
17480    //console.log("comes 851");
17481    //console.log(sanitizedText);
17482
17483    return sanitizedText.match(regex) || [];
17484}
17485
17486
17487// ======================
17488// Link Preview — deduplicated + staggered (2026-05-15, hardened 2026-05-15)
17489// window._lpCache:   URL → pending jqXHR deferred. Second caller attaches to existing
17490//                    request — no duplicate XHR fired.
17491// window._lpStagger: increments 200ms per new unique URL to prevent burst pile-up.
17492//                    Reset to 0 by getSocialFeed() on each feed page load.
17493//
17494// window-scoped (not var) so initialization is independent of script execution order
17495// within this large file. Defensive guard inside the function handles any remaining
17496// edge cases (e.g. another script setting these to null as an emergency disable).
17497//
17498// ROLLBACK: restore the original un-deduplicated block from CHANGELOG Change Set 5.
17499// ======================
17500window._lpCache   = window._lpCache   || {};
17501window._lpStagger = window._lpStagger || 0;
17502
17503function fetchLinkPreviewYT(url, element) {
17504    // Defensive init: guard against script-load-order race or emergency-disable script
17505    if (!window._lpCache)              window._lpCache   = {};
17506    if (window._lpStagger == null)     window._lpStagger = 0;
17507
17508    const getYouTubeVideoId = (u) => {
17509        let videoId = null;
17510        if (u.includes('youtube.com')) {
17511            if (u.includes('/shorts/')) {
17512                videoId = u.split('/shorts/')[1]?.split('?')[0];
17513            } else if (u.includes('v=')) {
17514                videoId = u.split('v=')[1]?.split('&')[0];
17515            }
17516        } else if (u.includes('youtu.be')) {
17517            videoId = u.split('youtu.be/')[1]?.split('?')[0];
17518        }
17519        return videoId;
17520    };
17521
17522    const videoId = getYouTubeVideoId(url);
17523
17524    if (videoId) {
17525        // YouTube: direct API call, no deduplication needed here
17526        const apiKey = 'AIzaSyAFcJE0LQXCoCuCNZg48r4uS9IZkrKy6S4';
17527        const apiUrl = `https://www.googleapis.com/youtube/v3/videos?id=${videoId}&part=snippet&key=${apiKey}`;
17528        $.getJSON(apiUrl, function(data) {
17529            if (data.items && data.items.length > 0) {
17530                const videoData = data.items[0].snippet;
17531                updateMetadataForURL(element, videoData.title, videoData.description, videoData.thumbnails.high.url, url, 'https://www.jumpspree.com/public/images/yt.png');
17532            } else {
17533                updateMetadata(element, "No video data found", "Could not retrieve metadata for this video.", "");
17534            }
17535        }).fail(function() {
17536            updateMetadata(element, "Failed to load YouTube metadata", "Could not retrieve YouTube video data.", "");
17537        });
17538        return;
17539    }
17540
17541    if (url.includes('twitter.com') || url.includes('tinyurl.com')) {
17542        updateMetadata(element, url, "", "");
17543        return;
17544    }
17545
17546    // Deduplication: same URL already requested — attach to existing deferred, no new XHR
17547    if (window._lpCache[url]) {
17548        window._lpCache[url]
17549            .done(function(data) {
17550                if (data) {
17551                    updateMetadataForURL(element, data.title || 'No title available', data.description || 'No description available', data.image || 'https://www.jumpspree.com/public/noUrlDark.png', url, data.favicon || '');
17552                } else {
17553                    var el = typeof element === 'string' ? document.querySelector(element) : null;
17554                    if (el) el.style.display = 'none';
17555                    updateMetadata(element, url, "No metadata found", "");
17556                }
17557            })
17558            .fail(function() {
17559                var el = typeof element === 'string' ? document.querySelector(element) : null;
17560                if (el) el.style.display = 'none';
17561                updateMetadata(element, url, "Failed to load metadata", "");
17562            });
17563        return;
17564    }
17565
17566    // New URL: stagger requests 200ms apart to prevent simultaneous PHP worker pile-up
17567    var delay = window._lpStagger;
17568    window._lpStagger += 200;
17569
17570    setTimeout(function() {
17571        window._lpCache[url] = $.getJSON('/fetch_link_preview.php?url=' + encodeURIComponent(url));
17572        window._lpCache[url]
17573            .done(function(data) {
17574                if (data) {
17575                    updateMetadataForURL(element, data.title || 'No title available', data.description || 'No description available', data.image || 'https://www.jumpspree.com/public/noUrlDark.png', url, data.favicon || '');
17576                } else {
17577                    var el = typeof element === 'string' ? document.querySelector(element) : null;
17578                    if (el) el.style.display = 'none';
17579                    updateMetadata(element, url, "No metadata found", "");
17580                }
17581            })
17582            .fail(function() {
17583                var el = typeof element === 'string' ? document.querySelector(element) : null;
17584                if (el) el.style.display = 'none';
17585                updateMetadata(element, url, "Failed to load metadata", "");
17586            });
17587    }, delay);
17588}
17589
17590// ======================
17591// Basic fallback preview renderer
17592// ======================
17593function updateMetadata(element, title, description, imageUrl) {
17594    const container = document.querySelector(element);
17595    if (container) {
17596        // container.style.display = 'none'; // ✅ hide for testing only
17597        container.innerHTML = `
17598            <div class="link-preview">
17599                <a data-id="on-updateMeta-data" class="postLink" href="${element}" target="_blank">
17600                    <span class="trailer-image">
17601                        <img loading="lazy" src="${imageUrl}" class="link-image" style="max-width:100%;" alt="loading" onerror="this.onerror=null;this.src='https://www.jumpspree.com/public/noUrlDark.png';" />
17602                    </span>
17603                    <span class="trailer-text ${imageUrl ? `imageAvailable` : 'imageNotAvailable'}">
17604                        <h4 class="link-title">${title}</h4>
17605                        <p class="link-description">${description}</p>
17606                    </span>
17607                </a>
17608            </div>
17609        `;
17610    }
17611}
17612
17613// ======================
17614// Main preview renderer (with favicon + title)
17615// ======================
17616function updateMetadataForURL(element, title, description, imageUrl, url, favicon = '') {
17617    const container = document.querySelector(element);
17618    if (container) {
17619        // container.style.display = 'none'; // ✅ hide from live feed
17620
17621        const faviconHTML = favicon ?
17622            `<img src="${favicon}" alt="favicon" style="width:16px;height:16px;margin-right:6px;vertical-align:middle;border-radius:3px;">` :
17623            '';
17624
17625        container.innerHTML = `
17626            <div class="link-preview">
17627                <a data-id="on-updateMeta-data-forUrl" class="postLink" href="${url}" target="_blank">
17628                    <span class="trailer-image">
17629                        <img loading="lazy" src="${imageUrl}" class="link-image" style="max-width:100%;" alt="loading" onerror="this.onerror=null;this.src='https://www.jumpspree.com/public/noUrlDark.png';" />
17630                    </span>
17631                    <span class="trailer-text ${imageUrl ? `imageAvailable` : 'imageNotAvailable'}">
17632                        <h4 style="display:none" class="link-favicon">${faviconHTML}</h4>
17633                        <h4 class="link-title"> ${title}</h4>
17634                        <p class="link-description">${description}</p>
17635                    </span>
17636                </a>
17637            </div>
17638        `;
17639
17640        // ✅ You can inspect favicon in DevTools
17641        // console.log('🧩 Preview data:', { url, title, favicon, description });
17642    }
17643}
17644
17645
17646
17647
17648
17649
17650
17651
17652$(document).ready(function() {
17653
17654
17655    $('.action-comment a').on('click', function(e) {
17656        e.preventDefault();
17657
17658        // Get data from the form fields
17659        let postmessage = $('input[type="text"]').val();
17660        let mediatype = ''; // This will hold the type of media (1 for image, 2 for video, 3 for GIF)
17661        let mediaurl = ''; // Media URL for GIF
17662
17663        let post_id = "";
17664
17665        // Fetch media type (image/video/GIF) based on user input
17666        if ($('#image-input')[0].files.length > 0) {
17667            mediatype = 1; // Image
17668        } else if ($('#video-input')[0].files.length > 0) {
17669            mediatype = 2; // Video
17670        } else if ($('#preview img').attr('src')) {
17671            mediatype = 3; // GIF
17672            mediaurl = $('#preview img').attr('src');
17673        }
17674        //console.log("click at 2588");
17675        // Check if a comment or media has been added
17676        if (!postmessage && !mediatype) {
17677            //alert("Please add some content before commenting.");
17678            return;
17679        }
17680
17681        // Create form data for media upload if necessary
17682        let formData = new FormData();
17683        formData.append('postmessage', postmessage);
17684        formData.append('mediatype', mediatype);
17685        formData.append('mediaurl', mediaurl);
17686        formData.append('post_id', post_id);
17687
17688        // Handle image or video files
17689        if (mediatype === 1) {
17690            formData.append('imageupload', $('#image-input')[0].files[0]);
17691        } else if (mediatype === 2) {
17692            formData.append('videoupload', $('#video-input')[0].files[0]);
17693        }
17694        checkAccess(function() {
17695            // AJAX call to submit the comment
17696            $.ajax({
17697                url: base_url + '/addPostComments', // Change to your actual URL
17698                type: 'POST',
17699                data: formData,
17700                processData: false,
17701                contentType: false,
17702                success: function(response) {
17703                    let result = JSON.parse(response);
17704                    if (result.status) {
17705                        window.location.reload();
17706                        //alert(result.message);
17707                        // Optionally, append the new comment to the comments section
17708                        //$('#comment-section').append(`<div class="comment">${postmessage}</div>`);
17709                    } else {
17710                        //alert(result.message);
17711                    }
17712                },
17713                error: function(xhr, status, error) {
17714                    console.error('Error:', error);
17715                }
17716            });
17717        });
17718
17719    });
17720});
17721
17722function setActiveLink(linkId) {
17723    // Remove the 'active' class from all sidebar links
17724    document.querySelectorAll('.target-link').forEach(link => {
17725        link.classList.remove('active');
17726    });
17727
17728    // Add the 'active' class to the clicked link
17729    document.getElementById(linkId).classList.add('active');
17730}
17731
17732function checkAccess(callback) {
17733    //console.log("check access is called");
17734    $.ajax({
17735        url: base_url + '/checkAccess',
17736        type: 'POST',
17737        dataType: 'json',
17738        success: function(response) {
17739            if (response.status) {
17740                // User has access, proceed with the callback
17741                if (typeof callback === 'function') {
17742                    callback(); // Proceed with the main action (like, comment, etc.)
17743                }
17744            } else {
17745                // No access, redirect to sign-in page
17746                //window.location.href = base_url + '/signin';
17747                $('#signin-new-process').fadeIn('fast');
17748                $('body').addClass('overflow-hidden');
17749            }
17750        },
17751        error: function() {
17752            //alert('Error checking access, please try again.');
17753        }
17754    });
17755}
17756</script>
17756
17757
17758
17759<script>
17760$(document).ready(function() {
17761
17762});
17763
17764function openCommentPopup(username, name, postId, currentUser, currentUserName) {
17765    // Update the comment popup with dynamic content
17766    /* document.querySelector('#comment-on-post .fnc-title h4').textContent = currentUser;
17767    document.querySelector('#comment-on-post .post-area-inside textarea').value = `@${username} `;
17768    document.querySelector('#comment-on-post .fnc-title p a').textContent = `@${username}`;
17769 */
17770    checkAccess(function() {
17771        /*  document.querySelector('#comment-on-post #user-name').textContent = currentUser; // Update the user name
17772        document.querySelector('#comment-on-post #user-handle').textContent = `@${currentUserName}`; // Update the user handle
17773        document.querySelector('#comment-on-post #reply-handle').textContent = `@${username}`; // Update the reply handle
17774        document.querySelector('#comment-on-post .post-area-inside textarea').value = `@${username} `; // Pre-fill the textarea
17775    */
17776        document.querySelector('#user-name').textContent = currentUser; // Update the user name
17777        document.querySelector('#user-handle').textContent = `@${currentUserName}`; // Update the user handle
17778        document.querySelector('#reply-handle').textContent = `@${username}`; // Update the reply handle
17779        document.querySelector('.post-area-inside textarea').value = `@${username} `; // Pre-fill the textarea
17780
17781
17782        // Set the postId in the hidden input
17783        document.querySelector('#post-id-hidden').value = postId;
17784        /*  document.querySelector('#post-id-hidden').value = postId;
17785         document.querySelector('#post-id-hidden').value = postId; */
17786
17787        // Display the popup
17788        document.getElementById('comment-on-post').style.display = 'block';
17789        document.body.classList.add('overflow-hidden');
17790    });
17791}
17792
17793$(document).ready(function() {
17794    //this function is used in FEED index page 
17795    $('#submit-comment').on('click', function(e) {
17796        e.preventDefault();
17797
17798        // Get the post data
17799        let postmessage = $('#comment-text').val();
17800        let mediatype = ''; // 1 for image, 2 for video, 3 for GIF
17801        let mediaurl = ''; // URL for GIF
17802        //let post_id = ""; // Assuming you set this in your PHP
17803        let post_id = $('#post-id-hidden').val();
17804
17805        // Check the media type
17806        if ($('#image-input')[0].files.length > 0) {
17807            mediatype = 1; // Image
17808        } else if ($('#video-input')[0].files.length > 0) {
17809            mediatype = 2; // Video
17810        } else if ($('#gif-input')[0].files.length > 0) {
17811            mediatype = 3; // GIF
17812            mediaurl = $('#gif-input')
17813                .val(); // Assuming it's an uploaded GIF, adjust if you're using a GIF URL.
17814        }
17815        // console.log("click at 2727");
17816        // Validate that either comment or media is provided
17817        if (!postmessage && !mediatype) {
17818            //alert("Please add some content before commenting.");
17819            return;
17820        }
17821
17822        // Prepare form data for AJAX request
17823        let formData = new FormData();
17824        formData.append('postmessage', postmessage);
17825        formData.append('mediatype', mediatype);
17826        formData.append('mediaurl', mediaurl);
17827        formData.append('post_id', post_id);
17828
17829        // Attach image or video files to the form data
17830        if (mediatype === 1) {
17831            formData.append('imageupload', $('#image-input')[0].files[0]);
17832        } else if (mediatype === 2) {
17833            formData.append('videoupload', $('#video-input')[0].files[0]);
17834        }
17835
17836        // Call the `checkAccess` function and proceed with the AJAX request
17837        checkAccess(function() {
17838            // AJAX request to submit the comment
17839            $.ajax({
17840                url: base_url + '/addPostComments', // Replace with your actual URL
17841                type: 'POST',
17842                data: formData,
17843                processData: false,
17844                contentType: false,
17845                success: function(response) {
17846                    let result = JSON.parse(response);
17847                    if (result.status) {
17848                        //alert(result.message);
17849
17850                        // Optionally, append the new comment to the comment section
17851                        //$('#comment-section').append(`<div class="comment">${postmessage}</div>`);
17852                        window.location.reload();
17853                        // Close the comment popup
17854                        $('#comment-on-post').css('display', 'none');
17855                        $('body').removeClass('overflow-hidden');
17856
17857                        // Increase the comment count dynamically
17858                        let commentCountElement = $(
17859                            '#comment-count'
17860                        ); // Assuming #comment-count holds the comment count on the page
17861                        let currentCount = parseInt(commentCountElement.text()) ||
17862                            0;
17863                        commentCountElement.text(currentCount + 1);
17864
17865                        // Reset the form fields after successful submission
17866                        $('#comment-text').val('');
17867                        $('#image-input').val('');
17868                        $('#video-input').val('');
17869                        $('#gif-input').val('');
17870                    } else {
17871                        //alert(result.message);
17872                    }
17873                },
17874                error: function(xhr, status, error) {
17875                    console.error('Error:', error);
17876                }
17877            });
17878        });
17879    });
17880});
17881$(document).ready(function() {
17882
17883});
17884
17885$(document).ready(function() {
17886    var currentUrl = window.location.href;
17887    var targetUrl = "https://www.jumpspree.com";
17888
17889    // Handle Shop link click
17890    $('#shoplink').click(function(e) {
17891        e.preventDefault();
17892
17893        // If the user is not on the social_new page, redirect
17894        if (currentUrl !== targetUrl) {
17895            window.location.href = targetUrl;
17896        }
17897    });
17898
17899    // Handle Social link click
17900    $('#postlink').click(function(e) {
17901        e.preventDefault();
17902
17903        // If the user is not on the social_new page, redirect
17904        if (currentUrl !== targetUrl) {
17905            window.location.href = targetUrl;
17906        }
17907    });
17908
17909    if (currentUrl !== targetUrl) {
17910        $('#postlink').removeClass('active');
17911    }
17912});
17913</script>
17913
17914
17915<script>
17916$('.plus-comment').click(function(e) {
17917    e.stopPropagation();
17918    e.preventDefault();
17919//    $('.add-image').toggle();
17920    $('.new-plus-pop ul').toggleClass('showMe')
17921    $(this).toggleClass('plus-active');
17922})
17923/*$('#send-message').click(function(){
17924    $('body').addClass('overflow-hidden');
17925    $('#sendmessage-popup').fadeIn('fast');
17926})*/
17927$('.back-btn-message a').click(function() {
17928    $('#sendmessage-popup').fadeOut('fast');
17929})
17930
17931
17932
17933function handleRepostDropdown(event, element) {
17934    // Prevent event bubbling
17935    event.stopPropagation();
17936
17937    // Check user access before toggling the dropdown
17938    checkAccess(function() {
17939        $('.drop-down-menu-share').hide();
17940        $(element).next().fadeToggle(200); // Toggle dropdown menu
17941    }, function() {
17942        //alert('You do not have access to repost.');
17943    });
17944}
17945 
17946
17947function handleRepostPopup(element, repostId) {
17948    // Check user access before opening the popup
17949    checkAccess(function() {
17950        // Prepare form data for the AJAX request
17951        let formData = new FormData();
17952        formData.append('repostId', repostId);
17953        
17954        // Get the repost button element to update UI later
17955        const repostBtnElement = element.closest('.repost-btn');
17956        const mainRepostButton = repostBtnElement.querySelector('.repost-button');
17957        const repostIcon = mainRepostButton.querySelector('.fa-arrows-repeat');
17958        const repostCountSpan = document.getElementById(`repost-count-${repostId}`);
17959        
17960        // Make the AJAX request to save the post
17961        $.ajax({
17962            url: base_url + '/createRepost', // Replace with your API endpoint
17963            type: 'POST',
17964            data: formData,
17965            processData: false,
17966            contentType: false,
17967            beforeSend: function() {
17968                // Optional: Add loading state
17969                repostIcon.classList.add('fa-spin');
17970            },
17971            success: function(response) {
17972                // Remove loading
17973                repostIcon.classList.remove('fa-spin');
17974                
17975                let result = response;
17976                if (result.status) {
17977                    showNotification('success', 'Repost successful.');
17978                      
17979                    $('#repostId').val('');
17980                    
17981                    // Update UI without page refresh
17982                    // 1. Add 'reposted' class and remove 'no-repost'
17983                    mainRepostButton.classList.add('reposted');
17984                    mainRepostButton.classList.remove('no-repost');
17985                    
17986                    // 2. Add green icon class
17987                    repostIcon.classList.add('user-reposted-post');
17988                    
17989                    // 3. Update onclick to unrepost
17990                    mainRepostButton.setAttribute('onclick', `unrepostPost('${repostId}')`);
17991                    
17992                    // 4. Update repost count
17993                    let currentCount = parseInt(repostCountSpan.textContent) || 0;
17994                    let newCount = currentCount + 1;
17995                    repostCountSpan.textContent = newCount;
17996                    
17997                    // Show the count if it was hidden
17998                    if (newCount > 0) {
17999                        repostCountSpan.style.display = 'inline';
18000                    }
18001                    
18002                    // 5. Update dropdown items
18003                    const dropdown = repostBtnElement.querySelector('.drop-down-menu-share');
18004                    if (dropdown) {
18005                        // Update first dropdown item
18006                        const firstDropdownItem = dropdown.querySelector('li:first-child a');
18007                        if (firstDropdownItem) {
18008                            firstDropdownItem.textContent = 'Undo Repost';
18009                            firstDropdownItem.setAttribute('onclick', `unrepostPost('${repostId}')`);
18010                            const dropdownIcon = firstDropdownItem.querySelector('.fa-arrows-repeat');
18011                            if (dropdownIcon) {
18012                                dropdownIcon.classList.add('user-reposted-post');
18013                            }
18014                        }
18015                        
18016                        // Update second dropdown item
18017                        const secondDropdownItem = dropdown.querySelector('li:nth-child(2) a');
18018                        if (secondDropdownItem) {
18019                            secondDropdownItem.textContent = 'Remove Quote Repost';
18020                        }
18021                    }
18022                    
18023                    // Close the popup
18024                    $('#repost-popup').fadeOut();
18025                    $('body').removeClass('overflow-hidden');
18026                    
18027                    // Optional: Show success animation
18028                    animateRepostSuccess(mainRepostButton);
18029                    // Refresh feed
18030                    getSocialFeed('3', '1', '1', '');
18031                } else {
18032                    showNotification('error', result.message ||
18033                        'An error occurred while adding the post.');
18034                }
18035            },
18036            error: function(xhr, status, error) {
18037                console.error('Error:', error);
18038                repostIcon.classList.remove('fa-spin');
18039                showNotification('error', 'Failed to add the post. Please try again.');
18040            }
18041        });
18042    }, function() {
18043        //alert('You do not have access to perform this action.');
18044    });
18045}
18046
18047// Optional: Success animation function
18048function animateRepostSuccess(element) {
18049    element.style.transform = 'scale(1.2)';
18050    setTimeout(() => {
18051        element.style.transform = 'scale(1)';
18052    }, 300);
18053    
18054    // Or use CSS animation
18055    element.classList.add('repost-success-animation');
18056    setTimeout(() => {
18057        element.classList.remove('repost-success-animation');
18058    }, 1000);
18059}
18060
18061
18062 function openRePostPopupOnPage(element) {
18063    const username = $(element).data('username');
18064    const name = $(element).data('name');
18065    const postId = $(element).data('postid');
18066    const postText = decodeURIComponent($(element).data('posttext'));
18067    const currentUser = $(element).data('currentuser');
18068    const currentUserName = $(element).data('currentusername');
18069    const postProfileImg = $(element).data('postprofile');
18070
18071    // Set repost ID
18072    $('#repostId').val(postId);
18073    
18074    // Show the social popup
18075    $('#social-popup').fadeIn();
18076    $('body').addClass('overflow-hidden');
18077    
18078    // Change title and show repost indicator
18079    $('#popup-title').text('Repost');
18080    $('#repost-indicator').show();
18081    
18082    // Get the full HTML content from the source div
18083    const fullHtmlContent = $(`#contentDivID-${postId}`).html();
18084    
18085    // Set the repost preview
18086    $('#repost-preview-container').show();
18087    $('#currentpostprofile').attr('src', postProfileImg);
18088    $('.postUser').text(name);
18089    $('.postUserName').text('@' + username);
18090    $('#repost-preview-content').html(fullHtmlContent);
18091    
18092    // Clear any existing content in the main textarea
18093    $('#addPostTextarea').html('');
18094    
18095    // Clear media previews if any
18096    clearMediaPreviews();
18097    
18098    // Focus on the textarea
18099    setTimeout(() => {
18100        $('#addPostTextarea').focus();
18101    }, 100);
18102}
18103
18104function clearRepost() {
18105    // Reset all repost-related elements
18106    $('#repostId').val('');
18107    $('#popup-title').text('Create Post');
18108    $('#repost-indicator').hide();
18109    $('#repost-preview-container').hide();
18110    $('#addPostTextarea').html('');
18111    $('.postUser').text('');
18112    $('.postUserName').text('');
18113    $('#repost-preview-content').html('');
18114    $('#currentpostprofile').attr('src', '');
18115    
18116    // Clear media previews
18117    clearMediaPreviews();
18118}
18119
18120function clearMediaPreviews() {
18121    $('#imagePreviewBox').hide();
18122    $('#videoPreviewBox').hide();
18123    $('#gifPreviewBox').hide();
18124    $('#imageCarousel .swiper-wrapper').empty();
18125    $('#videoPreview').attr('src', '');
18126    $('#gifPreviewAddPost').attr('src', '');
18127}
18128
18129// Update your handleDiscardAction function to handle reposts
18130/* function handleDiscardAction() {
18131    if ($('#repostId').val()) {
18132        // If reposting, ask for confirmation
18133        if (confirm('Discard repost?')) {
18134            clearRepost();
18135            $('#social-popup').fadeOut();
18136            $('body').removeClass('overflow-hidden');
18137        }
18138    } else {
18139        // Original discard logic
18140        $('#social-popup').fadeOut();
18141        $('body').removeClass('overflow-hidden');
18142    }
18143} */
18144 
18145
18146// Add this to clear repost state when opening drafts
18147$('.draft a').on('click', function() {
18148    clearRepost();
18149});
18150
18151// Add this to clear repost state when switching to poll
18152$('.create-poll').on('click', function() {
18153    clearRepost();
18154});
18155
18156// Helper function to clear media previews
18157function clearMediaPreviews() {
18158    $('#imagePreviewBox').hide();
18159    $('#videoPreviewBox').hide();
18160    $('#gifPreviewBox').hide();
18161    $('#imageCarousel .swiper-wrapper').empty();
18162    $('#videoPreview').attr('src', '');
18163    $('#gifPreviewAddPost').attr('src', '');
18164}
18165
18166// Helper function to reset form for repost
18167function resetFormForRepost() {
18168    // Reset post settings
18169    $('#commentsOff').prop('checked', false);
18170    $('#hideLike').prop('checked', false);
18171    
18172    // Reset schedule
18173    $('#scheduletime').val('');
18174    $('#scheduledate').val('');
18175    $('#scheduled').val('0');
18176    $('#scheduledone').hide();
18177    
18178    // Enable submit button
18179    $('#addPost-form-submit').removeClass('disabled');
18180    $('#addPost-form-submit').prop('disabled', false);
18181    
18182    // Reset character count
18183    updateCharacterCount();
18184}
18185 
18186
18187
18188/* function copyContentToPopup(postId) {
18189    // Get the contentDivID dynamically based on the postId
18190    const contentDiv = $(`#contentDivID-${postId}`);
18191    
18192    // Extract the post text (inside .post-text)
18193    const postText = contentDiv.find('.post-text').html();
18194    
18195    // Extract the image URL (inside .blog-main-image img)
18196    const postImage = contentDiv.find('.blog-main-image img').attr('src');
18197    
18198    // Update the popup post text
18199    $('#repost-popup .post-data p').html(postText);
18200
18201    // Update the popup image if available
18202    if (postImage) {
18203        $('#repost-popup .post-for-repost .postprofile').attr('src', postImage);
18204    }
18205
18206    // Display the popup
18207    $('#repost-popup').fadeIn();
18208    $('body').addClass('overflow-hidden');
18209} */
18210
18211const API_KEY = 'uGguGjuTdE4Zqe3SFEah6hTQHb3E4mkG'; // Replace with your Giphy API key
18212// Elements
18213// Elements
18214const gifTrigger = document.getElementById('gif-trigger-for-repost');
18215const gifModal = document.getElementById('gifModal');
18216const gifSearchInput = document.getElementById('gifSearch');
18217const gifSearchBtn = document.getElementById('gifSearchBtn');
18218const gifResults = document.getElementById('gifResults');
18219const previewGifs = document.getElementById('previewGifs');
18220const textarea = document.getElementById('repostTextarea');
18221
18222
18223// Handle GIF search on typing in the input field
18224if (gifSearchInput) gifSearchInput.addEventListener('keyup', function(e) {
18225    const query = gifSearchInput.value.trim();
18226    if (query) fetchGifs(query);
18227});
18228
18229
18230
18231// Show/Hide GIF Modal
18232if (gifTrigger) gifTrigger.addEventListener('click', function(e) {
18233    e.preventDefault();
18234    gifModal.style.display = 'block'; // Always show the modal when triggered
18235    fetchTrendingGifs(); // Fetch trending GIFs on modal open
18236
18237    setTimeout(function() {
18238        $('.gif-modal').append('<span class="close-x">&times;</span>');
18239        $('.gif-modal span.close-x').click(function() {
18240            $('.gif-modal').hide();
18241        })
18242    }, 1000)
18243});
18244
18245// Fetch GIFs from Giphy API
18246function fetchGifs(query) {
18247    const url = `https://api.giphy.com/v1/gifs/search?api_key=${API_KEY}&q=${query}&limit=20&offset=0&rating=g&lang=en`;
18248    fetch(url)
18249        .then(response => response.json())
18250        .then(data => {
18251            displayGifs(data.data);
18252        })
18253        .catch(error => {
18254            console.error('Error fetching GIFs:', error);
18255        });
18256
18257
18258}
18259
18260// Fetch Trending GIFs from Giphy API
18261function fetchTrendingGifs() {
18262    const url = `https://api.giphy.com/v1/gifs/trending?api_key=${API_KEY}&limit=20&rating=g`;
18263    fetch(url)
18264        .then(response => response.json())
18265        .then(data => {
18266            displayGifs(data.data);
18267        })
18268        .catch(error => {
18269            console.error('Error fetching trending GIFs:', error);
18270        });
18271}
18272
18273// Display GIFs in the results container
18274function displayGifs(gifs) {
18275    gifResults.innerHTML = ''; // Clear previous results
18276    gifs.forEach(gif => {
18277        const img = document.createElement('img');
18278        img.src = gif.images.original.url; // Use fixed-width image
18279        img.alt = gif.title;
18280        img.addEventListener('click', () => selectGifForRepost(gif.images.original.url));
18281        gifResults.appendChild(img);
18282    });
18283}
18284
18285// Select a GIF and display it in the preview area
18286function selectGifForRepost(url) {
18287    $('div#previewGifs').show();
18288    previewGifs.innerHTML = `<img src="${url}" alt="Selected GIF">`;
18289    textarea.value += `\n[GIF: ${url}]`; // Optional: Add GIF URL to textarea
18290
18291    // Ensure the modal is closed
18292    gifModal.style.display = 'none';
18293
18294    // Add a log for debugging
18295    //console.log('GIF selected, modal closed.');
18296    $('#imageCarousel').empty().removeClass('owl-carousel owl-theme').trigger('destroy.owl.carousel');
18297    $('#imagePreviewBox').hide();
18298
18299    // Clear video
18300    const videoElement = $('#videoPreview')[0];
18301    $('#videoSource').attr('src', '');
18302
18303
18304    setTimeout(function() {
18305        $('div#previewGifs').append('<span class="close-x">&times;</span>');
18306        $('div#previewGifs span.close-x').click(function() {
18307            $('div#previewGifs').hide();
18308        })
18309    }, 1000)
18310}
18311
18312
18313//ADD POST CODE GIF
18314
18315document.addEventListener('DOMContentLoaded', function() {
18316
18317// Elements for Add Post
18318const gifTriggerForAddPost = document.getElementById('gif-trigger-for-addpost');
18319const gifModalForAddPost = document.getElementById('gifModalForAddPost');
18320const gifSearchInputForAddPost = document.getElementById('gifSearchForAddPost');
18321const gifSearchBtnForAddPost = document.getElementById('gifSearchBtnForAddPost');
18322const gifResultsForAddPost = document.getElementById('gifResultsForAddPost');
18323const previewGifsForAddPost = document.getElementById('previewGifsForAddPost');
18324const textareaForAddPost = document.getElementById('addPostTextarea');
18325
18326if (!gifTriggerForAddPost) return;
18327
18328// Show/Hide GIF Modal for Add Post
18329gifTriggerForAddPost.addEventListener('click', function(e) {
18330console.log("gif trigger for add post clicked");
18331    e.preventDefault();
18332    gifModalForAddPost.style.display = 'block'; // Always show the modal when triggered
18333    fetchTrendingGifsForAddPost(); // Fetch trending GIFs on modal open
18334
18335    setTimeout(function() {
18336        $('.gif-modal').append('<span class="close-x">&times;</span>');
18337        $('.gif-modal span.close-x').click(function() {
18338            $('.gif-modal').hide();
18339        });
18340    }, 1000);
18341});
18342});
18343
18344function openGifModalForAddPost() {
18345    gifModalForAddPost.style.display = 'block'; // Show the modal
18346    fetchTrendingGifsForAddPost(); // Fetch trending GIFs on modal open
18347
18348    setTimeout(function() {
18349        $('.gif-modal').append('<span class="close-x">&times;</span>');
18350        $('.gif-modal span.close-x').click(function() {
18351            $('.gif-modal').hide();
18352        });
18353    }, 1000);
18354}
18355
18356// Fetch GIFs from Giphy API for Add Post (search function)
18357function fetchGifsForAddPost(query) {
18358    const url = `https://api.giphy.com/v1/gifs/search?api_key=${API_KEY}&q=${query}&limit=20&offset=0&rating=g&lang=en`;
18359    fetch(url)
18360        .then(response => response.json())
18361        .then(data => {
18362            displayGifsForAddPost(data.data);
18363        })
18364        .catch(error => {
18365            console.error('Error fetching GIFs:', error);
18366        });
18367}
18368
18369// Fetch Trending GIFs from Giphy API for Add Post
18370function fetchTrendingGifsForAddPost() {
18371    const url = `https://api.giphy.com/v1/gifs/trending?api_key=${API_KEY}&limit=20&rating=g`;
18372    fetch(url)
18373        .then(response => response.json())
18374        .then(data => {
18375            displayGifsForAddPost(data.data);
18376        })
18377        .catch(error => {
18378            console.error('Error fetching trending GIFs:', error);
18379        });
18380}
18381
18382// Display GIFs in the results container for Add Post
18383function displayGifsForAddPost(gifs) {
18384    gifResultsForAddPost.innerHTML = ''; // Clear previous results
18385    gifs.forEach(gif => {
18386        const img = document.createElement('img');
18387        img.src = gif.images.original.url; // Use fixed-width image
18388        img.alt = gif.title;
18389        img.addEventListener('click', () => selectGifForAddPost(gif.images.original.url));
18390        gifResultsForAddPost.appendChild(img);
18391    });
18392}
18393// Select a GIF and display it in the preview area for Add Post
18394function selectGifForAddPost(url) {
18395    clearPreviews();
18396    clearAllImageSources();
18397    $('#videoSource').attr('src', '');
18398    $('#videoPreviewBox').hide();
18399
18400    // Show the GIF preview box
18401    $('div#gifPreviewBox').show();
18402    const gifPreviewAddPost = document.getElementById('gifPreviewAddPost');
18403
18404    // Set the GIF source
18405    gifPreviewAddPost.src = url;
18406
18407    // Ensure the modal is closed
18408    const gifModalForAddPost = document.getElementById('gifModalForAddPost');
18409    if (gifModalForAddPost) {
18410        gifModalForAddPost.style.display = 'none';
18411    }
18412
18413    // Add a close button dynamically
18414    setTimeout(function() {
18415        if (!$('div#gifPreviewBox .close-x').length) { // Avoid duplicate close buttons
18416            //$('div#gifPreviewBox').append('<span class="close-x">&times;</span>');
18417        }
18418        // Add click handler for the close button
18419        $('div#gifPreviewBox span.close-x').click(function() {
18420            $('div#gifPreviewBox').hide();
18421            gifPreviewAddPost.src = ''; // Clear the GIF preview
18422        });
18423    }, 1000);
18424    // Reset image and video in whole we have to define twise LN 581 riaz
18425    $('#imagePreviewBox').hide();
18426    $('#imagePreview').attr('src', '');
18427
18428
18429    // Check if any content exists to keep the button active
18430    // const postText = $('#addPostTextarea').val().trim();
18431    const postText = $('#addPostTextarea').text().trim();
18432    const hasImage = $('#imageInput-repost')[0]?.files.length > 0;
18433    const hasVideo = $('#videoSource').attr('src')?.trim() !== '';
18434    const hasGif = $('#gifPreviewBox').is(':visible') && $('#gifPreviewAddPost').attr('src')?.trim() !== '';
18435
18436    const shouldEnable = postText.length > 0 || hasImage || hasVideo || hasGif;
18437
18438    if (shouldEnable) {
18439        $('.addPost-form-submit').removeClass('disabled').addClass('active');
18440    } else {
18441        $('.addPost-form-submit').removeClass('active').addClass('disabled');
18442    }
18443
18444
18445    // clear image and video SRC 
18446    // for image
18447    closePreview();
18448    //for video
18449    const videoElement = $('#videoPreview')[0];
18450    $('#videoSource').attr('src', '');
18451    if (videoElement) {
18452        videoElement.pause();
18453        videoElement.load();
18454    }
18455}
18456
18457
18458
18459// Handle Search Button Click for searching GIFs in Add Post
18460gifSearchBtnForAddPost.addEventListener('click', function(e) {
18461    e.preventDefault(); // Prevent default button action
18462    const query = gifSearchInputForAddPost.value.trim();
18463    if (query) fetchGifsForAddPost(query);
18464});
18465
18466
18467var debounceTimeout;
18468
18469var gifSearchInputForAddPost = document.getElementById('gifSearchForAddPost');
18470if (gifSearchInputForAddPost) gifSearchInputForAddPost.addEventListener('keyup', function(e) {
18471    clearTimeout(debounceTimeout); // Clear the previous timeout
18472    const query = gifSearchInputForAddPost.value.trim();
18473    if (query) {
18474        debounceTimeout = setTimeout(() => {
18475            fetchGifsForAddPost(query);
18476        }, 300); // Adjust the delay as needed
18477    }
18478});
18479
18480
18481
18482// Optional: Close modal when clicking outside in Add Post
18483window.onclick = function(event) {
18484    if (event.target === gifModalForAddPost) {
18485        gifModalForAddPost.style.display = 'none';
18486    }
18487}
18488
18489
18490
18491
18492function showNotification(type, message) {
18493
18494    $('#message-notification-text').text('')
18495
18496    iconurl = base_url + '/public/images/' + type + '-icon.png';
18497    $('#message-notification-image').attr('src', iconurl)
18498    $('#message-notification-text').text(message)
18499    $('#message-notification').addClass('show-notification')
18500    if (type == 'error') {
18501        // shakeForm('message-notification')
18502    }
18503
18504    setTimeout(() => {
18505        $('#message-notification').removeClass('show-notification')
18506    }, 3000);
18507}
18508
18509function showNotificationWithLink(type, message, link = '', duration = 3000) {
18510    const iconurl = base_url + '/public/images/' + type + '-icon.png';
18511    $('#message-notification-image').attr('src', iconurl);
18512
18513    let finalMessage = message;
18514    if (link) {
18515        finalMessage +=
18516            ` <a href="${link}" target="_blank" style="color:#00aaff;text-decoration:underline;">View here</a>`;
18517    }
18518
18519    $('#message-notification-text').html(finalMessage);
18520    $('#message-notification').addClass('show-notification');
18521
18522    setTimeout(() => {
18523        $('#message-notification').removeClass('show-notification');
18524    }, duration);
18525}
18526
18527
18528
18529/* 
18530 $('#repost-form-submit').on('click', function (e) {
18531    e.preventDefault();
18532    console.log("click at 3192");
18533
18534    // Collect post data from the popup
18535    let postText = $('#re-post-textarea').val();
18536    let repostId = $('#repostId').val();
18537    let mediatype = 0; // Default to 0, meaning no media
18538    let mediaUrl = ''; // URL for GIF or other media
18539
18540    // Check for media files (image or video)
18541    if ($('#imageInput-repost')[0].files.length > 0) {
18542        mediatype = 1; // Image
18543    } else if ($('#videoInput-repost')[0].files.length > 0) {
18544        mediatype = 2; // Video
18545    }
18546    // Check for GIF
18547    else if ($('#previewGifs').find('img').length > 0) {
18548        mediatype = 3; // GIF
18549        mediaUrl = $('#previewGifs img').attr('src'); // Extract the selected GIF URL
18550    }
18551
18552    // Validate that post text or media is provided
18553    if (!postText && mediatype === 0) {
18554        showNotification('error', 'Please add some content before posting.');
18555        return;
18556    }
18557
18558    // Prepare form data for the AJAX request
18559    let formData = new FormData();
18560    formData.append('postText', postText);
18561    formData.append('media_type', mediatype);
18562    formData.append('media_url', mediaUrl);
18563    formData.append('repostId', repostId);
18564    formData.append('duration', 0);
18565
18566    // Handle image or video files
18567    if (mediatype === 1) {
18568        formData.append('repost-image', $('#imageInput-repost')[0].files[0]);
18569    } else if (mediatype === 2) {
18570        formData.append('repost-video', $('#videoInput-repost')[0].files[0]);
18571    }
18572
18573    // Make the AJAX request to save the post
18574    $.ajax({
18575        url: base_url + '/addPost', // this will save data in RE-Post
18576        type: 'POST',
18577        data: formData,
18578        processData: false,
18579        contentType: false,
18580        success: function (response) {
18581            let result = JSON.parse(response);
18582            if (result.status) {
18583                showNotification('success', 'Post added successfully!');
18584                 
18585                // Optionally, reset the popup form
18586                $('#re-post-textarea').val('');
18587                $('#imageInput-repost').val('');
18588                $('#videoInput-repost').val('');
18589                $('#repostId').val('');
18590                $('#previewGifs').empty();
18591
18592                // Close the popup
18593                $('#repost-popup').fadeOut();
18594                $('body').removeClass('overflow-hidden');
18595                 
18596                getSocialFeed('3','1','1', '');
18597            } else {
18598                showNotification('error', result.message || 'An error occurred while adding the post.');
18599            }
18600        },
18601        error: function (xhr, status, error) {
18602            console.error('Error:', error);
18603            showNotification('error', 'Failed to add the post. Please try again.');
18604        }
18605    });
18606}); */
18607
18608//30 jan for repost button 
18609
18610function handleAddRePost(isDraft = 0) {
18611    // Fetch scheduled data
18612    let scheduled = $('#scheduled').val();
18613    let scheduledate = $('#scheduledate').val();
18614    let scheduletime = $('#scheduletime').val();
18615
18616    // Fetch post text
18617    let postText = $('#re-post-textarea').val();
18618
18619    // Initialize media type and variables
18620    let mediatype = 0;
18621    let alreadyAsMedia = false;
18622    let mediaUrl = '';
18623    let imagesData = [];
18624
18625
18626    // Get the state of the checkboxes
18627    let commentsOff = $('#post-setting-box input[type="checkbox"]:eq(0)').is(':checked') ? 1 : 0;
18628    let hideLike = $('#post-setting-box input[type="checkbox"]:eq(1)').is(':checked') ? 1 : 0;
18629
18630
18631
18632
18633    let formData = new FormData();
18634
18635    // Detect media type
18636    if ($('#imageInput-repost')[0].files.length > 0) {
18637        mediatype = 1; // Image post
18638    } else if ($('#videoInput-repost')[0].files.length > 0) {
18639        mediatype = 2; // Video post
18640    } else if ($('#gifPreviewBox').is(':visible')) {
18641        mediatype = 3; // GIF post
18642        mediaUrl = $('#gifPreviewAddPost').attr('src'); // Get GIF URL
18643    }
18644
18645    // Prevent posting if no content is provided
18646    if (!postText && mediatype === 0) {
18647        //console.log('Please add some content before posting.');
18648        showNotification('error', 'Please add some content before posting.');
18649        return;
18650    }
18651
18652    // Handle images (from carousel or directly uploaded)
18653    $('#imageCarousel .item').each(function(index) {
18654        let embeddedLink = $(this).find('img').attr('data-embeded-link') || '';
18655        let embeddedText = $(this).find('img').attr('data-alt') || '';
18656        let imageFile = $('#imageInput-repost')[0].files[index] || null;
18657
18658        imagesData.push({
18659            embeddedLink: embeddedLink,
18660            embeddedText: embeddedText,
18661            fileName: imageFile ? imageFile.name : ''
18662        });
18663    });
18664
18665    // Append image files and metadata to formData
18666    if (mediatype === 1) {
18667        const files = $('#imageInput-repost')[0].files;
18668        Array.from(files).forEach((file, index) => {
18669            formData.append('repost-images[]', file);
18670            formData.append('repost-embeddedLink[]', imagesData[index]?.embeddedLink || '');
18671            formData.append('repost-altText[]', imagesData[index]?.embeddedText || '');
18672        });
18673    }
18674
18675    // Append video file (if uploaded)
18676    if (mediatype === 2 && $('#videoInput-repost')[0].files.length > 0) {
18677        formData.append('repost-video', $('#videoInput-repost')[0].files[0]);
18678    }
18679
18680    // Append existing video URL (if any)
18681    if ($('#videoSource').length > 0 && $('#videoSource').attr('src')) {
18682        alreadyAsMedia = true;
18683        mediatype = 2;
18684        const videoUrl = $('#videoSource').attr('src');
18685        formData.append('repost-video', videoUrl);
18686    }
18687
18688    // Handle GIF (if selected)
18689    if (mediatype === 3 && mediaUrl) {
18690        alreadyAsMedia = true;
18691        formData.append('media_url', mediaUrl);
18692    }
18693
18694    // Append scheduling data
18695    formData.append('scheduled', scheduled);
18696    formData.append('scheduledate', scheduledate);
18697    formData.append('scheduletime', scheduletime);
18698
18699    // Append post content and other metadata
18700    formData.append('alreadyAsMedia', alreadyAsMedia);
18701    formData.append('postText', postText);
18702    formData.append('media_type', mediatype);
18703    formData.append('media_url', mediaUrl);
18704    formData.append('duration', 0);
18705    formData.append('is_draft', isDraft);
18706
18707
18708    // Append the checkbox data
18709    formData.append('IsCommentBlocked', commentsOff);
18710    formData.append('hideLike', hideLike);
18711
18712    // AJAX request to add post
18713    $.ajax({
18714        url: base_url + '/addPost', // API endpoint
18715        type: 'POST',
18716        data: formData,
18717        processData: false,
18718        contentType: false,
18719        beforeSend: function() {
18720            let originalText = $('#addPost-form-submit').text();
18721            $('#addPost-form-submit')
18722                .prop('disabled', true)
18723                .data('original-text', originalText)
18724                .html('<span class="jloader"></span>');
18725
18726        },
18727        success: function(response) {
18728
18729            // console.log("success reponse comes......");
18730            $('#addPost-form-submit')
18731                .prop('disabled', false)
18732                .html($('#addPost-form-submit').data('original-text'));
18733
18734
18735            let result = JSON.parse(response);
18736            if (result.status) {
18737                let message = isDraft ? 'Draft Saved' : 'Post sent successfully.';
18738                showNotification('success', message);
18739
18740                // Reset form and close modal
18741                resetRepostForm();
18742                isNewPost = true;
18743                //$('#addPostTextarea').val('');
18744                $('#addPostTextarea').text('');
18745                $('#imageInput-repost').val('');
18746                $('#videoInput-repost').val('');
18747                $('#previewGifsForAddPost').empty();
18748                $('#repost-popup').fadeOut();
18749                $('body').removeClass('overflow-hidden');
18750                $('#post-setting-box input[type="checkbox"]').prop('checked', false);
18751                // Refresh feed
18752                console.log("refersh feed called....");
18753                getSocialFeed('3', '1', '1', '');
18754            } else {
18755                showNotification(result.message || 'An error occurred while processing the request.');
18756            }
18757        },
18758        error: function(xhr, status, error) {
18759            console.error('Error:', error);
18760            showNotification('Failed to process the request. Please try again.');
18761        }
18762    });
18763}
18764
18765
18766
18767// Error Handling Functions
18768function setError(element, message) {
18769    clearError(element);
18770    const errorElement = document.createElement("div");
18771    errorElement.className = "error-message";
18772    errorElement.style.color = "red";
18773    errorElement.innerText = message;
18774    element.insertAdjacentElement("afterend", errorElement);
18775}
18776
18777function clearError(element) {
18778    if (
18779        element.nextSibling &&
18780        element.nextSibling.nodeType === 1 && // Ensure it's an element node
18781        element.nextSibling.classList.contains("error-message")
18782    ) {
18783        element.nextSibling.remove();
18784    }
18785}
18786// Select elements
18787/* const imageInput = document.getElementById('repost-image');
18788const videoInput = document.getElementById('repost-video'); */
18789
18790const imageInput = document.querySelector('#imageInput-repost');
18791const videoInput = document.querySelector('.videoInput-repost');
18792
18793const previewBox = document.getElementById('preview-repost-image');
18794
18795
18796
18797// Function to handle file preview with close button
18798function previewFile(file, type) {
18799    // Clear any existing content in the preview box
18800    previewBox.innerHTML = '';
18801
18802    // Create a wrapper for the preview and close button
18803    const wrapper = document.createElement('div');
18804    wrapper.style.position = 'relative';
18805    wrapper.style.display = 'inline-block';
18806
18807    // Create an element based on file type
18808    let mediaElement;
18809    if (type === 'image') {
18810        mediaElement = document.createElement('img');
18811        mediaElement.src = URL.createObjectURL(file);
18812        mediaElement.alt = 'Selected Image';
18813        mediaElement.style.maxWidth = '100%';
18814        mediaElement.style.maxHeight = '200px';
18815    } else if (type === 'video') {
18816        mediaElement = document.createElement('video');
18817        mediaElement.src = URL.createObjectURL(file);
18818        mediaElement.controls = true;
18819        mediaElement.style.maxWidth = '100%';
18820        mediaElement.style.maxHeight = '200px';
18821    }
18822
18823    // Add the media element to the wrapper
18824    wrapper.appendChild(mediaElement);
18825
18826    // Create the close button
18827    const closeButton = document.createElement('span');
18828    closeButton.innerHTML = '&times;';
18829    closeButton.style.position = 'absolute';
18830    closeButton.style.top = '5px';
18831    closeButton.style.right = '5px';
18832    closeButton.style.backgroundColor = 'red';
18833    closeButton.style.color = 'white';
18834    closeButton.style.padding = '5px';
18835    closeButton.style.cursor = 'pointer';
18836    closeButton.style.borderRadius = '50%';
18837    closeButton.style.fontSize = '16px';
18838    closeButton.style.lineHeight = '1';
18839
18840    // Add event listener to the close button
18841    closeButton.addEventListener('click', () => {
18842        previewBox.innerHTML = ''; // Clear the preview box
18843        imageInput.value = ''; // Reset the image input
18844        videoInput.value = ''; // Reset the video input
18845    });
18846
18847    // Add the close button to the wrapper
18848    wrapper.appendChild(closeButton);
18849
18850    // Append the wrapper to the preview box
18851    previewBox.appendChild(wrapper);
18852}
18853
18854// Event listener for image input
18855/* imageInput.addEventListener('change', function () {
18856    const file = this.files[0];
18857    if (file) {
18858        previewFile(file, 'image');
18859    }
18860});
18861
18862// Event listener for video input
18863videoInput.addEventListener('change', function () {
18864    const file = this.files[0];
18865    if (file) {
18866        previewFile(file, 'video');
18867    }
18868}); */
18869
18870/* 
18871document.getElementById('re-post-textarea').addEventListener('input', function () {
18872    const buttonContainer = document.getElementById('repost-form-submit');
18873     if (this.value.trim() !== '') {
18874        buttonContainer.classList.add('active'); // Add your desired class
18875    } else {
18876        buttonContainer.classList.remove('active'); // Remove the class when empty
18877    }  
18878});
18879 */
18880//repost image and vdo preview logic 
18881
18882$('#imageInput-repost').on('change', function(event) {
18883    const files = event.target.files; // Get selected files
18884    const imageCarousel = $('#imageCarousel-repost'); // Carousel container
18885    const previewBox = $('#imagePreviewBox-repost'); // Preview box
18886
18887    $('#videoSource-repost').attr('src', '');
18888    $('#videoPreviewBox-repost').hide();
18889
18890
18891    // Clear existing content and reset carousel
18892    imageCarousel.trigger('destroy.owl.carousel'); // Destroy Owl Carousel if initialized
18893    imageCarousel.empty(); // Remove all child elements from the carousel
18894    previewBox.hide(); // Hide the preview box
18895
18896    $('#gifPreviewBox').hide();
18897    $('#gifPreviewAddPost').attr('src', '');
18898
18899
18900    if (files.length > 0) {
18901        // Loop through files and create image elements
18902        Array.from(files).forEach((file, index) => {
18903            const reader = new FileReader();
18904            reader.onload = function(e) {
18905                /* const imageItem = `
18906                    <div class="item" data-index="${index}">
18907                        <img class="multi-image-wrapper" src="${e.target.result}" alt="Uploaded Image" style="width: 100%; height: auto;" />
18908                    </div>`; */
18909
18910                const imageItem = `
18911                        <div id="image-preview-${index}" class="item" data-index="${index}">
18912                            <img id="preview-img-${index}" class="multi-image-wrapper" src="${e.target.result}" alt="Uploaded Image" style="width: 100%; height: auto;" 
18913                                data-embeded-link="" data-alt="Jumpspree" />
18914                            <div class="embed-and-alt d-flex mt-3">
18915                                <div class="embed-link">
18916                                    <a href="javascript:void(0)" onclick="openEmbedLinkPopup(event, ${index})">
18917                                        <i class="hgi hgi-stroke hgi-link-05"></i>
18918                                    </a>
18919                                </div>
18920                                <div class="add-alt-text">
18921                                    <a href="javascript:void(0)" onclick="openAltTextPopup(event, ${index})">
18922                                        <span class="alt-icon">Alt</span>
18923                                    </a>
18924                                </div>
18925                            </div>
18926                        </div>`;
18927
18928
18929                imageCarousel.append(imageItem);
18930            };
18931            reader.readAsDataURL(file);
18932        });
18933
18934        // Reinitialize Owl Carousel for multiple images
18935        setTimeout(() => {
18936            if (files.length > 1) {
18937                imageCarousel.addClass('owl-carousel owl-theme'); // Ensure carousel class is applied
18938                imageCarousel.owlCarousel({
18939                    loop: false,
18940                    margin: 10,
18941                    nav: false,
18942                    dots: true,
18943                    autoplay: false,
18944                    responsive: {
18945                        0: {
18946                            items: 1,
18947                            loop: false
18948                        },
18949                        600: {
18950                            items: 1,
18951                            loop: false
18952                        },
18953                        1000: {
18954                            items: 1,
18955                            loop: false
18956                        },
18957                    },
18958                });
18959            } else {
18960                // Remove carousel styling for a single image
18961                $('.addpostImagePreview').removeClass('owl-carousel owl-theme');
18962                $('#imagePreviewBox-repost').addClass('single-image-preview');
18963                imageCarousel.removeClass('owl-carousel owl-theme');
18964                const element = document.querySelector('.multi-image-wrapper');
18965                if (element) { // Ensure the element exists to avoid errors
18966                    element.classList.remove('multi-image-wrapper');
18967                }
18968
18969            }
18970
18971            previewBox.show(); // Show the preview box
18972        }, 500);
18973    }
18974});
18975
18976
18977$('#re-post-textarea').on('input', function() {
18978    let maxChars = 260;
18979    const isVerified = null;
18980    if (isVerified != 0 || isVerified != '0') {
18981        maxChars = 880;
18982    }
18983
18984    const circleRadius = 22; // Match the radius in the SVG
18985    const circleCircumference = 2 * Math.PI * circleRadius;
18986
18987    const buttonContainer = $('#repost-form-submit');
18988    const progressCircle = $('#progress-circle');
18989    //const postText = this.value.trim(); // Get the trimmed value of the textarea
18990    const postText = this.innerText.trim();
18991
18992    const currentLength = postText.length;
18993
18994    // Calculate remaining characters
18995    const remainingChars = maxChars - currentLength;
18996
18997    // Update the character count display (with minus counter logic)
18998    const charCountDisplay = $('#char-count-repost');
18999    charCountDisplay.text(remainingChars); // Show remaining characters
19000    if (remainingChars < 0) {
19001        charCountDisplay.css('color', 'red'); // Negative count in red
19002    } else {
19003        charCountDisplay.css('color', ''); // Default color
19004    }
19005
19006    // Update the progress circle
19007    const percentage = Math.min(currentLength / maxChars, 1); // Limit to 100%
19008    const offset = circleCircumference * (1 - percentage); // Calculate stroke-dashoffset
19009    progressCircle.css('stroke-dasharray', `${circleCircumference}`); // Set total circle length
19010    progressCircle.css('stroke-dashoffset', offset); // Set the progress based on percentage
19011
19012    // Enable or disable the Post button based on text length
19013    if (currentLength > 0 && currentLength <= maxChars) {
19014        buttonContainer.prop('disabled', false) // Enable the button
19015            .removeClass('disabled')
19016            .addClass('blue-bg active');
19017    } else {
19018        buttonContainer.prop('disabled', true) // Disable the button
19019            .removeClass('active blue-bg')
19020            .addClass('disabled');
19021    }
19022
19023    // Prevent typing beyond max characters
19024    /* if (currentLength > maxChars) {
19025        this.value = postText.substring(0, maxChars); // Truncate excess characters
19026    } */
19027});
19028
19029
19030
19031function resetRepostForm(clearPreviewBox=true) {
19032    // Reset text input and file inputs
19033    // $('#addPostTextarea').val('');
19034    $('#addPostTextarea').text('');
19035    $('#imageInput').val('');
19036    $('#videoInput').val('');
19037
19038    // Reset preview boxes
19039    $('#previewGifsForAddPost').empty(); // Clear GIF previews
19040    if(clearPreviewBox){
19041        $('#imageCarousel').empty(); // Clear image carousel
19042        $('#imagePreviewBox').empty(); // Clear single image preview
19043    }
19044
19045    // Hide preview boxes
19046    $('#gifPreviewBox').hide();
19047    $('#imagePreviewBox').hide();
19048    $('#videoPreviewBox').hide();
19049
19050    // Reset form inputs for scheduled posts
19051    $('#scheduled').val('');
19052    $('#scheduledate').val('');
19053    $('#scheduletime').val('');
19054
19055    // Re-initialize dynamic elements (if any)
19056    if ($('.addpostImagePreview').hasClass('owl-carousel')) {
19057        $('.addpostImagePreview').trigger('destroy.owl.carousel'); // Destroy existing carousel
19058        $('.addpostImagePreview').owlCarousel({ // Re-initialize carousel
19059            loop: false,
19060            margin: 10,
19061            nav: false,
19062            dots: true,
19063            autoplay: false,
19064            responsive: {
19065                0: {
19066                    items: 1
19067                },
19068                600: {
19069                    items: 1
19070                },
19071                1000: {
19072                    items: 1
19073                },
19074            },
19075        });
19076        $('.owl-carousel').owlCarousel({
19077            loop: false,
19078            margin: 10,
19079            nav: false,
19080            dots: true,
19081            autoplay: false,
19082            responsive: {
19083                0: {
19084                    items: 1
19085                },
19086                600: {
19087                    items: 1
19088                },
19089                1000: {
19090                    items: 1
19091                },
19092            },
19093        });
19094    }
19095    $('.social-popup').fadeOut('fast');
19096    $('#post-setting-box input[type="checkbox"]').prop('checked', false);
19097    // Re-bind event listeners (if necessary)
19098    bindPostEventListeners();
19099}
19100
19101// Example: Bind event listeners
19102function bindPostEventListeners() {
19103    // Example of re-attaching click events to dynamically created buttons
19104    $('.delete-preview-btn').off('click').on('click', function() {
19105        $(this).closest('.preview-item').remove();
19106    });
19107
19108    // Any other event listeners that need to be re-bound
19109}
19110
19111
19112/* 
19113$('.discard-btn').on('click', function () {
19114    // Clear form inputs
19115    $('#re-post-textarea').val('');
19116    $('#imageInput').val('');
19117    $('#videoInput').val('');
19118    $('#repostId').val('');
19119    $('#previewGifs').empty(); // Remove previewed GIFs or media
19120
19121    // Optionally, reset classes or styles
19122    $('#repost-form-submit').removeClass('active');
19123
19124    // Execute the inline functionality
19125    $(this).parents('.discard-conformation').fadeOut('fast');
19126    $('.social-popup').fadeOut('fast');
19127    $('body').removeClass('overflow-hidden');
19128    $('.social-shadow').hide();
19129    $('.add-post').removeClass('add-post-opened');
19130    $('.add-post-drop-box').hide();
19131}); */
19132
19133
19134// may 1   When no media and no text discard button should be direct closed without asking save to draft 
19135function handleDiscardPollAction_old() {
19136    $('#poll-save-draft').show();
19137    //$('.social-popup').fadeOut('fast');
19138    //$('body').removeClass('overflow-hidden');
19139    //$('.social-shadow').hide();
19140    //$('.add-post').removeClass('add-post-opened');
19141    //$('.add-post-drop-box').hide();    
19142
19143    // Hide Poll
19144    // $('#create-poll-main-box, #post-footer-for-poll').hide(); 
19145    //$('#post-footer-for-post').show(); 
19146    //$('#add-post-full-container').show();
19147    //$('#discard-for-poll').hide();
19148    //$('#discard-for-post').show();
19149
19150}
19151
19152function handleDiscardPollAction() {
19153
19154    const pollQuestion = $('#pollDescription').val().trim();
19155
19156    let hasOptions = false;
19157
19158    // Check if any poll option has text
19159    $('.create-poll-option .poll-option-input').each(function() {
19160        if ($(this).val().trim() !== '') {
19161            hasOptions = true;
19162            return false; // Exit loop early
19163        }
19164    });
19165
19166    // Check if poll duration is filled
19167    const pollDuration = $('#pollDuration').val();
19168    // const hasDuration = pollDuration && parseInt(pollDuration) > 0;
19169
19170    // Final check
19171    const hasPollContent = pollQuestion.length > 0 || hasOptions; // ||hasDuration
19172
19173    console.log("Poll discard check — Question:", pollQuestion, "| Options filled:", hasOptions, "| Duration:", 0);
19174
19175    if (hasPollContent) {
19176        // Show save draft confirmation box
19177        $('#poll-save-draft').show(); // You can style or handle this however you want
19178    } else {
19179        // Close the poll popup directly — no confirmation
19180        $('.discard-conformation').fadeOut('fast');
19181        $('.social-popup').fadeOut('fast');
19182        $('body').removeClass('overflow-hidden');
19183        $('.social-shadow').hide();
19184        $('.add-post').removeClass('add-post-opened');
19185        $('.add-post-drop-box').hide();
19186
19187        // Reset poll state (optional)
19188        $('#create-poll-main-box, #post-footer-for-poll').hide();
19189        $('#post-footer-for-post').show();
19190        $('#add-post-full-container').show();
19191        $('#discard-for-poll').hide();
19192        $('#discard-for-post').show();
19193    }
19194
19195    // Reset poll setting toggles (if any)
19196    $('#poll-setting-box input[type="checkbox"]').prop('checked', false);
19197}
19198
19199
19200function handleDiscardPollActionFinal() {
19201    // Close popup
19202    $('.social-popup').fadeOut('fast');
19203    $('body').removeClass('overflow-hidden');
19204    $('.social-shadow').hide();
19205    $('.add-post').removeClass('add-post-opened');
19206    $('.add-post-drop-box').hide();
19207    $('#social-popup .add-post-inner').removeClass('draft-open');
19208    $('#draft-box').hide();
19209    // Hide Poll UI, show Post UI
19210    $('#create-poll-main-box, #post-footer-for-poll').hide();
19211    $('#post-footer-for-post').show();
19212    $('#add-post-full-container').show();
19213    $('#discard-for-poll').hide();
19214    $('#discard-for-post').show();
19215
19216    // ✅ Reset poll description
19217    $('#pollDescription').val('');
19218
19219    // ✅ Re-render poll options as fresh (Option 1, Option 2, Add more)
19220    $('#pollOptionsContainer').html(`
19221        <div class="option">
19222            <input type="text" class="poll-option-input" placeholder="Option 1">
19223            <button class="delete-option" type="button" style="display: none;">
19224                <img src="https://www.jumpspree.com/public/images/trash.png" alt="Delete" title="Delete">
19225            </button>
19226        </div>
19227        <div class="option">
19228            <input type="text" class="poll-option-input" placeholder="Option 2">
19229            <button class="delete-option" type="button" style="display: none;">
19230                <img src="https://www.jumpspree.com/public/images/trash.png" alt="Delete" title="Delete">
19231            </button>
19232        </div>
19233        <div class="option add-another-option">
19234            <input type="text" id="newPollOptionInput" class="poll-option-input" placeholder="Add more">
19235            <button class="delete-option" type="button" style="display: none;">
19236                <img src="https://www.jumpspree.com/public/images/trash.png" alt="Delete" title="Delete">
19237            </button>
19238        </div>
19239    `);
19240
19241    // ✅ Reset poll duration to "1 day"
19242    $('.duration-btn').removeClass('selected');
19243    $('.duration-btn').each(function() {
19244        if ($(this).text().includes('1 day')) {
19245            $(this).addClass('selected');
19246        }
19247    });
19248
19249    // ✅ Reset hour input in case it was used
19250    $('#pollDuration').val('');
19251
19252    // ✅ Disable the submit button
19253    $('.addPost-form-submit').addClass('disabled').removeClass('active');
19254}
19255
19256
19257function handleDiscardAction() {
19258
19259    // let postText = $('#addPostTextarea').val().trim();
19260    let postText = $('#addPostTextarea').text().trim();
19261    const imageInput = document.getElementById('imageInput');
19262    const videoInput = document.getElementById('videoInput');
19263    const gifBox = document.getElementById('gifPreviewBox');
19264    const gifPreview = document.getElementById('gifPreviewAddPost');
19265
19266    const hasImage = imageInput && imageInput.files.length > 0;
19267    const hasVideo = $('#videoSource').attr('src')?.trim() !== '';
19268    const hasGif = gifBox && gifBox.style.display !== 'none' && gifPreview && gifPreview.getAttribute('src');
19269
19270    const hasContent = postText.length > 0 || hasImage || hasVideo || hasGif;
19271
19272    console.log("Discard action check — Text:", postText, "Image:", hasImage, "Video:", hasVideo, "GIF:", hasGif);
19273
19274    if (hasContent) {
19275        $('#save-draft').show(); // Prompt to save draft
19276    } else {
19277
19278        // Optionally, reset classes or styles
19279        $('#repost-form-submit').removeClass('active');
19280
19281        // Execute the inline functionality
19282        $(this).parents('.discard-conformation').fadeOut('fast');
19283        $('.social-popup').fadeOut('fast');
19284        $('body').removeClass('overflow-hidden');
19285        $('.social-shadow').hide();
19286        $('.add-post').removeClass('add-post-opened');
19287        $('.add-post-drop-box').hide();
19288    }
19289    const val = $("#repostId").val();
19290    if(val && val.length > 0){
19291        clearRepost();
19292    }
19293    
19294    $('#post-setting-box input[type="checkbox"]').prop('checked', false);
19295     
19296}
19297
19298function handleClearAll(){
19299    console.log("click at handleClearAll 13399");
19300    closePreview();
19301    clearPreviews();
19302    const gifPreviewAddPost = document.getElementById('gifPreviewAddPost');
19303    gifPreviewAddPost.src = '';
19304    $('#videoSource').attr('src', '');
19305    $('#gifPreviewAddPost').attr('src', '');
19306
19307    // Clear form inputs
19308    $('#re-post-textarea').val('');
19309    //$('#addPostTextarea').val('');
19310    $('#addPostTextarea').text('');
19311    $('#imageInput').val('');
19312    $('#videoInput').val('');
19313    $('#repostId').val('');
19314    $('#previewGifs').empty(); // Remove previewed GIFs or media
19315
19316    // Optionally, reset classes or styles
19317    $('#repost-form-submit').removeClass('active');
19318
19319    // Execute the inline functionality
19320    $(this).parents('.discard-conformation').fadeOut('fast');
19321    $('.social-popup').fadeOut('fast');
19322    $('body').removeClass('overflow-hidden');
19323    $('.social-shadow').hide();
19324    $('.add-post').removeClass('add-post-opened');
19325    $('.add-post-drop-box').hide();
19326    $('#save-draft').fadeOut();
19327}
19328
19329//added 23 jan 
19330
19331$('.discard-btn').on('click', function() {
19332    console.log("click at discard-btn 13402");
19333    closePreview();
19334    clearPreviews();
19335    const gifPreviewAddPost = document.getElementById('gifPreviewAddPost');
19336    gifPreviewAddPost.src = '';
19337    $('#videoSource').attr('src', '');
19338    $('#gifPreviewAddPost').attr('src', '');
19339
19340    // Clear form inputs
19341    $('#re-post-textarea').val('');
19342    //$('#addPostTextarea').val('');
19343    $('#addPostTextarea').text('');
19344    $('#imageInput').val('');
19345    $('#videoInput').val('');
19346    $('#repostId').val('');
19347    $('#previewGifs').empty(); // Remove previewed GIFs or media
19348
19349    // Optionally, reset classes or styles
19350    $('#repost-form-submit').removeClass('active');
19351
19352    // Execute the inline functionality
19353    $(this).parents('.discard-conformation').fadeOut('fast');
19354    $('.social-popup').fadeOut('fast');
19355    $('body').removeClass('overflow-hidden');
19356    $('.social-shadow').hide();
19357    $('.add-post').removeClass('add-post-opened');
19358    $('.add-post-drop-box').hide();
19359});
19360
19361
19362//added on 16 may 
19363function voteMyPoll(optionId, userToken, pollId) {
19364    /*$('input[name="poll'+pollId+'"]').each(function() {
19365            if ($(this).is(':checked')) {
19366                $(this).parent().addClass('checkedhai').removeClass('checkednahihai');
19367            } else {
19368                $(this).parent().addClass('checkednahihai').removeClass('checkedhai');
19369            }
19370        });*/
19371
19372    if (!optionId || !userToken || !pollId) {
19373        window.location.href = base_url + '/signin';
19374        //showNotification('error', "Missing required data to cast your vote.");
19375        //return;
19376    }
19377
19378    $.ajax({
19379        url: base_url + '/set-poll-vote',
19380        method: 'POST',
19381        headers: {
19382            'Authorization': `Bearer ${userToken}`,
19383        },
19384        contentType: 'application/json',
19385        data: JSON.stringify({
19386            pollId,
19387            optionId
19388        }),
19389
19390        success: function(data) {
19391            if (data.status) {
19392                // showNotification('success', data.message || 'Vote recorded successfully!');
19393
19394                // Update the bars
19395                data.pollOptions.forEach(option => {
19396                    const bar = $(`.poll-percentage-bar[data-option-id="${option.id}"]`);
19397                    const newWidth = `${option.percentage}%`;
19398                    bar.animate({
19399                        width: newWidth
19400                    }, 500);
19401                    bar.html(
19402                        `${option.option} <span class="percent-text hide">${parseFloat(option.percentage).toFixed(2)}</span>`
19403                        );
19404                    $(`input[name="poll${pollId}"][value="${optionId}"]`).removeClass('hide');
19405
19406                });
19407
19408                // Update total votes
19409                $('.votes').text(`${data.total_votes} votes`);
19410
19411                // ✅ Extract poll ID from input name and disable all
19412                const pollName = `poll${pollId}`;
19413                $(`input[name="${pollName}"]`).prop('disabled', true);
19414
19415            } else {
19416                window.location.href = base_url + '/signin';
19417                //showNotification('error', data.message || 'Failed to record your vote.');
19418            }
19419        },
19420        error: function(xhr, status, error) {
19421            console.error('Error submitting vote:', error);
19422            showNotification('error', 'An error occurred. Please try again later.');
19423        }
19424    });
19425}
19426
19427
19428
19429// Function to handle the actions only if the user is logged in
19430function performAction(action, userToken, username, postId, element, currentUser, post) {
19431
19432    if (currentUser) {
19433        // Perform the action based on the function passed (e.g., follow, mute, block)
19434        if (action === 'follow') {
19435            toggleFollow(userToken, username, postId, element, post);
19436        } else if (action === 'mute') {
19437            toggleMute(userToken, username, postId, element, post);
19438        } else if (action === 'block') {
19439            toggleBlock(userToken, username, postId, element, post);
19440        }
19441    } else {
19442        // If user is not logged in, redirect to the login page
19443        window.location.href = "https://www.jumpspree.com/sign-in";
19444    }
19445}
19446
19447// Toggle Follow/Unfollow
19448function toggleFollow(userToken, username, postId, element, post) {
19449    post.is_follow = post.is_follow == "1" ? "0" : "1"; // Toggle follow state
19450    element.innerHTML =
19451        `${post.is_follow == "1" ? `Unfollow @${username}` : `Follow @${username}`} <i class="fa-regular fa-user-check"></i>`;
19452    followUnfollowUser(userToken, username, postId);
19453}
19454
19455// Toggle Mute/Unmute
19456function toggleMute(userToken, username, postId, element, post) {
19457    post.mute = post.mute == "1" ? "0" : "1"; // Toggle mute state
19458    element.innerHTML =
19459        `${post.mute == "1" ? `Unmute @${username}` : `Mute @${username}`} <i class="fa-regular fa-volume-slash"></i>`;
19460    muteUser(userToken, username, postId);
19461}
19462
19463// Toggle Block/Unblock
19464function toggleBlock(userToken, username, postId, element, post) {
19465    post.block = post.block == "1" ? "0" : "1"; // Toggle block state
19466    element.innerHTML =
19467        `${post.block == "1" ? `Unblock @${username}` : `Block @${username}`} <i class="fa-regular fa-ban"></i>`;
19468    blockUser(userToken, username, postId);
19469}
19470
19471
19472
19473function mentionUser_old(username) {
19474    $('#social-popup').fadeIn('fast');
19475    $('body').addClass('overflow-hidden');
19476    $('.add-post-drop-box').hide();
19477    $('.social-shadow').hide();
19478    $('.add-post').removeClass('add-post-opened');
19479
19480    const textareaForAddPost = document.getElementById('addPostTextarea');
19481    textareaForAddPost.value = '@' + username;
19482}
19483
19484function mentionUser(username) {
19485    $('#social-popup').fadeIn('fast');
19486    $('body').addClass('overflow-hidden');
19487    $('.add-post-drop-box').hide();
19488    $('.social-shadow').hide();
19489    $('.add-post').removeClass('add-post-opened');
19490
19491    const textareaForAddPost = document.getElementById('addPostTextarea');
19492    textareaForAddPost.innerText = '@' + username;
19493    textareaForAddPost.focus(); // optional, to focus on the div
19494}
19495</script>
19495
19496<script>
19497function showUnfollow(whom, username, usertype, recid = '', feed = '0') {
19498    // alert(username)
19499
19500    $('#footerunfollowbtn').text('Unfollow')
19501    $('#unfollowusernamefooter').text('@' + username + '');
19502    $('#footerunfollowbtn').data('user', whom)
19503    $('#footerunfollowbtn').data('type', usertype)
19504    $('#footerunfollowbtn').data('rec', recid)
19505    $('#footerunfollowbtn').data('feed', feed)
19506
19507    $('#unfollow-confirmation').show()
19508
19509
19510}
19511
19512function deleteAllDrafts() {
19513
19514    $.ajax({
19515        url: base_url + '/delete-draft/all', // Replace with your API endpoint
19516        type: 'POST',
19517        data: {
19518            token: "userToken"
19519        },
19520        dataType: 'json',
19521        beforeSend: function() {
19522            // Optional: Show a loader or disable the button
19523            $('#areyousureDraft').prop('disabled', true).text('Deleting...');
19524        },
19525        success: function(response) {
19526            if (response.status === 'success') {
19527                showNotification('success', response.message);
19528                // Remove drafts from the UI
19529                $('.draft-outer .drafts').remove();
19530                $('.no-drafts').addClass('no-draft-show');
19531
19532                // Hide the confirmation modal
19533                $('.discard-conformation').fadeOut('fast');
19534
19535                // Show success notification
19536                getAllMyDrafts();
19537                const draftContainer = $('#draft-container');
19538                const draftHtml = `
19539                            <div class="no-drafts">
19540                                    <p>No drafts available</p>
19541                                </div>
19542                        `;
19543                draftContainer.append(draftHtml);
19544            } else {
19545                // Show error notification
19546                showNotification('error', response.message);
19547            }
19548
19549            // Reset the button state
19550            //$('.copy-embed').prop('disabled', false).text('Yes');
19551            $('#discard-btn').prop('disabled', false).text('Discard');
19552        },
19553        error: function(xhr, status, error) {
19554            // Show error notification
19555            showNotification('error', 'An error occurred while deleting drafts.');
19556
19557            // Reset the button state
19558            //$('.copy-embed').prop('disabled', false).text('Yes');
19559            $('#discard-btn').prop('disabled', false).text('Discard');
19560        }
19561    });
19562}
19563
19564function deleteAllDraftsSingle(id) {
19565
19566    $.ajax({
19567        url: base_url + '/delete-draft/' + id, // Replace with your API endpoint
19568        type: 'POST',
19569        data: {
19570            token: "userToken"
19571        },
19572        dataType: 'json',
19573        beforeSend: function() {
19574            // Optional: Show a loader or disable the button
19575            $('#areyousureDraft').prop('disabled', true).text('Deleting...');
19576        },
19577        success: function(response) {
19578            if (response.status === 'success') {
19579
19580                getAllMyDrafts();
19581                // Remove drafts from the UI
19582                //draftDiv-1513 
19583                if (response.remaining_count < 1) {
19584                    const deleteAllDraftBtn = document.getElementById('deleteAllDraftBtn');
19585                    deleteAllDraftBtn.style.display = 'none';
19586
19587                    // console.log("we have zero records");
19588                    const draftContainer = $('#draft-container');
19589                    const draftHtml = `
19590                            <div class="no-drafts">
19591                                    <p>No drafts available</p>
19592                                </div>
19593                        `;
19594                    draftContainer.append(draftHtml); // Append to container
19595                }
19596                $('#draftDiv-' + id).hide();
19597                // Show success notification
19598                showNotification('success', response.message);
19599            } else {
19600                // Show error notification
19601                showNotification('error', response.message);
19602            }
19603        },
19604        error: function(xhr, status, error) {
19605            // Show error notification
19606            showNotification('error', 'An error occurred while deleting drafts.');
19607
19608            // Reset the button state
19609            $('.copy-embed').prop('disabled', false).text('Yes');
19610        }
19611    });
19612}
19613
19614
19615function unfollow() {
19616
19617    whom = $('#footerunfollowbtn').data('user');
19618    whomtype = $('#footerunfollowbtn').data('type');
19619    recId = $('#footerunfollowbtn').data('rec');
19620    feed = $('#footerunfollowbtn').data('feed');
19621
19622
19623    stext = $('#footerunfollowbtn').text();
19624    $.ajax({
19625        url: base_url + '/unfollow',
19626        type: 'POST',
19627        data: {
19628            whom: whom,
19629            whomtype: whomtype
19630        },
19631        dataType: "Json",
19632        beforeSend: function() {
19633
19634            $('#footerunfollowbtn').html('<span class="jloader"></span>');
19635
19636        },
19637        success: function(response) {
19638            msg = response.message;
19639            if (response.status) {
19640
19641
19642                $('#unfollow-confirmation').fadeOut('fast');
19643                showNotification('success', msg);
19644
19645                if (feed == '0') {
19646                    $('#' + recId).text(response.text)
19647                    $('#' + recId).addClass('notFollowing')
19648                    $('#' + recId).removeClass('isFollowing')
19649                    $('.fcb').removeClass('show-tip')
19650                } else {
19651                    $('#' + recID).find('span').text('Follow @' + user)
19652
19653                }
19654
19655
19656            } else {
19657                $('#unfollow-confirmation').fadeOut('fast');
19658                showNotification('error', msg);
19659                //  $(thisid).html(stext); 
19660            }
19661
19662
19663        },
19664        error: function(xhr, status, error) {
19665            $('#unfollow-confirmation').fadeOut('fast');
19666            $('#footerunfollowbtn').html(stext);
19667            //  $('#loader').hide();
19668            // console.error('AJAX error:', error);
19669        }
19670    });
19671
19672}
19673
19674
19675
19676function copyFeedlinktoshare(weblink) {
19677    var dummy = document.createElement('input'),
19678        text = weblink;
19679
19680    document.body.appendChild(dummy);
19681    dummy.value = text;
19682    dummy.select();
19683    document.execCommand('copy');
19684
19685
19686    document.body.removeChild(dummy);
19687
19688    $('#post-Link-copied').addClass('show-notification');
19689    setTimeout(function() {
19690
19691        $('#post-Link-copied').removeClass('show-notification');
19692    }, 3000)
19693
19694
19695
19696}
19697
19698function CopyFeedTextToClipboard(containerid) {
19699    if (window.getSelection) {
19700        if (window.getSelection().empty) { // Chrome
19701            window.getSelection().empty();
19702        } else if (window.getSelection().removeAllRanges) { // Firefox
19703            window.getSelection().removeAllRanges();
19704        }
19705    } else if (document.selection) { // IE?
19706        document.selection.empty();
19707    }
19708
19709    if (document.selection) {
19710        var range = document.body.createTextRange();
19711        range.moveToElementText(document.getElementById(containerid));
19712        range.select().createTextRange();
19713        document.execCommand("copy");
19714    } else if (window.getSelection) {
19715        var range = document.createRange();
19716        range.selectNode(document.getElementById(containerid));
19717        window.getSelection().addRange(range);
19718        document.execCommand("copy");
19719    }
19720
19721
19722    $('#post-text-copied').addClass('show-notification');
19723    setTimeout(function() {
19724
19725        $('#post-text-copied').removeClass('show-notification');
19726    }, 3000)
19727}
19728</script>
19728
19729
19730
19731<!-- Footer code END -->
19732
19733<script>
19734txt = window.location;
19735$('#share-url').text(txt)
19736</script>
19736
19737
19738
19739<link rel="preload" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.3.0/css/datepicker.min.css" as="style" onload="this.onload=null;this.rel='stylesheet'">
19740<noscript><link href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.3.0/css/datepicker.min.css" rel="stylesheet" type="text/css"></noscript>
19741<link rel="preload" href="https://cdnjs.cloudflare.com/ajax/libs/timepicker/1.3.5/jquery.timepicker.min.css" as="style" onload="this.onload=null;this.rel='stylesheet'">
19742<noscript><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/timepicker/1.3.5/jquery.timepicker.min.css"></noscript>
19743<script defer src="https://cdnjs.cloudflare.com/ajax/libs/timepicker/1.3.5/jquery.timepicker.min.js"></script>
19743
19744<!-- 
19744<script defer src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.3.0/js/bootstrap-datepicker.js"></script>
19744 -->
19745<script defer src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.3.0/js/bootstrap-datepicker.min.js"></script>
19745
19746
19747
19748
19749<script>
19750$(function () {
19751
19752    $("#datepicker").datepicker({
19753        autoclose: true,
19754        startDate: new Date()
19755    });
19756
19757    $('.timepicker').timepicker({
19758        timeFormat: 'hh:mm a',
19759        interval: 1,
19760        minTime: '0',
19761        maxTime: '11:59 pm',
19762        defaultTime: '07:02',
19763        startTime: '00:00',
19764        dynamic: true,
19765        dropdown: true,
19766        scrollbar: true
19767    });
19768
19769});
19770</script>
19770
19771<script>
19772    
19773// $(document).ready(function () {
19774//     $("#datepicker").datepicker({
19775//         autoclose: true,
19776//         startDate: new Date()
19777//     });
19778// });
19779
19780$('#datepicker').on('show', function(e) {
19781
19782
19783    if (e.date) {
19784        $(this).data('stickyDate', e.date);
19785    } else {
19786        $(this).data('stickyDate', null);
19787    }
19788});
19789
19790$('#datepicker').on('hide', function(e) {
19791
19792    var stickyDate = $(this).data('stickyDate');
19793
19794    if (!e.date && stickyDate) {
19795
19796        $(this).datepicker('setDate', stickyDate);
19797        $(this).data('stickyDate', null);
19798    }
19799});
19800
19801$('#datepicker').on('changeDate', function(e) {
19802
19803    curDate = '09/24/2026';
19804    if (e.format() != curDate) {
19805
19806        $('.timepicker').timepicker('setTime', '00:00');
19807    } else {
19808
19809        $('.timepicker').timepicker('setTime', '07:02');
19810
19811    }
19812});
19813// $('.timepicker').timepicker({
19814//     timeFormat: 'hh:mm a',
19815//     interval: 1,
19816//     minTime: '0',
19817//     maxTime: '11:59 pm',
19818//     defaultTime: '07:02',
19819//     startTime: '00:00',
19820//     dynamic: true,
19821//     dropdown: true,
19822//     scrollbar: true
19823// });
19824
19825// Close timepicker when clicking outside
19826$('.Schedule-message-wrapper').on('click', function(e) {
19827    if (!$(e.target).closest('.ui-timepicker-container, .timepicker').length) {
19828        $('.ui-timepicker-container').hide();
19829    }
19830});
19831
19832
19833function convertDateToLongFormat(date) {
19834    // Split the input date
19835    let [month, day, year] = date.split('/').map(Number);
19836
19837    // Array of full month names
19838    const months = [
19839        "January", "February", "March", "April", "May", "June",
19840        "July", "August", "September", "October", "November", "December"
19841    ];
19842
19843    // Get the full month name
19844    let monthName = months[month - 1];
19845
19846    // Format and return the result
19847    return `${monthName} ${day}, ${year}`;
19848}
19849
19850function convertTo12HourFormat(time) {
19851    // Parse the hours and minutes
19852    let [hours, minutes] = time.split(':').map(Number);
19853    let meridian = hours >= 12 ? 'pm' : 'am';
19854
19855    // Convert hours to 12-hour format
19856    hours = hours % 12 || 12;
19857
19858    // Format hours and minutes as two digits
19859    let hours12 = hours.toString().padStart(2, '0');
19860    let minutes12 = minutes.toString().padStart(2, '0');
19861
19862    return `${hours12}:${minutes12} ${meridian}`;
19863}
19864
19865function convertTo24HourFormat(time) {
19866    // Parse the time and period (AM/PM)
19867    let [timePart, meridian] = time.split(' ');
19868    let [hours, minutes] = timePart.split(':').map(Number);
19869
19870    // Convert hours based on AM/PM
19871    if (meridian.toLowerCase() === 'pm' && hours !== 12) {
19872        hours += 12;
19873    } else if (meridian.toLowerCase() === 'am' && hours === 12) {
19874        hours = 0;
19875    }
19876
19877    // Format hours and minutes as two digits
19878    let hours24 = hours.toString().padStart(2, '0');
19879    let minutes24 = minutes.toString().padStart(2, '0');
19880
19881    return `${hours24}:${minutes24}`;
19882}
19883
19884function convertDateFormat(date) {
19885    // Split the input date by '/'
19886    let [month, day, year] = date.split('/');
19887
19888    // Return the date in yyyy-mm-dd format
19889    return `${year}-${month.padStart(2, '0')}-${day.padStart(2, '0')}`;
19890}
19891
19892function schedulePost() {
19893    date = $('#datepicker').val();
19894    longFormat = convertDateToLongFormat(date);
19895    postDate = convertDateFormat(date);
19896    time = $('#timepicker').val();
19897    postTime = convertTo24HourFormat(time);
19898
19899    $('#scheduled').val('1');
19900    $('#scheduledate').val(postDate);
19901    $('#scheduletime').val(postTime);
19902    $('#scheduledfor').text('Scheduled for ' + longFormat + ' at ' + time + ' ');
19903
19904
19905
19906    $('#social-popup > .add-post-inner').removeClass('schedule-box-opened');
19907    $('.Schedule-message-wrapper').hide();
19908    $('.schedule-done').show();
19909    $('#social-popup').addClass('scheduled-success');
19910    handleAddPost();
19911}
19912
19913function unschedulePost() {
19914    $('#scheduled').val('0');
19915    $('#scheduledate').val('');
19916    $('#scheduletime').val('');
19917    $('#scheduledfor').text('');
19918    $('.schedule-done').hide();
19919    $('#unschedule').fadeOut('fast');
19920    $('#social-popup').removeClass('scheduled-success');
19921}
19922
19923function showScheduler(thisid) {
19924    $(thisid).addClass('active');
19925    $('#draft-btn').removeClass('active');
19926    $('#draft-container').hide();
19927    $('#schedule-container').fadeIn();
19928    fetchScheduleList();
19929
19930}
19931</script>
19931
19932
19933<script>
19934// mention popup logic 2 may riaz new modified code 
19935const input = document.getElementById('addPostTextarea');
19936const popup = document.querySelector('.mention-popup');
19937var mentionStartIndex = -1;
19938var debounceTimer;
19939
19940input.addEventListener('input', handleMentionInput);
19941
19942document.addEventListener('click', (e) => {
19943    if (!popup.contains(e.target) && e.target !== input) {
19944        hideMentionPopup();
19945    }
19946});
19947
19948//workig but only for mention below at bottom new function for mention and hashtasg 
19949/* function handleMentionInput(e) {
19950    const el = e.target; // ✅ Fix: define el
19951    const value = el.innerText;
19952
19953    // ✅ Calculate cursor position manually for contenteditable
19954    let cursorPosition = 0;
19955    const selection = window.getSelection();
19956    if (selection.rangeCount > 0) {
19957        const range = selection.getRangeAt(0);
19958        const preCaretRange = range.cloneRange();
19959        preCaretRange.selectNodeContents(el);
19960        preCaretRange.setEnd(range.endContainer, range.endOffset);
19961        cursorPosition = preCaretRange.toString().length;
19962    }
19963
19964    const textBeforeCursor = value.slice(0, cursorPosition);
19965    const lastAtSymbol = textBeforeCursor.lastIndexOf('@');
19966
19967    if (lastAtSymbol !== -1 && !textBeforeCursor.slice(lastAtSymbol).includes(' ')) {
19968        mentionStartIndex = lastAtSymbol;
19969        const query = textBeforeCursor.slice(lastAtSymbol + 1).trim();
19970        if (query) {
19971            searchUsersMention(query);
19972        } else {
19973            hideMentionPopup();
19974            clearTimeout(debounceTimer);
19975        }
19976    } else {
19977        hideMentionPopup();
19978        clearTimeout(debounceTimer);
19979    }
19980} */
19981
19982/* 
19983const input = document.getElementById('addPostTextarea');
19984const popup = document.querySelector('.mention-popup');
19985var mentionStartIndex = -1;
19986var debounceTimer;
19987
19988input.addEventListener('input', handleMentionInput);
19989
19990
19991document.addEventListener('click', (e) => {
19992    const popup = document.querySelector('.mention-popup');
19993
19994    if (!popup.contains(e.target) && e.target !== input) {
19995        hideMentionPopup();
19996    }
19997});
19998
19999
20000function handleMentionInput(e) {
20001   // const value = e.target.value;
20002    const value = el.innerText;
20003    const cursorPosition = e.target.selectionStart;
20004    const textBeforeCursor = value.slice(0, cursorPosition);
20005    const lastAtSymbol = textBeforeCursor.lastIndexOf('@');
20006
20007    if (lastAtSymbol !== -1 && !textBeforeCursor.slice(lastAtSymbol).includes(' ')) {
20008        mentionStartIndex = lastAtSymbol;
20009        const query = textBeforeCursor.slice(lastAtSymbol + 1).trim();
20010        //console.log(query);
20011        if (query) {
20012            searchUsersMention(query);
20013        } else {
20014            hideMentionPopup();
20015            clearTimeout(debounceTimer);
20016        }
20017    } else {
20018        hideMentionPopup();
20019        clearTimeout(debounceTimer);
20020    }
20021}
20022 */
20023
20024function debounceMention(func, delay) {
20025    return function(...args) {
20026        clearTimeout(debounceTimer);
20027        debounceTimer = setTimeout(() => {
20028            func.apply(this, args);
20029        }, delay);
20030    }
20031}
20032
20033const searchUsersMention = debounceMention((query) => {
20034
20035    if (!query || query.trim().length == 0) {
20036        hideMentionPopup();
20037        return;
20038    }
20039
20040    $.ajax({
20041        url: 'https://www.jumpspree.com/getUserListForMentions', //'http://localhost:8080/getUserListForMentions',
20042        type: 'POST',
20043        data: {
20044            query
20045        },
20046        dataType: "json",
20047        success: function(response) {
20048            //console.log(response);
20049
20050            if (!response.status) {
20051                hideMentionPopup();
20052                return;
20053            }
20054
20055            const users = response.data;
20056            if (users && users.length > 0) {
20057                displayUsersMention(users);
20058            } else {
20059                console.log("No data")
20060                hideMentionPopup();
20061            }
20062
20063
20064        },
20065        error: function(xhr, status, error) {
20066            hideMentionPopup();
20067            console.error(error);
20068        }
20069    });
20070}, 500);
20071
20072function displayUsersMention(users) {
20073    const popup = document.querySelector('.mention-popup');
20074
20075    popup.innerHTML = users.map(user => {
20076        let avatarHtml;
20077
20078        if (user.profile_photo && user.profile_photo.trim() !== "") {
20079            // Use profile photo
20080            avatarHtml = `<img class="user-avatar" src="${user.profile_photo}" alt="${user.full_name}">`;
20081        } else {
20082            // Use first letter of username
20083            const firstChar = user.username ? user.username.charAt(0).toUpperCase() : "?";
20084            avatarHtml = `<div class="user-avatar-placeholder">${firstChar}</div>`;
20085        }
20086
20087        return `
20088            <div class="user-item" onclick="insertUserMention('${user.username}')">
20089                ${avatarHtml}
20090                <div class="user-info">
20091                    <span class="user-name">
20092                        ${user.full_name} 
20093                        <span>${user.is_verified == '1' ? '<img src="https://www.jumpspree.com/public/images/blue-cube.png" class="blue-cube-icon" alt="Verified Icon" title="Verified Icon" >' : ''}</span>
20094                    </span>
20095                    <span class="user-username">@${user.username}</span>
20096                </div>
20097            </div>
20098        `;
20099    }).join('');
20100
20101    popup.style.display = 'block';
20102}
20103
20104
20105/* 
20106function displayUsersMention(users) {
20107    const popup = document.querySelector('.mention-popup');
20108
20109    popup.innerHTML = users.map(user => `
20110                <div class="user-item" onclick="insertUserMention('${user.username}')">
20111                    <img class="user-avatar" src="${user.profile_photo ?? "https://www.jumpspree.com/public/images/user-icon.png?ver:1.02"}" alt="${user.full_name}">
20112                    <div class="user-info">
20113                        <span class="user-name">${user.full_name} 
20114                            <span> ${user.is_verified=='1' ? '<img src="https://www.jumpspree.com/public/images/blue-cube.png" class="blue-cube-icon" alt="Verified Icon">' : ''}</span>
20115                        </span>
20116                        <span class="user-username">@${user.username}</span>
20117                    </div>
20118                </div>
20119            `).join('');
20120    popup.style.display = 'block';
20121} */
20122/* 
20123function displayUsersMention(users) {
20124    const popup = document.querySelector('.mention-popup');
20125
20126    popup.innerHTML = users.map(user => {
20127        let avatarHtml;
20128
20129        if (user.profile_photo && user.profile_photo.trim() !== '') {
20130            avatarHtml = `<img class="user-avatar" src="${user.profile_photo}" alt="${user.full_name}">`;
20131        } else {
20132            const firstChar = user.full_name ? user.full_name.charAt(0).toUpperCase() : '?';
20133            avatarHtml = `<div class="user-avatar-fallback">${firstChar}</div>`;
20134        }
20135
20136        return `
20137            <div class="user-item" onclick="insertUserMention('${user.username}')">
20138                ${avatarHtml}
20139                <div class="user-info">
20140                    <span class="user-name">
20141                        ${user.full_name}
20142                        <span>
20143                            ${user.is_verified == '1' 
20144                                ? '<img src="https://www.jumpspree.com/public/images/blue-cube.png" class="blue-cube-icon" alt="Verified Icon">' 
20145                                : ''}
20146                        </span>
20147                    </span>
20148                    <span class="user-username">@${user.username}</span>
20149                </div>
20150            </div>
20151        `;
20152    }).join('');
20153
20154    popup.style.display = 'block';
20155}
20156 */
20157
20158// riaz may 02   
20159function insertUserMention(username) {
20160    const input = document.getElementById('addPostTextarea');
20161    const selection = window.getSelection();
20162    if (!selection.rangeCount) return;
20163
20164    const range = selection.getRangeAt(0);
20165    const preCaretRange = range.cloneRange();
20166    preCaretRange.selectNodeContents(input);
20167    preCaretRange.setEnd(range.endContainer, range.endOffset);
20168    const cursorPosition = preCaretRange.toString().length;
20169
20170    const text = input.innerText;
20171    const before = text.slice(0, mentionStartIndex);
20172    const after = text.slice(cursorPosition);
20173
20174    input.innerHTML =
20175        `${escapeHtml(before)}<span class="highlight-mention">@${username}</span>&nbsp;${escapeHtml(after)}`;
20176
20177    hideMentionPopup();
20178
20179    placeCaretAtEnd(input);
20180    input.focus();
20181}
20182
20183
20184
20185// Helper function to place caret at a specific character offset in contenteditable
20186function setCaretPosition_old(el, chars) {
20187    const range = document.createRange();
20188    const selection = window.getSelection();
20189    range.selectNodeContents(el);
20190    range.collapse(true);
20191
20192    let node = el;
20193    let remaining = chars;
20194
20195    function traverse(node) {
20196        if (node.nodeType === 3) { // text node
20197            if (node.length >= remaining) {
20198                range.setStart(node, remaining);
20199                range.collapse(true);
20200                return true;
20201            } else {
20202                remaining -= node.length;
20203            }
20204        } else {
20205            for (let child of node.childNodes) {
20206                if (traverse(child)) return true;
20207            }
20208        }
20209        return false;
20210    }
20211
20212    traverse(el);
20213    selection.removeAllRanges();
20214    selection.addRange(range);
20215}
20216
20217function hideMentionPopup() {
20218    const popup = document.querySelector('.mention-popup');
20219
20220    popup.style.display = 'none';
20221    mentionStartIndex = -1;
20222}
20223
20224/* function insertUserMention(userName) {
20225    const input = document.getElementById('addPostTextarea');
20226
20227    const before = input.value.slice(0, mentionStartIndex);
20228    const after = input.value.slice(input.selectionStart);
20229    input.value = before + '@' + userName + ' ' + after;
20230    hideMentionPopup();
20231    input.focus();
20232} */
20233
20234//code for hashtags 
20235var hashtagStartIndex = -1;
20236const hashtagPopup = document.getElementById('hashTags-popup');
20237
20238function handleMentionInput(e) {
20239    const el = e.target;
20240    const value = el.innerText;
20241
20242    let cursorPosition = 0;
20243    const selection = window.getSelection();
20244    if (selection.rangeCount > 0) {
20245        const range = selection.getRangeAt(0);
20246        const preCaretRange = range.cloneRange();
20247        preCaretRange.selectNodeContents(el);
20248        preCaretRange.setEnd(range.endContainer, range.endOffset);
20249        cursorPosition = preCaretRange.toString().length;
20250    }
20251
20252    const textBeforeCursor = value.slice(0, cursorPosition);
20253    const lastAtSymbol = textBeforeCursor.lastIndexOf('@');
20254    const lastHashSymbol = textBeforeCursor.lastIndexOf('#');
20255
20256    // @mention handling
20257    if (lastAtSymbol !== -1 && !textBeforeCursor.slice(lastAtSymbol).includes(' ')) {
20258        mentionStartIndex = lastAtSymbol;
20259        const query = textBeforeCursor.slice(lastAtSymbol + 1).trim();
20260        if (query) {
20261            searchUsersMention(query);
20262        } else {
20263            hideMentionPopup();
20264        }
20265    } else {
20266        hideMentionPopup();
20267    }
20268
20269    // #hashtag handling
20270    if (lastHashSymbol !== -1 && !textBeforeCursor.slice(lastHashSymbol).includes(' ')) {
20271        hashtagStartIndex = lastHashSymbol;
20272        const query = textBeforeCursor.slice(lastHashSymbol + 1).trim();
20273        if (query) {
20274            searchHashtags(query);
20275        } else {
20276            hideHashtagPopup();
20277        }
20278    } else {
20279        hideHashtagPopup();
20280    }
20281}
20282
20283function searchHashtags(query) {
20284    if (!query || query.trim().length === 0) {
20285        hideHashtagPopup();
20286        return;
20287    }
20288
20289    /* $.ajax({
20290        url: 'https://app.cubesnack.com/cubesnackapp/ws/search.php',
20291        type: 'GET',
20292        data: {
20293            type: 'hashtag',
20294            search: query
20295        },
20296        dataType: "json",
20297        success: function(response) {
20298            if (!response.status || !response.suggestions || response.suggestions.length === 0) {
20299                hideHashtagPopup();
20300                return;
20301            }
20302            displayHashtagSuggestions(response.suggestions);
20303        },
20304        error: function(xhr, status, error) {
20305            hideHashtagPopup();
20306            console.error(error);
20307        }
20308    }); */
20309    $.ajax({
20310        url: '/hashtag-proxy.php',
20311        type: 'GET',
20312        data: {
20313            search: query
20314        },
20315        dataType: "json",
20316        success: function(response) {
20317            if (!response.status || !response.suggestions || response.suggestions.length === 0) {
20318                hideHashtagPopup();
20319                return;
20320            }
20321            displayHashtagSuggestions(response.suggestions);
20322        },
20323        error: function(xhr, status, error) {
20324            hideHashtagPopup();
20325            console.error(error);
20326        }
20327    });
20328
20329
20330}
20331
20332function displayHashtagSuggestions(hashtags) {
20333    const popup = document.getElementById('hashTags-popup');
20334
20335    popup.innerHTML = hashtags.map(tag => `
20336        <div class="user-item" onclick="insertHashtag('${tag.display}')">
20337            <div class="user-info">
20338                <span class="user-name">#${tag.display}</span>
20339            </div>
20340        </div>
20341    `).join('');
20342
20343    popup.style.display = 'block';
20344}
20345
20346
20347function insertHashtag(tag) {
20348    const input = document.getElementById('addPostTextarea');
20349    const selection = window.getSelection();
20350    if (!selection.rangeCount) return;
20351
20352    const range = selection.getRangeAt(0);
20353    const preCaretRange = range.cloneRange();
20354    preCaretRange.selectNodeContents(input);
20355    preCaretRange.setEnd(range.endContainer, range.endOffset);
20356    const cursorPosition = preCaretRange.toString().length;
20357
20358    const text = input.innerText;
20359    const before = text.slice(0, hashtagStartIndex);
20360    const after = text.slice(cursorPosition);
20361
20362    input.innerHTML = `${escapeHtml(before)}<span class="highlight-hashtag">#${tag}</span>&nbsp;${escapeHtml(after)}`;
20363
20364    hideHashtagPopup();
20365
20366    placeCaretAtEnd(input);
20367    input.focus();
20368}
20369
20370function escapeHtml(text) {
20371    return text.replace(/[&<>"']/g, function(m) {
20372        return ({
20373            '&': '&amp;',
20374            '<': '&lt;',
20375            '>': '&gt;',
20376            '"': '&quot;',
20377            "'": '&#39;'
20378        })[m];
20379    });
20380}
20381
20382function placeCaretAtEnd(el) {
20383    el.focus();
20384    const range = document.createRange();
20385    range.selectNodeContents(el);
20386    range.collapse(false);
20387    const sel = window.getSelection();
20388    sel.removeAllRanges();
20389    sel.addRange(range);
20390}
20391
20392
20393
20394function hideHashtagPopup() {
20395    hashtagPopup.style.display = 'none';
20396    hashtagStartIndex = -1;
20397}
20398
20399
20400//below function is used entire post-text div to be clickable and navigate to the details page (which is the first anchor's href), 
20401// but you want to exclude clicks on @mentions, #hashtags, and other special links. 02-may riaz
20402$(document).on('click', '.post-text', function(e) {
20403    const $firstLink = $(this).find('a:first');
20404    const detailsUrl = $firstLink.attr('href');
20405
20406    if (
20407        !detailsUrl ||
20408        $(e.target).closest(
20409            'a.mention-link, a.hashtag-link, a[href^="javascript:"], a[href^="http"], a[href^="#"]').length
20410    ) {
20411        return;
20412    }
20413
20414    window.location.href = detailsUrl;
20415});
20416
20417
20418// end hashtags logic 
20419
20420function highlightText_old(div) {
20421    // Use textContent to get raw text without HTML
20422    const text = div.textContent;
20423
20424    // If text is completely cleared, reset the div to truly empty
20425    if (!text.trim()) {
20426        div.innerHTML = "";
20427        return;
20428    }
20429
20430    // Split by spaces (and keep them)
20431    const parts = text.split(/(\s+)/);
20432
20433    // Rebuild with highlights
20434    const newHTML = parts.map(part => {
20435        if (part.startsWith("#") || part.startsWith("@")) {
20436            return `<span class="highlight">${part}</span>`;
20437        }
20438        return part;
20439    }).join("");
20440
20441    // Save current cursor position
20442    const sel = window.getSelection();
20443    const range = sel.getRangeAt(0);
20444    const offset = range.startOffset;
20445
20446    // Update content
20447    div.innerHTML = newHTML;
20448
20449    // Move cursor to end
20450    setCursorToEnd(div);
20451}
20452
20453function setCursorToEnd(el, pos) {
20454    const range = document.createRange();
20455    const sel = window.getSelection();
20456    range.selectNodeContents(el);
20457    range.collapse(false);
20458    sel.removeAllRanges();
20459    sel.addRange(range);
20460}
20461
20462function highlightText(div) {
20463    // Save total caret position as character offset
20464    const caretPosition = getCaretCharacterOffsetWithin(div);
20465
20466    // Get raw text content
20467    const text = div.textContent;
20468
20469    // If text is empty, reset HTML and return
20470    if (!text.trim()) {
20471        div.innerHTML = "";
20472        return;
20473    }
20474
20475    // Split by words (preserving spaces)
20476    const parts = text.split(/(\s+)/);
20477
20478    // Highlight # and @ words
20479    const newHTML = parts.map(part => {
20480        if (part.startsWith("#") || part.startsWith("@")) {
20481            return `<span class="highlight">${part}</span>`;
20482        }
20483        return part;
20484    }).join("");
20485
20486    // Replace content
20487    div.innerHTML = newHTML;
20488
20489    // Restore caret position
20490    setCaretPosition(div, caretPosition);
20491}
20492
20493
20494function getCaretCharacterOffsetWithin(element) {
20495    const selection = window.getSelection();
20496    let caretOffset = 0;
20497    if (selection.rangeCount > 0) {
20498        const range = selection.getRangeAt(0);
20499        const preCaretRange = range.cloneRange();
20500        preCaretRange.selectNodeContents(element);
20501        preCaretRange.setEnd(range.startContainer, range.startOffset);
20502        caretOffset = preCaretRange.toString().length;
20503    }
20504    return caretOffset;
20505}
20506
20507function setCaretPosition(element, offset) {
20508    const range = document.createRange();
20509    const selection = window.getSelection();
20510
20511    let currentOffset = 0;
20512    let found = false;
20513
20514    const treeWalker = document.createTreeWalker(
20515        element,
20516        NodeFilter.SHOW_TEXT,
20517        null,
20518        false
20519    );
20520
20521    while (!found && treeWalker.nextNode()) {
20522        const node = treeWalker.currentNode;
20523        const nextOffset = currentOffset + node.length;
20524
20525        if (offset <= nextOffset) {
20526            range.setStart(node, offset - currentOffset);
20527            range.collapse(true);
20528            found = true;
20529            break;
20530        }
20531
20532        currentOffset = nextOffset;
20533    }
20534
20535    if (found) {
20536        selection.removeAllRanges();
20537        selection.addRange(range);
20538    }
20539}
20540
20541
20542
20543//
20544
20545const addPostTextarea = document.getElementById('addPostTextarea');
20546var editHistory = [];
20547var historyIndex = -1;
20548
20549// Save initial state
20550saveState();
20551
20552// Listen for input changes
20553addPostTextarea.addEventListener('input', () => saveState());
20554
20555// Handle both Ctrl+Z (Windows/Linux) and Cmd+Z (Mac)
20556addPostTextarea.addEventListener('keydown', (e) => {
20557    const isUndo = (e.ctrlKey || e.metaKey) && e.key === 'z' && !e.shiftKey;
20558    const isRedo = (e.ctrlKey || e.metaKey) && (e.key === 'y' || (e.shiftKey && e.key === 'z'));
20559
20560    if (isUndo) {
20561        e.preventDefault();
20562        undo();
20563    } else if (isRedo) {
20564        e.preventDefault();
20565        redo();
20566    }
20567});
20568
20569function saveState() {
20570    // Remove future history if we undo and then make new changes
20571    editHistory = editHistory.slice(0, historyIndex + 1);
20572
20573    // Save current HTML
20574    editHistory.push(addPostTextarea.innerHTML);
20575    historyIndex = editHistory.length - 1;
20576}
20577
20578function undo() {
20579    if (historyIndex > 0) {
20580        historyIndex--;
20581        restoreState();
20582    }
20583}
20584
20585function redo() {
20586    if (historyIndex < editHistory.length - 1) {
20587        historyIndex++;
20588        restoreState();
20589    }
20590}
20591
20592function restoreState() {
20593    const prevState = editHistory[historyIndex];
20594    addPostTextarea.innerHTML = prevState;
20595
20596    // Move cursor to the end after undo/redo
20597    const range = document.createRange();
20598    const selection = window.getSelection();
20599    range.selectNodeContents(addPostTextarea);
20600    range.collapse(false); // Move cursor to end
20601    selection.removeAllRanges();
20602    selection.addRange(range);
20603}
20604
20605
20606
20607document.addEventListener('DOMContentLoaded', () => {
20608    const pickerWrapper = document.getElementById('emojiPickerWrapper');
20609    const picker = document.getElementById('emojiPicker');
20610    const closeBtn = document.getElementById('closeEmojiPicker');
20611    const button = document.getElementById('myemojiBtn');
20612    const editable = document.getElementById('addPostTextarea');
20613
20614    // Toggle show/hide on button click
20615    button.addEventListener('click', (e) => {
20616        if (pickerWrapper.style.display === 'none') {
20617            const rect = button.getBoundingClientRect();
20618            pickerWrapper.style.top = (rect.bottom + window.scrollY + 10) + 'px';
20619            pickerWrapper.style.left = (rect.left + window.scrollX) + 'px';
20620            pickerWrapper.style.display = 'block';
20621        } else {
20622            pickerWrapper.style.display = 'none';
20623        }
20624    });
20625
20626    // Close on ❌ button
20627    closeBtn.addEventListener('click', () => {
20628        pickerWrapper.style.display = 'none';
20629    });
20630
20631    // Emoji selection
20632    picker.addEventListener('emoji-click', event => {
20633        const emoji = event.detail.unicode;
20634        insertAtCursor(editable, emoji);
20635        pickerWrapper.style.display = 'none';
20636    });
20637
20638    function insertAtCursor(el, emoji) {
20639        el.focus();
20640        const sel = window.getSelection();
20641        if (!sel.rangeCount) return;
20642
20643        const range = sel.getRangeAt(0);
20644        range.deleteContents();
20645
20646        const textNode = document.createTextNode(emoji);
20647        range.insertNode(textNode);
20648
20649        range.setStartAfter(textNode);
20650        range.collapse(true);
20651        sel.removeAllRanges();
20652        sel.addRange(range);
20653    }
20654});
20655</script>
20655
20656
20657<script src="https://cdnjs.cloudflare.com/ajax/libs/lottie-web/5.10.2/lottie.min.js"></script>
20657
20658<script>
20659var animation = lottie.loadAnimation({
20660    container: document.getElementById('lottie-animation'), // the dom element
20661    renderer: 'svg', // or 'canvas' or 'html'
20662    loop: true,
20663    autoplay: true,
20664    path: 'https://www.jumpspree.com/public/css/load_signup.json' // replace with your actual path
20665});
20666
20667var animation2 = lottie.loadAnimation({
20668    container: document.getElementById('lottie-animation2'), // the dom element
20669    renderer: 'svg', // or 'canvas' or 'html'
20670    loop: true,
20671    autoplay: true,
20672    path: 'https://www.jumpspree.com/public/css/success_signup.json' // replace with your actual path
20673});
20674
20675
20676
20677
20678function animationstart() {
20679    setTimeout(function() {
20680        $('#step07 .setup-account').hide()
20681        $('#step07 .all-set').fadeIn();
20682        setTimeout(function() {
20683            //            window.location.href='https://www.jumpspree.com';
20684            $('#step07').hide()
20685            $('#step08').fadeIn()
20686        }, 3000)
20687    }, 5000)
20688}
20689</script>
20689
20690<script>
20691var animation1 = null;
20692
20693function showAnimation_old() {
20694    $('#step08').hide();
20695    $('#step09').fadeIn();
20696    $('#step09').addClass('show-anim');
20697    $('#lottie-animation3').show();
20698    var animation3 = lottie.loadAnimation({
20699        container: document.getElementById('lottie-animation3'), // the dom element
20700        renderer: 'svg', // or 'canvas' or 'html'
20701        loop: true,
20702        autoplay: true,
20703        path: 'https://www.jumpspree.com/public/css/cofetti.json' // replace with your actual path
20704    });
20705
20706    setTimeout(function() {
20707        $('#signup-new-process, #step09').fadeOut();
20708        $('#signup-new-process #step01').fadeIn('slow');
20709    }, 5000)
20710}
20711
20712function showAnimation() {
20713    $('#step08').hide();
20714    $('#step09').fadeIn();
20715    $('#step09').addClass('show-anim');
20716    $('#lottie-animation3').show();
20717    var animation3 = lottie.loadAnimation({
20718        container: document.getElementById('lottie-animation3'), // the dom element
20719        renderer: 'svg', // or 'canvas' or 'html'
20720        loop: true,
20721        autoplay: true,
20722        path: 'https://www.jumpspree.com/public/css/cofetti.json' // replace with your actual path
20723    });
20724    // Set default welcome message
20725    const postContent =
20726        `Just joined Jumpspree 🎉\n\nExcited to see what this new space is all about. Follow me and say hey—I'm new here 👋\n\n#Jumpspree #JustJoined #NewHere`;
20727
20728    // Inject text into the editor or target field
20729    $('#addPostTextarea').text(postContent); // ✅ this is the field your API reads
20730
20731    // Ensure no media selected
20732    $('#imageInput').val('');
20733    $('#videoInput').val('');
20734    $('#gifPreviewBox').hide();
20735
20736    // Uncheck settings
20737    $('#post-setting-box input[type="checkbox"]').prop('checked', false);
20738
20739    // Optionally set user image and name if needed
20740    const username = $('#userNewName').text(); // e.g., "@ChrisRay"
20741    const avatarSrc = $('#userAvtar img').attr('src');
20742    $('.add-post-profile .fig img').attr('src', avatarSrc);
20743    $('.add-post-profile .user-name').text(username);
20744
20745    // ✅ Finally, call your function
20746    handleAddPost(0); // not a draft
20747
20748
20749
20750
20751    setTimeout(function() {
20752        $('#signup-new-process, #step09').fadeOut();
20753        $('#signup-new-process #step01').fadeIn('slow');
20754        $('body').removeClass('overflow-hidden');
20755    }, 5000)
20756
20757}
20758
20759
20760
20761
20762
20763$('.pick-intrest-buttons button').click(function() {
20764    $(this).toggleClass('active')
20765})
20766
20767function showmaybelater() {
20768    $('#step08').hide();
20769    $('#step09').fadeIn();
20770    $('#step09').addClass('show-anim');
20771    $('#lottie-animation3').show();
20772    var animation3 = lottie.loadAnimation({
20773        container: document.getElementById('lottie-animation3'), // the dom element
20774        renderer: 'svg', // or 'canvas' or 'html'
20775        loop: true,
20776        autoplay: true,
20777        path: 'https://www.jumpspree.com/public/css/cofetti.json' // replace with your actual path
20778    });
20779
20780
20781
20782    setTimeout(function() {
20783        $('#signup-new-process, #step09').fadeOut();
20784        $('#signup-new-process #step01').fadeIn('slow');
20785        $('body').removeClass('overflow-hidden');
20786    }, 5000)
20787
20788}
20789</script>
20789
20790<script>
20791function readURL(input) {
20792    if (input.files && input.files[0]) {
20793        var reader = new FileReader();
20794        reader.onload = function(e) {
20795            $('#imagePreview').css('background-image', 'url(' + e.target.result + ')');
20796            $('#imagePreview').hide();
20797            $('#imagePreview').fadeIn(650);
20798        }
20799        reader.readAsDataURL(input.files[0]);
20800    }
20801}
20802$("#imageUpload").change(function() {
20803    readURL(this);
20804});
20805</script>
20805
20806<script>
20807$('.scoller-step-4, .scoller-step-5').on('scroll', function() {
20808    var bodyScroll = $(this).scrollTop();
20809    $('#step04 .email-box, #step05 .email-box').scrollTop(bodyScroll);
20810});
20811
20812
20813
20814
20815
20816
20817
20818$(document).ready(function() {
20819    $('#generatebox').on('input', function() {
20820        const inputVal = $(this).val().trim();
20821
20822        if (inputVal.length > 0) {
20823            $('#generateBtn').removeClass('disabled');
20824        } else {
20825            $('#generateBtn').addClass('disabled');
20826        }
20827    });
20828});
20829
20830function regenerateText(val) {
20831
20832    content = $('#generatebox').val();
20833
20834    const $btn = $('#generateBtn');
20835    const $spinner = $('#spinner');
20836    const $text = $('#generateText');
20837
20838    // Show spinner, hide text, disable button
20839
20840
20841    $.ajax({
20842        url: base_url + '/regenerateText',
20843        type: 'POST',
20844        dataType: "Json",
20845        data: {
20846            content: content
20847        },
20848        beforeSend: function() {
20849
20850            if (val == 1) {
20851                $spinner.show();
20852                $text.hide();
20853                $btn.prop('disabled', true);
20854
20855            }
20856            if (val == 2) {
20857                $('#regenerateicon').addClass('iconspin');
20858
20859            }
20860
20861
20862            // $('#footerunfollowbtn').html('<span class="jloader"></span>');
20863
20864        },
20865        success: function(response) {
20866            msg = response.message;
20867            if (response.status) {
20868
20869                reply = response.reply
20870                totalcredit = parseInt(response.totalcredits);
20871                totalcreditremaining = parseInt(response.totalcreditsremaining);
20872                text = totalcreditremaining + '/' + totalcredit;
20873                $('#creditremainingstats').text(text)
20874                $('#generatebox').val(reply)
20875
20876                $('#g-ai-btn').addClass('no-margin').fadeIn('fast');
20877                $('#g-ai-button').hide();
20878
20879
20880
20881            } else {
20882
20883                showNotification('error', response.message);
20884
20885
20886
20887            }
20888
20889
20890        },
20891        error: function(xhr, status, error) {
20892
20893            showNotification('error',
20894                'We encountered an issue while retrieving the response. Please try again shortly.');
20895        },
20896        complete: function() {
20897            $spinner.hide();
20898            $text.show();
20899            $btn.prop('disabled', false);
20900            $('#regenerateicon').removeClass('iconspin');
20901
20902
20903
20904        }
20905    });
20906
20907
20908}
20909
20910function generatewithai() {
20911
20912    clearRepost();
20913    cleanGenerateWithAiBox()
20914
20915    $('#genrate-with-ai-step01').fadeIn('fast');
20916    $('#generateBtn').addClass('disabled');
20917    $.ajax({
20918        url: base_url + '/generatewithai',
20919        type: 'POST',
20920        dataType: "Json",
20921        beforeSend: function() {
20922
20923            // $('#footerunfollowbtn').html('<span class="jloader"></span>');
20924
20925        },
20926        success: function(response) {
20927            msg = response.message;
20928            if (response.status) {
20929                totalcredit = parseInt(response.totalCredit);
20930                totalcreditremaining = parseInt(response.totalCreditremaining);
20931                text = totalcreditremaining + '/' + totalcredit;
20932                $('#creditremainingstats').text(text)
20933                if (totalcreditremaining <= 0) {
20934
20935                    showNotification('error',
20936                        'Insufficient credits. Please buy additional credits to continue.');
20937                    $('#generateBtn').prop('disabled', true);
20938
20939                } else {
20940                    //  $('#generateBtn').prop('disabled', false);
20941
20942                }
20943
20944
20945            } else {
20946
20947                showNotification('error',
20948                    'We encountered an issue while retrieving your number of credits. Please try again shortly.'
20949                    );
20950
20951
20952
20953            }
20954
20955
20956        },
20957        error: function(xhr, status, error) {
20958
20959
20960        }
20961    });
20962
20963
20964
20965
20966}
20967
20968function keepPost() {
20969
20970    const textToCopy = $('#generatebox').val();
20971    $('#addPostTextarea').text(textToCopy);
20972    $('#genrate-with-ai-step01').fadeOut();
20973}
20974
20975function cleanGenerateWithAiBox() {
20976
20977    $('#generatebox').val('');
20978    $('#g-ai-btn').hide('fast');
20979    $('#g-ai-button').show();
20980
20981
20982}
20983
20984function copyPost() {
20985
20986    const textToCopy = $('#generatebox').val();
20987
20988    if (textToCopy == '') {
20989        showNotification('error', 'Please paste something in, then copy with a click!');
20990        return false;
20991    }
20992
20993    if (navigator.clipboard) {
20994        navigator.clipboard.writeText(textToCopy)
20995            .then(function() {
20996
20997                showNotification('success', 'Copied to clipboard.');
20998                // Optional: show tooltip or feedback
20999            })
21000            .catch(function(err) {
21001                showNotification('error', 'We couldn’t copy the text. Please select and copy it manually.');
21002
21003
21004            });
21005    } else {
21006        // Fallback for older browsers
21007        const textarea = document.getElementById('generatebox');
21008        textarea.select();
21009        document.execCommand('copy');
21010    }
21011
21012}
21013
21014
21015
21016
21017
21018function getAIPlans() {
21019
21020
21021    $('#genrate-with-ai-step02').fadeIn('fast')
21022    $.ajax({
21023        url: base_url + '/getaiplans',
21024        type: 'POST',
21025        dataType: "Json",
21026        beforeSend: function() {
21027
21028            // $('#footerunfollowbtn').html('<span class="jloader"></span>');
21029
21030        },
21031        success: function(response) {
21032            msg = response.message;
21033            _html = '';
21034            if (response.status) {
21035
21036                plans = response.plans;
21037                console.log(plans.length)
21038                if (plans.length > 0) {
21039
21040                    $.each(plans, function(i, val) {
21041
21042                        _html += `<li><span><b>$${val.amount} </b> ${val.credittext}`;
21043                        if (val.best == 1) {
21044                            _html +=
21045                                `<span class="best-value"><img src="https://www.jumpspree.com/public/images/star-green.png" alt="Best Value" title="Best Value"> Best value</span>`;
21046                        }
21047
21048                        _html += `</span>
21049                <span><button class="select-plan" data-id="${val.id}"  onclick="selectPlan(this)">Select</button></span>
21050                </li>`
21051
21052
21053
21054
21055                    })
21056
21057
21058
21059
21060                } else {
21061
21062                    _html += `<li>
21063                            <span><b>No Plans</b> available yet</span>
21064                            
21065                        </li>`
21066                }
21067                //    $('#planloader').hide()
21068                $('#planlist').show()
21069                $('#planlist').html(_html)
21070
21071            } else {
21072
21073                //  showNotification('error','We encountered an issue while retrieving the payment plans. Please try again shortly.');
21074
21075
21076
21077            }
21078
21079
21080        },
21081        error: function(xhr, status, error) {
21082
21083            showNotification('error',
21084                'We encountered an issue while retrieving the payment plans. Please try again shortly.');
21085
21086        }
21087    });
21088
21089
21090}
21091var selectedPlan = '';
21092
21093function selectPlan(thisid) {
21094
21095    $('.select-plan').removeClass('active');
21096
21097    // Add active to current
21098    $(thisid).addClass('active');
21099    selectedPlan = $(thisid).data('id');
21100
21101    // alert(selectedPlan)
21102}
21103
21104function buyaiplan() {
21105
21106    if (selectedPlan == '') {
21107        showNotification('error', "Please select a plan to proceed");
21108        return false;
21109    } else {
21110
21111
21112        $.ajax({
21113            url: base_url + '/buyaiplan',
21114            type: 'POST',
21115            dataType: "Json",
21116            data: {
21117                planId: selectedPlan
21118            },
21119            beforeSend: function() {
21120
21121                $('.buy-btn-text').text('Redirecting . . .')
21122
21123                // $('#footerunfollowbtn').html('<span class="jloader"></span>');
21124
21125            },
21126            success: function(response) {
21127                msg = response.message;
21128                if (response.status) {
21129
21130                    link = response.link
21131                    // console.log(link)
21132
21133                    window.location.href = link;
21134
21135                } else {
21136
21137                    showNotification('error',
21138                        'We encountered an issue while retrieving the response. Please try again shortly.'
21139                        );
21140
21141                }
21142
21143
21144            },
21145            error: function(xhr, status, error) {
21146                //  $('#genrate-with-ai-step03').fadeIn('fast');
21147                showNotification('error',
21148                    'We encountered an issue while retrieving the response. Please try again shortly.');
21149            },
21150            complete: function() {
21151
21152                $('.buy-btn-text').text('Buy now')
21153            }
21154        });
21155
21156
21157    }
21158
21159
21160}
21161</script>
21161
21162<script>
21163$(document).on('click', '#enter-new-password .toggle-password', function() {
21164    const $icon = $(this).find('i');
21165    const targetInput = $($(this).data('target'));
21166
21167    if (targetInput.attr('type') === 'password') {
21168        targetInput.attr('type', 'text');
21169        $icon.removeClass('fa-eye').addClass('fa-eye-slash');
21170    } else {
21171        targetInput.attr('type', 'password');
21172        $icon.removeClass('fa-eye-slash').addClass('fa-eye');
21173    }
21174});
21175
21176$(document).on('click', '#enter-new-password .toggle-password2', function() {
21177    const $icon = $(this).find('i');
21178    const targetInput = $($(this).data('target'));
21179
21180    if (targetInput.attr('type') === 'password') {
21181        targetInput.attr('type', 'text');
21182        $icon.removeClass('fa-eye').addClass('fa-eye-slash');
21183    } else {
21184        targetInput.attr('type', 'password');
21185        $icon.removeClass('fa-eye-slash').addClass('fa-eye');
21186    }
21187});
21188
21189$(document).on('click', '#signin-new-process .toggle-password2', function() {
21190    var $icon = $(this).find('i');
21191    var targetInput = $($(this).data('target'));
21192
21193    if (targetInput.attr('type') === 'password') {
21194        targetInput.attr('type', 'text');
21195        $icon.removeClass('fa-eye').addClass('fa-eye-slash');
21196    } else {
21197        targetInput.attr('type', 'password');
21198        $icon.removeClass('fa-eye-slash').addClass('fa-eye');
21199    }
21200});
21201
21202function cancelSignupProcess() {
21203    $('#signin-new-process').fadeOut();
21204    $('body').removeClass('overflow-hidden');
21205
21206    // Clear all relevant input fields
21207    $('#loginname').val('');
21208    $('#loginpassword').val('');
21209    $('#loginname_validate').text('');
21210    $('#loginpassword_validate').text('');
21211}
21212</script>
21212
21213<script>
21214function getmorepopup() {
21215    //alert('d')
21216    sessid = '';
21217    if (sessid == '') {
21218        $('#signup-new-process').hide();
21219        $('#signin-new-process').fadeIn('fast');
21220        $('body').addClass('overflow-hidden');
21221    } else {
21222        window.location.href = 'https://www.jumpspree.com/jumpspree-more';
21223    }
21224
21225}
21226
21227
21228
21229function openContentPopup(postId) {
21230    // Build the element ID (like ni1581, ni1582 etc)
21231    let sourceId = "#ni" + postId;
21232
21233    // Clone that post content
21234    let clonedContent = $(sourceId).clone(true, true);
21235
21236    // Replace the popup .email-box with the cloned content
21237    $("#capture .email-box").html(clonedContent.html());
21238
21239    // Finally, show the popup
21240    $("#shareimage").fadeIn();
21241}
21242</script>
21242
21243
21244<!-- ////////////////////////////////////////////////////  LANGUAGE MODEL LOGIC START /////////////////////////////////////////////////////-->
21245<!-- //////////////////////////////////////  LANGUAGE MODEL LOGIC START ////////////////////////////////////// -->
21246
21247<!-- Language & Currency Button -->
21248<button id="langCurrencyBtn" class="langCurrencyBtn" onclick="openLangPopup()">
21249    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" style="display:block;height:16px;width:16px;fill:#fff;">
21250        <path d="M8 .25a7.77 7.77 0 0 1 7.75 7.78 7.75 7.75 0 0 1-7.52 7.72h-.25A7.75 
21251             7.75 0 0 1 .25 8.24v-.25A7.75 7.75 0 0 1 8 .25zm1.95 
21252             8.5h-3.9c.15 2.9 1.17 5.34 1.88 5.5H8c.68 0 1.72-2.37 
21253             1.93-5.23zm4.26 0h-2.76c-.09 1.96-.53 3.78-1.18 
21254             5.08A6.26 6.26 0 0 0 14.17 9zm-9.67 0H1.8a6.26 
21255             6.26 0 0 0 3.94 5.08 12.59 12.59 0 0 1-1.16-4.7l-.03-.38zm1.2-6.58
21256             -.12.05a6.26 6.26 0 0 0-3.83 5.03h2.75c.09-1.83.48-3.54 
21257             1.06-4.81zm2.25-.42c-.7 0-1.78 2.51-1.94 5.5h3.9c-.15-2.9-1.18-5.34
21258             -1.89-5.5h-.07zm2.28.43.03.05a12.95 12.95 0 0 1 1.15 
21259             5.02h2.75a6.28 6.28 0 0 0-3.93-5.07z"></path>
21260    </svg>
21261</button>
21262
21263<!-- Popup -->
21264<div id="langCurrencyPopup" class="popup-overlay notranslate">
21265    <div class="popup-content">
21266        <div class="tabbs-section">
21267            <div class="tabs">
21268                <button class="tab active" data-tab="lang">Language and Region</button>
21269                <button class="tab" data-tab="currency">Currency</button>
21270            </div>
21271            <span id="popupClose"><img src="https://www.jumpspree.com/public/images/close-language.png" alt="Close"
21272                    title="Close"></span>
21273        </div>
21274
21275        <div class="inner-language-box">
21276            <!-- Languages -->
21277            <div id="tab-lang" class="tab-content active">
21278                <h3 class="popup-label">Choose your preferred language</h3>
21279                <div id="allLanguagesContainer"></div>
21280            </div>
21281
21282            <!-- Currency -->
21283            <div id="tab-currency" class="tab-content">
21284                <h3>Choose a currency</h3>
21285                <div id="allCurrencies"></div>
21286            </div>
21287        </div>
21288
21289        <div class="note-language">
21290            <p>Note: Language and currency conversion is a beta feature. Some languages may slightly affect UI labels or
21291                buttons.</p>
21292        </div>
21293    </div>
21294</div>
21295
21296<!-- Hidden Google Translate -->
21297<div id="google_translate_element" style="position:absolute;top:-9999px;left:-9999px;opacity:0;"></div>
21298
21299<!-- //////////////////////////////////////  STYLES  ////////////////////////////////////// -->
21300<style>
21301/* Hide Google Translate artifacts */
21302iframe[id^=":"],
21303.goog-te-banner-frame,
21304.goog-te-balloon-frame,
21305.goog-te-menu-frame,
21306.goog-logo-link,
21307.goog-tooltip,
21308.goog-text-highlight {
21309    display: none !important;
21310    opacity: 0 !important;
21311    visibility: hidden !important;
21312    pointer-events: none !important;
21313}
21314
21315#google_translate_element {
21316    display: none !important;
21317}
21318
21319body {
21320    top: 0px !important;
21321    position: static !important;
21322}
21323
21324/* Popup design */
21325.popup-overlay {
21326    display: none;
21327    position: fixed;
21328    inset: 0;
21329    background: rgba(0, 0, 0, 0.6);
21330    z-index: 9999;
21331    justify-content: center;
21332    align-items: center;
21333}
21334
21335.popup-content {
21336    background: #fff;
21337    border-radius: 10px;
21338    padding: 20px;
21339    width: 90%;
21340    max-width: 480px;
21341    position: relative;
21342}
21343
21344.tabs {
21345    display: flex;
21346    border-bottom: 1px solid #ddd;
21347}
21348
21349.tabs .tab {
21350    flex: 1;
21351    padding: 10px;
21352    cursor: pointer;
21353    text-align: center;
21354    background: #f4f4f4;
21355    border: none;
21356    font-weight: 600;
21357}
21358
21359.tabs .tab.active {
21360    background: #008489;
21361    color: #fff;
21362}
21363
21364.tab-content {
21365    display: none;
21366    margin-top: 15px;
21367}
21368
21369.tab-content.active {
21370    display: block;
21371}
21372
21373#popupClose {
21374    position: absolute;
21375    top: 10px;
21376    right: 15px;
21377    cursor: pointer;
21378}
21379
21380.language-option {
21381    display: flex;
21382    flex-direction: column;
21383    align-items: flex-start;
21384    padding: 10px;
21385    border: 1px solid #ddd;
21386    margin: 5px;
21387    border-radius: 6px;
21388    cursor: pointer;
21389    transition: all 0.2s ease;
21390}
21391
21392.language-option:hover {
21393    background: #f1f1f1;
21394}
21395
21396.language-option.active {
21397    background: #008489;
21398    color: #fff;
21399    font-weight: bold;
21400}
21401
21402.lang-main {
21403    font-size: 14px;
21404}
21405
21406.lang-sub {
21407    font-size: 12px;
21408    color: #666;
21409}
21410
21411#allCurrencies button {
21412    margin: 5px;
21413    padding: 8px 12px;
21414    border-radius: 5px;
21415    border: 1px solid #ccc;
21416    cursor: pointer;
21417}
21418
21419#allCurrencies button.active {
21420    background: #008489;
21421    color: #fff;
21422    border-color: #008489;
21423}
21424</style>
21425<style>
21426.langCurrencyBtn {
21427    position: relative;
21428    background: none;
21429    border: none;
21430}
21431
21432.langCurrencyBtn .touch-area {
21433    display: flex;
21434    align-items: center;
21435    gap: 6px;
21436    padding: 6px 10px;
21437}
21438</style>
21439
21440<!-- //////////////////////////////////////  SCRIPTS  ////////////////////////////////////// -->
21441<script>
21442/* =========  Google Translate Helpers  ========= */
21443function googleTranslateElementInit() {
21444    new google.translate.TranslateElement({
21445        pageLanguage: 'en'
21446    }, 'google_translate_element');
21447}
21448
21449function waitForTranslateSelectAsync(timeout = 12000) {
21450    return new Promise((resolve, reject) => {
21451        const start = Date.now();
21452        (function check() {
21453            const sel = document.querySelector('select.goog-te-combo');
21454            if (sel) return resolve(sel);
21455            if (Date.now() - start > timeout) return reject(new Error('Google translate select not found'));
21456            requestAnimationFrame(check);
21457        })();
21458    });
21459}
21460
21461/*   async function triggerGoogleTranslate(requestedCode) {
21462    try {
21463      const select = await waitForTranslateSelectAsync();
21464      const opts = Array.from(select.options).map(o => o.value);
21465      let val = "en";
21466      if (opts.includes(requestedCode)) val = requestedCode;
21467      else if (opts.includes(requestedCode.split('-')[0])) val = requestedCode.split('-')[0];
21468
21469      select.value = val;
21470      select.dispatchEvent(new Event('input', { bubbles: true }));
21471      select.dispatchEvent(new Event('change', { bubbles: true }));
21472
21473      localStorage.setItem("userLang", requestedCode);
21474      document.getElementById("langCurrencyPopup").style.display = "none";
21475      document.body.classList.remove("overflow-hidden");
21476      console.log("🌐 Language switched:", requestedCode);
21477    } catch (e) {
21478      console.error("Translation trigger failed:", e);
21479    }
21480  } */
21481
21482
21483/* Trigger Translation (Windows-safe fix) */
21484/* Trigger Translation (Windows-safe + Airbnb-style label) */
21485async function triggerGoogleTranslate(requestedCode) {
21486    try {
21487        const select = await waitForTranslateSelectAsync();
21488        const opts = Array.from(select.options).map(o => o.value);
21489        let val = "en";
21490        if (opts.includes(requestedCode)) val = requestedCode;
21491        else if (opts.includes(requestedCode.split('-')[0])) val = requestedCode.split('-')[0];
21492
21493        select.value = val;
21494        // Fire both input and change (needed for Windows Chrome)
21495        select.dispatchEvent(new Event('input', {
21496            bubbles: true
21497        }));
21498        select.dispatchEvent(new Event('change', {
21499            bubbles: true
21500        }));
21501
21502        localStorage.setItem("userLang", requestedCode);
21503        document.getElementById("langCurrencyPopup").style.display = "none";
21504        document.body.classList.remove("overflow-hidden");
21505        console.log("🌐 Language switched:", requestedCode);
21506
21507        // ✅ Find full display name like Airbnb ("हिन्दी (भारत)")
21508        const langObj = languages.find(l =>
21509            l.code === requestedCode || l.code.split('-')[0] === requestedCode.split('-')[0]
21510        );
21511
21512        if (langObj && document.getElementById("langName")) {
21513            const displayText = langObj.country ?
21514                `${langObj.language} (${langObj.country})` :
21515                langObj.language;
21516
21517            // Update text instantly — no short codes anymore
21518            document.getElementById("langName").textContent = displayText;
21519
21520            // Save pretty label for next time
21521            localStorage.setItem("selectedLanguage", JSON.stringify(langObj));
21522        } else {
21523            console.warn("⚠️ No matching language object found for:", requestedCode);
21524            document.getElementById("langName").textContent = requestedCode;
21525        }
21526
21527    } catch (e) {
21528        console.error("Translation trigger failed:", e);
21529    }
21530}
21531
21532
21533
21534
21535
21536/* =========  Popup Open / Close  ========= */
21537const popupLangEl = document.getElementById("langCurrencyPopup");
21538
21539function openLangPopup() {
21540
21541    if (!popupLangEl) {
21542        console.error("❌ Popup element #langCurrencyPopup not found!");
21543        return;
21544    }
21545    console.log("⚙️ Opening popup...");
21546
21547    loadLanguages(localStorage.getItem("userLang") || "en-IN");
21548    loadCurrencies(localStorage.getItem("userCurrency") || "INR");
21549    popupLangEl.style.display = "flex";
21550    document.body.classList.add("overflow-hidden");
21551    console.log("🎉 Popup opened successfully!");
21552    document.querySelector(".blog-side-menu").classList.remove("blog-side-menu-show");
21553}
21554
21555document.getElementById("popupClose").addEventListener("click", () => {
21556    popupLangEl.style.display = "none";
21557    document.body.classList.remove("overflow-hidden");
21558});
21559
21560/* =========  Tab Switching  ========= */
21561document.querySelectorAll(".tabs .tab").forEach(tab => {
21562    tab.addEventListener("click", () => {
21563        document.querySelectorAll(".tabs .tab").forEach(t => t.classList.remove("active"));
21564        document.querySelectorAll(".tab-content").forEach(c => c.classList.remove("active"));
21565        tab.classList.add("active");
21566        document.getElementById("tab-" + tab.dataset.tab).classList.add("active");
21567    });
21568});
21569/* =========  Languages & Currencies Data (Localized Country Names)  ========= */
21570var languages = [
21571    // English Variants
21572    {
21573        code: "en-US",
21574        language: "English",
21575        country: "United States"
21576    },
21577    {
21578        code: "en-IN",
21579        language: "English",
21580        country: "India"
21581    },
21582    {
21583        code: "en-AU",
21584        language: "English",
21585        country: "Australia"
21586    },
21587    {
21588        code: "en-CA",
21589        language: "English",
21590        country: "Canada"
21591    },
21592    {
21593        code: "en-GB",
21594        language: "English",
21595        country: "United Kingdom"
21596    },
21597    {
21598        code: "en-SG",
21599        language: "English",
21600        country: "Singapore"
21601    },
21602    {
21603        code: "en-IE",
21604        language: "English",
21605        country: "Ireland"
21606    },
21607    {
21608        code: "en-NZ",
21609        language: "English",
21610        country: "New Zealand"
21611    },
21612
21613    // Indian Languages (localized)
21614    {
21615        code: "hi",
21616        language: "हिन्दी",
21617        country: "भारत"
21618    },
21619    {
21620        code: "ta",
21621        language: "தமிழ்",
21622        country: "இந்தியா"
21623    },
21624    {
21625        code: "te",
21626        language: "తెలుగు",
21627        country: "భారతదేశం"
21628    },
21629    {
21630        code: "bn",
21631        language: "বাংলা",
21632        country: "ভারত"
21633    },
21634    {
21635        code: "mr",
21636        language: "मराठी",
21637        country: "भारत"
21638    },
21639    {
21640        code: "kn",
21641        language: "ಕನ್ನಡ",
21642        country: "ಭಾರತ"
21643    },
21644    {
21645        code: "gu",
21646        language: "ગુજરાતી",
21647        country: "ભારત"
21648    },
21649    {
21650        code: "pa",
21651        language: "ਪੰਜਾਬੀ",
21652        country: "ਭਾਰਤ"
21653    },
21654    {
21655        code: "ml",
21656        language: "മലയാളം",
21657        country: "ഇന്ത്യ"
21658    },
21659    {
21660        code: "ur",
21661        language: "اردو",
21662        country: "پاکستان / بھارت"
21663    },
21664    {
21665        code: "or",
21666        language: "ଓଡ଼ିଆ",
21667        country: "ଭାରତ"
21668    },
21669    {
21670        code: "as",
21671        language: "অসমীয়া",
21672        country: "ভাৰত"
21673    },
21674
21675    // Spanish Variants
21676    {
21677        code: "es-ES",
21678        language: "Español",
21679        country: "España"
21680    },
21681    {
21682        code: "es-MX",
21683        language: "Español",
21684        country: "México"
21685    },
21686    {
21687        code: "es-AR",
21688        language: "Español",
21689        country: "Argentina"
21690    },
21691    {
21692        code: "es-CO",
21693        language: "Español",
21694        country: "Colombia"
21695    },
21696    {
21697        code: "es-CL",
21698        language: "Español",
21699        country: "Chile"
21700    },
21701    {
21702        code: "es-PE",
21703        language: "Español",
21704        country: "Perú"
21705    },
21706    {
21707        code: "es-US",
21708        language: "Español",
21709        country: "Estados Unidos"
21710    },
21711
21712    // French Variants
21713    {
21714        code: "fr-FR",
21715        language: "Français",
21716        country: "France"
21717    },
21718    {
21719        code: "fr-CA",
21720        language: "Français",
21721        country: "Canada"
21722    },
21723    {
21724        code: "fr-BE",
21725        language: "Français",
21726        country: "Belgique"
21727    },
21728    {
21729        code: "fr-CH",
21730        language: "Français",
21731        country: "Suisse"
21732    },
21733    {
21734        code: "fr-LU",
21735        language: "Français",
21736        country: "Luxembourg"
21737    },
21738
21739    // German Variants
21740    {
21741        code: "de-DE",
21742        language: "Deutsch",
21743        country: "Deutschland"
21744    },
21745    {
21746        code: "de-AT",
21747        language: "Deutsch",
21748        country: "Österreich"
21749    },
21750    {
21751        code: "de-CH",
21752        language: "Deutsch",
21753        country: "Schweiz"
21754    },
21755
21756    // Portuguese
21757    {
21758        code: "pt-PT",
21759        language: "Português",
21760        country: "Portugal"
21761    },
21762    {
21763        code: "pt-BR",
21764        language: "Português",
21765        country: "Brasil"
21766    },
21767
21768    // Chinese Variants
21769    {
21770        code: "zh-CN",
21771        language: "简体中文",
21772        country: "中国"
21773    },
21774    {
21775        code: "zh-TW",
21776        language: "繁體中文",
21777        country: "台灣"
21778    },
21779    {
21780        code: "zh-HK",
21781        language: "繁體中文",
21782        country: "香港"
21783    },
21784
21785    // Other Major Languages
21786    {
21787        code: "ja",
21788        language: "日本語",
21789        country: "日本"
21790    },
21791    {
21792        code: "ko",
21793        language: "한국어",
21794        country: "대한민국"
21795    },
21796    {
21797        code: "ru",
21798        language: "Русский",
21799        country: "Россия"
21800    },
21801    {
21802        code: "uk",
21803        language: "Українська",
21804        country: "Україна"
21805    },
21806    {
21807        code: "it",
21808        language: "Italiano",
21809        country: "Italia"
21810    },
21811    {
21812        code: "nl",
21813        language: "Nederlands",
21814        country: "Nederland"
21815    },
21816    {
21817        code: "sv",
21818        language: "Svenska",
21819        country: "Sverige"
21820    },
21821    {
21822        code: "da",
21823        language: "Dansk",
21824        country: "Danmark"
21825    },
21826    {
21827        code: "fi",
21828        language: "Suomi",
21829        country: "Suomi"
21830    },
21831    {
21832        code: "no",
21833        language: "Norsk",
21834        country: "Norge"
21835    },
21836    {
21837        code: "tr",
21838        language: "Türkçe",
21839        country: "Türkiye"
21840    },
21841    {
21842        code: "el",
21843        language: "Ελληνικά",
21844        country: "Ελλάδα"
21845    },
21846    {
21847        code: "pl",
21848        language: "Polski",
21849        country: "Polska"
21850    },
21851    {
21852        code: "cs",
21853        language: "Čeština",
21854        country: "Česká republika"
21855    },
21856    {
21857        code: "ro",
21858        language: "Română",
21859        country: "România"
21860    },
21861    {
21862        code: "hu",
21863        language: "Magyar",
21864        country: "Magyarország"
21865    },
21866    {
21867        code: "bg",
21868        language: "Български",
21869        country: "България"
21870    },
21871    {
21872        code: "sr",
21873        language: "Српски",
21874        country: "Србија"
21875    },
21876    {
21877        code: "hr",
21878        language: "Hrvatski",
21879        country: "Hrvatska"
21880    },
21881    {
21882        code: "he",
21883        language: "עברית",
21884        country: "ישראל"
21885    },
21886    {
21887        code: "ar",
21888        language: "العربية",
21889        country: "السعودية"
21890    },
21891    {
21892        code: "fa",
21893        language: "فارسی",
21894        country: "ایران"
21895    },
21896    {
21897        code: "th",
21898        language: "ไทย",
21899        country: "ประเทศไทย"
21900    },
21901    {
21902        code: "vi",
21903        language: "Tiếng Việt",
21904        country: "Việt Nam"
21905    },
21906    {
21907        code: "id",
21908        language: "Bahasa Indonesia",
21909        country: "Indonesia"
21910    },
21911    {
21912        code: "ms",
21913        language: "Bahasa Melayu",
21914        country: "Malaysia"
21915    },
21916    {
21917        code: "fil",
21918        language: "Filipino",
21919        country: "Pilipinas"
21920    },
21921    {
21922        code: "sw",
21923        language: "Kiswahili",
21924        country: "Kenya"
21925    }
21926];
21927
21928
21929function loadLanguages(selected) {
21930    const container = document.getElementById("allLanguagesContainer");
21931    container.innerHTML = "";
21932    languages.forEach(lang => {
21933        const btn = document.createElement("button");
21934        btn.className = "language-option";
21935        btn.innerHTML =
21936            `<div class="lang-main">${lang.language}</div><div class="lang-sub">${lang.country}</div>`;
21937        if (selected === lang.code) btn.classList.add("active");
21938        btn.onclick = () => {
21939            document.querySelectorAll(".language-option").forEach(b => b.classList.remove("active"));
21940            btn.classList.add("active");
21941            triggerGoogleTranslate(lang.code);
21942        };
21943        container.appendChild(btn);
21944    });
21945}
21946
21947/* =========  Currencies  ========= */
21948const CURRENCIES = ["USD", "EUR", "GBP", "JPY", "AUD", "CAD", "INR", "CNY", "BRL", "SGD"];
21949
21950function loadCurrencies(selected) {
21951    const container = document.getElementById("allCurrencies");
21952    container.innerHTML = "";
21953    CURRENCIES.forEach(cur => {
21954        const b = document.createElement("button");
21955        b.textContent = cur;
21956        if (selected === cur) b.classList.add("active");
21957        b.onclick = () => {
21958            document.querySelectorAll("#allCurrencies button").forEach(bb => bb.classList.remove("active"));
21959            b.classList.add("active");
21960            localStorage.setItem("userCurrency", cur);
21961            console.log("💰 Currency set:", cur);
21962            popupLangEl.style.display = "none";
21963            document.body.classList.remove("overflow-hidden");
21964        };
21965        container.appendChild(b);
21966    });
21967}
21968
21969/* =========  Restore saved language on load  ========= */
21970window.addEventListener("load", () => {
21971    const saved = localStorage.getItem("userLang");
21972    if (saved) setTimeout(() => triggerGoogleTranslate(saved), 2000);
21973});
21974</script>
21974
21975
21976<!-- Google Translate script loaded in header.php — removed duplicate here -->
21977
21978<!-- //////////////////////////////////////  LANGUAGE MODEL LOGIC END ////////////////////////////////////// -->
21979
21980<!-- IMG AND VID DRAG ON ADD POST DIV -->
21981
21982<style>
21983.social-popup.image-entered .add-post-inner {
21984    /*    opacity: 0.5;*/
21985}
21986
21987div#social-popup .add-post-inner {
21988    transition: all 0.3s ease;
21989}
21990
21991.show-placeholder {
21992    display: none
21993}
21994
21995.social-popup.image-entered .add-post-inner .show-placeholder {
21996    display: block;
21997    position: absolute;
21998    width: 100px;
21999    left: 50%;
22000    top: 50%;
22001    z-index: 999;
22002    transform: translate(-50%, -50%);
22003    filter: invert(1) brightness(0.4);
22004}
22005
22006.social-popup.image-entered .add-post-inner #add-post-full-container,
22007.social-popup.image-entered .popup-top-header,
22008.social-popup.image-entered #post-footer-for-post,
22009.social-popup.image-entered .header-add-post {
22010    opacity: 0.1
22011}
22012
22013.social-popup.image-entered .header-post.social-add-header {
22014    background: url(https://www.jumpspree.com/public/home-assets/image-gallery.png?ver:1.03);
22015    background-size: 102px;
22016    background-repeat: no-repeat;
22017    background-position: center;
22018}
22019
22020#social-popup div#imagePreviewBox {
22021    max-width: 98%;
22022}
22023
22024#addPostTextarea.drag-over {
22025    border: 2px dashed #555;
22026    /* padding-bottom: 80px !important; */
22027}
22028</style>
22029
22030
22031
22032<script>
22033const addPostArea = document.getElementById('add-post-div');
22034const addPostTextArea = document.getElementById('addPostTextarea');
22035var postAreaDragCounter = 0;
22036
22037
22038addPostArea.addEventListener('dragenter', e => {
22039    e.preventDefault();
22040    postAreaDragCounter++;
22041    addPostTextArea.classList.add('drag-over');
22042    $('#social-popup').addClass('image-entered');
22043});
22044
22045addPostArea.addEventListener('dragleave', e => {
22046    e.preventDefault();
22047    postAreaDragCounter--;
22048    if (postAreaDragCounter === 0) {
22049        addPostTextArea.classList.remove('drag-over');
22050        $('#social-popup').removeClass('image-entered');
22051    }
22052});
22053
22054addPostArea.addEventListener('dragover', e => {
22055    e.preventDefault();
22056    //$('#social-popup').removeClass('image-entered');
22057});
22058
22059addPostArea.addEventListener('drop', e => {
22060    e.preventDefault();
22061    addPostTextArea.classList.remove('drag-over');
22062    postAreaDragCounter = 0;
22063
22064    const file = e.dataTransfer.files[0];
22065    if (!file) return;
22066
22067    if (file.type.startsWith('image/')) {
22068        const imageInp = document.getElementById('imageInput');
22069
22070        imageInp.files = e.dataTransfer.files;
22071        imageInp.dispatchEvent(new Event('change'));
22072
22073    } else if (file.type.startsWith('video/')) {
22074        const videoInp = document.getElementById('videoInput');
22075
22076        videoInp.files = e.dataTransfer.files;
22077        videoInp.dispatchEvent(new Event('change'));
22078    }
22079
22080    $('#social-popup').removeClass('image-entered');
22081
22082});
22083</script>
22083
22084
22085<!-- Interests and Links js -->
22086
22087<script>
22088$('.add-intrest-input').focus(function() {
22089    $('.inner-topic-full-wrapper').addClass('add-topic-active');
22090    $('.inner-topic-search').addClass('inner-topic-search-active');
22091    //$('.inner-topic-search .search-topic input').focus();
22092})
22093$('.inner-topic-search .cancel-topic').click(function() {
22094    $('.inner-topic-full-wrapper').removeClass('add-topic-active');
22095    $('.inner-topic-search').removeClass('inner-topic-search-active');
22096})
22097$('.add-intrest-input').keypress(function() {
22098    $('.dropdwn-intrest').slideDown()
22099})
22100$('.dropdwn-intrest li').click(function() {
22101    $('.dropdwn-intrest').hide();
22102})
22103
22104function handleAddLinksButtonClick() {
22105    if ($("#add-links .all-links .link-detail").length >= 8) {
22106        return;
22107    }
22108
22109    $("#add-link-new-popup input").val("");
22110
22111    $('#add-link-new-popup').slideToggle();
22112
22113    /*$('#add-links-popup').fadeIn('fast')
22114    setTimeout(function(){
22115    $('#add-links-popup .inner-link-section').addClass('showMe')
22116    },100)*/
22117}
22118
22119var deleteLinks = [];
22120var newlyCreatedLinks = [];
22121var updatedLinks = [];
22122
22123var deleteInterests = [];
22124var newlyCreatedInterests = [];
22125
22126var trendingInterests = [];
22127var originalInterestsSearchItems = [];
22128
22129
22130function renderLinksAssociated(links) {
22131    let container = $("#add-links .all-links");
22132    container.empty();
22133
22134    if (links.length === 0) {
22135        $("#add-links .your-links").hide();
22136        return;
22137    } else {
22138        $("#add-links .your-links").show();
22139    }
22140
22141    links.forEach(link => {
22142        let favicon = getFaviconFromGoogle(link.link);
22143
22144        let html = `
22145                <div class="link-detail" data-id=${link.id}>
22146                    <div class="link-left">
22147                        <div class="link-logo">
22148                            <img src="${favicon}" alt="" onerror="this.classList.add('no-image'); this.src='https://www.jumpspree.com/public/images/link-icon2.png?ver:1.027'">
22149                        </div>
22150                        <div class="link-desc">
22151                            <span>${link.title}</span>
22152                            <span class="url">${link.link}</span>
22153                        </div>
22154                    </div>
22155                    <div class="right-link">
22156                        <a href="javascript:void(0)" onclick="openEditPopup(${link.id}, '${link.title}', '${link.link}')">
22157                            <i class="hgi hgi-stroke hgi-pencil-edit-02"></i>
22158                        </a>
22159                        <a href="#" class="delete-btn" onclick="handleLinkDelete(${link.id}, this)">
22160                            <i class="hgi hgi-stroke hgi-delete-02"></i>
22161                        </a>
22162                    </div>
22163                </div>
22164            `;
22165
22166        container.append(html);
22167    });
22168}
22169
22170function renderInterestsAssociated(interests) {
22171    const $list = $(".all-topics ul");
22172
22173    if (interests.length === 0) {
22174        $("#add-intrest .your-topics").hide();
22175        return;
22176    } else {
22177        $("#add-intrest .your-topics").show();
22178    }
22179
22180    $list.empty();
22181
22182    interests.forEach(interest => {
22183        const li = `
22184            <li class="d-flex justify-content-between" data-id=${interest.attached_id}>
22185                <span>${interest.tags}</span>
22186                <span>
22187                <a href="#" class="delete-btn" onclick="handleInterestDelete(${interest.attached_id}, this)">
22188                    <i class="hgi hgi-stroke hgi-delete-02"></i>
22189                </a>
22190                </span>
22191            </li>
22192            `;
22193        $list.append(li);
22194
22195    });
22196}
22197
22198
22199function getFaviconFromGoogle(url) {
22200    try {
22201        const parsed = new URL(url);
22202        return `https://www.google.com/s2/favicons?sz=64&domain=${parsed.hostname}`;
22203    } catch (e) {
22204        return 'https://www.jumpspree.com/public/images/link-icon2.png?ver:1.027';
22205    }
22206}
22207
22208
22209function displayUserInterests() {
22210
22211    $.ajax({
22212        url: base_url + '/getUserInterests',
22213        type: 'GET',
22214        dataType: 'json',
22215        success: function(response) {
22216            if (response.status && response.interests) {
22217                console.log(response.interests);
22218                renderInterestsAssociated(response.interests);
22219            } else {
22220                //$(".all-links").html("<p>No links found.</p>");
22221            }
22222        },
22223        error: function() {
22224            //$(".all-links").html("<p>Error loading links.</p>");
22225        }
22226    });
22227}
22228
22229function displayUserLinks() {
22230
22231    $.ajax({
22232        url: base_url + '/getUserLinks',
22233        type: 'GET',
22234        dataType: 'json',
22235        success: function(response) {
22236            if (response.status && response.links) {
22237                console.log();
22238                renderLinksAssociated(response.links);
22239            } else {
22240                //$(".all-links").html("<p>No links found.</p>");
22241            }
22242        },
22243        error: function() {
22244            //$(".all-links").html("<p>Error loading links.</p>");
22245        }
22246    });
22247}
22248
22249function handleInterestDelete(id, el, temp = false) {
22250    if (!temp) {
22251        deleteInterests.push(id);
22252    } else {
22253        newlyCreatedInterests = newlyCreatedInterests.filter(i => i.id != id);
22254    }
22255
22256    $(el).closest("li").remove();
22257    console.log("deleteInterests array:", deleteInterests);
22258    console.log("newlyCreatedInterests:", newlyCreatedInterests);
22259
22260
22261    if ($("#add-intrest .all-topics li").length === 0) {
22262        $("#add-intrest .your-topics").hide();
22263    }
22264
22265
22266}
22267
22268function handleInterestAllDelete() {
22269    const $allLis = $("#add-intrest .all-topics ul li");
22270
22271    $allLis.each(function() {
22272        let id = $(this).data("id");
22273        if (id !== undefined && id !== null) {
22274            deleteInterests.push(id);
22275        }
22276    });
22277
22278    $("#add-intrest .all-topics ul").empty();
22279    console.log("deleteInterests array:", deleteInterests);
22280    console.log("newlyCreatedInterests:", newlyCreatedInterests);
22281
22282    $("#add-intrest .your-topics").hide();
22283
22284}
22285
22286function handleLinkDelete(id, el, temp = false) {
22287    if (!temp) {
22288        deleteLinks.push(id);
22289        updatedLinks = updatedLinks.filter(link => link.id !== id);
22290    } else {
22291        newlyCreatedLinks = newlyCreatedLinks.filter(link => link.tempId != id);
22292    }
22293
22294    $(el).closest(".link-detail").remove();
22295
22296    if ($("#add-links .link-detail").length === 0) {
22297        $("#add-links .your-links").hide();
22298    }
22299
22300
22301    console.log("deleteLinks array:", deleteLinks);
22302    console.log("newlyCreatedLinks:", newlyCreatedLinks);
22303    console.log("updatedLinks:", updatedLinks);
22304}
22305
22306function openEditPopup(id, title, link) {
22307    $("#add-link-new-popup input[placeholder='Title']").val(title);
22308    $("#add-link-new-popup input[placeholder='Link']").val(link);
22309
22310    $("#add-link-new-popup").attr("data-edit-id", id);
22311
22312    $("#add-link-new-popup").slideToggle();
22313    // setTimeout(function(){
22314    // $('#add-link-new-popup .inner-link-section').addClass('showMe')
22315    // },100)
22316}
22317
22318$(document).on("click", "#save-link-btn", function(e) {
22319    e.preventDefault();
22320    let popup = $("#add-link-new-popup");
22321    let id = popup.attr("data-edit-id");
22322    let newTitle = popup.find("input[placeholder='Title']").val().trim();
22323    let newLink = popup.find("input[placeholder='Link']").val().trim();
22324
22325    if (!newTitle || newTitle.length === 0) {
22326        alert("Please enter a title");
22327        return;
22328    }
22329
22330    const urlPattern = /^(https?:\/\/)?([\w\-]+\.)+[a-z]{2,}(\/.*)?$/i;
22331
22332    if (!newLink || !urlPattern.test(newLink)) {
22333        alert("Please enter a valid URL (something like https://example.com).");
22334        return;
22335    }
22336
22337    let normalizedUrl = newLink;
22338    if (normalizedUrl && !/^https?:\/\//i.test(normalizedUrl)) {
22339        normalizedUrl = "https://" + normalizedUrl;
22340    }
22341
22342
22343    let favicon = getFaviconFromGoogle(normalizedUrl);
22344
22345    if (id) {
22346        // --- update existing ---
22347        let linkDiv = $(`#add-links .all-links .link-detail[data-id='${id}']`);
22348        linkDiv.find(".link-desc span:first").text(newTitle);
22349        linkDiv.find(".link-desc .url").text(newLink);
22350        linkDiv.find(".link-logo img").attr("src", favicon).on("error", function() {
22351            $(this).off("error"); // prevent infinite loop
22352            $(this).attr("src", "https://www.jumpspree.com/public/images/link-icon2.png?ver=1.027");
22353            $(this).addClass("no-image");
22354        });
22355
22356        linkDiv.find(".right-link a:first").attr(
22357            "onclick",ß
22358            `openEditPopup('${id}', '${newTitle}', '${newLink}')`
22359        );
22360
22361        let existingIndex = updatedLinks.findIndex(l => l.id === id);
22362        if (existingIndex !== -1) {
22363            // update existing entry
22364            updatedLinks[existingIndex].title = newTitle;
22365            updatedLinks[existingIndex].link = newLink;
22366        } else {
22367            // push new entry
22368            updatedLinks.push({
22369                id: id,
22370                title: newTitle,
22371                link: newLink
22372            });
22373        }
22374
22375        console.log("updatedLinks array:", updatedLinks);
22376    } else {
22377        // --- create new ---
22378        // (generate a temporary unique id, backend will replace later)
22379        let tempId = "new" + Date.now();
22380
22381        let html = `
22382                <div class="link-detail" data-id="${tempId}">
22383                    <div class="link-left">
22384                        <div class="link-logo">
22385                            <img src="${favicon}" alt="" 
22386                                onerror="this.classList.add('no-image'); this.src='https://www.jumpspree.com/public/images/link-icon2.png?ver:1.027'">
22387                        </div>
22388                        <div class="link-desc">
22389                            <span>${newTitle}</span>
22390                            <span class="url">${newLink}</span>
22391                        </div>
22392                    </div>
22393                    <div class="right-link">
22394                        <a href="javascript:void(0)" onclick="openEditPopup('${tempId}', '${newTitle}', '${newLink}')">
22395                            <i class="hgi hgi-stroke hgi-pencil-edit-02"></i>
22396                        </a>
22397                        <a href="#" class="delete-btn" onclick="handleLinkDelete('${tempId}', this, true)">
22398                            <i class="hgi hgi-stroke hgi-delete-02"></i>
22399                        </a>
22400                    </div>
22401                </div>
22402            `;
22403
22404        $("#add-links .all-links").append(html);
22405
22406        newlyCreatedLinks.push({
22407            tempId: tempId,
22408            title: newTitle,
22409            link: newLink
22410        });
22411        console.log("newlyCreatedLinks array:", newlyCreatedLinks);
22412
22413    }
22414
22415    popup.hide().removeAttr("data-edit-id");
22416    popup.find("input").val("");
22417    $("#add-links .your-links").show();
22418    $('.inner-link-section').removeClass('showMe');
22419});
22420
22421
22422// BOOT: defer displayUserLinks, displayUserInterests, get-topic-list until after feed renders — 2026-05-15
22423// ROLLBACK: replace the three defer() calls below with direct calls:
22424//   displayUserLinks();  displayUserInterests();  $.ajax({ url: ... get-topic-list ... });
22425// and restore the $(document).ready wrapper around them.
22426(function () {
22427    var loadTopicList = function () {
22428        $.ajax({
22429            url: base_url + "/get-topic-list",
22430            type: "GET",
22431            success: function(res) {
22432                console.log("Trending Interests:", res);
22433
22434                const $list = $("#add-intrest .dropdown-serach-result ul");
22435                $list.empty(); // clear old list
22436
22437                res.trending.forEach(topic => {
22438                    $list.append(
22439                        `<li data-id=${topic.topic_id}><a href="#">${topic.topic_name}</a></li>`
22440                        );
22441                });
22442
22443                res.others.forEach(topic => {
22444                    $list.append(
22445                        `<li data-id=${topic.topic_id}><a href="#">${topic.topic_name}</a></li>`
22446                        );
22447                });
22448
22449                originalInterestsSearchItems = $list.children().clone();
22450            }
22451        });
22452    };
22453
22454    if (window.JumpSocialBoot) {
22455        // Staggered low-priority idle-deferred calls — only populate profile-edit dropdowns
22456        window.JumpSocialBoot.defer(displayUserLinks,    'low', true);
22457        window.JumpSocialBoot.defer(displayUserInterests,'low', true);
22458        window.JumpSocialBoot.defer(loadTopicList,       'low', true);
22459    } else {
22460        // Fallback: no orchestrator (other pages) — fire immediately on ready
22461        $(document).ready(function () {
22462            displayUserLinks();
22463            displayUserInterests();
22464            loadTopicList();
22465        });
22466    }
22467}());
22468
22469
22470function handleAddLinksSave() {
22471    // delete existing links
22472    let requests = [];
22473
22474    if (deleteLinks.length > 0) {
22475        let req = $.ajax({
22476            url: base_url + "/deleteUserLinks",
22477            type: "POST",
22478            data: {
22479                link_id: deleteLinks
22480            }, // send array of ids
22481            success: function(res) {
22482                console.log("Deleted links response:", res);
22483                deleteLinks = [];
22484            }
22485        });
22486
22487        requests.push(req);
22488    }
22489
22490    // save newly created links
22491    if (newlyCreatedLinks.length > 0) {
22492        let titles = [];
22493        let links = [];
22494
22495        newlyCreatedLinks.forEach(link => {
22496            titles.push(link.title);
22497            links.push(link.link);
22498        });
22499
22500        let req = $.ajax({
22501            url: base_url + "/saveUserLinks",
22502            type: "POST",
22503            data: {
22504                title: titles,
22505                link: links
22506            }, // send array of {title, link}
22507            success: function(res) {
22508                console.log("New links saved:", res);
22509                newlyCreatedLinks = [];
22510
22511            }
22512        });
22513
22514        requests.push(req);
22515
22516    }
22517
22518    // update edited links
22519    if (updatedLinks.length > 0) {
22520        let ids = [];
22521        let titles = [];
22522        let links = [];
22523
22524        updatedLinks.forEach(link => {
22525            ids.push(link.id);
22526            titles.push(link.title);
22527            links.push(link.link);
22528        });
22529
22530        let req = $.ajax({
22531            url: base_url + "/updateUserLinks",
22532            type: "POST",
22533            data: {
22534                ids: ids,
22535                titles: titles,
22536                links: links
22537            }, // send array of {id, title, link}
22538            success: function(res) {
22539                console.log("Updated links response:", res);
22540                updatedLinks = [];
22541
22542            }
22543        });
22544
22545        requests.push(req);
22546
22547    }
22548
22549    if (requests.length > 0) {
22550        $.when.apply($, requests).done(function() {
22551            console.log("All requests done");
22552            location.reload();
22553        }).fail(function(err) {
22554            console.error("One of the requests failed:", err);
22555        });
22556    }
22557
22558    $('#add-links').fadeOut();
22559    //location.reload();
22560
22561}
22562
22563function handleAddInterestsSave() {
22564    let requests = [];
22565
22566    // delete existing interests
22567    if (deleteInterests.length > 0) {
22568        let req = $.ajax({
22569            url: base_url + "/deleteUserInterests",
22570            type: "POST",
22571            data: {
22572                interest_id: deleteInterests
22573            }, // send array of ids
22574            success: function(res) {
22575                console.log("Deleted interests response:", res);
22576                deleteInterests = [];
22577            }
22578        });
22579
22580        requests.push(req);
22581    }
22582
22583    // save newly created interests
22584    if (newlyCreatedInterests.length > 0) {
22585        let ids = [];
22586        let tags = [];
22587        let isNew = [];
22588
22589        newlyCreatedInterests.forEach(item => {
22590            ids.push(item.id);
22591            tags.push(item.tag);
22592            isNew.push(item.isNew ? 1 : 0);
22593        });
22594
22595        let req = $.ajax({
22596            url: base_url + "/saveUserInterests",
22597            type: "POST",
22598            data: {
22599                ids: ids,
22600                tags: tags,
22601                isNew: isNew
22602            },
22603            dataType: "json",
22604            success: function(res) {
22605                console.log("New links interests:", res);
22606                newlyCreatedInterests = [];
22607            }
22608        });
22609
22610        requests.push(req);
22611    }
22612
22613    if (requests.length > 0) {
22614        $.when.apply($, requests).done(function() {
22615            console.log("All requests done");
22616            location.reload();
22617        }).fail(function(err) {
22618            console.error("One of the requests failed:", err);
22619        });
22620    }
22621
22622    $('#add-intrest').fadeOut();
22623
22624}
22625
22626$(document).ready(function() {
22627    const $input = $("#add-intrest .search-topic-header input");
22628    const $list = $("#add-intrest .dropdown-serach-result ul");
22629
22630    $input.on("input", function() {
22631        let query = $(this).val().toLowerCase().trim();
22632        $list.empty(); // clear current list
22633
22634        if (query === "") {
22635            // restore all original items if input is empty
22636            $list.append(originalInterestsSearchItems.clone());
22637            return;
22638        }
22639
22640        // filter original items by query
22641        let matched = originalInterestsSearchItems.filter(function() {
22642            return $(this).text().toLowerCase().includes(query);
22643        });
22644
22645        if (matched.length > 0) {
22646            $list.append(matched.clone());
22647        } else {
22648            // no match → show "Add new topic" option
22649            const newLi = `
22650                    <li>
22651                    <a href="#">${query}</a>
22652                    <div class="add-topic">Add new topic</div>
22653                    </li>`;
22654            $list.append(newLi);
22655        }
22656    });
22657});
22658
22659$(document).on("click", "#add-intrest .dropdown-serach-result li", function(e) {
22660    e.preventDefault();
22661
22662    $('.inner-topic-full-wrapper').removeClass('add-topic-active');
22663    $('.inner-topic-search').removeClass('inner-topic-search-active');
22664    let $li = $(this);
22665
22666    let topicName = $(this).find("a").text().trim();
22667    if (!topicName) return;
22668
22669    let exists = false;
22670    $("#add-intrest .all-topics ul li span:first-child").each(function() {
22671        if ($(this).text().trim().toLowerCase() === topicName.toLowerCase()) {
22672            exists = true;
22673            return false;
22674        }
22675    });
22676
22677    if (exists) {
22678        // already added → just reset search list & exit
22679        $("#add-intrest .search-topic-header input").val("");
22680        const $searchList = $("#add-intrest .dropdown-serach-result ul");
22681        $searchList.empty().append(originalInterestsSearchItems.clone());
22682        return;
22683    }
22684
22685    let topicId = $li.data("id");
22686    let tempId = topicId;
22687    if (topicId) {
22688        newlyCreatedInterests.push({
22689            id: topicId,
22690            tag: topicName,
22691            isNew: false
22692        });
22693    } else {
22694        tempId = "new" + Date.now();
22695        newlyCreatedInterests.push({
22696            id: tempId,
22697            tag: topicName,
22698            isNew: true
22699        });
22700    }
22701
22702    console.log('Newly Created INterests: ', newlyCreatedInterests);
22703
22704    const newLi = `
22705            <li class="d-flex justify-content-between">
22706            <span>${topicName}</span>
22707            <span>
22708                <a href="#" class="delete-btn" onclick="handleInterestDelete(${tempId}, this, true)">
22709                <i class="hgi hgi-stroke hgi-delete-02"></i>
22710                </a>
22711            </span>
22712            </li>
22713        `;
22714
22715    $("#add-intrest .all-topics ul").append(newLi);
22716
22717    // clear search input and results
22718    $("#add-intrest .search-topic-header input").val("");
22719    const $searchList = $("#add-intrest .dropdown-serach-result ul");
22720    $searchList.empty().append(originalInterestsSearchItems.clone());
22721
22722    $("#add-intrest .your-topics").show();
22723
22724});
22725</script>
22725
22726
22727<!-- ----------------------------- SUPER CREATOR STUFF ----------------------------- -->
22728<script>
22729var allTipsData = [];
22730var engagementStats = {
22731    'data': null,
22732    'change': null
22733};
22734var allEarningsData = [];
22735
22736$('.fixed-amount button').click(function() {
22737    $('.fixed-amount button').removeClass('active');
22738    $(this).addClass('active');
22739
22740    const span = $("#tips-and-donations-by-user .users-detail .sent-gift-amount span");
22741
22742    let amount = 5;
22743    if ($(this).hasClass("custom-amount-input")) {
22744        amount = $("#tips-and-donations-by-user .custom-amount input").val();
22745
22746        if (amount.length === 0) {
22747            return;
22748        }
22749
22750        const amountCheck = Number(amount);
22751        if (isNaN(amountCheck) || amountCheck <= 0) {
22752            return;
22753        }
22754    } else {
22755        amount = $(this).text().replace("$", "").trim();
22756    }
22757
22758    console.log(amount);
22759    span.html(
22760        `<img src="https://www.jumpspree.com/public/images/gift-green.png" alt=""> Sent you $${amount} 🎊`);
22761});
22762
22763$("#tips-and-donations-by-user .personalized-message textarea").on("input", function() {
22764    const value = $(this).val();
22765    const $p = $("#tips-and-donations-by-user .users-detail .user-box p");
22766
22767    if (value) {
22768        $p.text(value).show();
22769    } else {
22770        $p.hide();
22771    }
22772});
22773
22774$('.views-container .all-format a').click(function() {
22775    $('.all-format a').removeClass('actived');
22776    $(this).addClass('actived');
22777})
22778
22779$('.date-view').click(function(e) {
22780    e.stopPropagation(); // stop bubbling
22781    var $dropdown = $(this).next('.date-in-dropdown');
22782    $('.date-in-dropdown').not($dropdown).slideUp('fast'); // close others
22783    $dropdown.slideToggle('fast');
22784});
22785
22786
22787$('#tips-and-donations .date-in-dropdown li').click(function() {
22788    $('.date-in-dropdown').hide();
22789    var days = $(this).text();
22790    $(this).parents('.display-date').find('.date-view span').text(days);
22791
22792    let daysMap = {
22793        "7 days": 7,
22794        "14 days": 14,
22795        "30 days": 30,
22796        "3 months": 90,
22797        "6 months": 180
22798    };
22799
22800    const key = days.replace(/\s+/g, ' ').trim().toLowerCase(); // normalize
22801
22802    let selectedDays = daysMap[key] ?? 7;
22803
22804    // Calculate cutoff date
22805    let now = new Date();
22806    let cutoffDate = new Date();
22807    cutoffDate.setDate(now.getDate() - selectedDays);
22808
22809    let tbody = $('#some-transactions table tbody');
22810    tbody.empty();
22811
22812    const options = {
22813        year: 'numeric',
22814        month: 'short',
22815        day: 'numeric'
22816    };
22817
22818    let filteredTips = allTipsData.filter(function(tip) {
22819        const tipDate = new Date(tip.posteddate);
22820        return tipDate >= cutoffDate;
22821    });
22822
22823    // If no transactions
22824    if (filteredTips.length === 0) {
22825        $('#no-transactions').show();
22826        $('#some-transactions').hide();
22827        return;
22828    }
22829
22830    // Otherwise show table
22831    $('#no-transactions').hide();
22832    $('#some-transactions').show();
22833
22834    filteredTips.forEach(function(tip) {
22835        const tipDate = new Date(tip.posteddate);
22836
22837        let row = `
22838            <tr>
22839                <td>${tipDate.toLocaleDateString('en-US', options)}</td>
22840                <td>$${Number(tip.amount)/100}</td>
22841                <td>
22842                    <img class="sender-img" src="${tip.sender_img}" alt=""> 
22843                    @${tip.paid_by_username}
22844                </td>
22845                <td>
22846                    <button type="button" onclick="setPopDonationMessage('${tip.paid_by_username}', '${tip.sender_img}', '${tip.message}', '${Number(tip.amount)/100}')">View</button>
22847                </td>
22848            </tr>
22849        `;
22850        tbody.append(row);
22851
22852    });
22853
22854
22855})
22856
22857$('#engagement-and-insights .date-in-dropdown li').click(function() {
22858    $('.date-in-dropdown').hide();
22859    var days = $(this).text();
22860    $(this).parents('.display-date').find('.date-view span').text(days);
22861
22862    let daysMap = {
22863        "7 days": '7',
22864        "14 days": '14',
22865        "30 days": '30',
22866        "3 months": '3',
22867        "6 months": '6'
22868    };
22869
22870    const key = days.replace(/\s+/g, ' ').trim().toLowerCase(); // normalize
22871
22872    let selectedDays = daysMap[key] ?? '7';
22873
22874    setEngagementStats(selectedDays, engagementStats['data'], engagementStats['change']);
22875
22876})
22877
22878$('#earning-and-transaction .date-in-dropdown').each(function(index) {
22879
22880    $(this).find('li').click(function() {
22881        $('.date-in-dropdown').hide();
22882
22883        let daysMap = {
22884            "7 days": 7,
22885            "14 days": 14,
22886            "30 days": 30,
22887            "3 months": 90,
22888            "6 months": 180
22889        };
22890
22891        const days = $(this).text();
22892        $(this).parents('.display-date').find('.date-view span').text(days);
22893
22894        const key = days.replace(/\s+/g, ' ').trim().toLowerCase(); // normalize
22895
22896        let selectedDays = daysMap[key] ?? 7;
22897
22898
22899        if (index === 0) {
22900            // First dropdown clicked
22901            setEarningsData(selectedDays, allEarningsData);
22902
22903        } else {
22904            // Second dropdown clicked
22905            setTransactionData(selectedDays, allEarningsData);
22906
22907        }
22908    });
22909});
22910
22911// Close on outside click
22912$(document).click(function(e) {
22913    if (!$(e.target).closest('.date-view, .date-in-dropdown').length) {
22914        $('.date-in-dropdown').slideUp('fast');
22915    }
22916});
22917
22918
22919$(document).on('wheel', function(e) {
22920    if ($("#engagement-and-insights").is(":visible")) {
22921        e.preventDefault(); // stop body scroll
22922        var $box = $("#engagement-and-insights .eni-inner");
22923        var scrollTop = $box.scrollTop();
22924        var scrollHeight = $box.prop("scrollHeight");
22925        var height = $box.height();
22926
22927        // Scroll box instead of body
22928        if (e.originalEvent.deltaY > 0) {
22929            // scroll down
22930            if (scrollTop + height < scrollHeight) {
22931                $box.scrollTop(scrollTop + 5);
22932            }
22933        } else {
22934            // scroll up
22935            if (scrollTop > 0) {
22936                $box.scrollTop(scrollTop - 5);
22937            }
22938        }
22939    }
22940});
22941$(document).on('wheel', function(e) {
22942    if ($("#tips-and-donations-by-user").is(":visible")) {
22943        e.preventDefault(); // stop body scroll
22944        var $box = $("#tips-and-donations-by-user .eni-inner");
22945        var scrollTop = $box.scrollTop();
22946        var scrollHeight = $box.prop("scrollHeight");
22947        var height = $box.height();
22948
22949        // Scroll box instead of body
22950        if (e.originalEvent.deltaY > 0) {
22951            // scroll down
22952            if (scrollTop + height < scrollHeight) {
22953                $box.scrollTop(scrollTop + 5);
22954            }
22955        } else {
22956            // scroll up
22957            if (scrollTop > 0) {
22958                $box.scrollTop(scrollTop - 5);
22959            }
22960        }
22961    }
22962});
22963
22964function checkSuperCreatorEligibility() {
22965
22966    $.ajax({
22967        url: base_url + '/checkSuperCreatorEligibility',
22968        type: 'GET',
22969        dataType: 'json',
22970        success: function(response) {
22971            console.log(response);
22972
22973            if (response.status) {
22974
22975                const postsCount = Number(response.postsCount);
22976                const postsViewCount = Number(response.postsViewCount);
22977                const activeDays = Number(response.activeDays);
22978                const userDetails = response.userDetails;
22979                const isVerified = userDetails.is_verified == 1;
22980                const isSubToJumpspreeMore = userDetails.is_plan_active == 1;
22981                const followers = Number(userDetails.followers);
22982
22983
22984                toggleSuperCreatorCheck(
22985                    ".eligibility-wrapper .checklist-for-eligibility:first ul li:nth-child(1) img",
22986                    isSubToJumpspreeMore);
22987                toggleSuperCreatorCheck(
22988                    ".eligibility-wrapper .checklist-for-eligibility:first ul li:nth-child(2) img",
22989                    isVerified);
22990                toggleSuperCreatorCheck(
22991                    ".eligibility-wrapper .checklist-for-eligibility:first ul li:nth-child(3) img",
22992                    activeDays >= 30);
22993                toggleSuperCreatorCheck(
22994                    ".eligibility-wrapper .checklist-for-eligibility:first ul li:nth-child(4) img",
22995                    postsCount >= 30);
22996                toggleSuperCreatorCheck(
22997                    ".eligibility-wrapper .checklist-for-eligibility:first ul li:nth-child(5) img",
22998                    followers >= 100);
22999
23000                // Monetization unlock conditions
23001                toggleSuperCreatorCheck(
23002                    ".eligibility-wrapper .checklist-for-eligibility:last ul li:nth-child(1) img",
23003                    postsViewCount >= 10000);
23004                toggleSuperCreatorCheck(
23005                    ".eligibility-wrapper .checklist-for-eligibility:last ul li:nth-child(2) img",
23006                    isSubToJumpspreeMore);
23007                toggleSuperCreatorCheck(
23008                    ".eligibility-wrapper .checklist-for-eligibility:last ul li:nth-child(3) img",
23009                    followers >= 500);
23010
23011
23012
23013            } else {
23014                console.error("⚠️ Error: " + response.message);
23015            }
23016        },
23017        error: function(xhr, status, error) {
23018            console.error("AJAX Error:", error);
23019        }
23020    });
23021
23022    $('#check-eligibility').fadeIn();
23023
23024}
23025
23026function activateDeactivateSuperCreator(type) {
23027    if (type !== 1 && type !== 2 && type !== 3) return;
23028
23029    $.ajax({
23030        url: base_url + '/activateCreatorAccount',
23031        type: 'POST',
23032        data: {
23033            type: type
23034        },
23035        success: function(response) {
23036            console.log('Message response:', response);
23037
23038            if (type === 1) {
23039                $('#apply-super-creator-popup').fadeOut(200);
23040                $('#apply-super-creator').hide();
23041                $('#activated-super-creator').show();
23042            } else if (type === 2) {
23043                $('#roll-camera-action-popup').fadeIn(200);
23044            } else {
23045                $('#were-sad-to-see-you-go').fadeIn('fast');
23046            }
23047        },
23048        error: function(xhr) {
23049            console.error('Message error:', xhr.responseText);
23050        }
23051    });
23052}
23053
23054function toggleSuperCreatorCheck(selector, condition) {
23055    if (condition) {
23056        $(selector).removeClass("check-dim");
23057    } else {
23058        $(selector).addClass("check-dim");
23059    }
23060}
23061
23062function toggleCreatorTip() {
23063    $.ajax({
23064        url: base_url + '/toggleCreatorTip',
23065        type: 'POST',
23066        success: function(response) {
23067            console.log('Toggle response:', response);
23068            $('.Tipbtn-enable').toggle()
23069        },
23070        error: function(xhr) {
23071            console.error('Toggle error:', xhr.responseText);
23072        }
23073    });
23074
23075}
23076
23077function setTipPersonalizedMessage() {
23078
23079    const message = $('.personalized-message textarea').val().trim();
23080
23081    $.ajax({
23082        url: base_url + '/setTipPersonalizedMessage',
23083        type: 'POST',
23084        data: {
23085            message: message
23086        },
23087        success: function(response) {
23088            console.log('Message response:', response);
23089        },
23090        error: function(xhr) {
23091            console.error('Message error:', xhr.responseText);
23092        }
23093    });
23094}
23095
23096function getAllTipsDetails() {
23097
23098    $.ajax({
23099        url: base_url + '/getAllTipsDetails',
23100        type: 'GET',
23101        success: function(response) {
23102            console.log('Message response:', response);
23103            $('.personalized-message textarea').val(response.tips_thanks_message);
23104            $('#dmToggleCheckbox').prop('checked', response.tip_enabled);
23105
23106            if (response.tips_info.length === 0) {
23107                $('#no-transactions').show();
23108                $('#some-transactions').hide();
23109            } else {
23110                $('#no-transactions').hide();
23111                $('#some-transactions').show();
23112
23113                let tbody = $('#some-transactions table tbody');
23114                tbody.empty();
23115                const options = {
23116                    year: 'numeric',
23117                    month: 'short',
23118                    day: 'numeric'
23119                };
23120
23121                let totalAmount = 0;
23122                allTipsData = response.tips_info;
23123
23124                let now = new Date();
23125                let cutoffDate = new Date();
23126                cutoffDate.setDate(now.getDate() - 7);
23127
23128                let filteredTips = response.tips_info.filter(function(tip) {
23129                    const date = new Date(tip.posteddate);
23130                    return date >= cutoffDate;
23131                });
23132
23133                if (filteredTips.length === 0) {
23134                    $('#no-transactions').show();
23135                    $('#some-transactions').hide();
23136                }
23137
23138
23139                response.tips_info.forEach(function(tip) {
23140                    totalAmount += Number(tip.amount);
23141                    const date = new Date(tip.posteddate);
23142
23143                    if (date >= cutoffDate) {
23144                        let row = `
23145                                <tr>
23146                                    <td>${date.toLocaleDateString('en-US', options)}</td>
23147                                    <td>$${Number(tip.amount)/100}</td>
23148                                    <td>
23149                                        <img class="sender-img" src="${tip.sender_img}" alt=""> 
23150                                        @${tip.paid_by_username}
23151                                    </td>
23152                                    <td>
23153                                        <button type="button" onclick="setPopDonationMessage('${tip.paid_by_username}', '${tip.sender_img}', '${tip.message}', '${Number(tip.amount)/100}')">View</button>
23154                                    </td>
23155                                </tr>`;
23156
23157                        tbody.append(row);
23158                    }
23159                });
23160
23161
23162                $('.total-received-money .amount').text(`$${totalAmount/100}`);
23163
23164            }
23165
23166        },
23167        error: function(xhr) {
23168            console.error('Message error:', xhr.responseText);
23169        }
23170    });
23171}
23172
23173function setPopDonationMessage(senderName, senderImg, message, amount) {
23174
23175    $('#tippp-sender .sender-img').attr('src', senderImg);
23176
23177    // Update sender username
23178    $('#tippp-sender .user .user').text(senderName);
23179
23180    // Update gift amount
23181    $('#tippp-sender .sent-gift-amount span').html(
23182        `<img src="https://www.jumpspree.com/public/images/gift-green.png" alt=""> Sent you $${amount} 🎉`
23183    );
23184
23185    // Update personalized message
23186    $('#tippp-sender p').text(message);
23187
23188    $('#tippp-sender').fadeIn('fast');
23189
23190}
23191
23192function getEngagementStats() {
23193    $.ajax({
23194        url: base_url + '/superCreatorEngagementStats',
23195        type: 'GET',
23196        dataType: 'json',
23197        success: function(response) {
23198            console.log('Message response:', response);
23199            setEngagementStats('7', response.data, response.change);
23200            engagementStats['data'] = response.data;
23201            engagementStats['change'] = response.change;
23202
23203        },
23204        error: function(xhr) {
23205            console.error('Message error:', xhr.responseText);
23206        }
23207    });
23208}
23209
23210function setEngagementStats(range, data, change) {
23211
23212
23213    // Views
23214    $("#engagement-and-insights .views-container:eq(0) .mid-sec .right-side").text(data['views']['all'][range]);
23215
23216    // Followers
23217    $("#engagement-and-insights .views-container:eq(1) .mid-sec .right-side").text(data['followers'][range]);
23218
23219
23220    // Likes
23221    $("#engagement-and-insights #engagement-last-box .list-views li:eq(0) .value").text(data['likes']['all'][range]);
23222
23223    // Comments
23224    $("#engagement-and-insights #engagement-last-box .list-views li:eq(1) .value").text(data['comments']['all'][range]);
23225
23226    // Reposts
23227    $("#engagement-and-insights #engagement-last-box .list-views li:eq(2) .value").text(data['reposts']['all'][range]);
23228
23229    // Engagement
23230    $("#engagement-and-insights #engagement-last-box .mid-sec .right-side").text(data['comments']['all'][range] + data[
23231        'reposts']['all'][range] + data['likes']['all'][range]);
23232
23233}
23234
23235function getEarningsData() {
23236    $.ajax({
23237        url: base_url + '/getAllEarningsDetails',
23238        type: 'GET',
23239        dataType: 'json',
23240        success: function(response) {
23241            console.log('Message response:', response);
23242            // TODO : ADD payouts as well
23243            allEarningsData = response.tips_info;
23244
23245            setEarningsData(7, allEarningsData);
23246            setTransactionData(7, allEarningsData);
23247        },
23248        error: function(xhr) {
23249            console.error('Message error:', xhr.responseText);
23250        }
23251    });
23252}
23253
23254function setEarningsData(range, data) {
23255
23256    let total = 0;
23257    const options = {
23258        year: 'numeric',
23259        month: 'short',
23260        day: 'numeric'
23261    };
23262
23263
23264    // Calculate cutoff date
23265    let now = new Date();
23266    let cutoffDate = new Date();
23267    cutoffDate.setDate(now.getDate() - range);
23268
23269    let filteredData = allEarningsData.filter(function(tx) {
23270        const tipDate = new Date(tx.posteddate);
23271        return tipDate >= cutoffDate;
23272    });
23273
23274    filteredData.forEach(function(tx) {
23275        let amount = parseFloat(tx.amount.replace(/[$,]/g, ""));
23276        total += amount;
23277    });
23278
23279    total = total / 100;
23280    $("#earning-and-transaction .earning-box:first .right-side").text(`$${total.toLocaleString()}`);
23281}
23282
23283function setTransactionData(range, data) {
23284    let $tbody = $("#transactions-border table tbody");
23285    $tbody.empty();
23286
23287    const options = {
23288        year: 'numeric',
23289        month: 'short',
23290        day: 'numeric'
23291    };
23292
23293    const transactions = data;
23294
23295    // Calculate cutoff date
23296    let now = new Date();
23297    let cutoffDate = new Date();
23298    cutoffDate.setDate(now.getDate() - range);
23299
23300    let filteredData = allEarningsData.filter(function(tx) {
23301        const tipDate = new Date(tx.posteddate);
23302        return tipDate >= cutoffDate;
23303    });
23304
23305    filteredData.forEach(function(tx) {
23306        let amount = parseFloat(tx.amount.replace(/[$,]/g, ""));
23307        amount = amount / 100;
23308        const date = new Date(tx.posteddate);
23309
23310        let row = `
23311            <tr>
23312                <td>${date.toLocaleDateString('en-US', options)}</td>
23313                <td>$${amount.toLocaleString()}</td>
23314                <td class="success">Success</td>
23315            </tr>
23316        `;
23317        $tbody.append(row);
23318    });
23319
23320}
23321
23322function getConnectedBanks() {
23323    $.ajax({
23324        url: base_url + '/getRegisteredBankAccounts',
23325        type: 'GET',
23326        dataType: 'json',
23327        success: function(response) {
23328            console.log('Message response:', response);
23329            if (response.length === 0) {
23330                $('#connectBankHeading').show();
23331                $('#linkedBankHeading').hide();
23332
23333                $('#linkedAccounts').hide();
23334                $('#banks').show();
23335
23336            } else {
23337                $('#connectBankHeading').hide();
23338                $('#linkedBankHeading').show();
23339
23340                $('#linkedAccounts').show();
23341                $('#banks').hide();
23342
23343                $('#linkedAccounts h3').text(`${response[0].bank_name} ending in ${response[0].last4}`);
23344
23345                $('#linkedAccounts .delete-account-super').attr('onclick',
23346                    `deleteConnectedBanks('${response[0].connect_id}')`);
23347            }
23348
23349        },
23350        error: function(xhr) {
23351            console.error('Message error:', xhr.responseText);
23352        }
23353    });
23354}
23355
23356function deleteConnectedBanks(connect_id) {
23357    $.ajax({
23358        url: base_url + '/deleteConnectedBankAccount',
23359        type: 'POST',
23360        dataType: 'json',
23361        data: {
23362            connect_id: connect_id
23363        },
23364        success: function(response) {
23365            console.log('Message response:', response);
23366            if (response.status) {
23367                $('#connectBankHeading').show();
23368                $('#linkedBankHeading').hide();
23369
23370                $('#linkedAccounts').hide();
23371                $('#banks').show();
23372
23373            }
23374
23375        },
23376        error: function(xhr) {
23377            console.error('Message error:', xhr.responseText);
23378        }
23379    });
23380}
23381
23382function getStripeConnectUrl() {
23383    $.ajax({
23384        url: base_url + '/connectUserAccount',
23385        type: 'GET',
23386        dataType: 'json',
23387        success: function(response) {
23388            console.log('Message response:', response);
23389            if (response.status) {
23390                window.location.href = response.url.url;
23391            }
23392        },
23393        error: function(xhr) {
23394            console.error('Message error:', xhr.responseText);
23395        }
23396    });
23397}
23398
23399function sendUserTip() {
23400    let $activeBtn = $("#tips-and-donations-by-user .fixed-amount button.active");
23401
23402    let username = $(".profile-box .profile-detail .name h1").first().text().trim();
23403    username = username.replace(/^@/, ""); // remove leading @
23404    console.log(username)
23405
23406    let amount = 0;
23407    if ($activeBtn.hasClass("custom-amount-input")) {
23408        amount = $("#tips-and-donations-by-user .custom-amount input").val();
23409        if (amount.length === 0) {
23410            showNotification('error', 'Enter a tip amount.')
23411            return;
23412        }
23413    } else {
23414        amount = $activeBtn.text().replace("$", "").trim();
23415    }
23416
23417    amount = Number(amount);
23418    console.log(amount);
23419
23420    if (isNaN(amount) || amount <= 0) {
23421        showNotification('error', 'Enter a valid tip amount.')
23422        return;
23423    }
23424
23425    const message = $("#tips-and-donations-by-user .personalized-message textarea").val().trim();
23426    console.log("Saved message:", message);
23427
23428    $.ajax({
23429        url: base_url + "/tipSuperUser",
23430        type: "POST",
23431        dataType: "json",
23432        data: {
23433            tipAmount: amount,
23434            message: message,
23435            username: username
23436        },
23437        success: function(response) {
23438            console.log("Server response:", response);
23439            window.location.href = response.link;
23440            //$('#tip-sentsuccess-with-custom-message').fadeIn('fast')
23441        },
23442        error: function(xhr, status, error) {
23443            console.error("AJAX Error:", error);
23444        }
23445    });
23446
23447
23448}
23449
23450
23451
23452
23453// dec 18 
23454function unrepostPost(postId) {
23455    // Confirm with user
23456    /* if (!confirm('Are you sure you want to remove this repost?')) {
23457        return;
23458    } */
23459    
23460    // Get user token
23461    const userToken = getCurrentUserToken();
23462    
23463    // Get UI elements
23464    const repostButton = document.querySelector(`a[onclick*="unrepostPost('${postId}')"]`);
23465    const repostIcon = repostButton.querySelector('.fa-arrows-repeat');
23466    const repostCountSpan = document.getElementById(`repost-count-${postId}`);
23467    
23468    if (!repostButton) return;
23469    
23470    // Show loading
23471    repostIcon.classList.add('fa-spin');
23472    
23473    // FIX: Add user_token to request
23474    // Send AJAX request - FIX route if needed
23475    fetch('/unrepost', {  // Changed from '/unrepost' to '/post/unrepost'
23476        method: 'POST',
23477        headers: {
23478            'Content-Type': 'application/json',
23479            'X-Requested-With': 'XMLHttpRequest'
23480        },
23481        body: JSON.stringify({
23482            post_id: postId,
23483            user_token: userToken  // Added user token
23484        })
23485    })
23486    .then(response => response.json())
23487    .then(data => {
23488        // Remove loading
23489        repostIcon.classList.remove('fa-spin');
23490        
23491        // FIX: Check for status === true (not 'success')
23492        if (data.status === true) {
23493            // Update UI
23494            repostIcon.classList.remove('user-reposted-post');
23495            repostButton.classList.remove('reposted');
23496            repostButton.classList.add('no-repost');
23497            
23498            // Update onclick to show repost dropdown again
23499            repostButton.setAttribute('onclick', `handleRepostDropdown(event, this)`);
23500            
23501            // FIX: Use data.reposted_count (not responseData)
23502            const newCount = data.reposted_count; // FIX: changed from responseData to data
23503            
23504            if (newCount > 0) {
23505                repostCountSpan.textContent = newCount;
23506                repostCountSpan.style.display = 'inline';
23507            } else {
23508                repostCountSpan.style.display = 'none';
23509            }
23510            
23511            // Update dropdown text
23512            const dropdown = repostButton.nextElementSibling;
23513            if (dropdown && dropdown.classList.contains('drop-down-menu-share')) {
23514                const dropdownLink = dropdown.querySelector('a');
23515                if (dropdownLink) {
23516                    dropdownLink.textContent = 'Repost';
23517                    dropdownLink.setAttribute('onclick', `handleRepostPopup(this, '${postId}')`);
23518                    const dropdownIcon = dropdownLink.querySelector('.fa-arrows-repeat');
23519                    if (dropdownIcon) {
23520                        dropdownIcon.classList.remove('user-reposted-post');
23521                    }
23522                }
23523            } 
23524            // Show success message
23525            showNotification('success', data.message || 'Repost removed.'); 
23526            getSocialFeed('3', '1', '1', '');
23527        } else {
23528            showNotification('error', data.message || 'Failed to remove repost');
23529
23530        }
23531    })
23532    .catch(error => {
23533        console.error('Error:', error);
23534        repostIcon.classList.remove('fa-spin');
23535            showNotification('error', 'Network error. Please try again.');
23536    });
23537}
23538
23539// Helper function to get current user token
23540function getCurrentUserToken() {
23541    return window.currentUserToken || localStorage.getItem('user_token') || '';
23542}
23543
23544 
23545
23546// Helper function to get current user token (implement based on your auth system)
23547function getCurrentUserToken() {
23548    // Example: Get from localStorage, cookie, or global variable
23549    return window.currentUserToken || localStorage.getItem('user_token') || '';
23550}
23551
23552</script>
23552
23553<script>
23554    $('#privatepostbtn').on('change', function () {
23555        if (this.checked) {
23556            $('.write-article-and-tag-a-product.member-guidlines').fadeIn();
23557        } else {
23558            $('.write-article-and-tag-a-product.member-guidlines').fadeOut();
23559        }
23560    });
23561    
23562    
23563
23564    // PRIVATE MEMBERS POPUP
23565
23566    let privateMembersDebounceTimer;
23567
23568    $('#members-box .search-product input').on('input', function () {
23569        const query = $(this).val().trim();
23570        clearTimeout(privateMembersDebounceTimer);
23571
23572        if (!query) {
23573            $('#members-box .product-drop ul').empty();
23574            return;
23575        }
23576
23577        privateMembersDebounceTimer = setTimeout(function () {
23578            $.ajax({
23579                url: 'https://www.jumpspree.com/getUserListForMentions',
23580                method: 'POST',
23581                data: {  query },
23582                dataType: "json",
23583                success: function (res) {
23584                    const $ul = $('#members-box .product-drop ul');
23585                    $ul.empty();
23586
23587                    console.log(res);
23588                    if(!res.status) return;
23589                    // dummyPrivateMembers; 
23590                    
23591                    res.data.slice(0, 5).forEach(user => {
23592                        const foundIdx = addedPrivateMembers.indexOf(user.user_token);
23593                        
23594                        const addedClass = foundIdx !== -1  ? 'add added' : 'add';
23595                        const btnText = foundIdx !== -1 ? 'Added' : 'Add';
23596
23597                        let profilePhoto = "https://www.jumpspree.com/public/images/user-icon.png?ver%3A1_03=";
23598
23599                        if(user.profile_photo && user.profile_photo.length !== 0){
23600                            profilePhoto = user.profile_photo;
23601                        }
23602
23603                        const li = `
23604                        <li class="d-flex justify-content-between" data-token="${user.user_token}">
23605                            <div class="d-flex align-items-center">
23606                                <a href="/${user.username}" class="fig">
23607                                    <img src="${profilePhoto}" style="border-radius:50%">
23608                                </a>
23609                                <div class="fnc-title">
23610                                    <h4>
23611                                        <a href="/${user.username}" class="profile-link">${user.full_name}</a>
23612                                        <div class="user">@${user.username}</div>
23613                                    </h4>
23614                                </div>
23615                            </div>
23616                            <div class="${addedClass}" onclick="addPrivateMembers(this)">
23617                                <a href="javascript:void(0);">${btnText}</a>
23618                            </div>
23619                        </li>`;
23620                        $ul.append(li);
23621                    });
23622                }
23623            });
23624        }, 400);
23625    });
23626
23627
23628    function addPrivateMembers(el) {
23629        // e.preventDefault();
23630
23631        if ($(el).hasClass('added')) return;
23632
23633        console.log('clicked');
23634
23635        const $li = $(el).closest('li');
23636        const token = $li.attr('data-token');
23637        const name = $li.find('.profile-link').text();
23638        const img = $li.find('img').attr('src');
23639
23640        console.log(token);
23641
23642
23643        $li.find('.add').addClass('added').find('a').text('Added');
23644
23645        const addedItem = `
23646        <li data-token="${token}">
23647            <img src="${img}" style="border-radius:50%">
23648            <div class="close-added" onclick="removePrivateMembers(this)">×</div>
23649            <p>${name}</p>
23650        </li>`;
23651
23652        addedPrivateMembers.push(token);
23653
23654        $('#members-box .added-list ul').append(addedItem);
23655    }
23656
23657
23658    function removePrivateMembers(el){
23659        const $li = $(el).closest('li');
23660        const token = $li.attr('data-token');
23661
23662        $li.remove();
23663
23664        addedPrivateMembers = addedPrivateMembers.filter(t => t !== token);
23665
23666        const $btn = $('#members-box .product-drop li[data-token="' + token + '"] .add');
23667        $btn.removeClass('added').find('a').text('Add');
23668    }
23669
23670
23671</script>
23671
23672
23673
23674<script>
23675
23676
23677    // For report div
23678    function showAdditionalReportDiv(val){
23679
23680        if(val=='8'){
23681            $('#additional-comment-all').show('slow');
23682        }else{
23683            $('#additional-comment-all').hide();
23684        }
23685
23686    }
23687
23688    $('#report-additional-message').keyup(function(){
23689        let $remaining = $('#remaining-report-count')
23690        let chars = parseInt(this.value.length);
23691    
23692        remaining = 300 - chars;
23693        $remaining.text(`${chars}/300`);
23694
23695    });
23696
23697    function reportPost(){
23698
23699        const postId = $('#report-brand').attr('data-postid');
23700        console.log(postId);
23701
23702        if(!postId || postId.length === 0){
23703            return;
23704        }
23705
23706        reasonId = $('input[name="post-report-reason-check"]:checked').val();
23707
23708        if(!reasonId){
23709            showNotification('error', "Please choose atleast one option"); 
23710            return;  
23711        }
23712
23713        stext = $('#report-post-btn').text();
23714        message = $('#report-additional-message').val();
23715        reasonId = $('input[name="post-report-reason-check"]:checked').val();
23716      
23717        $.ajax({
23718            url: base_url + '/report-post', 
23719            type: 'POST',
23720            data: { reasonId: reasonId, message: message, postId: postId}, 
23721            dataType: "json",
23722            beforeSend: function() {
23723                $('#report-post-btn').html ('<span class="jloader"></span>');
23724            },
23725            success: function(response) {
23726                msg = response.message;
23727           
23728                if(response.status){
23729                    $('#report-brand-success').fadeIn('fast'); 
23730                    $('#report-brand').hide();
23731                    $('#report-brand').removeAttr('data-postid');
23732                }else{
23733                    showNotification('error', msg); 
23734                
23735                }
23736            },
23737            error: function(xhr, status, error) {
23738                //  $('#loader').hide();
23739                // console.error('AJAX error:', error);
23740            },
23741            complete: function() {
23742                $('#report-post-btn').html(stext); 
23743                    //  setTimeout(function() {
23744                    //      $('#errormessage').fadeOut()
23745                //  }, 5000)
23746            }
23747        });
23748
23749    }
23750</script>
23750
23751
23752
23753<script>
23754
23755document.addEventListener('DOMContentLoaded', function () {
23756
23757    const STORAGE_KEY = 'site-theme';
23758
23759    const body = document.body;
23760
23761    const segmented = document.getElementById('segmented');
23762
23763    const btnLight = document.getElementById('btnLight');
23764    const btnDark = document.getElementById('btnDark');
23765
23766    const switchLight = document.getElementById('switchLight');
23767    const switchNight = document.getElementById('switchNight');
23768
23769
23770    /*
23771    |--------------------------------------------------------------------------
23772    | PHP cookie value
23773    |--------------------------------------------------------------------------
23774    |
23775    | PHP sends:
23776    |
23777    | light-mode
23778    | dark-mode
23779    |
23780    */
23781
23782    const cookieBodyClass = null;
23783
23784
23785    /*
23786    |--------------------------------------------------------------------------
23787    | Convert body class to theme
23788    |--------------------------------------------------------------------------
23789    */
23790
23791    function classToTheme(bodyClass) {
23792
23793        return bodyClass === 'light-mode'
23794            ? 'light'
23795            : 'dark';
23796    }
23797
23798
23799    /*
23800    |--------------------------------------------------------------------------
23801    | Convert theme to body class
23802    |--------------------------------------------------------------------------
23803    */
23804
23805    function themeToClass(theme) {
23806
23807        return theme === 'light'
23808            ? 'light-mode'
23809            : 'dark-mode';
23810    }
23811
23812
23813    /*
23814    |--------------------------------------------------------------------------
23815    | Set Cookie
23816    |--------------------------------------------------------------------------
23817    */
23818
23819    function setThemeCookie(theme) {
23820
23821        const bodyClass = themeToClass(theme);
23822
23823        document.cookie =
23824            'bodyClass=' +
23825            encodeURIComponent(bodyClass) +
23826            '; path=/' +
23827            '; max-age=' + (60 * 60 * 24 * 365) +
23828            '; SameSite=Lax';
23829    }
23830
23831
23832    /*
23833    |--------------------------------------------------------------------------
23834    | Apply Theme
23835    |--------------------------------------------------------------------------
23836    */
23837
23838    function applyTheme(theme) {
23839
23840        /*
23841        | Make sure only light/dark is allowed
23842        */
23843
23844        if (theme !== 'light' && theme !== 'dark') {
23845            theme = 'dark';
23846        }
23847
23848
23849        /*
23850        |--------------------------------------------------------------------------
23851        | Body class
23852        |--------------------------------------------------------------------------
23853        */
23854
23855        body.classList.remove(
23856            'light-mode',
23857            'dark-mode'
23858        );
23859
23860        body.classList.add(
23861            themeToClass(theme)
23862        );
23863
23864
23865        /*
23866        |--------------------------------------------------------------------------
23867        | Save to localStorage
23868        |--------------------------------------------------------------------------
23869        */
23870
23871        localStorage.setItem(
23872            STORAGE_KEY,
23873            theme
23874        );
23875
23876
23877        /*
23878        |--------------------------------------------------------------------------
23879        | Save to Cookie
23880        |--------------------------------------------------------------------------
23881        */
23882
23883        setThemeCookie(theme);
23884
23885
23886        /*
23887        |--------------------------------------------------------------------------
23888        | Update UI
23889        |--------------------------------------------------------------------------
23890        */
23891
23892        updateUI(theme);
23893    }
23894
23895
23896    /*
23897    |--------------------------------------------------------------------------
23898    | Update UI
23899    |--------------------------------------------------------------------------
23900    */
23901
23902    function updateUI(theme) {
23903
23904        const isDark = theme === 'dark';
23905
23906
23907        /*
23908        |--------------------------------------------------------------------------
23909        | Desktop pill
23910        |--------------------------------------------------------------------------
23911        */
23912
23913        if (segmented) {
23914
23915            segmented.setAttribute(
23916                'data-active',
23917                theme
23918            );
23919        }
23920
23921
23922        if (btnLight) {
23923
23924            btnLight.classList.toggle(
23925                'active',
23926                !isDark
23927            );
23928        }
23929
23930
23931        if (btnDark) {
23932
23933            btnDark.classList.toggle(
23934                'active',
23935                isDark
23936            );
23937        }
23938
23939
23940        /*
23941        |--------------------------------------------------------------------------
23942        | Mobile switches
23943        |--------------------------------------------------------------------------
23944        */
23945
23946        if (switchLight && switchNight) {
23947
23948            switchLight.classList.toggle(
23949                'on',
23950                !isDark
23951            );
23952
23953            switchNight.classList.toggle(
23954                'on',
23955                isDark
23956            );
23957        }
23958    }
23959
23960
23961    /*
23962    |--------------------------------------------------------------------------
23963    | INIT
23964    |--------------------------------------------------------------------------
23965    |
23966    | Priority:
23967    |
23968    | 1. Cookie
23969    | 2. localStorage
23970    | 3. Dark
23971    |
23972    |--------------------------------------------------------------------------
23973    */
23974
23975    let initialTheme = null;
23976
23977
23978    /*
23979    |--------------------------------------------------------------------------
23980    | 1. Check PHP Cookie
23981    |--------------------------------------------------------------------------
23982    */
23983
23984    if (
23985        cookieBodyClass === 'light-mode' ||
23986        cookieBodyClass === 'dark-mode'
23987    ) {
23988
23989        initialTheme = classToTheme(
23990            cookieBodyClass
23991        );
23992    }
23993
23994
23995    /*
23996    |--------------------------------------------------------------------------
23997    | 2. If cookie doesn't exist, check localStorage
23998    |--------------------------------------------------------------------------
23999    */
24000
24001    if (!initialTheme) {
24002
24003        const saved = localStorage.getItem(
24004            STORAGE_KEY
24005        );
24006
24007        if (
24008            saved === 'light' ||
24009            saved === 'dark'
24010        ) {
24011
24012            initialTheme = saved;
24013        }
24014    }
24015
24016
24017    /*
24018    |--------------------------------------------------------------------------
24019    | 3. Default = Dark
24020    |--------------------------------------------------------------------------
24021    */
24022
24023    if (!initialTheme) {
24024
24025        initialTheme = 'dark';
24026    }
24027
24028
24029    /*
24030    |--------------------------------------------------------------------------
24031    | Apply initial theme
24032    |--------------------------------------------------------------------------
24033    */
24034
24035    applyTheme(initialTheme);
24036
24037
24038    /*
24039    |--------------------------------------------------------------------------
24040    | Desktop events
24041    |--------------------------------------------------------------------------
24042    */
24043
24044    if (btnLight) {
24045
24046        btnLight.addEventListener(
24047            'click',
24048            function () {
24049
24050                applyTheme('light');
24051
24052            }
24053        );
24054    }
24055
24056
24057    if (btnDark) {
24058
24059        btnDark.addEventListener(
24060            'click',
24061            function () {
24062
24063                applyTheme('dark');
24064
24065            }
24066        );
24067    }
24068
24069
24070    /*
24071    |--------------------------------------------------------------------------
24072    | Mobile events
24073    |--------------------------------------------------------------------------
24074    */
24075
24076    if (switchLight) {
24077
24078        switchLight.addEventListener(
24079            'click',
24080            function () {
24081
24082                applyTheme('light');
24083
24084            }
24085        );
24086    }
24087
24088
24089    if (switchNight) {
24090
24091        switchNight.addEventListener(
24092            'click',
24093            function () {
24094
24095                applyTheme('dark');
24096
24097            }
24098        );
24099    }
24100
24101});
24102
24103</script>
24103
24104
24105<!-- SEARCH DISPLAY -->
24106
24107
24108<script>
24109    
24110    let selectedSearchIndex = -1;
24111
24112    // BEFORE SEARCH
24113
24114    function getSearchHistory(){
24115        $.ajax({
24116            url: "https://www.jumpspree.com/searchHistory",
24117            type: "GET",
24118            dataType: "json",
24119            beforeSend: function() {
24120                console.log("Search Request started...");
24121            },
24122            success: function(response) {
24123                console.log(response);
24124
24125                if(!response.status){
24126                    return;
24127                }
24128
24129                appendSearchHistory(response.history);
24130
24131            },
24132            error: function(xhr, status, error) {
24133                console.error(error);
24134            },
24135            complete: function(xhr, status) {
24136                console.log("Search Request completed:", status);
24137            }
24138        });
24139    }
24140
24141    function appendSearchHistory(history){
24142        const searchHistoryTemplate = `           
24143            ${
24144                history && history.length > 0
24145                    ? `
24146                        <ul>
24147                            ${history.map(h => `
24148                                <li>
24149                                    <div onclick="getSearchResults('${h.search_key}')">
24150                                        ${h.search_key}
24151                                    </div>
24152                                </li>
24153                            `).join('')}
24154                        </ul>
24155                    `
24156                    : ''
24157            }         
24158        `;
24159
24160        if(history && history.length > 0){
24161            $('#search-history-results').html(searchHistoryTemplate);
24162            $('#search-history-div').show();
24163            $('#search-popup-wrapper-new').addClass('history-added');
24164        }else{
24165            $('#search-history-div').hide();
24166            $('#search-popup-wrapper-new').removeClass('history-added');
24167        }
24168        
24169    }
24170
24171    function deleteAllSearch(){
24172        $.ajax({
24173            url: 'https://www.jumpspree.com/removeAllSearches',
24174            method: 'POST',
24175            dataType: 'json',
24176            success: function(response) {
24177                $('#search-history-div').hide();
24178                $('#search-popup-wrapper-new').removeClass('history-added');
24179            },
24180            error: function(xhr) {
24181                console.log('can;t delete');
24182            }
24183        });
24184    }
24185
24186    function debounceSearch(fn, delay) {
24187        let timeoutId;
24188        return function(...args) {
24189            clearTimeout(timeoutId);
24190            timeoutId = setTimeout(() => {
24191                fn.apply(this, args);
24192            }, delay);
24193        };
24194    }
24195
24196    function handleSearch() {
24197        selectedSearchIndex = -1;
24198        let query = $('#search-main-input').val().trim();
24199
24200        if (query.length === 0) {
24201            $('#search-suggestion-list').hide();
24202            $('#search-suggestion-list-ul').empty();
24203            return;
24204        }
24205
24206        $.ajax({
24207            url: 'https://www.jumpspree.com/getSearchSuggestions', //  base_url
24208            method: 'GET',
24209            dataType: 'json',
24210            data: {
24211                query: query
24212            },
24213            success: function(response) {
24214                let list = $('#search-suggestion-list-ul');
24215                list.empty();
24216
24217                if (response) {
24218                    let hasResults = false;
24219                    let count = 0;
24220
24221                    for (let key in response) {
24222                        if (response.hasOwnProperty(key)) {
24223                            if (count >= 8) break;
24224                            list.append('<li><a href="#" class="search-item">' + key + '</a></li>');
24225                            hasResults = true;
24226                            count++;
24227                        }
24228                    }
24229
24230                    if (hasResults) {
24231                        $('#search-suggestion-list').show();
24232                    } else {
24233                        $('#search-suggestion-list').hide();
24234                    }
24235                } else {
24236                    $('#search-suggestion-list').hide();
24237                }
24238            },
24239            error: function(xhr) {
24240                console.log('No search');
24241            }
24242        });
24243    }
24244
24245    $(document).ready(function() {
24246
24247        $('#search-main-input').on('input', debounceSearch(handleSearch, 500));
24248
24249        $('#search-suggestion-list').on('click', 'a.search-item', function(e) {
24250            e.preventDefault();
24251
24252            const clickedText = $(this).text();
24253            getSearchResults(clickedText);
24254        });
24255
24256
24257        $('#search-main-input').on('keydown', function (e) {
24258
24259            const $items = $('#search-suggestion-list li');
24260
24261            // Arrow Down
24262            if (e.key === 'ArrowDown') {
24263                e.preventDefault();
24264
24265                if (!$items.length) return;
24266
24267                selectedSearchIndex++;
24268
24269                if (selectedSearchIndex >= $items.length) {
24270                    selectedSearchIndex = 0;
24271                }
24272
24273                $items.removeClass('active');
24274                $items.eq(selectedSearchIndex).addClass('active');
24275
24276                // Put selected suggestion into input
24277                $(this).val($items.eq(selectedSearchIndex).text().trim());
24278            }
24279
24280            // Arrow Up
24281            else if (e.key === 'ArrowUp') {
24282                e.preventDefault();
24283
24284                if (!$items.length) return;
24285
24286                selectedSearchIndex--;
24287
24288                if (selectedSearchIndex < 0) {
24289                    selectedSearchIndex = $items.length - 1;
24290                }
24291
24292                $items.removeClass('active');
24293                $items.eq(selectedSearchIndex).addClass('active');
24294
24295                $(this).val($items.eq(selectedSearchIndex).text().trim());
24296            }
24297
24298            // Enter
24299            else if (e.key === 'Enter') {
24300                e.preventDefault();
24301
24302                if (selectedSearchIndex >= 0) {
24303                    $items.eq(selectedSearchIndex).find('a')[0].click();
24304                }else{
24305                    const inp = $(this).val().trim();
24306                    getSearchResults(inp);
24307                }
24308            }
24309
24310            // Escape
24311            else if (e.key === 'Escape') {
24312                $('#search-suggestion-list').hide();
24313                selectedSearchIndex = -1;
24314            }
24315        });
24316
24317
24318        getSearchHistory();
24319
24320    });
24321
24322
24323    // AFTER SEARCH
24324
24325    function setSearchFilter(type){
24326        let filterValue = $('#ctg-filter').data('filter');
24327
24328        if (filterValue === type) {
24329            return;
24330        }
24331
24332        let activeCategory = document.querySelector('.ctg.active')?.textContent || '';
24333
24334        $('#ctg-filter').data('filter', type);
24335
24336        let $recentSpan = $('#recent-filter a > span');
24337        let $relevanceSpan = $('#relevance-filter a > span');
24338
24339       if (type === 'recent') {
24340            if ($recentSpan.find('i.fa-check').length === 0) {
24341                $recentSpan.append(' <i class="fa-solid fa-check"></i>');
24342            }
24343            $relevanceSpan.find('i.fa-check').remove();
24344
24345        } else if (type === 'relevance') {
24346            if ($relevanceSpan.find('i.fa-check').length === 0) {
24347                $relevanceSpan.append(' <i class="fa-solid fa-check"></i>');
24348            }
24349            $recentSpan.find('i.fa-check').remove();
24350        }
24351
24352        let tabsToHide = [];
24353
24354        if(type === "recent"){
24355            tabsToHide = ['#tab-products', '#tab-articles', '#tab-people', '#tab-posts', '#tab-brands'];
24356
24357        }else if(type=="relevance"){
24358            tabsToHide = ['#tab-products-recent', '#tab-articles-recent', '#tab-people-recent', '#tab-posts-recent', '#tab-brands'];
24359        
24360        }
24361
24362        // Hide original tabs
24363        tabsToHide.forEach(selector => {
24364            $(selector).hide();
24365        });
24366
24367        let targetId = `tab-${activeCategory.toLowerCase()}`;
24368        if(type==="recent"){
24369            targetId = `tab-${activeCategory.toLowerCase()}-recent`;
24370        }
24371
24372        const targetDiv = document.getElementById(targetId);
24373        if (targetDiv) {
24374            targetDiv.style.display = 'block';
24375        } else {
24376            console.warn("No content found for category:", targetId);
24377        }
24378        
24379    
24380    }
24381
24382    function setSearchActiveCategory(button) {
24383        let filterValue = $('#ctg-filter').data('filter');
24384
24385        let activeCategory = document.querySelector('.ctg.active')?.textContent || '';
24386
24387        let selectedCategory = button.textContent.trim();
24388
24389        if (selectedCategory === activeCategory) return;
24390
24391        document.querySelectorAll('.ctg').forEach(btn => btn.classList.remove('active'));
24392        button.classList.add('active');
24393
24394        activeCategory = selectedCategory;
24395        console.log("Active category changed to:", activeCategory);
24396
24397        document.querySelectorAll('.ctg-content').forEach(div => {
24398            div.style.display = 'none';
24399        });
24400
24401        // Show the selected category's content
24402        let targetId = `tab-${selectedCategory.toLowerCase()}`;
24403        if(filterValue==="recent"){
24404            targetId = `tab-${selectedCategory.toLowerCase()}-recent`;
24405        }
24406
24407        const targetDiv = document.getElementById(targetId);
24408        if (targetDiv) {
24409            targetDiv.style.display = 'block';
24410        } else {
24411            console.warn("No content found for category:", targetId);
24412        }
24413       
24414    }
24415
24416    function getSearchResults(text){
24417
24418        if(!text || text.length === 0){
24419            return;
24420        }
24421
24422        $('#search-popup-wrapper, #search-suggestion-list').hide();
24423
24424        $('#search-entry h3').text(text);
24425        $('#search-popup-wrapper-new').addClass('search-res-visible');
24426        $('#search-entry').show();
24427
24428        $.ajax({
24429            url: "https://www.jumpspree.com/searchResults",
24430            type: "GET",
24431            data: {
24432                input: text
24433            },
24434            dataType: "json",
24435            beforeSend: function() {
24436                console.log("Request started...");
24437                $('#search-results .ctg-content')
24438                    .empty()
24439                    .html('<div style="height: 350px; display: flex; align-items: center; justify-content: center;"><span class="jloader"></span></div>');
24440            },
24441            success: function(response) {
24442                console.log(response);
24443
24444                if(!response.status){
24445                    console.log('Failed to load the results...');
24446                    return;
24447                }
24448
24449                appendSearchResults(response.data);
24450
24451            },
24452            error: function(xhr, status, error) {
24453                console.error(error);
24454            },
24455            complete: function(xhr, status) {
24456                console.log("Request completed:", status);
24457                selectedSearchIndex = -1;
24458            }
24459        });
24460    }
24461
24462    function appendSearchResults(data){
24463        const searchResults = data.searchResults;
24464        const sortedSearchResults = data.sortedSearchResults;
24465
24466        if(!searchResults){
24467            return;
24468        }
24469
24470        $('.ctg[data-tab="Posts"]').click();
24471
24472        $('#tab-posts').html(renderSearchResults(Object.values(searchResults.posts), 'post'));
24473        $('#tab-posts-recent').html(renderSearchResults(sortedSearchResults.posts, 'post'));
24474
24475        $('#tab-people').html(renderSearchResults(searchResults.profiles, 'profile'));
24476        $('#tab-people-recent').html(renderSearchResults(sortedSearchResults.profiles, 'profile'));
24477
24478        $('#tab-articles').html(renderSearchResults(Object.values(searchResults.articles), 'article'));
24479        $('#tab-articles-recent').html(renderSearchResults(sortedSearchResults.articles, 'article'));
24480
24481        $('#tab-products').html(renderSearchResults(searchResults.products, 'product'));
24482        $('#tab-products-recent').html(renderSearchResults(sortedSearchResults.products, 'product'));
24483
24484        // $('#tab-brands').html(renderSearchResults(searchResults.products, 'brand'));
24485        // $('#tab-brands-recent').html(renderSearchResults(sortedSearchResults.products, 'brand'));
24486        
24487    }
24488
24489    function renderSearchResults(results, type) {
24490        if (!results || results.length === 0) {
24491            return renderNoResults(type);
24492        }
24493
24494        if(type === 'post'){
24495            $('#tab-posts, #tab-posts-recent').removeClass('no-results');
24496        }else if(type === 'profile'){
24497            $('#tab-people, #tab-people-recent').removeClass('no-results');
24498        }else if(type === 'article'){
24499            $('#tab-articles, #tab-articles-recent').removeClass('no-results');
24500        }else if(type === 'product'){
24501            $('#tab-products, #tab-products-recent').removeClass('no-results');
24502        }else if(type === 'brand'){
24503            $('#tab-brands, #tab-brands-recent').removeClass('no-results');
24504        }
24505
24506
24507        const renderers = {
24508            post: renderSearchPost,
24509            profile: renderSearchProfile,
24510            article: renderSearchArticle,
24511            product: renderSearchProduct
24512        };
24513
24514        const renderer = renderers[type];
24515
24516        if (!renderer) {
24517            console.error(`Unknown result type: ${type}`);
24518            return '';
24519        }
24520
24521        return results.map(renderer).join('');
24522    }
24523
24524    function renderNoResults(type){
24525
24526        let msg = 'results';
24527        if(type === 'post'){
24528            msg = 'posts';
24529            $('#tab-posts, #tab-posts-recent').addClass('no-results');
24530        }else if(type === 'profile'){
24531            msg = 'profiles';
24532            $('#tab-people, #tab-people-recent').addClass('no-results');
24533        }else if(type === 'article'){
24534            msg = 'articles';
24535            $('#tab-articles, #tab-articles-recent').addClass('no-results');
24536        }else if(type === 'product'){
24537            msg = 'products';
24538            $('#tab-products, #tab-products-recent').addClass('no-results');
24539        }else if(type === 'brand'){
24540            msg = 'brands';
24541            $('#tab-brands, #tab-brands-recent').addClass('no-results');
24542        }
24543
24544
24545        return `
24546            <div class="no-results" style="height: 363px; display: flex; align-items: center; justify-content: center;">
24547                <p style="color: white;">
24548                    No ${msg} found
24549                </p>
24550            </div>
24551        `;
24552    }
24553
24554
24555    function renderSearchPost(p) {
24556
24557        const username = p.username || '';
24558        const postId = p.id || '';
24559        const postText = p.post || '';
24560        const profilePhoto = p.profile_photo || '';
24561
24562        const postUrl = `https://www.jumpspree.com/ps/${encodeURIComponent(username)}/jumpid${postId}`;
24563
24564        const profileUrl = `https://www.jumpspree.com/${encodeURIComponent(username)}`;
24565
24566        const avatar = profilePhoto
24567            ? `
24568                <img
24569                    src="${escapeHtml(profilePhoto)}"
24570                    style="border-radius:50%"
24571                    alt="Profile Photo"
24572                >
24573            `
24574            : `
24575                <div class="avatar-placeholder">
24576                    ${escapeHtml(username.charAt(0).toUpperCase())}
24577                </div>
24578            `;
24579
24580        const verified = p.is_verified == '1'
24581            ? `
24582                <img
24583                    src="https://www.jumpspree.com/public/images/blue-cube.png"
24584                    class="blue-cube-icon"
24585                    alt="Verified Icon"
24586                >
24587            `
24588            : '';
24589
24590        const media = renderPostMedia(p.files);
24591
24592        const textFlex = media ? '85%' : '100%';
24593
24594        return `
24595            <div class="postdiv" style=" margin: 10px; background-color: #171717; border-radius: 20px; padding: 10px; padding-bottom: 0; padding-top: 0;" onclick="window.location.href='${postUrl}'">
24596
24597                <div class="row user-sec-strip2">
24598                    <div class="col-md-12">
24599
24600                        <div class="fnc mt-0 justify-content-between mb-1 align-items-start">
24601
24602                            <div class="d-flex align-items-center">
24603
24604                                <a href="${profileUrl}" class="fig">
24605
24606                                    <div class="online-green"></div>
24607
24608                                    ${avatar}
24609
24610                                </a>
24611
24612                                <div class="fnc-title">
24613                                    <h4>
24614
24615                                        <a href="${profileUrl}" class="profile-link">
24616                                            @${username}
24617                                        </a>
24618
24619                                        ${verified}
24620
24621                                    </h4>
24622                                </div>
24623
24624                            </div>
24625
24626                        </div>
24627
24628                    </div>
24629                </div>
24630
24631                <div class="row" style="cursor: pointer;">
24632                    <div class="col-md-12" style="padding-bottom: 20px;">
24633
24634                        <div class="post-text" style="display: flex; align-items: center; gap: 5px;">
24635
24636                            <a href="${postUrl}" style=" flex: 0 0 ${textFlex}; display: flex; align-items: center; text-decoration: none;">
24637                                <p style="align-self: center; margin: 0; cursor: pointer;">
24638                                    ${escapeHtml(postText)}
24639                                </p>
24640                            </a>
24641
24642                            ${media}
24643
24644                        </div>
24645
24646                    </div>
24647                </div>
24648
24649            </div>
24650        `;
24651    }
24652
24653    function renderPostMedia(files) {
24654
24655        if (!files || files.length === 0) {
24656            return '';
24657        }
24658
24659        const file = files[0];
24660
24661        if (!file?.url) {
24662            return '';
24663        }
24664
24665        const url = escapeHtml(file.url);
24666
24667        if (file.type == '1' || file.type == '3') {
24668
24669            return `
24670                <div class="post-img" style="flex: 0 0 15%; max-width: 80px;">
24671                    <img src="${url}" style="width: 80px; height: 70px; object-fit: cover; border-radius: 4px; display: block;">
24672                </div>
24673            `;
24674        }
24675
24676        if (file.type == '2') {
24677
24678            return `
24679                <div class="post-img" style="flex: 0 0 15%; max-width: 80px;">
24680                    <video src="${url}" style="width: 80px;height: 70px;object-fit: cover;border-radius: 4px;display: block;">
24681                        Your browser does not support the video tag.
24682                    </video>
24683                </div>
24684            `;
24685        }
24686
24687        return '';
24688    }
24689
24690    function renderSearchProfile(p) {
24691
24692        const username = p.username || '';
24693
24694        if (!username) {
24695            return '';
24696        }
24697
24698        const profileUrl = `https://www.jumpspree.com/${encodeURIComponent(username)}`;
24699
24700        const avatar = p.profile_photo
24701            ? `
24702                <img src="${escapeHtml(p.profile_photo)}" style="border-radius:50%" alt="Profile Photo">
24703            `
24704            : `
24705                <div class="avatar-placeholder">
24706                    ${escapeHtml(username.charAt(0).toUpperCase())}
24707                </div>
24708            `;
24709
24710        const verified = p.is_verified == '1'
24711            ? `
24712                <img src="https://www.jumpspree.com/public/images/blue-cube.png" class="blue-cube-icon" alt="Verified Icon">
24713            `
24714            : '';
24715
24716        return `
24717            <div class="postdiv" style="margin: 10px;background-color: #171717;border-radius: 20px;padding: 10px;padding-bottom: 20px; padding-top: 11px; cursor: pointer;" onclick="window.location.href='${profileUrl}'">
24718                <div class="row user-sec-strip2" style="width: 100%;">
24719                    <div class="col-md-12">
24720
24721                        <div class="fnc mt-0 justify-content-between mb-1 pt-3 align-items-start" style="padding-left:15px;">
24722
24723                            <div class="d-flex align-items-center">
24724
24725                                <a href="${profileUrl}" class="fig">
24726
24727                                    <div class="online-green"></div>
24728
24729                                    ${avatar}
24730
24731                                </a>
24732
24733                                <div class="fnc-title">
24734                                    <h4>
24735                                        <a href="${profileUrl}" class="profile-link">
24736                                            @${escapeHtml(username)}
24737                                        </a>
24738
24739                                        ${verified}
24740                                    </h4>
24741                                </div>
24742
24743                            </div>
24744
24745                        </div>
24746
24747                    </div>
24748                </div>
24749            </div>
24750        `;
24751    }
24752
24753    function renderSearchArticle(p) {
24754
24755        const username = p.username || '';
24756        const title = p.title || '';
24757        const postId = p.id || '';
24758
24759        const postUrl = `https://www.jumpspree.com/ps/${encodeURIComponent(username)}/jumpid${postId}`;
24760
24761        const profileUrl = `https://www.jumpspree.com/${encodeURIComponent(username)}`;
24762
24763        const profilePhoto = p.profile_photo ? escapeHtml(p.profile_photo) : 'https://www.jumpspree.com/public/images/user-icon.png';
24764
24765        const verified = p.is_verified == '1'
24766            ? `
24767                <img
24768                    src="https://www.jumpspree.com/public/images/blue-cube.png"
24769                    class="blue-cube-icon"
24770                    alt="Verified Icon"
24771                >
24772            `
24773            : '';
24774
24775        const media = renderPostMedia(p.files);
24776
24777        const textFlex = media ? '85%' : '100%';
24778
24779        return `
24780            <div class="postdiv"
24781                style="
24782                    margin: 10px;
24783                    background-color: #171717;
24784                    border-radius: 20px;
24785                    padding: 10px;
24786                    padding-bottom: 20px;
24787                " onclick="window.location.href='${postUrl}'">
24788
24789                <div class="row user-sec-strip2">
24790
24791                    <div class="col-md-12">
24792
24793                        <div class="fnc mt-0 justify-content-between mb-1 align-items-start">
24794
24795                            <div class="d-flex align-items-center">
24796
24797                                <a href="${profileUrl}" class="fig">
24798
24799                                    <div class="online-green"></div>
24800
24801                                    <img src="${profilePhoto}" style="border-radius:50%" alt="Profile Photo">
24802
24803                                </a>
24804
24805                                <div class="fnc-title">
24806
24807                                    <h4>
24808                                        <a href="${profileUrl}" class="profile-link">
24809                                            @${escapeHtml(username)}
24810                                        </a>
24811
24812                                        ${verified}
24813                                    </h4>
24814
24815                                </div>
24816
24817                            </div>
24818
24819                        </div>
24820
24821                    </div>
24822
24823                </div>
24824
24825                <div class="row">
24826
24827                    <div class="col-md-12" style="padding-bottom: 0px;">
24828
24829                        <div class="post-text" style="display: flex; align-items: start; gap: 5px;">
24830
24831                            <a href="${postUrl}"
24832                                style="
24833                                    flex: 0 0 ${textFlex};
24834                                    display: flex;
24835                                    align-items: center;
24836                                    text-decoration: none;
24837                                ">
24838                                <p style="align-self: center; margin: 0;cursor: pointer;">
24839                                    ${escapeHtml(title)}
24840                                </p>
24841                            </a>
24842
24843                            ${media}
24844
24845                        </div>
24846                    </div>
24847                </div>
24848            </div>
24849        `;
24850    }
24851
24852    function renderSearchProduct(p) {
24853
24854        const productId = p.id || '';
24855        const productTitle = p.producttitle || '';
24856        const imagePath = p.imagepath || '';
24857
24858        const price = p.discountedprice
24859            ? p.discountedprice
24860            : p.sellingprice;
24861
24862        // Same slug logic as:
24863        // preg_replace('/[\/\s#?]+/', '-', $p['producttitle'])
24864        const slug = productTitle.replace(/[\/\s#?]+/g, '-');
24865
24866        const productUrl = `https://www.jumpspree.com/p/${encodeURIComponent(slug)}/${productId}`;
24867
24868        const image = imagePath
24869            ? `
24870                <div class="post-img" style="flex: 0 0 20%; max-width: 90px;">
24871                    <img src="${escapeHtml(imagePath)}"
24872                        style="
24873                            width: 90px;
24874                            height: 90px;
24875                            object-fit: cover;
24876                            border-radius: 4px;
24877                            display: block;
24878                        "
24879                        alt="${escapeHtml(productTitle)}">
24880                </div>
24881            `
24882            : '';
24883
24884        const textFlex = imagePath ? '80%' : '100%';
24885
24886        return `
24887            <div class="postdiv"
24888                style="
24889                    margin: 10px;
24890                    background-color: #171717;
24891                    border-radius: 20px;
24892                    padding: 10px;
24893                    padding-bottom: 20px;
24894                    padding-top: 20px;
24895                "
24896                onclick="window.location.href='${productUrl}'">
24897
24898                <div class="row">
24899
24900                    <div class="col-md-12">
24901
24902                        <div class="post-text" style="display: flex; align-items: center; gap: 20px;">
24903
24904                            ${image}
24905
24906                            <a href="${productUrl}" style="flex: 0 0 ${textFlex};display: flex;flex-direction: column;text-decoration: none;">
24907
24908                                <p class="product-title" style="margin: 0; cursor: pointer;">
24909                                    ${escapeHtml(productTitle)}
24910                                </p>
24911
24912                                <p style="margin-bottom: 0;">
24913                                    $${escapeHtml(price)}
24914                                </p>
24915
24916                            </a>
24917
24918                        </div>
24919                    </div>
24920                </div>
24921            </div>
24922        `;
24923    }
24924
24925    function escapeHtml(value) {
24926        return String(value ?? '')
24927            .replace(/&/g, '&amp;')
24928            .replace(/</g, '&lt;')
24929            .replace(/>/g, '&gt;')
24930            .replace(/"/g, '&quot;')
24931            .replace(/'/g, '&#039;');
24932    }
24933</script>
24933
24934
24935<!-- BUG REPORT -->
24936<script>
24937    let bugReportFiles = [];
24938    let bugReportFileId = 0;
24939
24940    /*
24941    |--------------------------------------------------------------------------
24942    | Select files
24943    |--------------------------------------------------------------------------
24944    */
24945    $('#attachmentForReport').on('change', function () {
24946
24947        const selectedFiles = Array.from(this.files);
24948
24949        let addedCount = 0;
24950        let limitReached = false;
24951
24952        selectedFiles.forEach(function (file) {
24953
24954            // Check duplicate
24955            const exists = bugReportFiles.some(function (item) {
24956
24957                return item.file.name === file.name &&
24958                    item.file.size === file.size &&
24959                    item.file.lastModified === file.lastModified;
24960
24961            });
24962
24963            if (exists) {
24964                return;
24965            }
24966
24967            // Check maximum
24968            if (bugReportFiles.length >= 10) {
24969                limitReached = true;
24970                return;
24971            }
24972
24973            bugReportFiles.push({
24974                id: bugReportFileId++,
24975                file: file
24976            });
24977
24978            addedCount++;
24979        });
24980
24981        if (limitReached) {
24982            showNotification('error', 'Maximum 10 files are allowed.');
24983        }
24984
24985        renderBugReportFiles();
24986
24987        // Reset input
24988        $(this).val('');
24989    });
24990
24991
24992    /*
24993    |--------------------------------------------------------------------------
24994    | Render attachment previews
24995    |--------------------------------------------------------------------------
24996    */
24997    function renderBugReportFiles(){
24998        const container = $('#attachment-preview-container');
24999        const preview = $('#attachment-preview-inner');
25000
25001        preview.empty();
25002
25003        if (bugReportFiles.length === 0) {
25004            container.hide();
25005            return;
25006        }
25007
25008        container.show();
25009
25010        bugReportFiles.forEach(function (item) {
25011
25012            const file = item.file;
25013
25014            const fileUrl = URL.createObjectURL(file);
25015
25016            let content = '';
25017
25018            /*
25019            |--------------------------------------------------------------------------
25020            | Image
25021            |--------------------------------------------------------------------------
25022            */
25023            if (file.type.startsWith('image/')) {
25024
25025                content = `
25026                    <img
25027                        src="${fileUrl}"
25028                        alt="${escapeDivHtml(file.name)}"
25029                    >
25030                `;
25031
25032            /*
25033            |--------------------------------------------------------------------------
25034            | Video
25035            |--------------------------------------------------------------------------
25036            */
25037            } else if (file.type.startsWith('video/')) {
25038
25039                content = `
25040                    <video
25041                        src="${fileUrl}"
25042                        controls
25043                        preload="metadata">
25044                    </video>
25045                `;
25046
25047            /*
25048            |--------------------------------------------------------------------------
25049            | PDF / Other supported file
25050            |--------------------------------------------------------------------------
25051            */
25052            } else {
25053
25054                content = `
25055                    <div class="file-preview">
25056                        <span>📄</span>
25057                    </div>
25058                `;
25059            }
25060
25061
25062            preview.append(`
25063                <div class="attachment-item" data-id="${item.id}" style="position:relative;">
25064
25065                    <div class="attachment-preview">
25066                        ${content}
25067                    </div>
25068
25069                    <button type="button" class="remove-report-attachment" data-id="${item.id}">
25070                        <img src="https://www.jumpspree.com/public/images/cross-icon.png" alt="Cross" title="Cross">
25071                    </button>
25072
25073                </div>
25074            `);
25075        });
25076    }
25077
25078
25079    /*
25080    |--------------------------------------------------------------------------
25081    | Remove attachment
25082    |--------------------------------------------------------------------------
25083    */
25084    $('#attachment-preview-container').on('click', '.remove-report-attachment', function () {
25085
25086        const id = Number($(this).attr('data-id'));
25087
25088        bugReportFiles = bugReportFiles.filter(function (item) {
25089            return item.id !== id;
25090        });
25091
25092        console.log(id);
25093
25094        renderBugReportFiles();
25095    });
25096
25097
25098    /*
25099    |--------------------------------------------------------------------------
25100    | Send bug report
25101    |--------------------------------------------------------------------------
25102    */
25103    $('#sendReport').on('click', function () {
25104
25105        const subject = $('#bug-report-title').val().trim();
25106        const message = $('#problem_text').val().trim();
25107        
25108        if (!subject) {
25109            showNotification('error' ,'Please enter a title.');
25110            return;
25111        }
25112
25113        if (!message) {
25114            showNotification('error' ,'Please enter a description.');
25115            return;
25116        }
25117
25118
25119        const formData = new FormData();
25120
25121        formData.append('subject', subject);
25122        formData.append('message', message);
25123
25124        bugReportFiles.forEach(function (item) {
25125            formData.append('files[]', item.file);
25126        });
25127
25128
25129        $.ajax({
25130
25131            url: "https://www.jumpspree.com/createBugReport",
25132            type: 'POST',
25133            data: formData,
25134            processData: false,
25135            contentType: false,
25136            beforeSend: function () {
25137                $('#sendReport').prop('disabled', true).text('Sending...');
25138            },
25139            success: function (response) {
25140
25141                if (response.status) {
25142
25143                    /*
25144                    |--------------------------------------------------------------------------
25145                    | Clear everything after successful submission
25146                    |--------------------------------------------------------------------------
25147                    */
25148
25149                    bugReportFiles = [];
25150                    bugReportFileId = 0;
25151                    renderBugReportFiles();
25152                    $('#bug-report-title').val('');
25153                    $('#problem_text').val('');
25154                    $('#attachmentForReport').val('');
25155                    $('#report-on-more-option').fadeOut('fast');
25156
25157                    showNotification('success' , 'Bug reported succesfully');
25158
25159                } else {
25160                    showNotification('error' , response.message);
25161                }
25162            },
25163
25164            error: function (xhr) {
25165                showNotification('error' , 'Unable to submit bug report');
25166            },
25167
25168            complete: function () {
25169                $('#sendReport').prop('disabled', false).text('Send');
25170            }
25171
25172        });
25173    });
25174
25175
25176    function escapeDivHtml(value){
25177        return $('<div>').text(value).html();
25178    }
25179
25180    $('#problem_text').on('input', function() {
25181        const isEmpty = $(this).val().trim() === '';
25182        const $sendBtn = $('#sendReport');
25183
25184        $sendBtn.prop('disabled', isEmpty);
25185
25186        if (isEmpty) {
25187            $sendBtn.removeClass('btnisenable').addClass('btnisdisable');
25188        } else {
25189            $sendBtn.removeClass('btnisdisable').addClass('btnisenable');
25190        }
25191    });
25192
25193
25194
25195</script>
25195<!-- Footer code END --> 
25196
25197
25198<div id="download-app-popup" style="display:none;background:url('https://www.jumpspree.com/public/images/app-dwnload-bg.jpg')">
25199<style>
25200body.dark-mode .get-app-qr-code-wrapper {
25201    backdrop-filter: blur(30px);
25202}    
25203</style>
25204    <div id="download-app-popup-inner">
25205<div class="close-getstart" style="color:#fff;right: 20px;top: 0px;" onclick="$('#download-app-popup').fadeOut('fast');$('body').removeClass('overflow-hidden'); $('.left_section').show();">&times;</div>
25206       
25207       <h2>Experience Jumpspree <br>to the fullest.</h2>
25208       <p>Access all the good stuff: Premium social and shop feeds, online shopping, post editing, articles, dynamic profile, and more!</p>
25209         <div class="download-btns">
25210             <a href="javascript:void(0)" onclick="$('#ios-app').fadeIn('fast')"><img src="https://www.jumpspree.com/public/images/apple-icons.png" width="20" alt="Apple Store" title="Apple Store"> App Store</a>
25211             <a href="javascript:void(0)" onclick="$('#android-app').fadeIn('fast')"><img src="https://www.jumpspree.com/public/images/android-icon.png" width="20" alt="Play Store" title="Play Store link"> Play Store</a>
25212         </div>
25213        <div class="ss hide-on-mob"><img src="https://www.jumpspree.com/public/images/mob-popup.png" alt="Graphic" title="Graphic" loading="lazy"></div> 
25214        <div class="ss hide-on-desktop"><img src="https://www.jumpspree.com/public/images/mob-full-image.png" alt="Graphic" title="Graphic" loading="lazy"></div> 
25215    </div>
25216</div>
25217
25218
25219<script>
25220   // Copy the share URL to the clipboard
25221function copyLink(event) {
25222    event.preventDefault(); // Prevent the default link behavior
25223
25224    // Define the shareable link
25225    const shareableLink = "https://www.jumpspree.com";
25226
25227    // Create a temporary input to copy the text
25228    const tempInput = document.createElement("input");
25229    document.body.appendChild(tempInput);
25230    tempInput.value = shareableLink;
25231    tempInput.select();
25232    tempInput.setSelectionRange(0, 99999); // For mobile devices
25233    document.execCommand("copy");
25234    document.body.removeChild(tempInput);
25235
25236    const successMsg = document.getElementById("copySuccessMsg");
25237    if (successMsg) {
25238        successMsg.style.display = "inline"; // Show the message
25239        setTimeout(() => {
25240            successMsg.style.display = "none";  
25241        }, 3000); // Adjust the timeout duration if needed
25242    }
25243
25244    // Provide feedback to the user
25245    //showNotification("success", "Link copied to clipboard!");
25246}
25247
25248// Refresh social feed
25249function refreshFeed(event) {
25250    event.preventDefault(); // Prevent the default link behavior
25251
25252    showNotification("success", "Feed refreshed");
25253    // Call the getSocialFeed function
25254    getSocialFeed('3', 1, '1', '');
25255}
25256 
25257
25258// Function to set active page when a tab is clicked
25259function setActivePage(pageType) {
25260    activePage = pageType;  // Set the active page to either 'social' or 'shop'
25261    page = 1; // Reset page count when switching tabs
25262    maxReached = false; // Reset flag when switching tabs
25263    // Optionally clear existing posts
25264    if (pageType === 'social') {
25265        $('#posts-container-shop').html(''); // Clear shop posts when switching to social
25266    } else if (pageType === 'shop') {
25267        $('#posts-container').html(''); // Clear social posts when switching to shop
25268    }
25269}
25270function decodeHTMLEntities(text) {
25271    var textarea = document.createElement('textarea');
25272    textarea.innerHTML = text;
25273    return textarea.value;
25274}
25275
25276function convertHashtagsToLinks_old(text) {
25277    // First, decode any HTML entities (like &#39;)
25278    text = decodeHTMLEntities(text);// this function os created bcz in text special characters like &#39; coming and our # tag logic wont work here so.
25279    
25280    // Then, convert hashtags to links
25281    return text.replace(/#(\w+)/g, function(match, tag) {
25282        return `<a href="javascript:void(0)" class="hashtag-link" onclick="getSocialFeed('3','1','1', '${tag}')" data-tag="${tag}">#${tag}</a>`;
25283    });
25284} 
25285
25286function convertHashtagsToLinks_movedtofooter(text) {
25287    // First, decode any HTML entities (like &#39;)
25288    text = decodeHTMLEntities(text);
25289
25290    // Regex pattern for URLs
25291    const urlRegex = /(https?:\/\/[^\s]+)/g;
25292
25293    // Replace URLs with <a> tags
25294    text = text.replace(urlRegex, function(match) {
25295        return `<a href="${match}" class="dynamicPostLink" target="_blank">${match}</a>`;
25296    });
25297
25298    // Convert hashtags to links
25299    text = text.replace(/#(\w+)/g, function(match, tag) {
25300        return `<a href="javascript:void(0)" class="hashtag-link" onclick="getSocialFeed('3','1','1', '${tag}')" data-tag="${tag}">#${tag}</a>`;
25301    });
25302
25303    return text;
25304}
25305 
25306/* function generateMediaContent(postFiles) {
25307    return postFiles.map(file => {
25308        if (file.type === "1") {
25309            return `<img src="${file.imagepath}" alt="Post Image" class="post-media">`;
25310        } else if (file.type === "3") {
25311            return `<img src="${file.imagepath}" alt="Post GIF" class="post-media">`;
25312        }
25313        return '';
25314    }).join('');
25315} */
25316
25317
25318 
25319
25320// Function to count YouTube links in the post text
25321function countYouTubeLinks(postText) {
25322    const youtubeRegex = /https?:\/\/(www\.)?(youtube\.com\/watch\?v=|youtu\.be\/)([a-zA-Z0-9_-]{11})/g;
25323    const matches = postText.match(youtubeRegex);
25324    return matches ? matches.length : 0;
25325}
25326
25327function extractUrls_old_5thJun(text) {
25328    // Remove <br> and other unwanted HTML tags from the text
25329    const sanitizedText = text.replace(/<br\s*\/?>/g, '').replace(/<[^>]+>/g, '');
25330    
25331    // Regular expression to match URLs
25332    const regex = /(https?:\/\/[^\s]+)/g;
25333    
25334    //console.log("comes 851");
25335    //console.log(sanitizedText);
25336    
25337    return sanitizedText.match(regex) || [];
25338}
25339//new 5 june 
25340function extractUrls(text) {
25341    // Replace <br> and newlines with spaces
25342    const sanitizedText = text
25343        .replace(/<br\s*\/?>/gi, ' ')
25344        .replace(/\r?\n|\r/g, ' ')
25345        .replace(/<[^>]+>/g, ''); // remove any other HTML tags
25346
25347    // Match URLs starting with http/https or www.
25348    const regex = /\b((https?:\/\/|www\.)[^\s<]+)/gi;
25349
25350    let matches = sanitizedText.match(regex) || [];
25351
25352    // Normalize all www. links to full https URLs
25353    matches = matches.map(url => {
25354        if (!url.startsWith('http')) {
25355            return 'https://' + url;
25356        }
25357        return url;
25358    });
25359
25360    return matches;
25361}
25362
25363
25364
25365  
25366// Helper function to truncate long text
25367function truncateText(text) {
25368    const maxLength = 150; // Customize the length as needed
25369    if (text.length > maxLength) {
25370        return text.substring(0, maxLength) + '...';
25371    }
25372    return text;
25373}
25374
25375// Helper function to generate media content
25376function generateMediaContent(postFiles, post, postIndex) {
25377    if (!postFiles || postFiles.length === 0) return '';
25378    const isFirstPost = (postIndex === 0);
25379
25380    let mediaHtml = '';
25381    postFiles.forEach((file, index) => {
25382        if (file.ext === 'image' || file.ext === 'gif' || file.ext === 'jpg' || file.ext === 'jpeg') {
25383            const lazyAttr  = (!isFirstPost || index > 0) ? ' loading="lazy"' : '';
25384            const prioAttr  = (isFirstPost && index === 0)  ? ' fetchpriority="high"' : '';
25385            mediaHtml += `
25386                <div class="item">
25387                    <a href="${file.imagepath}" data-sub-html="<div class='fnc-title'><h4>${post.userFullName}</h4><p>@${post.username}</p></div>">
25388                        <div style="aspect-ratio:4/3;background:#111;overflow:hidden;border-radius:8px;">
25389                            <img src="${file.imagepath}" alt="Image ${index + 1}" class="img-fluid"${lazyAttr}${prioAttr} style="width:100%;height:100%;object-fit:cover;">
25390                        </div>
25391                    </a>
25392                </div>
25393            `;
25394        } else if (file.ext === 'video') {
25395            mediaHtml += `
25396                <div class="item video-container" style="aspect-ratio:16/9;background:#111;border-radius:8px;overflow:hidden;">
25397                    <video controls class="img-fluid" style="width:100%;height:100%;object-fit:cover;">
25398                        <source src="${file.imagepath}" type="video/mp4">
25399                        Your browser does not support the video tag.
25400                    </video>
25401                </div>
25402            `;
25403        }
25404    });
25405
25406    return mediaHtml;
25407}
25408
25409function fetchLinkPreview(url, element) {
25410    $.getJSON('/fetch_link_preview.php?url=' + encodeURIComponent(url), function(data) {
25411        //console.log(data);
25412        if (data) {
25413            // Set the title, description, and image for the element
25414            $(element).find('.link-title p').text(data.title || url);
25415            $(element).find('.link-preview a').attr('href',  url);
25416            $(element).find('.link-description').text(data.description || 'No description available.');
25417            if (data.image) {
25418                $(element).find('.link-image').attr('src', data.image).show();
25419            } else {
25420                $(element).find('.link-image').hide();
25421            }
25422        } else {
25423            $(element).find('.link-text h4').text('No metadata found');
25424        }
25425    }).fail(function() {
25426        // In case of an error
25427        $(element).find('.link-text h4').text('Failed to load preview');
25428        $(element).find('.link-description').text('Could not fetch metadata.');
25429        $(element).find('.link-image').hide();
25430    });
25431}
25432
25433 
25434
25435</script>
25435
25436
25437
25438<!-- REMOVED 2026-05-15: duplicate DOMContentLoaded .link-preview.each() loop was dead code
25439     on the social page (feed posts are dynamic, no .link-preview in DOM at ready-time).
25440     The same loop in all-scripts.js still runs for static-page link previews.
25441     ROLLBACK: restore the 
25441<script>$(document).ready... block that was here. -->
25442
25443<script>
25444    $(window).scroll(function() {
25445    if ($(this).scrollTop() >= 1500) {
25446     //   $('#create-new-account-or-login').fadeIn('fast');
25447    //    $('body').addClass('overflow-hidden');
25448    }
25449}); 
25450</script>
25450
25451           
25452
25453
25454
25455<script>
25456       $(function(){
25457     
25458           
25459        $('body').click(function(){
25460            $('.drop-down-blog ul').hide();
25461            $('.share-icons').hide();
25462        })    
25463        $('.drop-down-blog a').click(function(e){
25464            e.stopPropagation();
25465        })   
25466           
25467    $('.social-popup').click(function(){
25468        $(this).fadeOut();
25469        $('body').removeClass('overflow-hidden');
25470    })       
25471           
25472    $('.add-post-inner').click(function(e){
25473        e.stopPropagation();
25474    })     
25475    $('.like-post a').click(function(e){
25476        e.preventDefault();
25477        $(this).toggleClass('liked')
25478    })    
25479  
25480           
25481  })           
25482</script>
25482
25483     
25484
25485    
25486<script>
25487    
25488/* Product fetching and rendering code starts  */
25489function getProductOrGigForWeb(apendtype = '1') {
25490    $('#posts-container').empty();
25491
25492    $('#loader').show();
25493    $('#skeleton-container').show(); 
25494    let pageCount = parseInt($('#pageCount').val());
25495    let productType = $('#productType').val();
25496    let base_url = ''; // Ensure base_url is defined or passed dynamically
25497
25498    $.ajax({
25499        method: 'POST',
25500        url: base_url + '/getProductDataForWeb', // new api created on 19 oct where trending code removed 
25501        data: {
25502            productType: productType,
25503            pageCount: pageCount,
25504            category: $('#category').val(),
25505            subcategory: $('#subcategory').val(),
25506            filterId: $('#datatype').val()
25507        },
25508        dataType: "json",
25509        beforeSend: function () {
25510            $('.post-wrapper').append(loader);
25511            $('#limg').remove();
25512        },
25513        success: function (response) {
25514            $('#loader').hide();
25515                setTimeout(() => {
25516                    $('#skeleton-container').hide();  // Hide skeleton loader after 2 seconds
25517                }, 2000); // Hold the skeleton loader for 2 seconds
25518            if (response.status) {
25519                pageCount += 1;
25520                $('#pageCount').val(pageCount);
25521
25522                let products = response.productArr;
25523                let _html = '';
25524
25525                if (products.length > 0) {
25526                    $.each(products, function (index, product) {
25527                        let userPhotoUrl = (product.photo == null)
25528                            ? base_url + '/public/images/noimage.png'
25529                            : product.photo;
25530
25531
25532                    //const sellerNameSlug = product.sellerName.replace(/\s+/g, '-');
25533                    //const productNameSlug = product.productName.replace(/\s+/g, '-');
25534
25535
25536                    
25537                    const sellerNameSlug = product.sellerName.replace(/\s+/g, '-');
25538                    const productNameSlug = product.productName.replace(/\s+/g, '-');
25539 
25540                    const productUrl = `${sellerNameSlug}/${productNameSlug}/${product.productId}`;
25541 
25542                  //  const productUrl = `/p/${sellerNameSlug}/${productNameSlug}/${product.productId}`;
25543
25544
25545                    
25546                        // Generate product HTML with dynamic data
25547                        _html += `<div class="email-box">
25548                                    <div class="row">
25549                                        <div class="col-md-12">
25550                                            <div class="fnc mt-0 justify-content-between mb-9 align-items-start">
25551                                                <div class="d-flex align-items-center">
25552                                                    <a href="/${product.username}" class="fig">
25553                                                        <img src="${userPhotoUrl}" style="border-radius:50%" alt="Profile-Photo" title="Profile Photo">
25554                                                    </a>
25555                                                    <div class="fnc-title">
25556                                                        <h4 class="notranslate">
25557                                                            <a href="/${product.username}" class="profile-link">@${product.username}</a>
25558                                                            
25559                                                            ${product.is_verified == 1 ? '<img src="https://www.jumpspree.com/public/images/blue-cube.png" class="blue-cube-icon" alt="Verified Icon" title="Verified Icon">' : ''}
25560
25561                                                        </h4>
25562                                                        <p style="display:none"><a href="/${product.username}" class="profile-link">@${product.username}</a></p>
25563                                                    </div>
25564                                                </div>
25565                                                <!-- Dropdown menu code -->
25566                            <div class="profile-drop-down" style="display:none">
25567                               <a href="javascript:void(0)" onclick="window.event.cancelBubble = true;$(this).next().slideToggle()" aria-label="drop down"><i class="fa-regular fa-ellipsis" aria-hidden="true"></i></a>
25568                               <ul style="display: none;">
25569                                    <li><a href="javascript:void(0)">
25569Not interested in this post <span><i class="hgi hgi-stroke hgi-meh"></i></span></a></li>
25570                                   <li><a href="javascript:void(0)">Block @levarjewelry <span><i class="hgi hgi-stroke hgi-unavailable"></i></span></a></li>
25571                                     <li style="display:none"><a href="javascript:void(0)">Feedback <span><i class="fa-regular fa-comment-lines"></i></span></a></li>
25572                                    <li style="display:none"><a href="javascript:void(0)" onclick="$('#report-product').fadeIn('fast'); $('body').addClass('overflow-hidden');">Report item <span><i class="fa-regular fa-circle-exclamation"></i></span></a></li>
25573                               </ul>
25574
25575                           </div>
25576                                            </div>
25577                                        </div>
25578                                    </div>
25579                                    <div class="row">
25580                                        <div class="col-md-12" data-id="is-blog-${product.is_blog}"  id="contentDivID-${product.postId}">
25581                                            
25582                                            <div class="blog-main-image mb-10 movie-trailer product-image-feedpage">
25583                                                <div class="">
25584                                                    <div class="item lightgallery">
25585                                                        <div data-src="${product.mainImage}" data-sub-html="<div class='fnc mt-0 justify-content-between mb-0 align-items-start'><div class='d-flex'><div class='fig'><img  src='${userPhotoUrl}' style='border-radius:50%'></div><div class='fnc-title'><h4>${product.username}</h4><p>@${product.username}</p></div></div></div>">
25586                                                            <a style="border:none" href="${productUrl}"><img  src="${product.productImage}" alt="Post Image" title=""></a>
25587                                                        </div>
25588                                                    </div> 
25589                                                </div>
25590                                            </div>
25591                                            <div id="chekcID" class="post-text">
25592                                                            
25593                                               <a href="${productUrl}">
25594                                                    <p>${product.productName}</p>
25595                                                </a>
25596                                            </div>
25597
25598                                            <div style="color:white;" class="price-box d-flex align-items-center">
25599                                                ${
25600                                                     
25601                                                    Number(product.discountedPrice) > 0
25602                                                        ? `<div class="price" style="font-size: large; margin-right: 5px;">$${Number(product.discountedPrice).toFixed(2)}</div>
25603                                                        <span class="old-price" style="font-size: small; color: gray;"> was $${Number(product.sellingPrice).toFixed(2)}</span>`
25604                                                        : `<div class="price" style="font-size: large;">$${Number(product.sellingPrice).toFixed(2)}</div>`
25605                                                
25606                                                }
25607                                            </div>
25608                                        </div>
25609                                    </div>
25610                                    <div style="display:none" class="row">
25611                                        <div class="col-md-12">
25612                                            <div class="date">
25613                                                <ul class="d-flex m-0">
25614                                                    <li>${product.postDate}</li>
25615                                                    <li><span>•</span></li>
25616                                                    <li>${product.postTime}</li>
25617                                                </ul>
25618                                            </div>
25619                                        </div>
25620                                    </div>
25621                                    <div class="row">
25622                                        <div class="col-md-12">
25623                                            <div class="date ogl">
25624                                                <ul class="d-flex align-items-start">
25625                                                    
25626                                                    <li class="like-post">
25627                                                        
25628                                                        <a href="javascript:void(0)" class="like-button ${product.liked == '1' ? 'likeIsActive' : 'likeIsDeactive'}"  data-postid="${product.productId}">
25629                                                            <span class="c-img">
25630                                                            <img src="${product.isLiked	 == '1' ? 'https://www.jumpspree.com/public/images/heart-filled.png?ver:2.005' : 'https://www.jumpspree.com/public/images/favourite-stroke-rounded.png'}" alt="Like" title="like"></span>
25631                                                            <span id="like-id-${product.productId}" class="like-count ${product.liked == '1' ? 'likeCountIsActive' : 'likeCountIsDeactive'}">${product.likes}</span>
25632                                                        </a>
25633                                                    </li>
25634                                        <li class="repost-post">
25635                                        <a href="javascript:void(0)" class="repost-button" onclick="$('#repost-popup-product').fadeIn('fast'); $('body').addClass('overflow-hidden')">
25636                                            <span class="c-img">
25637                                                <i class="fa-light fa-arrows-repeat" aria-hidden="true"></i></span>
25638                                            <span id="repost-id-1005" class="like-count">${product.reposted_count}</span>
25639                                        </a>
25640                                    </li>
25641                                                    <li class="repost-post" style="pointer-events: none; display:none">
25642                                        <a href="javascript:void(0)" class="repost-button">
25643                                            <span class="c-img">
25644                                                <i class="fa-solid fa-chart-simple"></i></span>
25645                                            <span id="like-id-${product.productId}" class="like-count" style="${product.viewcount == 0 ? 'display:none' : ''}">${product.viewcount}</span>
25646                                             
25647
25648                                        </a>
25649                                    </li>
25650                                                    
25651                                                    
25652                                        <li class="view-post" style="display:none">
25653                                            <a href="javascript:void(0)">
25654                                                <span class="c-img"><i class="fa-regular fa-bookmark" aria-hidden="true"></i> </span>
25655                                            
25656                                            </a>
25657                                        </li>
25658                                                    <li class="share-post uplad" style="display:none">
25659                                        <a href="javascript:void(0)" class="share-button-desktop" onclick="window.event.cancelBubble = true;$('.drop-down-menu-share').hide();$(this).next().fadeToggle(200);">
25660                                            <span class="c-img">
25661                                                            <i class="fa-solid fa-ellipsis" aria-hidden="true"></i>
25662                                                    </span>
25663                                        </a>
25664                                                        <div class="drop-down-menu-share" style="display: none;">
25665                                                            <ul>
25666                                                            <li><a href="javascript:void(0)" onclick="window.event.cancelBubble = true; $('#share-site-link').addClass('share-in-open'); $('.drop-down-menu-share').hide();$('#embed-code').removeClass('embed-in');">Share <span><i class="fa-regular fa-arrow-up-from-bracket"></i> </span>  </a></li>
25667                                                            <li><a href="javascript:void(0)">Copy link to share <span><i class="hgi hgi-stroke hgi-link-05"></i> </span></a></li>
25668                                                            <li><a href="javascript:void(0)">Copy text <span><img src="https://www.jumpspree.com/public/images/copy-text.png?ver:1.02" alt="Copy" title="Copy"> </span></a></li>
25669                                                            <li style="display:none"><a href="javascript:void(0)" onclick="window.event.cancelBubble = true; $('#embed-code').addClass('embed-in'); $('.drop-down-menu-share').hide(); $('#share-site-link').removeClass('share-in-open');">Embed <span><img src="https://www.jumpspree.com/public/images/embed.png?ver:1.05" alt="embed" title="embed" style="max-width: 20p
25669x !important;"> </span></a></li>
25670                                                            </ul>  
25671                                                            </div>
25672       
25673                                    </li>
25674                                                </ul>
25675                                            </div>
25676                                        </div>
25677                                    </div>
25678                                </div>`;
25679                    });
25680                } else {
25681                    _html += `<div class="no-record-found">
25682                                <img src="${base_url}/public/images/no-search.svg" alt="Jumpspree">
25683                                <h2>No Products Found.</h2>
25684                            </div>`;
25685                }
25686
25687                if (apendtype == '1') {
25688                    $('#posts-container-product').html(_html);
25689                } else if (apendtype == '2') {
25690                    $('#posts-container-product').append(_html);
25691                    if (response.count == '0') {
25692                        $(window).unbind('scroll');
25693                    }
25694                }
25695
25696                $('#posts-container-product').on('click', '.email-box', function () {
25697                                
25698                                    const scrollY = window.pageYOffset || document.documentElement.scrollTop;
25699                                    const page = $(this).data('page'); 
25700                                    sessionStorage.setItem("hasReturnedFromShop", true);
25701                                    sessionStorage.setItem('shopScrollY', scrollY);
25702                                    sessionStorage.setItem('shopPage', page);
25703                                });
25704
25705
25706            }
25707        },
25708        complete: function () {
25709            $('.post-wrapper .loader').remove();
25710        }
25711    });
25712}
25713
25714
25715
25716let maxReached = false;
25717$(document).ready(function() {
25718           let activePage = sessionStorage.getItem('activeTab') || 'social';
25719            let page = 1; 
25720            let hashTagValue = document.getElementById('hashTagValue'); 
25721            let hashTag =  hashTagValue.value  ;
25722            //
25723            let isFetching = false;
25724            let scrollTimeout;
25725            console.log("page is loaded !");
25726            // Initial load for social feed
25727
25728
25729
25730            
25731           // getSocialFeed('3', page, '1', '');
25732
25733
25734
25735  if(activePage==="social"){
25736                if (_preloadedPosts && _preloadedPosts.length > 0) {
25737                    // Defer rendering to next tick — lets browser paint skeleton first, reducing TBT
25738                    setTimeout(function() {
25739                        appendPosts(_preloadedPosts, _preloadedUserData, '');
25740                        if (_preloadedDrafts && _preloadedDrafts.length > 0) {
25741                            appendDrafts(_preloadedDrafts);
25742                        }
25743                        if (typeof $.fn.owlCarousel !== 'undefined') {
25744                            $('.owl-carousel').owlCarousel('destroy');
25745                            $('.owl-carousel-home-feed').owlCarousel({
25746                                loop:false, margin:10, nav:false, dots:false, autoplay:false, autoplayTimeout:5000,
25747                                responsive:{ 0:{items:2.2,loop:false,mouseDrag:false,autoWidth:true,touchDrag:false,pullDrag:false,freeDrag:false}, 600:{items:3}, 1000:{items:3.2,autoWidth:true} }
25748                            });
25749                            $('.owl-carousel').owlCarousel({
25750                                loop:true, margin:10, nav:false, dots:false, autoplay:false, autoplayTimeout:5000,
25751                                responsive:{ 0:{items:1}, 600:{items:1}, 1000:{items:1} }
25752                            });
25753                        }
25754                        $('#loader').hide();
25755                        $('#skeleton-container').hide();
25756                        if (window.JumpSocialBoot) { window.JumpSocialBoot.feedReady(); }
25757                    }, 0);
25758                    // page stays at 1 so first scroll increments to 2 and loads page 2
25759                } else {
25760                    getSocialFeed('3', page, '1', '');
25761                }
25762            }else if(activePage==="shop") {
25763                const hasReturnedFromProductPage = sessionStorage.getItem("hasReturnedFromShop") ?? 'false';
25764                const prevShopPage = sessionStorage.getItem("shopPage");
25765                if(hasReturnedFromProductPage === 'true'){  
25766                    sessionStorage.setItem("hasReturnedFromShop", false);
25767                }
25768                
25769                getProductOrGigForWeb(page);
25770                
25771            }
25772
25773
25774
25775            // Handle tab switch to 'Shop'
25776            $('#shoplinkforweb').click(function() {
25777                $('.profile-menu').hide();
25778                if (activePage !== 'shop') {
25779                    if (window.location.pathname !== '/shop') {
25780                        window.location.href = '/shop';
25781                    }
25782                    /* console.log("Shop is activated");
25783                    setActivePage('shop');
25784                    page = 1; // Reset page count for shop
25785                    maxReached = false; // Reset maxReached when switching tabs
25786                    getProductOrGigForWeb(page); // Load shop products for page 1
25787                    sessionStorage.setItem("activeTab", 'shop');
25788                    // Update active tab
25789                    $('#shoplinkforweb').addClass('active');
25790                    $('#postlink').removeClass('active'); */
25791                }
25792            });
25793
25794            // Handle tab switch to 'Social'
25795            $('#postlink').click(function() {
25796                 $('.profile-menu').hide();
25797                if (activePage !== 'social') {
25798                    console.log("Social is activated");
25799                    setActivePage('social');
25800                    page = 1; // Reset page count for social
25801                    maxReached = false; // Reset maxReached when switching tabs
25802                    getSocialFeed('3', page, '1', hashTag); // Load social feed for page 1
25803 sessionStorage.setItem('activeTab', 'social');
25804                    // Update active tab
25805                    $('#postlink').addClass('kkl');
25806                    $('#shoplinkforweb').removeClass('active');
25807                }
25808            });
25809
25810            // Debounced scroll handler
25811            $(window).scroll(function() {
25812                if (maxReached) {
25813                    return;
25814                }
25815
25816                if (scrollTimeout) {
25817                    clearTimeout(scrollTimeout); // Clear the previous timeout if it's still pending
25818                }
25819
25820                scrollTimeout = setTimeout(function() {
25821                    //if ($(window).scrollTop() + $(window).height() >= $(document).height() - 100 && !maxReached && !isFetching) {
25822                    // below loads wehn 75% screen 31 des riaz load
25823                    if ($(window).scrollTop() + $(window).height() >= $(document).height() * 0.75 && !maxReached && !isFetching) {
25824
25825                        isFetching = true; // Set fetching flag to prevent multiple API calls
25826
25827                        // Call the appropriate function based on the active page
25828                        if (activePage === 'social') {
25829                            const _currentHashtag = document.getElementById('hashTagValue').value;
25830
25831                            if (_currentHashtag) {
25832                                // Hashtag feed: dedicated counter, never touches regular feed's page
25833                                _hashtagPage++;
25834                                getSocialFeed('3', _hashtagPage, '1', _currentHashtag, function() {
25835                                    isFetching = false;
25836                                });
25837                            } else {
25838                                // Regular feed: increment once here
25839                                page++;
25840                                getSocialFeed('3', page, '1', '', function() {
25841                                    isFetching = false;
25842                                });
25843                            }
25844                        } else if (activePage === 'shop') {
25845                            if(page > 1){
25846                                page =2;
25847                            }
25848                            getProductOrGigForWeb(page); // Pass the incremented page number for shop
25849                            isFetching = false; // Reset fetching flag
25850                            console.log("Shop isFetching : ", isFetching, "page number:", page);
25851                        }
25852                    }
25853                }, 300); // Wait 300ms before triggering the API call to prevent rapid firing
25854            });
25855
25856            // Helper function to set active page and reset states
25857            function setActivePage(pageName) {
25858                activePage = pageName;
25859                document.querySelector('body').classList.remove('social', 'shop');
25860                document.querySelector('body').classList.add(activePage);
25861
25862
25863                 sessionStorage.setItem('activeTab', pageName);
25864                //sessionStorage.setItem('page', 1);
25865                sessionStorage.setItem('hasReturnedFromShop', false);
25866            }
25867        
25868    // Log for debugging
25869    console.log("Document ready. Active page:", activePage);
25870
25871
25872   
25873    //Like unlike functionality :
25874    // Like button handler
25875    $(document).on('click', '.like-button', function() {
25876            var postId = $(this).data('postid');
25877            var likeButton = $(this);   
25878            var likeId = 'like-id-' + postId;
25879
25880            checkAccess(function() {
25881                $.ajax({
25882                    url: base_url + '/likeUnlike',
25883                    type: 'POST',
25884                    data: { pid: postId },
25885                    dataType: 'json',
25886                    success: function(response) {
25887                        if (response.status) {
25888                            var likeCount = response.likes;
25889                            var likeIcon = likeButton.find('img').first();  // Find the first image element
25890                            var likeCountElement = document.getElementById(likeId);
25891
25892                            // Update the like count
25893                            if(response.hideLike == "0" || response.hideLike == 0){
25894                                if (likeCountElement) {
25895                                    likeCountElement.textContent = likeCount;
25896                                    //likeCountElement.style.color = "#FF0088";
25897
25898                                } else {
25899                                    console.warn('Like count element not found with ID:', likeId);
25900                                }
25901                            }
25902
25903                            // Update the heart icon based on the like/unlike status
25904                            if (response.result === "1") {  // Strict comparison for consistency 
25905                                //'likeIsActive' : 'likeIsDeactive'
25906                                likeButton.addClass('likeIsActive');
25907                                likeButton.removeClass('likeIsDeactive');
25908                                 
25909                                
25910                                $(likeCountElement).addClass('likeCountIsActive');
25911                                $(likeCountElement).removeClass('likeCountIsDeactive');
25912
25913                                likeIcon.attr('src', 'https://www.jumpspree.com/public/images/heart-filled.png?ver:1.0251');  // Liked
25914                                 if (parseInt(response.likes) > 0) {
25915                                    $(likeCountElement).text(response.likes).css('display', 'inline-block');
25916                                } else {
25917                                    $(likeCountElement).hide(); // fallback if backend sends 0 even on like
25918                                }
25919
25920
25921                            } else {
25922                                likeButton.addClass('likeIsDeactive');
25923                                likeButton.removeClass('likeIsActive');  
25924                                $(likeCountElement).addClass('likeCountIsDeactive');
25925                                 $(likeCountElement).removeClass('likeCountIsActive'); 
25926                                likeIcon.attr('src', 'https://www.jumpspree.com/public/images/favourite-stroke-rounded.png');  // Unliked
25927
25928                                // Hide like count if 0
25929                                if (parseInt(response.likes) === 0) {
25930                                    $(likeCountElement).hide();
25931                                } else {
25932                                    $(likeCountElement).text(response.likes).css('display', 'inline-block');
25933                                }
25934                            }
25935                        } else {
25936                            console.log('Error: ', response.message);
25937                        }
25938                    },
25939                    error: function(xhr, status, error) {
25940                        console.error('AJAX error: ', error);
25941                        console.error('Response Text: ', xhr.responseText);
25942                    }
25943                });
25944            });
25945        });
25946
25947});
25948
25949 
25950
25951
25952function removeNonAlphanumeric(inputString) {
25953    return inputString.replace(/[^a-zA-Z0-9]/g, '-');
25954};
25955
25956function handleBackButtonClick() {
25957    // Show posts-container 
25958    const postsContainer = document.getElementById('posts-container');
25959    const hashTagsDiv = document.getElementById('hashTagsDiv');
25960    const add_post_top = document.getElementById('add-post-top');
25961    const fixedHashTagsDiv = document.getElementById('fixed-heading-hashTag');
25962    $('.post-area').removeClass('hashtagopen');
25963   
25964
25965      
25966    add_post_top.style.display = 'block';
25967    if (postsContainer) {
25968        postsContainer.style.display = 'block';
25969    } else {
25970        console.error('Element with ID "posts-container" not found.');
25971    }
25972
25973    // Hide and clear posts-container-hashTags
25974    const hashTagContainer = document.getElementById('posts-container-hashTags');
25975    if (hashTagContainer) {
25976        hashTagContainer.style.display = 'none';
25977        hashTagsDiv.style.display = 'none';
25978       
25979        fixedHashTagsDiv.style.display = 'none';
25980        hashTagContainer.innerHTML = ''; // Clear the content
25981        $('body').removeClass('hashtag-active');
25982    } else {
25983        console.error('Element with ID "posts-container-hashTags" not found.');
25984    }
25985
25986    // Reset hashtag value
25987    const hashTagValueElement = document.getElementById('hashTagValue');
25988    if (hashTagValueElement) {
25989        hashTagValueElement.value = ''; // Reset to null
25990    } else {
25991        console.error('Element with ID "hashTagValue" not found.');
25992    }
25993    maxReached =  false;
25994}
25995
25996
25997
25998// renamed jan 23 
25999//new code 
26000  const userToken = "";
26001
26002function getSocialFeed(type = '3', page = 1, apendtype = '1', hashtag = '', onComplete = null) {
26003
26004    console.log("You are on page:", page);
26005    console.log("You are logged or not? :", userToken ? "Logged In" : "Guest");
26006
26007    if (!userToken && page > 1 && !hashtag) {
26008        // Guest users: only block page > 1 for the regular feed, not hashtag browsing
26009        $('#signup-new-process').hide();
26010        $('#signin-new-process').fadeIn('fast');
26011        $('body').addClass('feed-stopped');
26012        $('html, body').animate({ scrollTop: 0 }, 'fast');
26013        if (typeof onComplete === 'function') { onComplete(); } // reset isFetching so popup re-triggers on next scroll
26014
26015    }else{
26016
26017
26018        $('#posts-container-product').empty();
26019
26020        if(apendtype=='0'){
26021
26022            $('#posts-container').empty();
26023
26024        }
26025
26026        // New hashtag selected (page 1) — clear previous results and reset page counter
26027        if (hashtag && page == 1) {
26028            $('#posts-container-hashTags').empty();
26029            _hashtagPage = 1;
26030
26031            // Immediately switch to hashtag view so skeleton appears in the right place
26032            $('#posts-container').hide();
26033            $('#posts-container-hashTags').show();
26034            $('#hashTagsDiv').show();
26035            $('#add-post-top').hide();
26036            document.getElementById('currentHashTag').innerText = '#' + hashtag;
26037            $('html, body').animate({ scrollTop: 0 }, 150);
26038        }
26039
26040        document.getElementById('hashTagValue').value = hashtag;
26041
26042        setActiveLink('postlink');
26043        $('#loader').show();
26044        $('#skeleton-container').show();
26045
26046
26047        $.ajax({
26048            url: base_url + '/getPostBlogTest',
26049            type: 'POST',
26050            //data: { productType: type, page: 1 },
26051            data: { productType: type, pageCount: page, hashtag: hashtag  },
26052            dataType: "Json",
26053            success: function(response) {
26054                $('#loader').hide();
26055                setTimeout(() => {
26056                    $('#skeleton-container').hide();
26057                }, 2000); // Hold the skeleton loader for 2 seconds
26058                // Signal orchestrator: feed is ready — release deferred API calls
26059                if (window.JumpSocialBoot) { window.JumpSocialBoot.feedReady(); }
26060                //console.log(response);  // Log the response to verify data structure
26061
26062                if (response.status) {
26063                    if (response.productArr && response.productArr.length > 0) {
26064                        console.log("coomes if 338"); 
26065                        appendPosts(response.productArr, response.userData, hashtag );  
26066                        //draft logic below
26067                        if (response.draftArray && response.draftArray.length > 0) {
26068                            appendDrafts(response.draftArray); // Pass drafts to append function
26069                        } else {
26070                            console.log("No drafts available."); 
26071                        }
26072                        $('.owl-carousel').owlCarousel('destroy'); 
26073                        $('.owl-carousel-home-feed').owlCarousel({
26074                            loop:false,
26075                            margin:10,
26076                            nav:false,
26077                            dots:false,
26078                            autoplay:false,
26079                            autoplayTimeout:5000,   
26080                            
26081                            responsive:{
26082                                0:{
26083                                    items:2.2,
26084                                    loop:false,
26085                                    mouseDrag: false,
26086                                    autoWidth: true,
26087                                    touchDrag: false,
26088                                    pullDrag: false,
26089                                    freeDrag: false,
26090                                },
26091                                600:{
26092                                    items:3
26093                                },
26094                                1000:{
26095                                    items:3.2,
26096                                    autoWidth: true,
26097                                    
26098                                }
26099                            }
26100                        });
26101                        $('.owl-carousel').owlCarousel({
26102                            loop:true,
26103                            margin:10,
26104                            nav:false,
26105                            dots:false,
26106                            autoplay:false,
26107                            autoplayTimeout:5000,    
26108                            responsive:{
26109                                0:{
26110                                    items:1
26111                                },
26112                                600:{
26113                                    items:1
26114                                },
26115                                1000:{
26116                                    items:1
26117                                }
26118                            }
26119                        });
26120                        
26121                        page++;  // Increment page for next call
26122                    } else {
26123                        
26124                        console.log("coomes else 363"); 
26125                        // If no data returned, stop further loading
26126                        maxReached = true;
26127                        $('#loader').hide();  // Optionally hide the loader
26128                        $('#noMorePosts').show();  // Show "No more posts" message
26129                    }
26130                } else {
26131                    //console.log('No posts found or error:', response.message);
26132                    $('#loader').hide();  // Hide loader
26133                    $('#noMorePosts').show();  // Show "No more posts" message
26134                    maxReached = true;  // Set maxReached flag to stop further API calls
26135                }
26136                /* if (response.status) {
26137                    appendPosts(response.productArr);
26138                } else {
26139                    console.log('No posts found or error:', response.message);
26140                } */
26141            },
26142            error: function(xhr, status, error) {
26143                $('#loader').hide();
26144            // console.error('AJAX error:', error);
26145            },
26146            complete: function() {
26147                if (typeof onComplete === 'function') onComplete();
26148            }
26149        });
26150
26151    }
26152
26153}
26154
26155
26156
26157
26158// start of renderPosts function
26159
26160function appendPosts(posts, userData, hashtag) {
26161    const container = document.getElementById('posts-container'); // standard div
26162    const hashTagContainer = document.getElementById('posts-container-hashTags'); // standard div
26163   
26164    const hashTagsDiv = document.getElementById('hashTagsDiv'); 
26165    
26166    const add_post_top = document.getElementById('add-post-top');
26167    const currentHashTag = document.getElementById('currentHashTag');
26168    
26169    //container.innerHTML = ''; // Clear container before appending new posts
26170     
26171    if (!container) {
26172       console.error('Container not found but may be hastags found');
26173        // return; // commented on Jan 2 if any issue pls uncomment
26174    }else{
26175         console.log('Container found');
26176    } 
26177    
26178    if(isNewPost) {
26179        container.innerHTML = '';
26180        hashTagContainer.innerHTML = '';
26181        isNewPost = false; // reset — only clear once, not on every subsequent scroll
26182    }
26183    
26184    
26185    // Toggle visibility based on the hashtag presence 
26186    if (hashtag) {
26187        hashTagsDiv.style.display = "block";
26188        add_post_top.style.display = "none";
26189        currentHashTag.innerText = `#${hashtag}`;
26190        container.style.display = "none";
26191        hashTagContainer.style.display = "block";
26192    } else {
26193        hashTagsDiv.style.display = "none";
26194        add_post_top.style.display = "block";
26195        currentHashTag.innerText = '';
26196        container.style.display = "block";
26197        hashTagContainer.style.display = "none";
26198    }
26199
26200
26201
26202    // Reset link preview stagger so each feed page starts at 0ms delay — 2026-05-15
26203    window._lpStagger = 0;
26204
26205    posts.forEach((post, _pi) => {
26206        const _targetContainer = hashtag ? hashTagContainer : container;
26207        if (_targetContainer && _targetContainer.querySelector(`#ni${post.postId}`)) return;
26208        let postHtml = '';
26209        let currentUser = userData ? userData.full_name : null;
26210        let currentUserName = userData ? userData.username : null;
26211        const postTextWithLinks = convertHashtagsToLinks(post.postText); // Convert hashtags to clickable links
26212        const uniqueId = `link-preview-${post.postId}-${Math.floor(Math.random() * 1000)}`;
26213        let shopfeedurl='https://www.jumpspree.com/ps/'+post.username+'/jumpid'+post.postId+'';
26214        // console.log("_______________comes");
26215        // console.log(post.quoteDetails);
26216        let dynamicCss = post.quoteDetails ? 'repost-social' : '';
26217        //repost-social
26218        let onlineStatusClass = post.online_status == 0 ? 'online-green' : 'online-red';
26219
26220
26221
26222        footerButtonsForAll = `     
26223                    <div class="row">
26224                        <div class="col-md-12">
26225                            <div class="date ogl pt-0">
26226                                <ul class="d-flex align-items-start pt-0">
26227                                    <li style="display:none"  class="comment-post">
26228                                        
26229                                    <a href="javascript:void(0)" onclick="openCommentPopup('${post.username}', '${post.name}', ${post.postId}, '${currentUser}', '${currentUserName}')"> 
26230                                            <span class="c-img">
26231                                                <i class="fa-regular fa-message-middle" aria-hidden="true"></i></span> <span class="c-img">${post.comments}</span>
26232                                        </a>
26233                                    </li>
26234                                    
26235                                    <li class="like-post">
26236                                        <a href="javascript:void(0)"  class="like-button ${post.liked == '1' ? 'likeIsActive' : 'likeIsDeactive'}"   data-postid="${post.postId}">
26237                                            <span class="c-img">
26238                                                <img src="${post.liked == '1' ? 'https://www.jumpspree.com/public/images/heart-filled.png?ver:3.015' : 'https://www.jumpspree.com/public/images/favourite-stroke-rounded.png?ver:1.05'}" alt="Like" title="Like"></span>
26239                                            <span style="${post.likes == 0 ? 'display:none' : ''}" id="like-id-${post.postId}" class="like-count  ${post.liked == '1' ? 'likeCountIsActive' : 'likeCountIsDeactive'}">${post.hideLike == 1 ? '' : post.likes}</span>
26240                                        </a>
26241                                    </li> 
26242                                                            
26243                                <li class="comment-post"> 
26244                                                                                    <a href="javascript:void(0);" onclick="$('#signin-new-process').fadeIn('fast'); $('body').addClass('overflow-hidden');">
26245                                                <span class="c-img">
26246                                                    <img src="https://www.jumpspree.com/public/images/comment-03-stroke-rounded.png" alt="Comment" title="Comment">
26247                                                </span> 
26248                                                <span class="c-count" style="${post.comments == 0 ? 'display:none' : ''}">${post.comments}</span>
26249                                            </a>
26250                                                                            </li>
26251        
26252                                    
26253                                
26254                                    
26255                                    <li class="repost-btn share-post">
26256                                        <a href="javascript:void(0)" 
26257                                        class="repost-button ${post.is_reposted_by_user ? 'reposted' : 'no-repost'}" 
26258                                        style="flex-direction:column" 
26259                                        onclick="${post.is_reposted_by_user ? `unrepostPost('${post.postId}')` : `handleRepostDropdown(event, this)`}">
26260                                            <span class="c-img">
26261                                                <i style="display:none" class="fa-light fa-arrows-repeat" aria-hidden="true"></i>
26262                                                <i class="fa-light fa-arrows-repeat ${post.is_reposted_by_user ? 'user-reposted-post' : ''}" aria-hidden="true"></i>
26263                                            </span>
26264                                            <span id="repost-count-${post.postId}" class="like-count" style="${post.reposted_count == 0 ? 'display:none' : ''}">
26265                                                ${post.reposted_count}
26266                                            </span>
26267                                        </a>
26268                                        <div class="drop-down-menu-share" style="display:none">
26269                                            <ul>
26270                                                <li>
26271                                                    <a href="javascript:void(0)" 
26272                                                    onclick="${post.is_reposted_by_user ? `unrepostPost('${post.postId}')` : `handleRepostPopup(this, '${post.postId}')`}">
26273                                                    ${post.is_reposted_by_user ? 'Undo Repost' : 'Repost'} 
26274                                                    <span><i class="fa-light fa-arrows-repeat ${post.is_reposted_by_user ? 'user-reposted-post' : ''}" aria-hidden="true"></i></span>
26275                                                    </a>
26276                                                </li>
26277                                                <li>
26278                                                    <a href="javascript:void(0)" 
26279                                                    class="repost-button" 
26280                                                    data-username="${post.username}"  
26281                                                    data-postprofile="${post.profile_photo || 'https://www.jumpspree.com/public/images/user-icon.png?ver:1.03'}"  
26282                                                    data-name="${post.name}" 
26283                                                    data-postid="${post.postId}" 
26284                                                    data-posttext="${encodeURIComponent(post.postText)}"
26285                                                    data-currentuser="${currentUser}" 
26286                                                    data-currentusername="${currentUserName}" 
26287                                                    onclick="openRePostPopupOnPage(this)">
26288                                                    ${post.is_reposted_by_user ? 'Remove Quote Repost' : 'Add Caption and Repost'} 
26289                                                    <span><i class="fa-sharp fa-regular fa-pen-line"></i></span>
26290                                                    </a>
26291                                                </li> 
26292                                            </ul>  
26293                                        </div>
26294                                    </li>
26295
26296                                                        
26297                                    <li class="view-post" style="display:none">
26298                                        <a href="javascript:void(0)"  class="repost-button">
26299                                            <span class="c-img">
26300                                                <img style="width:20px !important" src="https://www.jumpspree.com/public/images/analytics-03-stroke-rounded.png" alt="view" title="view"></span>
26301                                            <span style="${post.viewcount == 0 ? 'display:none' : ''}" id="like-id-${post.postId}" class="like-count">${post.viewcount}</span>
26302                                                
26303
26304                                        </a>
26305                                    </li>
26306                                        
26307                                    
26308                                    <li class="repost-post save-bookmark" data-postid="${post.postId}">
26309                                                                            <a href="javascript:void(0)">
26310                                            <span class="c-img">
26311                                                ${post.is_wishlist == '1' ? '<img class="bookmark-active" style="height: 17px !important; width: 15px !important" src="https://www.jumpspree.com/public/images/bookmark-filled.png?v=2" alt="bookmark" title="bookmark" />'  : '<img style="height: 17px !important; width: 15px !important" class="bookmark-inactive" src="https://www.jumpspree.com/public/images/bookmark-021.png" alt="bookmark" title="bookmark" />'}
26312                                            </span>
26313                                        </a> 
26314                                        
26315                                        <a style="display:none"  href="javascript:void(0)" class="repost-button" onclick="$('#signup-new-process').hide();$('#signin-new-process').fadeIn('fast')">
26316                                            <span class="c-img">
26317                                                <img src="https://www.jumpspree.com/public/images/bookmark-021.png" alt="bookmark" title="bookmark" id="bookmarkicon" onclick="bookmark('')" />
26318                                            </span>
26319                                        </a>
26320                                                                    </li>
26321
26322                                    
26323                                                        
26324                                    <li class="share-post uplad hide-on-desktop" style="display:none !important">
26325                                        <a href="javascript:void(0)" class="share-button">
26326                                            <img src="https://www.jumpspree.com/public/images/share-outline.png" alt="share-icon" title="share-icon">
26327                                        </a>
26328                                    </li>                    
26329                                                        
26330                                                        
26331                                    <li class="view-post" style="display:none">
26332                                        <a href="javascript:void(0)">
26333                                            <span class="c-img"><img style="width:20px !important" src="https://www.jumpspree.com/public/images/analytics-03-stroke-rounded.png" alt="view" title="view"> </span> 
26334                                                
26335                                            <span class="c-count" style="${post.viewcount == 0 ? 'display:none' : ''}">${post.viewcount}</span>
26336
26337                                        </a>
26338                                    </li>                    
26339                                    
26340                                    <li class="share-post uplad hide-on-desktop" style="display:block !important">
26341                                        <a href="javascript:void(0)" class="share-button"  onclick="window.event.cancelBubble = true; openPostShareDialog('${post.postId}','${post.username}'); $('.drop-down-menu-share').hide(); $('#embed-code').removeClass('embed-in');">
26342                                            <span class="c-img share05">
26343                                                            <img src="https://www.jumpspree.com/public/images/plane-share.png" alt="Share" title="Share" style="filter:invert()">
26344                                                    </span>
26345                                        </a>
26346                                    </li>
26347                                                
26348                                            
26349                                    <li class="share-post uplad" style="display:none !important">
26350                                        <a href="javascript:void(0)" class="share-button-desktop" onclick="window.event.cancelBubble = true;$('.drop-down-menu-share').hide();$(this).next().fadeToggle(200);">
26351                                            <span class="c-img">
26352                                                            <i class="fa-solid fa-ellipsis" aria-hidden="true"></i>
26353                                                    </span>
26354                                        </a>
26355                                                        <div class="drop-down-menu-share" style="display:none">
26356                                                            <ul>
26357                                                            <!-- <li><a href='javascript:void(0)' onclick="window.event.cancelBubble = true; $('#share-site-link').addClass('share-in-open'); $('.drop-down-menu-share').hide();$('#embed-code').removeClass('embed-in');">Share <span><i class="fa-regular fa-arrow-up-from-bracket"></i> </span>  </a></li> -->
26358
26359
26360                                                            <li>
26361                                                                <a href='javascript:void(0)' 
26362                                                                onclick="window.event.cancelBubble = true; openShareDialog('post-${post.postId}'); $('.drop-down-menu-share').hide(); $('#embed-code').removeClass('embed-in');">
26363                                                                    Share 
26364                                                                    <sp
26364an><i class="fa-regular fa-arrow-up-from-bracket"></i></span>
26365                                                                </a>
26366                                                            </li>
26367
26368
26369                                                            <li><a href='javascript:void(0)'>Copy link to share <span><i class="hgi hgi-stroke hgi-link-05"></i> </span></a></li>
26370                                                            <li><a href='javascript:void(0)'>Copy text <span><img src="https://www.jumpspree.com/public/images/copy-text.png?ver:1.02" alt="Copy" title="Copy"> </span></a></li>
26371                                                            <li style="display:none"><a href='javascript:void(0)' onclick="window.event.cancelBubble = true; $('#embed-code').addClass('embed-in'); $('.drop-down-menu-share').hide(); $('#share-site-link').removeClass('share-in-open');">Embed <span><img src="https://www.jumpspree.com/public/images/embed.png?ver:1.05" alt="Jumpspree" style="max-width: 20px !important;"> </span></a></li>
26372                                                            </ul>  
26373                                                            </div>
26374    
26375                                    </li>
26376                                </ul>
26377                            </div>
26378                        </div>
26379                    </div>`;
26380
26381        //if (post.is_blog === '1' && post.source != 1 || && post.source != '1') {
26382      if ((post.is_blog === '1' || post.is_blog == 1) && post.source !== 1 && post.source !== '1') {
26383
26384            const hasImage =
26385            post.postFiles &&
26386            post.postFiles.length > 0 &&
26387            post.postFiles[0].imagepath &&
26388            post.postFiles[0].imagepath.trim() !== '';
26389
26390            const containerClass = `email-box article-feed ${hasImage ? 'article-feed-has-image' : 'article-feed-no-image'} ${dynamicCss} dp${post.postId}`;
26391           
26392            const hideClassIfnoImage = hasImage ? 'style="display:block"' : 'style="display:none"';
26393
26394            // Blog Design
26395            postHtml = `
26396                    
26397                            <div data="blogStatic" data-is-blog="${post.is_blog}" data-source="${post.source}" class="${containerClass}" id="ni${post.postId}">
26398                                <div class="row">
26399                                    <div class="col-md-12">
26400                                        <div class="fnc mt-0 justify-content-between mb-9 align-items-start">
26401                                            <div class="d-flex align-items-center notranslate">
26402                                                <!-- Link wrapping the profile photo -->
26403                                                <a href="/${post.username}" class="fig">
26404                                                    <div id="online-dot-${post.postId}" class=" ${onlineStatusClass}"></div>   
26405                                                <img src="${post.profile_photo || 'https://www.jumpspree.com/public/images/user-icon.png?ver:1.004'}" 
26406                                                        style="border-radius:50%" 
26407                                                        alt="Profile-Photo" title="Profile Photo">
26408                                                    
26409                                                </a>
26410
26411                                                <div class="fnc-title">
26412                                                    <!-- Link wrapping the profile name -->
26413                                                    <h4>
26414                                                        <a href="/${post.username}" class="profile-link">
26415                                                            ${post.username}
26416                                                        </a>
26417                                                            ${post.is_verified == 1 ? '<img src="https://www.jumpspree.com/public/images/blue-cube.png" class="blue-cube-icon" alt="Verified Icon" title="Verified Icon">' : ''}
26418                                                                
26419                                                            <div data-uoutput="${post.pdate} ${post.ptime}" class="datenew">
26420                                                                ${formatPostDate(post.pdate + ' ' + post.ptime)}
26421                                                            </div>
26422                                                    </h4>
26423                                                    
26424                                                    <!-- Link wrapping the username -->
26425                                                    <p style="display:none">
26426                                                        <a href="/${post.username}" class="profile-link">
26427                                                            @${post.username}
26428                                                        </a>
26429                                                    </p>
26430                                                </div>
26431                                            </div>
26432
26433                                        
26434                                            <!-- Dropdown menu code -->
26435                                            <div class="profile-drop-down">
26436                                                                <a  href="javascript:void(0)" onclick="window.event.cancelBubble = true;$('.more-setting-pop').removeClass('more-settings');
26436$('.status .profile-drop-down > ul').hide();$(this).parents('.email-box').siblings().find('.profile-drop-down > ul').hide();$(this).next().slideToggle('fast');$('.user-sec-strip').removeClass('zin9');$(this).parents('.user-sec-strip').addClass('zin9')" aria-label="drop down"><i class="fa-regular fa-ellipsis" aria-hidden="true"></i></a>
26437                                                                
26438                                                            
26439                                                            
26440                                                            <ul> `;
26441                                                            if(post.session == 1){      
26442                                                            
26443                                                                if(post.self != 1){     
26444
26445
26446                                                                postHtml += ` <li >
26447                                                                    <a href="javascript:void(0)" onclick="postNotInterested('${post.postId}')">
26448                                                                    Not interested in this post <span><i class="hgi hgi-stroke hgi-meh"></i></span>
26449                                                                    </a>
26450                                                                </li>
26451
26452                                                                <li>
26453                                                                    <a href="javascript:void(0)" onclick="socialFeedMuteUser(this, '${post.user_token}')">
26454                                                                    ${post.mute == "1" ? `<span>Unmute @${post.username}</span>` : `<span>Mute @${post.username}</span>`}
26455                                                                    <i class="fa-regular fa-volume-slash"></i>
26456                                                                    </a>
26457                                                                </li>
26458                                                                <li>
26459                                                                    <a href="javascript:void(0)" data-bu="${post.block}" id="bk${Math.floor(1000000 + Math.random() * 100000)}"  onclick="socialFeedBlockUser(this, '${post.user_token}','${post.username}')"><span>
26460                                                                    ${post.block == "1" ? `Unblock @${post.username}` : `Block @${post.username}`}</span>
26461                                                                    <i class="hgi hgi-stroke hgi-unavailable"></i>
26462                                                                    </a>
26463                                                                </li>
26464                                                                <li>
26465                                                                    <a href="javascript:void(0)" onclick="mentionUser('${post.username}')">
26466                                                                    Mention @${post.username} <i class="hgi hgi-stroke hgi-at"></i>
26467                                                                    </a>
26468                                                                </li>
26469                                                                <li>
26470                                                                    <a href="javascript:void(0)" onclick="openPostReportPopup(${post.postId}, this)">
26471                                                                    Report post <i class="fa-regular fa-circle-exclamation"></i>
26472                                                                    </a>
26473                                                                </li>`;
26474
26475                                                                }else{
26476
26477                                                                    postHtml += `<!-- <li>
26478                                                                    <a href="javascript:void(0)" ">
26479                                                                    Share <i class=" fa-regular fa-arrow-up-from-bracket"></i>
26480                                                                    </a>
26481                                                                </li> -->
26482                                                                <li>
26483                                                                    <a href="javascript:void(0)" style="color: #ff0026 !important; " onclick="deleteOwnPostPoll(this,'${post.postId}','article')">
26484                                                                    Delete <i class="hgi hgi-stroke hgi-delete-02"></i>
26485                                                                    </a>
26486                                                                </li>
26487                                                                `;
26488
26489                                                                }
26490                                                            }
26491                                                    
26492                                                            else {
26493                                                                    const postDateTimeStr = `${post.pdate} ${post.ptime}`;
26494                                                                    const postDateTime = new Date(postDateTimeStr.replace(/-/g, '/')); // safer parsing
26495                                                                    const now = new Date();
26496
26497                                                                    const diffInMinutes = (now - postDateTime) / (1000 * 60); // milliseconds to minutes
26498
26499                                                                    postHtml += `<li>
26500                                                                        <a href="javascript:void(0)" style="color: #ff0026 !important;" onclick="deleteOwnPostPoll(this,'${post.postId}','post')">
26501                                                                            Delete <i class="hgi hgi-stroke hgi-delete-02"></i>
26502                                                                        </a>
26503                                                                    </li>`;
26504
26505                                                                    // Show Edit only if is_blog == 1 and time < 30 minutes
26506                                                                    if (post.is_blog == 1 && diffInMinutes <= 30) {
26507                                                                        postHtml = `
26508                                                                            <li>
26509                                                                                <a href="/add-article?id=${post.postId}">
26510                                                                                    Edit <i class="hgi hgi-stroke hgi-edit-03"></i>
26511                                                                                </a>
26512                                                                            </li>
26513                                                                        ` + postHtml; // Prepend edit before delete
26514                                                                    }
26515                                                                }
26516                                                            
26517                                                            postHtml += `<li><a href="javascript:void(0)" onclick="copyFeedlinktoshare('${shopfeedurl}')">Copy link to share <span><i class="hgi hgi-stroke hgi-link-05"></i> </span></a></li>
26518                                                            
26519                                                            <li style="display:none"><a href="javascript:void(0)" onclick="CopyFeedTextToClipboard('contentDivID-${post.postId}')" >
26519Copy text <span><i class="hgi hgi-stroke hgi-copy-01"></i> </span></a></li>`
26520
26521                                                            postHtml += ` </ul>   
26522
26523
26524                                            </div>
26525
26526
26527                                            
26528                                        </div>
26529                                    </div>
26530                                </div>
26531
26532                                <div class="row">
26533                                    <div class="col-md-12">
26534                                        <a data-old-url="/ps/${post.username}/jumpid${post.postId}" 
26535                                                href="/ps/${post.username}/${post.postTitle.replace(/\s+/g, '-').replace(/[^\w\-]/g, '')}/jumpid${post.postId}" 
26536                                                class="blog-main-link">
26537    
26538                                        
26539                                            <div class="blog-main-image mb-10 blog-section"> 
26540                                                ${hasImage ? `
26541                                                    <img loading="lazy" src="${post.postFiles[0].imagepath}" alt="Jumpspree">
26542                                                ` : ''}
26543                                                
26544                                                <div class="blog-title-feed">
26545                                                    <div class="article-label">
26546                                                        <label>Article</label>
26547                                                    </div>  
26548                                                    <div class="article-title">${post.postTitle}</div>
26549                                                    <div class="date" style="border: none;padding: 0;">
26550                                                        <ul class="d-flex m-0" style="padding: 0;">
26551                                                            <li>Published</li>              
26552                                                            <li>${post.pdate}</li>
26553                                                            <li><span>&bull;</span></li>
26554                                                            <li>${post.ptime}</li>
26555                                                        </ul>
26556                                                    </div>
26557                                                </div>
26558                                            </div>
26559                                        </a>
26560                                    </div>
26561                                </div>
26562
26563                                <div style="display:none" class="row">
26564                                    <div class="col-md-12">
26565                                        <div class="date">
26566                                            <ul class="d-flex m-0">
26567                                                    <li>${post.pdate}</li>
26568                                                <li><span>&bull;</span></li>
26569                                                <li>${post.ptime}</li>
26570                                            </ul>
26571                                        </div>
26572                                    </div>
26573                                </div>
26574
26575                                    <div class="row">
26576                                    <div class="col-md-12">
26577                                        <div class="date ogl pt-0">
26578                                            <ul class="d-flex align-items-start pt-0">
26579                                                <li style="display:none"  class="comment-post">
26580                                                    
26581                                                <a href="javascript:void(0)" onclick="openCommentPopup('${post.username}', '${post.name}', ${post.postId}, '${currentUser}', '${currentUserName}')"> 
26582                                                        <span class="c-img">
26583                                                            <i class="fa-regular fa-message-middle" aria-hidden="true"></i></span> <span class="c-img">${post.comments}</span>
26584                                                    </a>
26585                                                </li>
26586                                                
26587                                                <li class="like-post">
26588                                                    <a href="javascript:void(0)"  class="like-button ${post.liked == '1' ? 'likeIsActive' : 'likeIsDeactive'}"   data-postid="${post.postId}">
26589                                                        <span class="c-img">
26590                                                            <img src="${post.liked == '1' ? 'https://www.jumpspree.com/public/images/heart-filled.png?ver:3.015' : 'https://www.jumpspree.com/public/images/favourite-stroke-rounded.png?ver:1.05'}" alt="Like" title="Like"></span>
26591                                                        <span style="${post.likes == 0 ? 'display:none' : ''}" id="like-id-${post.postId}" class="like-count  ${post.liked == '1' ? 'likeCountIsActive' : 'likeCountIsDeactive'}">${post.hideLike == 1 ? '' : post.likes}</span>
26592                                                    </a>
26593                                                </li> 
26594                                                                        
26595                                            <li class="comment-post"> 
26596                                                                                                            <a href="javascript:void(0);" onclick="$('#signup-new-process').hide();$('#signin-new-process').fadeIn('fast')">
26597                                                            <span class="c-img">
26598                                                                <img src="https://www.jumpspree.com/public/images/comment-03-stroke-rounded.png" alt="comment" title="comment">
26599                                                            </span> 
26600                                                            <span class="c-count" style="${post.comments == 0 ? 'display:none' : ''}">${post.comments}</span>
26601                                                        </a>
26602                                                                                                    </li>
26603                    
26604                                                
26605                                            
26606                                                <li class="repost-btn share-post">
26607                                                    <a href="javascript:void(0)" 
26608                                                    class="repost-button ${post.is_reposted_by_user ? 'reposted' : 'no-repost'}" 
26609                                                    style="flex-direction:column" 
26610                                                    onclick="${post.is_reposted_by_user ? `unrepostPost('${post.postId}')` : `handleRepostDropdown(event, this)`}">
26611                                                        <span class="c-img">
26612                                                            <i style="display:none" class="fa-light fa-arrows-repeat" aria-hidden="true"></i>
26613                                                            <i class="fa-light fa-arrows-repeat ${post.is_reposted_by_user ? 'user-reposted-post' : ''}" aria-hidden="true"></i>
26614                                                        </span>
26615                                                        <span id="repost-count-${post.postId}" class="like-count" style="${post.reposted_count == 0 ? 'display:none' : ''}">
26616                                                            ${post.reposted_count}
26617                                                        </span>
26618                                                    </a>
26619                                                    <div class="drop-down-menu-share" style="display:none">
26620                                                        <ul>
26621                                                            <li>
26622                                                                <a href="javascript:void(0)" 
26623                                                                onclick="${post.is_reposted_by_user ? `unrepostPost('${post.postId}')` : `handleRepostPopup(this, '${post.postId}')`}">
26624                                                                ${post.is_reposted_by_user ? 'Undo Repost' : 'Repost'} 
26625                                                                <span><i class="fa-light fa-arrows-repeat ${post.is_reposted_by_user ? 'user-reposted-post' : ''}" aria-hidden="true"></i></span>
26626                                                                </a>
26627                                                            </li>
26628                                                            <li>
26629                                                                <a href="javascript:void(0)" 
26630                                                                class="repost-button" 
26631                                                                data-username="${post.username}"  
26632                                                                data-postprofile="${post.profile_photo || 'https://www.jumpspree.com/public/images/user-icon.png?ver:1.03'}"  
26633                                                                data-name="${post.name}" 
26634                                                                data-postid="${post.postId}" 
26635                                                                data-posttext="${encodeURIComponent(post.postText)}"
26636                                                                data-currentuser="${currentUser}" 
26637                                                                data-currentusername="${currentUserName}" 
26638                                                                onclick="openRePostPopupOnPage(this)">
26639                                                                ${post.is_reposted_by_user ? 'Remove Quote Repost' : 'Add Caption and Repost'} 
26640                                                                <sp
26640an><i class="fa-sharp fa-regular fa-pen-line"></i></span>
26641                                                                </a>
26642                                                            </li> 
26643                                                        </ul>  
26644                                                    </div>
26645                                                </li>
26646                                                                    
26647                                                <li class="view-post" style="display:none">
26648                                                    <a href="javascript:void(0)"  class="repost-button">
26649                                                        <span class="c-img">
26650                                                            <img style="width:20px !important" src="https://www.jumpspree.com/public/images/analytics-03-stroke-rounded.png" alt="view" title="view"></span>
26651                                                        <span  style="${post.viewcount == 0 ? 'display:none' : ''}"  id="like-id-${post.postId}" class="like-count">${post.viewcount}</span>
26652                                                    </a>
26653                                                </li>
26654                                                    
26655                                                
26656                                                <li class="repost-post save-bookmark" data-postid="${post.postId}">
26657                                                                                                    <a href="javascript:void(0)">
26658                                                        <span class="c-img">
26659                                                            ${post.is_wishlist == '1' ? '<img class="bookmark-active" style="height: 17px !important; width: 15px !important" src="https://www.jumpspree.com/public/images/bookmark-filled.png?v=2" alt="bookmark" title="bookmark" />'  : '<img style="height: 17px !important; width: 15px !important" class="bookmark-inactive" src="https://www.jumpspree.com/public/images/bookmark-021.png" alt="bookmark" title="bookmark" />'}
26660                                                        </span>
26661                                                    </a> 
26662                                                    
26663                                                    <a style="display:none"  href="javascript:void(0)" class="repost-button" onclick="$('#signup-new-process').hide();$('#signin-new-process').fadeIn('fast')">
26664                                                        <span class="c-img">
26665                                                            <img src="https://www.jumpspree.com/public/images/bookmark-021.png" alt="bookmark" title="bookmark" id="bookmarkicon" onclick="bookmark('')" />
26666                                                        </span>
26667                                                    </a>
26668                                                                                            </li>
26669
26670                                                
26671                                                                    
26672                                                <li class="share-post uplad hide-on-desktop" style="display:none !important">
26673                                                    <a href="javascript:void(0)" class="share-button">
26674                                                        <img src="https://www.jumpspree.com/public/images/share-outline.png" alt="Share" title="Share">
26675                                                    </a>
26676                                                </li>                    
26677                                                                    
26678                                                                    
26679                                                <li class="view-post" style="display:none">
26680                                                    <a href="javascript:void(0)">
26681                                                        <span class="c-img"><img style="width:20px !important" src="https://www.jumpspree.com/public/images/analytics-03-stroke-rounded.png" alt="view" title="view"> </span> 
26682                                                    <span class="c-count" style="${post.viewcount == 0 ? 'display:none' : ''}">${post.viewcount}</span>
26683
26684                                                    </a>
26685                                                </li>                    
26686                                                
26687                                                <li class="share-post uplad hide-on-desktop" style="display:block !important">
26688                                                    <a href="javascript:void(0)" class="share-button"  onclick="window.event.cancelBubble = true; openPostShareDialog('${post.postId}','${post.username}'); $('.drop-down-menu-share').hide(); $('#embed-code').removeClass('embed-in');">
26689                                                        <span class="c-img share05">
26690                                                                        <img src="https://www.jumpspree.com/public/images/plane-share.png" alt="Share" title="Share" style="filter:invert()!important">
26691                                                                </span>
26692                                                    </a>
26693                                                </li>
26694                                                            
26695                                                        
26696                                                <li class="share-post uplad" style="display:none !important">
26697                                                    <a href="javascript:void(0)" class="share-button-desktop" onclick="window.event.cancelBubble = true;$('.drop-down-menu-share').hide();$(this).next().fadeToggle(200);">
26698                                                        <span class="c-img">
26699                                                                        <i class="fa-solid fa-ellipsis" aria-hidden="true"></i>
26700                                                                </span>
26701                                                    </a>
26702                                                                    <div class="drop-down-menu-share" style="display:none">
26703                                                                        <ul>
26704                                                                        <!-- <li><a href='javascript:void(0)' onclick="window.event.cancelBubble = true; $('#share-site-link').addClass('share-in-open'); $('.drop-down-menu-share').hide();$('#embed-code').removeClass('embed-in');">Share <span><i class="fa-regular fa-arrow-up-from-bracket"></i> </span>  </a></li> -->
26705
26706
26707                                                                        <li>
26708                                                                            <a href='javascript:void(0)' 
26709                                                                            onclick="window.event.cancelBubble = true; openShareDialog('post-${post.postId}'); $('.drop-down-menu-share').hide(); $('#embed-code').removeClass('embed-in');">
26710                                                                                Share 
26711                                                                                <span><i class="fa-regular fa-arrow-up-from-bracket"></i></span>
26712                                                                            </a>
26713                                                                        </li>
26714
26715
26716                                                                        <li><a href='javascript:void(0)'>Copy link to share <span><i class="hgi hgi-stroke hgi-link-05"></i> </span></a></li>
26717                                                                        <li><a href='javascript:void(0)'>Copy text <span><img src="https://www.jumpspree.com/public/images/copy-text.png?ver:1.02" alt="Copy" title="Copy"> </span></a></li>
26718                                                                        <li style="display:none"><a href='javascript:void(0)' onclick="window.event.cancelBubble = true; $('#embed-code').addClass('embed-in'); $('.drop-down-menu-share').hide(); $('#share-site-link').removeClass('share-in-open');">Embed <span><img src="https://www.jumpspree.com/public/images/embed.png?ver:1.05" alt="Jumpspree" style="max-width: 20p
26718x !important;"> </span></a></li>
26719                                                                        </ul>  
26720                                                                        </div>
26721                
26722                                                </li>
26723                                            </ul>
26724                                        </div>
26725                                    </div>
26726                                </div>
26727
26728
26729
26730
26731                            </div>
26732                        
26733                    
26734            `;
26735
26736
26737
26738
26739
26740        } else  if (post.is_blog === '2') {
26741            // Poll Design
26742            const totalVotes = post.poll_options.reduce((total, option) => total + option.votes, 0);
26743            postHtml = `
26744                <div data="pollStatic" data-is-blog="${post.is_blog}" data-source="${post.source}" class="email-box ${dynamicCss} dp${post.postId}" id="ni${post.postId}" >
26745                        <div class="row user-sec-strip2">
26746                        <div class="col-md-12">
26747                            <div class="fnc mt-0 justify-content-between mb-9 align-items-start">
26748                                <div class="d-flex align-items-center">
26749                                
26750                                    <a href="/${post.username}" class="fig">
26751                                        <div id="online-dot-${post.postId}" class=" ${onlineStatusClass}"></div>
26752                                        <img src="${post.profile_photo || 'https://www.jumpspree.com/public/images/user-icon.png?ver:1.038'}" 
26753                                            style="border-radius:50%" 
26754                                            alt="Profile Photo" title="Profile Photo">
26755                                    </a>
26756                                    <div class="fnc-title">
26757                                        <h4 class="notranslate">
26758                                            <a href="/${post.username}" class="profile-link">@${post.username}</a>
26759                                            ${post.is_verified == 1 ? '<img src="https://www.jumpspree.com/public/images/blue-cube.png" class="blue-cube-icon" alt="Verified Icon" title="Verified Icon">' : ''}
26760                                                            
26761                                                        <div data-uoutput="${post.pdate} ${post.ptime}" class="datenew">
26762                                                            ${formatPostDate(post.pdate + ' ' + post.ptime)}
26763                                                        </div>
26764
26765                                        </h4>
26766                                        <p style="display:none">
26767                                            <a href="/${post.username}" class="profile-link">@${post.username}</a>
26768                                        </p>
26769                                            <div id="follow-card-box" class="fcb">
26770                                                <div class="follow-card">
26771                                                    <div class="card-top">
26772                                                    <div class="user-icon">
26773                                                    <div id="online-dot-${post.postId}" class=" ${onlineStatusClass}"></div>
26774                                                        <img src="${post.profile_photo || 'https://www.jumpspree.com/public/images/user-icon.png?ver:1.03'}" alt="Jumpspree">
26775                                                    </div>
26776                                                <img src="${post.cover_photo || 'https://www.jumpspree.com/public/images/cover-placeholdernew.jpg?ver:1.03'}" alt="Jumpspree">     
26777                                                    </div>
26778                                                    <div class="card-inside">
26779                                                        <div class="user-name-section d-flex justify-content-between">
26780                                                            <div class="name">
26781                                                                <h2>${post.name} ${post.is_verified == 1 ? '<img src="https://www.jumpspree.com/public/images/blue-cube.png" class="blue-cube-icon" alt="Verified Icon" title="Verified Icon">' : ''}</h2>
26782                                                                <p>@${post.username}</p>
26783                                                            </div>
26784
26785                                                        ${currentUserName !== post.username ? `
26786                                                                        <div class="follow-btn">
26787                                                                            <a id="fbtn${post.postId}" href="javascript:void(0)" 
26788                                                                            class="${post.is_follow == 1 ? 'isFollowing' : 'notFollowing'}" 
26789                                                                            onclick="${post.session == 0 
26790                                                                            ? `$('#signin-new-process').fadeIn('fast'); $('body').addClass('overflow-hidden');` 
26791                                                                            : post.session != 1 
26792                                                                            ? '' 
26793                                                                            : `followUser('${post.userId}', '${post.private}', this)`}">
26794                                                                            ${post.is_follow == 1 ? 'Following' : 'Follow'}
26795                                                                            </a>
26796                                                                        </div>
26797                                                                        ` : ''}
26798                                                        
26799                                                        </div>
26800                                                        <div class="stats d-flex justify-content-strat">
26801                                                                            <div class="stat" style="cursor:pointer" onclick="window.location.href='https://www.jumpspree.com/followers/${post.username}'">
26802                                                                                <a href="https://www.jumpspree.com/followers/${post.username}">${post.followers} Followers</a>
26803                                                                            </div>
26804                                                                            <div class="stat">
26805                                                                                •
26806                                                                            </div>
26807
26808                                                                                
26809                                                                                <div class="stat" style="cursor:pointer" onclick="window.location.href='https://www.jumpspree.com/followings/${post.username}'">
26810                                                                                <a href="https://www.jumpspree.com/followings/${post.username}">${post.followings} Following</a>
26811                                                                            </div>
26812                                                                        </div>
26813                                                                        
26814                                                        <div class="bio">
26815                                                            <p>${post.about_us}</p>
26816                                                        </div>                   
26817                                                    </div>
26818                                                </div>
26819                                            </div>
26820                                    </div>
26821                                </div>
26822                                <div class="profile-drop-down">
26823                                    <a href="javascript:void(0)" onclick="window.event.cancelBubble = true;$(this).next().slideToggle('fast')" aria-label="drop down"><i class="fa-regular fa-ellipsis" aria-hidden="true"></i></a>
26824                                    
26825                                                    
26826                                            
26827                                                    <ul> `;
26828                                                if(post.session == 1){      
26829                                                
26830                                                    if(post.self != 1){     
26831
26832
26833                                                    postHtml += ` <li >
26834                                                        <a href="javascript:void(0)" onclick="postNotInterested('${post.postId}')">
26835                                                        Not interested in this post <sp
26835an><i class="hgi hgi-stroke hgi-meh"></i></span>
26836                                                        </a>
26837                                                    </li>
26838
26839                                                    <li>
26840                                                        <a href="javascript:void(0)" onclick="socialFeedMuteUser(this, '${post.user_token}')">
26841                                                        ${post.mute == "1" ? `<span>Unmute @${post.username}</span>` : `<span>Mute @${post.username}</span>`}
26842                                                        <i class="fa-regular fa-volume-slash"></i>
26843                                                        </a>
26844                                                    </li>
26845                                                    <li>
26846                                                        <a href="javascript:void(0)" data-bu="${post.block}" id="bk${Math.floor(1000000 + Math.random() * 100000)}"  onclick="socialFeedBlockUser(this, '${post.user_token}','${post.username}')"><span>
26847                                                        ${post.block == "1" ? `Unblock @${post.username}` : `Block @${post.username}`}</span>
26848                                                        <i class="hgi hgi-stroke hgi-unavailable"></i>
26849                                                        </a>
26850                                                    </li>
26851                                                    <li>
26852                                                        <a href="javascript:void(0)" onclick="mentionUser('${post.username}')">
26853                                                        Mention @${post.username} <i class="hgi hgi-stroke hgi-at"></i>
26854                                                        </a>
26855                                                    </li>
26856                                                    <li>
26857                                                        <a href="javascript:void(0)" onclick="openPostReportPopup(${post.postId}, this)">
26858                                                        Report post <i class="fa-regular fa-circle-exclamation"></i>
26859                                                        </a>
26860                                                    </li>`;
26861
26862                                                    }else{
26863
26864                                                        postHtml += `<!-- <li>
26865                                                        <a href="javascript:void(0)" ">
26866                                                        Share <i class=" fa-regular fa-arrow-up-from-bracket"></i>
26867                                                        </a>
26868                                                    </li> -->
26869                                                    <li>
26870                                                        <a href="javascript:void(0)" style="color: #ff0026 !important; " onclick="deleteOwnPostPoll(this,'${post.postId}','poll')">
26871                                                        Delete <i class="hgi hgi-stroke hgi-delete-02"></i>
26872                                                        </a>
26873                                                    </li>
26874                                                    `;
26875
26876                                                    }
26877                                                }else{
26878
26879                                                    postHtml += `<li style="display:none">
26880                                                        <a href="javascript:void(0)" "onclick="window.event.cancelBubble = true; openPostShareDialog('${post.postId}','${post.username}'); $('.drop-down-menu-share').hide(); $('#embed-code').removeClass('embed-in');"
26881                                                        Share <i class=" fa-regular fa-arrow-up-from-bracket1"></i>
26882                                                        </a>
26883                                                    </li>`;
26884
26885                                                }
26886                                                
26887                                                postHtml += `<li><a href="javascript:void(0)" onclick="copyFeedlinktoshare('${shopfeedurl}')">Copy link to share <span><i class="hgi hgi-stroke hgi-link-05"></i> </span></a></li>
26888                                                
26889                                                `
26890
26891                                                postHtml += ` </ul>   
26892
26893
26894                                </div>
26895                            </div>
26896                        </div>
26897                    </div>
26898
26899
26900                     <a href="/ps/${post.username}/jumpid${post.postId}">    
26901                        <div class="row">
26902                            <div class="col-md-12">
26903                                <div class="feed-poll-both">
26904                                    <div class="feed-poll-inner">
26905                                        <div class="poll-question">${post.postTitle}</div>
26906
26907                                            <div class="poll-options">
26908                                            ${post.poll_options.map(option => {
26909                                                let percentage = totalVotes > 0 ? (option.votes / totalVotes) * 100 : 0;
26910                                                let isChecked = post.has_voted == 1 && post.user_voted_option_id == option.id ? 'checked' : '';
26911                                                
26912                                                let isPollEnded = post.poll_closed == 1 ? true : false;
26913                                                let isDisabled = (post.has_voted == 1 || isPollEnded) ? 'disabled' : '';
26914
26915                                                let checkClass = ''; 
26916                                                let  isHide  = 'hide'; 
26917                                                
26918                                                if (post.has_voted == '1') {
26919                                                    checkClass = isChecked === 'checked' ? 'checkedhai' : 'checkednahihai';
26920                                                    // isHide = isChecked === 'checked' ? 'Unhide' : 'hide';
26921                                                    isHide = (isChecked === 'checked' && userData.user_token) ? 'Unhide' : 'hide';
26922                                                }
26923                                                if (!userData.user_token) {
26924                                                    isHide = 'hide';
26925                                                }
26926
26927                                                return `
26928                                                    <div class="poll-option">
26929                                                        <label class="${checkClass}">
26930                                                            <div class="poll-percentage-bar" data-option-id="${option.id}" style="width:${percentage}%;">
26931                                                                ${option.option} <span class="percent-text hide">${percentage.toFixed(2)}</span>
26932                                                            </div>
26933                                                            <input  class="${isHide}"
26934                                                                onClick="voteMyPoll('${option.id}', '${userData.user_token}', '${post.postId}')" 
26935                                                                type="radio" 
26936                                                                name="poll${post.postId}" 
26937                                                                value="${option.id}" 
26938                                                                ${isChecked} ${isDisabled}>
26939                                                        </label>
26940                                                    </div>
26941                                                `;
26942                                            }).join('')}
26943                                        </div>
26944
26945
26946
26947                                        <div class="d-flex poll-view-details align-items-center">    
26948                                        <div class="votes">${totalVotes} votes</div>
26949                                        <div class="poll-divider">&bull;</div>
26950                                        <div class="poll-ending">${post.poll_time_remaining	} </div>
26951                                        </div>
26952                                    </div>
26953
26954                                    <div class="participate-confidently">
26955                                        <div class="icon"><img src="https://www.jumpspree.com/public/images/poll--icon.png?ver:1.02"></div>
26956                                        <div class="text-note">
26957                                            <h5>Participate Confidently</h5>
26958                                            <p>Jumpspree keeps your profile private. Only the poll owner can view the participants.</p>
26959                                        </div>
26960                                    </div>
26961
26962                                    <div class="created-by" style="display:none">
26963                                        <h6>Created by</h6>
26964                                        <div class="d-flex">
26965                                            <!-- Link wrapping the profile photo -->
26966                                            <a href="/${post.username}" class="fig">
26967                                                <div id="online-dot-${post.postId}" class=" ${onlineStatusClass}"></div>
26968                                                <img src="${post.profile_photo || 'https://www.jumpspree.com/public/images/user-icon.png?ver:1.035?ver:1.03'}" 
26969                                                    style="border-radius:50%" 
26970                                                    alt="Profile Photo" title="Profile Photo">
26971                                            </a>
26972
26973                                            <div class="fnc-title">
26974                                                <!-- Link wrapping the profile name -->
26975                                                <h4>
26976                                                    <a href="/${post.username}" class="profile-link">
26977                                                        ${post.name}
26978                                                    </a>
26979                                                    ${post.is_verified == 1 ? '<img src="https://www.jumpspree.com/public/images/blue-cube.png" class="blue-cube-icon" alt="Verified Icon" title="Verified Icon">' : ''}
26980                                                </h4>
26981
26982                                                <!-- Link wrapping the username -->
26983                                                <p>
26984                                                    <a href="/${post.username}" class="profile-link">
26985                                                        @${post.username}
26986                                                    </a>
26987                                                </p>
26988                                            </div>
26989                                        </div>
26990                                    </div>
26991                                </div>
26992                            </div>
26993                        </div>
26994
26995                    </a>
26996
26997
26998                    <div style="display:none" class="row">
26999                        <div class="col-md-12">
27000                            <div class="date">
27001                                <ul class="d-flex m-0">
27002                                    <li>${post.pdate}</li>
27003                                    <li><span>&bull;</span></li>
27004                                    <li>${post.ptime}</li>
27005                                </ul>
27006                            </div>
27007                        </div>
27008                    </div>
27009
27010
27011                    ${footerButtonsForAll}
27012                    
27013
27014                    
27015                </div>
27016            `;
27017        } 
27018        
27019        else if (post.is_blog == 0 || post.is_blog === '0')  {
27020            // Post Design with Images/Videos
27021            //const mediaContent = generateMediaContent(post.postFiles);
27022            const mediaContent = generateMediaContent(post.postFiles, post, _pi);
27023
27024            const imageCount = post.postFiles.filter(file => 
27025                file.imagepath.endsWith('.jpeg') || 
27026                file.imagepath.endsWith('.jpg') || 
27027                file.imagepath.endsWith('.png') || 
27028                file.imagepath.endsWith('.heic') || 
27029                file.imagepath.endsWith('.gif') ||
27030                 file.imagepath.endsWith('.webp')
27031            ).length;
27032
27033                        
27034            // Assuming postText is available
27035            const youtubeLinkCount = countYouTubeLinks(post.postText);
27036            const carouselClass = imageCount > 1 || youtubeLinkCount > 1 ? 'swiper mySwiper' : 'post-single-image';
27037            
27038            const twimages = imageCount === 2 ? 'tw-images' : 'mtw-images';
27039             const threeimages = imageCount === 3 ? 'three-images' : 'mtw-images';
27040
27041            //const carouselClass = imageCount > 1 ? 'owl-carousel owl-theme' : '';
27042            carouselClassRePost = "";
27043            // carosel css for repost desin 
27044            if (post?.quoteDetails?.postFiles?.length) {
27045
27046                const imageFiles = post.quoteDetails.postFiles.filter(file => {
27047                    const cleanImagePath = file.imagepath.split('?')[0];
27048                    return cleanImagePath.match(/\.(jpeg|jpg|png|gif|webp|heic)$/i);
27049                });
27050
27051                const carouselClassRePost = imageFiles.length > 1 ? 'owl-carousel owl-theme' : '';
27052
27053            } else {
27054                // Handle the case where post.quoteDetails or postFiles is null/undefined
27055                //console.error("post.quoteDetails is null or postFiles is empty");
27056                //return ''; // or return a fallback HTML
27057            }
27058            if(post.is_wishlist=='1'){
27059                wishlistclass="fa-solid";
27060            }else{
27061                wishlistclass="fa-regular";
27062            }
27063
27064            const urls = extractUrls(post.postText);
27065            const urlCount = urls.length;
27066            const carouselClass2 = urlCount > 1 ? 'swiper mySwiper' : 'post-single-image';
27067            const kapil = urlCount > 1 ? 'link-carousel' : 'link-no-carousel';
27068
27069           // console.log(post.postText);
27070           // console.log("______________________________");
27071           // console.log(urls);
27072
27073            
27074            const hasImage =
27075            post.postFiles &&
27076            post.postFiles.length > 0 &&
27077            post.postFiles[0].imagepath &&
27078            post.postFiles[0].imagepath.trim() !== '';
27079
27080            const containerClass = `email-box article-feed ${hasImage ? 'article-feed-has-image' : 'article-feed-no-image'} ${dynamicCss} dp${post.postId}`;
27081           
27082            const hideClassIfnoImage = hasImage ? 'imageFound"' : 'noImageFound"';
27083
27084
27085            let inlineStyle = '';
27086            if (
27087                post.quoteDetails &&
27088                (post.quoteDetails.is_blog == 1 || post.quoteDetails.is_blog === '1') &&
27089                (post.quoteDetails.source == 1 || post.quoteDetails.source === '1')
27090                ) {
27091                inlineStyle = 'display: none;';
27092            }
27093
27094
27095            let hideProduct = '';
27096            if (
27097                post.quoteDetails &&
27098                (post.quoteDetails.is_blog == 0 || post.quoteDetails.is_blog === '0') &&
27099                (post.quoteDetails.source == 1 || post.quoteDetails.source === '1')
27100                ) {
27101                hideProduct = 'display: none;';
27102            }
27103
27104            postHtml = ` 
27105               <div style="${inlineStyle}" data="postStatic" 
27106                    data-is-blog="${post.is_blog}" data-source="${post.source}" 
27107                    class="email-box ${post.is_reposted_version ? 'repost-wrapper ' : ''}${dynamicCss} dp${post.postId}" 
27108                        id="ni${post.postId}">
27109                  <div class="row user-sec-strip2">
27110                        <div class="col-md-12">
27111 ${post.is_reposted_version && post.reposted_by ? `
27112                                        <div class="repost-header repost-wrapper-main">
27113                                            <i class="fa-light fa-arrows-repeat"></i>
27114                                            <span>
27115                                                ${post.reposted_by.is_self ? 
27116                                                    'You reposted' : 
27117                                                    `<a href="/${post.reposted_by.username}">@${post.reposted_by.username}</a> reposted`
27118                                                }
27119                                            </span>
27120                                        </div>
27121                                    ` : ''}
27122
27123                            <div class="fnc mt-0 justify-content-between mb-9 align-items-start">
27124
27125                                <div class="d-flex align-items-center">
27126                                  
27127                                
27128                                   
27129                                    <a href="/${post.username}" class="fig">
27130                                        <div id="online-dot-${post.postId}" class=" ${onlineStatusClass}"></div>
27131                                        <img loading="lazy" src="${post.profile_photo || 'https://www.jumpspree.com/public/images/user-icon.png?ver:1.038'}" 
27132                                            style="border-radius:50%" 
27133                                            alt="Profile Photo" title="Profile Photo">
27134                                    </a>
27135                                    <div class="fnc-title">
27136                                        <h4 class="notranslate">
27137                                            <a href="/${post.username}" class="profile-link">@${post.username}</a>
27138                                            ${post.is_verified == 1 ? '<img src="https://www.jumpspree.com/public/images/blue-cube.png" class="blue-cube-icon" alt="Verified Icon" title="Verified Icon">' : ''}
27139                                                            
27140                                                        <div data-uoutput="${post.pdate} ${post.ptime}" class="datenew">
27141                                                            ${formatPostDate(post.pdate + ' ' + post.ptime)}
27142                                                        </div>
27143
27144                                        </h4>
27145                                        <p style="display:none"><a href="/${post.username}" class="profile-link">@${post.username}</a></p>
27146                                            <div id="follow-card-box" class="fcb">
27147                                                <div class="follow-card">
27148                                                    <div class="card-top">
27149                                                    <div class="user-icon">
27150                                                    <div id="online-dot-${post.postId}" class=" ${onlineStatusClass}"></div>
27151                                                        <img loading="lazy" src="${post.profile_photo || 'https://www.jumpspree.com/public/images/user-icon.png?ver:1.03'}" alt="Jumpspree">
27152                                                    </div>
27153                                                <img loading="lazy" src="${post.cover_photo || 'https://www.jumpspree.com/public/images/cover-placeholdernew.jpg?ver:1.03'}" alt="Jumpspree">     
27154                                                    </div>
27155                                                    <div class="card-inside">
27156                                                        <div class="user-name-section d-flex justify-content-between">
27157                                                            <div class="name">
27158                                                                <h2>@${post.username} ${post.is_verified == 1 ? '<img src="https://www.jumpspree.com/public/images/blue-cube.png" class="blue-cube-icon" alt="Verified Icon" title="Verified Icon">' : ''}</h2>
27159                                                                <h2 style="display:none">${post.name} ${post.is_verified == 1 ? '<img src="https://www.jumpspree.com/public/images/blue-cube.png" class="blue-cube-icon" alt="Verified Icon" title="Verified Icon">' : ''}</h2>
27160                                                                <p style="display:none">@${post.username}</p>
27161                                                            </div>
27162
27163                                                        ${currentUserName !== post.username ? `
27164                                                                        <div class="follow-btn">
27165                                                                        <a id="fbtn${post.postId}" href="javascript:void(0)" 
27166                                                                        class="${post.is_follow == 1 ? 'isFollowing' : 'notFollowing'}" 
27167                                                                        onclick="${post.session == 0 
27168                                                                        ? `$('#signin-new-process').fadeIn('fast'); $('body').addClass('overflow-hidden');`
27169                                                                        : post.session != 1 
27170                                                                        ? '' 
27171                                                                        : `followUser('${post.userId}', '${post.private}', this)`}">
27172                                                                        ${post.is_follow == 1 ? 'Following' : 'Follow'}
27173                                                                        </a>
27174                                                                        </div>
27175                                                                        ` : ''}
27176                                                        
27177                                                        </div>
27178                                                        <div class="stats d-flex justify-content-strat">
27179                                                                            <div class="stat" style="cursor:pointer" onclick="window.location.href='https://www.jumpspree.com/followers/${post.username}'">
27180                                                                                <a href="https://www.jumpspree.com/followers/${post.username}">${post.followers} Followers</a>
27181                                                                            </div>
27182                                                                            <div class="stat">
27183                                                                                •
27184                                                                            </div>
27185
27186                                                                                
27187                                                                                <div class="stat" style="cursor:pointer" onclick="window.location.href='https://www.jumpspree.com/followings/${post.username}'">
27188                                                                                <a href="https://www.jumpspree.com/followings/${post.username}">${post.followings} Following</a>
27189                                                                            </div>
27190                                                                        </div>
27191                                                                        
27192                                                        <div class="bio">
27193                                                            <p>${post.about_us}</p>
27194                                                        </div>                   
27195                                                    </div>
27196                                                </div>
27197                                            </div>
27198                                    </div>
27199                                </div>
27200                                <!-- Dropdown menu code -->
27201                                <div class="profile-drop-down">
27202                                                    <a href="javascript:void(0)" onclick="window.event.cancelBubble = true;$('.more-setting-pop').removeClass('more-settings');
27202$('.status .profile-drop-down > ul').hide();$(this).parents('.email-box').siblings().find('.profile-drop-down > ul').hide();$(this).next().slideToggle('fast');$('.user-sec-strip').removeClass('zin9');$(this).parents('.user-sec-strip').addClass('zin9')" aria-label="drop down"><i class="fa-regular fa-ellipsis" aria-hidden="true"></i></a>
27203                                                    
27204                                                
27205                                                
27206                                                <ul> `;
27207                                                if(post.session == 1){      
27208                                                
27209                                                    if(post.self != 1){     
27210
27211
27212                                                    postHtml += ` <li >
27213                                                        <a href="javascript:void(0)" onclick="postNotInterested('${post.postId}')">
27214                                                        Not interested in this post <span><i class="hgi hgi-stroke hgi-meh"></i></span>
27215                                                        </a>
27216                                                    </li>
27217
27218                                                    <li>
27219                                                        <a href="javascript:void(0)" onclick="socialFeedMuteUser(this, '${post.user_token}')">
27220                                                        ${post.mute == "1" ? `<span>Unmute @${post.username}</span>` : `<span>Mute @${post.username}</span>`}
27221                                                        <i class="fa-regular fa-volume-slash"></i>
27222                                                        </a>
27223                                                    </li>
27224                                                    <li>
27225                                                        <a href="javascript:void(0)" data-bu="${post.block}" id="bk${Math.floor(1000000 + Math.random() * 100000)}"  onclick="socialFeedBlockUser(this, '${post.user_token}','${post.username}')"><span>
27226                                                        ${post.block == "1" ? `Unblock @${post.username}` : `Block @${post.username}`}</span>
27227                                                        <i class="hgi hgi-stroke hgi-unavailable"></i>
27228                                                        </a>
27229                                                    </li>
27230                                                    <li>
27231                                                        <a href="javascript:void(0)" 
27232                                                        id="fu${Math.floor(1000000 + Math.random() * 100000)}"
27233                                                        onclick="socialFeedFollowUser('${post.userId}', '${post.private}', this)">
27234
27235                                                            <span>
27236                                                                ${post.is_follow == 1 ? 'Unfollow @' + post.username : 'Follow @' + post.username}
27237                                                            </span> 
27238                                                            <i class="hgi hgi-stroke hgi-user-check-02"></i>
27239                                                        </a>
27240                                                    </li>
27241
27242                                                    <li>
27243                                                        <a href="javascript:void(0)" onclick="mentionUser('${post.username}')">
27244                                                        Mention @${post.username} <i class="hgi hgi-stroke hgi-at"></i>
27245                                                        </a>
27246                                                    </li>
27247                                                    <li>
27248                                                        <a href="javascript:void(0)" onclick="openPostReportPopup(${post.postId}, this)">
27249                                                        Report post <i class="fa-regular fa-circle-exclamation"></i>
27250                                                        </a>
27251                                                    </li>`;
27252
27253                                                    }else{
27254
27255                                                        postHtml += `<!-- <li>
27256                                                        <a href="javascript:void(0)" ">
27257                                                        Share <i class=" fa-regular fa-arrow-up-from-bracket"></i>
27258                                                        </a>
27259                                                    </li> -->
27260                                                    <li>
27261                                                        <a href="javascript:void(0)" style="color: #ff0026 !important; " onclick="deleteOwnPostPoll(this,'${post.postId}','post')">
27262                                                        Delete <i class="hgi hgi-stroke hgi-delete-02"></i>
27263                                                        </a>
27264                                                    </li>
27265                                                    `;
27266
27267                                                    }
27268                                                }else{
27269
27270                                                    postHtml += `<li style="display:none">
27271                                                        <a href="javascript:void(0)" "oncl
27271ick="window.event.cancelBubble = true; openPostShareDialog('${post.postId}','${post.username}'); $('.drop-down-menu-share').hide(); $('#embed-code').removeClass('embed-in');"
27272                                                        Share <i class=" fa-regular fa-arrow-up-from-bracket1"></i>
27273                                                        </a>
27274                                                    </li>`;
27275
27276                                                }
27277                                                
27278                                                postHtml += `<li><a href="javascript:void(0)" onclick="copyFeedlinktoshare('${shopfeedurl}')">Copy link to share <span><i class="hgi hgi-stroke hgi-link-05"></i> </span></a></li>
27279                                                
27280                                                <li><a href="javascript:void(0)" onclick="CopyFeedTextToClipboard('contentDivID-${post.postId}')" >Copy text <span><i class="hgi hgi-stroke hgi-copy-01"></i> </span></a></li>`
27281
27282                                                postHtml += ` </ul>   
27283
27284
27285                                </div>
27286                            </div>
27287                        </div>
27288                    </div>
27289
27290                    <div class="row">
27291                        <div class="col-md-12" data-id="is-blog-${post.is_blog}"  id="contentDivID-${post.postId}" >
27292                                <div class="post-text" style="${post.postText ? '' : 'display: none;'}">
27293                                    <a href="/ps/${post.username}/jumpid${post.postId}">
27294                                        <p>${postTextWithLinks}</p>
27295                                    </a>
27296                                </div>
27297
27298                            
27299                            <div  class="blog-main-image mb-10 movie-trailer alt-link ${kapil} ${hideClassIfnoImage}">
27300                                                <div class="show-image-caption">
27301                                                    <div class="embed-link">
27302                                                        <a href="javascript:void(0)" onclick="window.event.cancelBubble = true; $('#add-alt-tag-preview').addClass('embed-in');$('#add-alt-tag').removeClass('embed-in'); $('.drop-down-menu-share').hide(); $('#share-site-link').removeClass('share-in-open');">
27303                                                            Alt
27304                                                        </a>
27305                                                    </div>
27306                                                    <div class="embed-link">
27307                                                        <a href="javascript:void(0)">Open Link <i class="fa-regular fa-arrow-up-right-from-square">
27308                                                        </i>
27309                                                        </a>
27310                                                    </div>
27311                                                </div>   
27312
27313
27314                                        <div class="${carouselClass2}">   
27315                                            <div class="swiper-wrapper ${post.postFilesAspectRatio}">
27316                                                    ${urls.map((url, index) => {
27317                                                        const uniqueId = `link-preview-${post.postId}-${index}`;
27318
27319                                                        // Trigger dynamic metadata fill after DOM render
27320                                                        setTimeout(() => {
27321                                                        fetchLinkPreviewYT(url, `#${uniqueId}`);
27322                                                        }, 10);
27323
27324                                                        // Return placeholder HTML inside swiper-slide
27325                                                        return `
27326                                                        <div class="swiper-slide">
27327                                                            <div id="${uniqueId}" class="link-preview">
27328                                                            <a data-id="on-return-condition" class="postLink" href="${url}" target="_blank">
27329                                                                <sp
27329an class="trailer-image">
27330                                                                <img loading="lazy" src="" class="link-image" style="max-width:100%; display: none;" />
27331                                                                </span>
27332                                                                <span class="trailer-text imageNotAvailable">
27333                                                                <h4 class="link-title">Loading...</h4>
27334                                                                <p class="link-description">${url}</p>
27335                                                                </span>
27336                                                            </a>
27337                                                            </div>
27338                                                        </div>
27339                                                        `;
27340                                                    }).join('')}
27341                                            </div>
27342                                        </div>
27343                                        
27344                                        
27345                                    <div class="${carouselClass}">
27346                                        <div data-image-count="${imageCount}" id="swipperDivForImages" class="swiper-wrapper ${twimages} ${threeimages} ${post.postFilesAspectClass}">
27347                                
27348                                        ${post.postFiles.map(file => {
27349                                            const cleanImagePath = file.imagepath.split('?')[0]; // Strip query parameters
27350
27351                                            // Check for video formats
27352                                            if (cleanImagePath.match(/\.(mp4|webm|ogg|mov)$/i)) {
27353                                                return `
27354                                                    <div class="item video-container">
27355                                                        <video autoplay playsinline loop  muted src="${file.imagepath}" controls></video>
27356                                                    </div>
27357                                                `;
27358                                            } 
27359                                            // Check for image formats
27360                                            else if (cleanImagePath.match(/\.(jpeg|jpg|png|gif|webp|heic)$/i)) {
27361                                                return `
27362                                                    <div class="swiper-slide item"> 
27363                                                        <a data-lightbox="gallery-${post.postId}" href="${file.imagepath}">
27364
27365                                                            <img width="300" height="300" loading="lazy" src="${file.imagepath}" alt="Post Image" title="">
27366                                                        </a>  
27367                                                    </div> 
27368                                                    
27369                                                `;
27370                                            } else {
27371                                                return ''; // Unsupported formats
27372                                            }
27373                                        }).join('')}
27374                                
27375                                    </div>   <!-- end of dynamic carousel class   -->          
27376                                    </div>   <!-- end of dynamic carousel class   -->          
27377                                                    
27378                                
27379                            </div>
27380                        </div>
27381                    </div>
27382
27383
27384                    
27385                    
27386
27387
27388                    <!-- removed Repost Section OLDDDDDDDD -->  
27389                    
27390
27391
27392                    <!-- Repost Section checking null-->
27393                    ${post.quoteDetails ? `
27394                        ${post.quoteDetails.is_product == '1' ? `
27395                                <!-- Repost for PRODUCT data-->
27396                                <div class="repost-social product-repost-wrapper">
27397                                    <div class="repost-wrapper">
27398                                        <div class="email-box">
27399                                            <div class="row">
27400                                                <div class="col-md-12">
27401                                                    <div class="fnc mt-0 justify-content-between mb-9 align-items-start" style="padding: 0 15px;">
27402                                                        <div class="d-flex align-items-center">
27403                                                            ${post.quoteDetails.storeDetails?.storePhoto ? `
27404                                                                <a href="/${post.quoteDetails?.username || '#'}" class="fig">
27405                                                                    <img loading="lazy" src="${post.quoteDetails.storeDetails.storePhoto}" style="border-radius:50%" alt="Store Photo" title="Store Photo">
27406                                                                </a>
27407                                                            ` : `
27408                                                                <a href="/${post.quoteDetails?.username || '#'}" class="fig">
27409                                                                    <img loading="lazy" src="${post.quoteDetails?.profile_photo || 'https://www.jumpspree.com/public/images/user-icon.png?ver:1.035'}" style="border-radius:50%" alt="Profile Photo" title="Profile Photo">
27410                                                                </a>
27411                                                            `}
27412                                                            <div class="fnc-title">
27413                                                                <h4 class="notranslate">
27414                                                                    ${post.quoteDetails.storeDetails?.storeusername ? `
27415                                                                        <a href="/${post.quoteDetails?.username || '#'}" class="profile-link">${post.quoteDetails.storeDetails.storeusername}</a>
27416                                                                    ` : `
27417                                                                        <a href="/${post.quoteDetails?.username || '#'}" class="profile-link">@${post.quoteDetails?.username || 'User'}</a>
27418                                                                    `}
27419                                                                    ${post.quoteDetails.bluetick == 1 ? '<img src="https://www.jumpspree.com/public/images/blue-cube.png" class="blue-cube-icon" alt="Verified Icon" title="Verified Icon">' : ''}
27420                                                                </h4>
27421                                                                    
27422
27423                                                                    <div data-uoutput="${post.quoteDetails.pdate} ${post.quoteDetails.ptime}" class="datenew">
27424                                                                            ${formatPostDate(post.quoteDetails.pdate + ' ' + post.quoteDetails.ptime)}
27425                                                                    </div>
27426
27427                                                                    
27428                                                            </div>
27429                                                        </div>
27430                                                        ${post.quoteDetails.product?.sellingprice ? `
27431                                                            <div class="buy-btn">
27432                                                                <a href="/${post.quoteDetails?.username || ''}/${encodeURIComponent(slugify(post?.quoteDetails?.product?.producttitle ?? 'Product'))}/${post.quoteDetails.product?.id}" 
27433                                                                class="buy-now-button">
27434                                                                    Buy Now  
27435                                                                    <img src="https://www.jumpspree.com/public/images/tilt-arrow.png" alt="" style="width: 12px;filter: invert(1);">
27436                                                                </a>
27437                                                            </div>
27438                                                        ` : ''}
27439                                                    </div>
27440                                                </div>
27441                                            </div>
27442
27443                                            <div class="row">
27444                                                <div class="col-md-12" data-id="is-blog-${post.quoteDetails?.is_blog || '0'}" id="contentDivID-${post.quoteDetails?.postId || '4275'}">
27445                                                    <div class="post-text">
27446                                                        <p>
27447                                                                
27448                                                            <a href="/${post.quoteDetails.username}/${slugify(post?.quoteDetails?.product?.producttitle || 't')}/${post.quoteDetails.product?.id || '1176'}">
27449                                                                ${post.quoteDetails.product?.producttitle || post.quoteDetails.postText}
27450                                                            </a>
27451                                                        </p>
27452                                                    </div>
27453                                                    
27454                                                    ${post.quoteDetails.product?.sellingprice || post.quoteDetails.product?.discountedprice ? `
27455                                                        <div class="product-price-wrapper">
27456                                                            ${post.quoteDetails.product?.discountedprice ? `
27457                                                                <div class="price-main">$${post.quoteDetails.product?.discountedprice}</div>
27458                                                                ${post.quoteDetails.product?.discountPercent > 0 ? `
27459                                                                    <div style="display:none"  class="price-discount">${post.quoteDetails.product?.discountPercent}% OFF</div>
27460                                                                ` : ''}
27461                                                                <div   class="price-main-small">was $${post.quoteDetails.product?.sellingprice}</div>
27462                                                            ` : `
27463                                                                <div style="display:none"  class="price-main">$${post.quoteDetails.product?.sellingprice}</div>
27464                                                            `}
27465                                                        </div>
27466                                                    ` : ''}
27467                                                    
27468                                                    ${post.quoteDetails.product?.description ? `
27469                                                        <div style="display:none" class="product-description">
27470                                                            <p>${convertHashtagsToLinks(post.quoteDetails.product?.description.substring(0, 150) + (post.quoteDetails.product?.description.length > 150 ? '...' : ''))}</p>
27471                                                        </div>
27472                                                    ` : ''}
27473                                                    
27474                                                    <!-- Product Rating -->
27475                                                    ${post.quoteDetails.product?.rating && post.quoteDetails.product?.rating > 0 ? `
27476                                                        <div style="display:none"  class="product-rating">
27477                                                            <span class="stars">${generateStars(post.quoteDetails.product.rating)}</span>
27478                                                            <span class="rating-text">${post.quoteDetails.product.rating}</span>
27479                                                        </div>
27480                                                    ` : ''}
27481                                                    
27482                                                    <!-- Shipping Info -->
27483                                                    <div style="display:none"  class="product-shipping-info">
27484                                                        ${post.quoteDetails.product?.isFreeShipping == '1' ? `
27485                                                            <span class="shipping-badge"><i class="fa-regular fa-truck"></i> Free Shipping</span>
27486                                                        ` : ''}
27487                                                        ${post.quoteDetails.product?.inStorePickup == '1' ? `
27488                                                            <span class="pickup-badge"><i class="fa-regular fa-store"></i> In-store Pickup</span>
27489                                                        ` : ''}
27490                                                        ${post.quoteDetails.product?.sameDayDelivery == '1' ? `
27491                                                            <span class="delivery-badge"><i class="fa-regular fa-bolt"></i> Same Day Delivery</span>
27492                                                        ` : ''}
27493                                                    </div>
27494                                                    
27495                                                    ${post.quoteDetails?.postFiles?.length ? `
27496                                                        <div class="blog-main-image mb-10 movie-trailer">
27497                                                            ${(() => {
27498                                                                const firstFile = post.quoteDetails.postFiles[0];
27499                                                                const cleanImagePath = firstFile.imagepath.split('?')[0];
27500                                                                
27501                                                                // Check if image
27502                                                                if (cleanImagePath.match(/\.(jpeg|jpg|png|gif|webp|heic)$/i)) {
27503                                                                    return `
27504                                                                        <div class="lightgallery">
27505                                                                            <a href="${firstFile.imagepath}" data-lightbox="product-image">
27506                                                                                <img loading="lazy" src="${firstFile.imagepath}" alt="Product Image">
27507                                                                            </a>
27508                                                                        </div>
27509                                                                    `;
27510                                                                }
27511                                                                // Check if video
27512                                                                else if (cleanImagePath.match(/\.(mp4|webm|ogg|mov)$/i)) {
27513                                                                    return `
27514                                                                        <div class="video-container">
27515                                                                            <video loop muted controls>
27516                                                                                <source src="${firstFile.imagepath}" type="video/mp4">
27517                                                                            </video>
27518                                                                        </div>
27519                                                                    `;
27520                                                                }
27521                                                                return '';
27522                                                            })()}
27523                                                        </div>
27524                                                    ` : ''}
27525                                                </div>
27526                                            </div>
27527                                        </div>
27528                                    </div>
27529                                </div>
27530                                
27531
27532                            ` : `
27533
27534
27535
27536                            <!-- Repost for POST data (not product)-->
27537                            <div class="repost-social">
27538                                <div class="repost-wrapper">
27539                                    <div class="email-box">
27540                                        <div class="row">
27541                                            <div class="col-md-12">
27542                                                <div class="fnc mt-0 justify-content-between mb-9 align-items-start" style="padding: 0 15px;">
27543                                                    <div class="d-flex align-items-center">
27544                                                        <a href="/${post.quoteDetails?.username || '#'}" class="fig">
27545                                                            <img loading="lazy" src="${post.quoteDetails?.profile_photo || 'https://www.jumpspree.com/public/images/user-icon.png?ver:1.035'}" style="border-radius:50%" alt="Profile Photo" title="Profile Photo">
27546                                                        </a>
27547                                                        <div class="fnc-title">
27548                                                            <h4 class="notranslate">
27549                                                                <a href="/${post.quoteDetails?.username || '#'}" class="profile-link">@${post.quoteDetails?.username || 'User'}</a>
27550                                                                ${post.quoteDetails.bluetick == 1 ? '<img src="https://www.jumpspree.com/public/images/blue-cube.png" class="blue-cube-icon" alt="Verified Icon" title="Verified Icon">' : ''}
27551                                                            </h4>
27552                                                            <p style="display: none;">
27553                                                                <a href="/${post.quoteDetails?.username || '#'}" class="profile-link">
27554                                                                    @${post.quoteDetails?.username || 'unknown'}
27555                                                                </a>
27556                                                            </p>
27557                                                        </div>
27558
27559
27560                                                            <div data-uoutput="${post.quoteDetails.pdate} ${post.quoteDetails.ptime}" class="datenew">
27561                                                                    ${formatPostDate(post.quoteDetails.pdate + ' ' + post.quoteDetails.ptime)}
27562                                                            </div>
27563                                                    </div>
27564                                                </div>
27565                                            </div>
27566                                        </div>
27567
27568                                        <div class="row">
27569                                            <div class="col-md-12" data-id="is-blog-${post.quoteDetails?.is_blog || '0'}" id="contentDivID-${post.quoteDetails?.postId || '0'}">
27570                                                <div class="post-text">
27571                                                    <p>
27572                                                        <a href="/ps/${post.quoteDetails?.username || 'unknown'}/jumpid${post.quoteDetails?.postId || '0'}">
27573                                                            ${post.quoteDetails?.is_blog === '1' 
27574                                                                ? formatTextWithLineBreaksForRepostBlock(post.quoteDetails?.postTitle || '{}')
27575                                                                : convertHashtagsToLinks(post.quoteDetails?.postText || '')}
27576                                                        </a>
27577                                                    </p>
27578                                                </div>
27579                                                
27580                                                ${post.quoteDetails?.postFiles?.length ? `
27581                                                    <div class="blog-main-image mb-10 movie-trailer">
27582                                                        <div class="${post.quoteDetails.postFiles.length > 1 ? 'owl-carousel owl-theme' : ''}">
27583                                                            ${post.quoteDetails.postFiles.map(file => {
27584                                                                const cleanImagePath = file.imagepath.split('?')[0];
27585                                                                if (cleanImagePath.match(/\.(jpeg|jpg|png|gif|webp|heic)$/i)) {
27586                                                                    return `
27587                                                                        <div class="item lightgallery">
27588                                                                            <div data-src="${file.imagepath}">
27589                                                                                <a href="/ps/${post.quoteDetails?.username || 'unknown'}/jumpid${post.quoteDetails?.postId || '0'}">
27590                                                                                    <img loading="lazy" src="${file.imagepath}" width="300" height="300" alt="Repost Image" title="">
27591                                                                                </a>
27592                                                                            </div>
27593                                                                        </div>
27594                                                                    `;
27595                                                                } else if (cleanImagePath.match(/\.(mp4|webm|ogg|mov)$/i)) {
27596                                                                    return `
27597                                                                        <div class="item video-container">
27598                                                                            <video loop muted src="${file.imagepath}" controls></video>
27599                                                                        </div>
27600                                                                    `;
27601                                                                } else {
27602                                                                    return '';
27603                                                                }
27604                                                            }).join('')}
27605                                                        </div>
27606                                                    </div>
27607                                                ` : ''}
27608
27609                                                ${(() => {
27610                                                    const quoteUrls = extractUrls(post.quoteDetails?.postText || '');
27611                                                    if (!quoteUrls.length) return '';
27612                                                    return quoteUrls.map((qUrl, qIdx) => {
27613                                                        const qId = `link-preview-${post.postId}-q${qIdx}`;
27614                                                        setTimeout(() => fetchLinkPreviewYT(qUrl, `#${qId}`), 10);
27615                                                        return `
27616                                                        <div class="blog-main-image mb-10 movie-trailer alt-link">
27617                                                            <div class="post-single-image">
27618                                                                <div id="${qId}" class="link-preview">
27619                                                                    <a data-id="on-return-condition" class="postLink" href="${qUrl}" target="_blank">
27620                                                                        <sp
27620an class="trailer-image">
27621                                                                            <img loading="lazy" src="" class="link-image" style="max-width:100%; display:none;" />
27622                                                                        </span>
27623                                                                        <span class="trailer-text imageNotAvailable">
27624                                                                            <h4 class="link-title">Loading...</h4>
27625                                                                            <p class="link-description">${qUrl}</p>
27626                                                                        </span>
27627                                                                    </a>
27628                                                                </div>
27629                                                            </div>
27630                                                        </div>`;
27631                                                    }).join('');
27632                                                })()}
27633
27634                                            </div>
27635                                        </div>
27636                                    </div>
27637                                </div>
27638                            </div>
27639                        `}
27640
27641
27642                    ` : ''}
27643
27644
27645
27646
27647                    <div class="row" style="display:none">
27648                        <div class="col-md-12">
27649                            <div class="date">
27650                                <ul class="d-flex m-0">
27651                                    <li>${post.pdate}</li>
27652                                    <li><span>&bull;</span></li>
27653                                    <li>${post.ptime}</li>
27654                                </ul>
27655                            </div>
27656                        </div>
27657                    </div>
27658                    ${footerButtonsForAll}
27659                </div>        
27660            `;
27661        }
27662            
27663        
27664            //container.innerHTML += postHtml; // Append the generated HTML
27665            //container.insertAdjacentHTML('beforeend', postHtml);//beforeend 
27666            if (hashtag) {
27667                hashTagContainer.insertAdjacentHTML('beforeend', postHtml);
27668            } else {
27669                container.insertAdjacentHTML('beforeend', postHtml);
27670            }
27671        
27672    });
27673    
27674} 
27675// End of renderPosts function
27676
27677
27678/* 
27679function formatTextWithLineBreaksForRepostBlock(text) {
27680    if (!text) return ''; // Handle empty or null text
27681    const lines = text.split('\n'); // Split the text into lines
27682    return lines.map(line => `${line.trim()}<br>`).join(''); // Add <br> to each line
27683}
27684 */
27685function formatTextWithLineBreaksForRepostBlock(text) {
27686    if (!text) return '';
27687    return text.replace(/\n/g, '<br>'); // Simple, clean, efficient
27688}
27689
27690// Helper function to create URL-friendly slugs
27691function slugify(text) {
27692    return text.toString().toLowerCase()
27693        .replace(/\s+/g, '-')           // Replace spaces with -
27694        .replace(/[^\w\-]+/g, '')       // Remove all non-word chars
27695        .replace(/\-\-+/g, '-')         // Replace multiple - with single -
27696        .replace(/^-+/, '')             // Trim - from start of text
27697        .replace(/-+$/, '');            // Trim - from end of text
27698}
27699
27700function formatPostDate(dateTimeStr) {
27701    // Remove day name (Sat, Sun, etc.) and trim whitespace
27702    dateTimeStr = dateTimeStr.replace(/^[A-Za-z]+\s+/, '').trim();
27703    
27704    try {
27705        // Parse the date (06/14/25 12:29 pm)
27706        const postDate = new Date(dateTimeStr);
27707        
27708        if (isNaN(postDate.getTime())) {
27709            throw new Error("Invalid date");
27710        }
27711        
27712        const now = new Date();
27713        const diffInMs = now - postDate;
27714        const diffInDays = Math.floor(diffInMs / (1000 * 60 * 60 * 24));
27715        
27716        // Same day - return time only
27717        if (diffInDays === 0) {
27718            return postDate.toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' });
27719        }
27720        
27721        // Less than 7 days
27722        if (diffInDays < 7) {
27723            return diffInDays === 1 ? '1d' : `${diffInDays}d`;
27724        }
27725        
27726        // Less than 30 days (approx 1 month)
27727        if (diffInDays < 30) {
27728            const weeks = Math.floor(diffInDays / 7);
27729            return weeks === 1 ? '1 week ' : `${weeks} weeks`;
27730        }
27731        
27732        // Months ago
27733        const months = Math.floor(diffInDays / 30);
27734        return months === 1 ? '1 month ' : `${months} months`;
27735        
27736    } catch (e) {
27737        // If parsing fails, return the original string
27738        return dateTimeStr;
27739    }
27740}
27741
27742
27743</script>
27743
27744           
27745
27746<script>
27747     $(document).on('click', '.save-bookmark', function() {
27748        var postId = $(this).data('postid'); // Extract post ID from data attribute
27749        //var productType = $(this).data('producttype'); // Optional: Extract product type
27750        var bookmarkIcon = $(this).find('img'); // Target the icon inside the clicked element
27751
27752        // Call checkAccess to verify user authentication
27753        checkAccess(function() {
27754            $.ajax({
27755                url: base_url + '/bookmarkToggle', // API endpoint
27756                type: 'POST',
27757                data: {
27758                    pid: postId,
27759                    producttype: "3" // Optional: Include product type
27760                },
27761                dataType: 'json',
27762                success: function(response) {
27763                    if (response.status) {
27764                        // Update the bookmark icon based on the response result
27765                        if (response.result == 1) {
27766                            // Bookmark added
27767                            bookmarkIcon.removeClass('bookmark-inactive').addClass('bookmark-active');
27768                            showNotification('success', 'Added to Bookmarks');
27769                            bookmarkIcon.attr('src', 'https://www.jumpspree.com/public/images/bookmark-filled.png?v=2');
27770                        } else {
27771                            // Bookmark removed
27772                            bookmarkIcon.removeClass('bookmark-active').addClass('bookmark-inactive'); 
27773                            showNotification('success', 'Removed from Bookmarks');
27774                            bookmarkIcon.attr('src', 'https://www.jumpspree.com/public/images/bookmark-021.png');
27775                        }
27776                    } else {
27777                        console.log('Error:', response.message);
27778                    }
27779                },
27780                error: function(xhr, status, error) {
27781                    console.error('AJAX error:', error);
27782                }
27783            });
27784        });
27785    });
27786    function bookmark_old(postId){
27787        bookmarkIcon=$('#bookmarkicon'+postId)
27788        $.ajax({
27789                url: base_url + '/bookmarkToggle', // API endpoint
27790                type: 'POST',
27791                data: {
27792                    pid: postId,
27793                    producttype: "3" // Optional: Include product type
27794                },
27795                dataType: 'json',
27796                success: function(response) {
27797                    if (response.status) {
27798                        // Update the bookmark icon based on the response result
27799                        if (response.result == 1) {
27800                            // Bookmark added
27801                            showNotification('success', 'Added to Bookmarks.');
27802                            bookmarkIcon.removeClass('fa-regular').addClass('fa-solid'); // Example class change
27803                        } else {
27804                            // Bookmark removed
27805                            showNotification('success', 'Removed from Bookmarks.');
27806                            bookmarkIcon.removeClass('fa-solid').addClass('fa-regular'); // Example class change
27807                        }
27808                    } else {
27809                        console.log('Error:', response.message);
27810                    }
27811                },
27812                error: function(xhr, status, error) {
27813                    console.error('AJAX error:', error);
27814                }
27815            });
27816
27817    }
27818  </script>
27818  
27819          
27820          
27821          
27822 
27822<script src="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.js"></script>
27822
27823
27824  <!-- Initialize Swiper -->
27825  
27825<script>
27826    $(window).on('load', function(){
27827       setInterval(function(){
27828      var swiper = new Swiper(".mySwiper", {
27829      slidesPerView: 'auto',
27830      spaceBetween: 15,
27831      freeMode: true,
27832      pagination: {
27833        el: ".swiper-pagination",
27834        clickable: true,
27835      },
27836          breakpoints: {
27837    // When window width is <= 767px (mobile)
27838    0: {
27839      spaceBetween: 10,
27840    }
27841  }
27842    });  
27843           
27844    },3000)   
27845    })
27846      
27847    
27848  </script>
27848    
27849             
27850<script>
27851$(document).ready(function(){
27852    const popupKey = 'downloadAppPopupShownAt';
27853    const lastShown = localStorage.getItem(popupKey);
27854    const now = new Date().getTime();
27855    const hours24 = 24 * 60 * 60 * 1000; // 24 hours in ms
27856
27857    if (!lastShown || now - parseInt(lastShown) > hours24) {
27858        // $('#download-app-popup').fadeIn();
27859        // $('body').addClass('overflow-hidden');
27860        // $('.left_section').addClass('okld');
27861        localStorage.setItem(popupKey, now);
27862    }
27863
27864    // Optional: Close popup when clicked anywhere
27865    $('#download-app-popup').click(function(){
27866        $(this).fadeOut();
27867         $('body').removeClass('overflow-hidden');
27868        $('.left_section').removeClass('okld');;
27869    });
27870    $('#download-app-popup-inner').click(function(e){
27871        e.stopPropagation();
27872    })
27873});
27874
27875  
27876
27877
27878
27879</script>
27879  
27880
27881
27882
27883<style>
27884        .repost-btn.share-post .drop-down-menu-share ul li:last-child {
27885        display: block !important;
27886    }
27887</style>
27888
27889<script>
27890
27891
27892    $(document).ready(function () {
27893
27894        const url = new URL(window.location.href);
27895        let centrrl = sessionStorage.getItem('signinRedirectCentrlShare');
27896
27897        if(!centrrl){
27898            centrrl = url.searchParams.get("centrrl");
27899        }
27900
27901        if (!centrrl) return;
27902
27903        let decoded;
27904        try {
27905            decoded = decodeURIComponent(centrrl);
27906        } catch {
27907            return;
27908        }
27909
27910        console.log(decoded);
27911
27912
27913        // $('#social-popup').fadeIn('fast'); $('body').addClass('overflow-hidden'); $('.add-post-drop-box').hide(); $('.social-shadow').hide(); $('.add-post').removeClass('add-post-opened');$('#scheduledone').hide();$('#scheduled').val('0');$('#schedued-btn').removeClass('active');
27914        $('.add-post .plus-wrapper').each(function () {
27915            const span = $(this).find('span');
27916            const anchor = $(this).find('a');
27917
27918            if (span.length) {
27919                span.trigger('click');
27920                sessionStorage.removeItem('signinRedirectCentrlShare');
27921            } else if (anchor.length) {
27922                anchor.trigger('click');
27923                sessionStorage.setItem('signinRedirectCentrlShare', centrrl);
27924            }
27925        });
27926
27927        const editor = $("#addPostTextarea");
27928        editor.text(decoded);
27929        editor.trigger("input");
27930
27931        url.searchParams.delete("centrrl");
27932        window.history.replaceState({}, document.title, url.toString());
27933
27934
27935    });
27936</script>
27936
27937
27938<script>
27939    function openPostReportPopup(postId, element){
27940        if(!postId || postId.length === 0){
27941            return;
27942        }
27943
27944        const strip = $(element).closest('.user-sec-strip2');
27945        const parent = strip.closest('.email-box');
27946
27947        const img = strip.find('img').first();
27948        const username = strip.find('h4 .profile-link').text().trim();
27949
27950        const blueCube = strip.find('h4 .blue-cube-icon');
27951
27952        if (blueCube.length) {
27953            $('#report-username-check').show();
27954        }else{
27955            $('#report-username-check').hide();
27956        }
27957
27958        const postTextElem = parent.find('.post-text p');
27959
27960        if(postTextElem.length){
27961            let postText = postTextElem.first().text();
27962            $('#report-post-txt').text(postText);
27963            $('#report-post-txt').show();
27964        }else{
27965            $('#report-post-txt').hide();
27966        }
27967
27968        $('#report-user-img img').attr('src', img.attr('src'));
27969        // $('#report-user-desc h3').text(username);
27970        $('#report-username-txt').text(username);
27971
27972        $('#report-brand').attr('data-postid', postId);
27973        $('#report-brand').fadeIn();
27974    }
27975</script>
27975
27976       
27977       
27978  </div>
27979  
27980  <style>
27981.copy-right p a {
27982    color: #999 !important;
27983    text-decoration: underline;
27984}
27985</style>
27986   <footer>
27987               <div class="footer-inner">
27988<div class="container">
27989<!--                   <p>©2024 Jumpspree, Inc. All rights reserved.</p>-->
27990                  <div class="copy-right">
27991                        <p>©2026 Jumpspree by Nexa Platforms, Inc. <a target="_blank" href="https://www.jumpspree.com/terms-of-use">Terms</a> and <a href="https://www.jumpspree.com/privacy-policy" target="_blank">Privacy</a>.</p>
27992                   </div>
27993                   <ul class="d-flex" style="padding:0px;">
27994<!--
27995                       <li><a href="https://www.jumpspree.com/refer-and-win-with-jumpspree">Referral Program</a></li>
27996                       |
27997-->
27998                       <li><a href="https://www.jumpspree.com/blog">Blog</a></li>
27999                       |
28000                       <li><a href="https://www.jumpspree.com/terms-of-use">Terms of Use</a></li>
28001                       |
28002                       <li><a href="https://www.jumpspree.com/privacy-policy">Privacy Policy</a></li>
28003                       |
28004<!--                       <li><a href="/support">Support</a></li>-->
28005                       <li><a href="mailto:[email protected]">Support</a></li>
28006                       |
28007                       <li><a href="https://www.jumpspree.com/selling-fees">Selling Fees</a></li>
28008                       |
28009                       <li><a href="https://www.jumpspree.com/platform-guidelines">Platform Guidelines</a></li>
28010                       |
28011<!--
28012                       <li><a href="https://www.jumpspree.com/selling-fees">Shipping Guidelines</a></li>
28013                       |
28014-->
28015                       <li><a href="https://www.jumpspree.com/livestream-returns">Livestream Returns</a></li>
28016                       |
28017                       <li><a href="https://www.jumpspree.com/return-policy">Return Policy</a></li>
28018                       |
28019                       <li><a href="https://www.jumpspree.com/frequently-asked-questions">FAQs</a></li>
28020                     </ul>
28021               </div>
28022           </div>
28023</footer>
28024  
28025  <style>
28026/*      #report-on-more-option{display: none !important;}*/
28027      #report-on-more-option {
28028    background: #21212170 !important;
28029    backdrop-filter: blur(10px);
28030    -webkit-backdrop-filter: blur(10px);
28031}
28032#report-on-more-option .add-post-inner {
28033    background: #fff;
28034    max-width: 600px;
28035    height: 350px;
28036    border-radius: 25px;
28037    position: absolute;
28038    top: 0;
28039    left: 0;
28040    z-index: 9999;
28041    width: 600px;
28042    left: 50%;
28043    top: 50%;
28044    transform: translate(-50%, -50%);
28045    padding: 25px;
28046}      
28047#report-on-more-option .add-post-inner {
28048    background: #171717;
28049    border: 1px solid #3241585c;
28050    padding: 30px;
28051    border-radius: 35px;
28052    height: auto;
28053    max-width: 500px;
28054}      
28055#report-on-more-option h2 {
28056    color: #fff;
28057    font-weight: 600;
28058    font-size: 25px;
28059}
28060#report-on-more-option .cross {
28061    position: absolute;
28062    right: 30px;
28063    top: 30px;
28064    width: 34px;
28065}
28066#report-on-more-option .add-post-inner a {
28067    font-size: 18px !important;
28068    color: #444eff !important;
28069}
28070#report-on-more-option textarea {
28071    color: #fff;
28072    border: none;
28073    resize: none;
28074    height: 200px;
28075    background: none;
28076    overflow-y: auto;
28077    padding-right: 40px;
28078}
28079#report-on-more-option div#attachment-preview-container {
28080    width: 200px;
28081    position: relative;
28082    margin-bottom: 10px;
28083}
28084#report-on-more-option button#remove-attachment {
28085    position: absolute;
28086    background: no-repeat;
28087    color: #fff;
28088    border: none;
28089    background: #000000ad;
28090    width: 20px;
28091    height: 20px;
28092    color: #ffffff !important;
28093    border-radius: 70px;
28094    line-height: 7px;
28095    position: absolute;
28096    right: 5px;
28097    top: 5px;
28098}
28099.attach {
28100    position: relative;
28101    overflow: hidden;
28102    cursor: pointer;
28103}
28104.report-foot.d-flex .attach img {
28105    width: 35px;
28106}   
28107#report-on-more-option .social-popup {
28108    position: fixed;
28109    top: 0;
28110    left: 0;
28111    right: 0;
28112    bottom: 0;
28113    height: 100%;
28114    background: #6f6f6f82;
28115    z-index: 99999999999999;
28116    display: none;
28117}   
28118@media (max-width: 767px) {
28119#report-on-more-option textarea {
28120    width: 100%;
28121        padding-right: 20px;
28122    }     
28123    #report-on-more-option .add-post-inner {
28124        border: none;
28125        padding: 20px;
28126        border-radius: 0px;
28127        max-width: 500px;
28128        height: 100%;
28129        border-radius: 0;
28130        width: 100%;
28131        display: flex;
28132        flex-direction: column;
28133        background: #171717;
28134        position: absolute;
28135    }
28136.annoucement h2 {
28137        line-height: 26px;
28138    }
28139    #report-on-more-option .cross {
28140        right: 20px;
28141        top: 20px;
28142        width: 30px;
28143    }   
28144#report-on-more-option .cross img {
28145    width: 100%;
28146}    
28147#report-on-more-option .pop-inner {
28148        flex: 1;
28149    }
28150.report-foot button.send {
28151    background: none;
28152    border: 1px solid #3241585c;
28153    color: #fff;
28154    padding: 0 20px;
28155    width: auto;
28156    border-radius: 35px;
28157    font-size: 14px;
28158}
28159.report-foot .send
28160 {
28161    width: auto;
28162    margin: 0;
28163}
28164.send {
28165    margin-left: 10px;
28166    width: 40px;
28167    height: 40px;
28168}
28169.attach input {
28170    position: absolute;
28171    left: 0;
28172    height: 35px;
28173    cursor: pointer;
28174    opacity: 0;
28175}  
28176    #signup-new-process #step03 .form-box h2.signup-title, #signup-new-process #step04 .form-box h2.signup-title, #signup-new-process #step02 .form-box h2.signup-title, #signup-new-process #step05 .form-box h2.signup-title, #signup-new-process #step06 .form-box h2.signup-title {
28177        font-size: 18px !important; 
28178        margin: 0 !important;
28179        margin-bottom: 8px !important;
28180    }
28181    #signup-new-process #step03 .email-box {
28182        padding-top: 9px;
28183    }
28184}      
28185</style>
28186 
28187 <style>
28188.get-app-qr-code-wrapper {
28189    background: #000000bd;
28190}
28191.get-app-qr-code-wrapper {
28192    position: fixed;
28193    top: 0;
28194    z-index: 9999999999;
28195    bottom: 0;
28196    display: flex;
28197    align-items: center;
28198    justify-content: center;
28199    display: none;
28200    background: #00000082;
28201    left: 0;
28202    right: 0;
28203}
28204.get-app-qr-code-wrapper .email-verification.after-login {
28205    border: 1px solid #333333;
28206    border-radius: 42px;
28207}
28208body.light-mode .get-app-qr-code-wrapper .email-verification.after-login {
28209    border: 1px solid #fff;
28210}
28211.get-app-qr-code-wrapper .email-verification.after-login {
28212    padding: 30px 20px !important;
28213}
28214.get-app-qr-code-wrapper > div {
28215    background: #161616;
28216}
28217.get-app-qr-code-wrapper > div {
28218    background: #252525;
28219    max-width: 390px;
28220    height: auto;
28221    border-radius: 20px;
28222    position: absolute;
28223    top: 0;
28224    left: 0;
28225    z-index: 9999;
28226    width: 390px;
28227    left: 50%;
28228    top: 50%;
28229    transform: translate(-50%, -50%);
28230    padding: 25px;
28231    margin: 0;
28232}
28233 .get-app-qr-code-wrapper > div h4.text-center {
28234    color: #fff;
28235}
28236body.light-mode .get-app-qr-code-wrapper > div h4.text-center {
28237    color: #222;
28238}
28239.scanner img {
28240    width: 100%;
28241}
28242.close-getstart {
28243    position: absolute;
28244    right: 40px;
28245    font-size: 33px;
28246    color: #555555;
28247    top: 20px;
28248    font-weight: 100;
28249    cursor: pointer;
28250}
28251.download-btn {
28252    margin-top: 15px;
28253}
28254    .download-btn {
28255    text-align: center;
28256    width: 130px;
28257    margin: 0 auto;
28258}
28259.get-app-qr-code-wrapper .note-line p {
28260    color: #fff;
28261}
28262body.light-mode .get-app-qr-code-wrapper .note-line p {
28263    color: #222;
28264}
28265.get-androd-app {
28266    text-align: center;
28267}
28268.get-androd-app a {
28269    font-size: 12px;
28270    color: #5566FF;
28271    margin-top: 14px;
28272    display: block;
28273}
28274.get-app-qr-code-wrapper .note-line p {
28275    line-height: 18px;
28276    text-align: center;
28277    margin-top: 20px;
28278    font-size: 12px;
28279    color: #fff;
28280}
28281.get-app-qr-code-wrapper > div {
28282    background: #161616;
28283}     
28284.scanner {
28285    width: 230px;
28286    margin: 0px auto 15px;
28287    max-width: 230px;
28288} 
28289.get-app-qr-code-wrapper h4 {
28290    color: #fff;
28291    font-weight: 600;
28292    font-size: 22px;
28293    margin-bottom: 10px;
28294    line-height: 32px;
28295} 
28296    .get-app-qr-code-wrapper .email-box {
28297    width: 100%;
28298    padding: 15px;
28299}  
28300     #report-on-more-option{display: none;}     
28301@media (max-width: 767px) {
28302#sellerpad-android-app .email-verification.after-login, #sellerpad-ios-app .email-verification.after-login {
28303    max-width: 95%;
28304}    
28305    div#ios-app .email-verification.after-login, div#android-app .email-verification.after-login {
28306        width: 90%;
28307        max-width: 90%;
28308    }
28309
28310}     
28311
28312</style>
28313  
28314  
28315  <div class="get-app-qr-code-wrapper" id="ios-app" style="display:none">
28316    <div class="email-verification after-login">
28317       <div class="close-getstart" onclick="$('#ios-app').fadeOut('fast');">×</div>
28318        <div class="email-box">
28319            <h4 class="text-center">Get Jumpspree <br>for iOS</h4>
28320
28321
28322            <div class="scanner">
28323                <a target="_blank"
28324                    href="https://apps.apple.com/us/app/jumpspree-make-friends-shop/id1558701442?ign-itscg=30200&ign-itsct=apps_box_link&mttnsubad=1558701442">
28325<!--
28326                       <img
28327                        src="https://www.jumpspree.com/public/images/Jumpspree-for-iOS-2025.png?ver:1.03" alt="">
28328-->
28329                       <img
28330                        src="https://www.jumpspree.com/public/images/Jumpspree-for-iOS-n.png?ver:1.03" alt="Download" title="Download">
28331                        </a>
28332            </div>
28333
28334            <div class="download-btn">
28335                <a target="_blank"
28336                    href="https://apps.apple.com/us/app/jumpspree-make-friends-shop/id1558701442?ign-itscg=30200&ign-itsct=apps_box_link&mttnsubad=1558701442"><img
28337                        src="https://www.jumpspree.com/public/images/ios-download.png" alt="Download" title="Download"></a>
28338            </div>
28339
28340
28341            <div class="note-line">
28342                <p class="mb-0">Scan the QR code with your smartphone or tablet to download the Jumpspree app for iOS,
28343                    or simply tap the button on your mobile device.</p>
28344            </div>
28345
28346            <div class="get-androd-app">
28347                <a href="javascript:void(0);" onclick="$('#android-app').fadeIn(); $('#ios-app').hide()">Get Jumpspree
28348                    for Android instead</a>
28349            </div>
28350
28351
28352
28353        </div>
28354        <!--
28355                       <div class="action-wrapper">
28356                           <button class="btn btn-success">Claim Username</button>
28357                       </div>
28358        -->
28359    </div>
28360</div>
28361
28362<div class="get-app-qr-code-wrapper" id="android-app" style="display:none">
28363    <div class="email-verification after-login">
28364              <div class="close-getstart" onclick="$('#android-app').fadeOut('fast');">×</div>
28365
28366        <div class="email-box">
28367            <h4 class="text-center">Get Jumpspree <br>for Android</h4>
28368
28369
28370            <div class="scanner">
28371                <a target="_blank" href="https://play.google.com/store/apps/details?id=com.blueastral.cubesnack&hl=en">
28372                    <img src="https://www.jumpspree.com/public/images/Jumpspree-for-Android-n.png?ver:1.027" alt="Download" title="Download"></a>
28373            </div>
28374
28375            <div class="download-btn">
28376                <a target="_blank"
28377                    href="https://play.google.com/store/apps/details?id=com.blueastral.cubesnack&hl=en"><img
28378                        src="https://www.jumpspree.com/public/images/download-android.png" alt="Download" title="Download"></a>
28379            </div>
28380
28381
28382            <div class="note-line">
28383                <p class="mb-0">Scan the QR code with your smartphone or tablet to download the Jumpspree app for
28384                    Android, or simply tap the button on your mobile device.</p>
28385            </div>
28386
28387            <div class="get-androd-app">
28388                <a href="javascript:void(0);" onclick="$('#android-app').hide(); $('#ios-app').fadeIn()">Get Jumpspree
28389                    for iOS instead</a>
28390            </div>
28391
28392
28393
28394        </div>
28395        <!--
28396                       <div class="action-wrapper">
28397                           <button class="btn btn-success">Claim Username</button>
28398                       </div>
28399        -->
28400    </div>
28401</div>
28402   
28403   
28404   <div class="get-app-qr-code-wrapper" id="sellerpad-android-app" style="display:none">
28405    <div class="email-verification after-login">
28406              <div class="close-getstart" onclick="$('#sellerpad-android-app').fadeOut('fast');">×</div>
28407
28408        <div class="email-box" style="border: none !important;">
28409            <h4 class="text-center">Get Seller Pad <br>for Android</h4>
28410
28411
28412            <div class="scanner">
28413                <a target="_blank" href="https://play.google.com/store/apps/details?id=com.jumpspree.pad">
28414                    <img src="https://www.jumpspree.com/public/images/Seller-Pad-for-Android.png?ver:1.029" alt="Download" title="Download"></a>
28415            </div>
28416
28417            <div class="download-btn">
28418                <a target="_blank"
28419                    href="https://play.google.com/store/apps/details?id=com.jumpspree.pad"><img
28420                        src="https://www.jumpspree.com/public/images/download-android.png" alt="Download" title="Download"></a>
28421            </div>
28422
28423
28424            <div class="note-line">
28425                <p class="mb-0">Scan the QR code with your smartphone or tablet to download the Seller Pad app for
28426                    Android, or simply tap the button on your mobile device.</p>
28427            </div>
28428
28429            <div class="get-androd-app">
28430                <a href="javascript:void(0);" onclick="$('#sellerpad-android-app').hide(); $('#sellerpad-ios-app').fadeIn()">Get Seller Pad
28431                    for iOS instead</a>
28432            </div>
28433
28434
28435
28436        </div>
28437        <!--
28438                       <div class="action-wrapper">
28439                           <button class="btn btn-success">Claim Username</button>
28440                       </div>
28441        -->
28442    </div>
28443</div>
28444   
28445   <div class="get-app-qr-code-wrapper" id="sellerpad-ios-app" style="display:none">
28446    <div class="email-verification after-login">
28447              <div class="close-getstart" onclick="$('#sellerpad-ios-app').fadeOut('fast');">×</div>
28448
28449        <div class="email-box" style="border: none !important;">
28450            <h4 class="text-center">Get Seller Pad <br>for IOS</h4>
28451
28452
28453            <div class="scanner">
28454                <a target="_blank" href="https://apps.apple.com/us/app/seller-pad/id6738024608">
28455                    <img src="https://www.jumpspree.com/public/images/Seller-Pad-for-iOS.png?ver:1.028" alt="Download" title="Download"></a>
28456            </div>
28457
28458            <div class="download-btn">
28459                <a target="_blank"
28460                    href="https://apps.apple.com/us/app/seller-pad/id6738024608"><img
28461                        src="https://www.jumpspree.com/public/images/ios-download.png" alt="Download" title="Download"></a>
28462            </div>
28463
28464
28465            <div class="note-line">
28466                <p class="mb-0">Scan the QR code with your smartphone or tablet to download the Seller Pad app for
28467                    IOS, or simply tap the button on your mobile device.</p>
28468            </div>
28469
28470            <div class="get-androd-app">
28471                <a href="javascript:void(0);" onclick="$('#sellerpad-ios-app').hide(); $('#sellerpad-android-app').fadeIn()">Get Seller Pad
28472                    for android instead</a>
28473            </div>
28474
28475
28476
28477        </div>
28478        <!--
28479                       <div class="action-wrapper">
28480                           <button class="btn btn-success">Claim Username</button>
28481                       </div>
28482        -->
28483    </div>
28484</div>
28485  
28486  
28487   
28488<style>
28489footer p br {
28490    display: none;
28491}
28492    @media screen and (max-width:767px){
28493 footer p br {
28494    display: block;
28495}       
28496    }    
28497</style>  
28498   
28499   
28500<!--   
28500<script src="https://code.jquery.com/jquery-3.7.1.min.js"></script>
28500
28501-->    
28501<script src="https://ajax.aspnetcdn.com/ajax/jquery.validate/1.11.1/jquery.validate.min.js"></script>
28501
28502   
28502<script>
28503      /* $(function(){
28504  
28505           
28506$('.hamburger').click(function(){
28507    $('.nav-bar.hide-on-desktop').slideToggle('fast');
28508})           
28509      
28510           
28511          
28512           
28513  })  */
28514/*$(window).on('load', function(){
28515    setTimeout(function(){
28516        $('body').addClass('body-loaded');
28517    },2000)
28518})  */      
28519    </script>
28519
28520     
28520<script src="https://www.jumpspree.com/public/js/clipboard.min.js"></script>
28520
28521     
28521<script>
28522       $(function(){
28523      let lastScrollTop = 0;
28524  const navbarHeight = $(".header-wrapper").outerHeight();
28525  const header = $(".header-wrapper")
28526
28527  $(window).scroll(hasScrolled);
28528
28529  function hasScrolled() {
28530      
28531    const st = $(this).scrollTop();
28532    header.toggleClass("hiddeNavBar scrollup", st > lastScrollTop && st > navbarHeight );
28533    lastScrollTop = st;  
28534    //$('.announcement-popup').remove();  
28535  }
28536           
28537$('.hamburger').click(function(){
28538    $('.nav-bar.hide-on-desktop').slideToggle('fast');
28539})     
28540           
28541           
28542
28543$(document).on('keydown', function(e) {
28544    if (e.key === 'Escape' || e.keyCode === 27) {
28545        $('.get-app-qr-code-wrapper').fadeOut('fast');
28546        $('body').removeClass('overflow-hidden');
28547       
28548    }
28549});
28550  $(document).on("click", ".get-app-qr-code-wrapper", function (e) {
28551    // If clicked outside .daily-limit-box
28552    if (!$(e.target).closest(".get-app-qr-code-wrapper > .email-verification").length) {
28553        $(".get-app-qr-code-wrapper").fadeOut('fast');
28554        $("body").removeClass("overflow-hidden");
28555    }
28556});            
28557           
28558// this page
28559           
28560$( ".drop-menu" ).hover(
28561  function() {
28562    $('.sub-nav').stop().slideDown();
28563  }, function() {
28564    $('.sub-nav').stop().slideUp('fast');
28565  }
28566);   
28567           
28568           
28569
28570var clipboard = new Clipboard('.btn-copy', {
28571    text: function() {
28572        return document.querySelector('input[type=hidden]').value;
28573    }
28574});
28575clipboard.on('success', function(e) {
28576  $('.copied').fadeIn();
28577    setTimeout(function(){
28578        $('.copied').fadeOut();
28579    },1000)
28580  e.clearSelection();
28581});
28582
28583    
28584              
28585           
28586  })  
28587  
28588  
28589           
28590    </script>
28590
28591    
28592    
28592<script>
28593			$(function(){
28594				var current = location.href;
28595				$('.nav-menu-for-active li a').each(function(){
28596				var $this = $(this);
28597				// if the current path is like this link, make it active
28598				console.log($this)
28599				if( $this.attr('href') ==current ){
28600				
28601				$this.parent().addClass('active');
28602				}
28603				})
28604				
28605			})
28606	</script>
28606
28607   
28608  <!-- 
28608<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.min.js"></script>
28608
28609<script>
28610    $(document).ready(function() {
28611            var bodyClass = $.cookie('bodyClass');
28612            if (bodyClass=='light-mode') {
28613                //$('body').removeAttr();
28614                $('body').addClass('light-mode');
28615                $('body').removeClass('dark-mode');
28616            }
28617
28618              
28619    });
28620</script>
28620-->
28621    
28622    
28623     
28624 <!-- //////////////////////////////////////  LANGUAGE MODEL LOGIC START ////////////////////////////////////// -->
28625
28626<!-- Language & Currency Button -->
28627<button id="langCurrencyBtn" class="langCurrencyBtn" onclick="openLangPopup()">
28628  <svg xmlns="https://www.w3.org/2000/svg" viewBox="0 0 16 16"
28629       style="display:block;height:16px;width:16px;fill:#fff;">
28630    <path d="M8 .25a7.77 7.77 0 0 1 7.75 7.78 7.75 7.75 0 0 1-7.52 7.72h-.25A7.75 
28631             7.75 0 0 1 .25 8.24v-.25A7.75 7.75 0 0 1 8 .25zm1.95 
28632             8.5h-3.9c.15 2.9 1.17 5.34 1.88 5.5H8c.68 0 1.72-2.37 
28633             1.93-5.23zm4.26 0h-2.76c-.09 1.96-.53 3.78-1.18 
28634             5.08A6.26 6.26 0 0 0 14.17 9zm-9.67 0H1.8a6.26 
28635             6.26 0 0 0 3.94 5.08 12.59 12.59 0 0 1-1.16-4.7l-.03-.38zm1.2-6.58
28636             -.12.05a6.26 6.26 0 0 0-3.83 5.03h2.75c.09-1.83.48-3.54 
28637             1.06-4.81zm2.25-.42c-.7 0-1.78 2.51-1.94 5.5h3.9c-.15-2.9-1.18-5.34
28638             -1.89-5.5h-.07zm2.28.43.03.05a12.95 12.95 0 0 1 1.15 
28639             5.02h2.75a6.28 6.28 0 0 0-3.93-5.07z"></path>
28640  </svg>
28641</button>
28642
28643<!-- Popup -->
28644<div id="langCurrencyPopup" class="popup-overlay notranslate">
28645  <div class="popup-content">
28646    <div class="tabbs-section">
28647      <div class="tabs">
28648        <button class="tab active" data-tab="lang">Language and Region</button>
28649        <button class="tab" data-tab="currency">Currency</button>
28650      </div>
28651      <span id="popupClose"><img src="https://www.jumpspree.com/public/images/close-language.png" alt="close" title="close"></span>
28652    </div>
28653
28654    <div class="inner-language-box">
28655      <!-- Languages -->
28656      <div id="tab-lang" class="tab-content active">
28657        <h3 class="popup-label">Choose your preferred language</h3>
28658        <div id="allLanguagesContainer"></div>
28659      </div>
28660
28661      <!-- Currency -->
28662      <div id="tab-currency" class="tab-content">
28663        <h3>Choose a currency</h3>
28664        <div id="allCurrencies"></div>
28665      </div>
28666    </div>
28667
28668    <div class="note-language">
28669      <p>Note: Language and currency conversion is a beta feature. Some languages may slightly affect UI labels or buttons.</p>
28670    </div>
28671  </div>
28672</div>
28673
28674<!-- Hidden Google Translate -->
28675<div id="google_translate_element" style="position:absolute;top:-9999px;left:-9999px;opacity:0;"></div>
28676
28677<!-- //////////////////////////////////////  STYLES  ////////////////////////////////////// -->
28678<style>
28679  /* Hide Google Translate artifacts */
28680  iframe[id^=":"] , .goog-te-banner-frame , .goog-te-balloon-frame ,
28681  .goog-te-menu-frame , .goog-logo-link , .goog-tooltip , .goog-text-highlight {
28682    display:none !important; opacity:0 !important; visibility:hidden !important;
28683    pointer-events:none !important;
28684  }
28685  #google_translate_element { display:none !important; }
28686  body { top:0px !important; position:static !important; }
28687
28688  /* Popup design */
28689  .popup-overlay {
28690    display:none; position:fixed; inset:0; background:rgba(0,0,0,0.6);
28691    z-index:9999; justify-content:center; align-items:center;
28692  }
28693  .popup-content {
28694    background:#fff; border-radius:10px; padding:20px; width:90%;
28695    max-width:480px; position:relative;
28696  }
28697  .tabs { display:flex; border-bottom:1px solid #ddd; }
28698  .tabs .tab {
28699    flex:1; padding:10px; cursor:pointer; text-align:center;
28700    background:#f4f4f4; border:none; font-weight:600;
28701  }
28702  .tabs .tab.active { background:#008489; color:#fff; }
28703  .tab-content { display:none; margin-top:15px; }
28704  .tab-content.active { display:block; }
28705  #popupClose { position:absolute; top:10px; right:15px; cursor:pointer; }
28706  .language-option {
28707    display:flex; flex-direction:column; align-items:flex-start;
28708    padding:10px; border:1px solid #ddd; margin:5px; border-radius:6px;
28709    cursor:pointer; transition:all 0.2s ease;
28710  }
28711  .language-option:hover { background:#f1f1f1; }
28712  .language-option.active {
28713    background:#008489; color:#fff; font-weight:bold;
28714  }
28715  .lang-main { font-size:14px; }
28716  .lang-sub { font-size:12px; color:#666; }
28717  #allCurrencies button {
28718    margin:5px; padding:8px 12px; border-radius:5px;
28719    border:1px solid #ccc; cursor:pointer;
28720  }
28721  #allCurrencies button.active {
28722    background:#008489; color:#fff; border-color:#008489;
28723  }
28724</style>
28725<style>
28726.langCurrencyBtn {
28727  position: relative;
28728  background: none;
28729  border: none;
28730}
28731.langCurrencyBtn .touch-area {
28732  display: flex;
28733  align-items: center;
28734  gap: 6px;
28735  padding: 6px 10px;
28736}
28737</style>
28738
28739<!-- //////////////////////////////////////  SCRIPTS  ////////////////////////////////////// -->
28740<script>
28741  /* =========  Google Translate Helpers  ========= */
28742  function googleTranslateElementInit() {
28743    new google.translate.TranslateElement({ pageLanguage: 'en' }, 'google_translate_element');
28744  }
28745
28746  function waitForTranslateSelectAsync(timeout = 12000) {
28747    return new Promise((resolve, reject) => {
28748      const start = Date.now();
28749      (function check() {
28750        const sel = document.querySelector('select.goog-te-combo');
28751        if (sel) return resolve(sel);
28752        if (Date.now() - start > timeout) return reject(new Error('Google translate select not found'));
28753        requestAnimationFrame(check);
28754      })();
28755    });
28756  }
28757
28758/*   async function triggerGoogleTranslate(requestedCode) {
28759    try {
28760      const select = await waitForTranslateSelectAsync();
28761      const opts = Array.from(select.options).map(o => o.value);
28762      let val = "en";
28763      if (opts.includes(requestedCode)) val = requestedCode;
28764      else if (opts.includes(requestedCode.split('-')[0])) val = requestedCode.split('-')[0];
28765
28766      select.value = val;
28767      select.dispatchEvent(new Event('input', { bubbles: true }));
28768      select.dispatchEvent(new Event('change', { bubbles: true }));
28769
28770      localStorage.setItem("userLang", requestedCode);
28771      document.getElementById("langCurrencyPopup").style.display = "none";
28772      document.body.classList.remove("overflow-hidden");
28773      console.log("🌐 Language switched:", requestedCode);
28774    } catch (e) {
28775      console.error("Translation trigger failed:", e);
28776    }
28777  } */
28778
28779
28780  /* Trigger Translation (Windows-safe fix) */
28781  /* Trigger Translation (Windows-safe + Airbnb-style label) */
28782async function triggerGoogleTranslate(requestedCode) {
28783  try {
28784    const select = await waitForTranslateSelectAsync();
28785    const opts = Array.from(select.options).map(o => o.value);
28786    let val = "en";
28787    if (opts.includes(requestedCode)) val = requestedCode;
28788    else if (opts.includes(requestedCode.split('-')[0])) val = requestedCode.split('-')[0];
28789
28790    select.value = val;
28791    // Fire both input and change (needed for Windows Chrome)
28792    select.dispatchEvent(new Event('input', { bubbles: true }));
28793    select.dispatchEvent(new Event('change', { bubbles: true }));
28794
28795    localStorage.setItem("userLang", requestedCode);
28796    document.getElementById("langCurrencyPopup").style.display = "none";
28797    document.body.classList.remove("overflow-hidden");
28798    console.log("🌐 Language switched:", requestedCode);
28799
28800    // ✅ Find full display name like Airbnb ("हिन्दी (भारत)")
28801    const langObj = languages.find(l => 
28802      l.code === requestedCode || l.code.split('-')[0] === requestedCode.split('-')[0]
28803    );
28804
28805    if (langObj && document.getElementById("langName")) {
28806      const displayText = langObj.country
28807        ? `${langObj.language} (${langObj.country})`
28808        : langObj.language;
28809
28810      // Update text instantly — no short codes anymore
28811      document.getElementById("langName").textContent = displayText;
28812
28813      // Save pretty label for next time
28814      localStorage.setItem("selectedLanguage", JSON.stringify(langObj));
28815    } else {
28816      console.warn("⚠️ No matching language object found for:", requestedCode);
28817      document.getElementById("langName").textContent = requestedCode;
28818    }
28819
28820  } catch (e) {
28821    console.error("Translation trigger failed:", e);
28822  }
28823}
28824
28825
28826
28827
28828
28829  /* =========  Popup Open / Close  ========= */
28830  const popupLang = document.getElementById("langCurrencyPopup");
28831
28832  function openLangPopup() {
28833      
28834    if (!popupLang) {
28835      console.error("❌ Popup element #langCurrencyPopup not found!");
28836      return;
28837    }
28838    console.log("⚙️ Opening popup...");
28839
28840    loadLanguages(localStorage.getItem("userLang") || "en-IN");
28841    loadCurrencies(localStorage.getItem("userCurrency") || "INR");
28842    popupLang.style.display = "flex";
28843    document.body.classList.add("overflow-hidden");
28844    console.log("🎉 Popup opened successfully!");
28845    document.querySelector(".blog-side-menu").classList.remove("blog-side-menu-show");
28846  }
28847
28848  document.getElementById("popupClose").addEventListener("click", () => {
28849    popupLang.style.display = "none";
28850    document.body.classList.remove("overflow-hidden");
28851  });
28852
28853  /* =========  Tab Switching  ========= */
28854  document.querySelectorAll(".tabs .tab").forEach(tab => {
28855    tab.addEventListener("click", () => {
28856      document.querySelectorAll(".tabs .tab").forEach(t => t.classList.remove("active"));
28857      document.querySelectorAll(".tab-content").forEach(c => c.classList.remove("active"));
28858      tab.classList.add("active");
28859      document.getElementById("tab-" + tab.dataset.tab).classList.add("active");
28860    });
28861  });
28862/* =========  Languages & Currencies Data (Localized Country Names)  ========= */
28863const languages = [
28864  // English Variants
28865  { code: "en-US", language: "English", country: "United States" },
28866  { code: "en-IN", language: "English", country: "India" },
28867  { code: "en-AU", language: "English", country: "Australia" },
28868  { code: "en-CA", language: "English", country: "Canada" },
28869  { code: "en-GB", language: "English", country: "United Kingdom" },
28870  { code: "en-SG", language: "English", country: "Singapore" },
28871  { code: "en-IE", language: "English", country: "Ireland" },
28872  { code: "en-NZ", language: "English", country: "New Zealand" },
28873
28874  // Indian Languages (localized)
28875  { code: "hi", language: "हिन्दी", country: "भारत" },
28876  { code: "ta", language: "தமிழ்", country: "இந்தியா" },
28877  { code: "te", language: "తెలుగు", country: "భారతదేశం" },
28878  { code: "bn", language: "বাংলা", country: "ভারত" },
28879  { code: "mr", language: "मराठी", country: "भारत" },
28880  { code: "kn", language: "ಕನ್ನಡ", country: "ಭಾರತ" },
28881  { code: "gu", language: "ગુજરાતી", country: "ભારત" },
28882  { code: "pa", language: "ਪੰਜਾਬੀ", country: "ਭਾਰਤ" },
28883  { code: "ml", language: "മലയാളം", country: "ഇന്ത്യ" },
28884  { code: "ur", language: "اردو", country: "پاکستان / بھارت" },
28885  { code: "or", language: "ଓଡ଼ିଆ", country: "ଭାରତ" },
28886  { code: "as", language: "অসমীয়া", country: "ভাৰত" },
28887
28888  // Spanish Variants
28889  { code: "es-ES", language: "Español", country: "España" },
28890  { code: "es-MX", language: "Español", country: "México" },
28891  { code: "es-AR", language: "Español", country: "Argentina" },
28892  { code: "es-CO", language: "Español", country: "Colombia" },
28893  { code: "es-CL", language: "Español", country: "Chile" },
28894  { code: "es-PE", language: "Español", country: "Perú" },
28895  { code: "es-US", language: "Español", country: "Estados Unidos" },
28896
28897  // French Variants
28898  { code: "fr-FR", language: "Français", country: "France" },
28899  { code: "fr-CA", language: "Français", country: "Canada" },
28900  { code: "fr-BE", language: "Français", country: "Belgique" },
28901  { code: "fr-CH", language: "Français", country: "Suisse" },
28902  { code: "fr-LU", language: "Français", country: "Luxembourg" },
28903
28904  // German Variants
28905  { code: "de-DE", language: "Deutsch", country: "Deutschland" },
28906  { code: "de-AT", language: "Deutsch", country: "Österreich" },
28907  { code: "de-CH", language: "Deutsch", country: "Schweiz" },
28908
28909  // Portuguese
28910  { code: "pt-PT", language: "Português", country: "Portugal" },
28911  { code: "pt-BR", language: "Português", country: "Brasil" },
28912
28913  // Chinese Variants
28914  { code: "zh-CN", language: "简体中文", country: "中国" },
28915  { code: "zh-TW", language: "繁體中文", country: "台灣" },
28916  { code: "zh-HK", language: "繁體中文", country: "香港" },
28917
28918  // Other Major Languages
28919  { code: "ja", language: "日本語", country: "日本" },
28920  { code: "ko", language: "한국어", country: "대한민국" },
28921  { code: "ru", language: "Русский", country: "Россия" },
28922  { code: "uk", language: "Українська", country: "Україна" },
28923  { code: "it", language: "Italiano", country: "Italia" },
28924  { code: "nl", language: "Nederlands", country: "Nederland" },
28925  { code: "sv", language: "Svenska", country: "Sverige" },
28926  { code: "da", language: "Dansk", country: "Danmark" },
28927  { code: "fi", language: "Suomi", country: "Suomi" },
28928  { code: "no", language: "Norsk", country: "Norge" },
28929  { code: "tr", language: "Türkçe", country: "Türkiye" },
28930  { code: "el", language: "Ελληνικά", country: "Ελλάδα" },
28931  { code: "pl", language: "Polski", country: "Polska" },
28932  { code: "cs", language: "Čeština", country: "Česká republika" },
28933  { code: "ro", language: "Română", country: "România" },
28934  { code: "hu", language: "Magyar", country: "Magyarország" },
28935  { code: "bg", language: "Български", country: "България" },
28936  { code: "sr", language: "Српски", country: "Србија" },
28937  { code: "hr", language: "Hrvatski", country: "Hrvatska" },
28938  { code: "he", language: "עברית", country: "ישראל" },
28939  { code: "ar", language: "العربية", country: "السعودية" },
28940  { code: "fa", language: "فارسی", country: "ایران" },
28941  { code: "th", language: "ไทย", country: "ประเทศไทย" },
28942  { code: "vi", language: "Tiếng Việt", country: "Việt Nam" },
28943  { code: "id", language: "Bahasa Indonesia", country: "Indonesia" },
28944  { code: "ms", language: "Bahasa Melayu", country: "Malaysia" },
28945  { code: "fil", language: "Filipino", country: "Pilipinas" },
28946  { code: "sw", language: "Kiswahili", country: "Kenya" }
28947];
28948
28949
28950  function loadLanguages(selected) {
28951    const container = document.getElementById("allLanguagesContainer");
28952    container.innerHTML = "";
28953    languages.forEach(lang => {
28954      const btn = document.createElement("button");
28955      btn.className = "language-option";
28956      btn.innerHTML = `<div class="lang-main">${lang.language}</div><div class="lang-sub">${lang.country}</div>`;
28957      if (selected === lang.code) btn.classList.add("active");
28958      btn.onclick = () => {
28959        document.querySelectorAll(".language-option").forEach(b => b.classList.remove("active"));
28960        btn.classList.add("active");
28961        triggerGoogleTranslate(lang.code);
28962      };
28963      container.appendChild(btn);
28964    });
28965  }
28966
28967  /* =========  Currencies  ========= */
28968  const currencies = ["USD","EUR","GBP","JPY","AUD","CAD","INR","CNY","BRL","SGD"];
28969  function loadCurrencies(selected) {
28970    const container = document.getElementById("allCurrencies");
28971    container.innerHTML = "";
28972    currencies.forEach(cur => {
28973      const b = document.createElement("button");
28974      b.textContent = cur;
28975      if (selected === cur) b.classList.add("active");
28976      b.onclick = () => {
28977        document.querySelectorAll("#allCurrencies button").forEach(bb => bb.classList.remove("active"));
28978        b.classList.add("active");
28979        localStorage.setItem("userCurrency", cur);
28980        console.log("💰 Currency set:", cur);
28981        popupLang.style.display = "none";
28982      };
28983      container.appendChild(b);
28984    });
28985  }
28986
28987  /* =========  Restore saved language on load  ========= */
28988  window.addEventListener("load", () => {
28989    const saved = localStorage.getItem("userLang");
28990    if (saved) setTimeout(() => triggerGoogleTranslate(saved), 2000);
28991  });
28992</script>
28992
28993
28994<!-- Load Google Translate script -->
28995<script src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
28995
28996
28997</body>
28998</html>      

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.