"use strict";(self.webpackChunkfindagrave_frontend=self.webpackChunkfindagrave_frontend||[]).push([[4627],{99376(e,a,o){o.d(a,{v:()=>i});o(71757);function i(e){return e&&["city","county","state","country"].map(a=>e[a]).filter(e=>e).join(", ")}},94904(e,a,o){o.d(a,{A:()=>t});var i=o(37989),r=o(71757);function t(){r(".birthyearfilter ul li a").on("click",function(){var e=r(this).attr("value");"unknown"===e?(r("#birthyear").val(""),r("#birthyear").prop("disabled",!0)):r("#birthyear").prop("disabled",!1),r("#birthyearfilter").val(e),r(".birthyearfilter .btn").text(r(this).text())}),document.addEventListener("wheel",function(e){const a=document.activeElement;"number"===a.type&&a.blur()}),r(".deathyearfilter ul li a").on("click",function(){var e=r(this).attr("value");"unknown"===e?(r("#deathyear").val(""),r("#deathyear").prop("disabled",!0)):r("#deathyear").prop("disabled",!1),r("#deathyearfilter").val(e),r(".deathyearfilter .btn").text(r(this).text())}),r("#partialLastName").on("click",function(){r("#fuzzyNames").prop("checked",!1)}),r("#exactName").on("click",function(){r("#fuzzyNames").prop("checked",!1)}),r("#fuzzyNames").on("click",function(){r("#partialLastName").prop("checked",!1),r("#exactName").prop("checked",!1)}),r("#is-famous").on("click",function(){r("#is-famous").is(":checked")?(r("#is-sponsored").attr("disabled","disabled"),r("#is-sponsored").closest(".checkbox").addClass("disabled")):(r("#is-sponsored").prop("disabled",!1),r("#is-sponsored").closest(".checkbox").removeClass("disabled"))}),r("#is-sponsored").on("click",function(){r("#is-sponsored").is(":checked")?(r("#is-famous").attr("disabled","disabled"),r("#is-famous").closest(".checkbox").addClass("disabled")):(r("#is-famous").prop("disabled",!1),r("#is-famous").closest(".checkbox").removeClass("disabled"))}),r("#is-cenotaph").on("click",function(){r("#is-cenotaph").is(":checked")?(r("#is-monument").attr("disabled","disabled"),r("#is-monument").closest(".checkbox").addClass("disabled")):(r("#is-monument").prop("disabled",!1),r("#is-monument").closest(".checkbox").removeClass("disabled"))}),r("#is-monument").on("click",function(){r("#is-monument").is(":checked")?(r("#is-cenotaph").attr("disabled","disabled"),r("#is-cenotaph").closest(".checkbox").addClass("disabled")):(r("#is-cenotaph").prop("disabled",!1),r("#is-cenotaph").closest(".checkbox").removeClass("disabled"))}),r("#noCemetery").on("click",function(){r("#noCemetery").is(":checked")?(r(".twitter-typeahead").find("input[type=text]").attr("disabled","disabled"),r("#location").closest(".input-group").find("button").attr("disabled","disabled")):(r(".twitter-typeahead").find("input[type=text]").prop("disabled",!1),r("#location").closest(".input-group").find("button").prop("disabled",!1))}),r("#locationId").on("change",function(){r("#locationId").val()?(r("#noCemetery").attr("disabled","disabled"),r("#noCemetery").closest(".checkbox").addClass("disabled")):(r("#noCemetery").prop("disabled",!1),r("#noCemetery").closest(".checkbox").removeClass("disabled"))}),r("#memorials-no-photos").on("click",function(){r("#memorials-no-photos").is(":checked")?(r("#memorials-with-photos").attr("disabled","disabled"),r("#memorials-with-photos").closest(".checkbox").addClass("disabled")):(r("#memorials-with-photos").prop("disabled",!1),r("#memorials-with-photos").closest(".checkbox").removeClass("disabled"))}),r("#memorials-with-photos").on("click",function(){r("#memorials-with-photos").is(":checked")?(r("#memorials-no-photos").attr("disabled","disabled"),r("#memorials-no-photos").closest(".checkbox").addClass("disabled")):(r("#memorials-no-photos").prop("disabled",!1),r("#memorials-no-photos").closest(".checkbox").removeClass("disabled"))}),r("#memorials-no-gps").on("click",function(){r("#memorials-no-gps").is(":checked")?(r("#memorials-with-gps").attr("disabled","disabled"),r("#memorials-with-gps").closest(".checkbox").addClass("disabled")):(r("#memorials-with-gps").prop("disabled",!1),r("#memorials-with-gps").closest(".checkbox").removeClass("disabled"))}),r("#memorials-with-gps").on("click",function(){r("#memorials-with-gps").is(":checked")?(r("#memorials-no-gps").attr("disabled","disabled"),r("#memorials-no-gps").closest(".checkbox").addClass("disabled")):(r("#memorials-no-gps").prop("disabled",!1),r("#memorials-no-gps").closest(".checkbox").removeClass("disabled"))}),r("#noPlot").on("click",function(){r("#noPlot").is(":checked")?(r("#plot").val(""),r("#plot").attr("disabled","disabled"),r("#hasPlot").attr("disabled","disabled"),r("#hasPlot").closest(".checkbox").addClass("disabled")):(r("#plot").prop("disabled",!1),r("#hasPlot").prop("disabled",!1),r("#hasPlot").closest(".checkbox").removeClass("disabled"))}),r("#hasPlot").on("click",function(){r("#hasPlot").is(":checked")?(r("#noPlot").attr("disabled","disabled"),r("#noPlot").closest(".checkbox").addClass("disabled")):(r("#noPlot").prop("disabled",!1),r("#noPlot").closest(".checkbox").removeClass("disabled"))}),r("#memorialid").on("input",function(){r("#memorialid").val()&&r("#memorialid").val(r("#memorialid").val().trim().replace(/\D/g,""))}),r("#moreRefineOptions").on("click",function(){r("#hideRefineOptions").removeClass("hidden"),r("#moreRefineOptions").addClass("hidden"),r(".refineSearchForm").removeClass("hidden")}),r("#hideRefineOptions").on("click",function(){r("#moreRefineOptions").removeClass("hidden"),r("#hideRefineOptions").addClass("hidden"),r(".refineSearchForm").addClass("hidden")}),r("#memorialSearchForm").on("submit",function(e){if(r("#memorialid").val()){var a="/memorial/"+r("#memorialid").val()+"?search=true";return window.location.href=a,!1}var o=r("#lastname").val().trim(),t=r("#locationId").val().trim(),s=r("#location").val().trim();if(findagrave.onMyMemorialPage||!t&&!r("#cemetery-name").val()||o||r("#firstname").val()||r("#birthyear").val()||r("#deathyear").val()){if(!findagrave.onMyMemorialPage&&o.length<2)return r("#lastNameLengthError").show(),r("#lastname").addClass("show-error"),e.preventDefault(),!1;if((0,i.n9)(r("#birthyear"))&&(0,i.cc)(r("#deathyear"))&&(0,i.Uo)(r("#birthyear"),r("#deathyear"))){if(!t&&s)return r("#location").addClass("show-error"),r("#locationError").show(),e.preventDefault(),!1;if(r("#memorialSearchForm").attr("action",findagrave.searchUrl),findagrave.onMyMemorialPage){var l=r("#type").val(),d=r("#mymemorialorderby").val();r("#memorialSearchForm").append(""),r("#memorialSearchForm").append(""),r("#memorialSearchForm").attr("action",findagrave.searchUrl)}return!0}}else 0===t.indexOf("cemetery")?window.location.href="/cemetery/"+t.substring(9)+"/"+r("#cemetery-name").val():window.location.href="/cemetery/search?locationId="+r("#locationId").val();return e.preventDefault(),!1}),r("#memorialNewSearchForm").on("submit",function(e){if(r("#memorialid").val()){var a="/memorial/"+r("#memorialid").val()+"?search=true";return window.location.href=a,!1}if(r("#locationId").length>0&&r("#locationId").val().trim(),(0,i.n9)(r("#birthyear"))&&(0,i.cc)(r("#deathyear"))&&(0,i.Uo)(r("#birthyear"),r("#deathyear"))){if(r("#memorialNewSearchForm").attr("action",findagrave.searchUrl),findagrave.onMyMemorialPage){var o=r("#type").val(),t=r("#mymemorialorderby").val();r("#memorialNewSearchForm").append(""),r("#memorialNewSearchForm").append(""),r("#memorialNewSearchForm").attr("action",findagrave.searchUrl)}return!0}return e.preventDefault(),!1})}},37989(e,a,o){o.d(a,{Uo:()=>s,cc:()=>t,n9:()=>r});o(84097);var i=o(71757);i("#i18n-exceedCurrentYear").html(),i("#i18n-invalidMonth").html(),i("#i18n-birthDateGreater").html(),i("#i18n-monthDay").html(),i("#i18n-monthFebDay").html(),i("#i18n-deathYearExceed").html(),i("#i18n-deathDay").html(),i("#i18n-invalidYear").html(),i("#i18n-leapYear").html(),i("#i18n-marriedYearBeforeBirth").html(),i("#i18n-marriedYearPastDeath").html(),i("#i18n-invalidLifeSpan").html();function r(e){return!(e.val()>(new Date).getFullYear())||(e.addClass("show-error"),i("#birthYearError").show(),!1)}function t(e){return!(e.val()&&e.val()>(new Date).getFullYear())||(e.addClass("show-error"),i("#deathYearError").show(),!1)}function s(e,a){var o=a.val(),r=e.val(),t=i("#deathyearfilter").val(),s=i("#birthyearfilter").val();return r&&o&&r>o||r&&o&&r==o&&"before"===t&&"before"!==s?(e.addClass("show-error"),a.addClass("show-error"),i("#deathYearGreaterThanBirthYearError").show(),!1):(e.removeClass("show-error"),a.removeClass("show-error"),i("#deathYearGreaterThanBirthYearError").hide(),!0)}}}]);
//# sourceMappingURL=4627.16828268d36f20b0cbd9.js.map