PageSourceSearch

https://www.weconstudio.it/wp-content/plugins/cf7-grid-layout/publ…/min/cf7-grid-layout-public.js?ver=4.18.0

js weconstudio.it collected 2026-10-07 18:38:15 UTC 31,016 bytes, 1 lines download raw bytes

1var cf7sgCustomSelect2Templates=cf7sgCustomSelect2Templates||{},cf7sgCustomHybridddTemplates=cf7sgCustomHybridddTemplates||{};!function(e){"use strict";let t=[],i=[],s={};e.fn.cf7sgWarning=function(t,i){let s=e(this);if(!s.is(":input"))return s;n(i)&&(i=0);let a=e('<span class="cf7sg-validation-warning">'+t+'<span class="confirm-button">ok</span></span>');s.after(a),i>0&&a.delay(i).fadeOut("slow",function(){s.remove()})},e(document).ready(function(){e("form.wpcf7-form").on("click",".confirm-button",function(t){let i=e(t.target);i.is(".cf7sg-validation-warning .confirm-button")&&i.parent().remove()}).each(function(){let t=e(this),i=t.closest("div.cf7-smart-grid").attr("id");t.attr("id","wpcf7-"+i)});let t=e("div.cf7-smart-grid.has-table form.wpcf7-form");if(t.length&&(e(".container.cf7-sg-table",t).each(function(){let i=e(this),s=i.closest("div.cf7-smart-grid").attr("id"),a=[],n=e(".row.cf7-sg-table",i),c="Add Row",r=i.next(".container.cf7-sg-table-footer");if(i[0].hasAttribute("id")){let t=e('<input class="cf7sg-tracker-field" value="1" type="hidden">').attr("name",i.attr("id"));i.prepend(t)}switch(!0){case i[0].hasAttribute("data-button"):c=i.data("button");break;case n[0].hasAttribute("data-button"):c=n.data("button")}n.find(":input").each(function(){let t=e(this),i=t.attr("type"),n=t.attr("name").replace("[]","");n.length>0&&"file"!==i&&(t.addClass("cf7sg-"+n+" cf7sgrow-field"),l(cf7sg[s],["prefill",n])||t.is(".cf7-sg-tabs-panel :input")||(a[n]=cf7sg[s].prefill[n],delete cf7sg[s].prefill[n]))}),r.length>0?(r.detach(),i.after(r),r.after('<div class="cf7-sg-table-button"><a href="javascript:void(0);" class="ui-button">'+c+"</a></div>")):i.after('<div class="cf7-sg-table-button"><a href="javascript:void(0);" class="ui-button">'+c+"</a></div>"),n.attr("data-row","0"),n=n.clone().addClass("cf7-sg-cloned-table-row"),n.attr("data-row","-1"),i.append(n.hide()),e(":input",n).each(function(){let t=e(this).prop("disabled",!0),i="_cf7sgcloned_"+t.attr("name");t.attr("name",i)}),n.append('<span class="row-control"><span class="dashicons dashicons-no-alt"></span></span>'),t.on("cf7SmartGridReady",function(e){i.trigger({type:"sgTableReady","table-id":i.attr("id")})});for(const t in a){if("[object Object]"!==String(a[t]))return void(cf7sg.debug&&console.log(`ERROR: Prefill table field ${t} value should be array`));let l=0,n="";for(const c in a[t])n=l>0?`${t}_row-${l}`:t,i.children(".row.cf7-sg-table").not(".cf7-sg-cloned-table-row").length<l+1&&i.cf7sgCloneRow(!1,null),e(`:input[name=${n}]`,i).prefillCF7Field(a[t][c],s),l++}}),t.click(".container",function(t){let i=e(t.target);if(i.is("div.cf7-sg-table-button a")){if(i=i.parent(),i.hasClass("disabled"))return;let e=i.prev(".container");e.is(".cf7-sg-table-footer")&&(e=e.prev(".container")),e.cf7sgCloneRow(!0,t.target)}else i.is(".cf7-sg-table .row-control .dashicons")&&i.closest(".container").cf7sgRemoveRow()})),t=e("div.cf7-smart-grid.has-validation form.wpcf7-form"),t.length){e('input[type="number"][class*="sgv-"]',t).each(function(){let t=e(this),i=t.attr("name"),s=t.closest("div.cf7-smart-grid").attr("id"),a=t.attr("value");l(cf7sg[s],["prefill",i])||(t.prefillCF7Field(cf7sg[s].prefill[i],s),a=cf7sg[s].prefill[i],delete cf7sg[s].prefill[i]),t.data("current",a)}),t.change('input[type="number"]',function(t){if(!e(t.target).is('input[type="number"]'))return;let i=e(t.target),s=i.data("current"),a=!1;switch(!0){case 0==i.val()&&i.is(".sgv-no-zero"):i.after('<span class="cf7sg-validation-warning">Value cannot be zero</span>'),i.val(s),a=!0;break;case 0>i.val()&&i.is(".sgv-no-negative"):i.after('<span class="cf7sg-validation-warning">Value cannot be negative</span>'),i.val(s),a=!0;break;case""==i.val()&&i.hasClass("sgv-not-empty"):i.after('<span class="cf7sg-validation-warning">Value cannot be empty</span>'),i.val(s),a=!0}a&&i.next("span.cf7sg-validation-warning").delay(3e3).fadeOut("slow").remove()})}t=e("div.cf7-smart-grid.has-accordion form.wpcf7-form"),t.length>0&&(t.filter("div.has-toggles form.wpcf7-form").each(function(){let t=e(this),i=e(".cf7sg-collapsible.with-toggle",t),s="",a=e('input[name="_cf7sg_toggles"]',t),n=!1,r={};a.length>0&&(s=a.val().length>0?JSON.parse(a.val()):{},n=!0),e.fn.trackToggle=function(t){if(!n)return!1;let i=e(this),l=i.attr("id");if(!i.is(".with-toggle"))return!1;
1if(t){let t=e(".cf7sg-collapsible-title",i).clone(),a=t.children(".toggle").data("on");t.children(".toggle").remove(),s[l]=t.text().trim()+"|"+a}else s.hasOwnProperty(l)&&delete s[l];void 0!==l&&a.length>0&&a.val(JSON.stringify(s))},t.on("click",".cf7sg-collapsible.with-toggle",function(i){let s,a=e(i.target);if(a.is("span.cf7sg-title.toggled")||a.is(".toggle-on")||a.is(".toggle-off")||a.is(".toggle"))s=a.closest(".cf7sg-collapsible-title");else{if(!a.parent().is(".cf7sg-collapsible.with-toggle"))return;s=a}if(e(".toggle",s).is(".disabled"))return!1;let l=s.closest(".container.cf7sg-collapsible"),n=l.attr("id"),c=s.parent().removeClass("collapsed").data("group");c&&e('.cf7sg-collapsible.with-toggle[data-group="'+c+'"]',t).each(function(){let t=e(this),i=e(".toggle",t),s=t.attr("id");n!==s?0===t.accordion("option","active")&&(t.addClass("collapsed"),i.toggleClass("disabled",!1).data("toggles").toggle(!1),t.accordion("option","active",!1),e(".row.ui-accordion-content :input",t).prop("disabled",!0),t.trackToggle(!1)):r[c]&&i.toggleClass("disabled",!0)});let o=s.children(".toggle").data("toggles");if(void 0===o&&cf7sg.debug&&(console.log("undefined toggleSwitch, header parent:"),console.log(s),console.log("e.target:"),console.log(i.target)),s.hasClass("ui-state-active")){o.toggle(!0);let i=e(".row.ui-accordion-content :input",s.parent()).not(".cf7-sg-cloned-table-row :input").not(".collapsed :input").prop("disabled",!1);t.is(".has-nice-select form")&&i.filter(".wpcf7-form-control.nice-select:enabled").niceSelect(),l.trackToggle(!0)}else o.toggle(!1),e(".row.ui-accordion-content :input",s.parent()).each(function(){let t=this.value;e(this).val(t.trim()).prop("disabled",!0)}),l.trackToggle(!1)}),i.each(function(){let t=e(this),i=t.attr("id");void 0===i&&(i=c(6),t.attr("id",i));let s=t.data("open"),a=t.data("group"),n=!1;if(a&&void 0===r[a]&&(r[a]=!1),void 0===s)s=!1;else if(!0===s)s=0,n=!0;let o=t.closest("div.cf7-smart-grid").attr("id");e(":input",t.children(".row")).each(function(){let t=e(this),i=t.attr("type"),a=t.attr("name").replace("[]","");if("file"===i)return!1;l(cf7sg[o],["prefill",a])||(t.prefillCF7Field(cf7sg[o].prefill[a],o),s=0,n=!0,delete cf7sg[o].prefill[a]),n||t.prop("disabled",!0)}),n||t.addClass("collapsed"),t.children(".cf7sg-collapsible-title").children(".toggle").setupToggle(n,a),n&&(t.trackToggle(!0),a&&(r[a]=!0)),e("#"+i).accordion({collapsible:!0,icons:!1,active:s,header:"> div.cf7sg-collapsible-title",heightStyle:"content",activate:function(t,i){e(this).trigger("sgContentIncrease")},beforeActivate:function(t,i){if(e(".toggle",i.oldHeader).is(".disabled"))return!1},create:function(t){e(this).trigger({type:"sgCollapsibleRowsReady","section-id":i})}})}),i.on("sgContentIncrease",function(){e(this).accordion("refresh")})}),t.each(function(){let t=e(this),i=e(".cf7sg-collapsible",t).not(".cf7sg-collapsible.with-toggle").not(".cf7sg-accordion-rows > .cf7sg-collapsible").not(".cf7sg-slider-section >.cf7sg-collapsible");i=i.add(e(".cf7sg-accordion-rows",t));i.each(function(){let t=e(this),i=t.attr("id");void 0===i&&(i=c(6),t.attr("id",i));let s=t.data("open"),a=!1;if(void 0===s)s=!1;else if(!0===s)s=0,a=!0;let l={heightStyle:"content",create:function(t){e(this).trigger({type:"sgCollapsibleRowsReady","section-id":i})}};t.is(".cf7sg-accordion-rows")?(t.children(".cf7sg-collapsible").children(".cf7sg-collapsible-title").addClass("accordion"),Object.assign(l,{header:"div.cf7sg-collapsible-title.accordion",animate:!1})):Object.assign(l,{collapsible:!0,active:s,header:"> div.cf7sg-collapsible-title",activate:function(t,i){e(this).trigger("sgContentIncrease")}}),e("#"+i).accordion(l),t.on("sgContentIncrease",function(){e(this).accordion("refresh")})})})),t=e("div.cf7-smart-grid.has-tabs form.wpcf7-form"),t.length&&(s={},t.click("ul.ui-tabs-nav li",function(t){let i=e(t.target),s=i.closest(".cf7-sg-tabs");i.is(".cf7sg-close-tab")?s.cf7sgRemoveTab():i.is(".cf7sg-add-tab")&&s.cf7sgCloneTab(!0,!0)}),e(".cf7-sg-tabs",t).each(function(){let t=e(this),i=t.closest("div.cf7-smart-grid").attr("id"),a=t.children(".cf7-sg-tabs-list"),n=[],c=[];if(1==a.children("li").length){a.after('<ul class="cf7sg-add-tab ui-tabs-nav"><li class="ui-state-default ui-corner-top"><a class="cf7sg-add-tab ui-tabs-anchor"><span class="cf7sg-add-tab dashicons dashicons-plus"></span></a></li></ul>');let r=t.children(".cf7-sg-tabs-panel").first(),o=e('<input class="cf7sg-tracker-field" value="1" type="hidden">').attr("name",r.attr("id"));t.prepend(o),r.find(":input").each(function(){let t=e(this),s=t.attr("type"),a=t.attr("name").replace("[]",""),r=!1;if("file"!==s)return!1;l(cf7sg[i],["prefill",a])||(r=!0),t.is(".cf7-sg-table :input")?(t.addClass("cf7sgtab-field"),r&&(c[a]=cf7sg[i].prefill[a],delete cf7sg[i].prefill[a])):a.length>0&&(t.addClass("cf7sg-"+a+" cf7sgtab-field"),r&&(n[a]=cf7sg[i].prefill[a],delete cf7sg[i].prefill[a]))});let d=e("<div>").append(r.clone());e(":input",d).prop("disabled",!0),s[r.attr("id")]=d.html()}t.tabs({create:function(t){let s=e(this),l="",r=0,o=0;for(const t in n){if("[object Object]"!==String(n[t]))return void(cf7sg.debug&&console.log(`ERROR: Prefill tab field ${t} value should be array`));r=0;for(const c in n[t])l=r>0?`${t}_tab-${r}`:t,a.children("li").length<r+1&&s.cf7sgCloneTab(!0,!1),e(`:input[name=${l}]`).prefillCF7Field(n[t][c],i),r++}for(const t in c){if("[object Object]"!==String(c[t]))return void(cf7sg.debug&&console.log(`ERROR: Prefill tabbed table field ${t} value should be 2D array`));let n=null;r=0;for(const d in c[t]){if("[object Object]"!==String(c[t][d]))return void(cf7sg.debug&&console.log(`ERROR: Prefill tabbed table field ${t} value should be 2D array`));l=r>0?`${t}_tab-${r}`:t,a.children("li").length<r+1&&(s=s.cf7sgCloneTab(!0,!1)),n=e(`:input[name=${l}]`,s).closest(".container.cf7-sg-table"),o=0;for(const s in c[t][d])l=o>0?`${l}_row-${o}`:l,n.children(".row.cf7-sg-table").not(".cf7-sg-cloned-table-row").length<o+1&&n.cf7sgCloneRow(!1,null),e(`:input[name=${l}]`,n).prefillCF7Field(c[t][d][s],i),o++;r++}}s.trigger("sgTabsReady")}})})),e("div.cf7-smart-grid").each(function(){let t=e(this),i=t.attr("id");l(cf7sg[i],["prefill"])||Object.keys(cf7sg[i].prefill).forEach(function(s){let a=e('[data-name="'+s+'"] :input',t),l=a.attr("type");0==a.length&&"file"!==l&&(a=e(':input[name="'+s+'"]',t)),a.prefillCF7Field(cf7sg[i].prefill[s],i)})}),t=e("div.cf7-smart-grid.has-nice-select form.wpcf7-form"),t.length>0&&t.each(function(){let t=e(this);e(".cf7sg-dynamic-dropdown.ui-select:enabled",t).each(function(){e(this).niceSelect()}),e(".wpcf7-form-control.nice-select:enabled",t).each(function(){e(this).niceSelect()}),t.on("cf7SmartGridReady",function(e){t.trigger("sgNiceSelect")})}),t=e("div.cf7-smart-grid.has-select2 form.wpcf7-form"),t.length>0&&t.each(function(){let t=e(this);e("select.wpcf7-form-control.select2:enabled",t).each(function(){let t=e(this);t.select2(t.cf7sgSelect2Options())}),t.on("cf7SmartGridReady",function(e){t.trigger("sgSelect2")})}
1),t=e("div.cf7-smart-grid.has-hybriddd form.wpcf7-form"),t.length>0&&t.each(function(){let t=e(this);e(".cf7sg-dynamic_checkbox",t).each(function(){new HybridDropdown(this,e(this).cf7sgHybridddOptions())})});let i=document.createElement("input");i.setAttribute("type","date");let a="date"==i.type;function c(e){e||(e=5);let t="",i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";for(let s=0;s<e;s++)t+=i.charAt(Math.floor(64*Math.random()));return t}t=e("div.cf7-smart-grid.has-date form.wpcf7-form"),t.length>0&&(t.filter("div.cf7_2_post form.wpcf7-form").each(function(){let t=e(this),i=t.closest("div.cf7_2_post").attr("id");i.length>0&&t.on(i,function(t){e("input.wpcf7-date:enabled",e(this)).each(function(){let t=e(this),i=t.attr("id");void 0===i&&(i=c(6),t.attr("id",i)),a||t.setupDatePicker()}),e("input.wpcf7-text.datepicker:enabled",e(this)).each(function(){let t=e(this),i=t.attr("id");void 0===i&&(i=c(6),t.attr("id",i)),t.setupDatePicker()})})}),t.not("div.cf7_2_post form.wpcf7-form").each(function(){e("input.wpcf7-text.datepicker:enabled",e(this)).each(function(){let t=e(this),i=t.attr("id");void 0===i&&(i=c(6),t.attr("id",i)),t.setupDatePicker()}),e("input.wpcf7-date:enabled",e(this)).each(function(){let t=e(this),i=t.attr("id");void 0===i&&(i=c(6),t.attr("id",i)),a||t.setupDatePicker()})})),t=e("div.cf7-smart-grid.has-slider form.wpcf7-form"),t.each(function(){let t=e(this).closest(".cf7-smart-grid").attr("id");e(".cf7sg-slider-section").each(function(){let i,s=e(this).wrapInner('<div class="glider"></div>'),a=e(".glider",s),l=s.closest(".container").next(".cf7sg-slider-controls"),n=e('<span class="slider-control slider-prev"></span>'),c=e('<span class="slider-control slider-next"></span>'),r=!1,o=null,d={arrows:{prev:".slider-prev",next:".slider-next"}};if(l.length>0){n=e(".slider-prev",l),c=e(".slider-next",l);let i=document.createElement("style");i.setAttribute("id",t+"-slider-controls"),i.type="text/css",i.innerText="#"+t+" .cf7sg-slider-controls > .cf7sg-submit-controls {max-width: calc(100% - "+(n.outerWidth()+10)+"px)}",document.head.appendChild(i),o=e(".cf7sg-submit-controls",l),o.length>0&&(r=!0,o.hide())}else if(void 0!==s.data("prev")&&(s.data("prev").length>0?n.text(s.data("prev")).addClass("ui-button"):n.addClass("dashicons dashicons-arrow-left-alt")),void 0!==s.data("next")&&(s.data("next").length>0?c.text(s.data("next")).addClass("ui-button"):c.addClass("dashicons dashicons-arrow-right-alt")),s.append(n).append(c),s.data("submit").length>0){r=!0,o=e('<span><input type="submit" value="'+s.data("submit")+'" class="slider-control wpcf7-form-control wpcf7-submit"></span>'),c.after(o);let t=(o.outerHeight()-16)/2;o.hide().append('<span style="margin:'+t+'px 5px;" class="ajax-loader"></span>')}if(n.hide(),s.data("dots")){n.before('<span class="slider-dots"></span>'),d.dots=".slider-dots";let t=s.data("dots");!0!==t&&(d.labelDots=t.split(","));let i=e("form.wpcf7-form input[type=submit]:not(.cf7_2_post_save)").get(0);if(i){i=window.getComputedStyle(i);let e=document.createElement("style");e.setAttribute("id","cf7sg-slider-dots"),e.type="text/css",e.innerText=".glider-dot:hover, .glider-dot:focus, .glider-dot.active{background:"+i["background-color"]+";color:"+i.color+"}",document.body.appendChild(e)}}a.on("glider-loaded",function(e){s.trigger({type:"sgSliderReady",total:a.find(".glider-slide").length})}).on("glider-slide-visible",function(a){let l=!0;switch(n.show(),c.show(),r&&o.hide(),a.detail.slide){case 0:n.hide(),l=!1;break;case i.slides.length-1:c.hide(),r&&o.show()}l&&cf7sg[t].slider_auto_scroll&&e(window).scrollTop(s.offset().top-35),e(a.target).find(".glider-slide.active").trigger({type:"sgSlideChange",current:a.detail.slide,last:e(a.target).find(".glider-slide").length-1})}),i=new Glider(a[0],d),s.on("sgRowAdded sgRowDeleted",function(e){i.refresh(!0)})})}),e.fn.sgCurrentSlide=function(){let t=e(this);return!!t.is(".cf7sg-slider-section")&&parseInt(t.find(".glider-slide.active").data("gslide"))},e.fn.sgChangeSlide=function(t){let i=e(this);if(!i.is(".cf7sg-slider-section"))return i;let s=Glider(e(".glider",i)[0]),a=i.sgCurrentSlide();return n(t)?a<s.slides.length&&s.scrollItem(a+1):t<0?a>0&&s.scrollItem(a-1):(t=parseInt(t))>=0&&t<=s.slides.length&&s.scrollItem(t),i},e("div.cf7-smart-grid.has-toggles div.cf7_2_post form.wpcf7-form").each(function(){let t=e(this),i=t.closest("div.cf7-smart-grid").attr("id"),s=t.closest("div.cf7_2_post").attr("id");s.length>0&&t.on(s,function(t){e(".cf7sg-collapsible.with-toggle",e(this)).each(function(){let t=e(this),s=t.attr("id");l(cf7sg[i],["toggles",s])?e(".row.ui-accordion-content :input",t).prop("disabled",!0):t.children(".cf7sg-collapsible-title").trigger("click")})})}),e("div.cf7-smart-grid form.wpcf7-form").addClass("cf7sg-ready").trigger("cf7SmartGridReady"),e("div.cf7-smart-grid").on("wpcf7:invalid wpcf7invalid wpcf7mailsent",".wpcf7",function(t){let i,s=e(t.target);switch(t.type){case"wpcf7mailsent":if(!n(cf7sg[t.delegateTarget.id])&&cf7sg[t.delegateTarget.id].redirect.length>0){let i=e(".cf7_2_post_draft",s);0!=i.length&&"false"!==i.val()||window.location.replace(cf7sg[t.delegateTarget.id].redirect)}break;case"wpcf7invalid":case"wpcf7:invalid":if(i=t.detail,void 0!==i.apiResponse){i=i.apiResponse.invalid_fields;for(let t in i){let s=e(i[t].into),a=s.parents(".cf7sg-collapsible:not(.glider-slide)");for(let t=0;t<a.length;t++)e(a[t]).attr("data-cf7sg","error"),e(a[t]).is(".cf7sg-accordion-rows .cf7sg-collapsible")?e(a[t]).closest(".cf7sg-accordion-rows").accordion("option","active",t):a.accordion("option","active",0);if(a=s.closest(".cf7-sg-tabs-panel"),a.length>0){let t=a.attr("id");a=a.closest(".cf7-sg-tabs");let i=e(".cf7-sg-tabs-list",a).children();for(let s=0;s<i.length;s++)if(t==e(i[s]).attr("aria-controls")){e(i[s]).attr("data-cf7sg","error"),a.tabs("option","active",s);break}}
1if(a=s.closest(".cf7sg-slider-section"),a.length>0){let t=s.closest(".glider-slide");t.attr("data-cf7sg","error"),Glider(e(".glider",a)[0]).scrollItem(t.data("gslide")),a.data("dots")&&e('.slider-dots button[data-index="'+t.data("gslide")+'"]',a).attr("data-cf7sg","error")}}}}}).submit(function(t){let i=e(t.target);e('.cf7-sg-tabs-list li[data-cf7sg="error"]',i).attr("data-cf7sg",""),e('.cf7sg-collapsible[data-cf7sg="error"]',i).attr("data-cf7sg",""),e('.slider-dots button[data-cf7sg="error"]',i).attr("data-cf7sg","")}),e("select.select2").closest("form").on("reset",function(t){e("select.select2",e(this)).val(null).trigger("change")}),e("div.cf7-smart-grid.has-grid .wpcf7-submit").each(function(){let t=e(this),i=t.closest("div.cf7-smart-grid").attr("id");void 0!==cf7sg[i].submit_disabled&&t.after('<span class="cf7sg-popup display-none">'+cf7sg[i].submit_disabled+"</span>").parent().addClass("cf7sg-popup-box")}),e("div.cf7-smart-grid.has-table").on("sgRowAdded",".container.cf7-sg-table",function(t){let i,s=e(this),a=s.closest("div.cf7-smart-grid").attr("id");if(i=s.data("max"),void 0!==i&&0!=i&&(i--,i==t.row)){let e=s.data("max-row-msg");e=n(e)?cf7sg[a].max_table_rows:e,e='<span class="max-limit wpcf7-not-valid-tip">'+e+"</span>",s.siblings(".cf7-sg-table-button").addClass("disabled").prepend(e)}}),e("div.cf7-smart-grid.has-table").on("sgRowDeleted",".container.cf7-sg-table",function(t){let i,s=e(this);i=s.data("max"),void 0!==i&&0!=i&&s.siblings(".cf7-sg-table-button").removeClass("disabled").children(".max-limit").remove()}),e("form.wpcf7-form").each(function(){let e=this;e.querySelectorAll(".wpcf7-response-output").forEach(e=>{e.classList.remove("wpcf7-response-output"),e.classList.add("cf7sg-response-output"),e.innerHTML='<div class="wpcf7-response-output"></div>'}),this.addEventListener("wpcf7submit",function(t){t.detail.apiResponse&&t.detail.apiResponse.message&&e.querySelectorAll(".cf7sg-response-output").forEach(e=>{let i=t.detail.apiResponse.message;if(void 0!==t.detail.apiResponse.cf7sgResponse){if(i=t.detail.apiResponse.cf7sgResponse,void 0!==i.redirect)return location=i.redirect,!1;void 0!==i[t.detail.apiResponse.status]&&(i=i[t.detail.apiResponse.status])}else i=t.detail.apiResponse.message;e.innerHTML=`${i}<div class="wpcf7-response-output"></div>`})})})});let a=function(t){if(!t.id)return t.text;let i=e(t.element);return e('<a href="'+i.data("permalink")+'">'+t.text+"</a>")};function l(e,t){if(n(t)&&(t=[]),n(e))return!0;let i=e;for(let e=0;e<t.length;e++){if(n(i[t[e]]))return!0;i=i[t[e]]}return!1}function n(e){return null==e||("number"==typeof e?isNaN(e):!Boolean(e))}e.fn.prefillCF7Field=function(t,i){let s=e(this);if(!s.is(":input"))return!1;let a=s.attr("name"),l=s[0],c=l.type;if(n(l))return cf7sg.debug&&console.log("CF7SG ERROR: Unable to retrieve form element "+a),s;switch(s.length>0&&(c=s[0].type),c){case"select-multiple":case"select":Array.isArray(t)||(t=[t]),t.forEach(function(e){l.querySelector('option[value="'+e+'"]').selected=!0});break;case"checkbox":case"radio":l=l.closest(".wpcf7-form-control-wrap"),Array.isArray(t)||(t=[t]),t.forEach(function(e){l.querySelector('input[value="'+e+'"]').checked=!0});break;default:l.value=t}return s.is(".cf7sg-dynamic-dropdown.ui-select:enabled,.wpcf7-form-control.nice-select:enabled")&&s.niceSelect().trigger("sgNiceSelect"),s.is("select.wpcf7-form-control.select2:enabled")&&s.select2($select2.cf7sgSelect2Options()).trigger("sgSelect2"),s.is(".cf7sg-dynamic_checkbox")&&new HybridDropdown(l,s.cf7sgHybridddOptions()),s},e.fn.cf7sgSelect2Options=function(){let t=e(this),i={tags:t.is(".tags")},s=t.attr("name").replace("[]","");return t.is(".cf7sg-permalinks")&&(i.templateSelection=a,i.templateResult=a),cf7sgCustomSelect2Templates[s]&&(i=Object.assign(i,cf7sgCustomSelect2Templates[s])),i},e.fn.cf7sgHybridddOptions=function(e={}){if(!this.is(".cf7sg-dynamic_checkbox"))return!1;let t=this.closest("div.cf7-smart-grid").attr("id"),i={},s=this.data("field-name");if(this.is(".cf7sg-hybriddd")?i.optionLabel=function(e){let t="",i="";if(Array.isArray(e)){t=e[0];for(let t=1;t<e.length;t++)i+=` ${e[t]}`}else t=e;return`<span${i}>${t}</span>`}:this.is(".cf7sg-imagehdd")&&(i.optionLabel=function(e){let t="",i="",s="";if(Array.isArray(e)){t=e[0];for(let t=1;t<e.length;t++)e[t].indexOf("data-thumbnail")>-1?s=e[t].replace("data-thumbnail","src"):i+=` ${e[t]}`}return`<div${i}><img ${s} alt="${t}" /><p>${t}</p></div>`}),cf7sgCustomHybridddTemplates[s]&&(i=Object.assign(i,cf7sgCustomHybridddTemplates[s])),!l(cf7sg[t],["prefill",s]))if("object"==typeof cf7sg[t].prefill[s])i.selectedValues=Object.values(cf7sg[t].prefill[s]);else i.selectedValues=[cf7sg[t].prefill[s]];return i},e.fn.activateCF7sgCollapsibleSection=function(t){null===t&&(t=!0);let i,s=e(this);if(!s.is(".cf7sg-collapsible"))return!1;switch(i=s.children(".cf7sg-collapsible-title"),!0){case t&&!i.is(".ui-state-active"):case!t&&i.is(".ui-state-active"):i.trigger("click")}return s},e.fn.getCF7field=function(t,i){null===i&&(i={});let s=e(this);if(void 0===t||0==t.length)return cf7sg.debug&&console.log("CF7 Smart-grid ERROR: getCF7field() requires valid field name."),
1!1;if(!s.is(".wpcf7-form"))return cf7sg.debug&&console.log("CF7 Smart-grid ERROR: getCF7field() using unknown form"),!1;let a=void 0!==i.tab,l=void 0!==i.row,n=[];switch(!0){case a&&i.tab>0&&l&&i.row>0:n=e(':input[name="'+t+"_tab-"+i.tab+"_row-"+i.row+'"]',s);break;case a&&l:n=e(':input[name="'+t+'"]',s);break;case a&&i.tab>0&&l:n=e(':input[name="'+t+"_tab-"+i.tab+'"]',s);break;case a&&i.tab>0:n=e(':input[name*="'+t+"_tab-"+i.tab+'"], :input[name*="'+t+"_tab-"+i.tab+'_row-"]',s);break;case a:n=e(':input[name*="'+t+'_row-"], :input[name="'+t+'"]',s);break;case l&&i.row>0&&a:n=e(':input[name="'+t+"_row-"+i.row+'"]',s);break;case l&&i.row>0:n=e(':input[name="'+t+"_row-"+i.row+'"]',s).add(e(':input[name*="'+t+'_tab-"]',s).filter(':input[name$="_row-'+i.row+'"]'));break;case l:n=e(':input[name="'+t+'"], :input[name$="'+t+'_tab-"]',s);break;default:n=e(':input[name*="'+t+'"]',s)}return n.not(".cf7-sg-cloned-table-row :input")},e.fn.setupDatePicker=function(){let t=e(this);if(!t.is(".wpcf7-date:enabled")&&!t.is(".wpcf7-text.datepicker:enabled"))return t;let i="",s="",a=t.attr("min");void 0===a?a=null:(a=new Date(a),i=a.getFullYear());let l=t.attr("max");return void 0===l?l=null:(l=new Date(l),s=l.getFullYear()),t.datepicker("destroy"),t.datepicker({defaultDate:t.val(),dateFormat:"yy-mm-dd",minDate:a,maxDate:l,changeMonth:!0,changeYear:!0}),i>0&&s>0?t.datepicker("option","yearRange",i+":"+s):i>0?t.datepicker("option","yearRange",i+":c+20"):s>0&&t.datepicker("option","yearRange","c-20:"+s),t},e.fn.toggleCF7sgTableRowAddition=function(t){null===t&&(t=!1);let i=e(this);return!!i.is(".container.cf7-sg-table")&&(t?i.next(".cf7-sg-table-button").show():i.next(".cf7-sg-table-button").hide(),i)},e.fn.toggleCF7sgTableRowDeletion=function(t){null===t&&(t=!1);let i=e(this);return!!i.is(".container.cf7-sg-table")&&(t?e(".row.cf7-sg-table:nth-last-child(2) .row-control",i).removeClass("display-none"):e(".row.cf7-sg-table:nth-last-child(2) .row-control",i).addClass("display-none"),i)},e.fn.cf7sgCountRows=function(){let t=e(this);return!!t.is(".container.cf7-sg-table")&&t.children(".row").not(".cf7-sg-cloned-table-row").length},e.fn.cf7sgRemoveRow=function(){let t=e(this);if(!t.is(".container.cf7-sg-table"))return!1;let i=t.children(".row").not(".cf7-sg-cloned-table-row");if(i.length>1){i.last().remove(),t.trigger("sgRowDeleted");let e=t.children(".cf7sg-tracker-field");e.length&&e.val(i.length-1)}return t},e.fn.cf7sgCloneRow=function(t,i){void 0===t&&(t=!0);let s=e(this),a="";if(s.is(".cf7-sg-table-footer")&&(a=s,s=s.closest(".container.cf7-sg-table")),!s.is(".container.cf7-sg-table"))return s;let l=s.children(".row.cf7-sg-table").length-1,n=e(".cf7-sg-cloned-table-row",s),c=n.clone(),r=s.closest("div.cf7-smart-grid").attr("id");c.removeClass("cf7-sg-cloned-table-row").attr("data-row",l),cf7sg[r].table_labels&&e(".field > label",c).remove(),a.length>0?a.before(c.show()):n.before(c.show()),String.prototype.endsWith||(String.prototype.endsWith=function(e,t){let i=this.toString();("number"!=typeof t||!isFinite(t)||Math.floor(t)!==t||t>i.length)&&(t=i.length),t-=e.length;let s=i.indexOf(e,t);return-1!==s&&s===t}),e(":input",c).each(function(){let i=e(this),s=i.attr("id"),a=i.closest("span.wpcf7-form-control-wrap"),n=i.is('[type="radio"]')||i.is('[type="checkbox"]');!s&&n&&(s=a.attr("id")),i.prop("disabled",!1);let c=i.attr("name").replace("_cf7sgcloned_",""),r="";if(c.endsWith("[]")&&(c=c.replace("[]",""),r="[]"),i.attr("name",c+"_row-"+l+r),a.removeClass(c).addClass(c+"_row-"+l),a.data("name")&&a.attr("data-name",c+"_row-"+l),s)if(n)a.attr("id",s+"_row-"+l);else{i.attr("id",s+"_row-"+l);let e=a.siblings("label");e.attr("for")===s&&e.attr("for",s+"_row-"+l)}i.is("select.ui-select")&&t&&i.niceSelect(),i.is("select.nice-select")&&t&&i.niceSelect(),i.is("select.select2")&&t&&(i.select2(i.cf7sgSelect2Options()),i.trigger("sgSelect2"))}),e(".cf7sg-dynamic_checkbox",c).each(function(){new HybridDropdown(this,e(this).cf7sgHybridddOptions())}),s.trigger("sgContentIncrease"),s.trigger({type:"sgRowAdded",row:l,button:i});let o=s.children(".cf7sg-tracker-field");return o.length&&o.val(l+1),s},e.fn.toggleCF7sgTabAddition=function(t){null===t&&(t=!1);let i=e(this);return!!i.is("div.cf7-sg-tabs")&&(t?e(".cf7sg-add-tab",i).show():e(".cf7sg-add-tab",i).hide(),i)},e.fn.toggleCF7sgTabDeletion=function(t){null===t&&(t=!1);let i=e(this);return!!i.is("div.cf7-sg-tabs")&&(t?e(".cf7-sg-tabs-list li:last-child .cf7sg-close-tab",i).removeClass("display-none").show():e(".cf7-sg-tabs-list li:last-child .cf7sg-close-tab",i).addClass("display-none").hide(),i)},e.fn.cf7sgCountTabs=function(){let t=e(this);return!!t.is("div.cf7-sg-tabs")&&t.find(".cf7-sg-tabs-list").children("li").length},e.fn.cf7sgRemoveTab=function(){let t=e(this);if(!t.is("div.cf7-sg-tabs"))return!1;let i=t.find(".cf7-sg-tabs-list").children("li");if(i.length>1){let e=i.last().find("a").attr("href");
1t.find("div"+e).remove(),i.last().remove().is(".ui-state-active")&&t.tabs({active:i.length-2}),t.trigger("sgTabRemoved");let s=i.eq(i.length-2).find(".cf7sg-close-tab:not(.display-none)");s.length>0&&s.show();let a=t.children(".cf7sg-tracker-field");a.length&&a.val(t.children(".cf7-sg-tabs-panel").length)}return t},e.fn.cf7sgCloneTab=function(t,i){null===i&&(i=!1);let a=e(this);if(void 0===t&&(t=!0),!a.is("div.cf7-sg-tabs"))return!1;let l=a.children(".cf7-sg-tabs-list"),n=l.children("li").length+1,c=a.children(".cf7-sg-tabs-panel").first().attr("id"),r=c+"-"+n,o=l.children("li").first().clone();o.find("a").attr("href","#"+r).text(o.text()+" ("+n+")"),o.append('<span class="cf7sg-close-tab dashicons dashicons-no-alt"></span>'),o.removeClass("ui-tabs-active ui-state-active"),l.find("li .cf7sg-close-tab").hide(),l.append(o);let d=e(s[c]);d.attr("id",r),e(":input",d).each(function(){let i=e(this),s=i.attr("id"),a=i.closest("span.wpcf7-form-control-wrap"),l=i.is(".cf7-sg-cloned-table-row :input"),c=i.attr("name"),r="";if(l||i.prop("disabled",!1),c.endsWith("[]")&&(c=c.replace("[]",""),r="[]"),i.attr("name",c+"_tab-"+(n-1)+r),a.removeClass(c).addClass(c+"_tab-"+(n-1)),a.data("name")&&a.attr("data-name",c+"_tab-"+(n-1)),s){i.attr("id",s+"_tab-"+(n-1));let e=a.siblings("label");e.attr("for")===s&&e.attr("for",s+"_tab-"+(n-1))}!l&&i.is("select.ui-select")&&t&&i.niceSelect(),!l&&i.is("select.nice-select")&&t&&i.niceSelect(),!l&&i.is("select.select2")&&t&&(i.select2(i.cf7sgSelect2Options()),i.trigger("sgSelect2"))}),e(".cf7sg-dynamic_checkbox",d).not(".cf7-sg-cloned-table-row *").each(function(){new HybridDropdown(this,e(this).cf7sgHybridddOptions())}),a.append(d),d.find("ul.ui-tabs-nav li a").each(function(){let t=e(this);r=t.attr("href"),t.attr("href",r+"-"+n),t.closest("ul.ui-tabs-nav").siblings("div"+r).attr("id",r.substring(1)+"-"+n)}),e(".cf7-sg-tabs",d).each(function(){e(this).tabs()}),e(".cf7sg-collapsible.with-toggle",d).each(function(){let i=e(this),s=i.attr("id"),a=s+"_tab-"+(n-1);i.attr("id",a);let l=i.data("group");l&&(l=l+"_tab-"+(n-1),i.attr("data-group",l));let c=i.data("open"),r=!1;if(void 0===c)c=!1;else if(!0===c)c=0,r=!0;e(".toggle",i).setupToggle(r,l),r&&i.trackToggle(!0),!r&&t&&(e(".row.ui-accordion-content :input",i).prop("disabled",!0),i.addClass("collapsed")),e(".cf7sg-collapsible",d).accordion({collapsible:!0,icons:!1,active:c,header:"> div.cf7sg-collapsible-title",heightStyle:"content",activate:function(t,i){e(this).trigger("sgContentIncrease")},beforeActivate:function(t,i){if(e(".toggle",i.oldHeader).is(".disabled"))return!1},create:function(t){e(this).trigger({type:"sgCollapsibleRowsReady","section-id":s,"tab-index":n-1})}})}),a.tabs("refresh"),i&&a.tabs("option","active",-1),d.trigger({type:"sgTabAdded","tab-index":n-1}),e(".cf7-sg-table.container",d).each(function(){let t=e(this),i=t.attr("id");t.attr("id",i+"_tab-"+(n-1)),t.trigger({type:"sgTableReady","table-id":i,"tab-index":n-1})});let f=a.children(".cf7sg-tracker-field");return f.length>0&&f.val(a.children(".cf7-sg-tabs-panel").length),a},e.fn.setupToggle=function(t,i){let s=e(this);if(void 0===t&&(t=!1),!s.is(".toggle"))return s;if(s.length>0){let e=s.data("on");0==e.length&&(e="Yes");let a=s.data("off");0==e.length&&(a="No"),s.toggles({drag:!1,text:{on:e,off:a},on:t}),i&&t&&s.toggleClass("disabled",!0)}return s},e("div.cf7-smart-grid.has-update form.wpcf7-form").on("cf7SmartGridReady",function(){let s=e(this);e.ajax({type:"POST",url:cf7sg.url,dataType:"json",data:{action:"save_grid_fields",nonce:e('input[name="_wpnonce"]',s).val(),tabs_fields:JSON.stringify(t),table_fields:JSON.stringify(i),id:e('input[name="_wpcf7"]',s).val()}}).fail(function(e,t){console.log("CF7 Smart Grid ERROR sending grid fields to server: "+t)})})}(jQuery);

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.