PageSourceSearch

https://www.foodtalkdaily.com/resources/combined/js/on-screen-debug-tool-rapid.301484bf7c14c718608a.bundle.js

js foodtalkdaily.com collected 2026-09-24 08:45:17 UTC 20,553 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkrapid_js=self.webpackChunkrapid_js||[]).push([["on-screen-debug-tool-rapid"],{7388(e,t,i){i.r(t),i.d(t,{default:()=>f});var o=i(1705),s=i(3696),n=i.n(s),r=i(3102),a=i.n(r),l=i(4169),u=i(3179),c=i(8243),p=i(371),m=i(3013),h=i(9842),d="/home/pusher.live/build/live/hometalk/react-components/common/debugTools/OnScreenDebugTool.jsx";const _=["dbabaioff","esthera","estyw","hadarc","jenw","kvolvovsky","meir","menachemk","merav","naftali","rachela","rweiss","yaakovyehuda"],g="jsErrors",b="jsErrorsTimeStamp";class N extends n().Component{constructor(e){super(e),(0,o.A)(this,"buildUrlFromEnvironment",()=>{let e,t="?";Object.keys(this.state.environment).forEach(i=>{e=this.state.environment[i],null==e||["url","host","revision","mobileAppNativeVersion","mobileAppSiteVersion"].includes(i)||(t+=`${i}=${this.state.environment[i]}&`)}),window.HT_DATA_LAYER.isFeatureSupported(window.HT_DATA_LAYER.MOBILE_APP_FEATURES.SET_ENVIRONMENT)?window.HT_DATA_LAYER.sendMessageToApp({message:window.HT_DATA_LAYER.MOBILE_MESSAGES.setEnvironment,data:{subdomain:this.state.environment.host,queryString:t,currentURL:window.location.href}}):location.href=location.protocol+"//"+this.state.environment.host+"."+location.host.split(".")[1]+".com"+location.pathname+t}),(0,o.A)(this,"handleEnvironmentChange",(e,t)=>{this.setState({environmentChanges:{...this.state.environmentChanges,[e]:t}})}),(0,o.A)(this,"handleError",(e,t,i,o,s)=>{const n=Date.now(),r={message:e,source:t,time:Date.now(),tabId:this.getTabId(),lineno:i,colno:o,error:s};let a=JSON.parse(m.pG.getItem(g));a?(a=this.setJsErrorObj(a,10,30),a.errors.push(r)):a={errors:[r]},m.pG.setItem(g,JSON.stringify(a)),m.pG.setItem(b,JSON.stringify(n))}),this.state={displayDataInfo:{},openedDataSource:null,cookies:{device_id:void 0,SESSION_IDv2DEV:void 0,SESSION_IDv2STAGING:void 0,SESSION_IDv2:void 0,bkp_sess_id:void 0,marketing_popup:void 0,system_popup:void 0,mobile_app_version:void 0,mobile_app_onesignal_player_id:void 0,onScreenDebugTool:void 0,debug_lightbox:void 0,rate_the_app_popup_viewed:void 0,update_app_popup_viewed:void 0,rapid_page:void 0,retina_images:void 0},localStorage:{HT_SESSION_TRACKING:void 0,notification_popup:void 0,notification_status_storage:void 0,generic_popup:void 0},sessionStorage:{debugLog:void 0},popupInfo:{},adsInformation:{},environment:{url:location.href,pageType:this.getPageType(),indexable:this.getIndexableScore(),revision:void 0,host:window.location.host.replace("."+location.host.split(".")[1]+".com",""),fc:new URLSearchParams(location.search).get("fc"),userAgent:navigator.userAgent},pushNotification:{destinationURL:`${window.location.origin}/app`},jsError:JSON.parse(m.pG.getItem(g))||"",jsErrorTimeStamp:Date.now(),jsErrorNew:!1,activity_id:"",trackingEvents:[]},this.handleActivityIdChange=this.handleActivityIdChange.bind(this),this.adsInformationTitles={},this.isMobileApp=window.HT_DATA_LAYER.getData().mobileApp,this.isMobileApp&&(this.state.cookies.seen_profile_feature_discovery_homepage=void 0,this.state.cookies.seen_profile_feature_discovery_activity_page=void 0,this.state.localStorage.app_loaded_sign_up_counter=void 0,this.state.environment=Object.assign({mobileAp
1pNativeVersion:window.HT_DATA_LAYER.getMobileAppVersionCookie()?JSON.parse(window.HT_DATA_LAYER.getMobileAppVersionCookie()).version:void 0,mobileAppSiteVersion:window.mobileAppFilesInfo?window.mobileAppFilesInfo.mobileAppSiteVersion:void 0},this.state.environment)),(this.isMobileApp?[u.Ay.onScreenDebugTool,"ads_profiling","debug_lightbox","disable_ads","log_ads","selenium","use_test_slot_for_native_sticky_ad","use_web_slot_for_native_sticky_ad"]:[...Object.values(u.Ay),"debug_lightbox"]).forEach(e=>{this.state.environment[e]=[!0,"1"].includes((0,u.qm)(e))?"1":"0"}),this.state.environmentChanges={...this.state.environment},this.mobile_app_onesignal_player_id=a().get("mobile_app_onesignal_player_id"),this.dataSourceArray=["environment","cookies","localStorage","sessionStorage","adsInformation",g,"trackingEvents"],this.isMobileApp?(this.dataSourceArray.push("pushNotification"),this.dataSourceArray.push("popupInfo")):this.dataSourceArray.push("popupInfo"),this.hosts=["www"];for(let t=3;t<=50;t++)this.hosts.push(`staging${t}`);this.hosts.forEach(e=>{this.hosts.push(`${e}-direct`)}),this.hosts=this.hosts.concat(_),this.hosts.includes(this.state.environment.host)||this.hosts.push(this.state.environment.host),this.cookiesCleared={},this.getRevision(),this.style={general:{backgroundColor:"floralwhite",position:"fixed",left:"10px",width:"340px",top:"75px",zIndex:1e4,fontSize:"13px"},switchBtnTool:{fontWeight:"bold",height:"40px",width:"100%"},button:{display:"flex",backgroundColor:"lightgray",textAlign:"start",margin:"6px 1%",width:"98%",padding:"3px",whiteSpace:"pre-wrap"},submit:{display:"flex",backgroundColor:"white",textAlign:"start",margin:"6px 1%",width:"98%",padding:"10px 3px",whiteSpace:"pre-wrap"},window:{overflow:"scroll",top:"115px",bottom:"5%"},title:{textAlign:"center",fontSize:"16px"},breakLine:{whiteSpace:"pre-wrap"},input:{height:"inherit"},textArea:{height:"60px",width:"100%"}}}async getRevision(){if(window.location.host.includes("staging")||window.location.host.includes("www")){const e=await fetch(`${window.location.origin}/revision.txt`,{method:"GET"});if(e.ok){let t=await e.text();t&&this.setState({environment:{...this.state.environment,revision:t},environmentChanges:{...this.state.environmentChanges,revision:t}})}}}getData(e){switch(e){case g:return m.pG.getItem(b);case"cookies":return Object.keys(this.state.cookies).reduce((e,t)=>(e[t]=a().get(t),e),{});case"localStorage":return Object.keys(this.state.localStorage).reduce((e,t)=>(e[t]=m.pG.getItem(t),e),{});case"sessionStorage":return Object.keys(this.state.sessionStorage).reduce((e,t)=>(e[t]=m.Cc.getItem(t),e),{});case"popupInfo":let e,t=["cmsPopupTriggerFC","loggedIn","pageNumber"],i={},o=(0,l.Jt)(window,"popupInformation.[0].popupName",null);return o?(window.popupInformation.forEach((s,n)=>{(0,l.Jt)(window.popupInformation,n+".popupName",null)!==o&&(o=(0,l.Jt)(window.popupInformation,n+".popupName",null)),i["Popup_"+o]=o,e=n,void 0!==s.failed?e+="_failed_":void 0!==s.fired?e+="_fired_":e+="_chosenConfig_",e+=(0,l.Jt)(s,"chosenConfig[0].componentName","_no config was chosen");let r={};t.forEach(e=>{r[e]=s.state[e]}),i[e]=this.replacer(JSON.stringify(r,null,3))}),i):i;case"adsInformation":return window.adsInformation?Object.entries(window.adsInformation).reduce((e,t)=>{let[i,o]=t;return this.adsInformationTitles[i]=o.adRender.length,e[i]=this.replacer(JSON.stringify(o,null,3)),e},{}):{};case"environment":return{...this.state.environmentChanges,url:location.href,pageType:this.getPageType(),indexable:this.getIndexableScore()};case"pushNotification":return{...this.state.pushNotification};default:return{}}}replacer(e){return String(e),null!=e?e.replace(/["|,]/gi," "):null}openPopupEvent(e){let t=this.state;t.displayDataInfo[e]=!t.displayDataInfo[e],this.setState(t)}formattingValue(e){return this.replacer(JSON.stringify(JSON.parse(null==e||"undefined"==e?null:e),null,3))}resetData(e,t){switch(t){case"cookies":let t=!0;if("mobile_app_version"===e&&this.cookiesCleared[e])t=!1,a().set(e,'{"version": "0.5.0","build":"1"}',{expires:(0,h.mu)()});else if("rapid_page"===e){switch(a().get(e)){case void 0:a().set(e,"1");break;case"1":a().set(e,"0");break;default:a().expire(e)}location.reload()}else a().expire(e);this.cookiesCleared[e]=t;break;case"localStorage":m.pG.removeItem(e);break;case"sessionStorage":m.Cc.removeItem(e)}}getButtons(){let e=[];return this.dataSourceArray.forEach((t,i)=>{e.push(n().createElement("div",{key:t,className:"parent",__source:{fileName:d,lineNumber:347,columnNumber:17}},n().createElement("button",{style:{...this.style.switchBtnTool,backgroundColor:"pink",height:"35px"},"data-no-track":"true",onClick:()=>this.setState(e=>{let i={...e};return this.state.openedDataSource===t?i.openedDataSource=null:i.openedDataSource=t,i}),__source:{fileName:d,lineNumber:348,columnNumber:21}},t),this.state.openedDataSource===t&&this.splitButtons(t)))}),e.push(n().createElement("div",{key:"activity_id",__source:{fileName:d,lineNumber:363,columnNumber:22}},n().createElement("br",{__source:{fileName:d,lineNumber:364,columnNumber:13}}),n().createElement("div",{__source:{fileName:d,lineNumber:365,columnNumber:13}},"Enter activity id to change location"),n().createElement("input",{type:"text",value:this.state.activity_id,style:this.style.input,onChange:e=>this.setState({activity_id:e.target.value}),__source:{fileName:d,lineNumber:366,columnNumber:13}}),""!==this.state.activity_id&&n().createElement("input",{style:this.style.button,type:"button",value:"Go to activity",onClick:this.handleActivityIdChange,__source:{fileName:d,lineNumber:368,columnNumber:17}}))),n().createElement("div",{style:{...this.style.general,...this.style.window},__source:{fileName:d,lineNumber:377,columnNumber:13}},e)}refreshBootstrap(){a().expire("SESSION_IDv2"),a().expire("SESSION_IDv2DEV"),a().expire("SESSION_IDv2STAGING"),a().expire("bkp_sess_id"),(0,c.Nw)()}addValueToFc(e,t){return null==e||""===e?t:e.split(",").includes(t)?e:e+","+t}handleActivityIdChange(){new p.Ay(`posts/${this.state.activity_id}`).get().then(e=>{let t=this.isMobileApp?"/app"+e.site_url:e.site_url;window.location.replace(t)})}copyToClipboard(){let e=document.getElementById("bootstrap");e.select(),e.setSelectionRange(0,99999),document.execCommand("copy")}splitButtons(e){let t=[];if("environment"===e&&(this.isMobileApp&&window.HT_DATA_LAYER.isFeatureSupported(window.HT_DATA_LAYER.MOBILE_APP_FEATURES.SET_ENVIRONMENT)&&t.push(n().createElement("button",{key:"clearSessionAndCloseApp","data-no-track":"true",style:this.style.submit,onClick:()=>window.HT_DATA_LAYER.sendMessageToApp({message:window.HT_DATA_LAYER.MOBILE_MESSAGES.clearSessionAndCloseApp}),__source:{fileName:d,lineNumber:443,columnNumber:30}},"clear session and close app")),t.push(n().createElement("button",{key:"clearCache","data-no-track":"true",style:this.style.submit,onClick:()=>window.HT_DATA_LAYER.sendMessageToApp({message:window.HT_DATA_LAYER.MOBILE_MESSAGES.clearCache}),__source:{fileName:d,lineNumber:451,columnNumber:26}},"clear cache and refresh webviews")),t.push(n().createElement("button",{key:"refreshBootstrap","data-no-track":"true",style:this.style.submit,onClick:this.refreshBootstrap,__source:{fileName:d,lineNumber:458,columnNumber:26}},"refresh bootstrap")),t.push(n().createElement("button",{key:"save","data-no-track":"true",style:this.style.submit,onClick:this.copyToClipboard,__source:{fileName:d,lineNumber:465,columnNumber:26}},"Copy bootstrap",n().createElement("input",{style:this.style.input,type:"text",id:"bootstrap",defaultValue:this.getSortedBootstrapString(),__source:{fileName:d,lineNumber:470,columnNumber:32}})))),e===g){let i=this.getTabId();return t.push(n().createElement("button",{key:"ThrowError","data-no-track":"true",style:{...this.style.submit,backgroundColor:"LightGrey"},onClick:e=>{null.jsErrorTest},__source:{fileName:d,lineNumber:482,columnNumber:26}},"Throw JS Error")),t.push(n().createElement("button",{key:i,"data-no-track":"true",style:this.style.submit,__source:{fileName:d,lineNumber:489,columnNumber:26}},"Tab ID: "+i)),this.state.jsError&&this.state.jsError.errors&&this.state.jsError.errors.forEac
1h((e,i)=>{let o=[];for(const t in e)e.hasOwnProperty(t)&&o.push(n().createElement("li",{key:t,__source:{fileName:d,lineNumber:500,columnNumber:40}},t+": "+e[t]));t.push(n().createElement("button",{key:i,"data-no-track":"true",style:this.style.submit,onClick:()=>{},__source:{fileName:d,lineNumber:503,columnNumber:34}},n().createElement("ul",{__source:{fileName:d,lineNumber:510,columnNumber:25}},o)))}),n().createElement("div",{key:e,className:e,__source:{fileName:d,lineNumber:514,columnNumber:20}},t)}if("trackingEvents"===e){let t=[];const i=this.state.trackingEvents||[];return 0===i.length?t.push(n().createElement("div",{key:"no-events",style:this.style.button,__source:{fileName:d,lineNumber:522,columnNumber:30}},"No events captured yet")):(t.push(n().createElement("button",{key:"clear","data-no-track":"true",style:this.style.submit,onClick:()=>this.setState({trackingEvents:[]}),__source:{fileName:d,lineNumber:525,columnNumber:21}},"Clear Events")),i.forEach((e,i)=>{const o="tracking_"+i;t.push(n().createElement("div",{key:o,__source:{fileName:d,lineNumber:536,columnNumber:25}},n().createElement("button",{"data-no-track":"true",style:{...this.style.switchBtnTool,backgroundColor:"lightblue",height:"auto",minHeight:"30px",marginTop:"5px"},onClick:()=>this.openPopupEvent(o),__source:{fileName:d,lineNumber:537,columnNumber:29}},e.time," - ",e.eventType),this.state.displayDataInfo[o]?n().createElement("div",{style:this.style.button,__source:{fileName:d,lineNumber:551,columnNumber:33}},this.replacer(JSON.stringify(e.properties,null,3))):null))})),n().createElement("div",{key:e,className:e,__source:{fileName:d,lineNumber:559,columnNumber:20}},t)}const i="ios"===window.HT_DATA_LAYER.getData().view.device?Reflect.ownKeys(this.state[e]):Object.keys(this.state[e]);return t.push(i.map((t,i)=>{if(["popupInfo","adsInformation"].includes(t))return n().createElement(n().Fragment,null,n().createElement("button",{key:t,"data-no-track":"true",style:{...this.style.switchBtnTool,backgroundColor:t.includes("Popup")?"green":"lightgreen",height:"30px"},onClick:()=>t.includes("Popup")?null:this.openPopupEvent(i),__source:{fileName:d,lineNumber:569,columnNumber:21}},t),this.state.displayDataInfo[i]?n().createElement("div",{style:this.style.button,__source:{fileName:d,lineNumber:582,columnNumber:25}},this.state[e][t]):null);if("adsInformation"===e){const o=`${t} - [${this.adsInformationTitles[t]}]`;return n().createElement(n().Fragment,null,n().createElement("button",{key:t,"data-no-track":"true",style:{...this.style.switchBtnTool,backgroundColor:t.includes("Popup")?"green":"lightgreen",height:"30px"},onClick:()=>t.includes("Popup")?null:this.openPopupEvent(i),__source:{fileName:d,lineNumber:590,columnNumber:21}},o),this.state.displayDataInfo[i]?n().createElement("div",{style:this.style.button,__source:{fileName:d,lineNumber:603,columnNumber:25}},this.state[e][t]):null)}{let i=this.state[e][t],o=()=>this.resetData(t,e);switch(e){case"environment":switch(o=()=>{},t){case"host":i=n().createElement("select",{value:i,onChange:e=>this.handleEnvironmentChange(t,e.target.value),className:"form-control",__source:{fileName:d,lineNumber:616,columnNumber:40}},this.hosts.map(e=>n().createElement("option",{value:e,key:e,__source:{fileName:d,lineNumber:622,columnNumber:52}},e)));break;case"fc":i=n().createElement("input",{style:this.style.input,type:"text",defaultValue:i||"",onChange:e=>this.handleEnvironmentChange(t,e.target.value),__source:{fileName:d,lineNumber:627,columnNumber:40}});break;case"url":case"pageType":case"revision":case"mobileAppNativeVersion":case"mobileAppSiteVersion":case"indexable":break;default:o=()=>this.handleEnvironmentChange(t,"1"===this.state[e][t]?"0":"1"),i=n().createElement("input",{type:"checkbox",checked:"1"===i,onChange:o,__source:{fileName:d,lineNumber:643,columnNumber:40}})}break;case"pushNotification":i=n().createElement("textarea",{style:this.style.textArea,type:"text",value:this.state.pushNotification.destinationURL,onChange:e=>this.setState({pushNotification:{destinationURL:e.target.value}}),__source:{fileName:d,lineNumber:652,columnNumber:32}});break;case"cookies":case"adsInformation":break;default:i=this.formattingValue(i)}return n().createElement("button",{key:t,"data-no-track":"true",style:this.style.button,onClick:o,__source:{fileName:d,lineNumber:667,columnNumber:24}},t," = ",i)}})),"environment"===e&&t.push(n().createElement("button",{key:"submit","data-no-track":"true",style:this.style.submit,onClick:this.buildUrlFromEnvironment,__source:{fileName:d,lineNumber:680,columnNumber:26}},"submit")),"pushNotification"===e&&t.push([n().createElement("button",{key:"set","data-no-track":"true",style:this.style.submit,onClick:()=>this.setState({pushNotification:{destinationURL:window.location.href}}),__source:{fileName:d,lineNumber:690,columnNumber:17}},"Set push notification to current url"),n().createElement("button",{key:"send","data-no-track":"true",style:this.style.submit,onClick:()=>this.sendOnesignalParameters(this.mobile_app_onesignal_player_id,"b68e9c73-57d6-4ee7-b4f1-1902b4cb8265",{post_url:this.state.pushNotification.destinationURL}),__source:{fileName:d,lineNumber:696,columnNumber:17}},"Send push notification to my device")]),n().createElement("div",{key:e,className:e,__source:{fileName:d,lineNumber:708,columnNumber:16}},t)}componentDidMount(){if(window.onerror=this.handleError,this.updateDebugInformation(),window.HT_DEBUG_TRACKING_EVENTS_BUFFER&&window.HT_DEBUG_TRACKING_EVENTS_BUFFER.length>0){const e=window.HT_DEBUG_TRACKING_EVENTS_BUFFER.reverse().map(e=>({time:"Buffered",eventType:e.eventType,properties:e.properties}));this.setState(t=>({trackingEvents:[...e,...t.trackingEvents].slice(0,50)})),window.HT_DEBUG_TRACKING_EVENTS_BUFFER=[]}window.HT_DEBUG_TRACK_EVENT=(e,t)=>{this.setState(i=>({trackingEvents:[{time:(new Date).toLocaleTimeString(),eventType:e,properties:t},...i.trackingEvents].slice(0,50)}))}}componentWillUnmount(){delete window.HT_DEBUG_TRACK_EVENT,this.localInterval&&clearInterval(this.localInterval)}componentDidUpdate(){}setJsErrorObj(e,t,i){const o=Date.now();let s=e.errors.length-t;return s>0&&(e.errors=e.errors.slice(s)),e.errors=e.errors.filter(e=>(o-e.time)/6e4<i),e}getTabId(){let e=m.Cc.getItem("tabId");return e||(e=Date.now(),m.Cc.setItem("tabId",JSON.stringify(e))),e}updateDebugInformation(){this.localInterval=setInterval(()=>{const e=this.getData("cookies"),t=this.getData("localStorage"),i=this.getData("sessionStorage"),o=this.getData("popupInfo"),s=this.getData("adsInformation"),n=this.getData("environment"),r=this.getData("pushNotification"),a=this.getData(g),u={cookies:e,localStorage:t,sessionStorage:i,popupInfo:o,adsInformation:s,environment:n,pushNotification:r},c={cookies:this.state.cookies,localStorage:this.state.localStorage,sessionStorage:this.state.sessionStorage,popupInfo:this.state.popupInfo,adsInformation:this.state.adsInformation,environment:this.state.environment,pushNotification:this.state.pushNotification};if((0,l.jz)(u,c)||this.setState({...u}),a&&a>this.state.jsErrorTimeStamp){let e=this.state;e.jsError=JSON.parse(m.pG.getItem(g))||"",e.jsErrorNew=!0,e.jsErrorTimeStamp=a,this.setState(e),e.jsErrorNew=!1,setTimeout(()=>this.setState(e),2e3)}},2e3)}getSortedBootstrapString(){let e=window.HT&&window.HT.bootstrap?{...window.HT.bootstrap}:{...window.HT_BOOTSTRAP},t=(0,l.Jt)(e,"USER.features",!1);return t&&(t=this.sortObjectItemsByName(t),e.USER.features=t),JSON.stringify(e)}sortObjectItemsByName(e){let t={};return Object.keys(e).sort(this.nonCaseSensitiveSort).forEach(i=>
1{t[i]=e[i]}),t}nonCaseSensitiveSort(e,t){return e.toUpperCase()<t.toUpperCase()?-1:1}sendOnesignalParameters(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};e&&t&&p.Ay.create("pushnotifications",{devicesArr:[e],chosenTemplateID:t,data:i}).then(e=>{let t=JSON.stringify(e).match(/"recipients":([1-9]\d*)/),i=!!Array.isArray(t)&&parseInt(t[length]);i?i===playerIDs.length?alert("Success"):alert(`Error message:\n A push notification has been sent to ${playerIDs.length} device(s), but was only successfully delivered to ${i} recipient(s)`):alert(`Error message:\n${JSON.stringify(e)}`)}).catch(e=>alert(`Error message:\n${JSON.stringify(e)}`))}getPageType(){const e=window.HT_DATA_LAYER.getData().page;return e?e.pageType:null}getIndexableScore(){const e=window.HT_DATA_LAYER.getData().page;return e&&void 0!==e.indexable?e.indexable.toString():null}render(){let e=window.HT_DATA_LAYER.isRapid?"LightBlue":"LightGreen",t={...this.style.switchBtnTool,backgroundColor:this.state.jsErrorNew?"#ff0033":e};return n().createElement(n().Fragment,null,n().createElement("div",{style:this.style.general,__source:{fileName:d,lineNumber:907,columnNumber:17}},n().createElement("button",{style:t,onClick:()=>this.setState({displayDebugger:!this.state.displayDebugger}),"data-no-track":"true",__source:{fileName:d,lineNumber:908,columnNumber:21}},this.state.displayDebugger?"Close":"Open"," OnScreen Debug Tool ",window.HT_DATA_LAYER.isRapid?"- rapid":"- react")),this.state.displayDebugger&&this.getButtons())}}const f=N}}]);

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.