/home/grlogisticsandse/public_html/wp-content/plugins/siteseo/assets/js/siteseo-block-editor.min.js
/*
* SiteSEO
* https://siteseo.io/
* (c) SiteSEO Team <support@siteseo.io>
*/

/*
Copyright 2016 - 2024 - Benjamin Denis  (email : contact@seopress.org)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2, as
published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
*/

jQuery(document).ready(function(t){let{subscribe:e,select:a}=wp.data,s=!1;e(()=>{var e=wp.data.select("core/editor").isAutosavingPost(),a=wp.data.select("core/edit-post").isSavingMetaBoxes();if(a&&!e&&!s){if(void 0!==t(".siteseo-metabox-tabs").attr("data_id"))var i=t(".siteseo-metabox-tabs").attr("data_id");else if(void 0!==t("#siteseo_content_analysis .wrap-siteseo-analysis").attr("data_id"))var i=t("#siteseo_content_analysis .wrap-siteseo-analysis").attr("data_id");if(void 0!==t("#siteseo-tabs").attr("data_tax"))var o=t("#siteseo-tabs").attr("data_tax");else if(void 0!==t("#siteseo_content_analysis .wrap-siteseo-analysis").attr("data_tax"))var o=t("#siteseo_content_analysis .wrap-siteseo-analysis").attr("data_tax");if(void 0!==t(".siteseo-metabox-tabs").attr("data_origin"))var l=t(".siteseo-metabox-tabs").attr("data_origin");else if(void 0!==t("#siteseo_content_analysis .wrap-siteseo-analysis").attr("data_origin"))var l=t("#siteseo_content_analysis .wrap-siteseo-analysis").attr("data_origin");t.ajax({method:"GET",url:siteseoAjaxRealPreview.siteseo_real_preview,data:{action:"siteseo_do_real_preview",post_id:i,tax_name:o,origin:l,post_type:t("#siteseo_launch_analysis").attr("data_post_type"),siteseo_analysis_target_kw:t("#siteseo_analysis_target_kw_meta").val(),_ajax_nonce:siteseoAjaxRealPreview.siteseo_nonce},beforeSend:function(){t(".siteseo-analysis-summary-pill").fadeIn().text(""),t(".siteseo-analysis-summary-pill").addClass("siteseo-stripes")},success:function(e){og_title=void 0===e.data.og_title?"":e.data.og_title.values,og_desc=void 0===e.data.og_desc?"":e.data.og_desc.values,og_img=void 0===e.data.og_img?"":e.data.og_img.values,og_url=void 0===e.data.og_url?"":e.data.og_url.host,og_site_name=void 0===e.data.og_site_name?"":e.data.og_site_name.values,tw_title=void 0===e.data.tw_title?"":e.data.tw_title.values,tw_desc=void 0===e.data.tw_desc?"":e.data.tw_desc.values,tw_img=void 0===e.data.tw_img?"":e.data.tw_img.values,meta_robots=void 0===e.data.meta_robots?"":e.data.meta_robots[0];var a={og_title:og_title,og_desc:og_desc,og_img:og_img,og_url:og_url,og_site_name:og_site_name,tw_title:tw_title,tw_desc:tw_desc,tw_img:tw_img};for(var s in a)a.length&&(s=a[s].length>1?a[s].slice(-1)[0]:a[s][0]);meta_robots=meta_robots.toString(),t("#siteseo-advanced-alert").empty(),/noindex/.test(meta_robots)&&t("#siteseo-advanced-alert").append('<span class="impact high" aria-hidden="true"></span>'),t(".siteseo-search-preview-desktop h3").html(e.data.title),t(".siteseo_titles_title_meta").attr("placeholder",e.data.title),t(".siteseo-search-preview-desktop .siteseo-search-preview-description").html(e.data.meta_desc),t(".siteseo_titles_desc_meta").attr("placeholder",e.data.meta_desc),a.og_title&&(t("#siteseo_social_fb_title_meta").attr("placeholder",a.og_title[0]),t(".siteseo-metabox-fb-preview .siteseo-metabox-fb-title").html(a.og_title[0])),a.og_desc&&(t("#siteseo_social_fb_desc_meta").attr("placeholder",a.og_desc[0]),t(".siteseo-metabox-fb-preview .siteseo-metabox-fb-desc").html(a.og_desc[0])),a.og_img&&(t("#siteseo_social_fb_img_meta").attr("placeholder",a.og_img[0]),t(".siteseo-metabox-fb-preview .siteseo-metabox-fb-image img").attr("src",a.og_img[0])),t(".siteseo-metabox-fb-preview .siteseo-metabox-fb-host").html(a.og_url),a.tw_title&&(t("#siteseo_social_twitter_title_meta").attr("placeholder",a.tw_title[0]),t(".siteseo-metabox-x-preview .siteseo-metabox-x-title").html(a.tw_title[0])),a.tw_desc&&t("#siteseo_social_twitter_desc_meta").attr("placeholder",a.tw_desc[0]),a.tw_img&&(t("#siteseo_social_twitter_img_meta").attr("placeholder",a.tw_img[0]),t(".siteseo-metabox-x-preview .siteseo-metabox-x-image img").attr("src",a.tw_img[0])),t(".siteseo-metabox-x-host").html("From "+a.og_url),t("#siteseo_robots_canonical_meta").attr("placeholder",e.data.canonical),t("#siteseo-metabox-content-analysis").load(" #siteseo-metabox-content-analysis","",siteseo_ca_toggle),t("#siteseo-metabox-wrapper #siteseo-metabox-content-analysis").load(" #siteseo-metabox-content-analysis","",siteseo_ca_toggle),t("#siteseo-wrap-notice-target-kw").load(" #siteseo-notice-target-kw",""),t("#siteseo-metabox-wrapper #siteseo-wrap-notice-target-kw").load(" #siteseo-notice-target-kw","")}})}s=!!a}),setInterval(siteseo_do_realtime,2e4,t)});function siteseo_do_realtime(t){if(document.activeElement&&t(document.activeElement).closest("#siteseo-ca-tabs").length>0)return;let e=wp.data.select("core/editor").getEditedPostContent(),a=wp.data.select("core/editor").getCurrentPostId(),s=wp.data.select("core/editor").getEditedPostAttribute("title"),i=wp.data.select("core/editor").getCurrentPostType(),o=wp.data.select("core/editor").getEditedPostSlug();if(!a||!e)return;let l={};l.title=t("#siteseo_titles_title_meta")?.val(),l.description=t("#siteseo_titles_desc_meta")?.val(),l.og_title=t("#siteseo_social_fb_title_meta")?.val(),l.og_desc=t("#siteseo_social_fb_desc_meta")?.val(),l.og_img=t("#siteseo_social_fb_img_meta")?.val(),l.tw_title=t("#siteseo_social_twitter_title_meta")?.val(),l.tw_desc=t("#siteseo_social_twitter_desc_meta")?.val(),l.tw_img=t("#siteseo_social_twitter_img_meta")?.val(),$connanical_url=t("#siteseo_robots_canonical_meta")?.val();let r=t(".siteseo-metabox-tabs"),d=(r.data("term-id"),r.data("home-id"),r.attr("data_origin")),n=r.attr("data_tax"),c=t("#siteseo_analysis_target_kw_meta")?.val();t.ajax({url:siteseoAjaxRealPreview.ajax_url,method:"POST",data:{action:"siteseo_realtime_analysis",post_content:e,post_title:s,post_id:a,post_type:i,post_origin:d,post_tax:n,post_slug:o,keywords:c,_ajax_nonce:siteseoAjaxRealPreview.realtime_nonce,meta:l},beforeSend:function(){t(".siteseo-analysis-summary-pill").fadeIn().text(""),t(".siteseo-analysis-summary-pill").addClass("siteseo-stripes")},success:function(e){e.success&&(t("#siteseo-metabox-content-analysis").load(" #siteseo-metabox-content-analysis","",siteseo_ca_toggle),t("#siteseo-metabox-wrapper #siteseo-metabox-content-analysis").load(" #siteseo-metabox-content-analysis","",siteseo_ca_toggle),t("#siteseo-wrap-notice-target-kw").load(" #siteseo-notice-target-kw",""),t("#siteseo-metabox-wrapper #siteseo-wrap-notice-target-kw").load(" #siteseo-notice-target-kw",""))}})}