PageSourceSearch

https://www.foodtalkdaily.com/resources/combined/js/js-modules_ima…ia_js-da21f8.f6609528d66ed0e54d40.bundle.js

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

1"use strict";(self.hometalkChunk=self.hometalkChunk||[]).push([["js-modules_image_es6-react-components_common_uploader_responsive_ShareBoxUploaderRichmedia_js-da21f8"],{12989(e,t,i){i.d(t,{A:()=>d});var s=i(58168),a=i(96540),o=i.n(a),r=i(40184),l=i(25280),n=i(47147),c=i(44171),p=i(29967);class h extends o().Component{componentDidMount(){r.Ay.isPost(this.props.post.type)&&(0,c.default)("Created Post",{element_zone:"Post Success"})}render(){const e=this.props.post;return o().createElement(o().Fragment,null,o().createElement("div",{className:"success-message-box flexbox w100 sl-success"},o().createElement("h1",null,this.props.shareboxConfig.success.header),o().createElement("div",{className:"w100 success-text "+(r.Ay.isPost(e.type)?"post-success-new":"")},e.is_profanity&&o().createElement(o().Fragment,null,"Your post appears to have inappropriate content. ",o().createElement("a",(0,s.A)({href:(0,l.O)(e).href},(0,l.O)(e).attr),"Edit now »")," to share your post."),!e.is_profanity&&e.isUnpublished()&&o().createElement(o().Fragment,null,o().createElement("span",{className:p.A.THEME.sharebox_success.illustration?p.A.THEME.sharebox_success.illustration:"default-illustration"}),o().createElement("a",(0,s.A)({target:"_self",className:"button tertiary-button large sl-view-now",href:(0,l.O)(e).href},(0,l.O)(e).attr,{"data-ht-track":JSON.stringify({action:"View Now",element_zone:`${e.type} Success`})}),this.props.shareboxConfig.success.view_now),o().createElement("div",{className:"spacer30"}),o().createElement("p",null,o().createElement("b",null,this.props.shareboxConfig.success.unpublished_text))),!e.isUnpublished()&&o().createElement(o().Fragment,null,o().createElement("p",null,this.props.shareboxConfig.success.text),o().createElement("span",{className:p.A.THEME.sharebox_success.illustration?p.A.THEME.sharebox_success.illustration:"default-illustration"}),o().createElement("a",(0,s.A)({target:"_self",className:"button tertiary-button large sl-view-now",href:(0,l.O)(e).href},(0,l.O)(e).attr,{"data-ht-track":JSON.stringify({action:"View Now",element_zone:`${e.type} Success`})}),this.props.shareboxConfig.success.view_now),o().createElement("div",{className:"flexbox flex-center share-footer"},o().createElement("p",null,p.A.LANG.sharebox.share_your," ",this.props.shareboxConfig.success.activity_type," ",p.A.LANG.sharebox.with_friends),o().createElement("div",{className:"buttons-wrap nowrap flexbox flex-align-center"},o().createElement("a",{"data-ht-track":"{action:'click_share_facebook',type:'Share Facebook',zone:'Lightbox Success Post'}",className:"button float-button",onClick:()=>n.A.fb(e)},o().createElement("i",{className:"ics-facebook"})),o().createElement("a",{"data-ht-track":"{action:'click_share_pinterest',type:'Share Pinterest', zone:'Lightbox Success Post'}",className:"button float-button",onClick:()=>n.A.pin(e)},o().createElement("i",{className:"ics-pinterest"}))))))))}}const d=h},21712(e,t,i){i.d(t,{R9:()=>o,b8:()=>l,pG:()=>r});var s=i(90826);function a(e){let t=e.split("x");return{width:parseInt(t[0]),height:parseInt(t[1])}}function o(e,t,i){if(!t.width||!t.height)return i;let o=function(e,t){var i=a(t),o=i.width/i.height,r=s.A.getState().view.size;return"desktop"!==r&&"small"!==r||e.width<i.width||e.ratio>=o||e.ratio<.3*o?"&nocrop=1":""}(t,i),r=e,l=function(e,t,i){var s,o,r=a(t);return i?(o=Math.min(e.width,r.width),(s=Math.floor(o/e.ratio))>r.height&&(s=r.height,o=Math.floor(s*e.ratio)),{width:o,height:s}):r}(t,i,o),n=function(e,t,i){if(t.width<=i)return t;var s=t.width/t.height;return{width:i,height:Math.floor(i/s)}}(0,l,r);return{noCrop:o,height:n.height,width:n.width}}function r(e){return(s.A.getState().mobileApp?{desktop:"720x845","tablet.landscape":"720x845","tablet.portrait":"720x845",phone:"414x575"}:{desktop:"720x845","tablet.landscape":"650x832","tablet.portrait":"650x832",phone:"414x575"})[e]}function l(e){return e&&/^(https?:\/\/)?([\w.-]+\.[\w]{2,})(\/.*)?$/i.test(e)?e:null}},25280(e,t,i){function s(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=e.comment_id||null,s="",a="";return i&&(s="?cid="+i),e.quality,a=1==t?e.site_url+s+"#c-"+i:e.site_url+s,{href:a,attr:{}}}i.d(t,{O:()=>s})},47147(e,t,i){i.d(t,{A:()=>h});var s=i(73323),a=i(8356),o=i(29967),r=(i(96540),i(6686)),l=i(90826),n=i(50016),c=i(17013);const p="pinterest";class h extends a.A{static buildUrl(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return this.buildBaseUrl(e)+this.buildQueryString(e,t)}static buildBaseUrl(e){let t=e.url_to_share?e.url_to_share:e.site_url;return o.A.SITE_URL+t}static buildQueryString(e,t){let i="";if(e.qs){var s=Object.keys(e.qs).map(function(t){return t+"="+e.qs[t]}).join("&");i+="?"+(t?encodeURIComponent(s):s)}return i}static isPhotoType(e){return["photo","marketing_pin_photo"].includes(e)}static getItemWithUTMQueries(e,t,i,s,a){let o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"soc_btn";if(void 0!==e.qs)return e;let r=JSON.parse(JSON.stringify(e));return r.qs=this.getUTMQueries(e,t,i,o,s,a),r}static getUTMQueries(e,t,i,s,a,o){let c=new r.A(l.A.getState().user),p=c.permissionGranted("view_pin_and_fb_button"),h=c.pinterest_partners?Object.keys(c.pinterest_partners):[],d=h.length,m=e.utm_medium?e.utm_medium:"soc_btn",u=e.utm_campaign?e.utm_campaign:"shared_cntnt";p?(m="brand",u="new"):i&&d&&"pinterest"===t&&c.pinterest_partners[h[0]]&&(m="syndication",u=c.pinterest_partners[h[0]].short_code,s="soc_btn"===s?"syn_soc":s);let g={utm_source:t,utm_medium:m,utm_campaign:u,date:(0,n.GP)(null,"YMD"),ps:s};return a&&(g.utm_media=a),o&&(g.utm_cover_photo=o),e.utm_syndication_post&&(g.utm_syndication_post=e.utm_syndication_post),g}static summary(e,t){var i="";return this.isPhotoType(e.type)?(!(i=e.social_title)&&e.parent_object&&(i=e.parent_object.social_title),i||(i="")):i=e.social_title||e.meta_title||e.summary||e.name||"",t&&-1==i.indexOf("%")?this.urlencode(i):i}static description(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i="";return this.isPhotoType(e.type)&&(i=(0,s.A)(e,"social_description")?e.social_description.trim():"",!i&&e.parent_object&&(i=e.parent_object.social_title)),i||(i=t?e.social_description||e.marketing_description||e.social_title||e.meta_title||e.summary||e.name:e.social_description||e.marketing_description||e.description||e.social_title||e.meta_title||e.text||e.summary||e.name),i}static pinterestUrl(e,t,i){let s,a,o={...e};return"marketing_pin_photo"===(arguments.length>3&&void 0!==arguments[3]?arguments[3]:"")?(s=null,a=t):(s=t,a=null),o.qs=this.getUTMQueries(o,p,i,"datapin",s,a),this.buildUrl(o,!1)}static urlencode(e){return encodeURIComponent(e+="").replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A").replace(/%20/g,"+")}static fbItem(e,t){return t&&(e={...e,...t}),this.fb(e)}static fb(e){var t=this.getItemWithUTMQueries(e,"facebook");window.open("https://www.facebook.com/sharer/sharer.php?u="+this.buildUrl(t)+"&t="+this.summary(t,!0),"new_window","width=680,height=270")}static pin(e){let t,i,s,a=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"soc_btn",r=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(e={...arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},...e},this.isPhotoType(e.type))t=e.path,i="marketing_pin_photo"===e.type?"utm_cover_photo":"utm_media",s=e.id;else if("gallery"==e.type)if(void 0!==e.social_pin_photos&&Object.keys(e.social_pin_photos).length){let a=e.social_pin_photos[e.social_pin_photos.length-1];t=a.path,i="utm_cover_photo",s=a.id}else void 0!==e.page_num?(t=e.media[e.page_num-1].path,i="utm_media",s=e.media[e.page_num-1].id):(t=e.cover_photo.path,i="utm_media",s=e.cover_photo.id);else if(e&&e.social_pin_photos&&Object.keys(e.social_pin_photos).length){let a=e.social_pin_photos[e.social_pin_photos.length-1];t=a.path,i="utm_cover_photo",s=a.id}else e&&e.social_photo&&e.social_photo.path?(t=e.social_photo.path,i="utm_cover_photo",s=e.social_photo.id):void 0!==e.cover_photo&&"gallery"!=e.type?(t=e.cover_photo.path,i="utm_media",s=e.cover_photo.id):void 0!==(e.object||{}).media?(t=e.object.media[0].path,i="utm_media",s=e.object.media[0].id):void 0!==e.path?(t=e.path,i="utm_media",s=e.id):(t=e.media[0].path,i="utm_media",s=e.media[0].id);if(t=encodeURIComponent((0,c.$S)(t)),void 0!==e.meta_media&&e.meta_media&&(t=e.meta_media,t=this.urlencode(t)),r)return t;e=this.getItemWithUTMQueries(e,p,a,"utm_media"===i?s:null,"utm_cover_photo"===i?s:null,o);let l=this.buildUrl(e),n="//pinterest.com/pin/create/button/?url="+l+"&media="+t+"&description="+this.urlencode(this.description(e));return a&&(n=`/api/syndicationlibrary/pin?destination_url=${l}&${i}=${s}&image_source=${t}`),window.open(n,"new_window","width=750,height=370"),{pinned_url_full:this.buildUrl(e,!1),pinned_url_without_query_string:this.buildBaseUrl(e)}}static twit(e){window.open("https://twitter.com/intent/tweet?text="+this.summary(e,!0)+"&url="+this.buildUrl(e)+"&source=ht-share&via=Hometalk","new_window","width=750,height=370")}static stumbleupon(e){window.open("http://www.stumbleupon.com/submit?url="+this.buildUrl(e),"new_window","width=750,height=370")}static linkedin(e){window.open("http://www.linkedin.com/shareArticle?mini=true&url="+this.buildUrl(e)+"&source=ht-share","new_window","width=750,height=470")}static mail(e){window.location.href="mailto:?subject=I saw something you might like on Hometalk&body="+this.buildUrl(e)}}},68441(e,t,i){i.d(t,{A:()=>f});var s=i(58168),a=i(54705),o=i(96540),r=i.n(o),l=i(23500),n=i(70772),c=i(31495),p=i(4211),h=i(10029),d=i(29967),m=i(8509),u=i(17847),g=i(79992),_=i(49014);const b=r().lazy(()=>i.e("amazon-product-search").then(i.bind(i,15086)));class w extends r().Component{constructor(e){super(e),(0,a.A)(this,"showImgLibraryButton",()=>d.A.THEME.show_image_library&&this.props.member&&this.props.member.permissionGranted(["image_library"])),(0,a.A)(this,"handleOpen",()=>{this.setState({isOpen:!0})}),(0,a.A)(this,"handleClose",()=>{this.setState({isOpen:!1})}),(0,a.A)(this,"handleClick",()=>{1==this.state.isOpen?this.handleClose():this.handleOpen()}),(0,a.A)(this,"updateContent",e=>{const t=this.isScrape?"formatted_text":"text";this.props.media.setText(this.props.file,t,e,this.props.type)}),(0,a.A)(this,"toggleSpinner",()=>{this.setState({showSpinner:!this.state.showSpinner})}),(0,a.A)(this,"replaceFromLibrary",e=>{this.props.media.replace(e,this.props.file),this.props.onLightBoxClose()}),(0,a.A)(this,"showImageLink",()=>{const{type:e,member:t}=this.props,i="structured_post"===e,s=t.permissionGranted(["seo_links"]);return i||s}),(0,a.A)(this,"addAmazonProduct",e=>{this.props.media.setText(this.props.file,"link",e.detailPageURL||"")}),this.updateContent=this.updateContent.bind(this),this.state={orientation:this.props.file.rotation,showTextArea:this.props.showTextArea||this.props.file.text&&this.props.file.text.length||!1,showCaption:!!this.props.file.title,isOpen:!1,showSpinner:!1,showMediaLink:this.props.showMediaLink||!1,uploadProgress:!1,amazonFillKey:0},this.isScrape=(0,p.Jt)(this.props,"data.fromScrape")}componentWillReceiveProps(e){e.file.id!=this.props.file.id&&this.setState({showCaption:!!e.file.title})}isPhoto(){return"photo"===this.props.file.type}isVideo(){return"video"===this.props.file.type}toggleTextArea(){this.setState(e=>({showTextArea:!e.showTextArea}))}getFileTitleLength(){return this.props.file.title?this.props.file.title.length:0}handleChange(e,t){e==t?this.props.handleChange("media_id",""):this.props.handleChange("media_id",e)}rotate(e){this.props.media.rotate(e)}
1render(){const{file:e,data:t,media:i,editCoverPhoto:a,editCaption:o,stepNum:h}=this.props;let w="";e&&(0,p.Jt)(e,"source")&&!e.source.endsWith(".")&&(w=-1!==e.source.indexOf("?")?`${e.source}&size=720x845&nocrop=1`:`${e.source}?size=720x845&nocrop=1`);let f={};"desktop"!==this.props.platform?f.onClick=()=>this.handleClick():(f.onMouseEnter=()=>this.handleOpen(),f.onMouseLeave=()=>this.handleClose());let E=(0,p.Jt)(this.props,"index",e.order);return r().createElement(r().Fragment,null,r().createElement("span",{className:"share-box-item relative sl-upload-media-item"},this.isVideo()&&r().createElement("div",{className:"video-label"},r().createElement("div",{className:"ics-video-outline"})," VIDEO"),r().createElement("div",{className:"editing-icons sl-editing-icons"},a&&r().createElement("span",{className:"button float-button edit-button bordered relative"},r().createElement("div",{className:"cover-select"},r().createElement("input",{type:"radio",id:`cover_select_${e.id}`,value:e.id,"data-ht-logger":"{action:'click_select_post_cover_star'}",checked:t.media_id==e.id,readOnly:!0}),r().createElement("label",{htmlFor:`cover_select_${e.id}`,onClick:()=>this.handleChange(e.id,t.media_id),className:"sl-select-post-cover"}))),this.isPhoto()&&r().createElement(r().Fragment,null,r().createElement("a",{className:"button float-button edit-button",onClick:()=>this.rotate(e)},r().createElement("i",{className:"ics-rotate"})),!this.props.isDragging&&r().createElement("a",{className:"button float-button edit-button upload-button relative","aria-label":"Re-upload Photo"},r().createElement("i",{className:"ics-upload"}),r().createElement(m.A,{onError:i.uploadError,api:`posts/${t.id}/media`,multiple:!1,onSuccess:t=>i.replace(t,e),inputClassName:`fileupload sl-file-replace-${E}`,formData:()=>({uploadOptions:"check_min_size"}),onProcessStarts:this.toggleSpinner,onProcessEnds:this.toggleSpinner})),this.showImgLibraryButton()&&r().createElement("a",{className:`button float-button edit-button img-library-button sl-replace-image-library-${E}`,onClick:()=>this.props.onLightBoxOpen(r().createElement(_.A,{singleSelect:!0,itemId:t.id,onSuccess:this.replaceFromLibrary,onProcessStarts:this.toggleSpinner,onProcessEnds:this.toggleSpinner})),"aria-label":"Image Library",title:"Replace from Library"},r().createElement(g.A,null))),r().createElement("a",{className:"button float-button edit-button  delete-not-sortable sl-delete-media",onClick:()=>{this.props.media.remove(e)},"data-ht-track":JSON.stringify({action:"Delete Media",element_zone:"Post Lightbox"})},r().createElement("i",{className:"ics-trash"}))),a&&t.media_id==e.id&&r().createElement("div",{className:"cover-selected nowrap fs16 sl-cover-selected"},r().createElement("span",{className:"dib color-primary fs22"},"★")," ",d.A.LANG.sharebox.media_cover_photo),this.isVideo()&&!w?r().createElement("div",{className:"image-wrapper centered"},r().createElement(c.A,{width:"634",height:"250"})):r().createElement("div",(0,s.A)({className:"image-wrapper sl-photo"},e.is_processing&&{"data-placeholder":"Image Loading..."}),r().createElement("img",{className:`image deg-${e.cssRotation||0}`,name:"image",src:w}),this.state.showSpinner?r().createElement(u.A,null):null),!this.isVideo()&&o&&!this.state.showCaption&&r().createElement("span",{className:"caption-trigger"},r().createElement("a",{className:"button neutral-button small",onClick:()=>{this.setState({showCaption:!0})}},d.A.LANG.sharebox.media_add_caption)),!this.isVideo()&&o&&this.state.showCaption&&r().createElement("div",{className:"caption-box flexbox row flex-align-center"},r().createElement("input",{type:"text",placeholder:d.A.LANG.sharebox.media_add_caption+"...",value:e.title,name:"caption",maxLength:(0,n.FL)(t),onChange:t=>i.setText(e,"title",t.target.value)}),r().createElement("div",{className:"character-counter"},r().createElement("p",{className:"bold fs16"},(0,n.FL)(t)-this.getFileTitleLength())))),this.isPhoto()&&this.showImageLink()&&r().createElement("div",{className:"small-toggle-pile w100 row image-link"},this.state.showMediaLink||"string"==typeof e.link&&e.link.length>0?r().createElement(r().Fragment,null,r().createElement("input",{type:"text",name:"",className:"bordered sl-media-url",value:(0,p.Jt)(e,"link")||"",placeholder:d.A.LANG.sharebox.add_link+" (optional)",onChange:e=>i.setText(this.props.file,"link",e.target.value)}),this.props.member.permissionGranted(["slideshow_amazon"])&&r().createElement("div",{style:{width:"100%",maxWidth:"720px",marginInline:"auto",marginBlock:"45px 10px"}},r().createElement("div",{className:"su-wrapper",style:{marginBlock:"10px -10px"}},r().createElement("div",{className:"orlabel styled"},"or")),r().createElement(r().Suspense,{fallback:null},r().createElement(b,{onSelect:this.addAmazonProduct,isUploading:this.state.uploadProgress,placeholder:"Select Amazon product link..."})))):r().createElement("a",{className:"button neutral-button large relative sl-add-link",onClick:()=>{this.setState({showMediaLink:!0})}},d.A.LANG.sharebox.add_link)),!this.props.disableText&&r().createElement(r().Fragment,null,this.state.showTextArea?r().createElement("div",{className:"add-image-text"},r().createElement(l.default,{fileId:e.id,placeholder:d.A.LANG.sharebox.media_description_placeholder,id:`shareBoxDiscussion${h+1}`,value:(this.isScrape?e.formatted_text:e.text)||"",updateContent:e=>this.updateContent(e),className:`image-text-editor sl-ql-editor-media-${h+1}`,style:{padding:0},quillId:"shareboxUploader_"+h,shareboxType:this.props.type,reorderingItems:this.props.reorderingItems,allowLinks:!!this.props.general_settings&&this.props.general_settings.allow_links,mediaApi:(t||{}).id?`posts/${t.id}/media`:"",media:this.props.media}),r().createElement("a",{className:"exit-edit-text",onClick:()=>{this.toggleTextArea(),this.updateContent("")}},r().createElement("i",{className:"ics-subtract fs20 fr"}))):r().createElement("button",{onClick:()=>this.toggleTextArea(),className:"button neutral-button large sl-add-text"},d.A.LANG.sharebox.media_add_text)))}}w.defaultProps={disableText:!1,editCoverPhoto:!1,editCaption:!1,type:"post",general_settings:null,saveDraft:()=>{}};const f=(0,h.g_)((0,h.Tg)((0,h.ft)(w)))},87782(e,t,i){i.d(t,{A:()=>l});var s=i(96540),a=i.n(s),o=i(29967);class r extends a().Component{constructor(e){super(e),this.state={showBubble:!1}}render(){let e=this.props.data,t=o.A.THEME.blogger_findout_link;return a().createElement(a().Fragment,null,this.props.config.settings&&this.props.config.settings.in_vertical?a().createElement(a().Fragment,null,a().createElement("h4",null,this.props.config.settings.blog_text),a().createElement("div",{className:"row totheleft w100"},a().createElement("input",{className:"bordered sl-url",type:"url",name:"url",onChange:e=>this.props.handleChange("url",e.target.value),value:e.url||"",placeholder:"http://www.mysite.com"}))):a().createElement(a().Fragment,null,this.props.showAddUrl||"blogger"==this.props.member.internal_contributor||this.props.member.isAdmin()?a().createElement("div",{className:"url-block flexbox w100 flex-column relative"},this.props.showAddUrl&&a().createElement("span",null,a().createElement("h3",null,"Website link"),a().createElement("input",{className:"bordered sl-url",type:"url",name:"url",onChange:e=>this.props.handleChange("url",e.target.value),value:e.url||"",placeholder:"http://www.mysite.com"})),("blogger"==this.props.member.internal_contributor||this.props.member.isAdmin())&&a().createElement("span",{className:this.props.checkField("url")?"errorField":""},this.state.showBubble&&a().createElement("div",{className:"bubble-pop appear"},a().createElement("a",{className:"x-close",onClick:()=>{this.setState({showBubble:!1})}},a().createElement("i",{className:"ics-close sl-bubble-close"})),"Once you have included 3 photos and 100 words you will be able to add 2 hyperlinks to your project.",a().createElement("br",null),"To add a hyperlink use the following formatting: [url=yourlink.com]yourtext[/url]",a().createElement("br",null),"To learn more about our requirements ",a().createElement("a",{href:t,target:"_blank",className:"blueTxt nowrap sl-blogger-click-
1here","data-ht-track":JSON.stringify({action:"Click External Link",element_zone:"Blogger Section",content_link_url:{learn_more_url:t}})},"click here"),"."),a().createElement("div",null,a().createElement("b",null,o.A.LANG.sharebox.add_blogger_link," ",a().createElement("a",{onClick:()=>{this.setState({showBubble:!0})},className:"blueTxt nowrap sl-blogger-learn-more","data-ht-track":JSON.stringify({action:"Click External Link",element_zone:"Blogger Section",content_link_url:{learn_more_url:t}})},o.A.LANG.sharebox.learn_more,"»"))),a().createElement("input",{name:"url",placeholder:o.A.LANG.sharebox.add_blogger_link_placeholder,value:e.url||"",className:"bordered sl-url",type:"url",disabled:this.props.isLinkDisabled(),onChange:e=>this.props.handleChange("url",e.target.value)}))):null))}}const l=r}}]);

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.