PageSourceSearch

https://www.southcoastalvillagevolunteers.org/assets/application-5…5959f35d709bb0f3f1ea4206002e1e9afc6532ab.js

js southcoastalvillagevolunteers.org collected 2026-09-29 21:57:10 UTC 1,388,461 bytes, 43 lines download raw bytes

1function scrollToAnchor(e){var t=$("div[name='"+e+"']");$("html,body").animate({scrollTop:t.offset().top},"slow")}function initAlbumEdit(){var e=$("#album_pictures");e.length&&!e.data("hvSortable")&&(e.data("hvSortable",!0),e.sortable({axis:"y",handle:".handle",update:function(){$.post(e.data("update-url"),e.sortable("serialize"))}}));var t=$("#edit_title_button");t.length&&!t.data("hvBound")&&(t.data("hvBound",!0),t.on("click",function(){$("#editable_album_name").show(),$("#show_album_name").hide()}))}function initOnLoadBlogPosts2(){document.querySelector(".blog_posts")&&window.hvWireUserSearchSections&&window.hvWireUserSearchSections(".blog_posts .hv-search-section")}function initCampaignTransferList(){function e(){if(r){var e=n.querySelectorAll(".campaign-topic-required:checked");r.value=Array.from(e).map(function(e){return e.dataset.topicId}).join(",")}}function t(){o.value=Sortable.get(n).toArray().join(","),e()}var n=document.getElementById("campaign-topics-assigned"),i=document.getElementById("campaign-topics-available"),o=document.getElementById("campaign-topic-ids"),r=document.getElementById("campaign-required-topic-ids");n&&i&&o&&(n._hvSortableInit||(n._hvSortableInit=!0,n.addEventListener("change",function(t){t.target.classList.contains("campaign-topic-required")&&e()}),Sortable.create(n,{group:{name:"campaign-topics",pull:!0,put:!0},animation:150,onEnd:t}),Sortable.create(i,{group:{name:"campaign-topics",pull:!0,put:!0},animation:150,onEnd:t})))}function initExcludingMembersToggle(){var e=document.getElementById("excluding-members-toggle"),t=document.getElementById("excluding-members-body"),n=document.getElementById("excluding-members-chevron");e&&t&&!e._hvInit&&(e._hvInit=!0,e.addEventListener("click",function(){var e="none"!==t.style.display;t.style.display=e?"none":"block",n.style.transform=e?"rotate(-90deg)":"rotate(0deg)"}))}function initOnLoadCheckinCampaigns2(){document.querySelector(".checkin_campaigns.edit, .checkin_campaigns.update")&&(initCampaignTransferList(),initExcludingMembersToggle())}function initCheckins2SearchSections(){var e=document.getElementById("search_performed_by");document.querySelectorAll(".hv-search-section").forEach(function(t){function n(t){t.preventDefault(),t.stopPropagation(),e&&(e.style.display=a?"inline":"none");var n={search:i.value};o&&(n.form_id=o.value),r&&(n.user_type=r.value),$.ajax({url:"/users/search",method:"GET",dataType:"script",data:n})}var i=t.querySelector('input[name="search"]'),o=t.querySelector('input[name="form_id"]'),r=t.querySelector('input[name="user_type"]'),s=t.querySelector("button.hv-search-btn");if(i&&s){var a=o&&"search_performed_by"===o.value;s.addEventListener("click",n),i.addEventListener("keydown",function(e){"Enter"===e.key&&n(e)})}})}function initCheckins2ClearBtn(e){function t(){var t=document.createElement("button");return t.type="button",t.id=e.clearBtnId,t.className="hv-flash-dismiss",t.setAttribute("aria-label","Remove"),t.style.marginLeft="auto",t.style.flexShrink="0",t.innerHTML='<svg viewBox="0 0 24 24" fill="none" stroke-linecap="round"><path d="M18 6L6 18M6 6l12 12"/></svg>',t.addEventListener("click",function(){o.style.display="none",o.innerHTML="",r&&(r.value=""),i.style.display="block";var t=i.querySelector('input[name="search"]');t&&(t.value="",t.focus());var n=i.querySelector(".users_list");n&&(n.style.display="none"),e.afterClear&&e.afterClear()}),t}function n(){var n=o.querySelector(".hv-member-row");n&&!n.querySelector("#"+e.clearBtnId)&&n.appendChild(t())}var i=document.getElementById(e.searchBoxId),o=document.getElementById(e.selectedBoxId),r=document.getElementById(e.hiddenFieldId);i&&o&&(n(),new MutationObserver(function(){"none"!==o.style.display&&o.querySelector(".hv-member-row")&&(i.style.display="none",n())}).observe(o,{attributes:!0,childList:!0}))}function initCheckins2MemberClear(){initCheckins2ClearBtn({searchBoxId:"checkin-member-search",selectedBoxId:"searched_user",hiddenFieldId:"checkin_user_id",clearBtnId:"checkin-member-clear",afterClear:function(){var e=document.getElementById("checkin-member-prefs");e&&(e.innerHTML="")}})}function initCheckins2VolunteerClear(){initCheckins2ClearBtn({searchBoxId:"checkin-volunteer-search",selectedBoxId:"second_searched_user",hiddenFieldId:"checkin_performed_by_user_id",clearBtnId:"checkin-volunteer-clear"})}function initCheckins2TopicAccordion(){document.querySelectorAll(".hv-topic-item").forEach(function(e){if(!e._hvAccordionInit){e._hvAccordionInit=!0;var t=e.querySelector(".hv-topic-toggle"),n=e.querySelector(".hv-topic-body"),i=e.querySelector(".hv-topic-chevron");t&&n&&t.addEventListener("click",function(){var e="none"!==n.style.display;n.style.display=e?"none":"block",i&&(i.style.transform=e?"":"rotate(180deg)")})}})}function initCheckins2AssociatedMembers(){document.querySelectorAll(".feeling_checkbox").forEach(function(e){var t=e.dataset.memberId,n=document.getElementById("feeling_"+t),i=document.getElementById("member_feeling_"+t);i&&(i.disabled=!e.checked,e.addEventListener("change",function(){i.disabled=!e.checked,n&&(n.style.display=e.checked?"block":"none")}))})}function initCheckins2BuddySelect(){var e=document.getElementById("checkin-buddy-select");e&&e.addEventListener("change",function(){var t=new URL(e.dataset.url,window.location.origin);e.value&&t.searchParams.set("user_id",e.value),window.location.assign(t.toString())})}function initCheckins2InvalidTopicReveal(){var e=document.querySelector("form.nifty_form");e&&e.addEventListener("invalid",function(e){var t=e.target.closest(".hv-topic-body");if(t&&"none"===t.style.display){t.style.display="block";var n=t.closest(".hv-topic-item"),i=n&&n.querySelector(".hv-topic-chevron");i&&(i.style.transform="rotate(180deg)")}},!0)}function initCheckinsSearchFeelingSelect(){var e=document.getElementById("select_feeling"),t=document.getElementById("search-form");e&&t&&!e._hvBound&&(e._hvBound=!0,e.addEventListener("change",function(){var n=document.getElementById("feeling");n&&(n.value=e.value),t.submit()}))}function initOnLoadCheckins2(){initCheckinsSearchFeelingSelect();var e=document.querySelector(".checkins.new, .checkins.edit, .checkins.create, .checkins.update");e&&(e._hvCheckins2Ready||(e._hvCheckins2Ready=!0,initCheckins2SearchSections(),initCheckins2MemberClear(),initCheckins2VolunteerClear(),initCheckins2TopicAccordion(),initCheckins2AssociatedMembers(),init
1Checkins2BuddySelect(),initCheckins2InvalidTopicReveal()))}function initConfigsFileInputs(){document._hvConfigsFileReady||(document._hvConfigsFileReady=!0,document.addEventListener("change",function(e){var t=e.target.closest(".hv-file-input");if(t){var n=document.getElementById(t.id+"_name");n&&(n.textContent=t.files[0]?t.files[0].name:"No file chosen")}}))}function initConfigsEditTabs(){var e=document.getElementById("cfg-edit-tabs");if(e&&!e._hvTabsReady&&window.jQuery&&jQuery.fn.tabs){e._hvTabsReady=!0;var t=parseInt(e.getAttribute("data-initial-tab"),10)||0;jQuery("#cfg-edit-tabs").tabs({active:t})}}function disableFields(){$("#monthly-checkbox").prop("disabled",!0),$("#amount_temp").prop("disabled",!0),$("#donation_amount_buttons").hide(),$("[id='search']").prop("disabled",!0)}function initBackgroundCheckDonation(){let e=$("#donation_fundraising_campaign_id").val(),t=function(){e&&$("#donation_fundraising_campaign_id").val(e)},n=function(){let n=$("#donation_fundraising_campaign_id option:selected").text(),i=$("#donation_donor_type").val();if("Background Checks"!==n)return void(e=$("#donation_fundraising_campaign_id").val());if("User"!==i)return t(),void alert("The Background Check fundraising campaign is not available for Organizations");let o=$("#donation_donor_id").val();if(!o)return t(),void alert("Please select a user and chose the Background Check fundraising campaign again");let r={user_id:o};App.StripePayment.contactServer("/background_checks/is_waiting_for_donation",r).then(n=>{if(n.error)console.log("Error when contacting the server to check for awaiting donation"),console.log(n.error);else if(n.result)e=$("#donation_fundraising_campaign_id").val();else{confirm("There is no background check awaiting for donation. Are you sure you want to proceed?")?e=$("#donation_fundraising_campaign_id").val():t()}})};$("#donation_fundraising_campaign_id").change(()=>{n()}),$("#donation_donor_id").change(()=>{n()}),document.body.setAttribute("data-donations-js-ready","true")}function initHvDurationManualEntry(){document.querySelectorAll(".js-duration-entry").forEach(function(e){var t=e.querySelector(".js-duration-select"),n=e.querySelector(".js-duration-manual");t&&n&&t.addEventListener("change",function(){var e="manual"===t.value;if(n.style.display=e?"flex":"none",e){var i=n.querySelector(".js-duration-hours");i&&i.focus()}else n.querySelectorAll("input").forEach(function(e){e.value=""})})})}function initEmailMessages2(){if(document.querySelector(".email_messages.new, .email_messages.edit, .email_messages.create, .email_messages.update")){var e=document.getElementById("email_to_group_category"),t=document.getElementById("label_email_to_group"),n=document.getElementById("email_message_email_to_group"),i=document.getElementById("data_service_types");if(e&&t&&n&&i){var o={1:JSON.parse(i.dataset.volunteerServices||"[]"),2:JSON.parse(i.dataset.officeCorpsServices||"[]"),3:JSON.parse(i.dataset.mailingLists||"[]"),4:JSON.parse(i.dataset.taggedPeopleGroups||"[]"),5:JSON.parse(i.dataset.interestGroups||"[]")};e.addEventListener("change",function(){var e=o[this.value]||[];n.innerHTML="",e.forEach(function(e){var t=document.createElement("option");t.value=e[0],t.textContent=e[1],n.appendChild(t)}),t.style.display=this.value?"block":"none"})}}}function hvNormalizeHex(e){var t=(e||"").trim(),n=t.match(/^#?([0-9a-f])([0-9a-f])([0-9a-f])$/i);if(n)return("#"+n[1]+n[1]+n[2]+n[2]+n[3]+n[3]).toLowerCase();var i=t.match(/^#?([0-9a-f]{6})$/i);return i?("#"+i[1]).toLowerCase():null}function initEventCategoryColorPickers(){function e(){if(t){var e=document.getElementById("event_category_rgb_color"),n=document.getElementById("event_category_rgb_text_color"),i=e&&hvNormalizeHex(e.value),o=n&&hvNormalizeHex(n.value);i&&(t.style.backgroundColor=i),o&&(t.style.color=o)}}var t=document.getElementById("ec2-color-preview");document.querySelectorAll(".hv-color-field").forEach(function(t){if(!t._hvColorReady){t._hvColorReady=!0;var n=t.querySelector('input[type="color"]'),i=t.querySelector('input[type="text"]');if(n&&i){var o=hvNormalizeHex(i.value);o&&(n.value=o),n.addEventListener("input",function(){i.value=n.value,e()}),i.addEventListener("input",function(){var t=hvNormalizeHex(i.value);t&&(n.value=t),e()})}}}),e()}function initOnLoadEventCategories(){document.querySelector(".event_categories.new, .event_categories.edit, .event_categories.create, .event_categories.update")&&initEventCategoryColorPickers()}function hvTicketOrderTermsRejected(){return $("#is_fhwo_event_terms").length>0&&!$("#is_fhwo_event_terms").is(":checked")?(alert("Please accept our FHWO terms of service."),!0):$("#accept_terms_of_service").length>0&&!$("#accept_terms_of_service").is(":checked")&&(alert("Please accept our terms of service."),!0)}function hvTicketOrderHasCaptchaResponse(){let e=$("#g-recaptcha-response-data-
1hvstripesecret"),t=$("#g-recaptcha-response");return 0===e.length&&0===t.length||!(!e.val()&&!t.val())}function hvTicketOrderConfirmSubmit(){let e=document.querySelector(".ticket_order_form");e&&(window.App&&App.StripePayment&&App.StripePayment.refreshCaptchaToken?App.StripePayment.refreshCaptchaToken():Promise.resolve(null)).then(()=>{if(!hvTicketOrderHasCaptchaResponse()&&hvTicketOrderPayment)return hvTicketOrderPayment.showMessage("Please check the box below to confirm you're not a robot, then try again.",!1),void hvTicketOrderPayment.renderRecaptchaV2Fallback();e.submit()})}function show_hide_registration_deadline(e){"offline_rsvp_required"==e||"online_rsvp_required"==e||"online_rsvp_and_instant_registration"==e?$("#registration_deadline_select").show():$("#registration_deadline_select").hide()}function evShow2Init(){var e=document.getElementById("ev-cap-fill");e&&setTimeout(function(){e.style.width=e.dataset.pct+"%"},700);var t=document.getElementById("purchase_tickets_button"),n=document.getElementById("purchase_tickets_choose");t&&n&&(t.onclick=function(e){e.preventDefault(),t.style.display="none",n.style.display="block"});var i=document.getElementById("purchase_tickets_button_hero");i&&n&&(i.onclick=function(e){e.preventDefault(),n.style.display="block",t&&(t.style.display="none"),n.scrollIntoView({behavior:"smooth",block:"start"})});var o=document.getElementById("ev-cal-btn"),r=document.getElementById("ev-cal-menu");o&&r&&(o.onclick=function(e){e.stopPropagation();var t=r.classList.toggle("open");o.classList.toggle("open",t),o.setAttribute("aria-expanded",String(t))},document._evCalOutsideListener||(document._evCalOutsideListener=!0,document.addEventListener("click",function(){var e=document.getElementById("ev-cal-menu"),t=document.getElementById("ev-cal-btn");e&&e.classList.remove("open"),t&&(t.classList.remove("open"),t.setAttribute("aria-expanded","false"))})));var s=document.getElementById("ev-clone-toggle"),a=document.getElementById("ev-clone-body");s&&a&&(s.onclick=function(){var e="none"===a.style.display;a.style.display=e?"block":"none";var t=s.querySelector(".ev-clone-arrow");t&&(t.textContent=e?"\u25bc":"\u25ba")})}function evForm2Init(){function e(e,t){return 60*parseInt(e.value,10)+(t?parseInt(t.value,10):0)}function t(e,t){for(var n=String(t).padStart(2,"0"),i=0;i<e.options.length;i++)if(e.options[i].value===n)return void(e.selectedIndex=i)}function n(){if(v&&b&&e(v,y)>=e(b,_)){var n=Math.min(parseInt(v.value,10)+1,23);t(b,n),_&&y&&(_.selectedIndex=y.selectedIndex),w&&t(w,n),C&&y&&(C.selectedIndex=y.selectedIndex)}}var i=document.getElementById("event_rsvp_required"),o=document.getElementById("registration_deadline_select");i&&o&&(i.onchange=function(){o.style.display="no_rsvp_required"!==this.value&&this.value?"":"none"});var r=document.getElementById("event_ticket_sales_type"),s=document.getElementById("price_and_capacity"),a=document.getElementById("show_add_ticket_instructions");r&&(r.onchange=function(){var e="no_online_sales"===this.value;s&&(s.style.display=e?"":"none"),a&&(a.style.display=e?"none":"")});var l=document.getElementById("has_reg_url"),c=document.getElementById("external_registration_url");l&&c&&(l.onchange=function(){c.style.display=this.checked?"":"none"});var d=document.getElementById("has_online_meeting_url"),u=document.getElementById("online_meeting_url");d&&u&&(d.onchange=function(){u.style.display=this.checked?"":"none"});var h=document.getElementById("replace_price_link"),p=document.getElementById("price_desc");h&&p&&(h.onclick=function(e){e.preventDefault(),p.style.display="",h.style.display="none"});var f=document.getElementById("event_start_date_field"),m=document.getElementById("event_end_date_field"),g=document.getElementById("event_registration_deadline_date_field"),v=document.getElementById("event_start_time_field_4i"),y=document.getElementById("event_start_time_field_5i"),b=document.getElementById("event_end_time_field_4i"),_=document.getElementById("event_end_time_field_5i"),w=document.getElementById("event_registration_deadline_time_field_4i"),C=document.getElementById("event_registration_deadline_time_field_5i");if(f&&m&&$(f).on("change",function(){m.value=f.value,g&&(g.value=f.value)}),v&&b&&$(v).on("change",n),y&&_&&y.addEventListener("change",function(){_.selectedIndex=y.selectedIndex,C&&(C.selectedIndex=y.selectedIndex)}),b&&w&&b.addEventListener("change",function(){t(w,parseInt(b.value,10))}),_&&C&&_.addEventListener("change",function(){C.selectedIndex=_.selectedIndex}),document.getElementById("event_name")){document.querySelectorAll(".hv-search-section").forEach(function(e){function t(){var e="search_speaker"===o.value,t=document.getElementById("event_searching_for");t&&(t.value=e?"speaker":"organizer"),$.ajax({url:"/users/search",method:"GET",dataType:"script",data:{search:i.value,form_id:o.value}})}var n=e.querySelector(".hv-search-btn"),i=e.querySelector('input[type="search"]'),o=e.querySelector('input[name="form_id"]');n&&i&&o&&(n.onclick=function(e){e.preventDefault(),t()},i.onkeydown=function(e){"Enter"===e.key&&(e.preventDefault(),t())})});var k=document.getElementById("search_address_name"),x=document.getElementById("event_address_attributes_name");
1k&&x&&(k.onblur=function(){x.value=k.value},$("#search_address_name").off("railsAutocomplete.select").on("railsAutocomplete.select",function(e,t){var n=function(e,t){var n=document.getElementById(e);n&&(n.value=t)};n("event_address_attributes_name",t.item.name),n("event_address_attributes_street",t.item.street),n("event_address_attributes_number",t.item.number),n("event_address_attributes_city",t.item.city),n("event_address_attributes_state",t.item.state),n("event_address_attributes_zip_code",t.item.zip_code),n("event_address_id",t.item.id)}))}}function evIndex2Init(){function e(e){document.querySelectorAll(".filter_check_box").forEach(function(t){t.checked=e})}var t=document.getElementById("check_all"),n=document.getElementById("uncheck_all");t&&(t.onclick=function(t){t.preventDefault(),e(!0)}),n&&(n.onclick=function(t){t.preventDefault(),e(!1)});var i=document.getElementById("ev2-filter-header"),o=document.getElementById("ev2-filter-body");i&&o&&(i.onclick=function(){o.style.display="none"===o.style.display?"block":"none"});var r=document.getElementById("ev-filter-toggle"),s=document.getElementById("ev-filter-panel");r&&s&&(r.onclick=function(){var e=s.classList.toggle("open");r.classList.toggle("open",e)},"true"===r.dataset.autoOpen&&(s.classList.add("open"),r.classList.add("open")));var a=document.getElementById("ev-admin-toggle"),l=document.getElementById("ev-admin-features");a&&l&&(a.onclick=function(){var e="none"===l.style.display||""===l.style.display;l.style.display=e?"block":"none",a.classList.toggle("open",e),a.setAttribute("aria-expanded",e?"true":"false")});var c=document.getElementById("ev-pending-toggle"),d=document.getElementById("ev-pending-body");if(c&&d){var u=document.getElementById("ev-pending-caret"),h=function(e){d.style.display=e?"block":"none",c.setAttribute("aria-expanded",e?"true":"false"),u&&(u.innerHTML=e?"&#9660;":"&#9654;"),e&&"true"!==c.dataset.loaded&&(c.dataset.loaded="true",evFetchPendingValidation(c.dataset.url))};c.onclick=function(){h("true"!==c.getAttribute("aria-expanded"))},c.onkeydown=function(e){"Enter"!==e.key&&" "!==e.key&&"Spacebar"!==e.key||(e.preventDefault(),h("true"!==c.getAttribute("aria-expanded")))}}document._hvPendingMoreReady||(document._hvPendingMoreReady=!0,document.addEventListener("click",function(e){var t=e.target.closest("#ev-pending-more");t&&(e.preventDefault(),evFetchPendingValidation(t.getAttribute("href")))}))}function evFetchPendingValidation(e){e&&fetch(e,{headers:{Accept:"text/vnd.turbo-stream.html"},credentials:"same-origin"}).then(function(e){return e.text()}).then(function(e){window.Turbo&&Turbo.renderStreamMessage&&Turbo.renderStreamMessage(e)})}function evShow2Boot(){evShow2Init(),evForm2Init(),evIndex2Init()}function toggleArchivedCampaigns(){var e=document.getElementById("archived-section"),t=document.getElementById("archived-chevron"),n=document.getElementById("archived-label");if(e&&t&&n){var i="none"===e.style.display;e.style.display=i?"block":"none",t.style.transform=i?"rotate(180deg)":"",n.textContent=i?n.textContent.replace("Show","Hide"):n.textContent.replace("Hide","Show")}}function initFundraisingCampaignsArchivedToggle(){document._hvFcArchivedReady||(document._hvFcArchivedReady=!0,document.addEventListener("click",function(e){document.querySelector(".fundraising_campaigns.index")&&e.target.closest&&e.target.closest("#archived-toggle")&&toggleArchivedCampaigns()}))}function define_ambassador(e){$("#ambassador_user_id").val(e.id),$("#ambassador_user_name").text(e.name)}function initHoursEfforts2Form(){var e=document.getElementById("duration_instead_of_end_time");e&&!e.dataset.hvInit&&(e.dataset.hvInit="1",$(e).on("change",function(){$(this).is(":checked")?($("#time_select").hide(),$("#reported_duration").show()):($("#time_select").show(),$("#reported_duration").hide())})),document.querySelectorAll(".hv-search-section").forEach(function(e){function t(e){e.preventDefault(),e.stopPropagation(),$("#member_or_volunteer").val(l?"member":"volunteer"),$.ajax({url:"/users/search",method:"GET",dataType:"script",data:{search:o.value,form_id:s,user_type:a}})}if(!e.dataset.hvInit){e.dataset.hvInit="1";var n=e.querySelector('input[name="form_id"]'),i=e.querySelector('input[name="user_type"]'),o=e.querySelector('input[name="search"]'),r=e.querySelector("button.hv-search-btn");if(o&&r){e.dataset.hvSearchWired="1";var s=n?n.value:"",a=i?i.value:"",l="search_benef"===s;r.addEventListener("click",t),o.addEventListener("keydown",function(e){"Enter"===e.key&&t(e)})}}})}function maybeInitHoursEfforts2(){document.querySelector(".hours_efforts.new, .hours_efforts.edit, .hours_efforts.create, .hours_efforts.update, .hours_efforts.clone")&&initHoursEfforts2Form()}function multiple_selection_ious_action(e){var t="";$("input[type=checkbox]").each(function(){if(1==(this.checked?"1":"0")){var e=this.name.match(/\d+/);t+=""==t?e:","+e}});var n=$("#ious_js_table").data("iousArray"),i=$("#ious_js_table").data("paymentsArray"),o=$.map(t.split(","),$.trim);if("recalculate_total"===e){var r=0;return $.each(n,function(e,t){-1!==$.inArray(String(t[0]),o)&&(r=parseFloat(r)+parseFloat(t[1]))}),$.each(i,function(e,t){r=parseFloat(r)-parseFloat(t[1])}),$("#iou_table_total_amount").html(toDollarAmount(r)),void calculateAvailableCredit()}}
1function toDollarAmount(e){return e.toLocaleString("en-US",{style:"currency",currency:"USD",minimumFractionDigits:2,maximumFractionDigits:2})}function calculateAvailableCredit(){var e=parseFloat($("#ious_js_table").data("maxAvailableCredit")),t=parseFloat($("#iou_table_total_amount").html().replace(/[^\d.]/g,"")),n=0;n=t>e?e:t,$("#iou_table_available_credit_amount").html(toDollarAmount(n)),$("#credit_to_be_applied_to_this_invoice").val(n);var i=t-n;$("#iou_table_net_payment").html(toDollarAmount(i))}async function initMap(){await google.maps.importLibrary("marker");var e=new google.maps.Map(document.getElementById("map"),{zoom:12,center:{lat:37.42562933,lng:-122.2053907},mapId:"DEMO_MAP_ID"});new google.maps.Geocoder,setMarkers(e,$("#data").data("members"),"https://mt.googleapis.com/vt/icon/name=icons/onion/SHARED-mymaps-container-bg_4x.png,icons/onion/SHARED-mymaps-container_4x.png,icons/onion/1603-house_4x.png&highlight=ff000000,0288D1&scale=1.5");e.addListener("mousemove",function(){$("[role='tooltip']").remove()})}function makeMarkerContent(e,t,n){var i=document.createElement("img");return i.src=e,t&&(i.width=t),n&&(i.height=n),i}function setMarkers(e,t,n){for(var i=new google.maps.LatLngBounds,o=[],r=0;r<t.length;r++){var s=t[r],a=new google.maps.marker.AdvancedMarkerElement({position:{lat:s[1],lng:s[2]},map:e,content:makeMarkerContent(n,58,58),title:s[0],zIndex:5});i.extend(a.position),a.addListener("click",handleMarkerClick.bind(void 0,a,r,t)),o.push(a)}if(1==t.length){var l=new google.maps.LatLng(t[0][1],t[0][2]);e.setCenter(l),e.setZoom(15)}else e.fitBounds(i);return o}function geocodeAddress(e,t,n,i){e.geocode({address:i},function(e,t){if(t==google.maps.GeocoderStatus.OK){if("member_address"==n)return e[0].geometry.location}else alert("Geocode was not successful for the following reason: "+t)})}function handleMarkerClick(e,t,n){"undefined"==typeof infowindow&&(infowindow=new google.maps.InfoWindow({}));var i='<div id="content"><div id="siteNotice"></div><h1 id="firstHeading" class="firstHeading">'+n[t][0]+'</h1><div id="bodyContent"><p><b>Address</b> '+n[t][3]+"</p><p><b>Phone</b> "+n[t][4]+"</p></div></div>";infowindow.setContent(i),infowindow.open(e.map,e)}function toggleSection(e,t){var n=document.getElementById(e);n&&(n.style.display=t?"":"none")}function initMembershipTypesSectionToggles(){document._hvMtSectionToggleReady||(document._hvMtSectionToggleReady=!0,document.addEventListener("change",function(e){var t=e.target;t&&t.dataset&&t.dataset.hvToggleSection&&toggleSection(t.dataset.hvToggleSection,t.checked)}))}function toggleArchived(){var e=document.getElementById("archived-section"),t=document.getElementById("archived-chevron"),n=document.getElementById("archived-toggle");if(e&&n){var i="none"===e.style.display;e.style.display=i?"block":"none",t&&(t.style.transform=i?"rotate(180deg)":"");var o=n.querySelector(".archived-count"),r=o?o.textContent:"";n.textContent="",t&&n.appendChild(t),n.append(" "+(i?"Hide":"Show")+" Archived Membership Types"+(r?" ("+r+")":""))}}function initMembershipTypes2ArchivedToggle(){document._hvMtArchivedReady||(document._hvMtArchivedReady=!0,document.addEventListener("click",function(e){document.querySelector(".membership_types.index")&&e.target.closest&&e.target.closest("#archived-toggle")&&toggleArchived()}))}function initMembershipTypes2Subscribe(){function e(e){o&&(o.style.display="Automated Clearing House"===e?"block":"none"),r&&(r.style.display="Credit Card"===e?"block":"none"),s&&(s.style.display="Card on file"===e?"block":"none")}function t(){var e=document.getElementById("stripeToken");e&&(e.value="")}if(document.querySelector(".membership_types.subscribe")){var n=document.getElementById("stripe_publishable_key");if(n){var i=document.getElementById("payment_method_select"),o=document.getElementById("ach"),r=document.getElementById("credit_card_button"),s=document.getElementById("registered-card");i&&i.addEventListener("change",function(){e(this.value)});var a=new App.StripePayment(n.value,"#amount_temp_val"),l=document.getElementById("user_id"),c=l?l.value:"",d=document.getElementById("trial-end-date");a.notReady("#customButton");var u=function(){return new Promise(function(e){var t=new Date(d?d.value:"");t.setHours(23,59,59),isNaN(t.getTime())||t<new Date?e({error:"Please choose a date in the future"}):e({valid:!0})})},h=function(){return new Promise(function(e){e({valid:!0})})},p=document.getElementById("confirm-date");p&&p.addEventListener("click",function(e){e.preventDefault();var t=document.getElementById("accept_additional_field_mt_check_box_creditcard");!t||null===t.offsetParent||t.checked?(d&&(d.disabled=!0),p.style.display="none",a.state===a.waiting&&(
1a.notReady("#confirm-date"),a.validate(u,"setup-intent",{user_id:c}).then(function(e){if(e.success){var t=document.getElementById("start-date-confirmation-");t&&(t.style.display="none");var n=document.getElementById("customButton");n&&(n.style.display="block"),a.ready("#customButton")}else p.style.display="block",d&&(d.disabled=!1),a.ready("#confirm-date")}))):alert("The electronic payments additional fee is mandatory, please check that box before proceeding")});var f=document.getElementById("customButton");f&&f.addEventListener("click",function(e){e.preventDefault(),d&&(d.disabled=!1),a.state===a.validated&&(a.notReady("#customButton",!0),a.confirm(h).then(function(e){e.success?document.querySelector(".payment_form").submit():a.ready()}))});var m=document.getElementById("subscribe_with_ach");m&&m.addEventListener("click",function(e){e.preventDefault();var n=document.getElementById("accept_additional_field_mt_check_box_ach");!n||null===n.offsetParent||n.checked?(t(),document.querySelector(".payment_form").submit()):alert("The electronic payments additional fee is mandatory, please check that box before proceeding")});var g=document.getElementById("subscribe_with_card_on_file");g&&g.addEventListener("click",function(e){e.preventDefault();var n=document.getElementById("accept_additional_field_mt_check_box_creditcardonfile");!n||null===n.offsetParent||n.checked?(t(),document.querySelector(".payment_form").submit()):alert("The electronic payments additional fee is mandatory, please check that box before proceeding")}),wireServiceFee2("accept_additional_field_mt_check_box_ach","optional_service_fee_mt_ach_div","optional_service_fee_mt_ach"),wireServiceFee2("accept_additional_field_mt_check_box_creditcard","optional_service_fee_mt_creditcard_div","optional_service_fee_mt_creditcard"),wireServiceFee2("accept_additional_field_mt_check_box_creditcardonfile","optional_service_fee_div","optional_service_fee_mt_creditcardonfile")}}}function wireServiceFee2(e,t,n){var i=document.getElementById(e);i&&(i.addEventListener("click",function(){var e=document.getElementById(t);e&&(e.style.display="block")}),i.addEventListener("change",function(){if(i.checked){var e=document.getElementById(n),t=document.getElementById("amount_temp_val");i.disabled=!0,e&&(e.disabled=!0),t&&e&&(t.value=(parseFloat(t.value)||0)+(parseFloat(e.value)||0))}}))}function initMembershipTypes2OnLoad(){initMembershipTypes2Subscribe(),initMembershipTypes2ArchivedToggle(),initMembershipTypesSectionToggles()}function hvNavVisible(e){return!!e&&null!==e.offsetParent}function hvNavSubmenuOf(e){return e.querySelector(":scope > .hv-nav-sub, :scope > .hv-nav-sub-sub")}function hvNavClosestSubmenu(e){return e.closest(".hv-nav-sub-sub")||e.closest(".hv-nav-sub")}function hvNavTriggerOf(e){return e.querySelector(":scope > .hv-nav-item, :scope > .hv-nav-sub-item--has-children")}function hvNavLevelItems(e){if(!e)return[];var t=[];return Array.prototype.forEach.call(e.children,function(e){if(e.matches)if(e.matches("a.hv-nav-item, a.hv-nav-sub-item"))t.push(e);else if(e.matches(".hv-nav-sub-group")){var n=e.querySelector(":scope > .hv-nav-sub-item--has-children");n&&t.push(n)}}),t.filter(hvNavVisible)}function hvNavOpen(e){e.classList.add("is-open");var t=hvNavTriggerOf(e);t&&t.setAttribute("aria-expanded","true"),e.classList.contains("hv-nav-sub-group")&&hvNavMeasureFlyoutFlip(e)}function hvNavClose(e){e.classList.remove("is-open");var t=hvNavTriggerOf(e);t&&t.setAttribute("aria-expanded","false");var n=e.querySelector(":scope > .hv-nav-sub-sub");n&&n.classList.remove("hv-nav-sub-sub--flip-left"),Array.prototype.forEach.call(e.querySelectorAll(".is-open"),function(e){e.classList.remove("is-open");var t=hvNavTriggerOf(e);t&&t.setAttribute("aria-expanded","false")})}function hvNavCloseSiblings(e){var t=e.parentElement;t&&Array.prototype.forEach.call(t.children,function(t){t!==e&&t.classList&&t.classList.contains("is-open")&&hvNavClose(t)})}function hvNavCloseAll(){var e=document.querySelector(".hv-nav");e&&(Array.prototype.forEach.call(e.querySelectorAll(".is-open"),function(e){e.classList.remove("is-open");var t=hvNavTriggerOf(e);
1t&&t.setAttribute("aria-expanded","false")}),Array.prototype.forEach.call(e.querySelectorAll(".hv-nav-sub-sub--flip-left"),function(e){e.classList.remove("hv-nav-sub-sub--flip-left")}))}function hvNavMeasureFlyoutFlip(e){var t=e.querySelector(":scope > .hv-nav-sub-sub");if(t){t.classList.remove("hv-nav-sub-sub--flip-left");var n=8;t.getBoundingClientRect().right>window.innerWidth-n&&t.classList.add("hv-nav-sub-sub--flip-left")}}function initNavSubmenuFlip(){var e=document.querySelectorAll(".hv-nav-sub-group");e.length&&e.forEach(function(e){var t=e.querySelector(":scope > .hv-nav-sub-sub");t&&(e.addEventListener("mouseenter",function(){window.matchMedia("(hover: none)").matches||hvNavMeasureFlyoutFlip(e)}),e.addEventListener("mouseleave",function(){t.classList.remove("hv-nav-sub-sub--flip-left")}))})}function initNavA11y(){function e(e,t){t&&(e.setAttribute("aria-haspopup","true"),e.setAttribute("aria-expanded",e.closest(".is-open")?"true":"false"),t.id||(t.id="hv-nav-popup-"+ ++hvNavSubIdSeq),e.setAttribute("aria-controls",t.id))}var t=document.querySelector(".hv-nav");t&&(t.querySelectorAll(".hv-nav-dropdown > .hv-nav-item").forEach(function(t){e(t,t.parentElement.querySelector(":scope > .hv-nav-sub"))}),t.querySelectorAll(".hv-nav-sub-item--has-children").forEach(function(t){var n=t.closest(".hv-nav-sub-group");e(t,n&&n.querySelector(":scope > .hv-nav-sub-sub"))}))}function initOnLoadMenu2(){initNavSubmenuFlip(),initNavA11y()}function hvApplyMenuItemTargetRadio(e){var t=document.getElementById("link_to_editable_page"),n=document.getElementById("link_to_url");t&&(t.style.display="editable_page"===e.value?"":"none"),n&&(n.style.display="url"===e.value?"":"none");var i=HV_MENU_ITEM_BUILTIN_TARGETS[e.value],o=document.getElementById("menu_item_target_url");i&&o&&(o.value=i)}function initNewsArticles2NewsletterToggle(){function e(){var e=t.checked,n=document.getElementById("newsletter_pdf_div"),i=document.getElementById("news_article_html_div");n&&(n.style.display=e?"":"none"),i&&(i.style.display=e?"none":"")}if(document.querySelector(".news_articles.new, .news_articles.edit, .news_articles.create, .news_articles.update")){
2var t=document.getElementById("news_article_is_newsletter");t&&!t._hvInit&&(t._hvInit=!0,t.addEventListener("change",e),e())}}function initUiChange(){let e=function(e){let t=["#paid_at","#check_specific","#check_save_btn","#cash_or_other_specific"],n=!1;["#ach","#credit_card_button","#check_specific","#check_save_btn","#cash_or_other_specific","#paid_at","#registered-card"].forEach(i=>{e.includes(i)?($(i).show(),t.includes(i)&&(n=!0)):$(i).hide()}),$("#combined_payment_card").toggle(n)},t=$(".payment_method");t.change(function(){switch(t.val()){case"Credit Card":e("#credit_card_button");break;case"Automated Clearing House":e("#ach");break;case"Check":e(["#paid_at","#check_specific","#check_save_btn"]);break;case"Cash":case"Other":case"Village Credit":e(["#paid_at","#cash_or_other_specific"]);break;case"Card on file":e("#registered-card");break;case"Pay Later":e(["#cash_or_other_specific"]);break;default:$("#ach").hide(),$("#credit_card_button").hide(),$("#check_specific").hide(),$("#check_save_btn").hide(),$("#combined_payment_card").hide()}}),$("#accept_additional_field_check_box").change(function(){let e=$("#accept_additional_field_check_box"),t=$("#optional_service_fee");if($("#accept_additional_field_check_box").length&&$("#accept_additional_field_check_box").is(":checked")){e.prop("disabled",!0),t.prop("disabled",!0);var n=parseFloat($("#amount_temp_val").val())+parseFloat($("#optional_service_fee_val").val());$("#amount_temp_val").val(n),$("#amount_temp").val(n)}}),$("#donation_user_email").focusout(function(){$("#email_temp").val($("#donation_user_email").val())}),$("#accept_additional_field_check_box").click(function(){$("div#optional_service_fee_div").show()}),$("#is_add_processing_fees_mandatory").length>0&&($('select.payment_method option[value="Cash"]').length||$("#accept_additional_field_check_box").trigger("click")),$(".donation_form").submit(function(){""==$("#stripeToken").val()&&"Credit Card"==$(".payment_method").val()&&$("#customButton").trigger("click")}),$(".payment_form").submit(()=>{$("#payment_amount").val($("#amount_temp_val").val())})}function initPhoneTree2Sort(){document.querySelectorAll(".pt2-sortable-table").forEach(function(e){var t={colIndex:-1,asc:!0};e.querySelectorAll("th.pt2-sort-th").forEach(function(n){n._hvSortInit||(n._hvSortInit=!0,n.addEventListener("click",function(){var i=n.cellIndex,o=t.colIndex!==i||!t.asc;t={colIndex:i,asc:o},e.querySelectorAll("th.pt2-sort-th").forEach(function(e){var t=e.querySelector(".pt2-sort-icon");t&&(t.innerHTML=PT2_ICON_NONE)});var r=n.querySelector(".pt2-sort-icon");r&&(r.innerHTML=o?PT2_ICON_ASC:PT2_ICON_DESC);var s=e.querySelector("tbody"),a=Array.from(s.querySelectorAll("tr:not(.pt2-separator)"));s.querySelectorAll("tr.pt2-separator").forEach(function(e){e.style.display="none"}),a.sort(function(e,t){var n=e.cells[i],r=t.cells[i];if(!n||!r)return 0;var s=void 0!==n.dataset.sort?n.dataset.sort:n.textContent.trim(),a=void 0!==r.dataset.sort?r.dataset.sort:r.textContent.trim(),l=parseFloat(s),c=p
2arseFloat(a),d=isNaN(l)||isNaN(c)?s.localeCompare(a):l-c;return o?d:-d}),a.forEach(function(e){s.appendChild(e)})}))})})}function add_user_to_list(e){$("<input type='hidden' value='"+e.id+"' />").attr("id","invited_user_ids_").attr("name","invited_user_ids[]").prependTo("#invite_people_form"),$("input#search_member").after($("<span>"+e.name+" </span><br>"))}function showTinyMCE(){tinymce.remove(),TinyMCERails.configuration.default={selector:"textarea.tinymce",toolbar:["bold italic | forecolor backcolor | link | image | emoticons"],toolbar_sticky:!0,menubar:!1,statusbar:!1,paste_data_images:!1,paste_as_text:!0,browser_spellcheck:!0,plugins:["link","image","media","emoticons","preview"],formats:{h1:{},h2:{},h3:{},h4:{},h5:{},h6:{}},convert_urls:!1,image_advtab:!0,file_picker_types:"image",automatic_uploads:!0,images_upload_url:"/tinymce_assets",images_upload_credentials:!0},TinyMCERails.initialize("default",{content_css:"/css/tinymce.css",apply_source_formatting:!0,target_list:[{title:"Current page",value:""},{title:"New page",value:"_blank"}]})}function expandPostForm(e){var t=document.getElementById("can_post");if(t&&"true"===t.value){var n=document.getElementById("expanded_form");if(n&&"none"===n.style.display&&(n.style.display="block"),e){var i=document.getElementById("post_service_type_id");i&&i.focus()}}else{var o=document.getElementById("expand_form_message_no_groups");o&&(o.style.display="block")}}function initOnLoadPosts(){if(document.querySelector(".posts.index")){var e=document.querySelector('input[name="post[title]"]');e&&(e.addEventListener("focus",function(){expandPostForm(!1)}),e.addEventListener("click",function(){expandPostForm(!1)}),e.addEventListener("keydown",function(e){"Enter"===e.key&&(e.preventDefault(),expandPostForm(!0))})),"function"==typeof window.showTinyMCE&&window.showTinyMCE()}}function initProspectTasksIndex2Filters(){function e(e,n){var i=t.querySelector('input[name="'+e+'"]');i&&(i.value=n),t.submit()}var t=document.getElementById("search-form");t&&([{selectId:"category",hiddenName:"search_category"},{selectId:"rating",hiddenName:"search_rating"}].forEach(function(t){var n=document.getElementById(t.selectId);n&&!n._hvInit&&(n._hvInit=!0,n.addEventListener("change",function(){e(t.hiddenName,n.value)}))}),[{id:"sort_by_rating",orderBy:"rating_asc"},{id:"sort_by_due_at_asc",orderBy:"due_at_desc"},{id:"sort_by_due_at_desc",orderBy:"due_at_asc"}].forEach(function(t){var n=document.getElementById(t.id);n&&!n._hvInit&&(n._hvInit=!0,n.addEventListener("click",function(n){n.preventDefault(),e("order_by",t.orderBy)}))}))}function initProspectTasksIndex2MultipleSelection(){function e(){var e=[];return document.querySelectorAll('input[type="checkbox"][name^="prospect_task_id_"]').forEach(function(t){if(t.checked){var n=t.name.match(/\d+/);n&&e.push(n[0])}}),e.join(",")}function t(t){var n=e();if(n){var i="delete"===t?"/prospect_tasks/delete_selected_prospect_tasks":"/prospect_tasks/suspend_selected_prospect_tasks";i=i+"?prospect_tasks_ids="+encodeURIComponent(n),fetch(i,{method:"GET",headers:{"X-Requested-With":"XMLHttpRequest"},credentials:"same-origin"}).then(function(e){e.redirected&&e.url?window.location.href=e.url:e.ok||window.console&&console.warn&&console.warn("runAction failed:",e.status)}).catch(function(e){window.console&&console.warn&&console.warn("runAction error:",e)})}else alert("No prospect task checkbox has been selected yet.")}var n=document.getElementById("multiple_selection_link"),i=document.getElementById("to_suspended_button"),o=document.getElementById("to_deleted_button");n&&(n._hvInit||(n._hvInit=!0,n.addEventListener("click",function(e){e.preventDefault(),document.querySelectorAll(".multiple_selection").forEach(function(e){e.style.display=""}),n.style.display="none"})),i&&!i._hvInit&&(i._hvInit=!0,i.addEventListener("click",function(e){e.preventDefault(),t("suspend")})),o&&!o._hvInit&&(o._hvInit=!0,o.addEventListener("click",function(e){e.preventDefault(),t("delete")})))}function initProspectTaskForm2(){var e=document.getElementById("prospect_task_status"),t=document.getElementById("prospect_task_done_at");e&&t&&!e._hvInit&&(e._hvInit=!0,e.addEventListener("change",function(){t.style.display="Completed"===e.value?"block":"none"}))}function initOnLoadProspectTasks2(){document.querySelector(".prospect_tasks.index")&&(initProspectTasksIndex2Filters(),initProspectTasksIndex2MultipleSelection()),document.querySelector(".prospect_tasks.new, .prospect_tasks.edit, .prospect_tasks.create, .prospect_tasks.update")&&initProspectTaskForm2()}function contact_infos_to_clipboard(){var e="";if($('input[type=checkbox][name^="provider_id_"]').each(function(){if(1==(this.checked?"1":"0")){var t=this.name.match(/\d+/);e+=""==e?t:","+t}}),""==e)alert("No provider checkbox has been selected yet.");else{var t="/provider_types/contact_infos_to_clipboard?provider_ids="+encodeURIComponent(e);fetch(t,{headers:{Accept:"text/vnd.turbo-stream.html","X-Requested-With":"XMLHttpRequest"},credentials:"same-origin"}).then(function(e){if(!e.ok)throw new Error("Clipboard fetch failed: "+e.status);return e.text()}).then(function(e){"undefined"!=typeof Turbo&&e&&Turbo.renderStreamMessage(e),$("#clipboard").show()}).catch(function(e){window.console&&console.warn&&console.warn("Clipboard fetch failed:",e)})}}function initRegistrations2(){document.querySelector(".registrations.edit")&&document.querySelectorAll("[data-hv-pwd-toggle]").forEach(function(e){if(!e._hvPwdToggle){e._hvPwdToggle=!0;
2var t=e.dataset.hvPwdToggle,n=e.querySelector(".hv-pwd-eye-open"),i=e.querySelector(".hv-pwd-eye-closed");e.addEventListener("click",function(){var e=document.getElementById(t);e&&("password"===e.type?(e.type="text",n&&(n.style.display="none"),i&&(i.style.display="block")):(e.type="password",n&&(n.style.display="block"),i&&(i.style.display="none")))})}})}function initSdohSmartForm(){var e=document.getElementById("sdoh_form");if(e&&!e._hvSdohReady){e._hvSdohReady=!0;var t=document.getElementById("receiving_services"),n=document.getElementById("has_received_services_div"),i=document.getElementById("interested_in_services_div");t&&n&&i&&t.addEventListener("change",function(){var e=t.checked;n.style.display=e?"none":"",i.style.display=e?"none":""});var o=document.getElementById("needs_help");e.addEventListener("submit",function(e){e.preventDefault();var t=o&&"Needs Help and senior knows it"===o.value,n=document.getElementById("results_green"),i=document.getElementById("results_orange");n&&(n.style.display=t?"none":"block"),i&&(i.style.display=t?"block":"none");var r=document.getElementById("results");r&&r.scrollIntoView&&r.scrollIntoView({behavior:"smooth",block:"start"})})}}function initOnLoadSdoh(){document.querySelector(".villages.sdoh")&&initSdohSmartForm()}function initServiceEvaluationsIndex(){if(document.querySelector(".service_evaluations.index")){var e=document.getElementById("se2-search-toggle");e&&!e._hvSeIndexInit&&(e._hvSeIndexInit=!0,e.addEventListener("click",function(){var e=document.getElementById("se2-search");if(e){var t="none"===e.style.display;e.style.display=t?"block":"none",e.scrollIntoView({behavior:"smooth",block:"start"})}}))}}function toMinutes(e){var t=e.split(":");return 60*t[0]+ +t[1]}function toTimeString(e){var t=[Math.floor(e/60),e%60];return t=t.map(function(e){return e<10?"0"+e:e}).join(":"),t+=":00"}function multiple_selection_requests_action(e){var t="";if($("input[type=checkbox]").each(function(){if(1==(this.checked?"1":"0")){var e=this.name.match(/\d+/);t+=""==t?e:","+e}}),""==t)alert("No service request checkbox has been selected yet.");else{var n="delete"==e?"/service_requests/delete_selected_requests":"/service_requests/send_selected_to_email_messenger",i=document.querySelector('meta[name="csrf-token"]'),o=i?i.getAttribute("content"):"",r=new FormData;r.append("service_requests_ids",t),fetch(n,{method:"POST",headers:{"X-Requested-With":"XMLHttpRequest","X-CSRF-Token":o,Accept:"text/html"},credentials:"same-origin",body:r}).then(function(e){e.redirected&&e.url?window.location.href=e.url:e.ok||window.console&&console.warn&&console.warn("runAction failed:",e.status)}).catch(function(e){window.console&&console.warn&&console.warn("runAction error:",e)})}}function initCollapsibles(){document._hvCollapsiblesReady||(document._hvCollapsiblesReady=!0,document.addEventListener("click",function(e){var t=e.target.closest(".hv-collapsible-trigger");if(t){var n=t.closest(".hv-collapsible");n&&n.classList.toggle("hv-open")}}))}function initIndex2MultipleSelection(){function e(){var e=[];return n.querySelectorAll('.hv-ms-checkbox input[type="checkbox"]').forEach(function(t){if(t.checked){var n=t.name.match(/\d+/);n&&e.push(n[0])}}),e.join(",")}function t(t){var n=e();if(n){var i="delete"===t?"/service_requests/delete_selected_requests":"/service_requests/send_selected_to_email_messenger",o=document.querySelector('meta[name="csrf-token"]'),r=o?o.getAttribute("content"):"",s=new FormData;s.append("service_requests_ids",n),fetch(i,{method:"POST",headers:{"X-Requested-With":"XMLHttpRequest","X-CSRF-Token":r,Accept:"text/html"},credentials:"same-origin",body:s}).then(function(e){e.redirected&&e.url?window.location.href=e.url:e.ok||window.console&&console.warn&&console.warn("runAction failed:",e.status)}).catch(function(e){window.console&&console.warn&&console.warn("runAction error:",e)})}else alert("No service request checkbox has been selected yet.")}var n=document.getElementById("index2-table-card"),i=document.getElementById("multiple_selection_link"),o=document.getElementById("ms2-cancel-btn"),r=document.getElementById("ms2-select-all"),s=document.getElementById("ms2-delete-btn"),a=document.getElementById("ms2-email-btn");n&&i&&(n._hvMultiSelectReady||(n._hvMultiSelectReady=!0,i.addEventListener("click",function(e){e.preventDefault(),n.classList.add("hv-ms-active"),i.style.display="none"}),o&&o.addEventListener("click",function(){n.classList.remove("hv-ms-active"),i.style.display="",r&&(r.checked=!1),n.querySelectorAll('.hv-ms-checkbox input[type="checkbox"]').forEach(function(e){e.checked=!1}
2)}),r&&r.addEventListener("change",function(){n.querySelectorAll('.hv-ms-checkbox input[type="checkbox"]').forEach(function(e){e.checked=r.checked})}),s&&s.addEventListener("click",function(){t("delete")}),a&&a.addEventListener("click",function(){t("to_email_messenger")})))}function initNew2EnterGuard(){var e=document.querySelector(".service_requests.new form, .service_requests.create form");e&&e.addEventListener("keydown",function(t){if("Enter"===t.key){var n=e.querySelector(".hv-search-section");n&&n.contains(t.target)&&t.preventDefault()}})}function initNew2DurationCalc(){function e(e){var t=document.getElementById(e+"_4i"),n=document.getElementById(e+"_5i"),i=document.getElementById(e+"_6i");if(!(t&&n&&t.value&&n.value))return null;var o=parseInt(t.value,10),r=parseInt(n.value,10);return isNaN(o)||isNaN(r)?null:(i&&("PM"===i.value&&12!==o&&(o+=12),"AM"===i.value&&12===o&&(o=0)),60*o+r)}function t(e,t){t=(t%1440+1440)%1440;var n=Math.floor(t/60),i=t%60,o=document.getElementById(e+"_4i"),r=document.getElementById(e+"_5i"),s=document.getElementById(e+"_6i");if(o&&r){if(s){var a=n%12||12;o.value=a,s.value=n<12?"AM":"PM"}else o.value=String(n).padStart(2,"0");r.value=String(i).padStart(2,"0")}}function n(n){var i=document.getElementById("service_request_service_type"),o=i?parseInt(i.value,10):0,r=document.getElementById("service_request_is_appointment"),s=document.getElementById("service_request_is_return"),a=e("service_request_start_time_field");if(null!==a){var l=0;if(r&&r.checked&&o<0){var c=e("service_request_appointment_time");null!==c&&(l=Math.abs(c-a))}var d=n+l;s&&s.checked&&o<0&&(d=n+2*l),t("service_request_end_date",a+d)}}var i=document.getElementById("service_request_duration");if(i){i.addEventListener("change",function(){var e=parseInt(i.value,10);isNaN(e)||n(e)});var o=i.closest(".js-duration-entry");if(o){var r=o.querySelector(".js-duration-hours"),s=o.querySelector(".js-duration-minutes"),a=function(){var e=60*(parseInt(r&&r.value,10)||0)+(parseInt(s&&s.value,10)||0);(e=15*Math.ceil(e/15))>0&&n(e)};[r,s].forEach(function(e){e&&e.addEventListener("input",a)})}}}function initShow2Search(){document.querySelectorAll(".service_requests.show .hv-search-section").forEach(function(e){var t=e.querySelector('input[name="search"]'),n=e.querySelector("button.hv-search-btn"),i=e.querySelector('input[name="user_type"]'),o=e.querySelector('input[name="form_id"]'),r=e.querySelector('input[name="target_field_id"]');if(t&&n){var s=function(e){e.preventDefault(),e.stopPropagation();var n=new URLSearchParams;
2n.append("search",t.value),i&&i.value&&n.append("user_type",i.value),o&&o.value&&n.append("form_id",o.value),r&&r.value&&n.append("target_field_id",r.value),fetch("/users/search?"+n.toString(),{headers:{Accept:"text/vnd.turbo-stream.html","X-Requested-With":"XMLHttpRequest"},credentials:"same-origin"}).then(function(e){if(!e.ok)throw new Error("User search failed: "+e.status);return e.text()}).then(function(e){"undefined"!=typeof Turbo&&e&&Turbo.renderStreamMessage(e)}).catch(function(e){window.console&&console.warn&&console.warn("User search failed:",e)})};n.addEventListener("click",s),t.addEventListener("keydown",function(e){"Enter"===e.key&&s(e)})}})}function initIndex2Filters(){var e=document.getElementById("search-form");if(e){[{selectId:"header_search_status",hiddenName:"search_status"},{selectId:"header_search_local_village",hiddenName:"search_local_village"},{selectId:"header_search_service_type",hiddenName:"search_service_type"}].forEach(function(t){var n=document.getElementById(t.selectId);n&&n.addEventListener("change",function(){var i=e.querySelector('[name="'+t.hiddenName+'"]');i&&(i.value=n.value),e.submit()});var i=e.querySelector('select[name="'+t.hiddenName+'"]');i&&i.addEventListener("change",function(){e.submit()})});var t=document.getElementById("remove_search_user_id");t&&t.addEventListener("click",function(t){t.preventDefault();var n=e.querySelector('input[name="search_user_id"]');n&&(n.value="");var i=document.getElementById("search_user_display");i&&(i.style.display="none"),e.submit()})}}function initMobileSearchToggle(){var e=document.getElementById("mob-search-toggle"),t=document.getElementById("mob-search-body"),n=document.getElementById("mob-search-chevron");if(e&&t&&!e._hvInit){e._hvInit=!0;var i=new URLSearchParams(window.location.search);(i.get("search_member")||i.get("search_purpose")||i.get("search_start_date")||i.get("search_end_date"))&&(t.classList.remove("is-hidden"),n&&(n.innerHTML="&#8963;")),e.addEventListener("click",function(){var e=t.classList.toggle("is-hidden");n&&(n.innerHTML=e?"&#8964;":"&#8963;")})}}function initMobileFilterStrip(){var e=document.getElementById("mob-filter-form");if(e&&!e._hvInit){e._hvInit=!0,e.querySelectorAll("select").forEach(function(t){t.addEventListener("change",function(){e.submit()})});var t=document.getElementById("mob-search-form"),n=document.getElementById("remove_search_user_id");t&&n&&n.addEventListener("click",function(e){e.preventDefault();var n=t.querySelector('input[name="search_user_id"]');n&&(n.value=""),t.submit()})}}function initCalendar2Toggles(){var e=document.getElementById("cal2-search-toggle");e&&!e._hvInit&&(e._hvInit=!0,e.addEventListener("click",function(){var e=document.getElementById("cal2-search-card");e&&(e.style.display="none"===e.style.display?"block":"none",e.scrollIntoView({behavior:"smooth",block:"start"}))}));var t=document.getElementById("cal2-filter-header");t&&!t._hvInit&&(t._hvInit=!0,t.addEventListener("click",function(){var e=document.getElementById("cal2-filter-body");e&&(e.style.display="none"===e.style.display?"block":"none")}))}function initReqProviderTypes2Toggles(){document._hvReqProvTypes2Ready||(document._hvReqProvTypes2Ready=!0,document.addEventListener("click",function(e){var t=e.target.closest(".js-ptc-toggle2");if(t){e.preventDefault();var n=t.id.replace("provider_type_category_",""),i=document.getElementById("provider_type_category_types_"+n);i&&(i.style.display="block")}}))}function initOnLoadServiceRequests2(){initCollapsibles(),initReqProviderTypes2Toggles(),document.querySelector(".service_requests.index")&&(initIndex2MultipleSelection(),initIndex2Filters(),initMobileSearchToggle(),initMobileFilterStrip()),document.querySelector(".service_requests.new, .service_requests.create")&&initNew2EnterGuard(),document.querySelector(".service_requests.new, .service_requests.create, .service_requests.edit, .service_requests.update")&&initNew2DurationCalc(),document.querySelector(".service_requests.show")&&initShow2Search(),document.querySelector(".service_requests.calendar")&&initCalendar2Toggles(),document.querySelector(".service_requests.edit_flex_by_matched_volunteer")&&window.hvWireUserSearchSections&&window.hvWireUserSearchSections(".service_requests.edit_flex_by_matched_volunteer .hv-search-section")}function setSyncButtonProcessing(e,t){e&&!e.dataset.hvSyncOriginalText&&(e.dataset.hvSyncOriginalText=e.textContent,e.textContent=t||"Sync processing....",e.style.pointerEvents="none",e.style.opacity="0.7")}function runAsyncTurboStream(e,t){t=t||{};var n=e.getAttribute("data-hv-confirm");if(!n||window.confirm(n)){var i=(e.getAttribute("href")||"").replace(/\.(html|json|js|turbo_stream)$/,"")+".turbo_stream";setSyncButtonProcessing(e,t.processingText),fetch(i,{method:"GET",headers:{Accept:"text/vnd.turbo-stream.html","X-Requested-With":"XMLHttpRequest"},credentials:"same-origin"}).then(function(e){if(!e.ok)throw new Error("Request failed: "+e.status);return e.text()}).then(function(t){Turbo.renderStreamMessage(t),restoreSyncButton(e)}).catch(function(n){console.error(n),restoreSyncButton(e),window.alert(t.errorMessage||"Request failed. Please try again.")})}}function restoreSyncButton(e){e&&e.dataset.hvSyncOriginalText&&(e.textContent=e.dataset.hvSyncOriginalText,e.style.pointerEvents="",e.style.opacity="",delete e.dataset.hvSyncOriginalText)}function initAsyncSyncMailchimp(){document._hvAsyncSyncMailchimpReady||(document._hvAsyncSyncMailchimpReady=!0,document.addEventListener("click",function(e){var t=e.target.closest('[data-behaviour="hv-async-sync-mailchimp"]');t&&(e.preventDefault(),runAsyncTurboStream(t,{errorMessage:"Could not queue the MailChimp sync. Please try again."}))}))}function initAsyncExportPeople(){document._hvAsyncExportPeopleReady||(document._hvAsyncExportPeopleReady=!0,document.addEventListener("click",function(e){var t=e.target.closest('[data-behaviour="hv-async-export-people"]');t&&(e.preventDefault(),runAsyncTurboStream(t,{processingText:"Exporting....",errorMessage:"Could not queue the export. Please try again."}))}))}function initSyncMailchimpProcessingFeedback(){document._hvSyncMailchimpFeedbackReady||(document._hvSyncMailchimpFeedbackReady=!0,document.addEventListener("turbo:submit-start",function(e){var t=e.target;t&&t.action&&(-1!==t.action.indexOf("/sync_mailing_list")&&setSyncButtonProcessing(document.querySelector('a[href*="/sync_mailing_list"]')))}))}function initOnLoadServiceTypes2(){initAsyncSyncMailchimp(),initAsyncExportPeople(),initSyncMailchimpProcessingFeedback()}function initSessions2(){if(document.querySelector(".sessions.new")){var e=document.getElementById("show_hide_button");e&&!e._hvPwdToggle&&(e._hvPwdToggle=!0,e.addEventListener("click",function(){var e=document.getElementById("password-field"),t=document.getElementById("pwd-eye-open"),n=document.getElementById("pwd-eye-closed");e&&("password"===e.type?(e.type="text",t&&(t.style.display="none"),n&&(n.style.display="block")):(e.type="password",t&&(t.style.display="block"),n&&(n.style.display="none")))}))}}function initModernAchAddBank(){var e=document.querySelector(".payments.set_ach #hv-modern-ach-form");if(e&&"undefined"!=typeof Stripe){var t=e.querySelector("#payment-element");
2if(t&&!t.querySelector("iframe")){var n=document.querySelector("#stripe_publishable_key"),i=document.querySelector("#payment_user_id");if(n&&n.value&&i&&i.value){var o=new App.StripePayment(n.value,"#amount_temp");o.notReady("#customButton");var r=(document.querySelector("#payment_billing_name")||{}).value||"",s=(document.querySelector("#payment_billing_email")||{}).value||"";r&&s&&(o.elementOptions={fields:{billingDetails:{name:"never",email:"never"}}},o.confirmOptions={payment_method_data:{billing_details:{name:r,email:s}}});var a=function(){return new Promise(function(e){e({valid:!0})})};o.validate(a,"setup-intent",{user_id:i.value,payment_method_type:"us_bank_account"}).then(function(e){e.success&&o.ready()});var l=document.querySelector("#customButton");l&&l.addEventListener("click",function(t){t.preventDefault(),o.state===o.validated&&(o.notReady("#customButton",!0),o.confirm(a).then(function(t){t.success?e.submit():o.ready()}))})}}}}function initOnLoadSetAch2(){initModernAchAddBank()}function loadSubscription(){var e=!1!==$("#subscriptions").data("subscribeAsDefault");$(".field_wrapper.subscribing").find("input[type='checkbox']").change(function(){var t=$(this).closest(".field_wrapper");$(this).prop("checked")?(t.next().slideDown(),t.next().find("input[type='checkbox']").prop("checked",e),t.next().next().slideDown(),t.next().next().find("input[type='checkbox']").prop("checked",e)):(t.next().slideUp(),t.next().next().slideUp(),setTimeout(function(){t.next().find("input[type='checkbox']").prop("checked",!1),t.next().next().find("input[type='checkbox']").prop("checked",!1)},400))})}function loadSliders(){$(".member_slider").click(function(){let e=$(this).data("isMemberChecked");$(this).find("input").prop("checked",!e);let t=$(this).closest(".field_wrapper").next(),n=t.next();e?(t.slideUp(),n.slideUp()):(t.slideDown(),t.find("input").prop("checked",!0),n.slideDown(),n.find("input").prop("checked",!0))}),$(".notif_slider").click(function(){let e=$(this).data("isNotifChecked");$(this).find("input").prop("checked",!e);let t=$(this).closest(".field_wrapper").next();e?t.slideUp():t.slideDown()}),$(".email_notif_slider").click(function(){let e=$(this).data("isEmailNotifChecked");$(this).find("input").prop("checked",!e)}),setTimeout(function(){$(".notice_in_place_alert").slideUp()},3e3)}function displayFullCalendar(){var e={displayEventTime:!1,eventSources:[{url:"/users/agendas/"+$("#agenda_user_id").val()+"/personal_events.json?",textColor:"black"}]};$("#agenda_calendar").fullCalendar(e)}function isValidEmailAddress(e){return/^([a-z\d!#$%&'*+\-\/=?^_`{|}~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+(\.[a-z\d!#$%&'*+\-\/=?^_`{|}~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+)*|"((([ \t]*\r\n)?[ \t]+)?([\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|\\[\x01-\x09\x0b\x0c\x0d-\x7f\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))*(([ \t]*\r\n)?[ \t]+)?")@(([a-z\d\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|[a-z\d\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF][a-z\d\-._~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]*[a-z\d\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])\.)+([a-z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|[a-z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF][a-z\d\-._~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]*[a-z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])\.?$/i.test(e)}function initUsersByAdminsEditStatusToggles(){if(document.querySelector(".users_by_admins.edit")){var e=document.getElementById("membership_status");e&&!e._hvInit&&(e._hvInit=!0,e.addEventListener("change",function(){var t=document.getElementById("users_by_admins_membership_death_date"),n=document.getElementById("users_by_admins_membership_drop_reason");t&&(t.style.display="Deceased"===e.value?"block":"none"),n&&(n.style.display="Active"===e.value?"none":"block")}))}}function initUsersByAdminsEditNoEmailToggle(){if(document.querySelector(".users_by_admins.edit")){var e=document.getElementById("no_email");e&&!e._hvInit&&(e._hvInit=!0,e.addEventListener("change",function(){var t=document.getElementById("user_email");t&&(t.style.display=e.checked?"none":"block")}))}}function initAllPeopleSearchToggle(){if(document.querySelector(".users_by_admins.all_people")){var e=document.getElementById("ap2-search-toggle");e&&!e._hvInit&&(e._hvInit=!0,e.addEventListener("click",function(){var e=document.getElementById("ap2-search");e&&(e.style.display="none"===e.style.display?"block":"none",e.scrollIntoView({behavior:"smooth",block:"start"}))}))}}function initMergeUsersFakeSelectAll(){if(document.querySelector(".users_by_admins.merge_users_fake")){var e=document.getElementById("select_all_fake_users2");e&&e.addEventListener("click",function(){document.querySelectorAll('#table_fake_users2 input[type="checkbox"]').forEach(function(e){e.checked=!0})})}}function initUsersByAdminsVanillaOnLoad(){initUsersByAdminsEditStatusToggles(),initUsersByAdminsEditNoEmailToggle(),initAllPeopleSearchToggle(),initMergeUsersFakeSelectAll()}function initUsersUnsubscribe(){if(document.querySelector(".users.unsubscribe")){var e=document.getElementById("select-all"),t=document.getElementById("hv-unsubscribe");e&&t&&(e._hvBound||(e._hvBound=!0,e.addEventListener("click",function(e){e.preventDefault(),t.checked||t.click(),document.querySelectorAll("input[type=checkbox]").forEach(function(e){e.checked=!0})}),t.addEventListener("click",function(){var e=t.checked;document.querySelectorAll(".hv-box").forEach(function(t){t.disabled=e,e&&(t.checked=!0)})})))}}function makeMarkerContent(e){var t=document.createElement("img");return t.src=e,t}function drawMarkers(e,t,n,i){var o=[];if(void 0!==t&&t.length>0)for(var r=image_url_prefix+i,s=0;s<t.length;s++){var a=t[s];if(null!=a[1]&&null!=a[2]){var l=new google.maps.marker.AdvancedMarkerElement({position:{lat:a[
21],lng:a[2]},title:a[0],map:e,content:makeMarkerContent(r),zIndex:5});bounds.extend(l.position),l.addListener("click",showUser.bind(void 0,l,a,n)),o.push(l)}}return o}function drawPolygons(e,t){polygons=[];for(var n=0;n<t.length;n++){for(var i=t[n],o=i[2],r=[],s=0;s<o.length;s++){var a={lat:o[s][0],lng:o[s][1]};r.push(a),bounds.extend(a)}var l=new google.maps.Polygon({paths:r,strokeColor:i[3],strokeOpacity:.8,strokeWeight:2,fillColor:i[3],fillOpacity:.35,title:i[1]});l.setMap(e),polygons.push(l)}return polygons}function showUser(e,t,n){"undefined"==typeof infowindow&&(infowindow=new google.maps.InfoWindow({}));var i='<div id="content"><div id="siteNotice"></div><h1 id="firstHeading" class="firstHeading"><a data-turbo="false" href="/users/profiles/'+t[5]+'">'+t[0]+'</a></h1><div id="bodyContent"><p><b>Role</b> '+n+"<p><b>Address</b> "+t[3]+"</p><p><b>Phone</b> "+t[4]+"</p></div></div>";infowindow.setContent(i),infowindow.open(e.map,e)}function set_markers_visibility(e,t){filter=map_search_people.val().toLowerCase();for(var n=0;n<e.length;n++){var i=e[n],o=t&&i.title.toLowerCase().indexOf(filter)>=0;"function"==typeof i.setMap?i.setMap(o?map:null):i.map=o?map:null}}function get_center(e){var t=new google.maps.LatLngBounds;return e.getPath().forEach(function(e){t.extend(e)}),t.getCenter()}function showCheckins(){var e=$("#emergency_infos").data("checkingroups");set_markers_visibility(members_markers,!1),set_markers_visibility(volunteers_markers,!1),$("#members_checkbox").prop("checked",!1),checkin_markers=drawCheckinsMarkers(map,e),map_search_people.val().trim().length>0&&$.each(checkin_markers,function(e){set_markers_visibility(checkin_markers[e],!0)}),handle_emergencies_checkboxes()}function hideCheckins(){$.each(checkin_markers,function(e){set_markers_visibility(checkin_markers[e],!1)}),$("#select_emergency").val(""),$("#selected_emergency").empty()}function drawCheckinsMarkers(e,t){var n=new Object;if(void 0!==t&&t.length>0)for(var i=0;i<t.length;i++){for(var o=[],r=t[i],s=0;s<r[1].length;s++){user=r[1][s][0],checkin=r[1][s][1];var a=get_image_for_checkin(checkin[1]);if(null!=user[2]||null==user[3]){var l=new google.maps.marker.AdvancedMarkerElement({position:{lat:parseFloat(user[2]),lng:parseFloat(user[3])},title:user[1],map:e,content:makeMarkerContent(a),zIndex:5});bounds.extend(l.position),l.addListener("click",showUserCheckin.bind(void 0,l,user,checkin)),o.push(l)}}n[r[0]]=o}return n}function get_image_for_checkin(e){return image_url_suffix=null==e?"smiley_happy_0.png":"smiley_happy_"+e+".png",image_url_prefix+image_url_suffix}function showUserCheckin(e,t,n){"undefined"==typeof infowindow&&(infowindow=new google.maps.InfoWindow({}));var i='<div id="content"><div id="siteNotice"></div><h1 id="firstHeading" class="firstHeading"><a data-turbo="false" href="/users_by_admins/'+t[0]+'/edit">'+t[1]+'</a></h1><div id="bodyContent"><p><b>Phone</b> '+t[5]+"</p><p><b>Feeling</b> <a href="+n[0]+">"+n[2]+"</a></p></div></div>";infowindow.setContent(i),infowindow.open(e.map,e)}function handle_emergencies_checkboxes(){$(".emergency_group_checkbox").click(function(){group=$(this).data("group"),group_markers=checkin_markers[group],$(this).is(":checked")?set_markers_visibility(group_markers,!0):set_markers_visibility(group_markers,!1)})}function search_people(){$("#members_checkbox").is(":checked")&&set_markers_visibility(members_markers,!0),$("#volunteers_checkbox").is(":checked")&&set_markers_visibility(volunteers_markers,!0),($("#members_checkbox").is(":checked")||$("#volunteers_checkbox").is(":checked"))&&set_markers_visibility(members_volunteers_markers,!0),$("#localcoordinators_checkbox").is(":checked")&&set_markers_visibility(localcoordinators_markers,!0),$("#selected_emergency").is(":empty")||$(".emergency_group_checkbox").each(function(){$(this).is(":checked")&&set_markers_visibility(checkin_markers[$(this).data("group")],!0)})}function makeMarkerContent(e){var t=document.createElement("img");return t.src=e,t}function setVolunteersMarkers(e,t){for(var n=[],i=new google.maps.LatLngBounds,o=0;o<t.length;o++){var r=t[o]
3;if(null!=r&&null!=r[2]&&null!=r[3]){var s=new google.maps.marker.AdvancedMarkerElement({position:{lat:r[2],lng:r[3]},map:e,content:makeMarkerContent(image),title:r[1],zIndex:5});i.extend(s.position),s.addListener("click",highlightMarker.bind(void 0,s,r)),n[r[0]]=s}}return e.fitBounds(i),n}function addTrips(e,t){this.directionsService=new google.maps.DirectionsService,this.directionsDisplay=new google.maps.DirectionsRenderer,this.directionsDisplay.setMap(e),this.directionsDisplay.setOptions({suppressMarkers:!0});var n=t.length-1,i=[];origin=t[0][0],destination=t[n][1],origin[0]==destination[0]&&origin[1]==destination[1]?new google.maps.marker.AdvancedMarkerElement({content:makeMarkerContent("/assets/startfinish.png"),position:{lat:origin[0],lng:origin[1]},map:e,zIndex:5}):(new google.maps.marker.AdvancedMarkerElement({content:makeMarkerContent("/assets/start-race-2.png"),position:{lat:origin[0],lng:origin[1]},map:e,zIndex:5}),new google.maps.marker.AdvancedMarkerElement({content:makeMarkerContent("/assets/finish.png"),position:{lat:destination[0],lng:destination[1]},map:e,zIndex:5}));for(var o=0;o<t.length;o++)trip=t[o],o>0&&(i.push({location:new google.maps.LatLng(trip[0][0],trip[0][1]),stopover:!0}),new google.maps.marker.AdvancedMarkerElement({content:makeMarkerContent("/assets/flag-export.png"),position:{lat:trip[0][0],lng:trip[0][1]},map:e,zIndex:5})),o<n&&trip[1][0]!=t[o+1][0][0]&&trip[1][1]!=t[o+1][0][1]&&(i.push({location:new google.maps.LatLng(trip[1][0],trip[1][1]),stopover:!0}),new google.maps.marker.AdvancedMarkerElement({content:makeMarkerContent("/assets/flag-export.png"),position:{lat:trip[1][0],lng:trip[1][1]},map:e,zIndex:5}));var r={origin:new google.maps.LatLng(origin[0],origin[1]),destination:new google.maps.LatLng(destination[0],destination[1]),wayp
3oints:i,optimizeWaypoints:!0,travelMode:google.maps.TravelMode.DRIVING};this.directionsService.route(r,function(e,t){t==google.maps.DirectionsStatus.OK&&this.directionsDisplay.setDirections(e)}),e.fitBounds(bounds)}function highlightMarker(e,t){var n="#suggested_volunteers_"+t[0],i=$(n);void 0!==last_selected&&(last_selected_marker.content=makeMarkerContent(image),last_selected.css("background-color","white")),i.css("background-color","#AA1A26"),e.content=makeMarkerContent(image_selected),last_selected=i,last_selected_marker=e}function handlerTableClick(e,t){void 0!==last_selected&&last_selected.css("background-color","white"),void 0!==last_selected_marker&&(last_selected_marker.content=makeMarkerContent(image)),e.css("background-color","#AA1A26"),void 0!==t&&(t.content=makeMarkerContent(image_selected)),last_selected=e,last_selected_marker=t}var AutonumericRails;!function(e,t){"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){function n(e){var t=!!e&&"length"in e&&e.length,n=re.type(e);return"function"!==n&&!re.isWindow(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}function i(e,t,n){if(re.isFunction(t))return re.grep(e,function(e,i){return!!t.call(e,i,e)!==n});if(t.nodeType)return re.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(me.test(t))return re.filter(t,e,n);t=re.filter(t,e)}return re.grep(e,function(e){return J.call(t,e)>-1!==n})}function o(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function r(e){var t={};return re.each(e.match(we)||[],function(e,n){t[n]=!0}),t}function s(){K.removeEventListener("DOMContentLoaded",s),e.removeEventListener("load",s),re.ready()}function a(){this.expando=re.expando+a.uid++}function l(e,t,n){var i;if(void 0===n&&1===e.nodeType)if(i="data-"+t.replace(De,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(i))){try{n="true"===n||"false"!==n&&("null"===n?null:+n+""===n?+n:Ee.test(n)?re.parseJSON(n):n)}catch(e){}Se.set(e,t,n)}else n=void 0;return n}function c(e,t,n,i){var o,r=1,s=20,a=i?function(){return i.cur()}:function(){return re.css(e,t,"")},l=a(),c=n&&n[3]||(re.cssNumber[t]?"":"px"),d=(re.cssNumber[t]||"px"!==c&&+l)&&Ae.exec(re.css(e,t));if(d&&d[3]!==c){c=c||d[3],n=n||[],d=+l||1;do{d/=r=r||".5",re.style(e,t,d+c)}while(r!==(r=a()/l)&&1!==r&&--s)}return n&&(d=+d||+l||0,o=n[1]?d+(n[1]+1)*n[2]:+n[2],i&&(i.unit=c,i.start=d,i.end=o)),o}function d(e,t){var n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[];return void 0===t||t&&re.nodeName(e,t)?re.merge([e],n):n}function u(e,t){for(var n=0,i=e.length;n<i;n++)xe.set(e[n],"globalEval",!t||xe.get(t[n],"globalEval"))}function h(e,t,n,i,o){for(var r,s,a,l,c,h,p=t.createDocumentFragment(),f=[],m=0,g=e.length;m<g;m++)if((r=e[m])||0===r)if("object"===re.type(r))re.merge(f,r.nodeType?[r]:r);else if(Fe.test(r)){for(s=s||p.appendChild(t.createElement("div")),a=(Ie.exec(r)||["",""])[1].toLowerCase(),l=Oe[a]||Oe._default,s.innerHTML=l[1]+re.htmlPrefilter(r)+l[2],h=l[0];h--;)s=s.lastChild;re.merge(f,s.childNodes),(s=p.firstChild).textContent=""}else f.push(t.createTextNode(r));for(p.textContent="",m=0;r=f[m++];)if(i&&re.inArray(r,i)>-1)o&&o.push(r);else if(c=re.contains(r.ownerDocument,r),s=d(p.appendChild(r),"script"),c&&u(s),n)for(h=0;r=s[h++];)Pe.test(r.type||"")&&n.push(r);return p}function p(){return!0}function f(){return!1}function m(){try{return K.activeElement}catch(e){}}function g(e,t,n,i,o,r){var s,a;if("object"==typeof t){for(a in"string"!=typeof n&&(i=i||n,n=void 0),t)g(e,a,n,i,t[a],r);return e}if(null==i&&null==o?(o=n,i=n=void 0):null==o&&("string"==typeof n?(o=i,i=void 0):(o=i,i=n,n=void 0)),!1===o)o=f;else if(!o)return e;return 1===r&&(s=o,o=function(e){return re().off(e),s.apply(this,arguments)},o.guid=s.guid||(s.guid=re.guid++)),e.each(function(){re.event.add(this,t,o,i,n)})}function v(e,t){return re.nodeName(e,"table")&&re.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function y(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function b(e){var t=We.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function _(e,t){var n,i,o,r,s,a,l,c;if(1===t.nodeType){if(xe.hasData(e)&&(r=xe.access(e),s=xe.set(t,r),c=r.events))for(o in delete s.handle,s.events={},c)for(n=0,i=c[o].length;n<i;n++)re.event.add(t,o,c[o][n]);Se.hasData(e)&&(a=Se.access(e),l=re.extend({},a),Se.set(t,l))}}function w(e,t){var n=t.nodeName.toLowerCase();
vendor: 4,329 bytes, line 3
3"input"===n&&Ne.test(e.type)?t.checked=e.checked:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}function C(e,t,n,i){t=Q.apply([],t);var o,r,s,a,l,c,u=0,p=e.length,f=p-1,m=t[0],g=re.isFunction(m);if(g||p>1&&"string"==typeof m&&!ie.checkClone&&Ue.test(m))return e.each(function(o){var r=e.eq(o);g&&(t[0]=m.call(this,o,r.html())),C(r,t,n,i)});if(p&&(r=(o=h(t,e[0].ownerDocument,!1,e,i)).firstChild,1===o.childNodes.length&&(o=r),r||i)){for(a=(s=re.map(d(o,"script"),y)).length;u<p;u++)l=o,u!==f&&(l=re.clone(l,!0,!0),a&&re.merge(s,d(l,"script"))),n.call(e[u],l,u);if(a)for(c=s[s.length-1].ownerDocument,re.map(s,b),u=0;u<a;u++)l=s[u],Pe.test(l.type||"")&&!xe.access(l,"globalEval")&&re.contains(c,l)&&(l.src?re._evalUrl&&re._evalUrl(l.src):re.globalEval(l.textContent.replace(Ve,"")))}return e}function k(e,t,n){for(var i,o=t?re.filter(t,e):e,r=0;null!=(i=o[r]);r++)n||1!==i.nodeType||re.cleanData(d(i)),i.parentNode&&(n&&re.contains(i.ownerDocument,i)&&u(d(i,"script")),i.parentNode.removeChild(i));return e}function x(e,t){var n=re(t.createElement(e)).appendTo(t.body),i=re.css(n[0],"display");return n.detach(),i}function S(e){var t=K,n=Ge[e];return n||("none"!==(n=x(e,t))&&n||((t=(Ye=(Ye||re("<iframe frameborder='0' width='0' height='0'/>")).appendTo(t.documentElement))[0].contentDocument).write(),t.close(),n=x(e,t),Ye.detach()),Ge[e]=n),n}function E(e,t,n){var i,o,r,s,a=e.style;return""!==(s=(n=n||Qe(e))?n.getPropertyValue(t)||n[t]:void 0)&&void 0!==s||re.contains(e.ownerDocument,e)||(s=re.style(e,t)),n&&!ie.pixelMarginRight()&&Xe.test(s)&&Ke.test(t)&&(i=a.width,o=a.minWidth,r=a.maxWidth,a.minWidth=a.maxWidth=a.width=s,s=n.width,a.width=i,a.minWidth=o,a.maxWidth=r),void 0!==s?s+"":s}function D(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}function T(e){if(e in ot)return e;for(var t=e[0].toUpperCase()+e.slice(1),n=it.length;n--;)if((e=it[n]+t)in ot)return e}function A(e,t,n){var i=Ae.exec(t);return i?Math.max(0,i[2]-(n||0))+(i[3]||"px"):t}function M(e,t,n,i,o){for(var r=n===(i?"border":"content")?4:"width"===t?1:0,s=0;r<4;r+=2)"margin"===n&&(s+=re.css(e,n+Me[r],!0,o)),i?("content"===n&&(s-=re.css(e,"padding"+Me[r],!0,o)),"margin"!==n&&(s-=re.css(e,"border"+Me[r]+"Width",!0,o))):(s+=re.css(e,"padding"+Me[r],!0,o),"padding"!==n&&(s+=re.css(e,"border"+Me[r]+"Width",!0,o)));return s}function R(e,t,n){var i=!0,o="width"===t?e.offsetWidth:e.offsetHeight,r=Qe(e),s="border-box"===re.css(e,"boxSizing",!1,r);if(o<=0||null==o){if(((o=E(e,t,r))<0||null==o)&&(o=e.style[t]),Xe.test(o))return o;i=s&&(ie.boxSizingReliable()||o===e.style[t]),o=parseFloat(o)||0}return o+M(e,t,n||(s?"border":"content"),i,r)+"px"}function N(e,t){for(var n,i,o,r=[],s=0,a=e.length;s<a;s++)(i=e[s]).style&&(r[s]=xe.get(i,"olddisplay"),n=i.style.display,t?(r[s]||"none"!==n||(i.style.display=""),""===i.style.display&&Re(i)&&(r[s]=xe.access(i,"olddisplay",S(i.nodeName)))):(o=Re(i),"none"===n&&o||xe.set(i,"olddisplay",o?n:re.css(i,"display"))));for(s=0;s<a;s++)(i=e[s]).style&&(t&&"none"!==i.style.display&&""!==i.style.display||(i.style.display=t?r[s]||"":"none"));return e}function I(e,t,n,i,o){return new I.prototype.init(e,t,n,i,o)}function P(){return e.setTimeout(function(){rt=void 0}),rt=re.now()}function O(e,t){var n,i=0,o={height:e};for(t=t?1:0;i<4;i+=2-t)o["margin"+(n=Me[i])]=o["padding"+n]=e;return t&&(o.opacity=o.width=e),o}function L(e,t,n){for(var i,o=(H.tweeners[t]||[]).concat(H.tweeners["*"]),r=0,s=o.length;r<s;r++)if(i=o[r].call(n,t,e))return i}function B(e,t,n){var i,o,r,s,a,l,c,d=this,u={},h=e.style,p=e.nodeType&&Re(e),f=xe.get(e,"fxshow");for(i in n.queue||(null==(a=re._queueHooks(e,"fx")).unqueued&&(a.unqueued=0,l=a.empty.fire,a.empty.fire=function(){a.unqueued||l()}),a.unqueued++,d.always(function(){d.always(function(){a.unqueued--,re.queue(e,"fx").length||a.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],"inline"===("none"===(c=re.css(e,"display"))?xe.get(e,"olddisplay")||S(e.nodeName):c)&&"none"===re.css(e,"float")&&(h.display="inline-block")),n.overflow&&(h.overflow="hidden",d.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]})),t)if(o=t[i],at.exec(o)){if(delete t[i],r=r||"toggle"===o,o===(p?"hide":"show")){if("show"!==o||
vendor: 10,377 bytes, line 3
3!f||void 0===f[i])continue;p=!0}u[i]=f&&f[i]||re.style(e,i)}else c=void 0;if(re.isEmptyObject(u))"inline"===("none"===c?S(e.nodeName):c)&&(h.display=c);else for(i in f?"hidden"in f&&(p=f.hidden):f=xe.access(e,"fxshow",{}),r&&(f.hidden=!p),p?re(e).show():d.done(function(){re(e).hide()}),d.done(function(){var t;for(t in xe.remove(e,"fxshow"),u)re.style(e,t,u[t])}),u)s=L(p?f[i]:0,i,d),i in f||(f[i]=s.start,p&&(s.end=s.start,s.start="width"===i||"height"===i?1:0))}function F(e,t){var n,i,o,r,s;for(n in e)if(o=t[i=re.camelCase(n)],r=e[n],re.isArray(r)&&(o=r[1],r=e[n]=r[0]),n!==i&&(e[i]=r,delete e[n]),(s=re.cssHooks[i])&&"expand"in s)for(n in r=s.expand(r),delete e[i],r)n in e||(e[n]=r[n],t[n]=o);else t[i]=o}function H(e,t,n){var i,o,r=0,s=H.prefilters.length,a=re.Deferred().always(function(){delete l.elem}),l=function(){if(o)return!1;for(var t=rt||P(),n=Math.max(0,c.startTime+c.duration-t),i=1-(n/c.duration||0),r=0,s=c.tweens.length;r<s;r++)c.tweens[r].run(i);return a.notifyWith(e,[c,i,n]),i<1&&s?n:(a.resolveWith(e,[c]),!1)},c=a.promise({elem:e,props:re.extend({},t),opts:re.extend(!0,{specialEasing:{},easing:re.easing._default},n),originalProperties:t,originalOptions:n,startTime:rt||P(),duration:n.duration,tweens:[],createTween:function(t,n){var i=re.Tween(e,c.opts,t,n,c.opts.specialEasing[t]||c.opts.easing);return c.tweens.push(i),i},stop:function(t){var n=0,i=t?c.tweens.length:0;if(o)return this;for(o=!0;n<i;n++)c.tweens[n].run(1);return t?(a.notifyWith(e,[c,1,0]),a.resolveWith(e,[c,t])):a.rejectWith(e,[c,t]),this}}),d=c.props;for(F(d,c.opts.specialEasing);r<s;r++)if(i=H.prefilters[r].call(c,e,d,c.opts))return re.isFunction(i.stop)&&(re._queueHooks(c.elem,c.opts.queue).stop=re.proxy(i.stop,i)),i;return re.map(d,L,c),re.isFunction(c.opts.start)&&c.opts.start.call(e,c),re.fx.timer(re.extend(l,{elem:e,anim:c,queue:c.opts.queue})),c.progress(c.opts.progress).done(c.opts.done,c.opts.complete).fail(c.opts.fail).always(c.opts.always)}function $(e){return e.getAttribute&&e.getAttribute("class")||""}function z(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var i,o=0,r=t.toLowerCase().match(we)||[];if(re.isFunction(n))for(;i=r[o++];)"+"===i[0]?(i=i.slice(1)||"*",(e[i]=e[i]||[]).unshift(n)):(e[i]=e[i]||[]).push(n)}}function j(e,t,n,i){function o(a){var l;return r[a]=!0,re.each(e[a]||[],function(e,a){var c=a(t,n,i);return"string"!=typeof c||s||r[c]?s?!(l=c):void 0:(t.dataTypes.unshift(c),o(c),!1)}),l}var r={},s=e===Dt;return o(t.dataTypes[0])||!r["*"]&&o("*")}function q(e,t){var n,i,o=re.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((o[n]?e:i||(i={}))[n]=t[n]);return i&&re.extend(!0,e,i),e}function U(e,t,n){for(var i,o,r,s,a=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),void 0===i&&(i=e.mimeType||t.getResponseHeader("Content-Type"));if(i)for(o in a)if(a[o]&&a[o].test(i)){l.unshift(o);break}if(l[0]in n)r=l[0];else{for(o in n){if(!l[0]||e.converters[o+" "+l[0]]){r=o;break}s||(s=o)}r=r||s}if(r)return r!==l[0]&&l.unshift(r),n[r]}function W(e,t,n,i){var o,r,s,a,l,c={},d=e.dataTypes.slice();if(d[1])for(s in e.converters)c[s.toLowerCase()]=e.converters[s];for(r=d.shift();r;)if(e.responseFields[r]&&(n[e.responseFields[r]]=t),!l&&i&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=r,r=d.shift())if("*"===r)r=l;else if("*"!==l&&l!==r){if(!(s=c[l+" "+r]||c["* "+r]))for(o in c)if((a=o.split(" "))[1]===r&&(s=c[l+" "+a[0]]||c["* "+a[0]])){!0===s?s=c[o]:!0!==c[o]&&(r=a[0],d.unshift(a[1]));break}if(!0!==s)if(s&&e.throws)t=s(t);else try{t=s(t)}catch(e){return{state:"parsererror",error:s?e:"No conversion from "+l+" to "+r}}}return{state:"success",data:t}}function V(e,t,n,i){var o;if(re.isArray(t))re.each(t,function(t,o){n||Rt.test(e)?i(e,o):V(e+"["+("object"==typeof o&&null!=o?t:"")+"]",o,n,i)});else if(n||"object"!==re.type(t))i(e,t);else for(o in t)V(e+"["+o+"]",t[o],n,i)}function Y(e){return re.isWindow(e)?e:9===e.nodeType&&e.defaultView}var G=[],K=e.document,X=G.slice,Q=G.concat,Z=G.push,J=G.indexOf,ee={},te=ee.toString,ne=ee.hasOwnProperty,ie={},oe="2.2.4",re=function(e,t){return new re.fn.init(e,t)},se=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,ae=/^-ms-/,le=/-([\da-z])/gi,ce=function(e,t){return t.toUpperCase()};re.fn=re.prototype={jquery:oe,constructor:re,selector:"",length:0,toArray:function(){return X.call(this)},get:function(e){return null!=e?e<0?this[e+this.length]:this[e]:X.call(this)},pushStack:function(e){var t=re.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e){return re.each(this,e)},map:function(e){return this.pushStack(re.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(X.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:Z,sort:G.sort,splice:G.splice},re.extend=re.fn.extend=function(){var e,t,n,i,o,r,s=arguments[0]||{},a=1,l=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[a]||{},a++),"object"==typeof s||re.isFunction(s)||(s={}),a===l&&(s=this,a--);a<l;a++)if(null!=(e=arguments[a]))for(t in e)n=s[t],s!==(i=e[t])&&(c&&i&&(re.isPlainObject(i)||(o=re.isArray(i)))?(o?(o=!1,r=n&&re.isArray(n)?n:[]):r=n&&re.isPlainObject(n)?n:{},s[t]=re.extend(c,r,i)):void 0!==i&&(s[t]=i));return s},re.extend({expando:"jQuery"+(oe+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isFunction:function(e){return"function"===re.type(e)},isArray:Array.isArray,isWindow:function(e){return null!=e&&e===e.window},isNumeric:function(e){var t=e&&e.toString();return!re.isArray(e)&&t-parseFloat(t)+1>=0},isPlainObject:function(e){var t;if("object"!==re.type(e)||e.nodeType||re.isWindow(e))return!1;if(e.constructor&&!ne.call(e,"constructor")&&!ne.call(e.constructor.prototype||{},"isPrototypeOf"))return!1;for(t in e);return void 0===t||ne.call(e,t)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?ee[te.call(e)]||"object":typeof e},globalEval:function(e){var t,n=eval;(e=re.trim(e))&&(1===e.indexOf("use strict")?((t=K.createElement("script")).text=e,K.head.appendChild(t).parentNode.removeChild(t)):n(e))},camelCase:function(e){return e.replace(ae,"ms-").replace(le,ce)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t){var i,o=0;if(n(e))for(i=e.length;o<i&&!1!==t.call(e[o],o,e[o]);o++);else for(o in e)if(!1===t.call(e[o],o,e[o]))break;return e},trim:function(e){return null==e?"":(e+"").replace(se,"")},makeArray:function(e,t){var i=t||[];return null!=e&&(n(Object(e))?re.merge(i,"string"==typeof e?[e]:e):Z.call(i,e)),i},inArray:function(e,t,n){return null==t?-1:J.call(t,e,n)},merge:function(e,t){for(var n=+t.length,i=0,o=e.length;i<n;i++)e[o++]=t[i];return e.length=o,e},grep:function(e,t,n){for(var i=[],o=0,r=e.length,s=!n;o<r;o++)!t(e[o],o)!==s&&i.push(e[o]);return i},map:function(e,t,i){var o,r,s=0,a=[];if(n(e))for(o=e.length;s<o;s++)null!=(r=t(e[s],s,i))&&a.push(r);else for(s in e)null!=(r=t(e[s],s,i))&&a.push(r);return Q.apply([],a)},guid:1,proxy:function(e,t){var n,i,o;if("string"==typeof t&&(n=e[t],t=e,e=n),re.isFunction(e))return i=X.call(arguments,2),o=function(){return e.apply(t||this,i.concat(X.call(arguments)))},o.guid=e.guid=e.guid||re.guid++,o},now:Date.now,support:ie}),"function"==typeof Symbol&&(re.fn[Symbol.iterator]=G[Symbol.iterator]),re.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){ee["[object "+t+"]"]=t.toLowerCase()});var de=function(e){function t(e,t,n,i){var o,r,s,a,l,c,u,p,f=t&&t.ownerDocument,m=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==m&&9!==m&&11!==m)return n;if(!i&&((t?t.ownerDocument||t:$)!==N&&R(t),t=t||N,P)){if(11!==m&&(c=ve.exec(e)))if(o=c[1]){if(9===m){if(!(s=t.getElementById(o)))return n;if(s.id===o)return n.push(s),n}else if(f&&(s=f.getElementById(o))&&F(t,s)&&s.id===o)return n.push(s),n}else{if(c[2])return Z.apply(n,t.getElementsByTagName(e)),n;if((o=c[3])&&w.getElementsByClassName&&t.getElementsByClassName)return Z.apply(n,t.getElementsByClassName(o)),n}if(w.qsa&&!W[e+" "]&&(!O||!O.test(e))){if(1!==m)f=t,p=e;else if("object"!==t.nodeName.toLowerCase()){for((a=t.getAttribute("id"))?a=a.replace(be,"\\$&"):t.setAttribute("id",a=H),r=(u=S(e)).length,l=he.test(a)?"#"+a:"[id='"+a+"']";r--;)u[r]=l+" "+h(u[r]);p=u.join(","),f=ye.test(e)&&d(t.parentNode)||t}if(p)try{return Z.apply(n,f.querySelectorAll(p)),n}catch(e){}finally{a===H&&t.removeAttribute("id")}}}return D(e.replace(ae,"$1"),t,n,i)}function n(){function e(n,i){return t.push(n+" ")>C.cacheLength&&delete e[t.shift()],e[n+" "]=i}var t=[];return e}function i(e){return e[H]=!0,e}function o(e){var t=N.createElement("div");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function r(e,t){for(var n=e.split("|"),i=n.length;i--;)C.attrHandle[n[i]]=t}function s(e,t){var n=t&&e,i=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||Y)-(~e.sourceIndex||Y);if(i)return i;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function a(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function l(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function c(e){return i(function(t){return t=+t,i(function(n,i){for(var o,r=e([],n.length,t),s=r.length;s--;)n[o=r[s]]&&(n[o]=!(i[o]=n[o]))})})}function d(e){return e&&void 0!==e.getElementsByTagName&&e}function u(){}function h(e){for(var t=0,n=e.length,i="";t<n;t++)i+=e[t].value;return i}function p(e,t,n){var i=t.dir,o=n&&"parentNode"===i,r=j++;return t.first?function(t,n,r){for(;t=t[i];)if(1===t.nodeType||o)return e(t,n,r)}:function(t,n,s){var a,l,c,d=[z,r];if(s){for(;t=t[i];)if((1===t.nodeType||o)&&e(t,n,s))return!0}else for(;t=t[i];)if(1===t.nodeType||o){if((a=(l=(c=t[H]||(t[H]={}))[t.uniqueID]||(c[t.uniqueID]={}))[i])&&a[0]===z&&a[1]===r)return d[2]=a[2];if(l[i]=d,d[2]=e(t,n,s))return!0}}}function f(e){return e.length>1?function(t,n,i){for(var o=e.length;o--;)if(!e[o](t,n,i))return!1;return!0}:e[0]}function m(e,n,i){for(var o=0,r=n.length;o<r;o++)t(e,n[o],i);return i}function g(e,t,n,i,o){for(var r,s=[],a=0,l=e.length,c=null!=t;a<l;
vendor: 17,588 bytes, lines 3-4
3a++)(r=e[a])&&(n&&!n(r,i,o)||(s.push(r),c&&t.push(a)));return s}function v(e,t,n,o,r,s){return o&&!o[H]&&(o=v(o)),r&&!r[H]&&(r=v(r,s)),i(function(i,s,a,l){var c,d,u,h=[],p=[],f=s.length,v=i||m(t||"*",a.nodeType?[a]:a,[]),y=!e||!i&&t?v:g(v,h,e,a,l),b=n?r||(i?e:f||o)?[]:s:y;if(n&&n(y,b,a,l),o)for(c=g(b,p),o(c,[],a,l),d=c.length;d--;)(u=c[d])&&(b[p[d]]=!(y[p[d]]=u));if(i){if(r||e){if(r){for(c=[],d=b.length;d--;)(u=b[d])&&c.push(y[d]=u);r(null,b=[],c,l)}for(d=b.length;d--;)(u=b[d])&&(c=r?ee(i,u):h[d])>-1&&(i[c]=!(s[c]=u))}}else b=g(b===s?b.splice(f,b.length):b),r?r(null,s,b,l):Z.apply(s,b)})}function y(e){for(var t,n,i,o=e.length,r=C.relative[e[0].type],s=r||C.relative[" "],a=r?1:0,l=p(function(e){return e===t},s,!0),c=p(function(e){return ee(t,e)>-1},s,!0),d=[function(e,n,i){var o=!r&&(i||n!==T)||((t=n).nodeType?l(e,n,i):c(e,n,i));return t=null,o}];a<o;a++)if(n=C.relative[e[a].type])d=[p(f(d),n)];else{if((n=C.filter[e[a].type].apply(null,e[a].matches))[H]){for(i=++a;i<o&&!C.relative[e[i].type];i++);return v(a>1&&f(d),a>1&&h(e.slice(0,a-1).concat({value:" "===e[a-2].type?"*":""})).replace(ae,"$1"),n,a<i&&y(e.slice(a,i)),i<o&&y(e=e.slice(i)),i<o&&h(e))}d.push(n)}return f(d)}function b(e,n){var o=n.length>0,r=e.length>0,s=function(i,s,a,l,c){var d,u,h,p=0,f="0",m=i&&[],v=[],y=T,b=i||r&&C.find.TAG("*",c),_=z+=null==y?1:Math.random()||.1,w=b.length;for(c&&(T=s===N||s||c);f!==w&&null!=(d=b[f]);f++){if(r&&d){for(u=0,s||d.ownerDocument===N||(R(d),a=!P);h=e[u++];)if(h(d,s||N,a)){l.push(d);break}c&&(z=_)}o&&((d=!h&&d)&&p--,i&&m.push(d))}if(p+=f,o&&f!==p){for(u=0;h=n[u++];)h(m,v,s,a);if(i){if(p>0)for(;f--;)m[f]||v[f]||(v[f]=X.call(l));v=g(v)}Z.apply(l,v),c&&!i&&v.length>0&&p+n.length>1&&t.uniqueSort(l)}return c&&(z=_,T=y),m};return o?i(s):s}var _,w,C,k,x,S,E,D,T,A,M,R,N,I,P,O,L,B,F,H="sizzle"+1*new Date,$=e.document,z=0,j=0,q=n(),U=n(),W=n(),V=function(e,t){return e===t&&(M=!0),0},Y=1<<31,G={}.hasOwnProperty,K=[],X=K.pop,Q=K.push,Z=K.push,J=K.slice,ee=function(e,t){for(var n=0,i=e.length;n<i;n++)if(e[n]===t)return n;return-1},te="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",ne="[\\x20\\t\\r\\n\\f]",ie="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",oe="\\["+ne+"*("+ie+")(?:"+ne+"*([*^$|!~]?=)"+ne+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+ie+"))|)"+ne+"*\\]",re=":("+ie+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+oe+")*)|.*)\\)|)",se=new RegExp(ne+"+","g"),ae=new RegExp("^"+ne+"+|((?:^|[^\\\\])(?:\\\\.)*)"+ne+"+$","g"),le=new RegExp("^"+ne+"*,"+ne+"*"),ce=new RegExp("^"+ne+"*([>+~]|"+ne+")"+ne+"*"),de=new RegExp("="+ne+"*([^\\]'\"]*?)"+ne+"*\\]","g"),ue=new RegExp(re),he=new RegExp("^"+ie+"$"),pe={ID:new RegExp("^#("+ie+")"),CLASS:new RegExp("^\\.("+ie+")"),TAG:new RegExp("^("+ie+"|[*])"),ATTR:new RegExp("^"+oe),PSEUDO:new RegExp("^"+re),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ne+"*(even|odd|(([+-]|)(\\d*)n|)"+ne+"*(?:([+-]|)"+ne+"*(\\d+)|))"+ne+"*\\)|)","i"),bool:new RegExp("^(?:"+te+")$","i"),needsContext:new RegExp("^"+ne+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ne+"*((?:-\\d)?\\d*)"+ne+"*\\)|)(?=[^-]|$)","i")},fe=/^(?:input|select|textarea|button)$/i,me=/^h\d$/i,ge=/^[^{]+\{\s*\[native \w/,ve=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ye=/[+~]/,be=/'|\\/g,_e=new RegExp("\\\\([\\da-f]{1,6}"+ne+"?|("+ne+")|.)","ig"),we=function(e,t,n){var i="0x"+t-65536;return i!=i||n?t:i<0?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320)},Ce=function(){R()};try{Z.apply(K=J.call($.childNodes),$.childNodes),K[$.childNodes.length].nodeType}catch(e){Z={apply:K.length?function(e,t){Q.apply(e,J.call(t))}:function(e,t){for(var n=e.length,i=0;e[n++]=t[i++];);e.length=n-1}}}for(_ in w=t.support={},x=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},R=t.setDocument=function(e){var t,n,i=e?e.ownerDocument||e:$;return i!==N&&9===i.nodeType&&i.documentElement?(I=(N=i).documentElement,P=!x(N),(n=N.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",Ce,!1):n.attachEvent&&n.attachEvent("onunload",Ce)),w.attributes=o(function(e){return e.className="i",!e.getAttribute("className")}),w.getElementsByTagName=o(function(e){return e.appendChild(N.createComment("")),!e.getElementsByTagName("*").length}),w.getElementsByClassName=ge.test(N.getElementsByClassName),w.getById=o(function(e){return I.appendChild(e).id=H,!N.getElementsByName||!N.getElementsByName(H).length}),w.getById?(C.find.ID=function(e,t){if(void 0!==t.getElementById&&P){var n=t.getElementById(e);return n?[n]:[]}},C.filter.ID=function(e){var t=e.replace(_e,we);return function(e){return e.getAttribute("id")===t}}):(delete C.find.ID,C.filter.ID=function(e){var t=e.replace(_e,we);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}}),C.find.TAG=w.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):w.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,i=[],o=0,r=t.getElementsByTagName(e);if("*"===e){for(;n=r[o++];)1===n.nodeType&&i.push(n);return i}return r},C.find.CLASS=w.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&P)return t.getElementsByClassName(e)},L=[],O=[],(w.qsa=ge.test(N.querySelectorAll))&&(o(function(e){I.appendChild(e).innerHTML="<a id='"+H+"'></a><select id='"+H+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&O.push("[*^$]="+ne+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||O.push("\\["+ne+"*(?:value|"+te+")"),e.querySelectorAll("[id~="+H+"-]").length||O.push("~="),e.querySelectorAll(":checked").length||O.push(":checked"),e.querySelectorAll("a#"+H+"+*").length||O.push(".#.+[+~]")}),o(function(e){var t=N.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&O.push("name"+ne+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||O.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),O.push(",.*:")})),(w.matchesSelector=ge.test(B=I.matches||I.webkitMatchesSelector||I.mozMatchesSelector||I.oMatchesSelector||I.msMatchesSelector))&&o(function(e){w.disconnectedMatch=B.call(e,"div"),B.call(e,"[s!='']:x"),L.push("!=",re)}),O=O.length&&new RegExp(O.join("|")),L=L.length&&new RegExp(L.join("|")),t=ge.test(I.compareDocumentPosition),F=t||ge.test(I.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,i=t&&t.parentNode;return e===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):e.compareDocumentPosition&&16&e.compareDocumentPosition(i)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},V=t?function(e,t){if(e===t)return M=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!w.sortDetached&&t.compareDocumentPosition(e)===n?e===N||e.ownerDocument===$&&F($,e)?-1:t===N||t.ownerDocument===$&&F($,t)?1:A?ee(A,e)-ee(A,t):0:4&n?-1:1)}:function(e,t){if(e===t)return M=!0,0;var n,i=0,o=e.parentNode,r=t.parentNode,a=[e],l=[t];if(!o||!r)return e===N?-1:t===N?1:o?-1:r?1:A?ee(A,e)-ee(A,t):0;if(o===r)return s(e,t);for(n=e;n=n.parentNode;)a.unshift(n);for(n=t;n=n.parentNode;)l.unshift(n);for(;a[i]===l[i];)i++;return i?s(a[i],l[i]):a[i]===$?-1:l[i]===$?1:0},N):N},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==N&&R(e),n=n.replace(de,"='$1']"),w.matchesSelector&&P&&!W[n+" "]&&(!L||!L.test(n))&&(!O||!O.test(n)))try{var i=B.call(e,n);if(i||w.disconnectedMatch||e.document&&11!==e.document.nodeType)return i}catch(e){}return t(n,N,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==N&&R(e),F(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==N&&R(e);var n=C.attrHandle[t.toLowerCase()],i=n&&G.call(C.attrHandle,t.toLowerCase())?n(e,t,!P):void 0;return void 0!==i?i:w.attributes||!P?e.getAttribute(t):(i=e.getAttributeNode(t))&&i.specified?i.value:null},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],i=0,o=0;if(M=!w.detectDuplicates,A=!w.sortStable&&e.slice(0),e.sort(V),M){for(;t=e[o++];)t===e[o]&&(i=n.push(o));for(;i--;)e.splice(n[i],1)}return A=null,e},k=t.getText=function(e){var t,n="",i=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=k(e)}else if(3===o||4===o)return e.nodeValue}else for(;t=e[i++];)n+=k(t);return n},C=t.selectors={cacheLength:50,createPseudo:i,match:pe,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(_e,we),e[3]=(e[3]||e[4]||e[5]||"").replace(_e,we),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return pe.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&ue.test(n)&&(t=S(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(_e,we).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=q[e+" "];return t||(t=new RegExp("(^|"+ne+")"+e+"("+ne+"|$)"))&&q(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,n,i){return function(o){var r=t.attr(o,e);return null==r?"!="===n:!n||(r+="","="===n?r===i:"!="===n?r!==i:"^="===n?i&&0===r.indexOf(i):"*="===n?i&&r.indexOf(i)>-1:"$="===n?i&&r.slice(-i.length)===i:"~="===n?(" "+r.replace(se," ")+" ").indexOf(i)>-1:"|="===n&&(r===i||r.slice(0,i.length+1)===i+"-"))}},CHILD:function(e,t,n,i,o){var r="nth"!==e.slice(0,3),s="last"!==e.slice(-4),a="of-type"===t;return 1===i&&0===o?function(e){return!!e.parentNode}:function(t,n,l){var c,d,u,h,p,f,m=r!==s?"nextSibling":"previousSibling",g=t.parentNode,v=a&&t.nodeName.toLowerCase(),y=!l&&!a,b=!1;if(g){if(r){for(;m;){for(h=t;h=h[m];)if(a?h.nodeName.toLowerCase()===v:1===h.nodeType)return!1;f=m="only"===e&&!f&&"nextSibling"}return!0}if(f=[s?g.firstChild:g.lastChild],s&&y){for(b=(p=(c=(d=(u=(h=g)[H]||(h[H]={}))[h.uniqueID]||(u[h.uniqueID]={}))[e]||[])[0]===z&&c[1])&&c[2],h=p&&g.childNodes[p];h=++p&&h&&h[m]||(b=p=0)||f.pop();)if(1===h.nodeType&&++b&&h===t){d[e]=[z,p,b];break}}else if(y&&(b=p=(c=(d=(u=(h=t)[H]||(h[H]={}))[h.uniqueID]||(u[h.uniqueID]={}))[e]||[])[0]===z&&c[1]),!1===b)for(;(h=++p&&h&&h[m]||(b=p=0)||f.pop())&&((a?h.nodeName.toLowerCase()!==v:1!==h.nodeType)||!++b||(y&&((d=(u=h[H]||(h[H]={}))[h.uniqueID]||(u[h.uniqueID]={}))[e]=[z,b]),h!==t)););return(b-=o)===i||b%i===0&&b/i>=0}}},PSEUDO:function(e,n){var o,r=C.pseudos[e]||C.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return r[H]?r(n):r.length>1?(o=[e,e,"",n],C.setFilters.hasOwnProperty(e.toLowerCase())?i(function(e,t){for(var i,o=r(e,n),s=o.length;s--;)e[i=ee(e,o[s])]=!(t[i]=o[s])}):function(e){return r(e,0,o)}):r}},pseudos:{not:i(function(e){var t=[],n=[],o=E(e.replace(ae,"$1"));return o[H]?i(function(e,t,n,i){
4for(var r,s=o(e,null,i,[]),a=e.length;a--;)(r=s[a])&&(e[a]=!(t[a]=r))}):function(e,i,r){return t[0]=e,o(t,null,r,n),t[0]=null,!n.pop()}}),has:i(function(e){return function(n){return t(e,n).length>0}}),contains:i(function(e){return e=e.replace(_e,we),function(t){return(t.textContent||t.innerText||k(t)).indexOf(e)>-1}}),lang:i(function(e){return he.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(_e,we).toLowerCase(),function(t){var n;do{if(n=P?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===I},focus:function(e){return e===N.activeElement&&(!N.hasFocus||N.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return!1===e.disabled},disabled:function(e){return!0===e.disabled},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!C.pseudos.empty(e)},header:function(e){return me.test(e.nodeName)},input:function(e){return fe.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:c(function(){return[0]}),last:c(function(e,t){return[t-1]}),eq:c(function(e,t,n){return[n<0?n+t:n]}),even:c(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:c(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:c(function(e,t,n){for(var i=n<0?n+t:n;--i>=0;)e.push(i);return e}),gt:c(function(e,t,n){for(var i=n<0?n+t:n;++i<t;)e.push(i);return e})}},C.pseudos.nth=C.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})C.pseudos[_]=a(_);for(_ in{submit:!0,reset:!0})C.pseudos[_]=l(_);return u.prototype=C.filters=C.pseudos,C.setFilters=new u,S=t.tokenize=function(e,n){var i,o,r,s,a,l,c,d=U[e+" "];if(d)return n?0:d.slice(0);for(a=e,l=[],c=C.preFilter;a;){for(s in i&&!(o=le.exec(a))||(o&&(a=a.slice(o[0].length)||a),l.push(r=[])),i=!1,(o=ce.exec(a))&&(i=o.shift(),r.push({value:i,type:o[0].replace(ae," ")}),a=a.slice(i.length)),C.filter)!(o=pe[s].exec(a))||c[s]&&!(o=c[s](o))||(i=o.shift(),r.push({value:i,type:s,matches:o}),a=a.slice(i.length));if(!i)break}return n?a.length:a?t.error(e):U(e,l).slice(0)},E=t.compile=function(e,t){var n,i=[],o=[],r=W[e+" "];if(!r){for(t||(t=S(e)),n=t.length;n--;)(r=y(t[n]))[H]?i.push(r):o.push(r);(r=W(e,b(o,i))).selector=e}return r},D=t.select=function(e,t,n,i){var o,r,s,a,l,c="function"==typeof e&&e,u=!i&&S(e=c.selector||e);if(n=n||[],1===u.length){if((r=u[0]=u[0].slice(0)).length>2&&"ID"===(s=r[0]).type&&w.getById&&9===t.nodeType&&P&&C.relative[r[1].type]){if(!(t=(C.find.ID(s.matches[0].replace(_e,we),t)||[])[0]))return n;c&&(t=t.parentNode),e=e.slice(r.shift().value.length)}for(o=pe.needsContext.test(e)?0:r.length;o--&&(s=r[o],!C.relative[a=s.type]);)if((l=C.find[a])&&(i=l(s.matches[0].replace(_e,we),ye.test(r[0].type)&&d(t.parentNode)||t))){if(r.splice(o,1),!(e=i.length&&h(r)))return Z.apply(n,i),n;break}}return(c||E(e,u))(i,t,!P,n,!t||ye.test(e)&&d(t.parentNode)||t),n},w.sortStable=H.split("").sort(V).join("")===H,w.detectDuplicates=!!M,R(),w.sortDetached=o(function(e){return 1&e.compareDocumentPosition(N.createElement("div"))}),o(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||r("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),w.attributes&&o(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||r("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),o(function(e){return null==e.getAttribute("disabled")})||r(te,function(e,t,n){var i;if(!n)return!0===e[t]?t.toLowerCase():(i=e.getAttributeNode(t))&&i.specified?i.value:null}),t}(e);re.find=de,re.expr=de.selectors,re.expr[":"]=re.expr.pseudos,re.uniqueSort=re.unique=de.uniqueSort,re.text=de.getText,re.isXMLDoc=de.isXML,re.contains=de.contains;var ue=function(e,t,n){for(var i=[],o=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(o&&re(e).is(n))break;i.push(e)}return i},he=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},pe=re.expr.match.needsContext,fe=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,me=/^.[^:#\[\.,]*$/;re.filter=function(e,t,n){var i=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===i.nodeType?re.find.matchesSelector(i,e)?[i]:[]:re.find.matches(e,re.grep(t,function(e){return 1===e.nodeType}))},re.fn.extend({find:function(e){var t,n=this.length,i=[],o=this;if("string"!=typeof e)return this.pushStack(re(e).filter(function(){for(t=0;t<n;t++)if(re.contains(o[t],this))return!0}));for(t=0;t<n;t++)re.find(e,o[t],i);return(i=this.pushStack(n>1?re.unique(i):i)).selector=this.selector?this.selector+" "+e:e,i},filter:function(e){return this.pushStack(i(this,e||[],!1))},not:function(e){return this.pushStack(i(this,e||[],!0))},is:function(e){return!!i(this,"string"==typeof e&&pe.test(e)?re(e):e||[],!1).length}});var ge,ve=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/;(re.fn.init=function(e,t,n){var i,o;if(!e)return this;if(n=n||ge,"string"==typeof e){if(!(i="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:ve.exec(e))||!i[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(i[1]){if(t=t instanceof re?t[0]:t,re.merge(this,re.parseHTML(i[1],t&&t.nodeType?t.ownerDocument||t:K,!0)),fe.test(i[1])&&re.isPlainObject(t))for(i in t)re.isFunction(this[i])?this[i](t[i]):this.attr(i,t[i]);return this}return(o=K.getElementById(i[2]))&&o.parentNode&&(this.length=1,this[0]=o),this.context=K,this.selector=e,this}
vendor: 9,951 bytes, line 4
4return e.nodeType?(this.context=this[0]=e,this.length=1,this):re.isFunction(e)?void 0!==n.ready?n.ready(e):e(re):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),re.makeArray(e,this))}).prototype=re.fn,ge=re(K);var ye=/^(?:parents|prev(?:Until|All))/,be={children:!0,contents:!0,next:!0,prev:!0};re.fn.extend({has:function(e){var t=re(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(re.contains(this,t[e]))return!0})},closest:function(e,t){for(var n,i=0,o=this.length,r=[],s=pe.test(e)||"string"!=typeof e?re(e,t||this.context):0;i<o;i++)for(n=this[i];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(s?s.index(n)>-1:1===n.nodeType&&re.find.matchesSelector(n,e))){r.push(n);break}return this.pushStack(r.length>1?re.uniqueSort(r):r)},index:function(e){return e?"string"==typeof e?J.call(re(e),this[0]):J.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(re.uniqueSort(re.merge(this.get(),re(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),re.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return ue(e,"parentNode")},parentsUntil:function(e,t,n){return ue(e,"parentNode",n)},next:function(e){return o(e,"nextSibling")},prev:function(e){return o(e,"previousSibling")},nextAll:function(e){return ue(e,"nextSibling")},prevAll:function(e){return ue(e,"previousSibling")},nextUntil:function(e,t,n){return ue(e,"nextSibling",n)},prevUntil:function(e,t,n){return ue(e,"previousSibling",n)},siblings:function(e){return he((e.parentNode||{}).firstChild,e)},children:function(e){return he(e.firstChild)},contents:function(e){return e.contentDocument||re.merge([],e.childNodes)}},function(e,t){re.fn[e]=function(n,i){var o=re.map(this,t,n);return"Until"!==e.slice(-5)&&(i=n),i&&"string"==typeof i&&(o=re.filter(i,o)),this.length>1&&(be[e]||re.uniqueSort(o),ye.test(e)&&o.reverse()),this.pushStack(o)}});var _e,we=/\S+/g;re.Callbacks=function(e){e="string"==typeof e?r(e):re.extend({},e);var t,n,i,o,s=[],a=[],l=-1,c=function(){for(o=e.once,i=t=!0;a.length;l=-1)for(n=a.shift();++l<s.length;)!1===s[l].apply(n[0],n[1])&&e.stopOnFalse&&(l=s.length,n=!1);e.memory||(n=!1),t=!1,o&&(s=n?[]:"")},d={add:function(){return s&&(n&&!t&&(l=s.length-1,a.push(n)),function t(n){re.each(n,function(n,i){re.isFunction(i)?e.unique&&d.has(i)||s.push(i):i&&i.length&&"string"!==re.type(i)&&t(i)})}(arguments),n&&!t&&c()),this},remove:function(){return re.each(arguments,function(e,t){for(var n;(n=re.inArray(t,s,n))>-1;)s.splice(n,1),n<=l&&l--}),this},has:function(e){return e?re.inArray(e,s)>-1:s.length>0},empty:function(){return s&&(s=[]),this},disable:function(){return o=a=[],s=n="",this},disabled:function(){return!s},lock:function(){return o=a=[],n||(s=n=""),this},locked:function(){return!!o},fireWith:function(e,n){return o||(n=[e,(n=n||[]).slice?n.slice():n],a.push(n),t||c()),this},fire:function(){return d.fireWith(this,arguments),this},fired:function(){return!!i}};return d},re.extend({Deferred:function(e){var t=[["resolve","done",re.Callbacks("once memory"),"resolved"],["reject","fail",re.Callbacks("once memory"),"rejected"],["notify","progress",re.Callbacks("memory")]],n="pending",i={state:function(){return n},always:function(){return o.done(arguments).fail(arguments),this},then:function(){var e=arguments;return re.Deferred(function(n){re.each(t,function(t,r){var s=re.isFunction(e[t])&&e[t];o[r[1]](function(){var e=s&&s.apply(this,arguments);e&&re.isFunction(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[r[0]+"With"](this===i?n.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?re.extend(e,i):i}},o={};return i.pipe=i.then,re.each(t,function(e,r){var s=r[2],a=r[3];i[r[1]]=s.add,a&&s.add(function(){n=a},t[1^e][2].disable,t[2][2].lock),o[r[0]]=function(){return o[r[0]+"With"](this===o?i:this,arguments),this},o[r[0]+"With"]=s.fireWith}),i.promise(o),e&&e.call(o,o),o},when:function(e){var t,n,i,o=0,r=X.call(arguments),s=r.length,a=1!==s||e&&re.isFunction(e.promise)?s:0,l=1===a?e:re.Deferred(),c=function(e,n,i){return function(o){n[e]=this,i[e]=arguments.length>1?X.call(arguments):o,i===t?l.notifyWith(n,i):--a||l.resolveWith(n,i)}};if(s>1)for(t=new Array(s),n=new Array(s),i=new Array(s);o<s;o++)r[o]&&re.isFunction(r[o].promise)?r[o].promise().progress(c(o,n,t)).done(c(o,i,r)).fail(l.reject):--a;return a||l.resolveWith(i,r),l.promise()}}),re.fn.ready=function(e){return re.ready.promise().done(e),this},re.extend({isReady:!1,readyWait:1,holdReady:function(e){e?re.readyWait++:re.ready(!0)},ready:function(e){(!0===e?--re.readyWait:re.isReady)||(re.isReady=!0,!0!==e&&--re.readyWait>0||(_e.resolveWith(K,[re]),re.fn.triggerHandler&&(re(K).triggerHandler("ready"),re(K).off("ready"))))}}),re.ready.promise=function(t){return _e||(_e=re.Deferred(),"complete"===K.readyState||"loading"!==K.readyState&&!K.documentElement.doScroll?e.setTimeout(re.ready):(K.addEventListener("DOMContentLoaded",s),e.addEventListener("load",s))),_e.promise(t)},re.ready.promise();var Ce=function(e,t,n,i,o,r,s){var a=0,l=e.length,c=null==n;if("object"===re.type(n))for(a in o=!0,n)Ce(e,t,a,n[a],!0,r,s);else if(void 0!==i&&(o=!0,re.isFunction(i)||(s=!0),c&&(s?(t.call(e,i),t=null):(c=t,t=function(e,t,n){return c.call(re(e),n)})),t))for(;a<l;a++)t(e[a],n,s?i:i.call(e[a],a,t(e[a],n)));return o?e:c?t.call(e):l?t(e[0],n):r},ke=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};a.uid=1,a.prototype={register:function(e,t){var n=t||{};return e.nodeType?e[this.expando]=n:Object.defineProperty(e,this.expando,{value:n,writable:!0,configurable:!0}),e[this.expando]},cache:function(e){if(!ke(e))return{};var t=e[this.expando];return t||(t={},ke(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var i,o=this.cache(e);if("string"==typeof t)o[t]=n;else for(i in t)o[i]=t[i];return o},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][t]},access:function(e,t,n){var i;return void 0===t||t&&"string"==typeof t&&void 0===n?void 0!==(i=this.get(e,t))?i:this.get(e,re.camelCase(t)):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,i,o,r=e[this.expando];if(void 0!==r){if(void 0===t)this.register(e);else{re.isArray(t)?i=t.concat(t.map(re.camelCase)):(o=re.camelCase(t),i=t in r?[t,o]:(i=o)in r?[i]:i.match(we)||[]),n=i.length;for(;n--;)delete r[i[n]]}(void 0===t||re.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!re.isEmptyObject(t)}};var xe=new a,Se=new a,Ee=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,De=/[A-Z]/g;re.extend({hasData:function(e){return Se.hasData(e)||xe.hasData(e)},data:function(e,t,n){return Se.access(e,t,n)},removeData:function(e,t){Se.remove(e,t)},_data:function(e,t,n){return xe.access(e,t,n)},_removeData:function(e,t){xe.remove(e,t)}}),re.fn.extend({data:function(e,t){var n,i,o,r=this[0],s=r&&r.attributes;if(void 0===e){if(this.length&&(o=Se.get(r),1===r.nodeType&&!xe.get(r,"hasDataAttrs"))){for(n=s.length;n--;)s[n]&&0===(i=s[n].name).indexOf("data-")&&(i=re.camelCase(i.slice(5)),l(r,i,o[i]));xe.set(r,"hasDataAttrs",!0)}return o}return"object"==typeof e?this.each(function(){Se.set(this,e)}):Ce(this,function(t){var n,i;if(r&&void 0===t)return void 0!==(n=Se.get(r,e)||Se.get(r,e.replace(De,"-$&").toLowerCase()))?n:(i=re.camelCase(e),void 0!==(n=Se.get(r,i))||void 0!==(n=l(r,i,void 0))?n:void 0);i=re.camelCase(e),this.each(function(){var n=Se.get(this,i);Se.set(this,i,t),e.indexOf("-")>-1&&void 0!==n&&Se.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){Se.remove(this,e)})}}),re.extend({queue:function(e,t,n){var i;if(e)return t=(t||"fx")+"queue",i=xe.get(e,t),n&&(!i||re.isArray(n)?i=xe.access(e,t,re.makeArray(n)):i.push(n)),i||[]},dequeue:function(e,t){t=t||"fx";var n=re.queue(e,t),i=n.length,o=n.shift(),r=re._queueHooks(e,t),s=function(){re.dequeue(e,t)};"inprogress"===o&&(o=n.shift(),i--),o&&("fx"===t&&n.unshift("inprogress"),delete r.stop,o.call(e,s,r)),!i&&r&&r.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return xe.get(e,n)||xe.access(e,n,{empty:re.Callbacks("once memory").add(function(){xe.remove(e,[t+"queue",n])})})}}),re.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?re.queue(this[0],e):void 0===t?this:this.each(function(){var n=re.queue(this,e,t);re._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&re.dequeue(this,e)})},dequeue:function(e){return this.each(function(){re.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,i=1,o=re.Deferred(),r=this,s=this.length,a=function(){--i||o.resolveWith(r,[r])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";s--;)(n=xe.get(r[s],e+"queueHooks"))&&n.empty&&(i++,n.empty.add(a));return a(),o.promise(t)}});var Te=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,Ae=new RegExp("^(?:([+-])=|)("+Te+")([a-z%]*)$","i"),Me=["Top","Right","Bottom","Left"],Re=function(e,t){return e=t||e,"none"===re.css(e,"display")||!re.contains(e.ownerDocument,e)},Ne=/^(?:checkbox|radio)$/i,Ie=/<([\w:-]+)/,Pe=/^$|\/(?:java|ecma)script/i,Oe={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};Oe.optgroup=Oe.option,Oe.tbody=Oe.tfoot=Oe.colgroup=Oe.caption=Oe.thead,Oe.th=Oe.td;var Le,Be,Fe=/<|&#?\w+;/;Le=K.createDocumentFragment().appendChild(K.createElement("div")),(Be=K.createElement("input")).setAttribute("type","radio"),Be.setAttribute("checked","checked"),Be.setAttribute("name","t"),Le.appendChild(Be),ie.checkClone
vendor: 5,722 bytes, line 4
4=Le.cloneNode(!0).cloneNode(!0).lastChild.checked,Le.innerHTML="<textarea>x</textarea>",ie.noCloneChecked=!!Le.cloneNode(!0).lastChild.defaultValue;var He=/^key/,$e=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,ze=/^([^.]*)(?:\.(.+)|)/;re.event={global:{},add:function(e,t,n,i,o){var r,s,a,l,c,d,u,h,p,f,m,g=xe.get(e);if(g)for(n.handler&&(n=(r=n).handler,o=r.selector),n.guid||(n.guid=re.guid++),(l=g.events)||(l=g.events={}),(s=g.handle)||(s=g.handle=function(t){return void 0!==re&&re.event.triggered!==t.type?re.event.dispatch.apply(e,arguments):void 0}),c=(t=(t||"").match(we)||[""]).length;c--;)p=m=(a=ze.exec(t[c])||[])[1],f=(a[2]||"").split(".").sort(),p&&(u=re.event.special[p]||{},p=(o?u.delegateType:u.bindType)||p,u=re.event.special[p]||{},d=re.extend({type:p,origType:m,data:i,handler:n,guid:n.guid,selector:o,needsContext:o&&re.expr.match.needsContext.test(o),namespace:f.join(".")},r),(h=l[p])||((h=l[p]=[]).delegateCount=0,u.setup&&!1!==u.setup.call(e,i,f,s)||e.addEventListener&&e.addEventListener(p,s)),u.add&&(u.add.call(e,d),d.handler.guid||(d.handler.guid=n.guid)),o?h.splice(h.delegateCount++,0,d):h.push(d),re.event.global[p]=!0)},remove:function(e,t,n,i,o){var r,s,a,l,c,d,u,h,p,f,m,g=xe.hasData(e)&&xe.get(e);if(g&&(l=g.events)){for(c=(t=(t||"").match(we)||[""]).length;c--;)if(p=m=(a=ze.exec(t[c])||[])[1],f=(a[2]||"").split(".").sort(),p){for(u=re.event.special[p]||{},h=l[p=(i?u.delegateType:u.bindType)||p]||[],a=a[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=r=h.length;r--;)d=h[r],!o&&m!==d.origType||n&&n.guid!==d.guid||a&&!a.test(d.namespace)||i&&i!==d.selector&&("**"!==i||!d.selector)||(h.splice(r,1),d.selector&&h.delegateCount--,u.remove&&u.remove.call(e,d));s&&!h.length&&(u.teardown&&!1!==u.teardown.call(e,f,g.handle)||re.removeEvent(e,p,g.handle),delete l[p])}else for(p in l)re.event.remove(e,p+t[c],n,i,!0);re.isEmptyObject(l)&&xe.remove(e,"handle events")}},dispatch:function(e){e=re.event.fix(e);var t,n,i,o,r,s=[],a=X.call(arguments),l=(xe.get(this,"events")||{})[e.type]||[],c=re.event.special[e.type]||{};if(a[0]=e,e.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,e)){for(s=re.event.handlers.call(this,e,l),t=0;(o=s[t++])&&!e.isPropagationStopped();)for(e.currentTarget=o.elem,n=0;(r=o.handlers[n++])&&!e.isImmediatePropagationStopped();)e.rnamespace&&!e.rnamespace.test(r.namespace)||(e.handleObj=r,e.data=r.data,void 0!==(i=((re.event.special[r.origType]||{}).handle||r.handler).apply(o.elem,a))&&!1===(e.result=i)&&(e.preventDefault(),e.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,t){var n,i,o,r,s=[],a=t.delegateCount,l=e.target;if(a&&l.nodeType&&("click"!==e.type||isNaN(e.button)||e.button<1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&(!0!==l.disabled||"click"!==e.type)){for(i=[],n=0;n<a;n++)void 0===i[o=(r=t[n]).selector+" "]&&(i[o]=r.needsContext?re(o,this).index(l)>-1:re.find(o,this,null,[l]).length),i[o]&&i.push(r);i.length&&s.push({elem:l,handlers:i})}return a<t.length&&s.push({elem:this,handlers:t.slice(a)}),s},props:"altKey bubbles cancelable ctrlKey currentTarget detail eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,t){var n,i,o,r=t.button;return null==e.pageX&&null!=t.clientX&&(i=(n=e.target.ownerDocument||K).documentElement,o=n.body,e.pageX=t.clientX+(i&&i.scrollLeft||o&&o.scrollLeft||0)-(i&&i.clientLeft||o&&o.clientLeft||0),e.pageY=t.clientY+(i&&i.scrollTop||o&&o.scrollTop||0)-(i&&i.clientTop||o&&o.clientTop||0)),e.which||void 0===r||(e.which=1&r?1:2&r?3:4&r?2:0),e}},fix:function(e){if(e[re.expando])return e;var t,n,i,o=e.type,r=e,s=this.fixHooks[o];for(s||(this.fixHooks[o]=s=$e.test(o)?this.mouseHooks:He.test(o)?this.keyHooks:{}),i=s.props?this.props.concat(s.props):this.props,e=new re.Event(r),t=i.length;t--;)e[n=i[t]]=r[n];return e.target||(e.target=K),3===e.target.nodeType&&(e.target=e.target.parentNode),s.filter?s.filter(e,r):e},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==m()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===m()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&re.nodeName(this,"input"))return this.click(),!1},_default:function(e){return re.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},re.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},re.Event=function(e,t){if(!(this instanceof re.Event))return new re.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?p:f):this.type=e,t&&re.extend(this,t),this.timeStamp=e&&e.timeStamp||re.now(),this[re.expando]=!0},re.Event.prototype={constructor:re.Event,isDefaultPrevented:f,isPropagationStopped:f,isImmediatePropagationStopped:f,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=p,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=p,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=p,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}}
vendor: 1,595 bytes, line 4
4,re.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){re.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,i=this,o=e.relatedTarget,r=e.handleObj;return o&&(o===i||re.contains(i,o))||(e.type=r.origType,n=r.handler.apply(this,arguments),e.type=t),n}}}),re.fn.extend({on:function(e,t,n,i){return g(this,e,t,n,i)},one:function(e,t,n,i){return g(this,e,t,n,i,1)},off:function(e,t,n){var i,o;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,re(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(o in e)this.off(o,t,e[o]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=f),this.each(function(){re.event.remove(this,e,n,t)})}});var je=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,qe=/<script|<style|<link/i,Ue=/checked\s*(?:[^=]|=\s*.checked.)/i,We=/^true\/(.*)/,Ve=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;re.extend({htmlPrefilter:function(e){return e.replace(je,"<$1></$2>")},clone:function(e,t,n){var i,o,r,s,a=e.cloneNode(!0),l=re.contains(e.ownerDocument,e);if(!(ie.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||re.isXMLDoc(e)))for(s=d(a),i=0,o=(r=d(e)).length;i<o;i++)w(r[i],s[i]);if(t)if(n)for(r=r||d(e),s=s||d(a),i=0,o=r.length;i<o;i++)_(r[i],s[i]);else _(e,a);return(s=d(a,"script")).length>0&&u(s,!l&&d(e,"script")),a},cleanData:function(e){for(var t,n,i,o=re.event.special,r=0;void 0!==(n=e[r]);r++)if(ke(n)){if(t=n[xe.expando]){if(t.events)for(i in t.events)
vendor: 9,755 bytes, lines 4-5
4o[i]?re.event.remove(n,i):re.removeEvent(n,i,t.handle);n[xe.expando]=void 0}n[Se.expando]&&(n[Se.expando]=void 0)}}}),re.fn.extend({domManip:C,detach:function(e){return k(this,e,!0)},remove:function(e){return k(this,e)},text:function(e){return Ce(this,function(e){return void 0===e?re.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return C(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||v(this,e).appendChild(e)})},prepend:function(){return C(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=v(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return C(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return C(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(re.cleanData(d(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return re.clone(this,e,t)})},html:function(e){return Ce(this,function(e){var t=this[0]||{},n=0,i=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!qe.test(e)&&!Oe[(Ie.exec(e)||["",""])[1].toLowerCase()]){e=re.htmlPrefilter(e);try{for(;n<i;n++)1===(t=this[n]||{}).nodeType&&(re.cleanData(d(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=[];return C(this,arguments,function(t){var n=this.parentNode;re.inArray(this,e)<0&&(re.cleanData(d(this)),n&&n.replaceChild(t,this))},e)}}),re.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){re.fn[e]=function(e){for(var n,i=[],o=re(e),r=o.length-1,s=0;s<=r;s++)n=s===r?this:this.clone(!0),re(o[s])[t](n),Z.apply(i,n.get());return this.pushStack(i)}});var Ye,Ge={HTML:"block",BODY:"block"},Ke=/^margin/,Xe=new RegExp("^("+Te+")(?!px)[a-z%]+$","i"),Qe=function(t){var n=t.ownerDocument.defaultView;return n&&n.opener||(n=e),n.getComputedStyle(t)},Ze=function(e,t,n,i){var o,r,s={};for(r in t)s[r]=e.style[r],e.style[r]=t[r];for(r in o=n.apply(e,i||[]),t)e.style[r]=s[r];return o},Je=K.documentElement;!function(){function t(){a.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",a.innerHTML="",Je.appendChild(s);var t=e.getComputedStyle(a);n="1%"!==t.top,r="2px"===t.marginLeft,i="4px"===t.width,a.style.marginRight="50%",o="4px"===t.marginRight,Je.removeChild(s)}var n,i,o,r,s=K.createElement("div"),a=K.createElement("div");a.style&&(a.style.backgroundClip="content-box",a.cloneNode(!0).style.backgroundClip="",ie.clearCloneStyle="content-box"===a.style.backgroundClip,s.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",s.appendChild(a),re.extend(ie,{pixelPosition:function(){return t(),n},boxSizingReliable:function(){return null==i&&t(),i},pixelMarginRight:function(){return null==i&&t(),o},reliableMarginLeft:function(){return null==i&&t(),r},reliableMarginRight:function(){var t,n=a.appendChild(K.createElement("div"));return n.style.cssText=a.style.cssText="-webkit-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",n.style.marginRight=n.style.width="0",a.style.width="1px",Je.appendChild(s),t=!parseFloat(e.getComputedStyle(n).marginRight),Je.removeChild(s),a.removeChild(n),t}}))}();var et=/^(none|table(?!-c[ea]).+)/,tt={position:"absolute",visibility:"hidden",display:"block"},nt={letterSpacing:"0",fontWeight:"400"},it=["Webkit","O","Moz","ms"],ot=K.createElement("div").style;re.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=E(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:"cssFloat"},style:function(e,t,n,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,r,s,a=re.camelCase(t),l=e.style;if(t=re.cssProps[a]||(re.cssProps[a]=T(a)||a),s=re.cssHooks[t]||re.cssHooks[a],void 0===n)return s&&"get"in s&&void 0!==(o=s.get(e,!1,i))?o:l[t];"string"===(r=typeof n)&&(o=Ae.exec(n))&&o[1]&&(n=c(e,t,o),r="number"),null!=n&&n==n&&("number"===r&&(n+=o&&o[3]||(re.cssNumber[a]?"":"px")),ie.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),s&&"set"in s&&void 0===(n=s.set(e,n,i))||(l[t]=n))}},css:function(e,t,n,i){var o,r,s,a=re.camelCase(t);return t=re.cssProps[a]||(re.cssProps[a]=T(a)||a),(s=re.cssHooks[t]||re.cssHooks[a])&&"get"in s&&(o=s.get(e,!0,n)),void 0===o&&(o=E(e,t,i)),"normal"===o&&t in nt&&(o=nt[t]),""===n||n?(r=parseFloat(o),!0===n||isFinite(r)?r||0:o):o}}),re.each(["height","width"],function(e,t){re.cssHooks[t]={get:function(e,n,i){if(n)return et.test(re.css(e,"display"))&&0===e.offsetWidth?Ze(e,tt,function(){return R(e,t,i)}):R(e,t,i)},set:function(e,n,i){var o,r=i&&Qe(e),s=i&&M(e,t,i,"border-box"===re.css(e,"boxSizing",!1,r),r);return s&&(o=Ae.exec(n))&&"px"!==(o[3]||"px")&&(e.style[t]=n,n=re.css(e,t)),A(e,n,s)}}}),re.cssHooks.marginLeft=D(ie.reliableMarginLeft,function(e,t){if(t)return(parseFloat(E(e,"marginLeft"))||e.getBoundingClientRect().left-Ze(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),re.cssHooks.marginRight=D(ie.reliableMarginRight,function(e,t){if(t)return Ze(e,{display:"inline-block"},E,[e,"marginRight"])}),re.each({margin:"",padding:"",border:"Width"},function(e,t){re.cssHooks[e+t]={expand:function(n){for(var i=0,o={},r="string"==typeof n?n.split(" "):[n];i<4;i++)o[e+Me[i]+t]=r[i]||r[i-2]||r[0];return o}},Ke.test(e)||(re.cssHooks[e+t].set=A)}),re.fn.extend({css:function(e,t){return Ce(this,function(e,t,n){var i,o,r={},s=0;if(re.isArray(t)){for(i=Qe(e),o=t.length;s<o;s++)r[t[s]]=re.css(e,t[s],!1,i);return r}return void 0!==n?re.style(e,t,n):re.css(e,t)},e,t,arguments.length>1)},show:function(){return N(this,!0)},hide:function(){return N(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){Re(this)?re(this).show():re(this).hide()})}}),re.Tween=I,I.prototype={constructor:I,init:function(e,t,n,i,o,r){this.elem=e,this.prop=n,this.easing=o||re.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=i,this.unit=r||(re.cssNumber[n]?"":"px")},cur:function(){var e=I.propHooks[this.prop];return e&&e.get?e.get(this):I.propHooks._default.get(this)},run:function(e){var t,n=I.propHooks[this.prop];return this.options.duration?this.pos=t=re.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):I.propHooks._default.set(this),this}},I.prototype.init.prototype=I.prototype,I.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=re.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){re.fx.step[e.prop]?re.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[re.cssProps[e.prop]]&&!re.cssHooks[e.prop]?e.elem[e.prop]=e.now:re.style(e.elem,e.prop,e.now+e.unit)}}},I.propHooks.scrollTop=I.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},re.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},re.fx=I.prototype.init,re.fx.step={};var rt,st,at=/^(?:toggle|show|hide)$/,lt=/queueHooks$/;re.Animation=re.extend(H,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return c(n.elem,e,Ae.exec(t),n),n}]},tweener:function(e,t){re.isFunction(e)?(t=e,e=["*"]):e=e.match(we);for(var n,i=0,o=e.length;i<o;i++)n=e[i],H.tweeners[n]=H.tweeners[n]||[],H.tweeners[n].unshift(t)},prefilters:[B],prefilter:function(e,t){t?H.prefilters.unshift(e):H.prefilters.push(e)}}),re.speed=function(e,t,n){var i=e&&"object"==typeof e?re.extend({},e):{complete:n||!n&&t||re.isFunction(e)&&e,duration:e,easing:n&&t||t&&!re.isFunction(t)&&t};return i.duration=re.fx.off?0:"number"==typeof i.duration?i.duration:i.duration in re.fx.speeds?re.fx.speeds[i.duration]:re.fx.speeds._default,null!=i.queue&&!0!==i.queue||(i.queue="fx"),i.old=i.complete,i.complete=function(){re.isFunction(i.old)&&i.old.call(this),i.queue&&re.dequeue(this,i.queue)},i},re.fn.extend({fadeTo:function(e,t,n,i){return this.filter(Re).css("opacity",0).show().end().animate({opacity:t},e,n,i)},animate:function(e,t,n,i){var o=re.isEmptyObject(e),r=re.speed(t,n,i),s=function(){var t=H(this,re.extend({},e),r);(o||xe.get(this,"finish"))&&t.stop(!0)};return s.finish=s,o||!1===r.queue?this.each(s):this.queue(r.queue,s)},stop:function(e,t,n){var i=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&!1!==e&&this.queue(e||"fx",[]),this.each(function(){var t=!0,o=null!=e&&e+"queueHooks",r=re.timers,s=xe.get(this);if(o)s[o]&&s[o].stop&&i(s[o]);else for(o in s)s[o]&&s[o].stop&&lt.test(o)&&i(s[o]);for(o=r.length;o--;)r[o].elem!==this||null!=e&&r[o].queue!==e||(r[o].anim.stop(n),t=!1,r.splice(o,1));!t&&n||re.dequeue(this,e)})},
5finish:function(e){return!1!==e&&(e=e||"fx"),this.each(function(){var t,n=xe.get(this),i=n[e+"queue"],o=n[e+"queueHooks"],r=re.timers,s=i?i.length:0;for(n.finish=!0,re.queue(this,e,[]),o&&o.stop&&o.stop.call(this,!0),t=r.length;t--;)r[t].elem===this&&r[t].queue===e&&(r[t].anim.stop(!0),r.splice(t,1)
vendor: 4,324 bytes, line 5
5);for(t=0;t<s;t++)i[t]&&i[t].finish&&i[t].finish.call(this);delete n.finish})}}),re.each(["toggle","show","hide"],function(e,t){var n=re.fn[t];re.fn[t]=function(e,i,o){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(O(t,!0),e,i,o)}}),re.each({slideDown:O("show"),slideUp:O("hide"),slideToggle:O("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){re.fn[e]=function(e,n,i){return this.animate(t,e,n,i)}}),re.timers=[],re.fx.tick=function(){var e,t=0,n=re.timers;for(rt=re.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||re.fx.stop(),rt=void 0},re.fx.timer=function(e){re.timers.push(e),e()?re.fx.start():re.timers.pop()},re.fx.interval=13,re.fx.start=function(){st||(st=e.setInterval(re.fx.tick,re.fx.interval))},re.fx.stop=function(){e.clearInterval(st),st=null},re.fx.speeds={slow:600,fast:200,_default:400},re.fn.delay=function(t,n){return t=re.fx&&re.fx.speeds[t]||t,n=n||"fx",this.queue(n,function(n,i){var o=e.setTimeout(n,t);i.stop=function(){e.clearTimeout(o)}})},function(){var e=K.createElement("input"),t=K.createElement("select"),n=t.appendChild(K.createElement("option"));e.type="checkbox",ie.checkOn=""!==e.value,ie.optSelected=n.selected,t.disabled=!0,ie.optDisabled=!n.disabled,(e=K.createElement("input")).value="t",e.type="radio",ie.radioValue="t"===e.value}();var ct,dt=re.expr.attrHandle;re.fn.extend({attr:function(e,t){return Ce(this,re.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){re.removeAttr(this,e)})}}),re.extend({attr:function(e,t,n){var i,o,r=e.nodeType;if(3!==r&&8!==r&&2!==r)return void 0===e.getAttribute?re.prop(e,t,n):(1===r&&re.isXMLDoc(e)||(t=t.toLowerCase(),o=re.attrHooks[t]||(re.expr.match.bool.test(t)?ct:void 0)),void 0!==n?null===n?void re.removeAttr(e,t):o&&"set"in o&&void 0!==(i=o.set(e,n,t))?i:(e.setAttribute(t,n+""),n):o&&"get"in o&&null!==(i=o.get(e,t))?i:null==(i=re.find.attr(e,t))?void 0:i)},attrHooks:{type:{set:function(e,t){if(!ie.radioValue&&"radio"===t&&re.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,i,o=0,r=t&&t.match(we);if(r&&1===e.nodeType)for(;n=r[o++];)i=re.propFix[n]||n,re.expr.match.bool.test(n)&&(e[i]=!1),e.removeAttribute(n)}}),ct={set:function(e,t,n){return!1===t?re.removeAttr(e,n):e.setAttribute(n,n),n}},re.each(re.expr.match.bool.source.match(/\w+/g),function(e,t){var n=dt[t]||re.find.attr;dt[t]=function(e,t,i){var o,r;return i||(r=dt[t],dt[t]=o,o=null!=n(e,t,i)?t.toLowerCase():null,dt[t]=r),o}});var ut=/^(?:input|select|textarea|button)$/i,ht=/^(?:a|area)$/i;re.fn.extend({prop:function(e,t){return Ce(this,re.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[re.propFix[e]||e]})}}),re.extend({prop:function(e,t,n){var i,o,r=e.nodeType;if(3!==r&&8!==r&&2!==r)return 1===r&&re.isXMLDoc(e)||(t=re.propFix[t]||t,o=re.propHooks[t]),void 0!==n?o&&"set"in o&&void 0!==(i=o.set(e,n,t))?i:e[t]=n:o&&"get"in o&&null!==(i=o.get(e,t))?i:e[t]},propHooks:{tabIndex:{get:function(e){var t=re.find.attr(e,"tabindex");return t?parseInt(t,10):ut.test(e.nodeName)||ht.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),ie.optSelected||(re.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),re.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){re.propFix[this.toLowerCase()]=this});var pt=/[\t\r\n\f]/g;re.fn.extend({addClass:function(e){var t,n,i,o,r,s,a,l=0;if(re.isFunction(e))return this.each(function(t){re(this).addClass(e.call(this,t,$(this)))});if("string"==typeof e&&e)for(t=e.match(we)||[];n=this[l++];)if(o=$(n),i=1===n.nodeType&&(" "+o+" ").replace(pt," ")){for(s=0;r=t[s++];)i.indexOf(" "+r+" ")<0&&(i+=r+" ");o!==(a=re.trim(i))&&n.setAttribute("class",a)}return this},removeClass:function(e){var t,n,i,o,r,s,a,l=0;if(re.isFunction(e))return this.each(function(t){re(this).removeClass(e.call(this,t,$(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof e&&e)for(t=e.match(we)||[];n=this[l++];
vendor: 4,436 bytes, line 5
5)if(o=$(n),i=1===n.nodeType&&(" "+o+" ").replace(pt," ")){for(s=0;r=t[s++];)for(;i.indexOf(" "+r+" ")>-1;)i=i.replace(" "+r+" "," ");o!==(a=re.trim(i))&&n.setAttribute("class",a)}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):re.isFunction(e)?this.each(function(n){re(this).toggleClass(e.call(this,n,$(this),t),t)}):this.each(function(){var t,i,o,r;if("string"===n)for(i=0,o=re(this),r=e.match(we)||[];t=r[i++];)o.hasClass(t)?o.removeClass(t):o.addClass(t);else void 0!==e&&"boolean"!==n||((t=$(this))&&xe.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":xe.get(this,"__className__")||""))})},hasClass:function(e){var t,n,i=0;for(t=" "+e+" ";n=this[i++];)if(1===n.nodeType&&(" "+$(n)+" ").replace(pt," ").indexOf(t)>-1)return!0;return!1}});var ft=/\r/g,mt=/[\x20\t\r\n\f]+/g;re.fn.extend({val:function(e){var t,n,i,o=this[0];return arguments.length?(i=re.isFunction(e),this.each(function(n){var o;1===this.nodeType&&(null==(o=i?e.call(this,n,re(this).val()):e)?o="":"number"==typeof o?o+="":re.isArray(o)&&(o=re.map(o,function(e){return null==e?"":e+""})),(t=re.valHooks[this.type]||re.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,o,"value")||(this.value=o))})):o?(t=re.valHooks[o.type]||re.valHooks[o.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(o,"value"))?n:"string"==typeof(n=o.value)?n.replace(ft,""):null==n?"":n:void 0}}),re.extend({valHooks:{option:{get:function(e){var t=re.find.attr(e,"value");return null!=t?t:re.trim(re.text(e)).replace(mt," ")}},select:{get:function(e){for(var t,n,i=e.options,o=e.selectedIndex,r="select-one"===e.type||o<0,s=r?null:[],a=r?o+1:i.length,l=o<0?a:r?o:0;l<a;l++)if(((n=i[l]).selected||l===o)&&(ie.optDisabled?!n.disabled:null===n.getAttribute("disabled"))&&(!n.parentNode.disabled||!re.nodeName(n.parentNode,"optgroup"))){if(t=re(n).val(),r)return t;s.push(t)}return s},set:function(e,t){for(var n,i,o=e.options,r=re.makeArray(t),s=o.length;s--;)((i=o[s]).selected=re.inArray(re.valHooks.option.get(i),r)>-1)&&(n=!0);return n||(e.selectedIndex=-1),r}}}}),re.each(["radio","checkbox"],function(){re.valHooks[this]={set:function(e,t){if(re.isArray(t))return e.checked=re.inArray(re(e).val(),t)>-1}},ie.checkOn||(re.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var gt=/^(?:focusinfocus|focusoutblur)$/;re.extend(re.event,{trigger:function(t,n,i,o){var r,s,a,l,c,d,u,h=[i||K],p=ne.call(t,"type")?t.type:t,f=ne.call(t,"namespace")?t.namespace.split("."):[];if(s=a=i=i||K,3!==i.nodeType&&8!==i.nodeType&&!gt.test(p+re.event.triggered)&&(p.indexOf(".")>-1&&(f=p.split("."),p=f.shift(),f.sort()),c=p.indexOf(":")<0&&"on"+p,(t=t[re.expando]?t:new re.Event(p,"object"==typeof t&&t)).isTrigger=o?2:3,t.namespace=f.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=i),n=null==n?[t]:re.makeArray(n,[t]),u=re.event.special[p]||{},o||!u.trigger||!1!==u.trigger.apply(i,n))){if(!o&&!u.noBubble&&!re.isWindow(i)){for(l=u.delegateType||p,gt.test(l+p)||(s=s.parentNode);s;s=s.parentNode)h.push(s),a=s;a===(i.ownerDocument||K)&&h.push(a.defaultView||a.parentWindow||e)}for(r=0;(s=h[r++])&&!t.isPropagationStopped();)t.type=r>1?l:u.bindType||p,(d=(xe.get(s,"events")||{})[t.type]&&xe.get(s,"handle"))&&d.apply(s,n),(d=c&&s[c])&&d.apply&&ke(s)&&(t.result=d.apply(s,n),!1===t.result&&t.preventDefault());return t.type=p,o||t.isDefaultPrevented()||u._default&&!1!==u._default.apply(h.pop(),n)||!ke(i)||c&&re.isFunction(i[p])&&!re.isWindow(i)&&((a=i[c])&&(i[c]=null),re.event.triggered=p,i[p](),re.event.triggered=void 0,a&&(i[c]=a)),t.result}},simulate:function(e,t,n){var i=re.extend(new re.Event,n,{type:e,isSimulated:!0});re.event.trigger(i,null,t)}}),re.fn.extend({trigger:function(e,t){return this.each(function(){re.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return re.event.trigger(e,t,n,!0)}}),re.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){re.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),re.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}
vendor: 5,942 bytes, line 5
5),ie.focusin="onfocusin"in e,ie.focusin||re.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){re.event.simulate(t,e.target,re.event.fix(e))};re.event.special[t]={setup:function(){var i=this.ownerDocument||this,o=xe.access(i,t);o||i.addEventListener(e,n,!0),xe.access(i,t,(o||0)+1)},teardown:function(){var i=this.ownerDocument||this,o=xe.access(i,t)-1;o?xe.access(i,t,o):(i.removeEventListener(e,n,!0),xe.remove(i,t))}}});var vt=e.location,yt=re.now(),bt=/\?/;re.parseJSON=function(e){return JSON.parse(e+"")},re.parseXML=function(t){var n;if(!t||"string"!=typeof t)return null;try{n=(new e.DOMParser).parseFromString(t,"text/xml")}catch(e){n=void 0}return n&&!n.getElementsByTagName("parsererror").length||re.error("Invalid XML: "+t),n};var _t=/#.*$/,wt=/([?&])_=[^&]*/,Ct=/^(.*?):[ \t]*([^\r\n]*)$/gm,kt=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,xt=/^(?:GET|HEAD)$/,St=/^\/\//,Et={},Dt={},Tt="*/".concat("*"),At=K.createElement("a");At.href=vt.href,re.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:vt.href,type:"GET",isLocal:kt.test(vt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Tt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":re.parseJSON,"text xml":re.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?q(q(e,re.ajaxSettings),t):q(re.ajaxSettings,e)},ajaxPrefilter:z(Et),ajaxTransport:z(Dt),ajax:function(t,n){function i(t,n,i,a){var c,u,y,b,w,k=n;2!==_&&(_=2,l&&e.clearTimeout(l),o=void 0,s=a||"",C.readyState=t>0?4:0,c=t>=200&&t<300||304===t,i&&(b=U(h,C,i)),b=W(h,b,C,c),c?(h.ifModified&&((w=C.getResponseHeader("Last-Modified"))&&(re.lastModified[r]=w),(w=C.getResponseHeader("etag"))&&(re.etag[r]=w)),204===t||"HEAD"===h.type?k="nocontent":304===t?k="notmodified":(k=b.state,u=b.data,c=!(y=b.error))):(y=k,!t&&k||(k="error",t<0&&(t=0))),C.status=t,C.statusText=(n||k)+"",c?m.resolveWith(p,[u,k,C]):m.rejectWith(p,[C,k,y]),C.statusCode(v),v=void 0,d&&f.trigger(c?"ajaxSuccess":"ajaxError",[C,h,c?u:y]),g.fireWith(p,[C,k]),d&&(f.trigger("ajaxComplete",[C,h]),--re.active||re.event.trigger("ajaxStop")))}"object"==typeof t&&(n=t,t=void 0),n=n||{};var o,r,s,a,l,c,d,u,h=re.ajaxSetup({},n),p=h.context||h,f=h.context&&(p.nodeType||p.jquery)?re(p):re.event,m=re.Deferred(),g=re.Callbacks("once memory"),v=h.statusCode||{},y={},b={},_=0,w="canceled",C={readyState:0,getResponseHeader:function(e){var t;if(2===_){if(!a)for(a={};t=Ct.exec(s);)a[t[1].toLowerCase()]=t[2];t=a[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===_?s:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return _||(e=b[n]=b[n]||e,y[e]=t),this},overrideMimeType:function(e){return _||(h.mimeType=e),this},statusCode:function(e){var t;if(e)if(_<2)for(t in e)v[t]=[v[t],e[t]];else C.always(e[C.status]);return this},abort:function(e){var t=e||w;return o&&o.abort(t),i(0,t),this}};if(m.promise(C).complete=g.add,C.success=C.done,C.error=C.fail,h.url=((t||h.url||vt.href)+"").replace(_t,"").replace(St,vt.protocol+"//"),h.type=n.method||n.type||h.method||h.type,h.dataTypes=re.trim(h.dataType||"*").toLowerCase().match(we)||[""],null==h.crossDomain){c=K.createElement("a");try{c.href=h.url,c.href=c.href,h.crossDomain=At.protocol+"//"+At.host!=c.protocol+"//"+c.host}catch(e){h.crossDomain=!0}}if(h.data&&h.processData&&"string"!=typeof h.data&&(h.data=re.param(h.data,h.traditional)),j(Et,h,n,C),2===_)return C;for(u in(d=re.event&&h.global)&&0===re.active++&&re.event.trigger("ajaxStart"),h.type=h.type.toUpperCase(),h.hasContent=!xt.test(h.type),r=h.url,h.hasContent||(h.data&&(r=h.url+=(bt.test(r)?"&":"?")+h.data,delete h.data),!1===h.cache&&(h.url=wt.test(r)?r.replace(wt,"$1_="+yt++):r+(bt.test(r)?"&":"?")+"_="+yt++)),h.ifModified&&(re.lastModified[r]&&C.setRequestHeader("If-Modified-Since",re.lastModified[r]),re.etag[r]&&C.setRequestHeader("If-None-Match",re.etag[r])),(h.data&&h.hasContent&&!1!==h.contentType||n.contentType)&&C.setRequestHeader("Content-Type",h.contentType),C.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+("*"!==h.dataTypes[0]?", "+Tt+"; q=0.01":""):h.accepts["*"]),h.headers)C.setRequestHeader(u,h.headers[u]);if(h.beforeSend&&(!1===h.beforeSend.call(p,C,h)||2===_))return C.abort();for(u in w="abort",{success:1,error:1,complete:1})C[u](h[u]);if(o=j(Dt,h,n,C)){if(C.readyState=1,d&&f.trigger("ajaxSend",[C,h]),2===_)return C;h.async&&h.timeout>0&&(l=e.setTimeout(function(){C.abort("timeout")},h.timeout));try{_=1,o.send(y,i)}catch(e){if(!(_<2))throw e;i(-1,e)}}else i(-1,"No Transport");return C},getJSON:function(e,t,n){return re.get(e,t,n,"json")},getScript:function(e,t){return re.get(e,void 0,t,"script")}}),re.each(["get","post"],function(e,t){re[t]=function(e,n,i,o){return re.isFunction(n)&&(o=o||i,i=n,n=void 0),re.ajax(re.extend({url:e,type:t,dataType:o,data:n,success:i},re.isPlainObject(e)&&e))}}),re._evalUrl=function(e){return re.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,throws:!0})},re.fn.extend({wrapAll:function(e){var t;return re.isFunction(e)?this.each(function(t){re(this).wrapAll(e.call(this,t))}):(this[0]&&(t=re(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this)},wrapInner:function(e){return re.isFunction(e)?this.each(function(t){re(this).wrapInner(e.call(this,t))}):this.each(function(){var t=re(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=re.isFunction(e);return this.each(function(n){re(this).wrapAll(t?e.call(this,n):e)})}
vendor: 9,547 bytes, line 5
5,unwrap:function(){return this.parent().each(function(){re.nodeName(this,"body")||re(this).replaceWith(this.childNodes)}).end()}}),re.expr.filters.hidden=function(e){return!re.expr.filters.visible(e)},re.expr.filters.visible=function(e){return e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0};var Mt=/%20/g,Rt=/\[\]$/,Nt=/\r?\n/g,It=/^(?:submit|button|image|reset|file)$/i,Pt=/^(?:input|select|textarea|keygen)/i;re.param=function(e,t){var n,i=[],o=function(e,t){t=re.isFunction(t)?t():null==t?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(void 0===t&&(t=re.ajaxSettings&&re.ajaxSettings.traditional),re.isArray(e)||e.jquery&&!re.isPlainObject(e))re.each(e,function(){o(this.name,this.value)});else for(n in e)V(n,e[n],t,o);return i.join("&").replace(Mt,"+")},re.fn.extend({serialize:function(){return re.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=re.prop(this,"elements");return e?re.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!re(this).is(":disabled")&&Pt.test(this.nodeName)&&!It.test(e)&&(this.checked||!Ne.test(e))}).map(function(e,t){var n=re(this).val();return null==n?null:re.isArray(n)?re.map(n,function(e){return{name:t.name,value:e.replace(Nt,"\r\n")}}):{name:t.name,value:n.replace(Nt,"\r\n")}}).get()}}),re.ajaxSettings.xhr=function(){try{return new e.XMLHttpRequest}catch(e){}};var Ot={0:200,1223:204},Lt=re.ajaxSettings.xhr();ie.cors=!!Lt&&"withCredentials"in Lt,ie.ajax=Lt=!!Lt,re.ajaxTransport(function(t){var n,i;if(ie.cors||Lt&&!t.crossDomain)return{send:function(o,r){var s,a=t.xhr();if(a.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(s in t.xhrFields)a[s]=t.xhrFields[s];for(s in t.mimeType&&a.overrideMimeType&&a.overrideMimeType(t.mimeType),t.crossDomain||o["X-Requested-With"]||(o["X-Requested-With"]="XMLHttpRequest"),o)a.setRequestHeader(s,o[s]);n=function(e){return function(){n&&(n=i=a.onload=a.onerror=a.onabort=a.onreadystatechange=null,"abort"===e?a.abort():"error"===e?"number"!=typeof a.status?r(0,"error"):r(a.status,a.statusText):r(Ot[a.status]||a.status,a.statusText,"text"!==(a.responseType||"text")||"string"!=typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=n(),i=a.onerror=n("error"),void 0!==a.onabort?a.onabort=i:a.onreadystatechange=function(){4===a.readyState&&e.setTimeout(function(){n&&i()})},n=n("abort");try{a.send(t.hasContent&&t.data||null)}catch(e){if(n)throw e}},abort:function(){n&&n()}}}),re.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return re.globalEval(e),e}}}),re.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),re.ajaxTransport("script",function(e){var t,n;if(e.crossDomain)return{send:function(i,o){t=re("<script>").prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&o("error"===e.type?404:200,e.type)}),K.head.appendChild(t[0])},abort:function(){n&&n()}}});var Bt=[],Ft=/(=)\?(?=&|$)|\?\?/;re.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Bt.pop()||re.expando+"_"+yt++;return this[e]=!0,e}}),re.ajaxPrefilter("json jsonp",function(t,n,i){var o,r,s,a=!1!==t.jsonp&&(Ft.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ft.test(t.data)&&"data");if(a||"jsonp"===t.dataTypes[0])return o=t.jsonpCallback=re.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,a?t[a]=t[a].replace(Ft,"$1"+o):!1!==t.jsonp&&(t.url+=(bt.test(t.url)?"&":"?")+t.jsonp+"="+o),t.converters["script json"]=function(){return s||re.error(o+" was not called"),s[0]},t.dataTypes[0]="json",r=e[o],e[o]=function(){s=arguments},i.always(function(){void 0===r?re(e).removeProp(o):e[o]=r,t[o]&&(t.jsonpCallback=n.jsonpCallback,Bt.push(o)),s&&re.isFunction(r)&&r(s[0]),s=r=void 0}),"script"}),re.parseHTML=function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||K;var i=fe.exec(e),o=!n&&[];return i?[t.createElement(i[1])]:(i=h([e],t,o),o&&o.length&&re(o).remove(),re.merge([],i.childNodes))};var Ht=re.fn.load;re.fn.load=function(e,t,n){if("string"!=typeof e&&Ht)return Ht.apply(this,arguments);var i,o,r,s=this,a=e.indexOf(" ");return a>-1&&(i=re.trim(e.slice(a)),e=e.slice(0,a)),re.isFunction(t)?(n=t,t=void 0):t&&"object"==typeof t&&(o="POST"),s.length>0&&re.ajax({url:e,type:o||"GET",dataType:"html",data:t}).done(function(e){r=arguments,s.html(i?re("<div>").append(re.parseHTML(e)).find(i):e)}).always(n&&function(e,t){s.each(function(){n.apply(this,r||[e.responseText,t,e])})}),this},re.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){re.fn[t]=function(e){return this.on(t,e)}}),re.expr.filters.animated=function(e){return re.grep(re.timers,function(t){return e===t.elem}).length},re.offset={setOffset:function(e,t,n){var i,o,r,s,a,l,c=re.css(e,"position"),d=re(e),u={};"static"===c&&(e.style.position="relative"),a=d.offset(),r=re.css(e,"top"),l=re.css(e,"left"),("absolute"===c||"fixed"===c)&&(r+l).indexOf("auto")>-1?(s=(i=d.position()).top,o=i.left):(s=parseFloat(r)||0,o=parseFloat(l)||0),re.isFunction(t)&&(t=t.call(e,n,re.extend({},a))),null!=t.top&&(u.top=t.top-a.top+s),null!=t.left&&(u.left=t.left-a.left+o),"using"in t?t.using.call(e,u):d.css(u)}},re.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){re.offset.setOffset(this,e,t)});var t,n,i=this[0],o={top:0,left:0},r=i&&i.ownerDocument;return r?(t=r.documentElement,re.contains(t,i)?(o=i.getBoundingClientRect(),n=Y(r),{top:o.top+n.pageYOffset-t.clientTop,left:o.left+n.pageXOffset-t.clientLeft}):o):void 0},position:function(){if(this[0]){var e,t,n=this[0],i={top:0,left:0};return"fixed"===re.css(n,"position")?t=n.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),re.nodeName(e[0],"html")||(i=e.offset()),i.top+=re.css(e[0],"borderTopWidth",!0),i.left+=re.css(e[0],"borderLeftWidth",!0)),{top:t.top-i.top-re.css(n,"marginTop",!0),left:t.left-i.left-re.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&"static"===re.css(e,"position");)e=e.offsetParent;return e||Je})}}),re.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n="pageYOffset"===t;re.fn[e]=function(i){return Ce(this,function(e,i,o){var r=Y(e);if(void 0===o)return r?r[t]:e[i];r?r.scrollTo(n?r.pageXOffset:o,n?o:r.pageYOffset):e[i]=o},e,i,arguments.length)}}),re.each(["top","left"],function(e,t){re.cssHooks[t]=D(ie.pixelPosition,function(e,n){if(n)return n=E(e,t),Xe.test(n)?re(e).position()[t]+"px":n})}),re.each({Height:"height",Width:"width"},function(e,t){re.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,i){re.fn[i]=function(i,o){var r=arguments.length&&(n||"boolean"!=typeof i),s=n||(!0===i||!0===o?"margin":"border");return Ce(this,function(t,n,i){var o;return re.isWindow(t)?t.document.documentElement["client"+e]:9===t.nodeType?(o=t.documentElement,Math.max(t.body["scroll"+e],o["scroll"+e],t.body["offset"+e],o["offset"+e],o["client"+e])):void 0===i?re.css(t,n,s):re.style(t,n,i,s)},t,r?i:void 0,r,null)}})}),re.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,i){return this.on(t,e,n,i)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},size:function(){return this.length}}),re.fn.andSelf=re.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return re});var $t=e.jQuery,zt=e.$;return re.noConflict=function(t){return e.$===re&&(e.$=zt),t&&e.jQuery===re&&(e.jQuery=$t),re},t||(e.jQuery=e.$=re),re}),function(){"use strict";var e=function(e,t){var n;e.rails!==t&&e.error("jquery-ujs has already been loaded!");var i=e(document);e.rails=n={linkClickSelector:"a[data-confirm], a[data-method], a[data-remote]:not([disabled]), a[data-disable-with], a[data-disable]",buttonClickSelector:"button[data-remote]:not([form]):not(form button), button[data-confirm]:not([form]):not(form button)",inputChangeSelector:"select[data-remote], input[data-remote], textarea[data-remote]",formSubmitSelector:"form:not([data-turbo=true])",formInputClickSelector:"form:not([data-turbo=true]) input[type=submit], form:not([data-turbo=true]) input[type=image], form:not([data-turbo=true]) button[type=submit], form:not([data-turbo=true]) button:not([type]), input[type=submit][form], input[type=image][form], button[type=submit][form], button[form]:not([type])",disableSelector:"input[data-disable-with]:enabled, button[data-disable-with]:enabled, textarea[data-disable-with]:enabled, input[data-disable]:enabled, button[data-disable]:enabled, textarea[data-disable]:enabled",enableSelector:"input[data-disable-with]:disabled, button[data-disable-with]:disabled, textarea[data-disable-with]:disabled, input[data-disable]:disabled, button[data-disable]:disabled, textarea[data-disable]:disabled",requiredInputSelector:"input[name][required]:not([disabled]), textarea[name][required]:not([disabled])",fileInputSelector:"input[name][type=file]:not([disabled])",linkDisableSelector:"a[data-disable-with], a[data-disable]",buttonDisableSelector:"button[data-remote][data-disable-with], button[data-remote][data-disable]",csrfToken:function(){return e("meta[name=csrf-token]").attr("content")}
5,csrfParam:function(){return e("meta[name=csrf-param]").attr("content")},CSRFProtection:function(e){var t=n.csrfToken();t&&e.setRequestHeader("X-CSRF-Token",t)},refreshCSRFTokens:function(){e('form input[name="'+n.csrfParam()+'"]').val(n.csrfToken())},fire:function(t,n,i){var o=e.Event(n);return t.trigger(o,i),!1!==o.result},confirm:function(e){return confirm(e)},ajax:function(t){return e.ajax(t)},href:function(e){return e[0].href},isRemote:function(e){return e.data("remote")!==t&&!1!==e.data("remote")},handleRemote:function(i){var o,r,s,a,l,c;if(n.fire(i,"ajax:before")){if(a=i.data("with-credentials")||null,l=i.data("type")||e.ajaxSettings&&e.ajaxSettings.dataType,i.is("form")){o=i.data("ujs:submit-button-formmethod")||i.attr("method"),r=i.data("ujs:submit-button-formaction")||i.attr("action"),s=e(i[0]).serializeArray();var d=i.data("ujs:submit-button");d&&(s.push(d),i.data("ujs:submit-button",null)),i.data("ujs:submit-button-formmethod",null),i.data("ujs:submit-button-formaction",null)}else i.is(n.inputChangeSelector)?(o=i.data("method"),r=i.data("url"),s=i.serialize(),i.data("params")&&(s=s+"&"+i.data("params"))):i.is(n.buttonClickSelector)?(o=i.data("method")||"get",r=i.data("url"),s=i.serialize(),i.data("params")&&(s=s+"&"+i.data("params"))):(o=i.data("method"),r=n.href(i),s=i.data("params")||null);return c={type:o||"GET",data:s,dataType:l,beforeSend:function(e,o){if(o.dataType===t&&e.setRequestHeader("accept","*/*;q=0.5, "+o.accepts.script),!n.fire(i,"ajax:beforeSend",[e,o]))return!1;i.trigger("ajax:send",e)},success:function(e,t,n){i.trigger("ajax:success",[e,t,n])},complete:function(e,t){i.trigger("ajax:complete",[e,t])},error:function(e,t,n){i.trigger("ajax:error",[e,t,n])},crossDomain:n.isCrossDomain(r)},a&&(c.xhrFields={withCredentials:a}),r&&(c.url=r),n.ajax(c)}return!1},isCrossDomain:function(e){var t=document.createElement("a");t.href=location.href;var n=document.createElement("a");try{return n.href=e,n.href=n.href,!((!n.protocol||":"===n.protocol)&&!n.host||t.protocol+"//"+t.host==n.protocol+"//"+n.host)}catch(e){return!0}},handleMethod:function(i){var o=n.href(i),r=i.data("method"),s=i.attr("target"),a=n.csrfToken(),l=n.csrfParam(),c=e('<form method="post" action="'+o+'"></form>'),d='<input name="_method" value="'+r+'" type="hidden" />';l===t||a===t||n.isCrossDomain(o)||(d+='<input name="'+l+'" value="'+a+'" type="hidden" />'),s&&c.attr("target",s),c.hide().append(d).appendTo("body"),c.submit()},formElements:function(t,n){return t.is("form")?e(t[0].elements).filter(n):t.find(n)},disableFormElements:function(t){n.formElements(t,n.disableSelector).each(function(){n.disableFormElement(e(this))})},disableFormElement:function(e){var n,i;n=e.is("button")?"html":"val",(i=e.data("disable-with"))!==t&&(e.data("ujs:enable-with",e[n]()),e[n](i)),e.prop("disabled",!0),e.data("ujs:disabled",!0)},enableFormElements:function(t){n.formElements(t,n.enableSelector).each(function(){n.enableFormElement(e(this))})},enableFormElement:function(e){var n=e.is("button")?"html":"val";e.data("ujs:enable-with")!==t&&(e[n](e.data("ujs:enable-with")),e.removeData("ujs:enable-with")),e.prop("disabled",!1),e.removeData("ujs:disabled")},allowAction:function(e){var t,i=e.data("confirm"),o=!1;if(!i)return!0;if(n.fire(e,"confirm")){try{o=n.confirm(i)}catch(e){(console.error||console.log).call(console,e.stack||e)}t=n.fire(e,"confirm:complete",[o])}return o&&t},blankInputs:function(t,n,i){var o,r,s,a=e(),l=n||"input,textarea",c=t.find(l),d={};return c.each(function(){(o=e(this)).is("input[type=radio]")?(s=o.attr("name"),d[s]||(0===t.find('input[type=radio]:checked[name="'+s+'"]').length&&(r=t.find('input[type=radio][name="'+s+'"]'),a=a.add(r)),d[s]=s)):(o.is("input[type=checkbox],input[type=radio]")?o.is(":checked"):!!o.val())===i&&(a=a.add(o))}),!!a.length&&a},nonBlankInputs:function(e,t){return n.blankInputs(e,t,!0)},stopEverything:function(t){return e(t.target).trigger("ujs:everythingStopped"),t.stopImmediatePropagation(),!1},disableElement:function(e){var i=e.data("disable-with");i!==t&&(e.data("ujs:enable-with",e.html()),e.html(i)),e.on("click.railsDisable",function(e){return n.stopEverything(e)}),e.data("ujs:disabled",!0)},enableElement:function(e){e.data("ujs:enable-with")!==t&&(e.html(e.data("ujs:enable-with")),e.removeData("ujs:enable-with")),e.off("click.railsDisable"),e.removeData("ujs:disabled")}},n.fire(i,"rails:attachBindings")&&(e.ajaxPrefilter(function(e,t,i){e.crossDomain||n.CSRFProtection(i)}),e(window).on("pageshow.rails",function(){e(e.rails.enableSelector).each(function(){var t=e(this);t.data("ujs:disabled")&&e.rails.enableFormElement(t)}),e(e.rails.linkDisableSelector).each(function(){var t=e(this);t.data("ujs:disabled")&&e.rails.enableElement(t)})}),i.on("ajax:complete",n.linkDisableSelector,function(){n.enableElement(e(this))}),i.on("ajax:complete",n.buttonDisableSelector,function(){n.enableFormElement(e(this))}),i.on("click.rails",n.linkClickSelector,function(t){var i=e(this),o=i.data("method"),r=i.data("params"),s=t.metaKey||t.ctrlKey;if(!n.allowAction(i))return n.stopEverything(t);if(!s&&i.is(n.linkDisableSelector)&&n.disableElement(i),n.isRemote(i)){if
5(s&&(!o||"GET"===o)&&!r)return!0;var a=n.handleRemote(i);return!1===a?n.enableElement(i):a.fail(function(){n.enableElement(i)}),!1}return o?(n.handleMethod(i),!1):void 0}),i.on("click.rails",n.buttonClickSelector,function(t){var i=e(this);if(!n.allowAction(i)||!n.isRemote(i))return n.stopEverything(t);i.is(n.buttonDisableSelector)&&n.disableFormElement(i);var o=n.handleRemote(i);return!1===o?n.enableFormElement(i):o.fail(function(){n.enableFormElement(i)}),!1}),i.on("change.rails",n.inputChangeSelector,function(t){var i=e(this);return n.allowAction(i)&&n.isRemote(i)?(n.handleRemote(i),!1):n.stopEverything(t)}),i.on("submit.rails",n.formSubmitSelector,function(i){var o,r,s=e(this),a=n.isRemote(s);if(!n.allowAction(s))return n.stopEverything(i);if(s.attr("novalidate")===t)if(s.data("ujs:formnovalidate-button")===t){if((o=n.blankInputs(s,n.requiredInputSelector,!1))&&n.fire(s,"ajax:aborted:required",[o]))return n.stopEverything(i)}else s.data("ujs:formnovalidate-button",t);if(a){if(r=n.nonBlankInputs(s,n.fileInputSelector)){setTimeout(function(){n.disableFormElements(s)},13);var l=n.fire(s,"ajax:aborted:file",[r]);return l||setTimeout(function(){n.enableFormElements(s)},13),l}return n.handleRemote(s),!1}setTimeout(function(){n.disableFormElements(s)},13)}),i.on("click.rails",n.formInputClickSelector,function(t){var i=e(this);if(!n.allowAction(i))return n.stopEverything(t);var o=i.attr("name"),r=o?{name:o,value:i.val()}:null,s=i.closest("form");0===s.length&&(s=e("#"+i.attr("form"))),s.data("ujs:submit-button",r),s.data("ujs:formnovalidate-button",i.attr("formnovalidate")),s.data("ujs:submit-button-formaction",i.attr("formaction")),s.data("ujs:submit-button-formmethod",i.attr("formmethod"))}),i.on("ajax:send.rails",n.formSubmitSelector,function(t){this===t.target&&n.disableFormElements(e(this))}),i.on("ajax:complete.rails",n.formSubmitSelector,function(t){this===t.target&&n.enableFormElements(e(this))}),e(function(){n.refreshCSRFTokens()}))};window.jQuery?e(jQuery):"object"==typeof exports&&"object"==typeof module&&(module.exports=e)}(),function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):e(jQuery)}(function(e){"use strict";return e.ui=e.ui||{},e.ui.version="1.14.1"}),function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","./version"],e):e(jQuery)}(function(e){"use strict";return e.extend(e.expr.pseudos,{data:e.expr.createPseudo(function(t){return function(n){return!!e.data(n,t)}})})}),function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","./version"],e):e(jQuery)}(function(e){"use strict";return e.fn.extend({disableSelection:(t="onselectstart"in document.createElement("div")?"selectstart":"mousedown",function(){return this.on(t+".ui-disableSelection",function(e){e.preventDefault()})}),enableSelection:function(){return this.off(".ui-disableSelection")}});var t}),function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","./version"],e):e(jQuery)}(function(){"use strict"}),function(e,t){"use strict"
6;"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof exports?module.exports=t(require("jquery")):t(e.jQuery)}(this,function(e,t){"use strict";function n(e){return null==e?e+"":"object"==typeof e?l[c.call(e)]||"object":typeof e}function i(e,t,n){var i=f[t.type]||{};return null==e?n||!t.def?null:t.def:(e=i.floor?~~e:parseFloat(e),i.mod?(e+i.mod)%i.mod:Math.min(i.max,Math.max(0,e)))}function o(t){var n=h(),i=n._rgba=[];return t=t.toLowerCase(),m(u,function(e,o){var r,s=o.re.exec(t),a=s&&o.parse(s),l=o.space||"rgba";if(a)return r=n[l](a),n[p[l].cache]=r[p[l].cache],i=n._rgba=r._rgba,!1}),i.length?("0,0,0,0"===i.join()&&e.extend(i,s.transparent),n):s[t]}function r(e,t,n){return 6*(n=(n+1)%1)<1?e+(t-e)*n*6:2*n<1?t:3*n<2?e+(t-e)*(2/3-n)*6:e}var s,a="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",l={},c=l.toString,d=/^([\-+])=\s*(\d+\.?\d*)/,u=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(e){return[e[1],e[2],e[3],e[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(e){return[2.55*e[1],2.55*e[2],2.55*e[3],e[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})?/,parse:function(e){return[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16),e[4]?(parseInt(e[4],16)/255).toFixed(2):1]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])([a-f0-9])?/,parse:function(e){return[parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16),e[4]?(parseInt(e[4]+e[4],16)/255).toFixed(2):1]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(e){return[e[1],e[2]/100,e[3]/100,e[4]]}}],h=e.Color=function(t,n,i,o){return new e.Color.fn.parse(t,n,i,o)},p={rgba:{props:{red:{idx:0,type:"byte"}
6,green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},f={byte:{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},m=e.each;m(p,function(e,t){t.cache="_"+e,t.props.alpha={idx:3,type:"percent",def:1}}),e.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){l["[object "+t+"]"]=t.toLowerCase()}),h.fn=e.extend(h.prototype,{parse:function(r,a,l,c){if(r===t)return this._rgba=[null,null,null,null],this;(r.jquery||r.nodeType)&&(r=e(r).css(a),a=t);var d=this,u=n(r),f=this._rgba=[];return a!==t&&(r=[r,a,l,c],u="array"),"string"===u?this.parse(o(r)||s._default):"array"===u?(m(p.rgba.props,function(e,t){f[t.idx]=i(r[t.idx],t)}),this):"object"===u?(m(p,r instanceof h?function(e,t){r[t.cache]&&(d[t.cache]=r[t.cache].slice())}:function(t,n){var o=n.cache;m(n.props,function(e,t){if(!d[o]&&n.to){if("alpha"===e||null==r[e])return;d[o]=n.to(d._rgba)}d[o][t.idx]=i(r[e],t,!0)}),d[o]&&e.inArray(null,d[o].slice(0,3))<0&&(null==d[o][3]&&(d[o][3]=1),n.from&&(d._rgba=n.from(d[o])))}),this):void 0},is:function(e){var t=h(e),n=!0,i=this;return m(p,function(e,o){var r,s=t[o.cache];return s&&(r=i[o.cache]||o.to&&o.to(i._rgba)||[],m(o.props,function(e,t){if(null!=s[t.idx])return n=s[t.idx]===r[t.idx]})),n}),n},_space:function(){var e=[],t=this;return m(p,function(n,i){t[i.cache]&&e.push(n)}),e.pop()},transition:function(e,t){var n=h(e),o=n._space(),r=p[o],s=0===this.alpha()?h("transparent"):this,a=s[r.cache]||r.to(s._rgba),l=a.slice();return n=n[r.cache],m(r.props,function(e,o){var r=o.idx,s=a[r],c=n[r],d=f[o.type]||{};null!==c&&(null===s?l[r]=c:(d.mod&&(c-s>d.mod/2?s+=d.mod:s-c>d.mod/2&&(s-=d.mod)),l[r]=i((c-s)*t+s,o)))}),this[o](l)},blend:function(t){if(1===this._rgba[3])return this;var n=this._rgba.slice(),i=n.pop(),o=h(t)._rgba;return h(e.map(n,function(e,t){return(1-i)*o[t]+i*e}))},toRgbaString:function(){var t="rgba(",n=e.map(this._rgba,function(e,t){return null!=e?e:t>2?1:0});return 1===n[3]&&(n.pop(),t="rgb("),t+n.join(", ")+")"},toHslaString:function(){var t="hsla(",n=e.map(this.hsla(),function(e,t){return null==e&&(e=t>2?1:0),t&&t<3&&(e=Math.round(100*e)+"%"),e});return 1===n[3]&&(n.pop(),t="hsl("),t+n.join(", ")+")"},toHexString:function(t){var n=this._rgba.slice(),i=n.pop();return t&&n.push(~~(255*i)),"#"+e.map(n,function(e){return("0"+(e||0).toString(16)).substr(-2)}).join("")},toString:function(){return this.toRgbaString()}}),h.fn.parse.prototype=h.fn,p.hsla.to=function(e){if(null==e[0]||null==e[1]||null==e[2])return[null,null,null,e[3]];var t,n,i=e[0]/255,o=e[1]/255,r=e[2]/255,s=e[3],a=Math.max(i,o,r),l=Math.min(i,o,r),c=a-l,d=a+l,u=.5*d;return t=l===a?0:i===a?60*(o-r)/c+360:o===a?60*(r-i)/c+120:60*(i-o)/c+240,n=0===c?0:u<=.5?c/d:c/(2-d),[Math.round(t)%360,n,u,null==s?1:s]},p.hsla.from=function(e){if(null==e[0]||null==e[1]||null==e[2])return[null,null,null,e[3]];var t=e[0]/360,n=e[1],i=e[2],o=e[3],s=i<=.5?i*(1+n):i+n-i*n,a=2*i-s;return[Math.round(255*r(a,s,t+1/3)),Math.round(255*r(a,s,t)),Math.round(255*r(a,s,t-1/3)),o]},m(p,function(e,o){var r=o.props,s=o.cache,a=o.to,l=o.from;h.fn[e]=function(e){if(a&&!this[s]&&(this[s]=a(this._rgba)),e===t)return this[s].slice();var o,c=n(e),d="array"===c||"object"===c?e:arguments,u=this[s].slice();return m(r,function(e,t){var n=d["object"===c?e:t.idx];null==n&&(n=u[t.idx]),u[t.idx]=i(n,t)}),l?((o=h(l(u)))[s]=u,o):h(u)},m(r,function(t,i){h.fn[t]||(h.fn[t]=function(o){var r,s,a,l,c=n(o);return s=(r=this[l="alpha"===t?this._hsla?"hsla":"rgba":e]())[i.idx],"undefined"===c?s:("function"===c&&(c=n(o=o.call(this,s))),null==o&&i.empty?this:("string"===c&&(a=d.exec(o))&&(o=s+parseFloat(a[2])*("+"===a[1]?1:-1)),r[i.idx]=o,this[l](r)))})})}),h.hook=function(t){var i=t.split(" ");m(i,function(t,i){e.cssHooks[i]={set:function(e,t){var r;"transparent"===t||"string"===n(t)&&!(r=o(t))||(t=(t=h(r||t)).toRgbaString()),e.style[i]=t}},e.fx.step[i]=function(t){t.colorInit||(t.start=h(t.elem,i),t.end=h(t.end),t.colorInit=!0),e.cssHooks[i].set(t.elem,t.start.transition(t.end,t.pos))}})},h.hook(a),e.cssHooks.borderColor={expand:function(e){var t={};return m(["Top","Right","Bottom","Left"],function(n,i){t["border"+i+"Color"]=e}),t}},s=e.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}),function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","./jquery-var-for-color","./vendor/jquery-color/jquery.color","./version"],e):e(jQuery)}(function(e){"use strict";var t,n="ui-effects-",i="ui-effects-style",o="ui-effects-animated";return e.effects={effect:{}},function(){function t(e){return e.replace(/-([\da-z])/gi,function(e,t){return t.toUpperCase()})}function n(e){var n,i,o=e.ownerDocument.defaultView.getComputedStyle(e),r={};for(i=o.length;i--;
vendor: 4,369 bytes, line 6
6)"string"==typeof o[n=o[i]]&&(r[t(n)]=o[n]);return r}function i(t,n){var i,o,r={};for(i in n)o=n[i],t[i]!==o&&(s[i]||!e.fx.step[i]&&isNaN(parseFloat(o))||(r[i]=o));return r}var o,r=["add","remove","toggle"],s={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};e.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(t,n){e.fx.step[n]=function(e){("none"!==e.end&&!e.setAttr||1===e.pos&&!e.setAttr)&&(jQuery.style(e.elem,n,e.end),e.setAttr=!0)}}),e.effects.animateClass=function(t,o,s,a){var l=e.speed(o,s,a);return this.queue(function(){var o,s=e(this),a=s.attr("class")||"",c=l.children?s.find("*").addBack():s;c=c.map(function(){return{el:e(this),start:n(this)}}),(o=function(){e.each(r,function(e,n){t[n]&&s[n+"Class"](t[n])})})(),c=c.map(function(){return this.end=n(this.el[0]),this.diff=i(this.start,this.end),this}),s.attr("class",a),c=c.map(function(){var t=this,n=e.Deferred(),i=e.extend({},l,{queue:!1,complete:function(){n.resolve(t)}});return this.el.animate(this.diff,i),n.promise()}),e.when.apply(e,c.get()).done(function(){o(),e.each(arguments,function(){var t=this.el;e.each(this.diff,function(e){t.css(e,"")})}),l.complete.call(s[0])})})},e.fn.extend({addClass:(o=e.fn.addClass,function(t,n,i,r){return n?e.effects.animateClass.call(this,{add:t},n,i,r):o.apply(this,arguments)}),removeClass:function(t){return function(n,i,o,r){return arguments.length>1?e.effects.animateClass.call(this,{remove:n},i,o,r):t.apply(this,arguments)}}(e.fn.removeClass),toggleClass:function(t){return function(n,i,o,r,s){return"boolean"==typeof i||void 0===i?o?e.effects.animateClass.call(this,i?{add:n}:{remove:n},o,r,s):t.apply(this,arguments):e.effects.animateClass.call(this,{toggle:n},i,o,r)}}(e.fn.toggleClass),switchClass:function(t,n,i,o,r){return e.effects.animateClass.call(this,{add:n,remove:t},i,o,r)}})}(),function(){function t(t,n,i,o){return e.isPlainObject(t)&&(n=t,t=t.effect),t={effect:t},null==n&&(n={}),"function"==typeof n&&(o=n,i=null,n={}),("number"==typeof n||e.fx.speeds[n])&&(o=i,i=n,n={}),"function"==typeof i&&(o=i,i=null),n&&e.extend(t,n),i=i||n.duration,t.duration=e.fx.off?0:"number"==typeof i?i:i in e.fx.speeds?e.fx.speeds[i]:e.fx.speeds._default,t.complete=o||n.complete,t}function r(t){return!(t&&"number"!=typeof t&&!e.fx.speeds[t])||("string"==typeof t&&!e.effects.effect[t]||("function"==typeof t||"object"==typeof t&&!t.effect))}function s(e,t){var n=t.outerWidth(),i=t.outerHeight(),o=/^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/.exec(e)||["",0,n,i,0];return{top:parseFloat(o[1])||0,right:"auto"===o[2]?n:parseFloat(o[2]),bottom:"auto"===o[3]?i:parseFloat(o[3]),left:parseFloat(o[4])||0}}var a;e.expr&&e.expr.pseudos&&e.expr.pseudos.animated&&(e.expr.pseudos.animated=(a=e.expr.pseudos.animated,function(t){return!!e(t).data(o)||a(t)})),!0===e.uiBackCompat&&e.extend(e.effects,{save:function(e,t){for(var i=0,o=t.length;i<o;i++)null!==t[i]&&e.data(n+t[i],e[0].style[t[i]])},restore:function(e,t){for(var i,o=0,r=t.length;o<r;o++)null!==t[o]&&(i=e.data(n+t[o]),e.css(t[o],i))},setMode:function(e,t){return"toggle"===t&&(t=e.is(":hidden")?"show":"hide"),t},createWrapper:function(t){if(t.parent().is(".ui-effects-wrapper"))return t.parent();var n={width:t.outerWidth(!0),height:t.outerHeight(!0),float:t.css("float")},i=e("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),o={width:t.width(),height:t.height()},r=document.activeElement;try{r.id}catch(e){r=document.body}return t.wrap(i),(t[0]===r||e.contains(t[0],r))&&e(r).trigger("focus"),i=t.parent(),"static"===t.css("position")?(i.css({position:"relative"}),t.css({position:"relative"})):(e.extend(n,{position:t.css("position"),zIndex:t.css("z-index")}),e.each(["top","left","bottom","right"],function(e,i){n[i]=t.css(i),isNaN(parseInt(n[i],10))&&(n[i]="auto")}),t.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),t.css(o),i.css(n).show()},removeWrapper:function(t){var n=document.activeElement;return t.parent().is(".ui-effects-wrapper")&&(t.parent().replaceWith(t),(t[0]===n||e.contains(t[0],n))&&e(n).trigger("focus")),t}}),e.extend(e.effects,{version:"1.14.1",define:function(t,n,i){return i||
vendor: 1,906 bytes, line 6
6(i=n,n="effect"),e.effects.effect[t]=i,e.effects.effect[t].mode=n,i},scaledDimensions:function(e,t,n){if(0===t)return{height:0,width:0,outerHeight:0,outerWidth:0};var i="horizontal"!==n?(t||100)/100:1,o="vertical"!==n?(t||100)/100:1;return{height:e.height()*o,width:e.width()*i,outerHeight:e.outerHeight()*o,outerWidth:e.outerWidth()*i}},clipToBox:function(e){return{width:e.clip.right-e.clip.left,height:e.clip.bottom-e.clip.top,left:e.clip.left,top:e.clip.top}},unshift:function(e,t,n){var i=e.queue();t>1&&i.splice.apply(i,[1,0].concat(i.splice(t,n))),e.dequeue()},saveStyle:function(e){e.data(i,e[0].style.cssText)},restoreStyle:function(e){e[0].style.cssText=e.data(i)||"",e.removeData(i)},mode:function(e,t){var n=e.is(":hidden");return"toggle"===t&&(t=n?"show":"hide"),(n?"hide"===t:"show"===t)&&(t="none"),t},getBaseline:function(e,t){var n,i;switch(e[0]){case"top":n=0;break;case"middle":n=.5;break;case"bottom":n=1;break;default:n=e[0]/t.height}switch(e[1]){case"left":i=0;break;case"center":i=.5;break;case"right":i=1;break;default:i=e[1]/t.width}return{x:i,y:n}},createPlaceholder:function(t){var i,o=t.css("position"),r=t.position();return t.css({marginTop:t.css("marginTop"),marginBottom:t.css("marginBottom"),marginLeft:t.css("marginLeft"),marginRight:t.css("marginRight")}).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()),/^(static|relative)/.test(o)&&(o="absolute",i=e("<"+t[0].nodeName+">").insertAfter(t).css({display:/^(inline|ruby)/.test(t.css("display"))?"inline-block":"block",visibility:"hidden",marginTop:t.css("marginTop"),marginBottom:t.css("marginBottom"),marginLeft:t.css("marginLeft"),marginRight:t.css("marginRight"),float:t.css("float")}).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()).addClass("ui-effects-placeholder"),t.data(n+"placeholder",i)),t.css({position:o,left:r.left,top:r.top}),i},removePlaceholder:function(e){var t=n+"placeholder",i=e.data(t);
6i&&(i.remove(),e.removeData(t))},cleanUp:function(t){e.effects.restoreStyle(t),e.effects.removePlaceholder(t)},setTransition:function(t,n,i,o){return o=o||{},e.each(n,function(e,n){var r=t.cssUnit(n);r[0]>0&&(o[n]=r[0]*i+r[1])}),o}}),e.fn.extend({effect:function(){function n(t){function n(){l.removeData(o),e.effects.cleanUp(l),"hide"===i.mode&&l.hide(),a()}function a(){"function"==typeof c&&c.call(l[0]),"function"==typeof t&&t()}var l=e(this);i.mode=u.shift(),!0!==e.uiBackCompat||s?"none"===i.mode?(l[d](),a()):r.call(l[0],i,n):(l.is(":hidden")?"hide"===d:"show"===d)?(l[d](),a()):r.call(l[0],i,a)}var i=t.apply(this,arguments),r=e.effects.effect[i.effect],s=r.mode,a=i.queue,l=a||"fx",c=i.complete,d=i.mode,u=[],h=function(t){var n=e(this),i=e.effects.mode(n,d)||s;n.data(o,!0),u.push(i),s&&("show"===i||i===s&&"hide"===i)&&n.show(),s&&"none"===i||e.effects.saveStyle(n),"function"==typeof t&&t()};return e.fx.off||!r?d?this[d](i.duration,c):this.each(function(){c&&c.call(this)}):!1===a?this.each(h).each(n):this.queue(l,h).queue(l,n)},show:function(e){return function(n){if(r(n))return e.apply(this,arguments);var i=t.apply(this,arguments);return i.mode="show",this.effect.call(this,i)}}(e.fn.show),hide:function(e){return function(n){if(r(n))return e.apply(this,arguments);var i=t.apply(this,arguments);return i.mode="hide",this.effect.call(this,i)}}(e.fn.hide),toggle:function(e){return function(n){if(r(n)||"boolean"==typeof n)return e.apply(this,arguments);var i=t.apply(this,arguments);return i.mode="toggle",this.effect.call(this,i)}}(e.fn.toggle),cssUnit:function(t){var n=this.css(t),i=[];return e.each(["em","px","%","pt"],function(e,t){n.indexOf(t)>0&&(i=[parseFloat(n),t])}),i},cssClip:function(e){return e?this.css("clip","rect("+e.top+"px "+e.right+"px "+e.bottom+"px "+e.left+"px)"):s(this.css("clip"),this)},transfer:function(t,n){var i=e(this),o=e(t.to),r="fixed"===o.css("position"),s=e("body"),a=r?s.scrollTop():0,l=r?s.scrollLeft():0,c=o.offset(),d={top:c.top-a,left:c.left-l,height:o.innerHeight(),width:o.innerWidth()},u=i.offset(),h=e("<div class='ui-effects-transfer'></div>");h.appendTo("body").addClass(t.className).css({top:u.top-a,left:u.left-l,height:i.innerHeight(),width:i.innerWidth(),position:r?"fixed":"absolute"}).animate(d,t.duration,t.easing,function(){h.remove(),"function"==typeof n&&n()})}}),e.fx.step.clip=function(t){t.clipInit||(t.start=e(t.elem).cssClip(),"string"==typeof t.end&&(t.end=s(t.end,t.elem)),t.clipInit=!0),e(t.elem).cssClip({top:t.pos*(t.end.top-t.start.top)+t.start.top,right:t.pos*(t.end.right-t.start.right)+t.start.right,bottom:t.pos*(t.end.bottom-t.start.bottom)+t.start.bottom,left:t.pos*(t.end.left-t.start.left)+t.start.left})}}(),t={},e.each(["Quad","Cubic","Quart","Quint","Expo"],function(e,n){t[n]=function(t){return Math.pow(t,e+2)}}),e.extend(t,{Sine:function(e){return 1-Math.cos(e*Math.PI/2)},Circ:function(e){return 1-Math.sqrt(1-e*e)},Elastic:function(e){return 0===e||1===e?e:-Math.pow(2,8*(e-1))*Math.sin((80*(e-1)-7.5)*Math.PI/15)},Back:function(e){return e*e*(3*e-2)},Bounce:function(e){for(var t,n=4;e<((t=Math.pow(2,--n))-1)/11;);return 1/Math.pow(4,3-n)-7.5625*Math.pow((3*t-2)/22-e,2)}}),e.each(t,function(t,n){e.easing["easeIn"+t]=n,e.easing["easeOut"+t]=function(e){return 1-n(1-e)},e.easing["easeInOut"+t]=function(e){return e<.5?n(2*e)/2:1-n(-2*e+2)/2}}),e.effects}),function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","./version"],e):e(jQuery)}(function(e){"use strict";return e.ui.focusable=function(t,n){var i,o,r,s,a,l=t.nodeName.toLowerCase();return"area"===l?(o=(i=t.parentNode).name,!(!t.href||!o||"map"!==i.nodeName.toLowerCase())&&((r=e("img[usemap='#"+o+"']")).length>0&&r.is(":visible"))):(/^(input|select|textarea|button|object)$/.test(l)?(s=!t.disabled)&&(a=e(t).closest("fieldset")[0])&&(s=!a.disabled):s="a"===l&&t.href||n,s&&e(t).is(":visible")&&"visible"===e(t).css("visibility"))},e.extend(e.expr.pseudos,{focusable:function(t){return e.ui.focusable(t,null!=e.attr(t,"tabindex"))}}),e.ui.focusable}),function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","./version"],e):e(jQuery)}(function(e){"use strict";return e.ui.formResetMixin={_formResetHandler:function(){var t=e(this);setTimeout(function(){var n=t.data("ui-form-reset-instances");e.each(n,function(){this.refresh()})})},_bindFormResetHandler:function(){if(this.form=e(this.element.prop("form")),this.form.length){var t=this.form.data("ui-form-reset-instances")||[];t.length||this.form.on("reset.ui-form-reset",this._formResetHandler),t.push(this),this.form.data("ui-form-reset-instances",t)}},_unbindFormResetHandler:function(){if(this.form.length){var t=this.form.data("ui-form-reset-instances");t.splice(e.inArray(this,t),1),t.length?this.form.data("ui-form-reset-instances",t):this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset")}}}}),function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","./version"],e):e(jQuery)}(function(e){"use strict";e.escapeSelector||(e.escapeSelector=function(e){return CSS.escape(e+"")}),e.fn.even&&e.fn.odd||e.fn.extend({even:function(){return this.filter(function(e){return e%2==0}
vendor: 9,838 bytes, line 6
6)},odd:function(){return this.filter(function(e){return e%2==1})}})}),function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","./version"],e):e(jQuery)}(function(e){"use strict";return e.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","./version"],e):e(jQuery)}(function(e){"use strict";return e.fn.labels=function(){var e,t,n,i,o;return this.length?this[0].labels&&this[0].labels.length?this.pushStack(this[0].labels):(i=this.eq(0).parents("label"),(n=this.attr("id"))&&(o=(e=this.eq(0).parents().last()).add(e.length?e.siblings():this.siblings()),t="label[for='"+CSS.escape(n)+"']",i=i.add(o.find(t).addBack(t))),this.pushStack(i)):this.pushStack([])}}),function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","./version"],e):e(jQuery)}(function(e){"use strict";return e.ui.plugin={add:function(t,n,i){var o,r=e.ui[t].prototype;for(o in i)r.plugins[o]=r.plugins[o]||[],r.plugins[o].push([n,i[o]])},call:function(e,t,n,i){var o,r=e.plugins[t];if(r&&(i||e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType))for(o=0;o<r.length;o++)e.options[r[o][0]]&&r[o][1].apply(e.element,n)}}}),function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","./version"],e):e(jQuery)}(function(e){"use strict";return function(){function t(e,t,n){return[parseFloat(e[0])*(h.test(e[0])?t/100:1),parseFloat(e[1])*(h.test(e[1])?n/100:1)]}function n(t,n){return parseInt(e.css(t,n),10)||0}function i(e){return null!=e&&e===e.window}function o(e){var t=e[0];return 9===t.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:i(t)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:t.preventDefault?{width:0,height:0,offset:{top:t.pageY,left:t.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}var r,s=Math.max,a=Math.abs,l=/left|center|right/,c=/top|center|bottom/,d=/[\+\-]\d+(\.[\d]+)?%?/,u=/^\w+/,h=/%$/,p=e.fn.position;e.position={scrollbarWidth:function(){if(void 0!==r)return r;var t,n,i=e("<div style='display:block;position:absolute;width:200px;height:200px;overflow:hidden;'><div style='height:300px;width:auto;'></div></div>"),o=i.children()[0];return e("body").append(i),t=o.offsetWidth,i.css("overflow","scroll"),t===(n=o.offsetWidth)&&(n=i[0].clientWidth),i.remove(),r=t-n},getScrollInfo:function(t){var n=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),i=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),o="scroll"===n||"auto"===n&&t.width<t.element[0].scrollWidth;return{width:"scroll"===i||"auto"===i&&t.height<t.element[0].scrollHeight?e.position.scrollbarWidth():0,height:o?e.position.scrollbarWidth():0}},getWithinInfo:function(t){var n=e(t||window),o=i(n[0]),r=!!n[0]&&9===n[0].nodeType;return{element:n,isWindow:o,isDocument:r,offset:!o&&!r?e(t).offset():{left:0,top:0},scrollLeft:n.scrollLeft(),scrollTop:n.scrollTop(),width:n.outerWidth(),height:n.outerHeight()}}},e.fn.position=function(i){if(!i||!i.of)return p.apply(this,arguments);var r,h,f,m,g,v,y="string"==typeof(i=e.extend({},i)).of?e(document).find(i.of):e(i.of),b=e.position.getWithinInfo(i.within),_=e.position.getScrollInfo(b),w=(i.collision||"flip").split(" "),C={};return v=o(y),y[0].preventDefault&&(i.at="left top"),h=v.width,f=v.height,m=v.offset,g=e.extend({},m),e.each(["my","at"],function(){var e,t,n=(i[this]||"").split(" ");1===n.length&&(n=l.test(n[0])?n.concat(["center"]):c.test(n[0])?["center"].concat(n):["center","center"]),n[0]=l.test(n[0])?n[0]:"center",n[1]=c.test(n[1])?n[1]:"center",e=d.exec(n[0]),t=d.exec(n[1]),C[this]=[e?e[0]:0,t?t[0]:0],i[this]=[u.exec(n[0])[0],u.exec(n[1])[0]]}),1===w.length&&(w[1]=w[0]),"right"===i.at[0]?g.left+=h:"center"===i.at[0]&&(g.left+=h/2),"bottom"===i.at[1]?g.top+=f:"center"===i.at[1]&&(g.top+=f/2),r=t(C.at,h,f),g.left+=r[0],g.top+=r[1],this.each(function(){var o,l,c=e(this),d=c.outerWidth(),u=c.outerHeight(),p=n(this,"marginLeft"),v=n(this,"marginTop"),k=d+p+n(this,"marginRight")+_.width,x=u+v+n(this,"marginBottom")+_.height,S=e.extend({},g),E=t(C.my,c.outerWidth(),c.outerHeight());"right"===i.my[0]?S.left-=d:"center"===i.my[0]&&(S.left-=d/2),"bottom"===i.my[1]?S.top-=u:"center"===i.my[1]&&(S.top-=u/2),S.left+=E[0],S.top+=E[1],o={marginLeft:p,marginTop:v},e.each(["left","top"],function(t,n){e.ui.position[w[t]]&&e.ui.position[w[t]][n](S,{targetWidth:h,targetHeight:f,elemWidth:d,elemHeight:u,collisionPosition:o,collisionWidth:k,collisionHeight:x,offset:[r[0]+E[0],r[1]+E[1]],my:i.my,at:i.at,within:b,elem:c})}),i.using&&(l=function(e){var t=m.left-S.left,n=t+h-d,o=m.top-S.top,r=o+f-u,l={target:{element:y,left:m.left,top:m.top,width:h,height:f},element:{element:c,left:S.left,top:S.top,width:d,height:u},horizontal:n<0?"left":t>0?"right":"center",vertical:r<0?"top":o>0?"bottom":"middle"};h<d&&a(t+n)<h&&(l.horizontal="center"),f<u&&a(o+r)<f&&(l.vertical="middle"),s(a(t),a(n))>s(a(o),a(r))?l.important="horizontal":l.important="vertical",i.using.call(this,e,l)}),c.offset(e.extend(S,{using:l}))})},e.ui.position={fit:{left:function(e,t){var n,i=t.within,o=i.isWindow?i.scrollLeft:i.offset.left,r=i.width,a=e.left-t.collisionPosition.marginLeft,l=o-a,c=a+t.collisionWidth-r-o;t.collisionWidth>r?l>0&&c<=0?(n=e.left+l+t.collisionWidth-r-o,e.left+=l-n):e.left=c>0&&l<=0?o:l>c?o+r-t.collisionWidth:o:l>0?e.left+=l:c>0?e.left-=c:e.left=s(e.left-a,e.left)},top:function(e,t){var n,i=t.within,o=i.isWindow?i.scrollTop:i.offset.top,r=t.within.height,a=e.top-t.collisionPosition.marginTop,l=o-a,c=a+t.collisionHeight-r-o;t.collisionHeight>r?l>0&&c<=0?(n=e.top+l+t.collisionHeight-r-o,e.top+=l-n):e.top=c>0&&l<=0?o:l>c?o+r-t.collisionHeight:o:l>0?e.top+=l:c>0?e.top-=c:e.top=s(e.top-a,e.top)}},flip:{left:function(e,t){var n,i,o=t.within,r=o.offset.left+o.scrollLeft,s=o.width,l=o.isWindow?o.scrollLeft:o.offset.left,c=e.left-t.collisionPosition.marginLeft,d=c-l,u=c+t.collisionWidth-s-l,h="left"===t.my[0]?-t.elemWidth:"right"===t.my[0]?t.elemWidth:0,p="left"===t.at[0]?t.targetWidth:"right"===t.at[0]?-t.targetWidth:0,f=-2*t.offset[0];d<0?((n=e.left+h+p+f+t.collisionWidth-s-r)<0||n<a(d))&&(e.left+=h+p+f):u>0&&((i=e.left-t.collisionPosition.marginLeft+h+p+f-l)>0||a(i)<u)&&(e.left+=h+p+f)},top:function(e,t){var n,i,o=t.within,r=o.offset.top+o.scrollTop,s=o.height,l=o.isWindow?o.scrollTop:o.offset.top,c=e.top-t.collisionPosition.marginTop,d=c-l,u=c+t.collisionHeight-s-l,h="top"===t.my[1]?-t.elemHeight:"bottom"===t.my[1]?t.elemHeight:0,p="top"===t.at[1]?t.targetHeight:"bottom"===t.at[1]?-t.targetHeight:0,f=-2*t.offset[1];d<0?((i=e.top+h+p+f+t.collisionHeight-s-r)<0||i<a(d))&&(e.top+=h+p+f):u>0&&((n=e.top-t.collisionPosition.marginTop+h+p+f-l)>0||a(n)<u)&&(e.top+=h+p+f)}},flipfit:{left:function(){e.ui.position.flip.left.apply(this,arguments),e.ui.position.fit.left.apply(this,arguments)},top:function(){e.ui.position.flip.top.apply(this,arguments),e.ui.position.fit.top.apply(this,arguments)}}}}(),e.ui.position}),function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","./version"],e):e(jQuery)}(function(e){"use strict";return e.fn.scrollParent=function(t){var n=this.css("position"),i="absolute"===n,o=t?/(auto|scroll|hidden)/:/(auto|scroll)/,r=this.parents().filter(function(){var t=e(this);return(!i||"static"!==t.css("position"))&&o.test(t.css("overflow")+t.css("overflow-y")+t.css("overflow-x"))}).eq(0);return"fixed"!==n&&r.length?r:e(this[0].ownerDocument||document)}}),function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","./version","./focusable"],e):e(jQuery)}(function(e){"use strict";return e.extend(e.expr.pseudos,{tabbable:function(t){var n=e.attr(t,"tabindex"),i=null!=n;return(!i||n>=0)&&e.ui.focusable(t,i)}})}),function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","./version"],e):e(jQuery)}(function(e){"use strict";return e.fn.extend({uniqueId:(t=0,function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++t)})}),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&e(this).removeAttr("id")})}});var t}),function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","./version"],e):e(jQuery)}(function(e){"use strict";var t,n=0,i=Array.prototype.hasOwnProperty,o=Array.prototype.slice;return e.cleanData=(t=e.cleanData,function(n){var i,o,r;for(r=0;null!=(o=n[r]);r++)(i=e._data(o,"events"))&&i.remove&&e(o).triggerHandler("remove");t(n)}),e.widget=function(t,n,i){var o,r,s,a={},l=t.split(".")[0];if("__proto__"===(t=t.split(".")[1])||"constructor"===t)return e.error("Invalid widget name: "+t);var c=l+"-"+t;return i||(i=n,n=e.Widget),Array.isArray(i)&&(i=e.extend.apply(null,[{}].concat(i))),e.expr.pseudos[c.toLowerCase()]=function(t){return!!e.data(t,c)},e[l]=e[l]||{},o=e[l][t],r=e[l][t]=function(e,t){if(!this||!this._createWidget)return new r(e,t);arguments.length&&this._createWidget(e,t)},e.extend(r,o,{version:i.version,_proto:e.extend({},i),_childConstructors:[]}),(s=new n).options=e.widget.extend({},s.options),e.each(i,function(e,t){a[e]="function"==typeof t?function(){function i(){return n.prototype[e].apply(this,arguments)}function o(t){return n.prototype[e].apply(this,t)}return function(){var e,n=this._super,r=this._superApply;return this._super=i,this._superApply=o,e=t.apply(this,arguments),this._super=n,this._superApply=r,e}}():t}),r.prototype=e.widget.extend(s,{widgetEventPrefix:o&&s.widgetEventPrefix||t},a,{constructor:r,namespace:l,widgetName:t,widgetFullName:c}),o?(e.each(o._childConstructors,function(t,n){var i=n.prototype;e.widget(i.namespace+"."+i.widgetName,r,n._proto)}),delete o._childConstructors):n._childConstructors.push(r),e.widget.bridge(t,r),r}
vendor: 8,276 bytes, lines 6-7
6,e.widget.extend=function(t){for(var n,r,s=o.call(arguments,1),a=0,l=s.length;a<l;a++)for(n in s[a])r=s[a][n],i.call(s[a],n)&&void 0!==r&&(e.isPlainObject(r)?t[n]=e.isPlainObject(t[n])?e.widget.extend({},t[n],r):e.widget.extend({},r):t[n]=r);return t},e.widget.bridge=function(t,n){var i=n.prototype.widgetFullName||t;e.fn[t]=function(r){var s="string"==typeof r,a=o.call(arguments,1),l=this;return s?this.length||"instance"!==r?this.each(function(){var n,o=e.data(this,i);return"instance"===r?(l=o,!1):o?"function"!=typeof o[r]||"_"===r.charAt(0)?e.error("no such method '"+r+"' for "+t+" widget instance"):(n=o[r].apply(o,a))!==o&&void 0!==n?(l=n&&n.jquery?l.pushStack(n.get()):n,!1):void 0:e.error("cannot call methods on "+t+" prior to initialization; attempted to call method '"+r+"'")}):l=void 0:(a.length&&(r=e.widget.extend.apply(null,[r].concat(a))),this.each(function(){var t=e.data(this,i);t?(t.option(r||{}),t._init&&t._init()):e.data(this,i,new n(r,this))})),l}},e.Widget=function(){},e.Widget._childConstructors=[],e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(t,i){i=e(i||this.defaultElement||this)[0],this.element=e(i),this.uuid=n++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=e(),this.hoverable=e(),this.focusable=e(),this.classesElementLookup={},i!==this&&(e.data(i,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===i&&this.destroy()}}),this.document=e(i.style?i.ownerDocument:i.document||i),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this.options=e.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){var t=this;this._destroy(),e.each(this.classesElementLookup,function(e,n){t._removeClass(n,e)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:e.noop,widget:function(){return this.element},option:function(t,n){var i,o,r,s=t;if(0===arguments.length)return e.widget.extend({},this.options);if("string"==typeof t)if(s={},i=t.split("."),t=i.shift(),i.length){for(o=s[t]=e.widget.extend({},this.options[t]),r=0;r<i.length-1;r++)o[i[r]]=o[i[r]]||{},o=o[i[r]];if(t=i.pop(),1===arguments.length)return void 0===o[t]?null:o[t];o[t]=n}else{if(1===arguments.length)return void 0===this.options[t]?null:this.options[t];s[t]=n}return this._setOptions(s),this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){return"classes"===e&&this._setOptionClasses(t),this.options[e]=t,"disabled"===e&&this._setOptionDisabled(t),this},_setOptionClasses:function(t){var n,i,o;for(n in t)o=this.classesElementLookup[n],t[n]!==this.options.classes[n]&&o&&o.length&&(i=e(o.get()),this._removeClass(o,n),i.addClass(this._classes({element:i,keys:n,classes:t,add:!0})))},_setOptionDisabled:function(e){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!e),e&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(t){function n(){var n=[];t.element.each(function(t,i){e.map(r.classesElementLookup,function(e){return e}).some(function(e){return e.is(i)})||n.push(i)}),r._on(e(n),{remove:"_untrackClassesElement"})}function i(i,s){var a,l;for(l=0;l<i.length;l++)a=r.classesElementLookup[i[l]]||e(),t.add?(n(),a=e(e.uniqueSort(a.get().concat(t.element.get())))):a=e(a.not(t.element).get()),r.classesElementLookup[i[l]]=a,o.push(i[l]),s&&t.classes[i[l]]&&o.push(t.classes[i[l]])}var o=[],r=this;return(t=e.extend({element:this.element,classes:this.options.classes||{}},t)).keys&&i(t.keys.match(/\S+/g)||[],!0),t.extra&&i(t.extra.match(/\S+/g)||[]),o.join(" ")},_untrackClassesElement:function(t){var n=this;e.each(n.classesElementLookup,function(i,o){-1!==e.inArray(t.target,o)&&(n.classesElementLookup[i]=e(o.not(t.target).get()))}),this._off(e(t.target))},
7_removeClass:function(e,t,n){return this._toggleClass(e,t,n,!1)},_addClass:function(e,t,n){return this._toggleClass(e,t,n,!0)},_toggleClass:function(e,t,n,i){i="boolean"==typeof i?i:n;var o="string"==typeof e||null===e,r={extra:o?t:n,keys:o?e:t,element:o?this.element:e,add:i};return r.element.toggleClass(this._classes(r),i),this},_on:function(t,n,i){var o,r=this;"boolean"!=typeof t&&(i=n,n=t,t=!1),i?(n=o=e(n),this.bindings=this.bindings.add(n)):(i=n,n=this.element,o=this.widget()),e.each(i,function(i,s){function a(){if(t||!0!==r.options.disabled&&!e(this).hasClass("ui-state-disabled"))return("string"==typeof s?r[s]:s).apply(r,arguments)}"string"!=typeof s&&(a.guid=s.guid=s.guid||a.guid||e.guid++);var l=i.match(/^([\w:-]*)\s*(.*)$/),c=l[1]+r.eventNamespace,d=l[2];d?o.on(c,d,a):n.on(c,a)})},_off:function(t,n){n=(n||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.off(n),this.bindings=e(this.bindings.not(t).get()),this.focusable=e(this.focusable.not(t).get()),this.hoverable=e(this.hoverable.not(t).get())},_delay:function(e,t){function n(){return("string"==typeof e?i[e]:e).apply(i,arguments)}var i=this;return setTimeout(n,t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){this._addClass(e(t.currentTarget),null,"ui-state-hover")},mouseleave:function(t){this._removeClass(e(t.currentTarget),null,"ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){this._addClass(e(t.currentTarget),null,"ui-state-focus")},focusout:function(t){this._removeClass(e(t.currentTarget),null,"ui-state-focus")}})},_trigger:function(t,n,i){var o,r,s=this.options[t];if(i=i||{},(n=e.Event(n)).type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),n.target=this.element[0],r=n.originalEvent)for(o in r)o in n||(n[o]=r[o]);return this.element.trigger(n,i),!("function"==typeof s&&!1===s.apply(this.element[0],[n].concat(i))||n.isDefaultPrevented())}},e.each({show:"fadeIn",hide:"fadeOut"},function(t,n){e.Widget.prototype["_"+t]=function(i,o,r){var s;"string"==typeof o&&(o={effect:o});var a=o?!0===o||"number"==typeof o?n:o.effect||n:t;"number"==typeof(o=o||{})?o={duration:o}:!0===o&&(o={}),s=!e.isEmptyObject(o),o.complete=r,o.delay&&i.delay(o.delay),s&&e.effects&&e.effects.effect[a]?i[t](o):a!==t&&i[a]?i[a](o.duration,o.easing,r):i.queue(function(n){e(this)[t](),r&&r.call(i[0]),n()})}}),e.widget}),function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","../version","../effect"],e):e(jQuery)}(function(e){"use strict";return e.effects.define("blind","hide",function(t,n){var i={up:["bottom","top"],vertical:["bottom","top"],down:["top","bottom"],left:["right","left"],horizontal:["right","left"],right:["left","right"]},o=e(this),r=t.direction||"up",s=o.cssClip(),a={clip:e.extend({},s)},l=e.effects.createPlaceholder(o);a.clip[i[r][0]]=a.clip[i[r][1]],"show"===t.mode&&(o.cssClip(a.clip),l&&l.css(e.effects.clipToBox(a)),a.clip=s),l&&l.animate(e.effects.clipToBox(a),t.duration,t.easing),o.animate(a,{queue:!1,duration:t.duration,easing:t.easing,complete:n})})}),function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","../version","../effect"],e):e(jQuery)}(function(e){"use strict";return e.effects.define("bounce",function(t,n){var i,o,r,s=e(this),a=t.mode,l="hide"===a,c="show"===a,d=t.direction||"up",u=t.distance,h=t.times||5,p=2*h+(c||l?1:0),f=t.duration/p,m=t.easing,g="up"===d||"down"===d?"top":"left",v="up"===d||"left"===d,y=0,b=s.queue().length;for(e.effects.createPlaceholder(s),r=s.css(g),u||(u=s["top"===g?"outerHeight":"outerWidth"]()/3),c&&((o={opacity:1})[g]=r,s.css("opacity",0).css(g,v?2*-u:2*u).animate(o,f,m)),l&&(u/=Math.pow(2,h-1)),(o={})[g]=r;y<h;y++)(i={})[g]=(v?"-=":"+=")+u,s.animate(i,f,m).animate(o,f,m),u=l?2*u:u/2;l&&((i={opacity:0}
vendor: 4,490 bytes, line 7
7)[g]=(v?"-=":"+=")+u,s.animate(i,f,m)),s.queue(n),e.effects.unshift(s,b,p+1)})}),function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","../version","../effect"],e):e(jQuery)}(function(e){"use strict";return e.effects.define("clip","hide",function(t,n){var i,o={},r=e(this),s=t.direction||"vertical",a="both"===s,l=a||"horizontal"===s,c=a||"vertical"===s;i=r.cssClip(),o.clip={top:c?(i.bottom-i.top)/2:i.top,right:l?(i.right-i.left)/2:i.right,bottom:c?(i.bottom-i.top)/2:i.bottom,left:l?(i.right-i.left)/2:i.left},e.effects.createPlaceholder(r),"show"===t.mode&&(r.cssClip(o.clip),o.clip=i),r.animate(o,{queue:!1,duration:t.duration,easing:t.easing,complete:n})})}),function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","../version","../effect"],e):e(jQuery)}(function(e){"use strict";return e.effects.define("drop","hide",function(t,n){var i,o=e(this),r="show"===t.mode,s=t.direction||"left",a="up"===s||"down"===s?"top":"left",l="up"===s||"left"===s?"-=":"+=",c="+="===l?"-=":"+=",d={opacity:0};e.effects.createPlaceholder(o),i=t.distance||o["top"===a?"outerHeight":"outerWidth"](!0)/2,d[a]=l+i,r&&(o.css(d),d[a]=c+i,d.opacity=1),o.animate(d,{queue:!1,duration:t.duration,easing:t.easing,complete:n})})}),function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","../version","../effect"],e):e(jQuery)}(function(e){"use strict";return e.effects.define("explode","hide",function(t,n){function i(){y.push(this),y.length===u*h&&o()}function o(){p.css({visibility:"visible"}),e(y).remove(),n()}var r,s,a,l,c,d,u=t.pieces?Math.round(Math.sqrt(t.pieces)):3,h=u,p=e(this),f="show"===t.mode,m=p.show().css("visibility","hidden").offset(),g=Math.ceil(p.outerWidth()/h),v=Math.ceil(p.outerHeight()/u),y=[];for(r=0;r<u;r++)for(l=m.top+r*v,d=r-(u-1)/2,s=0;s<h;s++)a=m.left+s*g,c=s-(h-1)/2,p.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-s*g,top:-r*v}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:g,height:v,left:a+(f?c*g:0),top:l+(f?d*v:0),opacity:f?0:1}).animate({left:a+(f?0:c*g),top:l+(f?0:d*v),opacity:f?1:0},t.duration||500,t.easing,i)})}),function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","../version","../effect"],e):e(jQuery)}(function(e){"use strict";return e.effects.define("fade","toggle",function(t,n){var i="show"===t.mode;e(this).css("opacity",i?0:1).animate({opacity:i?1:0},{queue:!1,duration:t.duration,easing:t.easing,complete:n})})}),function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","../version","../effect"],e):e(jQuery)}(function(e){"use strict";return e.effects.define("fold","hide",function(t,n){var i=e(this),o=t.mode,r="show"===o,s="hide"===o,a=t.size||15,l=/([0-9]+)%/.exec(a),c=!!t.horizFirst?["right","bottom"]:["bottom","right"],d=t.duration/2,u=e.effects.createPlaceholder(i),h=i.cssClip(),p={clip:e.extend({},h)},f={clip:e.extend({},h)},m=[h[c[0]],h[c[1]]],g=i.queue().length;l&&(a=parseInt(l[1],10)/100*m[s?0:1]),p.clip[c[0]]=a,f.clip[c[0]]=a,f.clip[c[1]]=0,r&&(i.cssClip(f.clip),u&&u.css(e.effects.clipToBox(f)),f.clip=h),i.queue(function(n){u&&u.animate(e.effects.clipToBox(p),d,t.easing).animate(e.effects.clipToBox(f),d,t.easing),n()}).animate(p,d,t.easing).animate(f,d,t.easing).queue(n),e.effects.unshift(i,g,4)})}),function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","../version","../effect"],e):e(jQuery)}(function(e){"use strict";return e.effects.define("highlight","show",function(t,n){var i=e(this),o={backgroundColor:i.css("backgroundColor")};"hide"===t.mode&&(o.opacity=0),e.effects.saveStyle(i),i.css({backgroundImage:"none",backgroundColor:t.color||"#ffff99"}).animate(o,{queue:!1,duration:t.duration,easing:t.easing,complete:n})})}),function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","../version","../effect"],e):e(jQuery)}(function(e){"use strict";return e.effects.define("size",function(t,n){var i,o,r,s=e(this),a=["fontSize"],l=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],c=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],d=t.mode,u="effect"!==d,h=t.scale||"both",p=t.origin||["middle","center"],f=s.css("position"),m=s.position(),g=e.effects.scaledDimensions(s),v=t.from||g,y=t.to||e.effects.scaledDimensions(s,0);e.effects.createPlaceholder(s),"show"===d&&(r=v,v=y,y=r),o={from:{y:v.height/g.height,x:v.width/g.width}
vendor: 4,637 bytes, line 7
7,to:{y:y.height/g.height,x:y.width/g.width}},"box"!==h&&"both"!==h||(o.from.y!==o.to.y&&(v=e.effects.setTransition(s,l,o.from.y,v),y=e.effects.setTransition(s,l,o.to.y,y)),o.from.x!==o.to.x&&(v=e.effects.setTransition(s,c,o.from.x,v),y=e.effects.setTransition(s,c,o.to.x,y))),"content"!==h&&"both"!==h||o.from.y!==o.to.y&&(v=e.effects.setTransition(s,a,o.from.y,v),y=e.effects.setTransition(s,a,o.to.y,y)),p&&(i=e.effects.getBaseline(p,g),v.top=(g.outerHeight-v.outerHeight)*i.y+m.top,v.left=(g.outerWidth-v.outerWidth)*i.x+m.left,y.top=(g.outerHeight-y.outerHeight)*i.y+m.top,y.left=(g.outerWidth-y.outerWidth)*i.x+m.left),delete v.outerHeight,delete v.outerWidth,s.css(v),"content"!==h&&"both"!==h||(l=l.concat(["marginTop","marginBottom"]).concat(a),c=c.concat(["marginLeft","marginRight"]),s.find("*[width]").each(function(){var n=e(this),i=e.effects.scaledDimensions(n),r={height:i.height*o.from.y,width:i.width*o.from.x,outerHeight:i.outerHeight*o.from.y,outerWidth:i.outerWidth*o.from.x},s={height:i.height*o.to.y,width:i.width*o.to.x,outerHeight:i.height*o.to.y,outerWidth:i.width*o.to.x};o.from.y!==o.to.y&&(r=e.effects.setTransition(n,l,o.from.y,r),s=e.effects.setTransition(n,l,o.to.y,s)),o.from.x!==o.to.x&&(r=e.effects.setTransition(n,c,o.from.x,r),s=e.effects.setTransition(n,c,o.to.x,s)),u&&e.effects.saveStyle(n),n.css(r),n.animate(s,t.duration,t.easing,function(){u&&e.effects.restoreStyle(n)})})),s.animate(y,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){var t=s.offset();0===y.opacity&&s.css("opacity",v.opacity),u||(s.css("position","static"===f?"relative":f).offset(t),e.effects.saveStyle(s)),n()}})})}),function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","../version","../effect","./effect-size"],e):e(jQuery)}(function(e){"use strict";return e.effects.define("scale",function(t,n){var i=e(this),o=t.mode,r=parseInt(t.percent,10)||(0===parseInt(t.percent,10)||"effect"!==o?0:100),s=e.extend(!0,{from:e.effects.scaledDimensions(i),to:e.effects.scaledDimensions(i,r,t.direction||"both"),origin:t.origin||["middle","center"]},t);t.fade&&(s.from.opacity=1,s.to.opacity=0),e.effects.effect.size.call(this,s,n)})}),function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","../version","../effect","./effect-scale"],e):e(jQuery)}(function(e){"use strict";return e.effects.define("puff","hide",function(t,n){var i=e.extend(!0,{},t,{fade:!0,percent:parseInt(t.percent,10)||150});e.effects.effect.scale.call(this,i,n)})}),function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","../version","../effect"],e):e(jQuery)}(function(e){"use strict";return e.effects.define("pulsate","show",function(t,n){var i=e(this),o=t.mode,r="show"===o,s=r||"hide"===o,a=2*(t.times||5)+(s?1:0),l=t.duration/a,c=0,d=1,u=i.queue().length;for(!r&&i.is(":visible")||(i.css("opacity",0).show(),c=1);d<a;d++)i.animate({opacity:c},l,t.easing),c=1-c;i.animate({opacity:c},l,t.easing),i.queue(n),e.effects.unshift(i,u,a+1)})}),function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","../version","../effect"],e):e(jQuery)}(function(e){"use strict";return e.effects.define("shake",function(t,n){var i=1,o=e(this),r=t.direction||"left",s=t.distance||20,a=t.times||3,l=2*a+1,c=Math.round(t.duration/l),d="up"===r||"down"===r?"top":"left",u="up"===r||"left"===r,h={},p={},f={},m=o.queue().length;for(e.effects.createPlaceholder(o),h[d]=(u?"-=":"+=")+s,p[d]=(u?"+=":"-=")+2*s,f[d]=(u?"-=":"+=")+2*s,o.animate(h,c,t.easing);i<a;i++)o.animate(p,c,t.easing).animate(f,c,t.easing);o.animate(p,c,t.easing).animate(h,c/2,t.easing).queue(n),e.effects.unshift(o,m,l+1)})}),function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","../version","../effect"],e):e(jQuery)}(function(e){"use strict";return e.effects.define("slide","show",function(t,n){var i,o,r=e(this),s={up:["bottom","top"],down:["top","bottom"],left:["right","left"],right:["left","right"]},a=t.mode,l=t.direction||"left",c="up"===l||"down"===l?"top":"left",d="up"===l||"left"===l,u=t.distance||r["top"===c?"outerHeight":"outerWidth"](!0),h={};e.effects.createPlaceholder(r),i=r.cssClip(),o=r.position()[c],h[c]=(d?-1:1)*u+o,h.clip=r.cssClip(),h.clip[s[l][1]]=h.clip[s[l][0]],"show"===a&&(r.cssClip(h.clip),r.css(c,h[c]),h.clip=i,h[c]=o),r.animate(h,{queue:!1,duration:t.duration,easing:t.easing,complete:n})})}),function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","../version","../effect"],e):e(jQuery)}(function(e){"use strict";var t;return!0===e.uiBackCompat&&(t=e.effects.define("transfer",function(t,n){e(this).transfer(t,n)}
vendor: 8,124 bytes, line 7
7)),t}),function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","../version","../keycode","../unique-id","../widget"],e):e(jQuery)}(function(e){"use strict";return e.widget("ui.accordion",{version:"1.14.1",options:{active:0,animate:{},classes:{"ui-accordion-header":"ui-corner-top","ui-accordion-header-collapsed":"ui-corner-all","ui-accordion-content":"ui-corner-bottom"},collapsible:!1,event:"click",header:function(e){return e.find("> li > :first-child").add(e.find("> :not(li)").filter(function(e){return e%2==0}))},heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},hideProps:{borderTopWidth:"hide",borderBottomWidth:"hide",paddingTop:"hide",paddingBottom:"hide",height:"hide"},showProps:{borderTopWidth:"show",borderBottomWidth:"show",paddingTop:"show",paddingBottom:"show",height:"show"},_create:function(){var t=this.options;this.prevShow=this.prevHide=e(),this._addClass("ui-accordion","ui-widget ui-helper-reset"),this.element.attr("role","tablist"),t.collapsible||!1!==t.active&&null!=t.active||(t.active=0),this._processPanels(),t.active<0&&(t.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():e()}},_createIcons:function(){var t,n,i=this.options.icons;i&&(t=e("<span>"),this._addClass(t,"ui-accordion-header-icon","ui-icon "+i.header),t.prependTo(this.headers),n=this.active.children(".ui-accordion-header-icon"),this._removeClass(n,i.header)._addClass(n,null,i.activeHeader)._addClass(this.headers,"ui-accordion-icons"))},_destroyIcons:function(){this._removeClass(this.headers,"ui-accordion-icons"),this.headers.children(".ui-accordion-header-icon").remove()},_destroy:function(){var e;this.element.removeAttr("role"),this.headers.removeAttr("role aria-expanded aria-selected aria-controls tabIndex").removeUniqueId(),this._destroyIcons(),e=this.headers.next().css("display","").removeAttr("role aria-hidden aria-labelledby").removeUniqueId(),"content"!==this.options.heightStyle&&e.css("height","")},_setOption:function(e,t){"active"!==e?("event"===e&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(t)),this._super(e,t),"collapsible"!==e||t||!1!==this.options.active||this._activate(0),"icons"===e&&(this._destroyIcons(),t&&this._createIcons())):this._activate(t)},_setOptionDisabled:function(e){this._super(e),this.element.attr("aria-disabled",e),this._toggleClass(null,"ui-state-disabled",!!e)},_keydown:function(t){if(!t.altKey&&!t.ctrlKey){var n=e.ui.keyCode,i=this.headers.length,o=this.headers.index(t.target),r=!1;switch(t.keyCode){case n.RIGHT:case n.DOWN:r=this.headers[(o+1)%i];break;case n.LEFT:case n.UP:r=this.headers[(o-1+i)%i];break;case n.SPACE:case n.ENTER:this._eventHandler(t);break;case n.HOME:r=this.headers[0];break;case n.END:r=this.headers[i-1]}r&&(e(t.target).attr("tabIndex",-1),e(r).attr("tabIndex",0),e(r).trigger("focus"),t.preventDefault())}},_panelKeyDown:function(t){t.keyCode===e.ui.keyCode.UP&&t.ctrlKey&&e(t.currentTarget).prev().trigger("focus")},refresh:function(){var t=this.options;this._processPanels(),!1===t.active&&!0===t.collapsible||!this.headers.length?(t.active=!1,this.active=e()):!1===t.active?this._activate(0):this.active.length&&!e.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(t.active=!1,this.active=e()):this._activate(Math.max(0,t.active-1)):t.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){var e=this.headers,t=this.panels;"function"==typeof this.options.header?this.headers=this.options.header(this.element):this.headers=this.element.find(this.options.header),this._addClass(this.headers,"ui-accordion-header ui-accordion-header-collapsed","ui-state-default"),this.panels=this.headers.next().filter(":not(.ui-accordion-content-active)").hide(),this._addClass(this.panels,"ui-accordion-content","ui-helper-reset ui-widget-content"),t&&(this._off(e.not(this.headers)),this._off(t.not(this.panels)))},_refresh:function(){var t,n=this.options,i=n.heightStyle,o=this.element.parent();this.active=this._findActive(n.active),this._addClass(this.active,"ui-accordion-header-active","ui-state-active")._removeClass(this.active,"ui-accordion-header-collapsed"),this._addClass(this.active.next(),"ui-accordion-content-active"),this.active.next().show(),this.headers.attr("role","tab").each(function(){var t=e(this),n=t.uniqueId().attr("id"),i=t.next(),o=i.uniqueId().attr("id");t.attr("aria-controls",o),i.attr("aria-labelledby",n)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}).next().attr({"aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}).next().attr({"aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(n.event),"fill"===i?(t=o.height(),this.element.siblings(":visible").each(function(){var n=e(this),i=n.css("position");"absolute"!==i&&"fixed"!==i&&(t-=n.outerHeight(!0))}),this.headers.each(function(){t-=e(this).outerHeight(!0)}),this.headers.next().each(function(){e(this).height(Math.max(0,t-e(this).innerHeight()+e(this).height()))}).css("overflow","auto")):"auto"===i&&(t=0,this.headers.next().each(function(){var n=e(this).is(":visible");n||e(this).show(),t=Math.max(t,e(this).css("height","").height()),n||e(this).hide()}).height(t))},_activate:function(t){var n=this._findActive(t)[0];n!==this.active[0]&&(n=n||this.active[0],this._eventHandler({target:n,currentTarget:n,preventDefault:e.noop}))},_findActive:function(t){return"number"==typeof t?this.headers.eq(t):e()},_setupEvents:function(t){var n={keydown:"_keydown"};t&&e.each(t.split(" "),function(e,t){n[t]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,n),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(t){var n,i,o=this.options,r=this.active,s=e(t.currentTarget),a=s[0]===r[0],l=a&&o.collapsible,c=l?e():s.next(),d=r.next(),u={oldHeader:r,oldPanel:d,newHeader:l?e():s,newPanel:c};t.preventDefault(),a&&!o.collapsible||!1===this._trigger("beforeActivate",t,u)||(o.active=!l&&this.headers.index(s),this.active=a?e():s,this._toggle(u),this._removeClass(r,"ui-accordion-header-active","ui-state-active"),o.icons&&(n=r.children(".ui-accordion-header-icon"),this._removeClass(n,null,o.icons.activeHeader)._addClass(n,null,o.icons.header)),a||(this._removeClass(s,"ui-accordion-header-collapsed")._addClass(s,"ui-accordion-header-active","ui-state-active"),o.icons&&(i=s.children(".ui-accordion-header-icon"),this._removeClass(i,null,o.icons.header)._addClass(i,null,o.icons.activeHeader)),this._addClass(s.next(),"ui-accordion-content-active")))},_toggle:function(t){var n=t.newPanel,i=this.prevShow.length?this.prevShow:t.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=n,this.prevHide=i,this.options.animate?this._animate(n,i,t):(i.hide(),n.show(),this._toggleComplete(t)),i.attr({"aria-hidden":"true"}),i.prev().attr({"aria-selected":"false","aria-expanded":"false"}),n.length&&i.length?i.prev().attr({tabIndex:-1,"aria-expanded":"false"}):n.length&&this.headers.filter(function(){return 0===parseInt(e(this).attr("tabIndex"),10)}).attr("tabIndex",-1),n.attr("aria-hidden","false").prev().attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_animate:function(e,t,n){var i,o,r,s=this,a=0,l=e.css("box-sizing"),c=e.length&&(!t.length||e.index()<t.index()),d=this.options.animate||{},u=c&&d.down||d,h=function(){s._toggleComplete(n)};return"number"==typeof u&&(r=u),"string"==typeof u&&(o=u),o=o||u.easing||d.easing,r=r||u.duration||d.duration,t.length?e.length?(i=e.show().outerHeight(),t.animate(this.hideProps,{duration:r,easing:o,step:function(e,t){t.now=Math.round(e)}}),void e.hide().animate(this.showProps,{duration:r,easing:o,complete:h,step:function(e,n){
vendor: 7,906 bytes, line 7
7n.now=Math.round(e),"height"!==n.prop?"content-box"===l&&(a+=n.now):"content"!==s.options.heightStyle&&(n.now=Math.round(i-t.outerHeight()-a),a=0)}})):t.animate(this.hideProps,r,o,h):e.animate(this.showProps,r,o,h)},_toggleComplete:function(e){var t=e.oldPanel,n=t.prev();this._removeClass(t,"ui-accordion-content-active"),this._removeClass(n,"ui-accordion-header-active")._addClass(n,"ui-accordion-header-collapsed"),this._trigger("activate",null,e)}})}),function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","../keycode","../position","../unique-id","../version","../widget"],e):e(jQuery)}(function(e){"use strict";return e.widget("ui.menu",{version:"1.14.1",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-caret-1-e"},items:"> *",menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.lastMousePosition={x:null,y:null},this.element.uniqueId().attr({role:this.options.role,tabIndex:0}),this._addClass("ui-menu","ui-widget ui-widget-content"),this._on({"mousedown .ui-menu-item":function(e){e.preventDefault(),this._activateItem(e)},"click .ui-menu-item":function(t){var n=e(t.target),i=e(this.document[0].activeElement);!this.mouseHandled&&n.not(".ui-state-disabled").length&&(this.select(t),t.isPropagationStopped()||(this.mouseHandled=!0),n.has(".ui-menu").length?this.expand(t):!this.element.is(":focus")&&i.closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":"_activateItem","mousemove .ui-menu-item":"_activateItem",mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(e,t){var n=this.active||this._menuItems().first();t||this.focus(e,n)},blur:function(t){this._delay(function(){!e.contains(this.element[0],this.document[0].activeElement)&&this.collapseAll(t)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(e){this._closeOnDocumentClick(e)&&this.collapseAll(e,!0),this.mouseHandled=!1}})},_activateItem:function(t){if(!this.previousFilter&&(t.clientX!==this.lastMousePosition.x||t.clientY!==this.lastMousePosition.y)){this.lastMousePosition={x:t.clientX,y:t.clientY};var n=e(t.target).closest(".ui-menu-item"),i=e(t.currentTarget);n[0]===i[0]&&(i.is(".ui-state-active")||(this._removeClass(i.siblings().children(".ui-state-active"),null,"ui-state-active"),this.focus(t,i)))}},_destroy:function(){var t=this.element.find(".ui-menu-item").removeAttr("role aria-disabled").children(".ui-menu-item-wrapper").removeUniqueId().removeAttr("tabIndex role aria-haspopup");this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeAttr("role aria-labelledby aria-expanded aria-hidden aria-disabled tabIndex").removeUniqueId().show(),t.children().each(function(){var t=e(this);t.data("ui-menu-submenu-caret")&&t.remove()})},_keydown:function(t){var n,i,o,r,s=!0;switch(t.keyCode){case e.ui.keyCode.PAGE_UP:this.previousPage(t);break;case e.ui.keyCode.PAGE_DOWN:this.nextPage(t);break;case e.ui.keyCode.HOME:this._move("first","first",t);break;case e.ui.keyCode.END:this._move("last","last",t);break;case e.ui.keyCode.UP:this.previous(t);break;case e.ui.keyCode.DOWN:this.next(t);break;case e.ui.keyCode.LEFT:this.collapse(t);break;case e.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(t);break;case e.ui.keyCode.ENTER:case e.ui.keyCode.SPACE:this._activate(t);break;case e.ui.keyCode.ESCAPE:this.collapse(t);break;default:s=!1,i=this.previousFilter||"",r=!1,o=t.keyCode>=96&&t.keyCode<=105?(t.keyCode-96).toString():String.fromCharCode(t.keyCode),clearTimeout(this.filterTimer),o===i?r=!0:o=i+o,n=this._filterMenuItems(o),(n=r&&-1!==n.index(this.active.next())?this.active.nextAll(".ui-menu-item"):n).length||(o=String.fromCharCode(t.keyCode),n=this._filterMenuItems(o)),n.length?(this.focus(t,n),this.previousFilter=o,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}s&&t.preventDefault()},_activate:function(e){this.active&&!this.active.is(".ui-state-disabled")&&(this.active.children("[aria-haspopup='true']").length?this.expand(e):this.select(e))},refresh:function(){var t,n,i,o,r=this,s=this.options.icons.submenu,a=this.element.find(this.options.menus);this._toggleClass("ui-menu-icons",null,!!this.element.find(".ui-icon").length),n=a.filter(":not(.ui-menu)").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var t=e(this),n=t.prev(),i=e("<span>").data("ui-menu-submenu-caret",!0);r._addClass(i,"ui-menu-icon","ui-icon "+s),n.attr("aria-haspopup","true").prepend(i),t.attr("aria-labelledby",n.attr("id"))}),this._addClass(n,"ui-menu","ui-widget ui-widget-content ui-front"),(t=a.add(this.element).find(this.options.items)).not(".ui-menu-item").each(function(){var t=e(this);r._isDivider(t)&&r._addClass(t,"ui-menu-divider","ui-widget-content")}),o=(i=t.not(".ui-menu-item, .ui-menu-divider")).children().not(".ui-menu").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),this._addClass(i,"ui-menu-item")._addClass(o,"ui-menu-item-wrapper"),t.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!e.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(e,t){if("icons"===e){var n=this.element.find(".ui-menu-icon");this._removeClass(n,null,this.options.icons.submenu)._addClass(n,null,t.submenu)}this._super(e,t)},_setOptionDisabled:function(e){this._super(e),this.element.attr("aria-disabled",String(e)),this._toggleClass(null,"ui-state-disabled",!!e)},focus:function(e,t){var n,i,o;this.blur(e,e&&"focus"===e.type),this._scrollIntoView(t),this.active=t.first(),i=this.active.children(".ui-menu-item-wrapper"),this._addClass(i,null,"ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",i.attr("id")),o=this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper"),this._addClass(o,null,"ui-state-active"),e&&"keydown"===e.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),(n=t.children(".ui-menu")).length&&e&&/^mouse/.test(e.type)&&this._startOpening(n),this.activeMenu=t.parent(),this._trigger("focus",e,{item:t})},_scrollIntoView:function(t){var n,i,o,r,s,a;this._hasScroll()&&(n=parseFloat(e.css(this.activeMenu[0],"borderTopWidth"))||0,i=parseFloat(e.css(this.activeMenu[0],"paddingTop"))||0,o=t.offset().top-this.activeMenu.offset().top-n-i,r=this.activeMenu.scrollTop(),s=this.activeMenu.height(),a=t.outerHeight(),o<0?this.activeMenu.scrollTop(r+o):o+a>s&&this.activeMenu.scrollTop(r+o-s+a))},blur:function(e,t){t||clearTimeout(this.timer),this.active&&(this._removeClass(this.active.children(".ui-menu-item-wrapper"),null,"ui-state-active"),this._trigger("blur",e,{item:this.active}),this.active=null)},_startOpening:function(e){clearTimeout(this.timer),"true"===e.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(e)},this.delay))},_open:function(t){var n=e.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(t.parents(".ui-menu")).hide().attr("aria-hidden","true"),t.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(n)},collapseAll:function(t,n){clearTimeout(this.timer),this.timer=this._delay(function(){var i=n?this.element:e(t&&t.target).closest(this.element.find(".ui-menu"));i.length||(i=this.element),this._close(i),this.blur(t),this._removeClass(i.find(".ui-state-active"),null,"ui-state-active"),this.activeMenu=i},n?0:this.delay)},_close:function(e){e||(e=this.active?this.active.parent():this.element),e.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","fal
7se")},_closeOnDocumentClick:function(t){return!e(t.target).closest(".ui-menu").length},_isDivider:function(e){return!/[^\-\u2014\u2013\s]/.test(e.text())},collapse:function(e){var t=this.active&&this.active.parent().closest(".ui-menu-item",this.element);t&&t.length&&(this._close(),this.focus(e,t))},expand:function(e){var t=this.active&&this._menuItems(this.active.children(".ui-menu")).first();t&&t.length&&(this._open(t.parent()),this._delay(function(){this.focus(e,t)}))},next:function(e){this._move("next","first",e)},previous:function(e){this._move("prev","last",e)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_menuItems:function(e){return(e||this.element).find(this.options.items).filter(".ui-menu-item")},_move:function(e,t,n){var i;this.active&&(i="first"===e||"last"===e?this.active["first"===e?"prevAll":"nextAll"](".ui-menu-item").last():this.active[e+"All"](".ui-menu-item").first()),i&&i.length&&this.active||(i=this._menuItems(this.activeMenu)[t]()),this.focus(n,i)},nextPage:function(t){var n,i,o;this.active?this.isLastItem()||(this._hasScroll()?(i=this.active.offset().top,o=this.element.innerHeight(),0===e.fn.jquery.indexOf("3.2.")&&(o+=this.element[0].offsetHeight-this.element.outerHeight()),this.active.nextAll(".ui-menu-item").each(function(){return(n=e(this)).offset().top-i-o<0}),this.focus(t,n)):this.focus(t,this._menuItems(this.activeMenu)[this.active?"last":"first"]())):this.next(t)},previousPage:function(t){var n,i,o;this.active?this.isFirstItem()||(this._hasScroll()?(i=this.active.offset().top,o=this.element.innerHeight(),0===e.fn.jquery.indexOf("3.2.")&&(o+=this.element[0].offsetHeight-this.element.outerHeight()),this.active.prevAll(".ui-menu-item").each(function(){return(n=e(this)).offset().top-i+o>0}),this.focus(t,n)):this.focus(t,this._menuItems(this.activeMenu).first())):this.next(t)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(t){this.active=this.active||e(t.target).closest(".ui-menu-item");var n={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(t,!0),this._trigger("select",t,n)},_filterMenuItems:function(t){var n=t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"),i=new RegExp("^"+n,"i");return this.activeMenu.find(this.options.items).filter(".ui-menu-item").filter(function(){return i.test(String.prototype.trim.call(e(this).children(".ui-menu-item-wrapper").text()))})}})}),function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","./menu","../keycode","../position","../version","../widget"],e):e(jQuery)}(function(e){"use strict";return e.widget("ui.autocomplete",{version:"1.14.1",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,liveRegionTimer:null,_create:function(){var t,n,i,o=this.element[0].nodeName.toLowerCase(),r="textarea"===o,s="input"===o;this.isMultiLine=r||!s&&"true"===this.element.prop("contentEditable"),this.valueMethod=this.element[r||s?"val":"text"],this.isNewMenu=!0,this._addClass("ui-autocomplete-input"),this.element.attr("autocomplete","off"),this._on(this.element,{keydown:function(o){if(this.element.prop("readOnly"))return t=!0,i=!0,void(n=!0);t=!1,i=!1,n=!1;var r=e.ui.keyCode;switch(o.keyCode){case r.PAGE_UP:t=!0,this._move("previousPage",o);break;case r.PAGE_DOWN:t=!0,this._move("nextPage",o);break;case r.UP:t=!0,this._keyEvent("previous",o);break;case r.DOWN:t=!0,this._keyEvent("next",o);break
8;case r.ENTER:this.menu.active&&(t=!0,o.preventDefault(),this.menu.select(o));break;case r.TAB:this.menu.active&&this.menu.select(o);break;case r.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(o),o.preventDefault());break;default:n=!0,this._searchTimeout(o)}},keypress:function(i){if(t)return t=!1,void(this.isMultiLine&&!this.menu.element.is(":visible")||i.preventDefault());if(!n){var o=e.ui.keyCode;
vendor: 4,237 bytes, line 8
8switch(i.keyCode){case o.PAGE_UP:this._move("previousPage",i);break;case o.PAGE_DOWN:this._move("nextPage",i);break;case o.UP:this._keyEvent("previous",i);break;case o.DOWN:this._keyEvent("next",i)}}},input:function(e){if(i)return i=!1,void e.preventDefault();this._searchTimeout(e)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(e){clearTimeout(this.searching),this.close(e),this._change(e)}}),this._initSource(),this.menu=e("<ul>").appendTo(this._appendTo()).menu({role:null}).hide().menu("instance"),this._addClass(this.menu.element,"ui-autocomplete","ui-front"),this._on(this.menu.element,{mousedown:function(e){e.preventDefault()},menufocus:function(t,n){var i,o;if(this.isNewMenu&&(this.isNewMenu=!1,t.originalEvent&&/^mouse/.test(t.originalEvent.type)))return this.menu.blur(),void this.document.one("mousemove",function(){e(t.target).trigger(t.originalEvent)});o=n.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",t,{item:o})&&t.originalEvent&&/^key/.test(t.originalEvent.type)&&this._value(o.value),(i=n.item.attr("aria-label")||o.value)&&String.prototype.trim.call(i).length&&(clearTimeout(this.liveRegionTimer),this.liveRegionTimer=this._delay(function(){this.liveRegion.html(e("<div>").text(i))},100))},menuselect:function(e,t){var n=t.item.data("ui-autocomplete-item"),i=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.trigger("focus"),this.previous=i),!1!==this._trigger("select",e,{item:n})&&this._value(n.value),this.term=this._value(),this.close(e),this.selectedItem=n}}),this.liveRegion=e("<div>",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(e,t){this._super(e,t),"source"===e&&this._initSource(),"appendTo"===e&&this.menu.element.appendTo(this._appendTo()),"disabled"===e&&t&&this.xhr&&this.xhr.abort()},_isEventTargetInWidget:function(t){var n=this.menu.element[0];return t.target===this.element[0]||t.target===n||e.contains(n,t.target)},_closeOnClickOutside:function(e){this._isEventTargetInWidget(e)||this.close()},_appendTo:function(){var t=this.options.appendTo;return t&&(t=t.jquery||t.nodeType?e(t):this.document.find(t).eq(0)),t&&t[0]||(t=this.element.closest(".ui-front, dialog")),t.length||(t=this.document[0].body),t},_initSource:function(){var t,n,i=this;Array.isArray(this.options.source)?(t=this.options.source,this.source=function(n,i){i(e.ui.autocomplete.filter(t,n.term))}):"string"==typeof this.options.source?(n=this.options.source,this.source=function(t,o){i.xhr&&i.xhr.abort(),i.xhr=e.ajax({url:n,data:t,dataType:"json",success:function(e){o(e)},error:function(){o([])}})}):this.source=this.options.source},_searchTimeout:function(e){clearTimeout(this.searching),this.searching=this._delay(function(){var t=this.term===this._value(),n=this.menu.element.is(":visible"),i=e.altKey||e.ctrlKey||e.metaKey||e.shiftKey;t&&(!t||n||i)||(this.selectedItem=null,this.search(null,e))},this.options.delay)},search:function(e,t){return e=null!=e?e:this._value(),this.term=this._value(),e.length<this.options.minLength?this.close(t):!1!==this._trigger("search",t)?this._search(e):void 0},_search:function(e){this.pending++,this._addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:e},this._response())},_response:function(){var e=++this.requestIndex;return function(t){e===this.requestIndex&&this.__response(t),this.pending--,this.pending||this._removeClass("ui-autocomplete-loading")}.bind(this)},__response:function(e){e&&(e=this._normalize(e)),this._trigger("response",null,{content:e}),!this.options.disabled&&e&&e.length&&!this.cancelSearch?(this._suggest(e),this._trigger("open")):this._close()},close:function(e){this.cancelSearch=!0,this._close(e)},_close:function(e){this._off(this.document,"mousedown"),this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",e))}
vendor: 8,308 bytes, line 8
8,_change:function(e){this.previous!==this._value()&&this._trigger("change",e,{item:this.selectedItem})},_normalize:function(t){return t.length&&t[0].label&&t[0].value?t:e.map(t,function(t){return"string"==typeof t?{label:t,value:t}:e.extend({},t,{label:t.label||t.value,value:t.value||t.label})})},_suggest:function(t){var n=this.menu.element.empty();this._renderMenu(n,t),this.isNewMenu=!0,this.menu.refresh(),n.show(),this._resizeMenu(),n.position(e.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next(),this._on(this.document,{mousedown:"_closeOnClickOutside"})},_resizeMenu:function(){var e=this.menu.element;e.outerWidth(Math.max(e.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(t,n){var i=this;e.each(n,function(e,n){i._renderItemData(t,n)})},_renderItemData:function(e,t){return this._renderItem(e,t).data("ui-autocomplete-item",t)},_renderItem:function(t,n){return e("<li>").append(e("<div>").text(n.label)).appendTo(t)},_move:function(e,t){if(this.menu.element.is(":visible"))return this.menu.isFirstItem()&&/^previous/.test(e)||this.menu.isLastItem()&&/^next/.test(e)?(this.isMultiLine||this._value(this.term),void this.menu.blur()):void this.menu[e](t);this.search(null,t)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(e,t){this.isMultiLine&&!this.menu.element.is(":visible")||(this._move(e,t),t.preventDefault())}}),e.extend(e.ui.autocomplete,{escapeRegex:function(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(t,n){var i=new RegExp(e.ui.autocomplete.escapeRegex(n),"i");return e.grep(t,function(e){return i.test(e.label||e.value||e)})}}),e.widget("ui.autocomplete",e.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(e){return e+(e>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(t){var n;this._superApply(arguments),this.options.disabled||this.cancelSearch||(n=t&&t.length?this.options.messages.results(t.length):this.options.messages.noResults,clearTimeout(this.liveRegionTimer),this.liveRegionTimer=this._delay(function(){this.liveRegion.html(e("<div>").text(n))},100))}}),e.ui.autocomplete}),function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","../widget"],e):e(jQuery)}(function(e){"use strict";var t=/ui-corner-([a-z]){2,6}/g;return e.widget("ui.controlgroup",{version:"1.14.1",defaultElement:"<div>",options:{direction:"horizontal",disabled:null,onlyVisible:!0,items:{button:"input[type=button], input[type=submit], input[type=reset], button, a",controlgroupLabel:".ui-controlgroup-label",checkboxradio:"input[type='checkbox'], input[type='radio']",selectmenu:"select",spinner:".ui-spinner-input"}},_create:function(){this._enhance()},_enhance:function(){this.element.attr("role","toolbar"),this.refresh()},_destroy:function(){this._callChildMethod("destroy"),this.childWidgets.removeData("ui-controlgroup-data"),this.element.removeAttr("role"),this.options.items.controlgroupLabel&&this.element.find(this.options.items.controlgroupLabel).find(".ui-controlgroup-label-contents").contents().unwrap()},_initWidgets:function(){var t=this,n=[];e.each(this.options.items,function(i,o){var r,s={};if(o)return"controlgroupLabel"===i?((r=t.element.find(o)).each(function(){var t=e(this);t.children(".ui-controlgroup-label-contents").length||t.contents().wrapAll("<span class='ui-controlgroup-label-contents'></span>")}),t._addClass(r,null,"ui-widget ui-widget-content ui-state-default"),void(n=n.concat(r.get()))):void(e.fn[i]&&(s=t["_"+i+"Options"]?t["_"+i+"Options"]("middle"):{classes:{}},t.element.find(o).each(function(){var o=e(this),r=o[i]("instance"),a=e.widget.extend({},s);if("button"!==i||!o.parent(".ui-spinner").length){r||(r=o[i]()[i]("instance")),r&&(a.classes=t._resolveClassesValues(a.classes,r)),o[i](a);var l=o[i]("widget");e.data(l[0],"ui-controlgroup-data",r||o[i]("instance")),n.push(l[0])}})))}),this.childWidgets=e(e.uniqueSort(n)),this._addClass(this.childWidgets,"ui-controlgroup-item")},_callChildMethod:function(t){this.childWidgets.each(function(){var n=e(this).data("ui-controlgroup-data");n&&n[t]&&n[t]()})},_updateCornerClass:function(e,t){var n="ui-corner-top ui-corner-bottom ui-corner-left ui-corner-right ui-corner-all",i=this._buildSimpleOptions(t,"label").classes.label;this._removeClass(e,null,n),this._addClass(e,null,i)},_buildSimpleOptions:function(e,t){var n="vertical"===this.options.direction,i={classes:{}};return i.classes[t]={middle:"",first:"ui-corner-"+(n?"top":"left"),last:"ui-corner-"+(n?"bottom":"right"),only:"ui-corner-all"}[e],i},_spinnerOptions:function(e){var t=this._buildSimpleOptions(e,"ui-spinner");return t.classes["ui-spinner-up"]="",t.classes["ui-spinner-down"]="",t},_buttonOptions:function(e){return this._buildSimpleOptions(e,"ui-button")},_checkboxradioOptions:function(e){return this._buildSimpleOptions(e,"ui-checkboxradio-label")},_selectmenuOptions:function(e){var t="vertical"===this.options.direction;return{width:!!t&&"auto",classes:{middle:{"ui-selectmenu-button-open":"","ui-selectmenu-button-closed":""},first:{"ui-selectmenu-button-open":"ui-corner-"+(t?"top":"tl"),"ui-selectmenu-button-closed":"ui-corner-"+(t?"top":"left")},last:{"ui-selectmenu-button-open":t?"":"ui-corner-tr","ui-selectmenu-button-closed":"ui-corner-"+(t?"bottom":"right")},only:{"ui-selectmenu-button-open":"ui-corner-top","ui-selectmenu-button-closed":"ui-corner-all"}}[e]}},_resolveClassesValues:function(n,i){var o={};return e.each(n,function(e){var r=i.options.classes[e]||"";r=String.prototype.trim.call(r.replace(t,"")),o[e]=(r+" "+n[e]).replace(/\s+/g," ")}),o},_setOption:function(e,t){"direction"===e&&this._removeClass("ui-controlgroup-"+this.options.direction),this._super(e,t),"disabled"!==e?this.refresh():this._callChildMethod(t?"disable":"enable")},refresh:function(){var t,n=this;this._addClass("ui-controlgroup ui-controlgroup-"+this.options.direction),"horizontal"===this.options.direction&&this._addClass(null,"ui-helper-clearfix"),this._initWidgets(),t=this.childWidgets,this.options.onlyVisible&&(t=t.filter(":visible")),t.length&&(e.each(["first","last"],function(e,i){var o=t[i]().data("ui-controlgroup-data");if(o&&n["_"+o.widgetName+"Options"]){var r=n["_"+o.widgetName+"Options"](1===t.length?"only":i);r.classes=n._resolveClassesValues(r.classes,o),o.element[o.widgetName](r)}else n._updateCornerClass(t[i](),i)}),this._callChildMethod("refresh"))}})}),function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","../form-reset-mixin","../labels","../widget"],e):e(jQuery)}(function(e){"use strict";return e.widget("ui.checkboxradio",[e.ui.formResetMixin,{version:"1.14.1",options:{disabled:null,label:null,icon:!0,classes:{"ui-checkboxradio-label":"ui-corner-all","ui-checkboxradio-icon":"ui-corner-all"}},_getCreateOptions:function(){var t,n,i,o=this._super()||{};return this._readType(),n=this.element.labels(),this.label=e(n[n.length-1]),this.label.length||e.error("No label found for checkboxradio widget"),this.originalLabel="",(i=this.label.contents().not(this.element[0])).length&&(this.originalLabel+=i.clone().wrapAll("<div></div>").parent().html()),this.originalLabel&&(o.label=this.originalLabel),null!=(t=this.element[0].disabled)&&(o.disabled=t),o},_create:function(){var e=this.element[0].checked;this._bindFormResetHandler(),null==this.options.disabled&&(this.options.disabled=this.element[0].disabled),this._setOption("disabled",this.options.disabled),this._addClass("ui-checkboxradio","ui-helper-hidden-accessible"),this._addClass(this.label,"ui-checkboxradio-label","ui-button ui-widget"),"radio"===this.type&&this._addClass(this.label,"ui-checkboxradio-radio-label"),this.options.label&&this.options.label!==this.originalLabel?this._updateLabel():this.originalLabel&&(this.options.label=this.originalLabel),this._enhance(),e&&this._addClass(this.label,"ui-checkboxradio-checked","ui-state-active"),this._on({change:"_toggleClasses",focus:function(){this._addClass(this.label,null,"ui-state-focus ui-visual-focus")},blur:function(){this._removeClass(this.label,null,"ui-state-focus ui-visual-focus")}})},_readType:function(){var t=this.element[0].nodeName.toLowerCase();
vendor: 1,428 bytes, line 8
8this.type=this.element[0].type,"input"===t&&/radio|checkbox/.test(this.type)||e.error("Can't create checkboxradio on element.nodeName="+t+" and element.type="+this.type)},_enhance:function(){this._updateIcon(this.element[0].checked)},widget:function(){return this.label},_getRadioGroup:function(){var t=this.element[0].name,n="input[name='"+CSS.escape(t)+"']";return t?(this.form.length?e(this.form[0].elements).filter(n):e(n).filter(function(){return 0===e(e(this).prop("form")).length})).not(this.element):e([])},_toggleClasses:function(){var t=this.element[0].checked;this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",t),this.options.icon&&"checkbox"===this.type&&this._toggleClass(this.icon,null,"ui-icon-check ui-state-checked",t)._toggleClass(this.icon,null,"ui-icon-blank",!t),"radio"===this.type&&this._getRadioGroup().each(function(){var t=e(this).checkboxradio("instance");t&&t._removeClass(t.label,"ui-checkboxradio-checked","ui-state-active")})},_destroy:function(){this._unbindFormResetHandler(),this.icon&&(this.icon.remove(),this.iconSpace.remove())},_setOption:function(e,t){if("label"!==e||t){if(this._super(e,t),"disabled"===e)return this._toggleClass(this.label,null,"ui-state-disabled",t),void(this.element[0].disabled=t);this.refresh()}},_updateIcon:function(t){var n="ui-icon ui-icon-background ";this.options.icon?(this.icon||(this.icon=e("<span>"),this.iconSpace=e("<span> </span>
8"),this._addClass(this.iconSpace,"ui-checkboxradio-icon-space")),"checkbox"===this.type?(n+=t?"ui-icon-check ui-state-checked":"ui-icon-blank",this._removeClass(this.icon,null,t?"ui-icon-blank":"ui-icon-check")):n+="ui-icon-blank",this._addClass(this.icon,"ui-checkboxradio-icon",n),t||this._removeClass(this.icon,null,"ui-icon-check ui-state-checked"),this.icon.prependTo(this.label).after(this.iconSpace)):void 0!==this.icon&&(this.icon.remove(),this.iconSpace.remove(),delete this.icon)},_updateLabel:function(){var e=this.label.contents().not(this.element[0]);this.icon&&(e=e.not(this.icon[0])),this.iconSpace&&(e=e.not(this.iconSpace[0])),e.remove(),this.label.append(this.options.label)},refresh:function(){var e=this.element[0].checked,t=this.element[0].disabled;this._updateIcon(e),this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",e),null!==this.options.label&&this._updateLabel(),t!==this.options.disabled&&this._setOptions({disabled:t})}}]),e.ui.checkboxradio}),function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","./controlgroup","./checkboxradio","../keycode","../widget"],e):e(jQuery)}(function(e){"use strict";var t;return e.widget("ui.button",{version:"1.14.1",defaultElement:"<button>",options:{classes:{"ui-button":"ui-corner-all"},disabled:null,icon:null,iconPosition:"beginning",label:null,showLabel:!0},_getCreateOptions:function(){var e,t=this._super()||{};return this.isInput=this.element.is("input"),null!=(e=this.element[0].disabled)&&(t.disabled=e),this.originalLabel=this.isInput?this.element.val():this.element.html(),this.originalLabel&&(t.label=this.originalLabel),t},_create:function(){!this.option.showLabel&!this.options.icon&&(this.options.showLabel=!0),null==this.options.disabled&&(this.options.disabled=this.element[0].disabled||!1),this.hasTitle=!!this.element.attr("title"),this.options.label&&this.options.label!==this.originalLabel&&(this.isInput?this.element.val(this.options.label):this.element.html(this.options.label)),this._addClass("ui-button","ui-widget"),this._setOption("disabled",this.options.disabled),this._enhance(),this.element.is("a")&&this._on({keyup:function(t){t.keyCode===e.ui.keyCode.SPACE&&(t.preventDefault(),this.element[0].click?this.element[0].click():this.element.trigger("click"))}})},_enhance:function(){this.element.is("button")||this.element.attr("role","button"),this.options.icon&&(this._updateIcon("icon",this.options.icon),this._updateTooltip())},_updateTooltip:function(){this.title=this.element.attr("title"),this.options.showLabel||this.title||this.element.attr("title",this.options.label)},_updateIcon:function(t,n){var i="iconPosition"!==t,o=i?this.options.iconPosition:n,r="top"===o||"bottom"===o;this.icon?i&&this._removeClass(this.icon,null,this.options.icon):(this.icon=e("<span>"),this._addClass(this.icon,"ui-button-icon","ui-icon"),this.options.showLabel||this._addClass("ui-button-icon-only")),i&&this._addClass(this.icon,null,n),this._attachIcon(o),r?(this._addClass(this.icon,null,"ui-widget-icon-block"),this.iconSpace&&this.iconSpace.remove()):(this.iconS
vendor: 10,444 bytes, line 8
8pace||(this.iconSpace=e("<span> </span>"),this._addClass(this.iconSpace,"ui-button-icon-space")),this._removeClass(this.icon,null,"ui-wiget-icon-block"),this._attachIconSpace(o))},_destroy:function(){this.element.removeAttr("role"),this.icon&&this.icon.remove(),this.iconSpace&&this.iconSpace.remove(),this.hasTitle||this.element.removeAttr("title")},_attachIconSpace:function(e){this.icon[/^(?:end|bottom)/.test(e)?"before":"after"](this.iconSpace)},_attachIcon:function(e){this.element[/^(?:end|bottom)/.test(e)?"append":"prepend"](this.icon)},_setOptions:function(e){var t=void 0===e.showLabel?this.options.showLabel:e.showLabel,n=void 0===e.icon?this.options.icon:e.icon;t||n||(e.showLabel=!0),this._super(e)},_setOption:function(e,t){"icon"===e&&(t?this._updateIcon(e,t):this.icon&&(this.icon.remove(),this.iconSpace&&this.iconSpace.remove())),"iconPosition"===e&&this._updateIcon(e,t),"showLabel"===e&&(this._toggleClass("ui-button-icon-only",null,!t),this._updateTooltip()),"label"===e&&(this.isInput?this.element.val(t):(this.element.html(t),this.icon&&(this._attachIcon(this.options.iconPosition),this._attachIconSpace(this.options.iconPosition)))),this._super(e,t),"disabled"===e&&(this._toggleClass(null,"ui-state-disabled",t),this.element[0].disabled=t,t&&this.element.trigger("blur"))},refresh:function(){var e=this.element.is("input, button")?this.element[0].disabled:this.element.hasClass("ui-button-disabled");e!==this.options.disabled&&this._setOptions({disabled:e}),this._updateTooltip()}}),!0===e.uiBackCompat&&(e.widget("ui.button",e.ui.button,{options:{text:!0,icons:{primary:null,secondary:null}},_create:function(){this.options.showLabel&&!this.options.text&&(this.options.showLabel=this.options.text),!this.options.showLabel&&this.options.text&&(this.options.text=this.options.showLabel),this.options.icon||!this.options.icons.primary&&!this.options.icons.secondary?this.options.icon&&(this.options.icons.primary=this.options.icon):this.options.icons.primary?this.options.icon=this.options.icons.primary:(this.options.icon=this.options.icons.secondary,this.options.iconPosition="end"),this._super()},_setOption:function(e,t){"text"!==e?("showLabel"===e&&(this.options.text=t),"icon"===e&&(this.options.icons.primary=t),"icons"===e&&(t.primary?(this._super("icon",t.primary),this._super("iconPosition","beginning")):t.secondary&&(this._super("icon",t.secondary),this._super("iconPosition","end"))),this._superApply(arguments)):this._super("showLabel",t)}}),e.fn.button=(t=e.fn.button,function(n){var i="string"==typeof n,o=Array.prototype.slice.call(arguments,1),r=this;return i?this.length||"instance"!==n?this.each(function(){var t,i=e(this).attr("type"),s="checkbox"!==i&&"radio"!==i?"button":"checkboxradio",a=e.data(this,"ui-"+s);return"instance"===n?(r=a,!1):a?"function"!=typeof a[n]||"_"===n.charAt(0)?e.error("no such method '"+n+"' for button widget instance"):(t=a[n].apply(a,o))!==a&&void 0!==t?(r=t&&t.jquery?r.pushStack(t.get()):t,!1):void 0:e.error("cannot call methods on button prior to initialization; attempted to call method '"+n+"'")}):r=void 0:(o.length&&(n=e.widget.extend.apply(null,[n].concat(o))),this.each(function(){var i=e(this).attr("type"),o="checkbox"!==i&&"radio"!==i?"button":"checkboxradio",r=e.data(this,"ui-"+o);if(r)r.option(n||{}),r._init&&r._init();else{if("button"===o)return void t.call(e(this),n);e(this).checkboxradio(e.extend({icon:!1},n))}})),r}),e.fn.buttonset=function(){return e.ui.controlgroup||e.error("Controlgroup widget missing"),"option"===arguments[0]&&"items"===arguments[1]&&arguments[2]?this.controlgroup.apply(this,[arguments[0],"items.button",arguments[2]]):"option"===arguments[0]&&"items"===arguments[1]?this.controlgroup.apply(this,[arguments[0],"items.button"]):("object"==typeof arguments[0]&&arguments[0].items&&(arguments[0].items={button:arguments[0].items}),this.controlgroup.apply(this,arguments))}),e.ui.button}),function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","../version","../keycode"],e):e(jQuery)}(function(e){"use strict";function t(e){for(var t,n;e.length&&e[0]!==document;){if(("absolute"===(t=e.css("position"))||"relative"===t||"fixed"===t)&&(n=parseInt(e.css("zIndex"),10),!isNaN(n)&&0!==n))return n;e=e.parent()}return 0}function n(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:"",selectMonthLabel:"Select month",selectYearLabel:"Select year"},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,onUpdateDatepicker:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},e.extend(this._defaults,this.regional[""]),this.regional.en=e.extend(!0,{},this.regional[""]),this.regional["en-US"]=e.extend(!0,{},this.regional.en),this.dpDiv=i(e("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function i(t){var n="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return t.on("mouseout",n,function(){e(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&e(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&e(this).removeClass("ui-datepicker-next-hover")}).on("mouseover",n,o)}function o(){e.datepicker._isDisabledDatepicker(s.inline?s.dpDiv.parent()[0]:s.input[0])||(e(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),e(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&e(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&e(this).addClass("ui-datepicker-next-hover"))}function r(t,n){for(var i in e.extend(t,n),n)null==n[i]&&(t[i]=n[i]);return t}var s;return e.extend(e.ui,{datepicker:{version:"1.14.1"}}),e.extend(n.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(e){return r(this._defaults,e||{}),this},_attachDatepicker:function(t,n){var i,o,r;o="div"===(i=t.nodeName.toLowerCase())||"span"===i,t.id||(this.uuid+=1,t.id="dp"+this.uuid),(r=this._newInst(e(t),o)).settings=e.extend({},n||{}),"input"===i?this._connectDatepicker(t,r):o&&this._inlineDatepicker(t,r)},_newInst:function(t,n){return{id:t[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1"),input:t,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:n,dpDiv:n?i(e("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(t,n){var i=e(t);n.append=e([]),n.trigger=e([]),i.hasClass(this.markerClassName)||(this._attachments(i,n),i.addClass(this.markerClassName).on("keydown",this._doKeyDown).on("keypress",this._doKeyPress).on("keyup",this._doKeyUp),this._autoSize(n),e.data(t,"datepicker",n),n.settings.disabled&&this._disableDatepicker(t))},_attachments:function(t,n){var i,o,r,s=this._get(n,"appendText"),a=this._get(n,"isRTL");n.append&&n.append.remove(),s&&(n.append=e("<span>").addClass(this._appendClass).text(s),t[a?"before":"after"](n.append)),t.off("focus",this._showDatepicker),n.trigger&&n.trigger.remove(),"focus"!==(i=this._get(n,"showOn"))&&"both"!==i||t.on("focus",this._showDatepicker),"button"!==i&&"both"!==i||(o=this._get(n,"buttonText"),r=this._get(n,"buttonImage"),this._get(n,"buttonImageOnly")?n.trigger=e("<img>").addClass(this._triggerClass).attr({src:r,alt:o,title:o}):(n.trigger=e("<button type='button'>").addClass(this._triggerClass),r?n.trigger.html(e("<img>").attr({src:r,alt:o,title:o})):n.trigger.text(o)),t[a?"before":"after"](n.trigger),n.trigger.on("click",function(){return e.datepicker._datepickerShowing&&e.datepicker._lastInput===t[0]?e.datepicker._hideDatepicker():e.datepicker._datepickerShowing&&e.datepicker._lastInput!==t[0]?(e.datepicker._hideDatepicker(),e.datepicker._showDatepicker(t[0])):e.datepicker._showDatepicker(t[0]),!1}))},_autoSize:function(e){if(this._get(e,"autoSize")&&!e.inline){var t,n,i,o,r=new Date(2009,11,20),s=this._get(e,"dateFormat");s.match(/[DM]/)&&(t=function(e){for(n=0,i=0,o=0;o<e.length;o++)e[o].length>n&&(n=e[o].length,i=o);return i},r.setMonth(t(this._get(e,s.match(/MM/)?"monthNames":"monthNamesShort"))),r.setDate(t(this._get(e,s.match(/DD/)?"dayNames":"dayNamesShort"))+20-r.getDay())),e.input.attr("size",this._formatDate(e,r).length)}},_inlineDatepicker:function(t,n){var i=e(t);i.hasClass(this.markerClassName)||(i.addClass(this.markerClassName).append(n.dpDiv),e.data(t,"datepicker",n),this._setDate(n,this._getDefaultDate(n),!0),this._updateDatepicker(n),this._updateAlternate(n),n.settings.disabled&&this._disableDatepicker(t),n.dpDiv.css("display","block"))},_dialogDatepicker:function(t,n,i,o,s){var a,l,c,d,u,h=this._dialogInst;return h||(this.uuid+=1,a="dp"+this.uuid,this._dialogInput=e("<input type='text' id='"+a+"' style='position: absolute; top: -100px; width: 0px;'/>
8"),this._dialogInput.on("keydown",this._doKeyDown),e("body").append(this._dialogInput),(h=this._dialogInst=this._newInst(this._dialogInput,!1)).settings={},e.data(this._dialogInput[0],"datepicker",h)),r(h.settings,o||{}),n=n&&n.constructor===Date?this._formatDate(h,n):n,this._dialogInput.val(n),this._pos=s?s.length?s:[s.pageX,s.pageY]:null,this._pos||(l=document.documentElement.clientWidth,c=document.documentElement.clientHeight,d=document.documentElement.scrollLeft||document.body.scrollLeft,u=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[l/2-100+d,c/2-150+u]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),h.settings.onSelect=i,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),e.blockUI&&e.blockUI(this.dpDiv),e.data(this._dialogInput[0],"datepicker",h),this},_destroyDatepicker:function(t){var n,i=e(t),o=e.data(t,"datepicker");i.hasClass(this.markerClassName)&&(n=t.nodeName.toLowerCase(),e.removeData(t,"datepicker"),"input"===n?(o.append.remove(),o.trigger.remove(),i.removeClass(this.markerClassName).off("focus",this._showDatepicker).off("keydown",this._doKeyDown).off("keypress",this._doKeyPress).off("keyup",this._doKeyUp)):"div"!==n&&"span"!==n||i.removeClass(this.markerClassName).empty(),e.datepicker._hideDatepicker(),s===o&&(s=null,this._curInst=null))},_enableDatepicker:function(t){var n,i,o=e(t),r=e.data(t,"datepicker");o.hasClass(this.markerClassName)&&("input"===(n=t.nodeName.toLowerCase())?(t.disabled=!1,r.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):"div"!==n&&"span"!==n||((i=o.children("."+this._inlineClass)).children().removeClass("ui-state-disabled"),i.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=e.map(this._disabledInputs,function(e){return e===t?null:e}))},_disableDatepicker:function(t){var n,i,o=e(t),r=e.data(t,"datepicker");o.hasClass(this.markerClassName)&&("input"===(n=t.nodeName.toLowerCase())?(t.disabled=!0,r.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):"div"!==n&&"span"!==n||((i=o.children("."+this._inlineClass)).children().addClass("ui-state-disabled"),i.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=e.map(this._disabledInputs,function(e){return e===t?null:e}),this._disabledInputs[this._disabledInputs.length]=t)},_isDisabledDatepicker:function(e){if(!e)return!1;for(var t=0;t<this._disabledInputs.length;t++)if(this._disabledInputs[t]===e)return!0;return!1},_getInst:function(t){try{return e.data(t,"datepicker")}catch(e){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(t,n,i){var o,s,a,l,c=this._getInst(t);if(2===arguments.length&&"string"==typeof n)return"defaults"===n?e.extend({},e.datepicker._defaults):c?"all"===n?e.extend({},c.settings):this._get(c,n):null;o=n||{},"string"==typeof n&&((o={})[n]=i),c&&(this._curInst===c&&this._hideDatepicker(),s=this._getDateDatepicker(t,!0),a=this._getMinMaxDate(c,"min"),l=this._getMinMaxDate(c,"max"),r(c.settings,o),null!==a&&void 0!==o.dateFormat&&void 0===o.minDate&&(c.settings.minDate=this._formatDate(c,a)),null!==l&&void 0!==o.dateFormat&&void 0===o.maxDate&&(c.settings.maxDate=this._formatDate(c,l)),"disabled"in o&&(o.disabled?this._disableDatepicker(t):this._enableDatepicker(t)),this._attachments(e(t),c),this._autoSize(c),this._setDate(c,s),this._updateAlternate(c),this._updateDatepicker(c))},_changeDatepicker:function(e,t,n){this._optionDatepicker(e,t,n)},_refreshDatepicker:function(e){var t=this._getInst(e);t&&this._updateDatepicker(t)},_setDateDatepicker:function(e,t){var n=this._getInst(e);n&&(this._setDate(n,t),this._updateDatepicker(n),this._updateAlternate(n))},_getDateDatepicker:function(e,t){var n=this._getInst(e);return n&&!n.inline&&this._setDateFromField(n,t),n?this._getDate(n):null},_doKeyDown:function(t){var n,i,o,r=e.datepicker._getInst(t.target),s=!0,a=r.dpDiv.is(".ui-datepicker-rtl");if(r._keyEvent=!0,e.datepicker._datepickerShowing)switch(t.keyCode){case 9:e.datepicker._hideDatepicker(),s=!1;break;case 13:return(o=e("td."+e.datepicker._dayOverClass+":not(."+e.datepicker._currentClass+")",r.dpDiv))[0]&&e.datepicker._selectDay(t.target,r.selectedMonth,r.selectedYear,o[0]),(n=e.datepicker._get(r,"onSelect"))?(i=e.datepicker._formatDate(r),n.apply(r.input?r.input[0]:null,[
vendor: 4,334 bytes, lines 8-9
8i,r])):e.datepicker._hideDatepicker(),!1;case 27:e.datepicker._hideDatepicker();break;case 33:e.datepicker._adjustDate(t.target,t.ctrlKey?-e.datepicker._get(r,"stepBigMonths"):-e.datepicker._get(r,"stepMonths"),"M");break;case 34:
9e.datepicker._adjustDate(t.target,t.ctrlKey?+e.datepicker._get(r,"stepBigMonths"):+e.datepicker._get(r,"stepMonths"),"M");break;case 35:(t.ctrlKey||t.metaKey)&&e.datepicker._clearDate(t.target),s=t.ctrlKey||t.metaKey;break;case 36:(t.ctrlKey||t.metaKey)&&e.datepicker._gotoToday(t.target),s=t.ctrlKey||t.metaKey;break;case 37:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,a?1:-1,"D"),s=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&e.datepicker._adjustDate(t.target,t.ctrlKey?-e.datepicker._get(r,"stepBigMonths"):-e.datepicker._get(r,"stepMonths"),"M");break;case 38:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,-7,"D"),s=t.ctrlKey||t.metaKey;break;case 39:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,a?-1:1,"D"),s=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&e.datepicker._adjustDate(t.target,t.ctrlKey?+e.datepicker._get(r,"stepBigMonths"):+e.datepicker._get(r,"stepMonths"),"M");break;case 40:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,7,"D"),s=t.ctrlKey||t.metaKey;break;default:s=!1}else 36===t.keyCode&&t.ctrlKey?e.datepicker._showDatepicker(this):s=!1;s&&(t.preventDefault(),t.stopPropagation())},_doKeyPress:function(t){var n,i,o=e.datepicker._getInst(t.target);if(e.datepicker._get(o,"constrainInput"))return n=e.datepicker._possibleChars(e.datepicker._get(o,"dateFormat")),i=String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),t.ctrlKey||t.metaKey||i<" "||!n||n.indexOf(i)>-1},_doKeyUp:function(t){var n=e.datepicker._getInst(t.target);if(n.input.val()!==n.lastVal)try{e.datepicker.parseDate(e.datepicker._get(n,"dateFormat"),n.input?n.input.val():null,e.datepicker._getFormatConfig(n))&&(e.datepicker._setDateFromField(n),e.datepicker._updateAlternate(n),e.datepicker._updateDatepicker(n))}catch(e){}return!0},_showDatepicker:function(n){var i,o,s,a,l,c,d;("input"!==(n=n.target||n).nodeName.toLowerCase()&&(n=e("input",n.parentNode)[0]),e.datepicker._isDisabledDatepicker(n)||e.datepicker._lastInput===n)||(i=e.datepicker._getInst(n),e.datepicker._curInst&&e.datepicker._curInst!==i&&(e.datepicker._curInst.dpDiv.stop(!0,!0),i&&e.datepicker._datepickerShowing&&e.datepicker._hideDatepicker(e.datepicker._curInst.input[0])),!1!==(s=(o=e.datepicker._get(i,"beforeShow"))?o.apply(n,[n,i]):{})&&(r(i.settings,s),i.lastVal=null,e.datepicker._lastInput=n,e.datepicker._setDateFromField(i),e.datepicker._inDialog&&(n.value=""),e.datepicker._pos||(e.datepicker._pos=e.datepicker._findPos(n),e.datepicker._pos[1]+=n.offsetHeight),a=!1,e(n).parents().each(function(){return!(a|="fixed"===e(this).css("position"))}),l={left:e.datepicker._pos[0],top:e.datepicker._pos[1]},e.datepicker._pos=null,i.dpDiv.empty(),i.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),e.datepicker._updateDatepicker(i),l=e.datepicker._checkOffset(i,l,a),i.dpDiv.css({position:e.datepicker._inDialog&&e.blockUI?"static":a?"fixed":"absolute",display:"none",left:l.left+"px",top:l.top+"px"}),i.inline||(c=e.datepicker._get(i,"showAnim"),d=e.datepicker._get(i,"duration"),i.dpDiv.css("z-index",t(e(n))+1),e.datepicker._datepickerShowing=!0,e.effects&&e.effects.effect[c]?i.dpDiv.show(c,e.datepicker._get(i,"showOptions"),d):i.dpDiv[c||"show"](c?d:null),e.datepicker._shouldFocusInput(i)&&i.input.trigger("focus"),e.datepicker._curInst=i)))},_updateDatepicker:function(t){this.maxRows=4,s=t,t.dpDiv.empty().append(this._generateHTML(t)),this._attachHandlers(t);var n,i=this._getNumberOfMonths(t),r=i[1],a=17,l=t.dpDiv.find("."+this._dayOverClass+" a"),c=e.datepicker._get(t,"onUpdateDatepicker");l.length>0&&o.apply(l.get(0)),t.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),r>1&&t.dpDiv.addClass("ui-datepicker-multi-"+r).css("width",a*r+"em"),t.dpDiv[(1!==i[0]||1!==i[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),t.dpDiv[(this._get(t,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),t===e.datepicker._curInst&&e.datepicker._datepickerShowing&&e.datepicker._shouldFocusInput(t)&&t.input.trigger("focus"),t.yearshtml&&(n=t.yearshtml,setTimeout(function(){n===t.yearshtml&&t.yearshtml&&t.dpDiv.f
vendor: 4,116 bytes, line 9
9ind("select.ui-datepicker-year").first().replaceWith(t.yearshtml),n=t.yearshtml=null},0)),c&&c.apply(t.input?t.input[0]:null,[t])},_shouldFocusInput:function(e){return e.input&&e.input.is(":visible")&&!e.input.is(":disabled")},_checkOffset:function(t,n,i){var o=t.dpDiv.outerWidth(),r=t.dpDiv.outerHeight(),s=t.input?t.input.outerWidth():0,a=t.input?t.input.outerHeight():0,l=document.documentElement.clientWidth+(i?0:e(document).scrollLeft()),c=document.documentElement.clientHeight+(i?0:e(document).scrollTop());return n.left-=this._get(t,"isRTL")?o-s:0,n.left-=i&&n.left===t.input.offset().left?e(document).scrollLeft():0,n.top-=i&&n.top===t.input.offset().top+a?e(document).scrollTop():0,n.left-=Math.min(n.left,n.left+o>l&&l>o?Math.abs(n.left+o-l):0),n.top-=Math.min(n.top,n.top+r>c&&c>r?Math.abs(r+a):0),n},_findPos:function(t){for(var n,i=this._getInst(t),o=this._get(i,"isRTL");t&&("hidden"===t.type||1!==t.nodeType||e.expr.pseudos.hidden(t));)t=t[o?"previousSibling":"nextSibling"];return[(n=e(t).offset()).left,n.top]},_hideDatepicker:function(t){var n,i,o,r,s=this._curInst;!s||t&&s!==e.data(t,"datepicker")||this._datepickerShowing&&(n=this._get(s,"showAnim"),i=this._get(s,"duration"),o=function(){e.datepicker._tidyDialog(s)},e.effects&&e.effects.effect[n]?s.dpDiv.hide(n,e.datepicker._get(s,"showOptions"),i,o):s.dpDiv["slideDown"===n?"slideUp":"fadeIn"===n?"fadeOut":"hide"](n?i:null,o),n||o(),this._datepickerShowing=!1,(r=this._get(s,"onClose"))&&r.apply(s.input?s.input[0]:null,[s.input?s.input.val():"",s]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),e.blockUI&&(e.unblockUI(),e("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(e){e.dpDiv.removeClass(this._dialogClass).off(".ui-datepicker-calendar")},_checkExternalClick:function(t){if(e.datepicker._curInst){var n=e(t.target),i=e.datepicker._getInst(n[0]);(n[0].id===e.datepicker._mainDivId||0!==n.parents("#"+e.datepicker._mainDivId).length||n.hasClass(e.datepicker.markerClassName)||n.closest("."+e.datepicker._triggerClass).length||!e.datepicker._datepickerShowing||e.datepicker._inDialog&&e.blockUI)&&(!n.hasClass(e.datepicker.markerClassName)||e.datepicker._curInst===i)||e.datepicker._hideDatepicker()}},_adjustDate:function(t,n,i){var o=e(t),r=this._getInst(o[0]);this._isDisabledDatepicker(o[0])||(this._adjustInstDate(r,n,i),this._updateDatepicker(r))},_gotoToday:function(t){var n,i=e(t),o=this._getInst(i[0]);this._get(o,"gotoCurrent")&&o.currentDay?(o.selectedDay=o.currentDay,o.drawMonth=o.selectedMonth=o.currentMonth,o.drawYear=o.selectedYear=o.currentYear):(n=new Date,o.selectedDay=n.getDate(),o.drawMonth=o.selectedMonth=n.getMonth(),o.drawYear=o.selectedYear=n.getFullYear()),this._notifyChange(o),this._adjustDate(i)},_selectMonthYear:function(t,n,i){var o=e(t),r=this._getInst(o[0]);r["selected"+("M"===i?"Month":"Year")]=r["draw"+("M"===i?"Month":"Year")]=parseInt(n.options[n.selectedIndex].value,10),this._notifyChange(r),this._adjustDate(o)},_selectDay:function(t,n,i,o){var r,s=e(t);e(o).hasClass(this._unselectableClass)||this._isDisabledDatepicker(s[0])||((r=this._getInst(s[0])).selectedDay=r.currentDay=parseInt(e("a",o).attr("data-date")),r.selectedMonth=r.currentMonth=n,r.selectedYear=r.currentYear=i,this._selectDate(t,this._formatDate(r,r.currentDay,r.currentMonth,r.currentYear)))},_clearDate:function(t){var n=e(t);this._selectDate(n,"")},_selectDate:function(t,n){var i,o=e(t),r=this._getInst(o[0]);n=null!=n?n:this._formatDate(r),r.input&&r.input.val(n),this._updateAlternate(r),(i=this._get(r,"onSelect"))?i.apply(r.input?r.input[0]:null,[n,r]):r.input&&r.input.trigger("change"),r.inline?this._updateDatepicker(r):(this._hideDatepicker(),this._lastInput=r.input[0],"object"!=typeof r.input[0]&&r.input.trigger("focus"),this._lastInput=null)},_updateAlternate:function(t){var n,i,o,r=this._get(t,"altField");r&&(n=this._get(t,"altFormat")||this._get(t,"dateFormat"),i=this._getDate(t),o=this.formatDate(n,i,this._getFormatConfig(t)),e(document).find(r).val(o))},noWeekends:function(e){var t=e.getDay();return[t>0&&t<6,""]}
vendor: 6,462 bytes, line 9
9,iso8601Week:function(e){var t,n=new Date(e.getTime());return n.setDate(n.getDate()+4-(n.getDay()||7)),t=n.getTime(),n.setMonth(0),n.setDate(1),Math.floor(Math.round((t-n)/864e5)/7)+1},parseDate:function(t,n,i){if(null==t||null==n)throw"Invalid arguments";if(""===(n="object"==typeof n?n.toString():n+""))return null;var o,r,s,a,l=0,c=(i?i.shortYearCutoff:null)||this._defaults.shortYearCutoff,d="string"!=typeof c?c:(new Date).getFullYear()%100+parseInt(c,10),u=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,h=(i?i.dayNames:null)||this._defaults.dayNames,p=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,f=(i?i.monthNames:null)||this._defaults.monthNames,m=-1,g=-1,v=-1,y=-1,b=!1,_=function(e){var n=o+1<t.length&&t.charAt(o+1)===e;return n&&o++,n},w=function(e){var t=_(e),i="@"===e?14:"!"===e?20:"y"===e&&t?4:"o"===e?3:2,o=new RegExp("^\\d{"+("y"===e?i:1)+","+i+"}"),r=n.substring(l).match(o);if(!r)throw"Missing number at position "+l;return l+=r[0].length,parseInt(r[0],10)},C=function(t,i,o){var r=-1,s=e.map(_(t)?o:i,function(e,t){return[[t,e]]}).sort(function(e,t){return-(e[1].length-t[1].length)});if(e.each(s,function(e,t){var i=t[1];if(n.substr(l,i.length).toLowerCase()===i.toLowerCase())return r=t[0],l+=i.length,!1}),-1!==r)return r+1;throw"Unknown name at position "+l},k=function(){if(n.charAt(l)!==t.charAt(o))throw"Unexpected literal at position "+l;l++};for(o=0;o<t.length;o++)if(b)"'"!==t.charAt(o)||_("'")?k():b=!1;else switch(t.charAt(o)){case"d":v=w("d");break;case"D":C("D",u,h);break;case"o":y=w("o");break;case"m":g=w("m");break;case"M":g=C("M",p,f);break;case"y":m=w("y");break;case"@":m=(a=new Date(w("@"))).getFullYear(),g=a.getMonth()+1,v=a.getDate();break;case"!":m=(a=new Date((w("!")-this._ticksTo1970)/1e4)).getFullYear(),g=a.getMonth()+1,v=a.getDate();break;case"'":_("'")?k():b=!0;break;default:k()}if(l<n.length&&(s=n.substr(l),!/^\s+/.test(s)))throw"Extra/unparsed characters found in date: "+s;if(-1===m?m=(new Date).getFullYear():m<100&&(m+=(new Date).getFullYear()-(new Date).getFullYear()%100+(m<=d?0:-100)),y>-1)for(g=1,v=y;;){if(v<=(r=this._getDaysInMonth(m,g-1)))break;g++,v-=r}if((a=this._daylightSavingAdjust(new Date(m,g-1,v))).getFullYear()!==m||a.getMonth()+1!==g||a.getDate()!==v)throw"Invalid date";return a},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*60*60*1e7,formatDate:function(e,t,n){if(!t)return"";var i,o=(n?n.dayNamesShort:null)||this._defaults.dayNamesShort,r=(n?n.dayNames:null)||this._defaults.dayNames,s=(n?n.monthNamesShort:null)||this._defaults.monthNamesShort,a=(n?n.monthNames:null)||this._defaults.monthNames,l=function(t){var n=i+1<e.length&&e.charAt(i+1)===t;return n&&i++,n},c=function(e,t,n){var i=""+t;if(l(e))for(;i.length<n;)i="0"+i;return i},d=function(e,t,n,i){return l(e)?i[t]:n[t]},u="",h=!1;if(t)for(i=0;i<e.length;i++)if(h)"'"!==e.charAt(i)||l("'")?u+=e.charAt(i):h=!1;else switch(e.charAt(i)){case"d":u+=c("d",t.getDate(),2);break;case"D":u+=d("D",t.getDay(),o,r);break;case"o":u+=c("o",Math.round((new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime()-new Date(t.getFullYear(),0,0).getTime())/864e5),3);break;case"m":u+=c("m",t.getMonth()+1,2);break;case"M":u+=d("M",t.getMonth(),s,a);break;case"y":u+=l("y")?t.getFullYear():(t.getFullYear()%100<10?"0":"")+t.getFullYear()%100;break;case"@":u+=t.getTime();break;case"!":u+=1e4*t.getTime()+this._ticksTo1970;break;case"'":l("'")?u+="'":h=!0;break;default:u+=e.charAt(i)}return u},_possibleChars:function(e){var t,n="",i=!1,o=function(n){var i=t+1<e.length&&e.charAt(t+1)===n;return i&&t++,i};for(t=0;t<e.length;t++)if(i)"'"!==e.charAt(t)||o("'")?n+=e.charAt(t):i=!1;else switch(e.charAt(t)){case"d":case"m":case"y":case"@":n+="0123456789";break;case"D":case"M":return null;case"'":o("'")?n+="'":i=!0;break;default:n+=e.charAt(t)}return n},_get:function(e,t){return void 0!==e.settings[t]?e.settings[t]:this._defaults[t]},_setDateFromField:function(e,t){if(e.input.val()!==e.lastVal){var n=this._get(e,"dateFormat"),i=e.lastVal=e.input?e.input.val():null,o=this._getDefaultDate(e),r=o,s=this._getFormatConfig(e);try{r=this.parseDate(n,i,s)||o}catch(e){i=t?"":i}e.selectedDay=r.getDate(),e.drawMonth=e.selectedMonth=r.getMonth(),e.drawYear=e.selectedYear=r.getFullYear(),e.currentDay=i?r.getDate():0,e.currentMonth=i?r.getMonth():0,e.currentYear=i?r.getFullYear():0,this._adjustInstDate(e)}},_getDefaultDate:function(e){return this._restrictMinMax(e,this._determineDate(e,this._get(e,"defaultDate"),new Date))},_determineDate:function(t,n,i){var o=function(e){var t=new Date;return t.setDate(t.getDate()+e),t},r=function(n){try{return e.datepicker.parseDate(e.datepicker._get(t,"dateFormat"),n,e.datepicker._getFormatConfig(t))}catch(e){}for(var i=(n.toLowerCase().match(/^c/)?e.datepicker._getDate(t):null)||new Date,o=i.getFullYear(),r=i.getMonth(),s=i.getDate(),a=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,l=a.exec(n);l;){switch(l[2]||"d"){case"d":case"D":s+=parseInt(l[1],10);break;case"w":case"W":s+=7*parseInt(l[1],10);break;case"m":case"M":r+=parseInt(l[1],10),s=Math.min(s,e.datepicker._getDaysInMonth(o,r));break;case"y":case"Y":o+=parseInt(l[1],10),s=Math.min(s,e.datepicker._getDaysInMonth(o,r))}l=a.exec(n)}return new Date(o,r,s)},s=null==n||""===n?i:"string"==typeof n?r(n):"number"==typeof n?isNaN(n)?i:o(n):new Date(n.getTime());return(s=s&&"Invalid Date"===s.toString()?i:s)&&(s.setHours(0),s.setMinutes(0),s.setSeconds(0),s.setMilliseconds(0)),this._daylightSavingAdjust(s)},_daylightSavingAdjust:function(e){return e?(e.setHours(e.getHours()>12?e.getHours()+2:0),e):null},_setDate:function(e,t,n){var i=!t,o=e.selectedMonth,r=e.selectedYear,s=this._restrictMinMax(e,this._determineDate(e,t,new Date));e.selectedDay=e.currentDay=s.getDate(),e.drawMonth=e.selectedMonth=e.currentMonth=s.getMonth(),e.drawYear=e.selectedYear=e.currentYear=s.getFullYear(),o===e.selectedMonth&&r===e.selectedYear||n||this._notifyChange(e),this._adjustInstDate(e),e.input&&e.input.val(i?"":this._formatDate(e))},_getDate:function(e){return!e.currentYear||e.input&&""===e.input.val()?null:this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay))},_attachHandlers:function(t){var n=this._get(t,"stepMonths"),i="#"+t.id.replace(/\\\\/g,"\\");
vendor: 7,271 bytes, line 9
9t.dpDiv.find("[data-handler]").map(function(){var t={prev:function(){e.datepicker._adjustDate(i,-n,"M")},next:function(){e.datepicker._adjustDate(i,+n,"M")},hide:function(){e.datepicker._hideDatepicker()},today:function(){e.datepicker._gotoToday(i)},selectDay:function(){return e.datepicker._selectDay(i,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return e.datepicker._selectMonthYear(i,this,"M"),!1},selectYear:function(){return e.datepicker._selectMonthYear(i,this,"Y"),!1}};e(this).on(this.getAttribute("data-event"),t[this.getAttribute("data-handler")])})},_generateHTML:function(t){var n,i,o,r,s,a,l,c,d,u,h,p,f,m,g,v,y,b,_,w,C,k,x,S,E,D,T,A,M,R,N,I,P,O,L,B,F,H,$,z=new Date,j=this._daylightSavingAdjust(new Date(z.getFullYear(),z.getMonth(),z.getDate())),q=this._get(t,"isRTL"),U=this._get(t,"showButtonPanel"),W=this._get(t,"hideIfNoPrevNext"),V=this._get(t,"navigationAsDateFormat"),Y=this._getNumberOfMonths(t),G=this._get(t,"showCurrentAtPos"),K=this._get(t,"stepMonths"),X=1!==Y[0]||1!==Y[1],Q=this._daylightSavingAdjust(t.currentDay?new Date(t.currentYear,t.currentMonth,t.currentDay):new Date(9999,9,9)),Z=this._getMinMaxDate(t,"min"),J=this._getMinMaxDate(t,"max"),ee=t.drawMonth-G,te=t.drawYear;if(ee<0&&(ee+=12,te--),J)for(n=this._daylightSavingAdjust(new Date(J.getFullYear(),J.getMonth()-Y[0]*Y[1]+1,J.getDate())),n=Z&&n<Z?Z:n;this._daylightSavingAdjust(new Date(te,ee,1))>n;)--ee<0&&(ee=11,te--);for(t.drawMonth=ee,t.drawYear=te,i=this._get(t,"prevText"),i=V?this.formatDate(i,this._daylightSavingAdjust(new Date(te,ee-K,1)),this._getFormatConfig(t)):i,o=this._canAdjustMonth(t,-1,te,ee)?e("<a>").attr({class:"ui-datepicker-prev ui-corner-all","data-handler":"prev","data-event":"click",title:i}).append(e("<span>").addClass("ui-icon ui-icon-circle-triangle-"+(q?"e":"w")).text(i))[0].outerHTML:W?"":e("<a>").attr({class:"ui-datepicker-prev ui-corner-all ui-state-disabled",title:i}).append(e("<span>").addClass("ui-icon ui-icon-circle-triangle-"+(q?"e":"w")).text(i))[0].outerHTML,r=this._get(t,"nextText"),r=V?this.formatDate(r,this._daylightSavingAdjust(new Date(te,ee+K,1)),this._getFormatConfig(t)):r,s=this._canAdjustMonth(t,1,te,ee)?e("<a>").attr({class:"ui-datepicker-next ui-corner-all","data-handler":"next","data-event":"click",title:r}).append(e("<span>").addClass("ui-icon ui-icon-circle-triangle-"+(q?"w":"e")).text(r))[0].outerHTML:W?"":e("<a>").attr({class:"ui-datepicker-next ui-corner-all ui-state-disabled",title:r}).append(e("<span>").attr("class","ui-icon ui-icon-circle-triangle-"+(q?"w":"e")).text(r))[0].outerHTML,a=this._get(t,"currentText"),l=this._get(t,"gotoCurrent")&&t.currentDay?Q:j,a=V?this.formatDate(a,l,this._getFormatConfig(t)):a,c="",t.inline||(c=e("<button>").attr({type:"button",class:"ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all","data-handler":"hide","data-event":"click"}).text(this._get(t,"closeText"))[0].outerHTML),d="",U&&(d=e("<div class='ui-datepicker-buttonpane ui-widget-content'>").append(q?c:"").append(this._isInRange(t,l)?e("<button>").attr({type:"button",class:"ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all","data-handler":"today","data-event":"click"}).text(a):"").append(q?"":c)[0].outerHTML),u=parseInt(this._get(t,"firstDay"),10),u=isNaN(u)?0:u,h=this._get(t,"showWeek"),p=this._get(t,"dayNames"),f=this._get(t,"dayNamesMin"),m=this._get(t,"monthNames"),g=this._get(t,"monthNamesShort"),v=this._get(t,"beforeShowDay"),y=this._get(t,"showOtherMonths"),b=this._get(t,"selectOtherMonths"),_=this._getDefaultDate(t),w="",k=0;k<Y[0];k++){for(x="",this.maxRows=4,S=0;S<Y[1];S++){if(E=this._daylightSavingAdjust(new Date(te,ee,t.selectedDay)),D=" ui-corner-all",T="",X){if(T+="<div class='ui-datepicker-group",Y[1]>1)switch(S){case 0:T+=" ui-datepicker-group-first",D=" ui-corner-"+(q?"right":"left");break;case Y[1]-1:T+=" ui-datepicker-group-last",D=" ui-corner-"+(q?"left":"right");break;default:T+=" ui-datepicker-group-middle",D=""}T+="'>"}for(T+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+D+"'>"+(/all|left/.test(D)&&0===k?q?s:o:"")+(/all|right/.test(D)&&0===k?q?o:s:"")+this._generateMonthYearHeader(t,ee,te,Z,J,k>0||S>0,m,g)+"</div><table class='ui-datepicker-calendar'><thead><tr>",A=h?"<th class='ui-datepicker-week-col'>"+this._get(t,"weekHeader")+"</th>":"",C=0;C<7;C++)A+="<th scope='col'"+((C+u+6)%7>=5?" class='ui-datepicker-week-end'":"")+"><span title='"+p[M=(C+u)%7]+"'>"+f[M]+"</span></th>";for(T+=A+"</tr></thead><tbody>",R=this._getDaysInMonth(te,ee),te===t.selectedYear&&ee===t.selectedMonth&&(t.selectedDay=Math.min(t.selectedDay,R)),N=(this._getFirstDayOfMonth(te,ee)-u+7)%7,I=Math.ceil((N+R)/7),P=X&&this.maxRows>I?this.maxRows:I,this.maxRows=P,O=this._daylightSavingAdjust(new Date(te,ee,1-N)),L=0;L<P;L++){for(T+="<tr>",B=h?"<td class='ui-datepicker-week-col'>"+this._get(t,"calculateWeek")(O)+"</td>":"",C=0;C<7;C++)F=v?v.apply(t.input?t.input[0]:null,[O]):[!0,""],$=(H=O.getMonth()!==ee)&&!b||!F[0]||Z&&O<Z||J&&O>J,B+="<td class='"+((C+u+6)%7>=5?" ui-datepicker-week-end":"")+(H?" ui-datepicker-other-month":"")+(O.getTime()===E.getTime()&&ee===t.selectedMonth&&t._keyEvent||_.getTime()===O.getTime()&&_.getTime()===E.getTime()?" "+this._dayOverClass:"")+($?" "+this._unselectableClass+" ui-state-disabled":"")+(H&&!y?"":" "+F[1]+(O.getTime()===Q.getTime()?" "+this._currentClass:"")+(O.getTime()===j.getTime()?" ui-datepicker-today":""))+"'"+(H&&!y||!F[2]?"":" title='"+F[2].replace(/'/g,"&#39;")+"'")+($?"":" data-handler='selectDay' data-event='click' data-month='"+O.getMonth()+"' data-year='"+O.getFullYear()+"'")+">"+(H&&!y?"&#xa0;":$?"<span class='ui-state-default'>"+O.getDate()+"</span>":"<a class='ui-state-default"+(O.getTime()===j.getTime()?" ui-state-highlight":"")+(O.getTime()===Q.getTime()?" ui-state-active":"")+(H?" ui-priority-secondary":"")+"' href='#' aria-current='"+(O.getTime()===Q.getTime()?"true":"false")+"' data-date='"+O.getDate()+"'>"+O.getDate()+"</a>")+"</td>",O.setDate(O.getDate()+1),O=this._daylightSavingAdjust(O);T+=B+"</tr>"}++ee>11&&(ee=0,te++),x+=T+="</tbody></table>"+(X?"</div>"+(Y[0]>0&&S===Y[1]-1?"<div class='ui-datepicker-row-break'></div>":""):"")}w+=x}return w+=d,t._keyEvent=!1,w},_generateMonthYearHeader:function(e,t,n,i,o,r,s,a){var l,c,d,u,h,p,f,m,g=this._get(e,"changeMonth"),v=this._get(e,"changeYear"),y=this._get(e,"showMonthAfterYear"),b=this._get(e,"selectMonthLabel"),_=this._get(e,"selectYearLabel"),w="<div class='ui-datepicker-title'>",C="";if(r||!g)C+="<span class='ui-datepicker-month'>"+s[t]+"</span>";else{for(l=i&&i.getFullYear()===n,c=o&&o.getFullYear()===n,C+="<select class='ui-datepicker-month' aria-label='"+b+"' data-handler='selectMonth' data-event='change'>",d=0;d<12;d++)(!l||d>=i.getMonth())&&(!c||d<=o.getMonth())&&(C+="<option value='"+d+"'"+(d===t?" selected='selected'":"")+">"+a[d]+"</option>");C+="</select>"}if(y||(w+=C+(!r&&g&&v?"":"&#xa0;")),!e.yearshtml)if(e.yearshtml="",r||!v)w+="<span class='ui-datepicker-year'>"+n+"</span>";else{for(u=this._get(e,"yearRange").split(":"),h=(new Date).getFullYear(),p=function(e){var t=e.match(/c[+\-].*/)?n+parseInt(e.substring(1),10):e.match(/[+\-].*/)?h+parseInt(e,10):parseInt(e,10);return isNaN(t)?h:t}
vendor: 4,735 bytes, line 9
9,f=p(u[0]),m=Math.max(f,p(u[1]||"")),f=i?Math.max(f,i.getFullYear()):f,m=o?Math.min(m,o.getFullYear()):m,e.yearshtml+="<select class='ui-datepicker-year' aria-label='"+_+"' data-handler='selectYear' data-event='change'>";f<=m;f++)e.yearshtml+="<option value='"+f+"'"+(f===n?" selected='selected'":"")+">"+f+"</option>";e.yearshtml+="</select>",w+=e.yearshtml,e.yearshtml=null}return w+=this._get(e,"yearSuffix"),y&&(w+=(!r&&g&&v?"":"&#xa0;")+C),w+="</div>"},_adjustInstDate:function(e,t,n){var i=e.selectedYear+("Y"===n?t:0),o=e.selectedMonth+("M"===n?t:0),r=Math.min(e.selectedDay,this._getDaysInMonth(i,o))+("D"===n?t:0),s=this._restrictMinMax(e,this._daylightSavingAdjust(new Date(i,o,r)));e.selectedDay=s.getDate(),e.drawMonth=e.selectedMonth=s.getMonth(),e.drawYear=e.selectedYear=s.getFullYear(),"M"!==n&&"Y"!==n||this._notifyChange(e)},_restrictMinMax:function(e,t){var n=this._getMinMaxDate(e,"min"),i=this._getMinMaxDate(e,"max"),o=n&&t<n?n:t;return i&&o>i?i:o},_notifyChange:function(e){var t=this._get(e,"onChangeMonthYear");t&&t.apply(e.input?e.input[0]:null,[e.selectedYear,e.selectedMonth+1,e])},_getNumberOfMonths:function(e){var t=this._get(e,"numberOfMonths");return null==t?[1,1]:"number"==typeof t?[1,t]:t},_getMinMaxDate:function(e,t){return this._determineDate(e,this._get(e,t+"Date"),null)},_getDaysInMonth:function(e,t){return 32-this._daylightSavingAdjust(new Date(e,t,32)).getDate()},_getFirstDayOfMonth:function(e,t){return new Date(e,t,1).getDay()},_canAdjustMonth:function(e,t,n,i){var o=this._getNumberOfMonths(e),r=this._daylightSavingAdjust(new Date(n,i+(t<0?t:o[0]*o[1]),1));return t<0&&r.setDate(this._getDaysInMonth(r.getFullYear(),r.getMonth())),this._isInRange(e,r)},_isInRange:function(e,t){var n,i,o=this._getMinMaxDate(e,"min"),r=this._getMinMaxDate(e,"max"),s=null,a=null,l=this._get(e,"yearRange");return l&&(n=l.split(":"),i=(new Date).getFullYear(),s=parseInt(n[0],10),a=parseInt(n[1],10),n[0].match(/[+\-].*/)&&(s+=i),n[1].match(/[+\-].*/)&&(a+=i)),(!o||t.getTime()>=o.getTime())&&(!r||t.getTime()<=r.getTime())&&(!s||t.getFullYear()>=s)&&(!a||t.getFullYear()<=a)},_getFormatConfig:function(e){var t=this._get(e,"shortYearCutoff");return{shortYearCutoff:t="string"!=typeof t?t:(new Date).getFullYear()%100+parseInt(t,10),dayNamesShort:this._get(e,"dayNamesShort"),dayNames:this._get(e,"dayNames"),monthNamesShort:this._get(e,"monthNamesShort"),monthNames:this._get(e,"monthNames")}},_formatDate:function(e,t,n,i){t||(e.currentDay=e.selectedDay,e.currentMonth=e.selectedMonth,e.currentYear=e.selectedYear);var o=t?"object"==typeof t?t:this._daylightSavingAdjust(new Date(i,n,t)):this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return this.formatDate(this._get(e,"dateFormat"),o,this._getFormatConfig(e))}}),e.fn.datepicker=function(t){if(!this.length)return this;e.datepicker.initialized||(e(document).on("mousedown",e.datepicker._checkExternalClick),e.datepicker.initialized=!0),0===e("#"+e.datepicker._mainDivId).length&&e("body").append(e.datepicker.dpDiv);var n=Array.prototype.slice.call(arguments,1);return"string"!=typeof t||"isDisabled"!==t&&"getDate"!==t&&"widget"!==t?"option"===t&&2===arguments.length&&"string"==typeof arguments[1]?e.datepicker["_"+t+"Datepicker"].apply(e.datepicker,[this[0]].concat(n)):this.each(function(){"string"==typeof t?e.datepicker["_"+t+"Datepicker"].apply(e.datepicker,[this].concat(n)):e.datepicker._attachDatepicker(this,t)}):e.datepicker["_"+t+"Datepicker"].apply(e.datepicker,[this[0]].concat(n))},e.datepicker=new n,e.datepicker.initialized=!1,e.datepicker.uuid=(new Date).getTime(),e.datepicker.version="1.14.1",e.datepicker}),function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","../version","../widget"],e):e(jQuery)}(function(e){"use strict";var t=!1;return e(document).on("mouseup",function(){t=!1}),e.widget("ui.mouse",{version:"1.14.1",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.on("mousedown."+this.widgetName,function(e){return t._mouseDown(e)}).on("click."+this.widgetName,function(n){if(!0===e.data(n.target,t.widgetName+".preventClickEvent"))return e.removeData(n.target,t.widgetName+".preventClickEvent"),n.stopImmediatePropagation(),!1}),this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(n){if(!t){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(n),this._mouseDownEvent=n;var i=this,o=1===n.which,r="string"==typeof this.options.cancel&&e(n.target).closest(this.options.cancel).length;
vendor: 4,935 bytes, line 9
9return!(o&&!r&&this._mouseCapture(n))||(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){i.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(n)&&this._mouseDelayMet(n)&&(this._mouseStarted=!1!==this._mouseStart(n),!this._mouseStarted)?(n.preventDefault(),!0):(!0===e.data(n.target,this.widgetName+".preventClickEvent")&&e.removeData(n.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(e){return i._mouseMove(e)},this._mouseUpDelegate=function(e){return i._mouseUp(e)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),n.preventDefault(),t=!0,!0))}},_mouseMove:function(e){if(this._mouseMoved&&!e.which)if(e.originalEvent.altKey||e.originalEvent.ctrlKey||e.originalEvent.metaKey||e.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(e);return(e.which||e.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=!1!==this._mouseStart(this._mouseDownEvent,e),this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(n){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,n.target===this._mouseDownEvent.target&&e.data(n.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(n)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,t=!1,n.preventDefault()},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})}),function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","./mouse","../data","../plugin","../scroll-parent","../version","../widget"],e):e(jQuery)}(function(e){"use strict";return e.widget("ui.draggable",e.ui.mouse,{version:"1.14.1",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"===this.options.helper&&this._setPositionRelative(),this.options.addClasses&&this._addClass("ui-draggable"),this._setHandleClassName(),this._mouseInit()},_setOption:function(e,t){this._super(e,t),"handle"===e&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){(this.helper||this.element).is(".ui-draggable-dragging")?this.destroyOnClear=!0:(this._removeHandleClassName(),this._mouseDestroy())},_mouseCapture:function(t){var n=this.options;return!(this.helper||n.disabled||e(t.target).closest(".ui-resizable-handle").length>0)&&(this.handle=this._getHandle(t),!!this.handle&&(this._blurActiveElement(t),this._blockFrames(!0===n.iframeFix?"iframe":n.iframeFix),!0))},_blockFrames:function(t){this.iframeBlocks=this.document.find(t).map(function(){var t=e(this);return e("<div>").css("position","absolute").appendTo(t.parent()).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()).offset(t.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(t){var n=this.document[0].activeElement;e(t.target).closest(n).length||e(n).trigger("blur")},_mouseStart:function(t){var n=this.options;return this.helper=this._createHelper(t),this._addClass(this.helper,"ui-draggable-dragging"),this._cacheHelperProportions(),e.ui.ddmanager&&(e.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=this.helper.parents().filter(function(){return"fixed"===e(this).css("position")}).length>0,this.positionAbs=this.element.offset(),this._refreshOffsets(t),this.originalPosition=this.position=this._generatePosition(t,!1),this.originalPageX=t.pageX,this.originalPageY=t.pageY,n.cursorAt&&this._adjustOffsetFromHelper(n.cursorAt),this._setContainment(),!1===this._trigger("start",t)?(this._clear(),!1):(this._cacheHelperProportions(),e.ui.ddmanager&&!n.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this._mouseDrag(t,!0),e.ui.ddmanager&&e.ui.ddmanager.dragStart(this,t),!0)},_refreshOffsets:function(e){this.offset={top:this.positionAbs.top-this.margins.top,left
vendor: 3,333 bytes, lines 9-10
9:this.positionAbs.left-this.margins.left,scroll:!1,parent:this._getParentOffset(),relative:this._getRelativeOffset()},this.offset.click={left:e.pageX-this.offset.left,top:e.pageY-this.offset.top}},_mouseDrag:function(t,n){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(t,!0),this.positionAbs=this._convertPositionTo("absolute"),!n){var i=this._uiHash();if(!1===this._trigger("drag",t,i))return this._mouseUp(new e.Event("mouseup",t)),!1;this.position=i.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),!1},_mouseStop:function(t){var n=this,i=!1;return e.ui.ddmanager&&!this.options.dropBehaviour&&(i=e.ui.ddmanager.drop(this,t)),this.dropped&&(i=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!i||"valid"===this.options.revert&&i||!0===this.options.revert||"function"==typeof this.options.revert&&this.options.revert.call(this.element,i)?e(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){
10!1!==n._trigger("stop",t)&&n._clear()}):!1!==this._trigger("stop",t)&&this._clear(),!1},_mouseUp:function(t){return this._unblockFrames(),e.ui.ddmanager&&e.ui.ddmanager.dragStop(this,t),this.handleElement.is(t.target)&&this.element.trigger("focus"),e.ui.mouse.prototype._mouseUp.call(this,t)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp(new e.Event("mouseup",{target:this.element[0]})):this._clear(),this},_getHandle:function(t){return!this.options.handle||!!e(t.target).closest(this.element.find(this.options.handle)).length},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this._addClass(this.handleElement,"ui-draggable-handle")},_removeHandleClassName:function(){this._removeClass(this.handleElement,"ui-draggable-handle")},_createHelper:function(t){var n=this.options,i="function"==typeof n.helper,o=i?e(n.helper.apply(this.element[0],[t])):"clone"===n.helper?this.element.clone().removeAttr("id"):this.element;return o.parents("body").length||o.appendTo("parent"===n.appendTo?this.element[0].parentNode:n.appendTo),i&&o[0]===this.element[0]&&this._setPositionRelative(),o[0]===this.element[0]||/(fixed|absolute)/.test(o.css("position"))||o.css("position","absolute"),o},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),Array.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_isRootNode:function(e){return/(html|body)/i.test(e.tagName)||e===this.document[0]},_getParentOffset:function(){var t=this.offsetParent.offset(),n=this.document[0];return"absolute"===this.cssPosition&&this.scrollParent[0]!==n&&e.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),this._isRo
vendor: 4,335 bytes, line 10
10otNode(this.offsetParent[0])&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var e=this.element.position(),t=this._isRootNode(this.scrollParent[0]);return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+(t?0:this.scrollParent.scrollTop()),left:e.left-(parseInt(this.helper.css("left"),10)||0)+(t?0:this.scrollParent.scrollLeft())}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,n,i,o=this.options,r=this.document[0];this.relativeContainer=null,o.containment?"window"!==o.containment?"document"!==o.containment?o.containment.constructor!==Array?("parent"===o.containment&&(o.containment=this.helper[0].parentNode),(i=(n=e(o.containment))[0])&&(t=/(scroll|auto)/.test(n.css("overflow")),this.containment=[(parseInt(n.css("borderLeftWidth"),10)||0)+(parseInt(n.css("paddingLeft"),10)||0),(parseInt(n.css("borderTopWidth"),10)||0)+(parseInt(n.css("paddingTop"),10)||0),(t?Math.max(i.scrollWidth,i.offsetWidth):i.offsetWidth)-(parseInt(n.css("borderRightWidth"),10)||0)-(parseInt(n.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(t?Math.max(i.scrollHeight,i.offsetHeight):i.offsetHeight)-(parseInt(n.css("borderBottomWidth"),10)||0)-(parseInt(n.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=n)):this.containment=o.containment:this.containment=[0,0,e(r).width()-this.helperProportions.width-this.margins.left,(e(r).height()||r.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]:this.containment=[e(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,e(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,e(window).scrollLeft()+e(window).width()-this.helperProportions.width-this.margins.left,e(window).scrollTop()+(e(window).height()||r.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]:this.containment=null},_convertPositionTo:function(e,t){t||(t=this.position);var n="absolute"===e?1:-1,i=this._isRootNode(this.scrollParent[0]);return{top:t.top+this.offset.relative.top*n+this.offset.parent.top*n-("fixed"===this.cssPosition?-this.offset.scroll.top:i?0:this.offset.scroll.top)*n,left:t.left+this.offset.relative.left*n+this.offset.parent.left*n-("fixed"===this.cssPosition?-this.offset.scroll.left:i?0:this.offset.scroll.left)*n}},_generatePosition:function(e,t){var n,i,o,r,s=this.options,a=this._isRootNode(this.scrollParent[0]),l=e.pageX,c=e.pageY;return a&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),t&&(this.containment&&(this.relativeContainer?(i=this.relativeContainer.offset(),n=[this.containment[0]+i.left,this.containment[1]+i.top,this.containment[2]+i.left,this.containment[3]+i.top]):n=this.containment,e.pageX-this.offset.click.left<n[0]&&(l=n[0]+this.offset.click.left),e.pageY-this.offset.click.top<n[1]&&(c=n[1]+this.offset.click.top),e.pageX-this.offset.click.left>n[2]&&(l=n[2]+this.offset.click.left),e.pageY-this.offset.click.top>n[3]&&(c=n[3]+this.offset.click.top)),s.grid&&(o=s.grid[1]?this.originalPageY+Math.round((c-this.originalPageY)/s.grid[1])*s.grid[1]:this.originalPageY,c=n?o-this.offset.click.top>=n[1]||o-this.offset.click.top>n[3]?o:o-this.offset.click.top>=n[1]?o-s.grid[1]:o+s.grid[1]:o,r=s.grid[0]?this.originalPageX+Math.round((l-this.originalPageX)/s.grid[0])*s.grid[0]:this.originalPageX,l=n?r-this.offset.click.left>=n[0]||r-this.offset.click.left>n[2]?r:r-this.offset.click.left>=n[0]?r-s.grid[0]:r+s.grid[0]:r),"y"===s.axis&&(l=this.originalPageX),"x"===s.axis&&(c=this.originalPageY)),{top:c-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:a?0:this.offset.scroll.top),left
vendor: 5,325 bytes, line 10
10:l-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:a?0:this.offset.scroll.left)}},_clear:function(){this._removeClass(this.helper,"ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_trigger:function(t,n,i){return i=i||this._uiHash(),e.ui.plugin.call(this,t,[n,i,this],!0),/^(drag|start|stop)/.test(t)&&(this.positionAbs=this._convertPositionTo("absolute"),i.offset=this.positionAbs),e.Widget.prototype._trigger.call(this,t,n,i)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),e.ui.plugin.add("draggable","connectToSortable",{start:function(t,n,i){var o=e.extend({},n,{item:i.element});i.sortables=[],e(i.options.connectToSortable).each(function(){var n=e(this).sortable("instance");n&&!n.options.disabled&&(i.sortables.push(n),n.refreshPositions(),n._trigger("activate",t,o))})},stop:function(t,n,i){var o=e.extend({},n,{item:i.element});i.cancelHelperRemoval=!1,e.each(i.sortables,function(){var e=this;e.isOver?(e.isOver=0,i.cancelHelperRemoval=!0,e.cancelHelperRemoval=!1,e._storedCSS={position:e.placeholder.css("position"),top:e.placeholder.css("top"),left:e.placeholder.css("left")},e._mouseStop(t),e.options.helper=e.options._helper):(e.cancelHelperRemoval=!0,e._trigger("deactivate",t,o))})},drag:function(t,n,i){e.each(i.sortables,function(){var o=!1,r=this;r.positionAbs=i.positionAbs,r.helperProportions=i.helperProportions,r.offset.click=i.offset.click,r._intersectsWith(r.containerCache)&&(o=!0,e.each(i.sortables,function(){return this.positionAbs=i.positionAbs,this.helperProportions=i.helperProportions,this.offset.click=i.offset.click,this!==r&&this._intersectsWith(this.containerCache)&&e.contains(r.element[0],this.element[0])&&(o=!1),o})),o?(r.isOver||(r.isOver=1,i._parent=n.helper.parent(),r.currentItem=n.helper.appendTo(r.element).data("ui-sortable-item",!0),r.options._helper=r.options.helper,r.options.helper=function(){return n.helper[0]},t.target=r.currentItem[0],r._mouseCapture(t,!0),r._mouseStart(t,!0,!0),r.offset.click.top=i.offset.click.top,r.offset.click.left=i.offset.click.left,r.offset.parent.left-=i.offset.parent.left-r.offset.parent.left,r.offset.parent.top-=i.offset.parent.top-r.offset.parent.top,i._trigger("toSortable",t),i.dropped=r.element,e.each(i.sortables,function(){this.refreshPositions()}),i.currentItem=i.element,r.fromOutside=i),r.currentItem&&(r._mouseDrag(t),n.position=r.position)):r.isOver&&(r.isOver=0,r.cancelHelperRemoval=!0,r.options._revert=r.options.revert,r.options.revert=!1,r._trigger("out",t,r._uiHash(r)),r._mouseStop(t,!0),r.options.revert=r.options._revert,r.options.helper=r.options._helper,r.placeholder&&r.placeholder.remove(),n.helper.appendTo(i._parent),i._refreshOffsets(t),n.position=i._generatePosition(t,!0),i._trigger("fromSortable",t),i.dropped=!1,e.each(i.sortables,function(){this.refreshPositions()}))})}}),e.ui.plugin.add("draggable","cursor",{start:function(t,n,i){var o=e("body"),r=i.options;o.css("cursor")&&(r._cursor=o.css("cursor")),o.css("cursor",r.cursor)},stop:function(t,n,i){var o=i.options;o._cursor&&e("body").css("cursor",o._cursor)}}),e.ui.plugin.add("draggable","opacity",{start:function(t,n,i){var o=e(n.helper),r=i.options;o.css("opacity")&&(r._opacity=o.css("opacity")),o.css("opacity",r.opacity)},stop:function(t,n,i){var o=i.options;o._opacity&&e(n.helper).css("opacity",o._opacity)}}),e.ui.plugin.add("draggable","scroll",{start:function(e,t,n){n.scrollParentNotHidden||(n.scrollParentNotHidden=n.helper.scrollParent(!1)),n.scrollParentNotHidden[0]!==n.document[0]&&"HTML"!==n.scrollParentNotHidden[0].tagName&&(n.overflowOffset=n.scrollParentNotHidden.offset())},drag:function(t,n,i){var o=i.options,r=!1,s=i.scrollParentNotHidden[0],a=i.document[0];s!==a&&"HTML"!==s.tagName?(o.axis&&"x"===o.axis||(i.overflowOffset.top+s.offsetHeight-t.pageY<o.scrollSensitivity?s.scrollTop=r=s.scrollTop+o.scrollSpeed:t.pageY-i.overflowOffset.top<o.scrollSensitivity&&(s.scrollTop=r=s.scrollTop-o.scrollSpeed)),o.axis&&"y"===o.axis||(i.overflowOffset.left+s.offsetWidth-t.pageX<o.scrollSensitivity?s.scrollLeft=r=s.scrollLeft+o.scrollSpeed:t.pageX-i.overflowOffset.left<o.scrollSensitivity&&(s.scrollLeft=r=s.scrollLeft-o.scrollSpeed))):(o.axis&&"x"===o.axis||(t.pageY-e(a).scrollTop()<o.scrollSensitivity?r=e(a).scrollTop(e(a).scrollTop()-o.scrollSpeed):e(window).height()-(t.pageY-e(a).scrollTop())<o.scrollSensitivity&&(r=e(a).scrollTop(e(a).scrollTop()+o.scrollSpeed))),o.axis&&"y"===o.axis||(t.pageX-e(a).scrollLeft()<o.scrollSensitivity?r=e(a).scrollLeft(e(a).scrollLeft()-o.scrollSpeed):e(window).width()-(t.pageX-e(a).scrollLeft())<o.scrollSensitivity&&(r=e(a).scrollLeft(e(a).scrollLeft()+o.scrollSpeed)))),!1!==r&&e.ui.ddmanager&&!o.dropBehaviour&&e.ui.ddmanager.prepareOffsets(i,t)}}),e.ui.plugin.add("draggable","snap",{start:function(t,n,i){var o=i.options;i.snapElements=[],e(o.snap.constructor!==String?o.snap.items||":data(ui-draggable)":o.snap).each(function(){var t=e(this),n=t.offset();this!==i.element[0]&&i.snapElements.push({item:this,width:t.outerWidth(),height:t.outerHeight(),top:n.top,left
vendor: 27,911 bytes, lines 10-11
10:n.left})})},drag:function(t,n,i){var o,r,s,a,l,c,d,u,h,p,f=i.options,m=f.snapTolerance,g=n.offset.left,v=g+i.helperProportions.width,y=n.offset.top,b=y+i.helperProportions.height;for(h=i.snapElements.length-1;h>=0;h--)c=(l=i.snapElements[h].left-i.margins.left)+i.snapElements[h].width,u=(d=i.snapElements[h].top-i.margins.top)+i.snapElements[h].height,v<l-m||g>c+m||b<d-m||y>u+m||!e.contains(i.snapElements[h].item.ownerDocument,i.snapElements[h].item)?(i.snapElements[h].snapping&&i.options.snap.release&&i.options.snap.release.call(i.element,t,e.extend(i._uiHash(),{snapItem:i.snapElements[h].item})),i.snapElements[h].snapping=!1):("inner"!==f.snapMode&&(o=Math.abs(d-b)<=m,r=Math.abs(u-y)<=m,s=Math.abs(l-v)<=m,a=Math.abs(c-g)<=m,o&&(n.position.top=i._convertPositionTo("relative",{top:d-i.helperProportions.height,left:0}).top),r&&(n.position.top=i._convertPositionTo("relative",{top:u,left:0}).top),s&&(n.position.left=i._convertPositionTo("relative",{top:0,left:l-i.helperProportions.width}).left),a&&(n.position.left=i._convertPositionTo("relative",{top:0,left:c}).left)),p=o||r||s||a,"outer"!==f.snapMode&&(o=Math.abs(d-y)<=m,r=Math.abs(u-b)<=m,s=Math.abs(l-g)<=m,a=Math.abs(c-v)<=m,o&&(n.position.top=i._convertPositionTo("relative",{top:d,left:0}).top),r&&(n.position.top=i._convertPositionTo("relative",{top:u-i.helperProportions.height,left:0}).top),s&&(n.position.left=i._convertPositionTo("relative",{top:0,left:l}).left),a&&(n.position.left=i._convertPositionTo("relative",{top:0,left:c-i.helperProportions.width}).left)),!i.snapElements[h].snapping&&(o||r||s||a||p)&&i.options.snap.snap&&i.options.snap.snap.call(i.element,t,e.extend(i._uiHash(),{snapItem:i.snapElements[h].item})),i.snapElements[h].snapping=o||r||s||a||p)}}),e.ui.plugin.add("draggable","stack",{start:function(t,n,i){var o,r=i.options,s=e.makeArray(e(r.stack)).sort(function(t,n){return(parseInt(e(t).css("zIndex"),10)||0)-(parseInt(e(n).css("zIndex"),10)||0)});s.length&&(o=parseInt(e(s[0]).css("zIndex"),10)||0,e(s).each(function(t){e(this).css("zIndex",o+t)}),this.css("zIndex",o+s.length))}}),e.ui.plugin.add("draggable","zIndex",{start:function(t,n,i){var o=e(n.helper),r=i.options;o.css("zIndex")&&(r._zIndex=o.css("zIndex")),o.css("zIndex",r.zIndex)},stop:function(t,n,i){var o=i.options;o._zIndex&&e(n.helper).css("zIndex",o._zIndex)}}),e.ui.draggable}),function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","./mouse","../disable-selection","../plugin","../version","../widget"],e):e(jQuery)}(function(e){"use strict";return e.widget("ui.resizable",e.ui.mouse,{version:"1.14.1",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,classes:{"ui-resizable-se":"ui-icon ui-icon-gripsmall-diagonal-se"},containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(e){return parseFloat(e)||0},_isNumber:function(e){return!isNaN(parseFloat(e))},_hasScroll:function(t,n){var i,o=!1,r=e(t).css("overflow");if("hidden"===r)return!1;if("scroll"===r)return!0;if(t[i=n&&"left"===n?"scrollLeft":"scrollTop"]>0)return!0;try{t[i]=1,o=t[i]>0,t[i]=0}catch(e){}return o},_create:function(){var t,n=this.options,i=this;this._addClass("ui-resizable"),e.extend(this,{_aspectRatio:!!n.aspectRatio,aspectRatio:n.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:n.helper||n.ghost||n.animate?n.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(e("<div class='ui-wrapper'></div>").css({overflow:"hidden",position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,t={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")},this.element.css(t),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this._proportionallyResize()),this._setupHandles(),n.autoHide&&e(this.element).on("mouseenter",function(){n.disabled||(i._removeClass("ui-resizable-autohide"),i._handles.show())}).on("mouseleave",function(){n.disabled||i.resizing||(i._addClass("ui-resizable-autohide"),i._handles.hide())}),this._mouseInit()},_destroy:function(){this._mouseDestroy(),this._addedHandles.remove();var t,n=function(t){e(t).removeData("resizable").removeData("ui-resizable").off(".resizable")};return this.elementIsWrapper&&(n(this.element),t=this.element,this.originalElement.css({position:t.css("position"),width:t.outerWidth(),height:t.outerHeight(),top:t.css("top"),left:t.css("left")}).insertAfter(t),t.remove()),this.originalElement.css("resize",this.originalResizeStyle),n(this.originalElement),this},_setOption:function(e,t){switch(this._super(e,t),e){case"handles":this._removeHandles(),this._setupHandles();break;case"aspectRatio":this._aspectRatio=!!t}},_setupHandles:function(){var t,n,i,o,r,s=this.options,a=this;if(this.handles=s.handles||(e(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=e(),this._addedHandles=e(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),i=this.handles.split(","),this.handles={},n=0;n<i.length;n++)o="ui-resizable-"+(t=String.prototype.trim.call(i[n])),r=e("<div>"),this._addClass(r,"ui-resizable-handle "+o),r.css({zIndex:s.zIndex}),this.handles[t]=".ui-resizable-"+t,this.element.children(this.handles[t]).length||(this.element.append(r),this._addedHandles=this._addedHandles.add(r));this._renderAxis=function(t){var n,i,o,r;for(n in t=t||this.element,this.handles)this.handles[n].constructor===String?this.handles[n]=this.element.children(this.handles[n]).first().show():(this.handles[n].jquery||this.handles[n].nodeType)&&(this.handles[n]=e(this.handles[n]),this._on(this.handles[n],{mousedown:a._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(i=e(this.handles[n],this.element),r=/sw|ne|nw|se|n|s/.test(n)?i.outerHeight():i.outerWidth(),o=["padding",/ne|nw|n/.test(n)?"Top":/se|sw|s/.test(n)?"Bottom":/^e$/.test(n)?"Right":"Left"].join(""),t.css(o,r),this._proportionallyResize()),this._handles=this._handles.add(this.handles[n])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.on("mouseover",function(){a.resizing||(this.className&&(r=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),a.axis=r&&r[1]?r[1]:"se")}),s.autoHide&&(this._handles.hide(),this._addClass("ui-resizable-autohide"))},_removeHandles:function(){this._addedHandles.remove()},_mouseCapture:function(t){var n,i,o=!1;for(n in this.handles)((i=e(this.handles[n])[0])===t.target||e.contains(i,t.target))&&(o=!0);return!this.options.disabled&&o},_mouseStart:function(t){var n,i,o,r,s=this.options,a=this.element;return this.resizing=!0,this._renderProxy(),n=this._num(this.helper.css("left")),i=this._num(this.helper.css("top")),s.containment&&(n+=e(s.containment).scrollLeft()||0,i+=e(s.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:n,top:i},this._helper||(r=this._calculateAdjustedElementDimensions(a)),this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:r.width,height:r.height},this.originalSize=this._helper?{width:a.outerWidth(),height:a.outerHeight()}:{width:r.width,height:r.height},this.sizeDiff={width:a.outerWidth()-a.width(),height:a.outerHeight()-a.height()},this.originalPosition={left:n,top:i},this.originalMousePosition={left:t.pageX,top:t.pageY},this.aspectRatio="number"==typeof s.aspectRatio?s.aspectRatio:this.originalSize.width/this.originalSize.height||1,o=e(".ui-resizable-"+this.axis).css("cursor"),e("body").css("cursor","auto"===o?this.axis+"-resize":o),this._addClass("ui-resizable-resizing"),this._propagate("start",t),!0},_mouseDrag:function(t){var n,i,o=this.originalMousePosition,r=this.axis,s=t.pageX-o.left||0,a=t.pageY-o.top||0,l=this._change[r];return this._updatePrevProperties(),!!l&&(n=l.apply(this,[t,s,a]),this._updateVirtualBoundaries(t.shiftKey),(this._aspectRatio||t.shiftKey)&&(n=this._updateRatio(n,t)),n=this._respectSize(n,t),this._updateCache(n),this._propagate("resize",t),i=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),e.isEmptyObject(i)||(this._updatePrevProperties(),this._trigger("resize",t,this.ui()),this._applyChanges()),!1)},_mouseStop:function(t){this.resizing=!1;var n,i,o,r,s,a,l,c=this.options,d=this;return this._helper&&(o=(i=(n=this._proportionallyResizeElements).length&&/textarea/i.test(n[0].nodeName))&&this._hasScroll(n[0],"left")?0:d.sizeDiff.height,r=i?0:d.sizeDiff.width,s={width:d.helper.width()-r,height:d.helper.height()-o},a=parseFloat(d.element.css("left"))+(d.position.left-d.originalPosition.left)||null,l=parseFloat(d.element.css("top"))+(d.position.top-d.originalPosition.top)||null,c.animate||this.element.css(e.extend(s,{top:l,left:a})),d.helper.height(d.size.height),d.helper.width(d.size.width),this._helper&&!c.animate&&this._proportionallyResize()),e("body").css("cursor","auto"),this._removeClass("ui-resizable-resizing"),this._propagate("stop",t),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var e={};return this.position.top!==this.prevPosition.top&&(e.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(e.left=this.position.left+"px"),this.helper.css(e),this.size.width!==this.prevSize.width&&(e.width=this.size.width+"px",this.helper.width(e.width)),this.size.height!==this.prevSize.height&&(e.height=this.size.height+"px",this.helper.height(e.height)),e},_updateVirtualBoundaries:function(e){var t,n,i,o,r,s=this.options;r={minWidth:this._isNumber(s.minWidth)?s.minWidth:0,maxWidth:this._isNumber(s.maxWidth)?s.maxWidth:1/0,minHeight:this._isNumber(s.minHeight)?s.minHeight:0,maxHeight:this._isNumber(s.maxHeight)?s.maxHeight:1/0},(this._aspectRatio||e)&&(t=r.minHeight*this.aspectRatio,i=r.minWidth/this.aspectRatio,n=r.maxHeight*this.aspectRatio,o=r.maxWidth/this.aspectRatio,t>r.minWidth&&(r.minWidth=t),i>r.minHeight&&(r.minHeight=i),n<r.maxWidth&&(r.maxWidth=n),o<r.maxHeight&&(r.maxHeight=o)),this._vBoundaries=r},_updateCache:function(e){this.offset=this.helper.offset(),this._isNumber(e.left)&&(this.position.left=e.left),this._isNumber(e.top)&&(this.position.top=e.top),this._isNumber(e.height)&&(this.size.height=e.height),this._isNumber(e.width)&&(this.size.width=e.width)},_updateRatio:function(e){var t=this.position,n=this.size,i=this.axis;return this._isNumber(e.height)?e.width=e.height*this.aspectRatio:this._isNumber(e.width)&&(e.height=e.width/this.aspectRatio),"sw"===i&&(e.left=t.left+(n.width-e.width),e.top=null),"nw"===i&&(e.top=t.top+(n.height-e.height),e.left=t.left+(n.width-e.width)),e},_respectSize:function(e){var t=this._vBoundaries,n=this.axis,i=this._isNumber(e.width)&&t.maxWidth&&t.maxWidth<e.width,o=this._isNumber(e.height)&&t.maxHeight&&t.maxHeight<e.height,r=this._isNumber(e.width)&&t.minWidth&&t.minWidth>e.width,s=this._isNumber(e.height)&&t.minHeight&&t.minHeight>e.height,a=this.originalPosition.left+this.originalSize.width,l=this.originalPosition.top+this.originalSize.height,c=/sw|nw|w/.test(n),d=/nw|ne|n/.test(n);return r&&(e.width=t.minWidth),s&&(e.height=t.minHeight),i&&(e.width=t.maxWidth),o&&(e.height=t.maxHeight),r&&c&&(e.left=a-t.minWidth),i&&c&&(e.left=a-t.maxWidth),s&&d&&(e.top=l-t.minHeight),o&&d&&(e.top=l-t.maxHeight),e.width||e.height||e.left||!e.top?e.width||e.height||e.top||!e.left||(e.left=null):e.top=null,e},_getPaddingPlusBorderDimensions:function(e){for(var t=0,n=[],i=[e.css("borderTopWidth"),e.css("borderRightWidth"),e.css("borderBottomWidth"),e.css("borderLeftWidth")],o=[e.css("paddingTop"),e.css("paddingRight"),e.css("paddingBottom"),e.css("paddingLeft")];t<4;t++)n[t]=parseFloat(i[t])||0,n[t]+=parseFloat(o[t])||0;return{height:n[0]+n[2],width:n[1]+n[3]}},_calculateAdjustedElementDimensions:function(e){var t,n,i,o=e.get(0);return"content-box"!==e.css("box-sizing")||!this._hasScroll(o)&&!this._hasScroll(o,"left")?{height:parseFloat(e.css("height")),width:parseFloat(e.css("width"))}:(t=parseFloat(o.style.width),n=parseFloat(o.style.height),i=this._getPaddingPlusBorderDimensions(e),t=isNaN(t)?this._getElementTheoreticalSize(e,i,"width"):t,{height:n=isNaN(n)?this._getElementTheoreticalSize(e,i,"height"):n,width:t})},_getElementTheoreticalSize:function(e,t,n){return Math.max(0,Math.ceil(e.get(0)["offset"+n[0].toUpperCase()+n.slice(1)]-t[n]-.5))||0},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var e,t=0,n=this.helper||this.element;t<this._proportionallyResizeElements.length;t++)e=this._proportionallyResizeElements[t],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(e)),e.css({height:n.height()-this.outerDimensions.height||0,width:n.width()-this.outerDimensions.width||0})},_renderProxy:function(){var t=this.element,n=this.options;this.elementOffset=t.offset(),this._helper?(this.helper=this.helper||e("<div></div>").css({overflow:"hidden"}),this._addClass(this.helper,this._helper),this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++n.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(e,t){return{width:this.originalSize.width+t}},w:function(e,t){var n=this.originalSize;return{left:this.originalPosition.left+t,width:n.width-t}},n:function(e,t,n){var i=this.originalSize;return{top:this.originalPosition.top+n,height:i.height-n}},s:function(e,t,n){return{height:this.originalSize.height+n}},se:function(t,n,i){return e.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[t,n,i]))},sw:function(t,n,i){return e.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[t,n,i]))},ne:function(t,n,i){return e.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[t,n,i]))},nw:function(t,n,i){return e.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[t,n,i]))}},_propagate:function(t,n){e.ui.plugin.call(this,t,[n,this.ui()]),"resize"!==t&&this._trigger(t,n,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),e.ui.plugin.add("resizable","animate",{stop:function(t){var n=e(this).resizable("instance"),i=n.options,o=n._proportionallyResizeElements,r=o.length&&/textarea/i.test(o[0].nodeName),s=r&&n._hasScroll(o[0],"left")?0:n.sizeDiff.height,a=r?0:n.sizeDiff.width,l={width:n.size.width-a,height:n.size.height-s},c=parseFloat(n.element.css("left"))+(n.position.left-n.originalPosition.left)||null,d=parseFloat(n.element.css("top"))+(n.position.top-n.originalPosition.top)||null;n.element.animate(e.extend(l,d&&c?{top:d,left:c}:{}),{duration:i.animateDuration,easing:i.animateEasing,step:function(){var i={width:parseFloat(n.element.css("width")),height:parseFloat(n.element.css("height")),top:parseFloat(n.element.css("top")),left:parseFloat(n.element.css("left"))};o&&o.length&&e(o[0]).css({width:i.width,height:i.height}),n._updateCache(i),n._propagate("resize",t)}})}}),e.ui.plugin.add("resizable","containment",{start:function(){var t,n,i,o,r,s,a,l=e(this).resizable("instance"),c=l.options,d=l.element,u=c.containment,h=u instanceof e?u.get(0):/parent/.test(u)?d.parent().get(0):u;h&&(l.containerElement=e(h),/document/.test(u)||u===document?(l.containerOffset={left:0,top:0},l.containerPosition={left:0,top:0},l.parentData={element:e(document),left:0,top:0,width:e(document).width(),height:e(document).height()||document.body.parentNode.scrollHeight}):(t=e(h),n=[],e(["Top","Right","Left","Bottom"]).each(function(e,i){n[e]=l._num(t.css("padding"+i))}),l.containerOffset=t.offset(),l.containerPosition=t.position(),l.containerSize={height:t.innerHeight()-n[3],width:t.innerWidth()-n[1]},i=l.containerOffset,o=l.containerSize.height,r=l.containerSize.width,s=l._hasScroll(h,"left")?h.scrollWidth:r,a=l._hasScroll(h)?h.scrollHeight:o,l.parentData={element:h,left:i.left,top:i.top,width:s,height:a}))},resize:function(t){var n,i,o,r,s=e(this).resizable("instance"),a=s.options,l=s.containerOffset,c=s.position,d=s._aspectRatio||t.shiftKey,u={top:0,left:0},h=s.containerElement,p=!0;h[0]!==document&&/static/.test(h.css("position"))&&(u=l),c.left<(s._helper?l.left:0)&&(s.size.width=s.size.width+(s._helper?s.position.left-l.left:s.position.left-u.left),d&&(s.size.height=s.size.width/s.aspectRatio,p=!1),s.position.left=a.helper?l.left:0),c.top<(s._helper?l.top:0)&&(s.size.height=s.size.height+(s._helper?s.position.top-l.top:s.position.top),d&&(s.size.width=s.size.height*s.aspectRatio,p=!1),s.position.top=s._helper?l.top:0),o=s.containerElement.get(0)===s.element.parent().get(0),r=/relative|absolute/.test(s.containerElement.css("position")),o&&r?(s.offset.left=s.parentData.left+s.position.left,s.offset.top=s.parentData.top+s.position.top):(s.offset.left=s.element.offset().left,s.offset.top=s.element.offset().top),n=Math.abs(s.sizeDiff.width+(s._helper?s.offset.left-u.left:s.offset.left-l.left)),i=Math.abs(s.sizeDiff.height+(s._helper?s.offset.top-u.top:s.offset.top-l.top)),n+s.size.width>=s.parentData.width&&(s.size.width=s.parentData.width-n,d&&(s.size.height=s.size.width/s.aspectRatio,p=!1)),i+s.size.height>=s.parentData.height&&(s.size.height=s.parentData.height-i,d&&(s.size.width=s.size.height*s.aspectRatio,p=!1)),p||(s.position.left=s.prevPosition.left,s.position.top=s.prevPosition.top,s.size.width=s.prevSize.width,s.size.height=s.prevSize.height)},stop:function(){var t=e(this).resizable("instance"),n=t.options,i=t.containerOffset,o=t.containerPosition,r=t.containerElement,s=e(t.helper),a=s.offset(),l=s.outerWidth()-t.sizeDiff.width,c=s.outerHeight()-t.sizeDiff.height;t._helper&&!n.animate&&/relative/.test(r.css("position"))&&e(this).css({left:a.left-o.left-i.left,width:l,height:c}),t._helper&&!n.animate&&/static/.test(r.css("position"))&&e(this).css({left:a.left-o.left-i.left,width:l,height:c})}}),e.ui.plugin.add("resizable","alsoResize",{start:function(){var t=e(this).resizable("instance"),n=t.options;e(n.alsoResize).each(function(){var n=e(this),i=t._calculateAdjustedElementDimensions(n);n.data("ui-resizable-alsoresize",{width:i.width,height:i.height,left:parseFloat(n.css("left")),top:parseFloat(n.css("top"))})})},resize:function(t,n){var i=e(this).resizable("instance"),o=i.options,r=i.originalSize,s=i.originalPosition,a={height:i.size.height-r.height||0,width:i.size.width-r.width||0,top:i.position.top-s.top||0,left:i.position.left-s.left||0};e(o.alsoResize).each(function(){var t=e(this),i=e(this).data("ui-resizable-alsoresize"),o={},r=t.parents(n.originalElement[0]).length?["width","height"]:["width","height","top","left"];e.each(r,function(e,t){var n=(i[t]||0)+(a[t]||0);n&&n>=0&&(o[t]=n||null)}),t.css(o)})},stop:function(){e(this).removeData("ui-resizable-alsoresize")}}),e.ui.plugin.add("resizable","ghost",{start:function(){var t=e(this).resizable("instance"),n=t.size;t.ghost=t.originalElement.clone(),t.ghost.css({opacity:.25,display:"block",position:"relative",height:n.height,width:n.width,margin:0,left:0,top:0}),t._addClass(t.ghost,"ui-resizable-ghost"),!0===e.uiBackCompat&&"string"==typeof t.options.ghost&&t.ghost.addClass(this.options.ghost),t.ghost.appendTo(t.helper)},resize:function(){var t=e(this).resizable("instance");t.ghost&&t.ghost.css({position:"relative",height:t.size.height,width:t.size.width})},stop:function(){var t=e(this).resizable("instance");t.ghost&&t.helper&&t.helper.get(0).removeChild(t.ghost.get(0))}}),e.ui.plugin.add("resizable","grid",{resize:function(){
11var t,n=e(this).resizable("instance"),i=n.options,o=n.size,r=n.originalSize,s=n.originalPosition,a=n.axis,l="number"==typeof i.grid?[i.grid,i.grid]:i.grid,c=l[0]||1,d=l[1]||1,u=Math.round((o.width-r.width)/c)*c,h=Math.round((o.height-r.height)/d)*d,p=r.width+u,f=r.height+h,m=i.maxWidth&&i.maxWidth<p,g=i.maxHeight&&i.maxHeight<f,v=i.minWidth&&i.minWidth>p,y=i.minHeight&&i.minHeight>f;i.grid=l,v&&(p+=c),y&&(f+=d),m&&(p-=c),g&&(f-=d),/^(se|s|e)$/.test(a)?(n.size.width=p,n.size.height=f):/^(ne)$/.test(a)?(n.size.width=p,n.size.height=f,n.position.top=s.top-h):/^(sw)$/.test(a)?(n.size.width=p,n.size.height=f,n.position.left=s.left-u):((f-d<=0||p-c<=0)&&(t=n._getPaddingPlusBorderDimensions(this)),f-d>0?(n.size.height=f,n.position.top=s.top-h):(f=d-t.height,n.size.height=f,n.position.top=s.top+r.height-f),p-c>0?(n.size.width=p,n.position.left=s.left-u):(p=c-t.width,n.size.width=p,n.position.left=s.left+r.width-p))}}),e.ui.resizable}),function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","./button","./draggable","./mouse","./resizable","../focusable","../keycode","../position","../tabbable","../unique-id","../version","../widget"],e):e(jQuery)}(function(e){"use strict";return e.widget("ui.dialog",{version:"1.14.1",options:{appendTo:"body",autoOpen:!0,buttons:[],classes:{"ui-dialog":"ui-corner-all","ui-dialog-titlebar":"ui-corner-all"},closeOnEscape:!0,closeText:"Close",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(t){var n=e(this).css(t).offset().top;n<0&&e(this).css("top",t.top-n)}},resizable:!0,show:null,title:null,uiDialogTitleHeadingLevel:0,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},sizeRelatedOptions:{buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},resizableRelatedOptions:{maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height},this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.originalTitle=this.element.attr("title"),null==this.options.title&&null!=this.originalTitle&&(this.options.title=this.originalTitle),this.options.disabled&&(this.options.disabled=!1),this._createWrapper(),this.element.show().removeAttr("title").appendTo(this.uiDialog),this._addClass("ui-dialog-content","ui-widget-content"),this._createTitlebar(),this._createButtonPane(),this.options.draggable&&e.fn.draggable&&this._makeDraggable(),this.options.resizable&&e.fn.resizable&&this._makeResizable(),this._isOpen=!1,this._trackFocus()},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var t=this.options.appendTo;return t&&(t.jquery||t.nodeType)?e(t):this.document.find(t||"body").eq(0)},_destroy:function(){var e,t=this.originalPosition;this._untrackInstance(),this._destroyOverlay(),this.element.removeUniqueId().css(this.originalCss).detach(),this.uiDialog.remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),(e=t.parent.children().eq(t.index)).length&&e[0]!==this.element[0]?e.before(this.element):t.parent.append(this.element)},widget:function(){return this.uiDialog},disable:e.noop,enable:e.noop,close:function(t){var n=this;this._isOpen&&!1!==this._trigger("beforeClose",t)&&(this._isOpen=!1,this._focusedElement=null,this._destroyOverlay(),this._untrackInstance(),this.opener.filter(":focusable").trigger("focus").length||e(this.document[0].activeElement).trigger("blur"),this._hide(this.uiDialog,this.options.hide,function(){n._trigger("close",t)}))},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(t,n){var i=!1,o=this.uiDialog.siblings(".ui-front:visible").map(function(){return+e(this).css("z-index")}).get(),r=Math.max.apply(null,o);return r>=+this.uiDialog.css("z-index")&&(this.uiDialog.css("z-index",r+1),i=!0),i&&!n&&this._trigger("focus",t),i},open:function(){var t=this;this._isOpen?this._moveToTop()&&this._focusTabbable():(this._isOpen=!0,this.opener=e(this.document[0].activeElement),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this.overlay&&this.overlay.css("z-index",this.uiDialog.css("z-index")-1),this._show(this.uiDialog,this.options.show,function(){t._focusTabbable(),t._trigger("focus")}),this._makeFocusTarget(),this._trigger("open"))},_focusTabbable:function(){var e=this._focusedElement;e||(e=this.element.find("[autofocus]")),e.length||(e=this.element.find(":tabbable")),e.length||(e=this.uiDialogButtonPane.find(":tabbable")),e.length||(e=this.uiDialogTitlebarClose.filter(":tabbable")),e.length||(e=this.uiDialog),e.eq(0).trigger("focus")},_restoreTabbableFocus:function(){var t=this.document[0].activeElement;this.uiDialog[0]===t||e.contains(this.uiDialog[0],t)||this._focusTabbable()},_keepFocus:function(e){e.preventDefault(),this._restoreTabbableFocus()},_createWrapper:function(){this.uiDialog=e("<div>").hide().attr({tabIndex:-1,role:"dialog","aria-modal":this.options.modal?"true":null}).appendTo(this._appendTo()),this._addClass(this.uiDialog,"ui-dialog","ui-widget ui-widget-content ui-front"),this._on(this.uiDialog,{keydown:function(t){if(this.options.closeOnEscape&&!t.isDefaultPrevented()&&t.keyCode&&t.keyCode===e.ui.keyCode.ESCAPE)return t.preventDefault(),void this.close(t);if(t.keyCode===e.ui.keyCode.TAB&&!t.isDefaultPrevented()){var n=this.uiDialog.find(":tabbable"),i=n.first(),o=n.last();t.target!==o[0]&&t.target!==this.uiDialog[0]||t.shiftKey?t.target!==i[0]&&t.target!==this.uiDialog[0]||!t.shiftKey||(this._delay(function(){o.trigger("focus")}),t.preventDefault()):(this._delay(function(){i.trigger("focus")}),t.preventDefault())}},mousedown:function(e){this._moveToTop(e)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var t;this.uiDialogTitlebar=e("<div>"),this._addClass(this.uiDialogTitlebar,"ui-dialog-titlebar","ui-widget-header ui-helper-clearfix"),this._on(this.uiDialogTitlebar,{mousedown:function(t){e(t.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.trigger("focus")}}),this.uiDialogTitlebarClose=e("<button type='button'></button>").button({label:e("<a>").text(this.options.closeText).html(),icon:"ui-icon-closethick",showLabel:!1}).appendTo(this.uiDialogTitlebar),this._addClass(this.uiDialogTitlebarClose,"ui-dialog-titlebar-close"),this._on(this.uiDialogTitlebarClose,{click:function(e){e.preventDefault(),this.close(e)}});var n=Number.isInteger(this.options.uiDialogTitleHeadingLevel)&&this.options.uiDialogTitleHeadingLevel>0&&this.options.uiDialogTitleHeadingLevel<=6?"h"+this.options.uiDialogTitleHeadingLevel:"span";t=e("<"+n+">").uniqueId().prependTo(this.uiDialogTitlebar),this._addClass(t,"ui-dialog-title"),this._title(t),this.uiDialogTitlebar.prepe
vendor: 12,831 bytes, line 11
11ndTo(this.uiDialog),this.uiDialog.attr({"aria-labelledby":t.attr("id")})},_title:function(e){this.options.title?e.text(this.options.title):e.html("&#160;")},_createButtonPane:function(){this.uiDialogButtonPane=e("<div>"),this._addClass(this.uiDialogButtonPane,"ui-dialog-buttonpane","ui-widget-content ui-helper-clearfix"),this.uiButtonSet=e("<div>").appendTo(this.uiDialogButtonPane),this._addClass(this.uiButtonSet,"ui-dialog-buttonset"),this._createButtons()},_createButtons:function(){var t=this,n=this.options.buttons;this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),e.isEmptyObject(n)||Array.isArray(n)&&!n.length?this._removeClass(this.uiDialog,"ui-dialog-buttons"):(e.each(n,function(n,i){var o,r;i="function"==typeof i?{click:i,text:n}:i,i=e.extend({type:"button"},i),o=i.click,r={icon:i.icon,iconPosition:i.iconPosition,showLabel:i.showLabel,icons:i.icons,text:i.text},delete i.click,delete i.icon,delete i.iconPosition,delete i.showLabel,delete i.icons,"boolean"==typeof i.text&&delete i.text,e("<button></button>",i).button(r).appendTo(t.uiButtonSet).on("click",function(){o.apply(t.element[0],arguments)})}),this._addClass(this.uiDialog,"ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog))},_makeDraggable:function(){function t(e){return{position:e.position,offset:e.offset}}var n=this,i=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(i,o){n._addClass(e(this),"ui-dialog-dragging"),n._blockFrames(),n._trigger("dragStart",i,t(o))},drag:function(e,i){n._trigger("drag",e,t(i))},stop:function(o,r){var s=r.offset.left-n.document.scrollLeft(),a=r.offset.top-n.document.scrollTop();i.position={my:"left top",at:"left"+(s>=0?"+":"")+s+" top"+(a>=0?"+":"")+a,of:n.window},n._removeClass(e(this),"ui-dialog-dragging"),n._unblockFrames(),n._trigger("dragStop",o,t(r))}})},_makeResizable:function(){function t(e){return{originalPosition:e.originalPosition,originalSize:e.originalSize,position:e.position,size:e.size}}var n=this,i=this.options,o=i.resizable,r=this.uiDialog.css("position"),s="string"==typeof o?o:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:i.maxWidth,maxHeight:i.maxHeight,minWidth:i.minWidth,minHeight:this._minHeight(),handles:s,start:function(i,o){n._addClass(e(this),"ui-dialog-resizing"),n._blockFrames(),n._trigger("resizeStart",i,t(o))},resize:function(e,i){n._trigger("resize",e,t(i))},stop:function(o,r){var s=n.uiDialog.offset(),a=s.left-n.document.scrollLeft(),l=s.top-n.document.scrollTop();i.height=n.uiDialog.height(),i.width=n.uiDialog.width(),i.position={my:"left top",at:"left"+(a>=0?"+":"")+a+" top"+(l>=0?"+":"")+l,of:n.window},n._removeClass(e(this),"ui-dialog-resizing"),n._unblockFrames(),n._trigger("resizeStop",o,t(r))}}).css("position",r)},_trackFocus:function(){this._on(this.widget(),{focusin:function(t){this._makeFocusTarget(),this._focusedElement=e(t.target)}})},_makeFocusTarget:function(){this._untrackInstance(),this._trackingInstances().unshift(this)},_untrackInstance:function(){var t=this._trackingInstances(),n=e.inArray(this,t);-1!==n&&t.splice(n,1)},_trackingInstances:function(){var e=this.document.data("ui-dialog-instances");return e||(e=[],this.document.data("ui-dialog-instances",e)),e},_minHeight:function(){var e=this.options;return"auto"===e.height?e.minHeight:Math.min(e.minHeight,e.height)},_position:function(){var e=this.uiDialog.is(":visible");e||this.uiDialog.show(),this.uiDialog.position(this.options.position),e||this.uiDialog.hide()},_setOptions:function(t){var n=this,i=!1,o={};e.each(t,function(e,t){n._setOption(e,t),e in n.sizeRelatedOptions&&(i=!0),e in n.resizableRelatedOptions&&(o[e]=t)}),i&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",o)},_setOption:function(t,n){var i,o,r=this.uiDialog;"disabled"!==t&&(this._super(t,n),"appendTo"===t&&this.uiDialog.appendTo(this._appendTo()),"buttons"===t&&this._createButtons(),"closeText"===t&&this.uiDialogTitlebarClose.button({label:e("<a>").text(""+this.options.closeText).html()}),"draggable"===t&&((i=r.is(":data(ui-draggable)"))&&!n&&r.draggable("destroy"),!i&&n&&this._makeDraggable()),"position"===t&&this._position(),"resizable"===t&&((o=r.is(":data(ui-resizable)"))&&!n&&r.resizable("destroy"),o&&"string"==typeof n&&r.resizable("option","handles",n),o||!1===n||this._makeResizable()),"title"===t&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")),"modal"===t&&r.attr("aria-modal",n?"true":null))},_size:function(){var e,t,n,i=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),i.minWidth>i.width&&(i.width=i.minWidth),e=this.uiDialog.css({height:"auto",width:i.width}).outerHeight(),t=Math.max(0,i.minHeight-e),n="number"==typeof i.maxHeight?Math.max(0,i.maxHeight-e):"none","auto"===i.height?this.element.css({minHeight:t,maxHeight:n,height:"auto"}):this.element.height(Math.max(0,i.height-e)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var t=e(this);return e("<div>").css({position:"absolute",width:t.outerWidth(),height:t.outerHeight()}).appendTo(t.parent()).offset(t.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(t){return!!e(t.target).closest(".ui-dialog").length||!!e(t.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var t=!0;this._delay(function(){t=!1}),this.document.data("ui-dialog-overlays")||this.document.on("focusin.ui-dialog",function(e){if(!t){var n=this._trackingInstances()[0];n._allowInteraction(e)||(e.preventDefault(),n._focusTabbable())}}.bind(this)),this.overlay=e("<div>").appendTo(this._appendTo()),this._addClass(this.overlay,null,"ui-widget-overlay ui-front"),this._on(this.overlay,{mousedown:"_keepFocus"}),this.document.data("ui-dialog-overlays",(this.document.data("ui-dialog-overlays")||0)+1)}},_destroyOverlay:function(){if(this.options.modal&&this.overlay){var e=this.document.data("ui-dialog-overlays")-1;e?this.document.data("ui-dialog-overlays",e):(this.document.off("focusin.ui-dialog"),this.document.removeData("ui-dialog-overlays")),this.overlay.remove(),this.overlay=null}}}),!0===e.uiBackCompat&&e.widget("ui.dialog",e.ui.dialog,{options:{dialogClass:""},_createWrapper:function(){this._super(),this.uiDialog.addClass(this.options.dialogClass)},_setOption:function(e,t){"dialogClass"===e&&this.uiDialog.removeClass(this.options.dialogClass).addClass(t),this._superApply(arguments)}}),e.ui.dialog}),function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","./draggable","./mouse","../version","../widget"],e):e(jQuery)}(function(e){"use strict";return e.widget("ui.droppable",{version:"1.14.1",widgetEventPrefix:"drop",options:{accept:"*",addClasses:!0,greedy:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var e,t=this.options,n=t.accept;this.isover=!1,this.isout=!0,this.accept="function"==typeof n?n:function(e){return e.is(n)},this.proportions=function(){if(!arguments.length)return e||(e={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight});e=arguments[0]},this._addToManager(t.scope),t.addClasses&&this._addClass("ui-droppable")},_addToManager:function(t){e.ui.ddmanager.droppables[t]=e.ui.ddmanager.droppables[t]||[],e.ui.ddmanager.droppables[t].push(this)},_splice:function(e){for(var t=0;t<e.length;t++)e[t]===this&&e.splice(t,1)},_destroy:function(){var t=e.ui.ddmanager.droppables[this.options.scope];this._splice(t)},_setOption:function(t,n){if("accept"===t)this.accept="function"==typeof n?n:function(e){return e.is(n)};else if("scope"===t){var i=e.ui.ddmanager.droppables[this.options.scope];this._splice(i),this._addToManager(n)}this._super(t,n)},_activate:function(t){var n=e.ui.ddmanager.current;this._addActiveClass(),n&&this._trigger("activate",t,this.ui(n))},_deactivate:function(t){var n=e.ui.ddmanager.current;this._removeActiveClass(),n&&this._trigger("deactivate",t,this.ui(n))},_over:function(t){var n=e.ui.ddmanager.current;n&&(n.currentItem||n.element)[0]!==this.element[0]&&this.accept.call(this.element[0],n.currentItem||n.element)&&(this._addHoverClass(),this._trigger("over",t,this.ui(n)))},_out:function(t){var n=e.ui.ddmanager.current;n&&(n.currentItem||n.element)[0]!==this.element[0]&&this.accept.call(this.element[0],n.currentItem||n.element)&&(this._removeHoverClass(),this._trigger("out",t,this.ui(n)))},_drop:function(t,n){var i=n||e.ui.ddmanager.current,o=!1;return!(!i||(i.currentItem||i.element)[0]===this.element[0])&&(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var n=e(this).droppable("instance");if(n.options.greedy&&!n.options.disabled&&n.options.scope===i.options.scope&&n.accept.call(n.element[0],i.currentItem||i.element)&&e.ui.intersect(i,e.extend(n,{offset:n.element.offset()}),n.options.tolerance,t))return o=!0,!1}),!o&&(!!this.accept.call(this.element[0],i.currentItem||i.element)&&(this._removeActiveClass(),this._removeHoverClass(),this._trigger("drop",t,this.ui(i)),this.element)))},ui:function(e){return{draggable:e.currentItem||e.element,helper:e.helper,position:e.position,offset:e.positionAbs}},_addHoverClass:function(){this._addClass("ui-droppable-hover")},_removeHoverClass:function(){this._removeClass("ui-droppable-hover")},_addActiveClass:function(){this._addClass("ui-droppable-active")},_removeActiveClass:function(){this._removeClass("ui-droppable-active")}}),e.ui.intersect=function(){function e(e,t,n){return e>=t&&e<t+n}return function(t,n,i,o){if(!n.offset)return!1;var r=(t.positionAbs||t.position.absolute).left+t.margins.left,s=(t.positionAbs||t.position.absolute).top+t.margins.top,a=r+t.helperProportions.width,l=s+t.helperProportions.height,c=n.offset.left,d=n.offset.top,u=c+n.proportions().width,h=d+n.proportions().height;switch(i){case"fit":return c<=r&&a<=u&&d<=s&&l<=h;case"intersect":return c<r+t.helperProportions.width/2&&a-t.helperProportions.width/2<u&&d<s+t.helperProportions.height/2&&l-t.helperProportions.height/2<h;case"pointer":return e(o.pageY,d,n.proportions().height)&&e(o.pageX,c,n.proportions().width);case"touch":return(s>=d&&s<=h||l>=d&&l<=h||s<d&&l>h)&&(r>=c&&r<=u||a>=c&&a<=u||r<c&&a>u);default:return!1}}}(),e.ui.ddmanager={current:null,droppables:{default:[]},prepareOffsets:function(t,n){var i,o,r=e.ui.ddmanager.droppables[t.options.scope]||[],s=n?n.type:null,a=(t.currentItem||t.element).find(":data(ui-droppable)").addBack();e:for(i=0;i<r.length;i++)if(!(r[i].options.disabled||t&&!r[i].accept.call(r[i].element[0],t.currentItem||t.element))){for(o=0;o<a.length;o++)if(a[o]===r[i].element[0]){r[i].proportions().height=0;continue e}r[i].visible="none"!==r[i].element.css("display"),r[i].visible&&("mousedown"===s&&r[i]._activate.call(r[i],n),r[i].offset=r[i].element.offset(),r[i].proportions({width:r[i].element[0].offsetWidth,height:r[i].element[0].offsetHeight}))}},drop:function(t,n){var i=!1;return e.each((e.ui.ddmanager.droppables[t.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&e.ui.intersect(t,this,this.options.tolerance,n)&&(i=this._drop.call(this,n)||i),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],t.currentItem||t.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,n)))}),i},dragStart:function(t,n){t.element.parentsUntil("body").on("scroll.droppable",function(){t.options.refreshPositions||e.ui.ddmanager.prepareOffsets(t,n)})},drag:function(t,n){t.options.refreshPositions&&e.ui.ddmanager.prepareOffsets(t,n),e.each(e.ui.ddmanager.droppables[t.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var i,o,r,s=e.ui.intersect(t,this,this.options.tolerance,n),a=!s&&this.isover?"isout":s&&!this.isover?"isover":null;a&&(this.options.greedy&&(o=this.options.scope,(r=this.element.parents(":data(ui-droppable)").filter(function(){return e(this).droppable("instance").options.scope===o})).length&&((i=e(r[0]).droppable("instance")).greedyChild="isover"===a)),i&&"isover"===a&&(i.isover=!1,i.isout=!0,i._out.call(i,n)),this[a]=!0,this["isout"===a?"isover":"isout"]=!1,this["isover"===a?"_over":"_out"].call(this,n),i&&"isout"===a&&(i.isout=!1,i.isover=!0,i._over.call(i,n)))}})},dragStop:function(t,n){t.element.parentsUntil("body").off("scroll.droppable"),t.options.refreshPositions||e.ui.ddmanager.prepareOffsets(t,n)}},!0===e.uiBackCompat&&e.widget("ui.droppable",e.ui.droppable,{options:{hoverClass:!1,activeClass:!1}
vendor: 7,735 bytes, line 11
11,_addActiveClass:function(){this._super(),this.options.activeClass&&this.element.addClass(this.options.activeClass)},_removeActiveClass:function(){this._super(),this.options.activeClass&&this.element.removeClass(this.options.activeClass)},_addHoverClass:function(){this._super(),this.options.hoverClass&&this.element.addClass(this.options.hoverClass)},_removeHoverClass:function(){this._super(),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass)}}),e.ui.droppable}),function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","../version","../widget"],e):e(jQuery)}(function(e){"use strict";return e.widget("ui.progressbar",{version:"1.14.1",options:{classes:{"ui-progressbar":"ui-corner-all","ui-progressbar-value":"ui-corner-left","ui-progressbar-complete":"ui-corner-right"},max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue(),this.element.attr({role:"progressbar","aria-valuemin":this.min}),this._addClass("ui-progressbar","ui-widget ui-widget-content"),this.valueDiv=e("<div>").appendTo(this.element),this._addClass(this.valueDiv,"ui-progressbar-value","ui-widget-header"),this._refreshValue()},_destroy:function(){this.element.removeAttr("role aria-valuemin aria-valuemax aria-valuenow"),this.valueDiv.remove()},value:function(e){if(void 0===e)return this.options.value;this.options.value=this._constrainedValue(e),this._refreshValue()},_constrainedValue:function(e){return void 0===e&&(e=this.options.value),this.indeterminate=!1===e,"number"!=typeof e&&(e=0),!this.indeterminate&&Math.min(this.options.max,Math.max(this.min,e))},_setOptions:function(e){var t=e.value;delete e.value,this._super(e),this.options.value=this._constrainedValue(t),this._refreshValue()},_setOption:function(e,t){"max"===e&&(t=Math.max(this.min,t)),this._super(e,t)},_setOptionDisabled:function(e){this._super(e),this.element.attr("aria-disabled",e),this._toggleClass(null,"ui-state-disabled",!!e)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var t=this.options.value,n=this._percentage();this.valueDiv.toggle(this.indeterminate||t>this.min).width(n.toFixed(0)+"%"),this._toggleClass(this.valueDiv,"ui-progressbar-complete",null,t===this.options.max)._toggleClass("ui-progressbar-indeterminate",null,this.indeterminate),this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=e("<div>").appendTo(this.valueDiv),this._addClass(this.overlayDiv,"ui-progressbar-overlay"))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":t}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==t&&(this.oldValue=t,this._trigger("change")),t===this.options.max&&this._trigger("complete")}})}),function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","./mouse","../version","../widget"],e):e(jQuery)}(function(e){"use strict";return e.widget("ui.selectable",e.ui.mouse,{version:"1.14.1",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var t=this;this._addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){t.elementPos=e(t.element[0]).offset(),t.selectees=e(t.options.filter,t.element[0]),t._addClass(t.selectees,"ui-selectee"),t.selectees.each(function(){var n=e(this),i=n.offset(),o={left:i.left-t.elementPos.left,top:i.top-t.elementPos.top};e.data(this,"selectable-item",{element:this,$element:n,left:o.left,top:o.top,right:o.left+n.outerWidth(),bottom:o.top+n.outerHeight(),startselected:!1,selected:n.hasClass("ui-selected"),selecting:n.hasClass("ui-selecting"),unselecting:n.hasClass("ui-unselecting")})})},this.refresh(),this._mouseInit(),this.helper=e("<div>"),this._addClass(this.helper,"ui-selectable-helper")},_destroy:function(){this.selectees.removeData("selectable-item"),this._mouseDestroy()},_mouseStart:function(t){var n=this,i=this.options;this.opos=[t.pageX,t.pageY],this.elementPos=e(this.element[0]).offset(),this.options.disabled||(this.selectees=e(i.filter,this.element[0]),this._trigger("start",t),e(i.appendTo).append(this.helper),this.helper.css({left:t.pageX,top:t.pageY,width:0,height:0}),i.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var i=e.data(this,"selectable-item");i.startselected=!0,t.metaKey||t.ctrlKey||(n._removeClass(i.$element,"ui-selected"),i.selected=!1,n._addClass(i.$element,"ui-unselecting"),i.unselecting=!0,n._trigger("unselecting",t,{unselecting:i.element}))}),e(t.target).parents().addBack().each(function(){var i,o=e.data(this,"selectable-item");if(o)return i=!t.metaKey&&!t.ctrlKey||!o.$element.hasClass("ui-selected"),n._removeClass(o.$element,i?"ui-unselecting":"ui-selected")._addClass(o.$element,i?"ui-selecting":"ui-unselecting"),o.unselecting=!i,o.selecting=i,o.selected=i,i?n._trigger("selecting",t,{selecting:o.element}):n._trigger("unselecting",t,{unselecting:o.element}),!1}))},_mouseDrag:function(t){if(this.dragged=!0,!this.options.disabled){var n,i=this,o=this.options,r=this.opos[0],s=this.opos[1],a=t.pageX,l=t.pageY;return r>a&&(n=a,a=r,r=n),s>l&&(n=l,l=s,s=n),this.helper.css({left:r,top:s,width:a-r,height:l-s}),this.selectees.each(function(){var n=e.data(this,"selectable-item"),c=!1,d={};n&&n.element!==i.element[0]&&(d.left=n.left+i.elementPos.left,d.right=n.right+i.elementPos.left,d.top=n.top+i.elementPos.top,d.bottom=n.bottom+i.elementPos.top,"touch"===o.tolerance?c=!(d.left>a||d.right<r||d.top>l||d.bottom<s):"fit"===o.tolerance&&(c=d.left>r&&d.right<a&&d.top>s&&d.bottom<l),c?(n.selected&&(i._removeClass(n.$element,"ui-selected"),n.selected=!1),n.unselecting&&(i._removeClass(n.$element,"ui-unselecting"),n.unselecting=!1),n.selecting||(i._addClass(n.$element,"ui-selecting"),n.selecting=!0,i._trigger("selecting",t,{selecting:n.element}))):(n.selecting&&((t.metaKey||t.ctrlKey)&&n.startselected?(i._removeClass(n.$element,"ui-selecting"),n.selecting=!1,i._addClass(n.$element,"ui-selected"),n.selected=!0):(i._removeClass(n.$element,"ui-selecting"),n.selecting=!1,n.startselected&&(i._addClass(n.$element,"ui-unselecting"),n.unselecting=!0),i._trigger("unselecting",t,{unselecting:n.element}))),n.selected&&(t.metaKey||t.ctrlKey||n.startselected||(i._removeClass(n.$element,"ui-selected"),n.selected=!1,i._addClass(n.$element,"ui-unselecting"),n.unselecting=!0,i._trigger("unselecting",t,{unselecting:n.element})))))}),!1}},_mouseStop:function(t){var n=this;return this.dragged=!1,e(".ui-unselecting",this.element[0]).each(function(){var i=e.data(this,"selectable-item");n._removeClass(i.$element,"ui-unselecting"),i.unselecting=!1,i.startselected=!1,n._trigger("unselected",t,{unselected:i.element})}),e(".ui-selecting",this.element[0]).each(function(){var i=e.data(this,"selectable-item");n._removeClass(i.$element,"ui-selecting")._addClass(i.$element,"ui-selected"),i.selecting=!1,i.selected=!0,i.startselected=!0,n._trigger("selected",t,{selected:i.element})}),this._trigger("stop",t),this.helper.remove(),!1}})}),function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","./menu","../form-reset-mixin","../keycode","../labels","../position","../unique-id","../version","../widget"],e):e(jQuery)}(function(e){"use strict";return e.widget("ui.selectmenu",[e.ui.formResetMixin,{version:"1.14.1",defaultElement:"<select>",options:{appendTo:null,classes:{"ui-selectmenu-button-open":"ui-corner-top","ui-selectmenu-button-closed":"ui-corner-all"},disabled:null,icons:{button:"ui-icon-triangle-1-s"},position:{my:"left top",at:"left bottom",collision:"none"}
vendor: 4,730 bytes, line 11
11,width:!1,change:null,close:null,focus:null,open:null,select:null},_create:function(){var t=this.element.uniqueId().attr("id");this.ids={element:t,button:t+"-button",menu:t+"-menu"},this._drawButton(),this._drawMenu(),this._bindFormResetHandler(),this._rendered=!1,this.menuItems=e()},_drawButton:function(){var t,n=this,i=this._parseOption(this.element.find("option:selected"),this.element[0].selectedIndex);this.labels=this.element.labels().attr("for",this.ids.button),this._on(this.labels,{click:function(e){this.button.trigger("focus"),e.preventDefault()}}),this.element.hide(),this.button=e("<span>",{tabindex:this.options.disabled?-1:0,id:this.ids.button,role:"combobox","aria-expanded":"false","aria-autocomplete":"list","aria-owns":this.ids.menu,"aria-haspopup":"true",title:this.element.attr("title")}).insertAfter(this.element),this._addClass(this.button,"ui-selectmenu-button ui-selectmenu-button-closed","ui-button ui-widget"),t=e("<span>").appendTo(this.button),this._addClass(t,"ui-selectmenu-icon","ui-icon "+this.options.icons.button),this.buttonItem=this._renderButtonItem(i).appendTo(this.button),!1!==this.options.width&&this._resizeButton(),this._on(this.button,this._buttonEvents),this.button.one("focusin",function(){n._rendered||n._refreshMenu()})},_drawMenu:function(){var t=this;this.menu=e("<ul>",{"aria-hidden":"true","aria-labelledby":this.ids.button,id:this.ids.menu}),this.menuWrap=e("<div>").append(this.menu),this._addClass(this.menuWrap,"ui-selectmenu-menu","ui-front"),this.menuWrap.appendTo(this._appendTo()),this.menuInstance=this.menu.menu({classes:{"ui-menu":"ui-corner-bottom"},role:"listbox",select:function(e,n){e.preventDefault(),t._select(n.item.data("ui-selectmenu-item"),e)},focus:function(e,n){var i=n.item.data("ui-selectmenu-item");null!=t.focusIndex&&i.index!==t.focusIndex&&(t._trigger("focus",e,{item:i}),t.isOpen||t._select(i,e)),t.focusIndex=i.index,t.button.attr("aria-activedescendant",t.menuItems.eq(i.index).attr("id"))}}).menu("instance"),this.menuInstance._off(this.menu,"mouseleave"),this.menuInstance._closeOnDocumentClick=function(){return!1},this.menuInstance._isDivider=function(){return!1}},refresh:function(){this._refreshMenu(),this.buttonItem.replaceWith(this.buttonItem=this._renderButtonItem(this._getSelectedItem().data("ui-selectmenu-item")||{})),null===this.options.width&&this._resizeButton()},_refreshMenu:function(){var e,t=this.element.find("option");this.menu.empty(),this._parseOptions(t),this._renderMenu(this.menu,this.items),this.menuInstance.refresh(),this.menuItems=this.menu.find("li").not(".ui-selectmenu-optgroup").find(".ui-menu-item-wrapper"),this._rendered=!0,t.length&&(e=this._getSelectedItem(),this.menuInstance.focus(null,e),this._setAria(e.data("ui-selectmenu-item")),this._setOption("disabled",this.element.prop("disabled")))},open:function(e){this.options.disabled||(this._rendered?(this._removeClass(this.menu.find(".ui-state-active"),null,"ui-state-active"),this.menuInstance.focus(null,this._getSelectedItem())):this._refreshMenu(),this.menuItems.length&&(this.isOpen=!0,this._toggleAttr(),this._resizeMenu(),this._position(),this._on(this.document,this._documentClick),this._trigger("open",e)))},_position:function(){this.menuWrap.position(e.extend({of:this.button},this.options.position))},close:function(e){this.isOpen&&(this.isOpen=!1,this._toggleAttr(),this.range=null,this._off(this.document),this._trigger("close",e))},widget:function(){return this.button},menuWidget:function(){return this.menu},_renderButtonItem:function(t){var n=e("<span>");return this._setText(n,t.label),this._addClass(n,"ui-selectmenu-text"),n},_renderMenu:function(t,n){var i=this,o="";e.each(n,function(n,r){var s;r.optgroup!==o&&(s=e("<li>",{text:r.optgroup}),i._addClass(s,"ui-selectmenu-optgroup","ui-menu-divider"+(r.element.parent("optgroup").prop("disabled")?" ui-state-disabled":"")),s.appendTo(t),o=r.optgroup),i._renderItemData(t,r)})},_renderItemData:function(e,t){return this._renderItem(e,t).data("ui-selectmenu-item",t)},_renderItem:function(t,n){var i=e("<li>"),o=e("<div>",{title:n.element.attr("title")});return n.disabled&&this._addClass(i,null,"ui-state-disabled"),n.hidden?i.prop("hidden",!0):this._setText(o,n.label),i.append(o).appendTo(t)},_setText:function(e,t){t?e.text(t):e.html("&#160;")},_move:function(e,t){var n,i,o=".ui-menu-item";this.isOpen?n=this.menuItems.eq(this.focusIndex).parent("li"):(n=this.menuItems.eq(this.element[0].selectedIndex).parent("li"),o+=":not(.ui-state-disabled)"),(i="first"===e||"last"===e?n["first"===e?"prevAll":"nextAll"](o).eq(-1):n[e+"All"](o).eq(0)).length&&this.menuInstance.focus(t,i)},_getSelectedItem:function(){return this.menuItems.eq(this.element[0].selectedIndex).parent("li")}
vendor: 4,405 bytes, lines 11-12
11,_toggle:function(e){this[this.isOpen?"close":"open"](e)},_setSelection:function(){var e;this.range&&((e=window.getSelection()).removeAllRanges(),e.addRange(this.range))},_documentClick:{mousedown:function(t){
12this.isOpen&&(e(t.target).closest(".ui-selectmenu-menu, #"+CSS.escape(this.ids.button)).length||this.close(t))}},_buttonEvents:{mousedown:function(){var e=window.getSelection();e.rangeCount&&(this.range=e.getRangeAt(0))},click:function(e){this._setSelection(),this._toggle(e)},keydown:function(t){var n=!0;switch(t.keyCode){case e.ui.keyCode.TAB:case e.ui.keyCode.ESCAPE:this.close(t),n=!1;break;case e.ui.keyCode.ENTER:this.isOpen&&this._selectFocusedItem(t);break;case e.ui.keyCode.UP:t.altKey?this._toggle(t):this._move("prev",t);break;case e.ui.keyCode.DOWN:t.altKey?this._toggle(t):this._move("next",t);break;case e.ui.keyCode.SPACE:this.isOpen?this._selectFocusedItem(t):this._toggle(t);break;case e.ui.keyCode.LEFT:this._move("prev",t);break;case e.ui.keyCode.RIGHT:this._move("next",t);break;case e.ui.keyCode.HOME:case e.ui.keyCode.PAGE_UP:this._move("first",t);break;case e.ui.keyCode.END:case e.ui.keyCode.PAGE_DOWN:this._move("last",t);break;default:this.menu.trigger(t),n=!1}n&&t.preventDefault()}},_selectFocusedItem:function(e){var t=this.menuItems.eq(this.focusIndex).parent("li");t.hasClass("ui-state-disabled")||this._select(t.data("ui-selectmenu-item"),e)},_select:function(e,t){var n=this.element[0].selectedIndex;this.element[0].selectedIndex=e.index,this.buttonItem.replaceWith(this.buttonItem=this._renderButtonItem(e)),this._setAria(e),this._trigger("select",t,{item:e}),e.index!==n&&this._trigger("change",t,{item:e}),this.close(t)},_setAria:function(e){var t=this.menuItems.eq(e.index).attr("id");this.button.attr({"aria-labelledby":t,"aria-activedescendant":t}),this.menu.attr("aria-activedescendant",t)},_setOption:function(e,t){if("icons"===e){var n=this.button.find("span.ui-icon");this._removeClass(n,null,this.options.icons.button)._addClass(n,null,t.button)}this._super(e,t),"appendTo"===e&&this.menuWrap.appendTo(this._appendTo()),"width"===e&&this._resizeButton()},_setOptionDisabled:function(e){this._super(e),this.menuInstance.option("disabled",e),this.button.attr("aria-disabled",e),this._toggleClass(this.button,null,"ui-state-disabled",e),this.element.prop("disabled",e),e?(this.button.attr("tabindex",-1),this.close()):this.button.attr("tabindex",0)},_appendTo:function(){var t=this.options.appendTo;return t&&(t=t.jquery||t.nodeType?e(t):this.document.find(t).eq(0)),t&&t[0]||(t=this.element.closest(".ui-front, dialog")),t.length||(t=this.document[0].body),t},_toggleAttr:function(){this.button.attr("aria-expanded",this.isOpen),this._removeClass(this.button,"ui-selectmenu-button-"+(this.isOpen?"closed":"open"))._addClass(this.button,"ui-selectmenu-button-"+(this.isOpen?"open":"closed"))._toggleClass(this.menuWrap,"ui-selectmenu-open",null,this.isOpen),this.menu.attr("aria-hidden",!this.isOpen)},_resizeButton:function(){var e=this.options.width;!1!==e?(null===e&&(e=this.element.show().outerWidth(),this.element.hide()),this.button.outerWidth(e)):this.button.css("width","")},_resizeMenu:function(){this.menu.outerWidth(Math.max(this.button.outerWidth(),this.menu.width("").outerWidth()))},_getCreateOptions:function(){var e=this._super();return e.disabled=this.element.prop("disabled"),e},_parseOptions:function(t){var n=this,i=[];t.each(function(t,o){i.push(n._parseOption(e(o),t))}),this.items=i},_parseOption:function(e,t){var n=e.parent("optgroup");return{element:e,index:t,value:e.val(),label:e.text(),hidden:n.prop("hidden")||e.prop("hidden"),optgroup:n.attr("label")||"",disabled:n.prop("disabled")||e.prop("disabled")}},_destroy:function(){this._unbindFormResetHandler(),this.menuWrap.remove(),this.button.remove(),this.element.show(),this.element.removeUniqueId(),this.labels.attr("for",this.ids.element)}}])}),function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","./mouse","../keycode","../version","../widget"],e):e(jQuery)}(function(e){"use strict";return e.widget("ui.slider",e.ui.mouse,{version:"1.14.1",widgetEventPrefix:"slide",options:{animate:!1,classes:{"ui-slider":"ui-corner-all","ui-slider-handle":"ui-corner-all","ui-slider-range":"ui-corner-all ui-widget-header"},distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null}
vendor: 12,578 bytes, line 12
12,numPages:5,_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this._calculateNewMax(),this._addClass("ui-slider ui-slider-"+this.orientation,"ui-widget ui-widget-content"),this._refresh(),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var t,n,i=this.options,o=this.element.find(".ui-slider-handle"),r="<span tabindex='0'></span>",s=[];for(n=i.values&&i.values.length||1,o.length>n&&(o.slice(n).remove(),o=o.slice(0,n)),t=o.length;t<n;t++)s.push(r);this.handles=o.add(e(s.join("")).appendTo(this.element)),this._addClass(this.handles,"ui-slider-handle","ui-state-default"),this.handle=this.handles.eq(0),this.handles.each(function(t){e(this).data("ui-slider-handle-index",t).attr("tabIndex",0)})},_createRange:function(){var t=this.options;t.range?(!0===t.range&&(t.values?t.values.length&&2!==t.values.length?t.values=[t.values[0],t.values[0]]:Array.isArray(t.values)&&(t.values=t.values.slice(0)):t.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?(this._removeClass(this.range,"ui-slider-range-min ui-slider-range-max"),this.range.css({left:"",bottom:""})):(this.range=e("<div>").appendTo(this.element),this._addClass(this.range,"ui-slider-range")),"min"!==t.range&&"max"!==t.range||this._addClass(this.range,"ui-slider-range-"+t.range)):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){this._off(this.handles),this._on(this.handles,this._handleEvents),this._hoverable(this.handles),this._focusable(this.handles)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this._mouseDestroy()},_mouseCapture:function(t){var n,i,o,r,s,a,l,c=this,d=this.options;return!d.disabled&&(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),n={x:t.pageX,y:t.pageY},i=this._normValueFromMouse(n),o=this._valueMax()-this._valueMin()+1,this.handles.each(function(t){var n=Math.abs(i-c.values(t));(o>n||o===n&&(t===c._lastChangedValue||c.values(t)===d.min))&&(o=n,r=e(this),s=t)}),!1!==this._start(t,s)&&(this._mouseSliding=!0,this._handleIndex=s,this._addClass(r,null,"ui-state-active"),r.trigger("focus"),a=r.offset(),l=!e(t.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=l?{left:0,top:0}:{left:t.pageX-a.left-r.width()/2,top:t.pageY-a.top-r.height()/2-(parseInt(r.css("borderTopWidth"),10)||0)-(parseInt(r.css("borderBottomWidth"),10)||0)+(parseInt(r.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(t,s,i),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(e){var t={x:e.pageX,y:e.pageY},n=this._normValueFromMouse(t);return this._slide(e,this._handleIndex,n),!1},_mouseStop:function(e){return this._removeClass(this.handles,null,"ui-state-active"),this._mouseSliding=!1,this._stop(e,this._handleIndex),this._change(e,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(e){var t,n,i,o,r;return"horizontal"===this.orientation?(t=this.elementSize.width,n=e.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(t=this.elementSize.height,n=e.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),(i=n/t)>1&&(i=1),i<0&&(i=0),"vertical"===this.orientation&&(i=1-i),o=this._valueMax()-this._valueMin(),r=this._valueMin()+i*o,this._trimAlignValue(r)},_uiHash:function(e,t,n){var i={handle:this.handles[e],handleIndex:e,value:void 0!==t?t:this.value()};return this._hasMultipleValues()&&(i.value=void 0!==t?t:this.values(e),i.values=n||this.values()),i},_hasMultipleValues:function(){return this.options.values&&this.options.values.length},_start:function(e,t){return this._trigger("start",e,this._uiHash(t))},_slide:function(e,t,n){var i,o=this.value(),r=this.values();this._hasMultipleValues()&&(i=this.values(t?0:1),o=this.values(t),2===this.options.values.length&&!0===this.options.range&&(n=0===t?Math.min(i,n):Math.max(i,n)),r[t]=n),n!==o&&!1!==this._trigger("slide",e,this._uiHash(t,n,r))&&(this._hasMultipleValues()?this.values(t,n):this.value(n))},_stop:function(e,t){this._trigger("stop",e,this._uiHash(t))},_change:function(e,t){this._keySliding||this._mouseSliding||(this._lastChangedValue=t,this._trigger("change",e,this._uiHash(t)))},value:function(e){return arguments.length?(this.options.value=this._trimAlignValue(e),this._refreshValue(),void this._change(null,0)):this._value()},values:function(e,t){var n,i,o;if(arguments.length>1)return this.options.values[e]=this._trimAlignValue(t),this._refreshValue(),void this._change(null,e);if(!arguments.length)return this._values();if(!Array.isArray(arguments[0]))return this._hasMultipleValues()?this._values(e):this.value();for(n=this.options.values,i=arguments[0],o=0;o<n.length;o+=1)n[o]=this._trimAlignValue(i[o]),this._change(null,o);this._refreshValue()},_setOption:function(e,t){var n,i=0;switch("range"===e&&!0===this.options.range&&("min"===t?(this.options.value=this._values(0),this.options.values=null):"max"===t&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),Array.isArray(this.options.values)&&(i=this.options.values.length),this._super(e,t),e){case"orientation":this._detectOrientation(),this._removeClass("ui-slider-horizontal ui-slider-vertical")._addClass("ui-slider-"+this.orientation),this._refreshValue(),this.options.range&&this._refreshRange(t),this.handles.css("horizontal"===t?"bottom":"left","");break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),n=i-1;n>=0;n--)this._change(null,n);this._animateOff=!1;break;case"step":case"min":case"max":this._animateOff=!0,this._calculateNewMax(),this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_setOptionDisabled:function(e){this._super(e),this._toggleClass(null,"ui-state-disabled",!!e)},_value:function(){var e=this.options.value;return e=this._trimAlignValue(e)},_values:function(e){var t,n,i;if(arguments.length)return t=this.options.values[e],t=this._trimAlignValue(t);if(this._hasMultipleValues()){for(n=this.options.values.slice(),i=0;i<n.length;i+=1)n[i]=this._trimAlignValue(n[i]);return n}return[]},_trimAlignValue:function(e){if(e<=this._valueMin())return this._valueMin();if(e>=this._valueMax())return this._valueMax();var t=this.options.step>0?this.options.step:1,n=(e-this._valueMin())%t,i=e-n;return 2*Math.abs(n)>=t&&(i+=n>0?t:-t),parseFloat(i.toFixed(5))},_calculateNewMax:function(){var e=this.options.max,t=this._valueMin(),n=this.options.step;(e=Math.round((e-t)/n)*n+t)>this.options.max&&(e-=n),this.max=parseFloat(e.toFixed(this._precision()))},_precision:function(){var e=this._precisionOf(this.options.step);return null!==this.options.min&&(e=Math.max(e,this._precisionOf(this.options.min))),e},_precisionOf:function(e){var t=e.toString(),n=t.indexOf(".");return-1===n?0:t.length-n-1},_valueMin:function(){return this.options.min},_valueMax:function(){return this.max},_refreshRange:function(e){"vertical"===e&&this.range.css({width:"",left:""}),"horizontal"===e&&this.range.css({height:"",bottom:""})},_refreshValue:function(){var t,n,i,o,r,s=this.options.range,a=this.options,l=this,c=!this._animateOff&&a.animate,d={};this._hasMultipleValues()?this.handles.each(function(i){n=(l.values(i)-l._valueMin())/(l._valueMax()-l._valueMin())*100,d["horizontal"===l.orientation?"left":"bottom"]=n+"%",e(this).stop(1,1)[c?"animate":"css"](d,a.animate),!0===l.options.range&&("horizontal"===l.orientation?(0===i&&l.range.stop(1,1)[c?"animate":"css"]({left:n+"%"},a.animate),1===i&&l.range[c?"animate":"css"]({width:n-t+"%"},{queue:!1,duration:a.animate})):(0===i&&l.range.stop(1,1)[c?"animate":"css"]({bottom:n+"%"},a.animate),1===i&&l.range[c?"animate":"css"]({height:n-t+"%"},{queue:!1,duration:a.animate}))),t=n}):(i=this.value(),o=this._valueMin(),r=this._valueMax(),n=r!==o?(i-o)/(r-o)*100:0,d["horizontal"===this.orientation?"left":"bottom"]=n+"%",this.handle.stop(1,1)[c?"animate":"css"](d,a.animate),"min"===s&&"horizontal"===this.orientation&&this.range.stop(1,1)[c?"animate":"css"]({width:n+"%"},a.animate),"max"===s&&"horizontal"===this.orientation&&this.range.stop(1,1)[c?"animate":"css"]({width:100-n+"%"},a.animate),"min"===s&&"vertical"===this.orientation&&this.range.stop(1,1)[c?"animate":"css"]({height:n+"%"},a.animate),"max"===s&&"vertical"===this.orientation&&this.range.stop(1,1)[c?"animate":"css"]({height:100-n+"%"},a.animate))},_handleEvents:{keydown:function(t){var n,i,o,r=e(t.target).data("ui-slider-handle-index");switch(t.keyCode){case e.ui.keyCode.HOME:case e.ui.keyCode.END:case e.ui.keyCode.PAGE_UP:case e.ui.keyCode.PAGE_DOWN:case e.ui.keyCode.UP:case e.ui.keyCode.RIGHT:case e.ui.keyCode.DOWN:case e.ui.keyCode.LEFT:if(t.preventDefault(),!this._keySliding&&(this._keySliding=!0,this._addClass(e(t.target),null,"ui-state-active"),!1===this._start(t,r)))return}switch(o=this.options.step,n=i=this._hasMultipleValues()?this.values(r):this.value(),t.keyCode){case e.ui.keyCode.HOME:i=this._valueMin();break;case e.ui.keyCode.END:i=this._valueMax();break;case e.ui.keyCode.PAGE_UP:i=this._trimAlignValue(n+(this._valueMax()-this._valueMin())/this.numPages);break;case e.ui.keyCode.PAGE_DOWN:i=this._trimAlignValue(n-(this._valueMax()-this._valueMin())/this.numPages);break;case e.ui.keyCode.UP:case e.ui.keyCode.RIGHT:if(n===this._valueMax())return;i=this._trimAlignValue(n+o);break;case e.ui.keyCode.DOWN:case e.ui.keyCode.LEFT:if(n===this._valueMin())return;i=this._trimAlignValue(n-o)}this._slide(t,r,i)},keyup:function(t){var n=e(t.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(t,n),this._change(t,n),this._removeClass(e(t.target),null,"ui-state-active"))}}})}),function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","./mouse","../data","../scroll-parent","../version","../widget"],e):e(jQuery)}(function(e){"use strict";return e.widget("ui.sortable",e.ui.mouse,{version:"1.14.1",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_isOverAxis:function(e,t,n){return e>=t&&e<t+n},_isFloating:function(e){return/left|right/.test(e.css("float"))||/inline|table-cell/.test(e.css("display"))},_create:function(){this.containerCache={},this._addClass("ui-sortable"),this.refresh(),this.offset=this.element.offset(),this._mouseInit(),this._setHandleClassName(),this.ready=!0},_setOption:function(e,t){this._super(e,t),"handle"===e&&this._setHandleClassName()},_setHandleClassName:function(){var t=this;this._removeClass(this.element.find(".ui-sortable-handle"),"ui-sortable-handle"),e.each(this.items,function(){t._addClass(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item,"ui-sortable-handle")})},_destroy:function(){this._mouseDestroy();for(var e=this.items.length-1;e>=0;e--)this.items[e].item.removeData(this.widgetName+"-item");return this},_mouseCapture:function(t,n){var i=null,o=!1,r=this;return!this.reverting&&(!this.options.disabled&&"static"!==this.options.type&&(this._refreshItems(t),e(t.target).parents().each(function(){if(e.data(this,r.widgetName+"-item")===r)return i=e(this),!1}),e.data(t.target,r.widgetName+"-item")===r&&(i=e(t.target)),!!i&&(!(this.options.handle&&!n&&(e(this.options.handle,i).find("*").addBack().each(function(){this===t.target&&(o=!0)}),!o))&&(this.currentItem=i,this._removeCurrentsFromItems(),!0))))},_mouseStart:function(t,n,i){var o,r,s=this.options;if(this.currentContainer=this,this.refreshPositions(),this.appendTo=e("parent"!==s.appendTo?s.appendTo:this.currentItem.parent()),this.helper=this._createHelper(t),this._cacheHelperProportions(),this._cacheMargins(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left
vendor: 4,588 bytes, line 12
12:this.offset.left-this.margins.left},e.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),s.cursorAt&&this._adjustOffsetFromHelper(s.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),this.scrollParent=this.placeholder.scrollParent(),e.extend(this.offset,{parent:this._getParentOffset()}),s.containment&&this._setContainment(),s.cursor&&"auto"!==s.cursor&&(r=this.document.find("body"),this._storedStylesheet=e("<style>*{ cursor: "+s.cursor+" !important; }</style>").appendTo(r)),s.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",s.zIndex)),s.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",s.opacity)),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",t,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!i)for(o=this.containers.length-1;o>=0;o--)this.containers[o]._trigger("activate",t,this._uiHash(this));return e.ui.ddmanager&&(e.ui.ddmanager.current=this),e.ui.ddmanager&&!s.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this.dragging=!0,this._addClass(this.helper,"ui-sortable-helper"),this.helper.parent().is(this.appendTo)||(this.helper.detach().appendTo(this.appendTo),this.offset.parent=this._getParentOffset()),this.position=this.originalPosition=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,this.lastPositionAbs=this.positionAbs=this._convertPositionTo("absolute"),this._mouseDrag(t),!0},_scroll:function(e){var t=this.options,n=!1;return this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-e.pageY<t.scrollSensitivity?this.scrollParent[0].scrollTop=n=this.scrollParent[0].scrollTop+t.scrollSpeed:e.pageY-this.overflowOffset.top<t.scrollSensitivity&&(this.scrollParent[0].scrollTop=n=this.scrollParent[0].scrollTop-t.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-e.pageX<t.scrollSensitivity?this.scrollParent[0].scrollLeft=n=this.scrollParent[0].scrollLeft+t.scrollSpeed:e.pageX-this.overflowOffset.left<t.scrollSensitivity&&(this.scrollParent[0].scrollLeft=n=this.scrollParent[0].scrollLeft-t.scrollSpeed)):(e.pageY-this.document.scrollTop()<t.scrollSensitivity?n=this.document.scrollTop(this.document.scrollTop()-t.scrollSpeed):this.window.height()-(e.pageY-this.document.scrollTop())<t.scrollSensitivity&&(n=this.document.scrollTop(this.document.scrollTop()+t.scrollSpeed)),e.pageX-this.document.scrollLeft()<t.scrollSensitivity?n=this.document.scrollLeft(this.document.scrollLeft()-t.scrollSpeed):this.window.width()-(e.pageX-this.document.scrollLeft())<t.scrollSensitivity&&(n=this.document.scrollLeft(this.document.scrollLeft()+t.scrollSpeed))),n},_mouseDrag:function(t){var n,i,o,r,s=this.options;for(this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),s.scroll&&!1!==this._scroll(t)&&(this._refreshItemPositions(!0),e.ui.ddmanager&&!s.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t)),this.dragDirection={vertical:this._getDragVerticalDirection(),horizontal:this._getDragHorizontalDirection()},n=this.items.length-1;n>=0;n--)if(o=(i=this.items[n]).item[0],(r=this._intersectsWithPointer(i))&&i.instance===this.currentContainer&&!(o===this.currentItem[0]||this.placeholder[1===r?"next":"prev"]()[0]===o||e.contains(this.placeholder[0],o)||"semi-dynamic"===this.options.type&&e.contains(this.element[0],o))){if(this.direction=1===r?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(i))break;this._rearrange(t,i),this._trigger("change",t,this._uiHash());break}return this._contactContainers(t),e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),this._trigger("sort",t,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(t,n){if(t){if(e.ui.ddmanager&&!this.options.dropBehaviour&&e.ui.ddmanager.drop(this,t),this.options.revert){var i=this,o=this.placeholder.offset(),r=this.options.axis,s={};
vendor: 5,099 bytes, line 12
12r&&"x"!==r||(s.left=o.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollLeft)),r&&"y"!==r||(s.top=o.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,e(this.helper).animate(s,parseInt(this.options.revert,10)||500,function(){i._clear(t)})}else this._clear(t,n);return!1}},cancel:function(){if(this.dragging){this._mouseUp(new e.Event("mouseup",{target:null})),"original"===this.options.helper?(this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")):this.currentItem.show();for(var t=this.containers.length-1;t>=0;t--)this.containers[t]._trigger("deactivate",null,this._uiHash(this)),this.containers[t].containerCache.over&&(this.containers[t]._trigger("out",null,this._uiHash(this)),this.containers[t].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),e.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?e(this.domPosition.prev).after(this.currentItem):e(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(t){var n=this._getItemsAsjQuery(t&&t.connected),i=[];return t=t||{},e(n).each(function(){var n=(e(t.item||this).attr(t.attribute||"id")||"").match(t.expression||/(.+)[\-=_](.+)/);n&&i.push((t.key||n[1]+"[]")+"="+(t.key&&t.expression?n[1]:n[2]))}),!i.length&&t.key&&i.push(t.key+"="),i.join("&")},toArray:function(t){var n=this._getItemsAsjQuery(t&&t.connected),i=[];return t=t||{},n.each(function(){i.push(e(t.item||this).attr(t.attribute||"id")||"")}),i},_intersectsWith:function(e){var t=this.positionAbs.left,n=t+this.helperProportions.width,i=this.positionAbs.top,o=i+this.helperProportions.height,r=e.left,s=r+e.width,a=e.top,l=a+e.height,c=this.offset.click.top,d=this.offset.click.left,u="x"===this.options.axis||i+c>a&&i+c<l,h="y"===this.options.axis||t+d>r&&t+d<s,p=u&&h;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>e[this.floating?"width":"height"]?p:r<t+this.helperProportions.width/2&&n-this.helperProportions.width/2<s&&a<i+this.helperProportions.height/2&&o-this.helperProportions.height/2<l},_intersectsWithPointer:function(e){var t,n,i="x"===this.options.axis||this._isOverAxis(this.positionAbs.top+this.offset.click.top,e.top,e.height),o="y"===this.options.axis||this._isOverAxis(this.positionAbs.left+this.offset.click.left,e.left,e.width);return!(!i||!o)&&(t=this.dragDirection.vertical,n=this.dragDirection.horizontal,this.floating?"right"===n||"down"===t?2:1:t&&("down"===t?2:1))},_intersectsWithSides:function(e){var t=this._isOverAxis(this.positionAbs.top+this.offset.click.top,e.top+e.height/2,e.height),n=this._isOverAxis(this.positionAbs.left+this.offset.click.left,e.left+e.width/2,e.width),i=this.dragDirection.vertical,o=this.dragDirection.horizontal;return this.floating&&o?"right"===o&&n||"left"===o&&!n:i&&("down"===i&&t||"up"===i&&!t)},_getDragVerticalDirection:function(){var e=this.positionAbs.top-this.lastPositionAbs.top;return 0!==e&&(e>0?"down":"up")},_getDragHorizontalDirection:function(){var e=this.positionAbs.left-this.lastPositionAbs.left;return 0!==e&&(e>0?"right":"left")},refresh:function(e){return this._refreshItems(e),this._setHandleClassName(),this.refreshPositions(),this},_connectWith:function(){var e=this.options;return e.connectWith.constructor===String?[e.connectWith]:e.connectWith},_getItemsAsjQuery:function(t){function n(){a.push(this)}var i,o,r,s,a=[],l=[],c=this._connectWith();if(c&&t)for(i=c.length-1;i>=0;i--)for(o=(r=e(c[i],this.document[0])).length-1;o>=0;o--)(s=e.data(r[o],this.widgetFullName))&&s!==this&&!s.options.disabled&&l.push(["function"==typeof s.options.items?s.options.items.call(s.element):e(s.options.items,s.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),s]);for(l.push(["function"==typeof this.options.items?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):e(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),i=l.length-1;i>=0;i--)l[i][0].each(n);return e(a)},_removeCurrentsFromItems:function(){var t=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=e.grep(this.items,function(e){for(var n=0;n<t.length;n++)if(t[n]===e.item[0])return!1;return!0})},_refreshItems:function(t){this.items=[],this.containers=[this];var n,i,o,r,s,a,l,c,d=this.items,u=[["function"==typeof this.options.items?this.options.items.call(this.element[0],t,{item:this.currentItem}):e(this.options.items,this.element),this]],h=this._connectWith();if(h&&this.ready)for(n=h.length-1;n>=0;n--)for(i=(o=e(h[n],this.document[0])).length-1;i>=0;i--)(r=e.data(o[i],this.widgetFullName))&&r!==this&&!r.options.disabled&&(u.pu
vendor: 7,693 bytes, lines 12-13
12sh(["function"==typeof r.options.items?r.options.items.call(r.element[0],t,{item:this.currentItem}):e(r.options.items,r.element),r]),this.containers.push(r));for(n=u.length-1;n>=0;n--)for(s=u[n][1],i=0,c=(a=u[n][0]).length;i<c;i++)(l=e(a[i])).data(this.widgetName+"-item",s),d.push({item:l,instance:s,width:0,height:0,left:0,top:0})},_refreshItemPositions:function(t){var n,i,o,r;for(n=this.items.length-1;n>=0;n--)i=this.items[n],this.currentContainer&&i.instance!==this.currentContainer&&i.item[0]!==this.currentItem[0]||(o=this.options.toleranceElement?e(this.options.toleranceElement,i.item):i.item,t||(i.width=o.outerWidth(),i.height=o.outerHeight()),r=o.offset(),i.left=r.left,i.top=r.top)},refreshPositions:function(e){var t,n;if(this.floating=!!this.items.length&&("x"===this.options.axis||this._isFloating(this.items[0].item)),this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset()),this._refreshItemPositions(e),this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(t=this.containers.length-1;t>=0;t--)n=this.containers[t].element.offset(),this.containers[t].containerCache.left=n.left,this.containers[t].containerCache.top=n.top,this.containers[t].containerCache.width=this.containers[t].element.outerWidth(),this.containers[t].containerCache.height=this.containers[t].element.outerHeight();return this},_createPlaceholder:function(t){var n,i,o=(t=t||this).options;o.placeholder&&o.placeholder.constructor!==String||(n=o.placeholder,i=t.currentItem[0].nodeName.toLowerCase(),o.placeholder={element:function(){var o=e("<"+i+">",t.document[0]);return t._addClass(o,"ui-sortable-placeholder",n||t.currentItem[0].className)._removeClass(o,"ui-sortable-helper"),"tbody"===i?t._createTrPlaceholder(t.currentItem.find("tr").eq(0),e("<tr>",t.document[0]).appendTo(o)):"tr"===i?t._createTrPlaceholder(t.currentItem,o):"img"===i&&o.attr("src",t.currentItem.attr("src")),n||o.css("visibility","hidden"),o},update:function(e,r){n&&!o.forcePlaceholderSize||(r.height()&&(!o.forcePlaceholderSize||"tbody"!==i&&"tr"!==i)||r.height(t.currentItem.innerHeight()-parseInt(t.currentItem.css("paddingTop")||0,10)-parseInt(t.currentItem.css("paddingBottom")||0,10)),r.width()||r.width(t.currentItem.innerWidth()-parseInt(t.currentItem.css("paddingLeft")||0,10)-parseInt(t.currentItem.css("paddingRight")||0,10)))}}),t.placeholder=e(o.placeholder.element.call(t.element,t.currentItem)),t.currentItem.after(t.placeholder),o.placeholder.update(t,t.placeholder)},_createTrPlaceholder:function(t,n){var i=this;t.children().each(function(){e("<td>&#160;</td>",i.document[0]).attr("colspan",e(this).attr("colspan")||1).appendTo(n)})},_contactContainers:function(t){var n,i,o,r,s,a,l,c,d,u,h=null,p=null;for(n=this.containers.length-1;n>=0;n--)if(!e.contains(this.currentItem[0],this.containers[n].element[0]))if(this._intersectsWith(this.containers[n].containerCache)){if(h&&e.contains(this.containers[n].element[0],h.element[0]))continue;h=this.containers[n],p=n}else this.containers[n].containerCache.over&&(this.containers[n]._trigger("out",t,this._uiHash(this)),this.containers[n].containerCache.over=0);if(h)if(1===this.containers.length)this.containers[p].containerCache.over||(this.containers[p]._trigger("over",t,this._uiHash(this)),this.containers[p].containerCache.over=1);else{for(o=1e4,r=null,s=(d=h.floating||this._isFloating(this.currentItem))?"left":"top",a=d?"width":"height",u=d?"pageX":"pageY",i=this.items.length-1;i>=0;i--)e.contains(this.containers[p].element[0],this.items[i].item[0])&&this.items[i].item[0]!==this.currentItem[0]&&(l=this.items[i].item.offset()[s],c=!1,t[u]-l>this.items[i][a]/2&&(c=!0),Math.abs(t[u]-l)<o&&(o=Math.abs(t[u]-l),r=this.items[i],this.direction=c?"up":"down"));if(!r&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[p])return void(this.currentContainer.containerCache.over||(this.containers[p]._trigger("over",t,this._uiHash()),this.currentContainer.containerCache.over=1));r?this._rearrange(t,r,null,!0):this._rearrange(t,null,this.containers[p].element,!0),this._trigger("change",t,this._uiHash()),this.containers[p]._trigger("change",t,this._uiHash(this)),this.currentContainer=this.containers[p],this.options.placeholder.update(this.currentContainer,this.placeholder),this.scrollParent=this.placeholder.scrollParent(),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this.containers[p]._trigger("over",t,this._uiHash(this)),this.containers[p].containerCache.over=1}},_createHelper:function(t){var n=this.options,i="function"==typeof n.helper?e(n.helper.apply(this.element[0],[t,this.currentItem])):"clone"===n.helper?this.currentItem.clone():this.currentItem;return i.parents("body").length||this.appendTo[0].appendChild(i[0]),i[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),i[0].style.width&&!n.forceHelperSize||i.width(this.currentItem.width()),i[0].style.height&&!n.forceHelperSize||i.height(this.currentItem.height()),i},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),Array.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var t=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==this.document[0]&&e.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),this.offsetParent[0]===this.document[0].body&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var e=this.currentItem.position();return{
13top:e.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:e.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,n,i,o=this.options;"parent"===o.containment&&(o.containment=this.helper[0].parentNode),"document"!==o.containment&&"window"!==o.containment||(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,"document"===o.containment?this.document.width():this.window.width()-this.helperProportions.width-this.margins.left,("document"===o.containment?this.document.height()||document.body.parentNode.scrollHeight:this.window.height()||this.document[0].body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(o.containment)||(t=e(o.containment)[0],n=e(o.containment).offset(),i="hidden"!==e(t).css("overflow"),this.containment=[n.left+(parseInt(e(t).css("borderLeftWidth"),10)||0)+(parseInt(e(t).css("paddingLeft"),10)||0)-this.margins.left,n.top+(parseInt(e(t).css("borderTopWidth"),
vendor: 4,288 bytes, line 13
1310)||0)+(parseInt(e(t).css("paddingTop"),10)||0)-this.margins.top,n.left+(i?Math.max(t.scrollWidth,t.offsetWidth):t.offsetWidth)-(parseInt(e(t).css("borderLeftWidth"),10)||0)-(parseInt(e(t).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,n.top+(i?Math.max(t.scrollHeight,t.offsetHeight):t.offsetHeight)-(parseInt(e(t).css("borderTopWidth"),10)||0)-(parseInt(e(t).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(t,n){n||(n=this.position);var i="absolute"===t?1:-1,o="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,r=/(html|body)/i.test(o[0].tagName);return{top:n.top+this.offset.relative.top*i+this.offset.parent.top*i-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():r?0:o.scrollTop())*i,left:n.left+this.offset.relative.left*i+this.offset.parent.left*i-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():r?0:o.scrollLeft())*i}},_generatePosition:function(t){var n,i,o=this.options,r=t.pageX,s=t.pageY,a="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,l=/(html|body)/i.test(a[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(t.pageX-this.offset.click.left<this.containment[0]&&(r=this.containment[0]+this.offset.click.left),t.pageY-this.offset.click.top<this.containment[1]&&(s=this.containment[1]+this.offset.click.top),t.pageX-this.offset.click.left>this.containment[2]&&(r=this.containment[2]+this.offset.click.left),t.pageY-this.offset.click.top>this.containment[3]&&(s=this.containment[3]+this.offset.click.top)),o.grid&&(n=this.originalPageY+Math.round((s-this.originalPageY)/o.grid[1])*o.grid[1],s=this.containment?n-this.offset.click.top>=this.containment[1]&&n-this.offset.click.top<=this.containment[3]?n:n-this.offset.click.top>=this.containment[1]?n-o.grid[1]:n+o.grid[1]:n,i=this.originalPageX+Math.round((r-this.originalPageX)/o.grid[0])*o.grid[0],r=this.containment?i-this.offset.click.left>=this.containment[0]&&i-this.offset.click.left<=this.containment[2]?i:i-this.offset.click.left>=this.containment[0]?i-o.grid[0]:i+o.grid[0]:i)),{top:s-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():l?0:a.scrollTop()),left:r-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():l?0:a.scrollLeft())}},_rearrange:function(e,t,n,i){n?n[0].appendChild(this.placeholder[0]):t.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?t.item[0]:t.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var o=this.counter;this._delay(function(){o===this.counter&&this.refreshPositions(!i)})},_clear:function(e,t){function n(e,t,n){return function(i){n._trigger(e,i,t._uiHash(t))}}this.reverting=!1;var i,o=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(i in this._storedCSS)"auto"!==this._storedCSS[i]&&"static"!==this._storedCSS[i]||(this._storedCSS[i]="");this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")}else this.currentItem.show();for(this.fromOutside&&!t&&o.push(function(e){this._trigger("receive",e,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||t||o.push(function(e){this._trigger("update",e,this._uiHash())}),this!==this.currentContainer&&(t||(o.push(function(e){this._trigger("remove",e,this._uiHash())}),o.push(function(e){return function(t){e._trigger("receive",t,this._uiHash(this))}}.call(this,this.currentContainer)),o.push(function(e){return function(t){e._trigger("update",t,this._uiHash(this))}}.call(this,this.currentContainer)))),i=this.containers.length-1;i>=0;
vendor: 2,317 bytes, line 13
13i--)t||o.push(n("deactivate",this,this.containers[i])),this.containers[i].containerCache.over&&(o.push(n("out",this,this.containers[i])),this.containers[i].containerCache.over=0);if(this._storedStylesheet&&(this._storedStylesheet.remove(),this._storedStylesheet=null),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,t||this._trigger("beforeStop",e,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!t){for(i=0;i<o.length;i++)o[i].call(this,e);this._trigger("stop",e,this._uiHash())}return this.fromOutside=!1,!this.cancelHelperRemoval},_trigger:function(){!1===e.Widget.prototype._trigger.apply(this,arguments)&&this.cancel()},_uiHash:function(t){var n=t||this;return{helper:n.helper,placeholder:n.placeholder||e([]),position:n.position,originalPosition:n.originalPosition,offset:n.positionAbs,item:n.currentItem,sender:t?t.element:null}}})}),function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","./button","../version","../keycode","../widget"],e):e(jQuery)}(function(e){"use strict";function t(e){return function(){var t=this.element.val();e.apply(this,arguments),this._refresh(),t!==this.element.val()&&this._trigger("change")}}return e.widget("ui.spinner",{version:"1.14.1",defaultElement:"<input>",widgetEventPrefix:"spin",options:{classes:{"ui-spinner":"ui-corner-all","ui-spinner-down":"ui-corner-br","ui-spinner-up":"ui-corner-tr"},culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),""!==this.value()&&this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var t=this._super(),n=this.element;return e.each(["min","max","step"],function(e,i){var o=n.attr(i);null!=o&&o.length&&(t[i]=o)}),t}
vendor: 21,477 bytes, line 13
13,_events:{keydown:function(e){this._start(e)&&this._keydown(e)&&e.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(e){this._stop(),this._refresh(),this.previous!==this.element.val()&&this._trigger("change",e)},mousewheel:function(e,t){var n=this.document[0].activeElement;if(this.element[0]===n&&t){if(!this.spinning&&!this._start(e))return!1;this._spin((t>0?1:-1)*this.options.step,e),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(e)},100),e.preventDefault()}},"mousedown .ui-spinner-button":function(t){function n(){this.element[0]===this.document[0].activeElement||(this.element.trigger("focus"),this.previous=i)}var i;i=this.element[0]===this.document[0].activeElement?this.previous:this.element.val(),t.preventDefault(),n.call(this),!1!==this._start(t)&&this._repeat(null,e(t.currentTarget).hasClass("ui-spinner-up")?1:-1,t)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(t){if(e(t.currentTarget).hasClass("ui-state-active"))return!1!==this._start(t)&&void this._repeat(null,e(t.currentTarget).hasClass("ui-spinner-up")?1:-1,t)},"mouseleave .ui-spinner-button":"_stop"},_enhance:function(){this.uiSpinner=this.element.attr("autocomplete","off").wrap("<span>").parent().append("<a></a><a></a>")},_draw:function(){this._enhance(),this._addClass(this.uiSpinner,"ui-spinner","ui-widget ui-widget-content"),this._addClass("ui-spinner-input"),this.element.attr("role","spinbutton"),this.buttons=this.uiSpinner.children("a").attr("tabIndex",-1).attr("aria-hidden",!0).button({classes:{"ui-button":""}}),this._removeClass(this.buttons,"ui-corner-all"),this._addClass(this.buttons.first(),"ui-spinner-button ui-spinner-up"),this._addClass(this.buttons.last(),"ui-spinner-button ui-spinner-down"),this.buttons.first().button({icon:this.options.icons.up,showLabel:!1}),this.buttons.last().button({icon:this.options.icons.down,showLabel:!1}),this.buttons.height()>Math.ceil(.5*this.uiSpinner.height())&&this.uiSpinner.height()>0&&this.uiSpinner.height(this.uiSpinner.height())},_keydown:function(t){var n=this.options,i=e.ui.keyCode;switch(t.keyCode){case i.UP:return this._repeat(null,1,t),!0;case i.DOWN:return this._repeat(null,-1,t),!0;case i.PAGE_UP:return this._repeat(null,n.page,t),!0;case i.PAGE_DOWN:return this._repeat(null,-n.page,t),!0}return!1},_start:function(e){return!(!this.spinning&&!1===this._trigger("start",e))&&(this.counter||(this.counter=1),this.spinning=!0,!0)},_repeat:function(e,t,n){e=e||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,t,n)},e),this._spin(t*this.options.step,n)},_spin:function(e,t){var n=this.value()||0;this.counter||(this.counter=1),n=this._adjustValue(n+e*this._increment(this.counter)),this.spinning&&!1===this._trigger("spin",t,{value:n})||(this._value(n),this.counter++)},_increment:function(e){var t=this.options.incremental;return t?"function"==typeof t?t(e):Math.floor(e*e*e/5e4-e*e/500+17*e/200+1):1},_precision:function(){var e=this._precisionOf(this.options.step);return null!==this.options.min&&(e=Math.max(e,this._precisionOf(this.options.min))),e},_precisionOf:function(e){var t=e.toString(),n=t.indexOf(".");return-1===n?0:t.length-n-1},_adjustValue:function(e){var t,n,i=this.options;return n=e-(t=null!==i.min?i.min:0),e=t+(n=Math.round(n/i.step)*i.step),e=parseFloat(e.toFixed(this._precision())),null!==i.max&&e>i.max?i.max:null!==i.min&&e<i.min?i.min:e},_stop:function(e){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",e))},_setOption:function(e,t){var n,i,o;if("culture"===e||"numberFormat"===e)return n=this._parse(this.element.val()),this.options[e]=t,void this.element.val(this._format(n));"max"!==e&&"min"!==e&&"step"!==e||"string"==typeof t&&(t=this._parse(t)),"icons"===e&&(i=this.buttons.first().find(".ui-icon"),this._removeClass(i,null,this.options.icons.up),this._addClass(i,null,t.up),o=this.buttons.last().find(".ui-icon"),this._removeClass(o,null,this.options.icons.down),this._addClass(o,null,t.down)),this._super(e,t)},_setOptionDisabled:function(e){this._super(e),this._toggleClass(this.uiSpinner,null,"ui-state-disabled",!!e),this.element.prop("disabled",!!e),this.buttons.button(e?"disable":"enable")},_setOptions:t(function(e){this._super(e)}),_parse:function(e){return"string"==typeof e&&""!==e&&(e=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(e,10,this.options.culture):+e),""===e||isNaN(e)?null:e},_format:function(e){return""===e?"":window.Globalize&&this.options.numberFormat?Globalize.format(e,this.options.numberFormat,this.options.culture):e},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},isValid:function(){var e=this.value();return null!==e&&e===this._adjustValue(e)},_value:function(e,t){var n;""!==e&&null!==(n=this._parse(e))&&(t||(n=this._adjustValue(n)),e=this._format(n)),this.element.val(e),this._refresh()},_destroy:function(){this.element.prop("disabled",!1).removeAttr("autocomplete role aria-valuemin aria-valuemax aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:t(function(e){this._stepUp(e)}),_stepUp:function(e){this._start()&&(this._spin((e||1)*this.options.step),this._stop())},stepDown:t(function(e){this._stepDown(e)}),_stepDown:function(e){this._start()&&(this._spin((e||1)*-this.options.step),this._stop())},pageUp:t(function(e){this._stepUp((e||1)*this.options.page)}),pageDown:t(function(e){this._stepDown((e||1)*this.options.page)}),value:function(e){if(!arguments.length)return this._parse(this.element.val());t(this._value).call(this,e)},widget:function(){return this.uiSpinner}}),!0===e.uiBackCompat&&e.widget("ui.spinner",e.ui.spinner,{_enhance:function(){this.uiSpinner=this.element.attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml())},_uiSpinnerHtml:function(){return"<span>"},_buttonHtml:function(){return"<a></a><a></a>"}}),e.ui.spinner}),function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","../keycode","../unique-id","../version","../widget"],e):e(jQuery)}(function(e){"use strict";var t;return e.widget("ui.tabs",{version:"1.14.1",delay:300,options:{active:null,classes:{"ui-tabs":"ui-corner-all","ui-tabs-nav":"ui-corner-all","ui-tabs-panel":"ui-corner-bottom","ui-tabs-tab":"ui-corner-top"},collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_isLocal:(t=/#.*$/,function(e){var n,i;n=e.href.replace(t,""),i=location.href.replace(t,"");try{n=decodeURIComponent(n)}catch(e){}try{i=decodeURIComponent(i)}catch(e){}return e.hash.length>1&&n===i}),_create:function(){var t=this,n=this.options;this.running=!1,this._addClass("ui-tabs","ui-widget ui-widget-content"),this._toggleClass("ui-tabs-collapsible",null,n.collapsible),this._processTabs(),n.active=this._initialActive(),Array.isArray(n.disabled)&&(n.disabled=e.uniqueSort(n.disabled.concat(e.map(this.tabs.filter(".ui-state-disabled"),function(e){return t.tabs.index(e)}))).sort()),!1!==this.options.active&&this.anchors.length?this.active=this._findActive(n.active):this.active=e(),this._refresh(),this.active.length&&this.load(n.active)},_initialActive:function(){var t=this.options.active,n=this.options.collapsible,i=decodeURIComponent(location.hash.substring(1));return null===t&&(i&&this.tabs.each(function(n,o){if(e(o).attr("aria-controls")===i)return t=n,!1}),null===t&&(t=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),null!==t&&-1!==t||(t=!!this.tabs.length&&0)),!1!==t&&-1===(t=this.tabs.index(this.tabs.eq(t)))&&(t=!n&&0),!n&&!1===t&&this.anchors.length&&(t=0),t},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):e()}},_tabKeydown:function(t){var n=e(this.document[0].activeElement).closest("li"),i=this.tabs.index(n),o=!0;if(!this._handlePageNav(t)){switch(t.keyCode){case e.ui.keyCode.RIGHT:case e.ui.keyCode.DOWN:i++;break;case e.ui.keyCode.UP:case e.ui.keyCode.LEFT:o=!1,i--;break;case e.ui.keyCode.END:i=this.anchors.length-1;break;case e.ui.keyCode.HOME:i=0;break;case e.ui.keyCode.SPACE:return t.preventDefault(),clearTimeout(this.activating),void this._activate(i);case e.ui.keyCode.ENTER:return t.preventDefault(),clearTimeout(this.activating),void this._activate(i!==this.options.active&&i);default:return}t.preventDefault(),clearTimeout(this.activating),i=this._focusNextTab(i,o),t.ctrlKey||t.metaKey||(n.attr("aria-selected","false"),this.tabs.eq(i).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",i)},this.delay))}},_panelKeydown:function(t){this._handlePageNav(t)||t.ctrlKey&&t.keyCode===e.ui.keyCode.UP&&(t.preventDefault(),this.active.trigger("focus"))},_handlePageNav:function(t){return t.altKey&&t.keyCode===e.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):t.altKey&&t.keyCode===e.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):void 0},_findNextTab:function(t,n){function i(){return t>o&&(t=0),t<0&&(t=o),t}for(var o=this.tabs.length-1;-1!==e.inArray(i(),this.options.disabled);)t=n?t+1:t-1;return t},_focusNextTab:function(e,t){return e=this._findNextTab(e,t),this.tabs.eq(e).trigger("focus"),e},_setOption:function(e,t){"active"!==e?(this._super(e,t),"collapsible"===e&&(this._toggleClass("ui-tabs-collapsible",null,t),t||!1!==this.options.active||this._activate(0)),"event"===e&&this._setupEvents(t),"heightStyle"===e&&this._setupHeightStyle(t)):this._activate(t)},refresh:function(){var t=this.options,n=this.tablist.children(":has(a[href])");t.disabled=e.map(n.filter(".ui-state-disabled"),function(e){return n.index(e)}),this._processTabs(),!1!==t.active&&this.anchors.length?this.active.length&&!e.contains(this.tablist[0],this.active[0])?this.tabs.length===t.disabled.length?(t.active=!1,this.active=e()):this._activate(this._findNextTab(Math.max(0,t.active-1),!1)):t.active=this.tabs.index(this.active):(t.active=!1,this.active=e()),this._refresh()},_refresh:function(){this._setOptionDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-hidden":"true"}),this.active.length?(this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}),this._addClass(this.active,"ui-tabs-active","ui-state-active"),this._getPanelForTab(this.active).show().attr({"aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var t=this,n=this.tabs,i=this.anchors,o=this.panels;this.tablist=this._getList().attr("role","tablist"),this._addClass(this.tablist,"ui-tabs-nav","ui-helper-reset ui-helper-clearfix ui-widget-header"),this.tablist.on("mousedown"+this.eventNamespace,"> li",function(t){e(this).is(".ui-state-disabled")&&t.preventDefault()}),this.tabs=this.tablist.find("> li:has(a[href])").attr({role:"tab",tabIndex:-1}),this._addClass(this.tabs,"ui-tabs-tab","ui-state-default"),this.anchors=this.tabs.map(function(){return e("a",this)[0]}).attr({tabIndex:-1}),this._addClass(this.anchors,"ui-tabs-anchor"),this.panels=e(),this.anchors.each(function(n,i){var o,r,s,a=e(i).uniqueId().attr("id"),l=e(i).closest("li"),c=l.attr("aria-controls");t._isLocal(i)?(s=(o=decodeURIComponent(i.hash)).substring(1),r=t.element.find("#"+CSS.escape(s))):(o="#"+(s=l.attr("aria-controls")||e({}).uniqueId()[0].id),(r=t.element.find(o)).length||(r=t._createPanel(s)).insertAfter(t.panels[n-1]||t.tablist),r.attr("aria-live","polite")),r.length&&(t.panels=t.panels.add(r)),c&&l.data("ui-tabs-aria-controls",c),l.attr({"aria-controls":s,"aria-labelledby":a}),r.attr("aria-labelledby",a)}),this.panels.attr("role","tabpanel"),this._addClass(this.panels,"ui-tabs-panel","ui-widget-content"),n&&(this._off(n.not(this.tabs)),this._off(i.not(this.anchors)),this._off(o.not(this.panels)))},_getList:function(){return this.tablist||this.element.find("ol, ul").eq(0)},_createPanel:function(t){return e("<div>").attr("id",t).data("ui-tabs-destroy",!0)},_setOptionDisabled:function(t){var n,i,o;for(Array.isArray(t)&&(t.length?t.length===this.anchors.length&&(t=!0):t=!1),o=0;i=this.tabs[o];o++)n=e(i),!0===t||-1!==e.inArray(o,t)?(n.attr("aria-disabled","true"),this._addClass(n,null,"ui-state-disabled")):(n.removeAttr("aria-disabled"),this._removeClass(n,null,"ui-state-disabled"));this.options.disabled=t,this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!0===t)},_setupEvents:function(t){var n={};t&&e.each(t.split(" "),function(e,t){n[t]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(!0,this.anchors,{click:function(e){e.preventDefault()}}),this._on(this.anchors,n),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(t){var n,i=this.element.parent();"fill"===t?(n=i.height(),n-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var t=e(this),i=t.css("position");"absolute"!==i&&"fixed"!==i&&(n-=t.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){n-=e(this).outerHeight(!0)}),this.panels.each(function(){e(this).height(Math.max(0,n-e(this).innerHeight()+e(this).height()))}).css("overflow","auto")):"auto"===t&&(n=0,this.panels.each(function(){n=Math.max(n,e(this).height("").height())}).height(n))},_eventHandler:function(t){var n=this.options,i=this.active,o=e(t.currentTarget).closest("li"),r=o[0]===i[0],s=r&&n.collapsible,a=s?e():this._getPanelForTab(o),l=i.length?this._getPanelForTab(i):e(),c={oldTab:i,oldPanel:l,newTab:s?e():o,newPanel:a};t.preventDefault(),o.hasClass("ui-state-disabled")||o.hasClass("ui-tabs-loading")||this.running||r&&!n.collapsible||!1===this._trigger("beforeActivate",t,c)||(n.active=!s&&this.tabs.index(o),this.active=r?e():o,this.xhr&&this.xhr.abort(),l.length||a.length||e.error("jQuery UI Tabs: Mismatching fragment identifier."),a.length&&this.load(this.tabs.index(o),t),this._toggle(t,c))},_toggle:function(t,n){function i(){r.running=!1,r._trigger("activate",t,n)}function o(){r._addClass(n.newTab.closest("li"),"ui-tabs-active","ui-state-active"),s.length&&r.options.show?r._show(s,r.options.show,i):(s.show(),i())}var r=this,s=n.newPanel,a=n.oldPanel;this.running=!0,a.length&&this.options.hide?this._hide(a,this.options.hide,function(){r._removeClass(n.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),o()}):(this._removeClass(n.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),a.hide(),o()),a.attr("aria-hidden","true"),n.oldTab.attr({"aria-selected":"false","aria-expanded":"false"}),s.length&&a.length?n.oldTab.attr("tabIndex",-1):s.length&&this.tabs.filter(function(){return 0===e(this).attr("tabIndex")}).attr("tabIndex",-1),s.attr("aria-hidden","false"),n.newTab.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_activate:function(t){var n,i=this._findActive(t);i[0]!==this.active[0]&&(i.length||(i=this.active),n=i.find(".ui-tabs-anchor")[0],this._eventHandler({target:n,currentTarget:n,preventDefault:e.noop}))},_findActive:function(t){return!1===t?e():this.tabs.eq(t)},_getIndex:function(e){return"string"==typeof e&&(e=this.anchors.index(this.anchors.filter("[href$='"+CSS.escape(e)+"']"))),e},_destroy:function(){this.xhr&&this.xhr.abort(),this.tablist.removeAttr("role").off(this.eventNamespace),this.anchors.removeAttr("role tabIndex").removeUniqueId(),this.tabs.add(this.panels).each(function(){e.data(this,"ui-tabs-destroy")?e(this).remove():e(this).removeAttr("role tabIndex aria-live aria-busy aria-selected aria-labelledby aria-hidden aria-expanded")}),this.tabs.each(function(){var t=e(this),n=t.data("ui-tabs-aria-controls");n?t.attr("aria-controls",n).removeData("ui-tabs-aria-controls"):t.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(t){var n=this.options.disabled;!1!==n&&(void 0===t?n=!1:(t=this._getIndex(t),n=Array.isArray(n)?e.map(n,function(e){return e!==t?e:null}):e.map(this.tabs,function(e,n){return n!==t?n:null})),this._setOptionDisabled(n))},disable:function(t){var n=this.options.disabled;if(!0!==n){if(void 0===t)n=!0;else{if(t=this._getIndex(t),-1!==e.inArray(t,n))return;n=Array.isArray(n)?e.merge([t],n).sort():[t]}this._setOptionDisabled(n)}},load:function(t,n){t=this._getIndex(t);var i=this,o=this.tabs.eq(t),r=o.find(".ui-tabs-anchor"),s=this._getPanelForTab(o),a={tab:o,panel:s},l=function(e,t){"abort"===t&&i.panels.stop(!1,!0),i._removeClass(o,"ui-tabs-loading"),s.removeAttr("aria-busy"),e===i.xhr&&delete i.xhr};this._isLocal(r[0])||(this.xhr=e.ajax(this._ajaxSettings(r,n,a)),"canceled"!==this.xhr.statusText&&(this._addClass(o,"ui-tabs-loading"),s.attr("aria-busy","true"),this.xhr.done(function(e,t,o){s.html(e),i._trigger("load",n,a),l(o,t)}).fail(function(e,t){l(e,t)})))},_ajaxSettings:function(t,n,i){var o=this;return{url:t.attr("href"),beforeSend:function(t,r){return o._trigger("beforeLoad",n,e.extend({jqXHR:t,ajaxSettings:r},i))}}},_getPanelForTab:function(t){var n=e(t).attr("aria-controls");return this.element.find("#"+CSS.escape(n))}}),!0===e.uiBackCompat&&e.widget("ui.tabs",e.ui.tabs,{_processTabs:function(){this._superApply(arguments),this._addClass(this.tabs,"ui-tab")}}),e.ui.tabs}),function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","../keycode","../position","../unique-id","../version","../widget"],e):e(jQuery)}(function(e){"use strict";return e.widget("ui.tooltip",{version:"1.14.1",options:{classes:{"ui-tooltip":"ui-corner-all ui-widget-shadow"},content:function(){var t=e(this).attr("title");return e("<a>").text(t).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,track:!1,close:null,open:null},_addDescribedBy:function(e,t){var n=(e.attr("aria-describedby")||"").split(/\s+/);n.push(t),e.data("ui-tooltip-id",t).attr("aria-describedby",String.prototype.trim.call(n.join(" ")))},_removeDescribedBy:function(t){var n=t.data("ui-tooltip-id"),i=(t.attr("aria-describedby")||"").split(/\s+/),o=e.inArray(n,i);-1!==o&&i.splice(o,1),t.removeData("ui-tooltip-id"),(i=String.prototype.trim.call(i.join(" ")))?t.attr("aria-describedby",i):t.removeAttr("aria-describedby")},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.liveRegion=e("<div>").attr({role:"log","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this.disabledTitles=e([])},_setOption:function(t,n){var i=this;this._super(t,n),"content"===t&&e.each(this.tooltips,function(e,t){i._updateContent(t.element)})},_setOptionDisabled:function(e){this[e?"_disable":"_enable"]()},_disable:function(){var t=this;e.each(this.tooltips,function(n,i){var o=e.Event("blur");o.target=o.currentTarget=i.element[0],t.close(o,!0)}),this.disabledTitles=this.disabledTitles.add(this.element.find(this.options.items).addBack().filter(function(){var t=e(this);if(t.is("[title]"))return t.data("ui-tooltip-title",t.attr("title")).removeAttr("title")}))},_enable:function(){this.disabledTitles.each(function(){var t=e(this);t.data("ui-tooltip-title")&&t.attr("title",t.data("ui-tooltip-title"))}),this.disabledTitles=e([])},open:function(t){var n=this,i=e(t?t.target:this.element).closest(this.options.items);i.length&&!i.data("ui-tooltip-id")&&(i.attr("title")&&i.data("ui-tooltip-title",i.attr("title")),i.data("ui-tooltip-open",!0),t&&"mouseover"===t.type&&i.parents().each(function(){var t,i=e(this);i.data("ui-tooltip-open")&&((t=e.Event("blur")).target=t.currentTarget=this,n.close(t,!0)),i.attr("title")&&(i.uniqueId(),n.parents[this.id]={element:this,title:i.attr("title")},i.attr("title",""))}),this._registerCloseHandlers(t,i),this._updateContent(i,t))},_updateContent:function(e,t){var n,i=this.options.content,o=this,r=t?t.type:null;if("string"==typeof i||i.nodeType||i.jquery)return this._open(t,e,i);(n=i.call(e[0],function(n){e.data("ui-tooltip-open")&&(t&&(t.type=r),o._open(t,e,n))}))&&this._open(t,e,n)},_open:function(t,n,i){function o(e){c.of=e,s.is(":hidden")||s.position(c)}var r,s,a,l,c=e.extend({},this.options.position);i&&((r=this._find(n))?r.tooltip.find(".ui-tooltip-content").html(i):(n.is("[title]")&&(t&&"mouseover"===t.type?n.attr("title",""):n.removeAttr("title")),r=this._tooltip(n),s=r.tooltip,this._addDescribedBy(n,s.attr("id")),s.find(".ui-tooltip-content").html(i),this.liveRegion.children().hide(),(l=e("<div>").html(s.find(".ui-tooltip-content").html())).removeAttr("name").find("[name]").removeAttr("name"),l.removeAttr("id").find("[id]").removeAttr("id"),l.appendTo(this.liveRegion),this.options.track&&t&&/^mouse/.test(t.type)?(this._on(this.document,{mousemove:o}),o(t)):s.position(e.extend({of:n},this.options.position)),s.hide(),this._show(s,this.options.show),this.options.track&&this.options.show&&this.options.show.delay&&(a=this.delayedShow=setInterval(function(){s.is(":visible")&&(o(c.of),clearInterval(a))},13)),this._trigger("open",t,{tooltip:s}
13)))},_registerCloseHandlers:function(t,n){var i={keyup:function(t){if(t.keyCode===e.ui.keyCode.ESCAPE){var i=e.Event(t);i.currentTarget=n[0],this.close(i,!0)}}};n[0]!==this.element[0]&&(i.remove=function(){var e=this._find(n);e&&this._removeTooltip(e.tooltip)}),t&&"mouseover"!==t.type||(i.mouseleave="close"),t&&"focusin"!==t.type||(i.focusout="close"),this._on(!0,n,i)},close:function(t){var n,i=this,o=e(t?t.currentTarget:this.element),r=this._find(o);r?(n=r.tooltip,r.closing||(clearInterval(this.delayedShow),o.data("ui-tooltip-title")&&!o.attr("title")&&o.attr("title",o.data("ui-tooltip-title")),this._removeDescribedBy(o),r.hiding=!0,n.stop(!0),this._hide(n,this.options.hide,function(){i._removeTooltip(e(this))}),o.removeData("ui-tooltip-open"),this._off(o,"mouseleave focusout keyup"),o[0]!==this.element[0]&&this._off(o,"remove"),this._off(this.document,"mousemove"),t&&"mouseleave"===t.type&&e.each(this.parents,function(t,n){e(n.element).attr("title",n.title),delete i.parents[t]}),r.closing=!0,this._trigger("close",t,{tooltip:n}),r.hiding||(r.closing=!1))):o.removeData("ui-tooltip-open")},_tooltip:function(t){var n=e("<div>").attr("role","tooltip"),i=e("<div>").appendTo(n),o=n.uniqueId().attr("id");return this._addClass(i,"ui-tooltip-content"),this._addClass(n,"ui-tooltip","ui-widget ui-widget-content"),n.appendTo(this._appendTo(t)),this.tooltips[o]={element:t,tooltip:n}},_find:function(e){var t=e.data("ui-tooltip-id");return t?this.tooltips[t]:null},_removeTooltip:function(e){clearInterval(this.delayedShow),e.remove(),delete this.tooltips[e.attr("id")]},_appendTo:function(e){var t=e.closest(".ui-front, dialog");return t.length||(t=this.document[0].body),t},_destroy:function(){var t=this;e.each(this.tooltips,function(n,i){var o=e.Event("blur"),r=i.element;o.target=o.currentTarget=r[0],t.close(o,!0),e("#"+n).remove(),r.data("ui-tooltip-title")&&(r.attr("title")||r.attr("title",r.data("ui-tooltip-title")),r.removeData("ui-tooltip-title"))}),this.liveRegion.remove()}}),!0===e.uiBackCompat&&e.widget("ui.tooltip",e.ui.tooltip,{options:{tooltipClass:null},_tooltip:function(){var e=this._superApply(arguments);return this.options.tooltipClass&&e.tooltip.addClass(this.options.tooltipClass),e}}),e.ui.tooltip}),function(e){"use strict";var t={init:function(n){return this.each(function(){this.self=e(this),t.destroy.call(this.self),this.opt=e.extend(!0,{},e.fn.raty.defaults,n),t._adjustCallback.call(this),t._adjustNumber.call(this),t._adjustHints.call(this),this.opt.score=t._adjustedScore.call(this,this.opt.score),"img"!==this.opt.starType&&t._adjustStarType.call(this),t._adjustPath.call(this),t._createStars.call(this),this.opt.cancel&&t._createCancel.call(this),this.opt.precision&&t._adjustPrecision.call(this),t._createScore.call(this),t._apply.call(this,this.opt.score),t._setTitle.call(this,this.opt.score),t._target.call(this,this.opt.score),this.opt.readOnly?t._lock.call(this):(this.style.cursor="pointer",t._binds.call(this))})},_adjustCallback:function(){for(var e=["number","readOnly","score","scoreName","target","path"],t=0;t<e.length;t++)"function"==typeof this.opt[e[t]]&&(this.opt[e[t]]=this.opt[e[t]].call(this))},_adjustedScore:function(e){return e?t._between(e,0,this.opt.number):e},_adjustHints:function(){
14if(this.opt.hints||(this.opt.hints=[]),this.opt.halfShow||this.opt.half)for(var e=this.opt.precision?10:2,t=0;t<this.opt.number;t++){var n=this.opt.hints[t];"[object Array]"!==Object.prototype.toString.call(n)&&(n=[n]),this.opt.hints[t]=[];for(var i=0;i<e;i++){var o=n[i],r=n[n.length-1];void 0===r&&(r=null),this.opt.hints[t][i]=void 0===o?r:o}}},_adjustNumber:function(){this.opt.number=t._between(this.opt.number,1,this.opt.numberMax)},_adjustPath:function(){this.opt.path=this.opt.path||"",this.opt.path&&"/"!==this.opt.path.charAt(this.opt.path.length-1)&&(this.opt.path+="/")},_adjustPrecision:function(){this.opt.half=!0},_adjustStarType:function(){var e=["cancelOff","cancelOn","starHalf","starOff","starOn"];this.opt.path="";for(var t=0;t<e.length;t++)this.opt[e[t]]=this.opt[e[t]].replace(".","-")},_apply:function(e){t._fill.call(this,e),e&&(e>0&&this.score.val(e),t._roundStars.call(this,e))},_between:function(e,t,n){return Math.min(Math.max(parseFloat(e),t),n)},_binds:function(){this.cancel&&(t._bindOverCancel.call(this),t._bindClickCancel.call(this),t._bindOutCancel.call(this)),t._bindOver.call(this),t._bindClick.call(this),t._bindOut.call(this)},_bindClick:function(){var n=this;n.stars.on("click.raty",function(i){var o=!0,r=n.opt.half||n.opt.precision?n.self.data("score"):this.alt||e(this).data("alt");n.opt.click&&(o=n.opt.click.call(n,+r,i)),(o||void 0===o)&&(n.opt.half&&!n.opt.precision&&(r=t._roundHalfScore.call(n,r)),t._apply.call(n,r))})},_bindClickCancel:function(){var e=this;e.cancel.on("click.raty",function(t){e.score.removeAttr("value"),e.opt.click&&e.opt.click.call(e,null,t)})},_bindOut:function(){var e=this;e.self.on("mouseleave.raty",function(n){var i=+e.score.val()||void 0;t._apply.call(e,i),t._target.call(e,i,n),t._resetTitle.call(e),e.opt.mouseout&&e.opt.mouseout.call(e,i,n)})},_bindOutCancel:function(){var e=this;e.cancel.on("mouseleave.raty",function(n){var i=e.opt.cancelOff;if("img"!==e.opt.starType&&(i=e.opt.cancelClass+" "+i),t._setIcon.call(e,this,i),e.opt.mouseout){var o=+e.score.val()||void 0;e.opt.mouseout.call(e,o,n)}})},_bindOver:function(){var e=this,n=e.opt.half?"mousemove.raty":"mouseover.raty";e.stars.on(n,function(n){var i=t._getScoreByPosition.call(e,n,this);t._fill.call(e,i),e.opt.half&&(t._roundStars.call(e,i,n),t._setTitle.call(e,i,n),e.self.data("score",i)),t._target.call(e,i,n),e.opt.mouseover&&e.opt.mouseover.call(e,i,n)})},_bindOverCancel:function(){var e=this;e.cancel.on("mouseover.raty",function(n){var i=e.opt.path+e.opt.starOff,o=e.opt.cancelOn;"img"===e.opt.starType?e.stars.attr("src",i):(o=e.opt.cancelClass+" "+o,e.stars.attr("class",i)),t._setIcon.call(e,this,o),t._target.call(e,null,n),e.opt.mouseover&&e.opt.mouseover.call(e,null)})},_buildScoreField:function(){return e("<input />",{name:this.opt.scoreName,type:"hidden"}).appendTo(this)},_createCancel:function(){var t=this.opt.path+this.opt.cancelOff,n=e("<"+this.opt.starType+" />",{title:this.opt.cancelHint,class:this.opt.cancelClass});"img"===this.opt.starType?n.attr({src:t,alt:"x"}):n.attr("data-alt","x").addClass(t),"left"===this.opt.cancelPlace?this.self.prepend("&#160;").prepend(n):this.self.append("&#160;").append(n),this.cancel=n},_createScore:function(){var n=e(this.opt.targetScore);this.score=n.length?n:t._buildScoreField.call(this)},_createStars:function(){for(var n=1;n<=this.opt.number;n++){var i=t._nameForIndex.call(this,n),o={alt:n,src:this.opt.path+this.opt[i]};"img"!==this.opt.starType&&(o={"data-alt":n,class:o.src}),o.title=t._getHint.call(this,n),e("<"+this.opt.starType+" />",o).appendTo(this),this.opt.space&&this.self.append(n<this.opt.number?"&#160;":"")}this.stars=this.self.children(this.opt.starType)},_error:function(t){e(this).text(t),e.error(t)},_fill:function(e){for(var n=0,i=1;i<=this.stars.length;i++){var o,r=this.stars[i-1],s=t._turnOn.call(this,i,e);if(this.opt.iconRange&&this.opt.iconRange.length>n){var a=this.opt.iconRange[n];o=t._getRangeIcon.call(this,a,s),i<=a.range&&t._setIcon.call(this,r,o),i===a.range&&n++}else o=this.opt[s?"starOn":"starOff"],t._setIcon.call(this,r,o)}}
14,_getFirstDecimal:function(e){var t=e.toString().split(".")[1],n=0;return t&&(n=parseInt(t.charAt(0),10),"9999"===t.slice(1,5)&&n++),n},_getRangeIcon:function(e,t){return t?e.on||this.opt.starOn:e.off||this.opt.starOff},_getScoreByPosition:function(n,i){var o=parseInt(i.alt||i.getAttribute("data-alt"),10);if(this.opt.half){var r=t._getWidth.call(this);o=o-1+parseFloat((n.pageX-e(i).offset().left)/r)}return o},_getHint:function(e,n){if(0!==e&&!e)return this.opt.noRatedMsg;var i=t._getFirstDecimal.call(this,e),o=Math.ceil(e),r=this.opt.hints[(o||1)-1],s=r,a=!n||this.move;return this.opt.precision?(a&&(i=0===i?9:i-1),s=r[i]):(this.opt.halfShow||this.opt.half)&&(s=r[i=a&&0===i||i>5?1:0]),""===s?"":s||e},_getWidth:function(){var e=this.stars[0].width||parseFloat(this.stars.eq(0).css("font-size"));return e||t._error.call(this,"Could not get the icon width!"),e},_lock:function(){var e=t._getHint.call(this,this.score.val());this.style.cursor="",this.title=e,this.score.prop("readonly",!0),this.stars.prop("title",e),this.cancel&&this.cancel.hide(),this.self.data("readonly",!0)},_nameForIndex:function(e){return this.opt.score&&this.opt.score>=e?"starOn":"starOff"},_resetTitle:function(){for(var e=0;e<this.opt.number;e++)this.stars[e].title=t._getHint.call(this,e+1)},_roundHalfScore:function(e){var n=parseInt(e,10),i=t._getFirstDecimal.call(this,e);return 0!==i&&(i=i>5?1:.5),n+i},_roundStars:function(e,n){var i,o=(e%1).toFixed(2);if(n||this.move?i=o>.5?"starOn":"starHalf":o>this.opt.round.down&&(i="starOn",this.opt.halfShow&&o<this.opt.round.up?i="starHalf":o<this.opt.round.full&&(i="starOff")),i){var r=this.opt[i],s=this.stars[Math.ceil(e)-1];t._setIcon.call(this,s,r)}},_setIcon:function(e,t){e["img"===this.opt.starType?"src":"className"]=this.opt.path+t},_setTarget:function(e,t){t&&(t=this.opt.targetFormat.toString().replace("{score}",t)),e.is(":input")?e.val(t):e.html(t)},_setTitle:function(e,n){if(e){var i=parseInt(Math.ceil(e),10);this.stars[i-1].title=t._getHint.call(this,e,n)}},_target:function(n,i){if(this.opt.target){var o=e(this.opt.target);o.length||t._error.call(this,"Target selector invalid or missing!");var r=i&&"mouseover"===i.type;if(void 0===n)n=this.opt.targetText;else if(null===n)n=r?this.opt.cancelHint:this.opt.targetText;else{"hint"===this.opt.targetType?n=t._getHint.call(this,n,i):this.opt.precision&&(n=parseFloat(n).toFixed(1));var s=i&&"mousemove"===i.type;r||s||this.opt.targetKeep||(n=this.opt.targetText)}t._setTarget.call(this,o,n)}},_turnOn:function(e,t){return this.opt.single?e===t:e<=t},_unlock:function(){this.style.cursor="pointer",this.removeAttribute("title"),this.score.removeAttr("readonly"),this.self.data("readonly",!1);for(var e=0;e<this.opt.number;e++)this.stars[e].title=t._getHint.call(this,e+1);this.cancel&&this.cancel.css("display","")},cancel:function(n){return this.each(function(){var i=e(this);!0!==i.data("readonly")&&(t[n?"click":"score"].call(i,null),this.score.removeAttr("value"))})},click:function(n){return this.each(function(){!0!==e(this).data("readonly")&&(n=t._adjustedScore.call(this,n),t._apply.call(this,n),this.opt.click&&this.opt.click.call(this,n,e.Event("click")),t._target.call(this,n))})},destroy:function(){return this.each(function(){var t=e(this),n=t.data("raw");n?t.off(".raty").empty().css({cursor:n.style.cursor}).removeData("readonly"):t.data("raw",t.clone()[0])})},getScore:function(){var e,t=[];return this.each(function(){e=this.score.val(),t.push(e?+e:void 0)}),t.length>1?t:t[0]},move:function(n){return this.each(function(){var i=parseInt(n,10),o=t._getFirstDecimal.call(this,n);i>=this.opt.number&&(i=this.opt.number-1,o=10);var r=t._getWidth.call(this)/10,s=e(this.stars[i]),a=s.offset().left+r*o,l=e.Event("mousemove",{pageX:a});this.move=!0,s.trigger(l),this.move=!1})},readOnly:function(n){return this.each(function(){var i=e(this);i.data("readonly")!==n&&(n?(i.off(".raty").children("img").off(".raty"),t._lock.call(this)):(t._binds.call(this),t._unlock.call(this)),i.data("readonly",n))})},reload:function(){return t.set.call(this,{})},score:function(){var n=e(this);return arguments.length?t.setScore.apply(n,arguments):t.getScore.call(n)},set:function(t){return this.each(function(){e(this).raty(e.extend({},this.opt,t))})},setScore:function(n){return this.each(function(){!0!==e(this).data("readonly")&&(n=t._adjustedScore.call(this,n),t._apply.call(this,n),t._target.call(this,n))})}};e.fn.raty=function(n){return t[n]?t[n].apply(this,Array.prototype.slice.call(arguments,1
14)):"object"!=typeof n&&n?void e.error("Method "+n+" does not exist!"):t.init.apply(this,arguments)},e.fn.raty.defaults={cancel:!1,cancelClass:"raty-cancel",cancelHint:"Cancel this rating!",cancelOff:"cancel-off.png",cancelOn:"cancel-on.png",cancelPlace:"left",click:void 0,half:!1,halfShow:!0,hints:["bad","poor","ok","good","gorgeous"],iconRange:void 0,mouseout:void 0,mouseover:void 0,noRatedMsg:"Not rated yet!",number:5,numberMax:20,path:void 0,precision:!1,readOnly:!1,round:{down:.25,full:.6,up:.76},score:void 0,scoreName:"score",single:!1,space:!0,starHalf:"star-half.png",starOff:"star-off.png",starOn:"star-on.png",starType:"img",target:void 0,targetFormat:"{score}",targetKeep:!1,targetScore:void 0,targetText:"",targetType:"hint"}}(jQuery),function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof exports?exports.autonumeric=t(require("jquery")):e.autonumeric=t(e.jQuery)}(this,function(e){return function(e){function t(i){if(n[i])return n[i].exports;var o=n[i]={exports:{},id:i,loaded:!1};return e[i].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){var i,o,r;n(1),n(1),function(){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){var n=[],i=!0,o=!1,r=void 0;try{for(var s,a=e[Symbol.iterator]();!(i=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);i=!0);}catch(e){o=!0,r=e}finally{try{!i&&a.return&&a.return()}finally{if(o)throw r}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l=void 0,c=void 0,d=void 0,u=void 0,h=void 0,p=["b","caption","cite","code","const","dd","del","div","dfn","dt","em","h1","h2","h3","h4","h5","h6","ins","kdb","label","li","option","output","p","q","s","sample","span","strong","td","th","u"],f={aSep:",",nSep:!1,dGroup:"3",aDec:".",altDec:null,aSign:"",pSign:"p",pNeg:"l",aSuffix:"",oLimits:null,vMax:"9999999999999.99",vMin:"-9999999999999.99",mDec:null,eDec:null,scaleDivisor:null,scaleDecimal:null,scaleSymbol:null,aStor:!1,mRound:"S",aPad:!0,nBracket:null,wEmpty:"focus",lZero:"allow",aForm:!0,sNumber:!1,anDefault:null,unSetOnSubmit:!1,outputType:null,debug:!1},m={Backspace:8,Tab:9,Enter:13,Shift:16,Ctrl:17,Alt:18,PauseBreak:19,CapsLock:20,Esc:27,Space:32,PageUp:33,PageDown:34,End:35,Home:36,LeftArrow:37,UpArrow:38,RightArrow:39,DownArrow:40,Insert:45,Delete:46,num0:48,num1:49,num2:50,num3:51,num4:52,num5:53,num6:54,num7:55,num8:56,num9:57,a:65,b:66,c:67,d:68,e:69,f:70,g:71,h:72,i:73,j:74,k:75,l:76,m:77,n:78,o:79,p:80,q:81,r:82,s:83,t:84,u:85,v:86,w:87,x:88,y:89,z:90,Windows:91,RightClick:93,numpad0:96,numpad1:97,numpad2:98,numpad3:99,numpad4:100,numpad5:101,numpad6:102,numpad7:103,numpad8:104,numpad9:105,MultiplyNumpad:106,PlusNumpad:107,MinusNumpad:109,DotNumpad:110,SlashNumpad:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NumLock:144,ScrollLock:145,MyComputer:182,MyCalculator:183,Semicolon:186,Equal:187,Comma:188,Hyphen:189,Dot:190,Slash:191,Backquote:192,LeftBracket:219,Backslash:220,RightBracket:221,Quote:222,Command:224};!function(s){o=[n(1)],void 0===(r="function"==typeof(i=s)?i.apply(t,o):i)||(e.exports=r)}(function(e){function t(e){return null===e}function n(e){return void 0===e}function i(e){return null==e||""===e}function o(e){return"string"==typeof e||e instanceof String}function r(e){return"boolean"==typeof e}function g(e){var t=String(e).toLowerCase();return"true"===t||"false"===t}function v(e){return"object"===(void 0===e?"undefined":a(e))&&null!==e&&!Array.isArray(e)}function y(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}function b(e){return""!==e&&!isNaN(e)}function _(e,t){return I(e,t.settingsClone).replace(t.settingsClone.aDec,".")}function w(e,t){return!(!o(e)||!o(t)||""===e||""===t)&&-1!==e.indexOf(t)}function C(e,t){return!(!k(t)||t===[]||n(e))&&-1!==t.indexOf(e)}function k(e){if("[object Array]"===Object.prototype.toString.call([]))return Array.isArray(e)||"object"===(void 0===e?"undefined":a(e))&&"[object Array]"===Object.prototype.toString.call(e);throw new Error("toString message changed for Object Array")}function x(e){var t=e.split(".");return!n(s(t,2)[1])}function S(e){var t=e.split("."),i=s(t,2)[1];return n(i)?null:i.length}function E(e){var t={};if(n(e.selectionStart)){e.focus();var i=document.selection.createRange();t.length=i.text.length,i.moveStart("character",-e.value.length),t.end=i.text.length,t.start=t.end-t.length}else t.start=e.selectionStart,t.end=e.selectionEnd,t.length=t.end-t.start;return t}function D(e,t,i){if(n(e.selectionStart)){e.focus();var o=e.createTextRange();o.collapse(!0),o.moveEnd("character",i),o.moveStart("character",t),o.select()}else e.selectionStart=t,e.selectionEnd=i}function T(e){throw new Error(e)}function A(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&console.warn("Warning: "+e)}function M(t,n){e.each(n,function(e,i){"function"==typeof i?n[e]=i(t,n,e):"function"==typeof t.autoNumeric[i]&&(n[e]=t.autoNumeric[i](t,n,e))})}function R(e,t){var n=0,i=0;return t[1]&&(n=t[1].length),e[1]&&(i=e[1].length),Math.max(n,i)}function N(e,t){M(e,t);var n=t.vMax.toString().split("."),i=t.vMin||0===t.vMin?t.vMin.toString().split("."):[];n[0]=n[0].replace("-",""),i[0]=i[0].replace("-",""),t.mIntPos=Math.max(n[0].length,1),t.mIntNeg=Math.max(i[0].length,1),null===t.mDec?(t.mDec=R(i,n),t.oDec=t.mDec):t.mDec=Number(t.mDec),t.mDec=t.scaleDivisor&&t.scaleDecimal?t.scaleDecimal
14:t.mDec,null===t.altDec&&t.mDec>0&&("."===t.aDec&&","!==t.aSep?t.altDec=",":","===t.aDec&&"."!==t.aSep&&(t.altDec="."));var o=t.aNeg?"([-\\"+t.aNeg+"]?)":"(-?)";t.aNegRegAutoStrip=o,t.skipFirstAutoStrip=new RegExp(o+"[^-"+(t.aNeg?"\\"+t.aNeg:"")+"\\"+t.aDec+"\\d].*?(\\d|\\"+t.aDec+"\\d)"),t.skipLastAutoStrip=new RegExp("(\\d\\"+t.aDec+"?)[^\\"+t.aDec+"\\d]\\D*$");var r="-0123456789\\"+t.aDec;return t.allowedAutoStrip=new RegExp("[^"+r+"]","gi"),t.numRegAutoStrip=new RegExp(o+"(?:\\"+t.aDec+"?(\\d+\\"+t.aDec+"\\d+)|(\\d*(?:\\"+t.aDec+"\\d*)?))"),t}function I(e,t){if(""!==t.aSign&&(e=e.replace(t.aSign,"")),t.aSuffix)for(;w(e,t.aSuffix);)e=e.replace(t.aSuffix,"");e=e.replace(t.skipFirstAutoStrip,"$1$2"),("s"===t.pNeg||"s"===t.pSign&&"p"!==t.pNeg)&&w(e,"-")&&""!==e&&(t.trailingNegative=!0),e=(e=e.replace(t.skipLastAutoStrip,"$1")).replace(t.allowedAutoStrip,""),t.altDec&&(e=e.replace(t.altDec,t.aDec));var i=e.match(t.numRegAutoStrip);if(e=i?[i[1],i[2],i[3]].join(""):"","allow"===t.lZero||"keep"===t.lZero){var o="",r=e.split(t.aDec),a=s(r,2),l=a[0],c=a[1],d=l;w(d,t.aNeg)&&(o=t.aNeg,d=d.replace(t.aNeg,"")),""===o&&d.length>t.mIntPos&&"0"===d.charAt(0)&&(d=d.slice(1)),""!==o&&d.length>t.mIntNeg&&"0"===d.charAt(0)&&(d=d.slice(1)),e=""+o+d+(n(c)?"":t.aDec+c)}if(t.onOff&&"deny"===t.lZero||"allow"===t.lZero&&!1===t.onOff){var u="^"+t.aNegRegAutoStrip+"0*(\\d)";u=new RegExp(u),e=e.replace(u,"$1$2")}return e}function P(e,t){if("p"===t.pSign&&"l"===t.pNeg||"s"===t.pSign&&"p"===t.pNeg){var n=t.nBracket.split(","),i=s(n,2),o=i[0],r=i[1];t.onOff?t.onOff&&e.charAt(0)===o&&(e=(e=e.replace(o,t.aNeg)).replace(r,"")):e=o+(e=e.replace(t.aNeg,""))+r}return e}function O(e){return w(e=e.replace(",","."),"-")&&e.lastIndexOf("-")===e.length-1&&(e="-"+(e=e.replace("-",""))),e}function L(e,n){if(t(n)||"string"===n)return e;var i=void 0;switch(n){case"number":i=Number(e);break;case".-":i=w(e,"-")?e.replace("-","")+"-":e;break;case",":case"-,":i=e.replace(".",",");break;case",-":i=w(i=e.replace(".",","),"-")?i.replace("-","")+"-":i;break;case".":case"-.":i=e;break;default:T("The given outputType ["+n+"] option is not recognized.")}return i}function B(e,t){return"."!==t.aDec&&(e=e.replace(t.aDec,".")),"-"!==t.aNeg&&""!==t.aNeg&&(e=e.replace(t.aNeg,"-")),e.match(/\d/)||(e+="0.00"),e}function F(e,t){return"-"!==t.aNeg&&""!==t.aNeg&&(e=e.replace("-",t.aNeg)),"."!==t.aDec&&(e=e.replace(".",t.aDec)),e}function H(e,t,n){return""===e||e===t.aNeg?"always"===t.wEmpty||n?"l"===t.pNeg?e+t.aSign+t.aSuffix:t.aSign+e+t.aSuffix:e:null}function $(e,t){t.strip&&(e=I(e,t)),t.trailingNegative&&!w(e,"-")&&(e="-"+e);var i=H(e,t,!0),o=w(e,"-");if(o&&(e=e.replace("-","")),null!==i)return i;var r="";t.dGroup=t.dGroup.toString(),r="2"===t.dGroup?/(\d)((\d)(\d{2}?)+)$/:"2s"===t.dGroup?/(\d)((?:\d{2}){0,2}\d{3}(?:(?:\d{2}){2}\d{3})*?)$/:"4"===t.dGroup?/(\d)((\d{4}?)+)$/:/(\d)((\d{3}?)+)$/;var a=e.split(t.aDec),l=s(a,2),c=l[0],d=l[1];if(t.altDec&&n(d)){var u=e.split(t.altDec),h=s(u,2);c=h[0],d=h[1]}if(""!==t.aSep)for(;r.test(c);)c=c.replace(r,"$1"+t.aSep+"$2");return 0===t.mDec||n(d)?e=c:(d.length>t.mDec&&(d=d.substring(0,t.mDec)),e=c+t.aDec+d),"p"===t.pSign&&(o&&"l"===t.pNeg&&(e=t.aNeg+t.aSign+e),o&&"r"===t.pNeg&&(e=t.aSign+t.aNeg+e),o&&"s"===t.pNeg&&(e=t.aSign+e+t.aNeg),o||(e=t.aSign+e)),"s"===t.pSign&&(o&&"r"===t.pNeg&&(e=e+t.aSign+t.aNeg),o&&"l"===t.pNeg&&(e=e+t.aNeg+t.aSign),o&&"p"===t.pNeg&&(e=t.aNeg+e+t.aSign),o||(e+=t.aSign)),null!==t.nBracket&&(t.rawValue<0||"-"===e.charAt(0))&&(e=P(e,t)),t.trailingNegative=!1,e+t.aSuffix}function z(e,t){var n=void 0;switch(t){case 0:n=/(\.(?:\d*[1-9])?)0*$/;break;case 1:n=/(\.\d(?:\d*[1-9])?)0*$/;break;default:n=new RegExp("(\\.\\d{"+t+"}(?:\\d*[1-9])?)0*")}return e=e.replace(n,"$1"),0===t&&(e=e.replace(/\.$/,"")),e}function j(e,t){if(e=""===e?"0":e.toString(),"N05"===t.mRound||"CHF"===t.mRound||"U05"===t.mRound||"D05"===t.mRound){switch(t.mRound){case"N05":e=(Math.round(20*e)/20).toString();break;case"U05":e=(Math.ceil(20*e)/20).toString();break;default:e=(Math.floor(20*e)/20).toString()}return w(e,".")?e.length-e.indexOf(".")<3?e+"0":e:e+".00"}var n="",i=0,o="",r=void 0;r=t.aPad?t.mDec:0,"-"===e.charAt(0)&&(o="-",e=e.replace("-","")),e.match(/^\d/)||(e="0"+e),"-"===o&&0===Number(e)&&(o=""),(Number(e)>0&&"keep"!==t.lZero||e.length>0&&"allow"===t.lZero)&&(e=e.replace(/^0*(\d)/,"$1"));var s=e.lastIndexOf("."),a=-1===s?e.length-1:s,l=e.length-1-a;if(l<=t.mDec){if(n=e,l<r){-1===s&&(n+=t.aDec);for(var c="000000";l<r;)n+=c=c.substring(0,r-l),l+=c.length}else l>r?n=z(n,r):0===l&&0===r&&(n=n.replace(/\.$/,""));return 0===Number(n)?n:o+n}var d=s+t.mDec,u=Number(e.charAt(d+1)),h="."===e.charAt(d)?e.charAt(d-1)%2:e.charAt(d)%2,p=e.substring(0,d+1).split("");
14if(u>4&&"S"===t.mRound||u>4&&"A"===t.mRound&&""===o||u>5&&"A"===t.mRound&&"-"===o||u>5&&"s"===t.mRound||u>5&&"a"===t.mRound&&""===o||u>4&&"a"===t.mRound&&"-"===o||u>5&&"B"===t.mRound||5===u&&"B"===t.mRound&&1===h||u>0&&"C"===t.mRound&&""===o||u>0&&"F"===t.mRound&&"-"===o||u>0&&"U"===t.mRound)for(i=p.length-1;i>=0;i-=1)if("."!==p[i]){if(p[i]=+p[i]+1,p[i]<10)break;i>0&&(p[i]="0")}return n=z((p=p.slice(0,d+1)).join(""),r),0===Number(n)?n:o+n}function q(e,t,n){var i=t.aDec,o=t.mDec;if(e="paste"===n?j(e,t):e,i&&o){var r=e.split(i),a=s(r,2),l=a[0],c=a[1];if(c&&c.length>o)if(o>0){e=""+l+i+c.substring(0,o)}else e=l}return e}function U(e){var t={},n=void 0,i=void 0,o=void 0,r=void 0;if(0===e&&1/e<0&&(e="-0"),"-"===(e=e.toString()).charAt(0)?(e=e.slice(1),t.s=-1):t.s=1,(n=e.indexOf("."))>-1&&(e=e.replace(".","")),n<0&&(n=e.length),(i=-1===e.search(/[1-9]/i)?e.length:e.search(/[1-9]/i))===(o=e.length))t.e=0,t.c=[0];else{for(r=o-1;"0"===e.charAt(r);r-=1)o-=1;for(o-=1,t.e=n-i-1,t.c=[],n=0;i<=o;i+=1)t.c[n]=+e.charAt(i),n+=1}return t}function W(e,t){var n=t.c,i=e.c,o=t.s,r=e.s,s=t.e,a=e.e;if(!n[0]||!i[0]){return n[0]?o:i[0]?-r:0}if(o!==r)return o;var l=o<0;
14if(s!==a)return s>a^l?1:-1;for(o=-1,r=(s=n.length)<(a=i.length)?s:a,o+=1;o<r;o+=1)if(n[o]!==i[o])return n[o]>i[o]^l?1:-1;return s===a?0:s>a^l?1:-1}function V(e,t){e=(e=e.toString()).replace(",",".");var n=U(t.vMin),i=U(t.vMax),o=U(e),r=void 0;switch(t.oLimits){case"floor":r=[W(n,o)>-1,!0];break;case"ceiling":r=[!0,W(i,o)<1];break;case"ignore":r=[!0,!0];break;default:r=[W(n,o)>-1,W(i,o)<1]}return r}function Y(t){return o(t)&&(t="#"+t.replace(/(:|\.|\[|]|,|=)/g,"\\$1")),e(t)}function G(e,t){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=e.data("autoNumeric");o||(o={},e.data("autoNumeric",o));var r=o.holder;return(n(r)&&t||i)&&(r=new J(e.get(0),t),o.holder=r),r}function K(e){e.oDec=e.mDec,e.oPad=e.aPad,e.oBracket=e.nBracket,e.oSep=e.aSep,e.oSign=e.aSign,e.oSuffix=e.aSuffix}function X(e){for(var t=e+"=",n=document.cookie.split(";"),i="",o=0;o<n.length;o+=1){for(i=n[o];" "===i.charAt(0);)i=i.substring(1,i.length);if(0===i.indexOf(t))return i.substring(t.length,i.length)}return null}function Q(){var e="modernizr";try{return sessionStorage.setItem(e,e),sessionStorage.removeItem(e),!0}catch(e){return!1}}function Z(e,t,i){if(t.aStor){var o=""===e[0].name||n(e[0].name)?"AUTO_"+e[0].id:"AUTO_"+decodeURIComponent(e[0].name),r=void 0,s=void 0;if(!1===Q())switch(i){case"set":document.cookie=o+"="+t.rawValue+"; expires= ; path=/";break;case"wipe":(r=new Date).setTime(r.getTime()+-864e5),s="; expires="+r.toUTCString(),document.cookie=o+"='' ;"+s+"; path=/";break;case"get":return X(o)}else switch(i){case"set":sessionStorage.setItem(o,t.rawValue);break;case"wipe":sessionStorage.removeItem(o);break;case"get":return sessionStorage.getItem(o)}}}function J(t,n){this.settings=n,this.that=t,this.$that=e(t),this.formatted=!1,this.settingsClone=N(this.$that,this.settings),this.value=t.value}function ee(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],n=Y(arguments[1]),i=e("form").index(n),o=e("form:eq("+i+")")[0],r=[],l=[],c=/^(?:submit|button|image|reset|file)$/i,d=/^(?:input|select|textarea|keygen)/i,u=/^(?:checkbox|radio)$/i,h=/^(?:button|checkbox|color|date|datetime|datetime-local|email|file|image|month|number|password|radio|range|reset|search|submit|time|url|week)/i,p=0;if(e.each(o,function(e,t){""===t.name||!d.test(t.localName)||c.test(t.type)||t.disabled||!t.checked&&u.test(t.type)?l.push(-1):(l.push(p),p++)}),p=0,e.each(o,function(e,t){"input"!==t.localName||""!==t.type&&"text"!==t.type&&"hidden"!==t.type&&"tel"!==t.type?(r.push(-1),"input"===t.localName&&h.test(t.type)&&p++):(r.push(p),p++)}),t){var f=n.serializeArray();return e.each(f,function(t,n){var o=e.inArray(t,l);if(o>-1&&r[o]>-1){var s=e("form:eq("+i+") input:eq("+r[o]+")"),c=s.data("autoNumeric");"object"===(void 0===c?"undefined":a(c))&&(n.value=s.autoNumeric("getLocalized").toString())}}),f}var m=function(){var t=n.serialize().split("&");return e.each(t,function(n){var o=t[n].split("="),c=s(o,2),d=c[0],u=c[1],h=e.inArray(n,l);if(h>-1&&r[h]>-1){var p=e("form:eq("+i+") input:eq("+r[h]+")"),f=p.data("autoNumeric");if("object"===(void 0===f?"undefined":a(f))&&null!==u){var m=p.autoNumeric("getLocalized").toString();t[n]=d+"="+m}}}),{v:t.join("&")}}();if("object"===(void 0===m?"undefined":a(m)))return m.v}function te(e,t){return e.on("focusin.autoNumeric mouseenter.autoNumeric",function(n){var i=(t=G(e)).settingsClone;if("focusin"===n.type||"mouseenter"===n.type&&!e.is(":focus")&&"focus"===i.wEmpty){i.onOff=!0,null!==i.nBracket&&""!==i.aNeg&&e.val(P(e.val(),i));var o=void 0;i.eDec?(i.mDec=i.eDec,e.autoNumeric("set",i.rawValue)):i.scaleDivisor?(i.mDec=i.oDec,e.autoNumeric("set",i.rawValue)):i.nSep?(i.aSep="",i.aSign="",i.aSuffix="",e.autoNumeric("set",i.rawValue)):(o=I(e.val(),i))!==i.rawValue&&e.autoNumeric("set",o),t.inVal=e.val(),t.lastVal=t.inVal;var r=H(t.inVal,i,!0);null!==r&&""!==r&&"focus"===i.wEmpty&&e.val(r)}}),t}function ne(e,t){return e.on("keydown.autoNumeric",function(n){if((t=G(e)).that.readOnly)return t.processed=!0,!0;if(t.init(n),t.skipAlways(n))return t.processed=!0,!0;if(t.processAlways()){t.processed=!0,t.formatQuick(n);var i=e.val();return i!==t.lastVal&&t.settingsClone.throwInput&&e.trigger("input"),t.lastVal=i,t.settingsClone.throwInput=!0,n.preventDefault(),!1}return t.formatted=!1,!0}),t}function ie(e,t){return e.on("keypress.autoNumeric",function(n){if(!n.shiftKey||n.keyCode!==m.Insert){var i=(t=G(e)).processed;if(t.init(n),t.skipAlways(n))return!0;
14if(i)return n.preventDefault(),!1;if(t.processAlways()||t.processKeypress()){t.formatQuick(n);var o=e.val();return o!==t.lastVal&&t.settingsClone.throwInput&&e.trigger("input"),t.lastVal=o,t.settingsClone.throwInput=!0,void n.preventDefault()}t.formatted=!1}}),t}function oe(e,t,n){return e.on("keyup.autoNumeric",function(i){(t=G(e)).init(i);var o=t.skipAlways(i),r=t.kdCode;return t.kdCode=0,delete t.valuePartsBeforePaste,e[0].value===t.settingsClone.aSign?"s"===t.settingsClone.pSign?D(this,0,0):D(this,t.settingsClone.aSign.length,t.settingsClone.aSign.length):r===m.Tab&&D(this,0,e.val().length),e[0].value===t.settingsClone.aSuffix&&D(this,0,0),""===t.settingsClone.rawValue&&""!==t.settingsClone.aSign&&""!==t.settingsClone.aSuffix&&D(this,0,0),null!==t.settingsClone.eDec&&t.settingsClone.aStor&&Z(e,n,"set"),!!o||""===this.value||void(t.formatted||t.formatQuick(i))}),t}function re(e,t){return e.on("focusout.autoNumeric mouseleave.autoNumeric",function(){if(!e.is(":focus")){t=G(e);var n=e.val(),i=n,o=t.settingsClone;if(o.onOff=!1,o.aStor&&Z(e,o,"set"),!0===o.nSep&&(o.aSep=o.oSep,o.aSign=o.oSign,o.aSuffix=o.oSuffix),null!==o.eDec&&(o.mDec=o.oDec,o.aPad=o.oPad,o.nBracket=o.oBracket),""!==(n=I(n,o))){o.trailingNegative&&(n="-"+n,o.trailingNegative=!1);var r=V(n,o),a=s(r,2),l=a[0],c=a[1];null===H(n,o,!1)&&l&&c?(n=B(n,o),o.rawValue=n,o.scaleDivisor&&(n=(n/=o.scaleDivisor).toString()),o.mDec=o.scaleDivisor&&o.scaleDecimal?+o.scaleDecimal:o.mDec,n=F(n=j(n,o),o)):(l||e.trigger("autoNumeric:minExceeded"),c||e.trigger("autoNumeric:maxExceeded"),n=o.rawValue)}else"zero"===o.wEmpty?(o.rawValue="0",n=j("0",o)):o.rawValue="";var d=H(n,o,!1);null===d&&(d=$(n,o)),d!==i&&(d=o.scaleSymbol?d+o.scaleSymbol:d,e.val(d)),d!==t.inVal&&(e.change(),delete t.inVal)}}),t}function se(e,t){return e.on("paste",function(n){n.preventDefault(),t=G(e);var i=e.autoNumeric("get"),o=this.value||"",r=this.selectionStart||0,s=this.selectionEnd||0,a=o.substring(0,r),l=o.substring(s,o.length),c=_(n.originalEvent.clipboardData.getData("text/plain").holder);if(b(c)){var d=_(a+Number(c).valueOf()+l,t);b(d)&&Number(i).valueOf()!==Number(d).valueOf()&&(e.autoNumeric("set",d),e.trigger("input"))}else this.selectionStart=s}),t}function ae(e,t){return e.closest("form").on("submit.autoNumeric",function(){if(t=G(e)){var n=t.settingsClone;n.unSetOnSubmit&&e.val(n.rawValue)}}),t}function le(e){var t=e.is("input[type=text], input[type=hidden], input[type=tel], input:not([type])");t||"input"!==e.prop("tagName").toLowerCase()||T('The input type "'+e.prop("type")+'" is not supported by autoNumeric');var n=e.prop("tagName").toLowerCase();return"input"===n||C(n,p)||T("The <"+n+"> tag is not supported by autoNumeric"),t}function ce(t,n,o){var r=!0;if(n){var s=o.val();if(t.aForm&&""!==s&&i(o.attr("value"))){var a=parseFloat(s.replace(",","."));isNaN(a)||1/0===a?T("The value ["+s+"] used in the input is not a valid value autoNumeric can work with."):(o.autoNumeric("set",a),r=!1)}else if(null!==t.anDefault&&t.anDefault.toString()!==s||null===t.anDefault&&""!==s&&s!==o.attr("value")||""!==s&&"hidden"===o.attr("type")&&!e.isNumeric(s.replace(",","."))){if((null!==t.eDec&&t.aStor||t.scaleDivisor&&t.aStor)&&(t.rawValue=Z(o,t,"get")),!t.aStor){var l=void 0;null!==t.nBracket&&""!==t.aNeg?(t.onOff=!0,l=P(s,t)):l=s,t.rawValue=("s"===t.pNeg||"s"===t.pSign&&"p"!==t.pNeg)&&""!==t.aNeg&&w(s,"-")?"-"+I(l,t):I(l,t)}r=!1}if(""===s)switch(t.wEmpty){case"focus":r=!1;break;case"always":o.val(t.aSign),r=!1;break;case"zero":o.autoNumeric("set","0"),r=!1}else r&&s===o.attr("value")&&o.autoNumeric("set",s)}C(o.prop("tagName").toLowerCase(),t.tagList)&&""!==o.text()&&(null!==t.anDefault?t.anDefault===o.text()&&o.autoNumeric("set",o.text()):o.autoNumeric("set",o.text()))}function de(e,t){if(!n(e)&&i(e.pNeg)&&""!==e.aSign)switch(t.pSign){case"s":t.pNeg="p";break;case"p":t.pNeg="r"}}function ue(t,n){var i=n.data("autoNumeric");if("object"!==(void 0===i?"undefined":a(i))){var o=n.data();return i=e.extend({},f,o,t,{onOff:!1,runOnce:!1,rawValue:"",trailingNegative:!1,caretFix:!1,throwInput:!0,strip:!0,tagList:p}),e.each(i,function(e,t){"true"!==t&&"false"!==t||(i[e]="true"===t),"number"==typeof t&&"aScale"!==e&&(i[e]=t.toString())}
14),de(t,i),i.aNeg=i.vMin<0?"-":"",u(i,!1),n.data("autoNumeric",i),i}return null}function he(e,t){return new CustomEvent(e,{detail:t,bubbles:!1,cancelable:!1})}function pe(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return document.dispatchEvent(he(e,t))}J.prototype={init:function(e){this.value=this.that.value,this.settingsClone=N(this.$that,this.settings),this.ctrlKey=e.ctrlKey,this.cmdKey=e.metaKey,this.shiftKey=e.shiftKey,this.selection=E(this.that),"keydown"!==e.type&&"keyup"!==e.type||(this.kdCode=e.keyCode),this.which=e.which,this.processed=!1,this.formatted=!1},setSelection:function(e,t,i){e=Math.max(e,0),t=Math.min(t,this.that.value.length),this.selection={start:e,end:t,length:t-e},(n(i)||i)&&D(this.that,e,t)},setPosition:function(e,t){this.setSelection(e,e,t)},getBeforeAfter:function(){var e=this.value;return[e.substring(0,this.selection.start),e.substring(this.selection.end,e.length)]},getBeforeAfterStriped:function(){var e=this.settingsClone,t=this.getBeforeAfter(),n=s(t,2),i=n[0],o=n[1];return i=I(i,this.settingsClone),o=I(o,this.settingsClone),e.trailingNegative&&!w(i,"-")&&(i="-"+i,o="-"===o?"":o),e.trailingNegative=!1,[i,o]},normalizeParts:function(e,t){var n=this.settingsClone;if(e=I(e,n),t=I(t,n),n.trailingNegative&&!w(e,"-")&&(e="-"+e,n.trailingNegative=!1),""!==e&&e!==n.aNeg||"deny"!==n.lZero||t>""&&(t=t.replace(/^0*(\d)/,"$1")),this.newValue=e+t,n.aDec){var i=this.newValue.match(new RegExp("^"+n.aNegRegAutoStrip+"\\"+n.aDec));i&&(e=e.replace(i[1],i[1]+"0"),this.newValue=e+t)}return[e,t]},setValueParts:function(e,t,n){var i=this.settingsClone,o=this.normalizeParts(e,t),r=V(this.newValue,i),a=s(r,2),l=a[0],c=a[1],d=o[0].length;if(this.newValue=o.join(""),l&&c){this.newValue=q(this.newValue,i,n);var u=w(this.newValue,",")?this.newValue.replace(",","."):this.newValue;return""===u||u===i.aNeg?i.rawValue="":i.rawValue=u,d>this.newValue.length&&(d=this.newValue.length),this.value=this.newValue,this.setPosition(d,!1),!0}return l?c||this.$that.trigger("autoNumeric:maxExceeded"):this.$that.trigger("autoNumeric:minExceeded"),!1},signPosition:function(){var e=this.settingsClone,t=e.aSign,n=this.that;if(t){var i=t.length;if("p"===e.pSign)return e.aNeg&&n.value&&n.value.charAt(0)===e.aNeg?[1,i+1]:[0,i];var o=n.value.length;return[o-i,o]}return[1e3,-1]},expandSelectionOnSign:function(e){var t=this.signPosition(),n=this.selection;n.start<t[1]&&n.end>t[0]&&((n.start<t[0]||n.end>t[1])&&this.value.substring(Math.max(n.start,t[0]),Math.min(n.end,t[1])).match(/^\s*$/)?n.start<t[0]?this.setSelection(n.start,t[0],e):this.setSelection(t[1],n.end,e):this.setSelection(Math.min(n.start,t[0]),Math.max(n.end,t[1]),e))},checkPaste:function(){if(!n(this.valuePartsBeforePaste)){var e=this.valuePartsBeforePaste,t=this.getBeforeAfter(),i=s(t,2),o=i[0],r=i[1];delete this.valuePartsBeforePaste;var a=o.substr(0,e[0].length)+I(o.substr(e[0].length),this.settingsClone);this.setValueParts(a,r,"paste")||(this.value=e.join(""),this.setPosition(e[0].length,!1))}},skipAlways:function(e){var t=this.kdCode,i=this.which,o=this.ctrlKey,r=this.cmdKey,s=this.shiftKey;if((o||r)&&"keyup"===e.type&&!n(this.valuePartsBeforePaste)||s&&t===m.Insert)return this.checkPaste(),!1;if(t>=m.F1&&t<=m.F12||t>=m.Windows&&t<=m.RightClick||t>=m.Tab&&t<m.Space||t<m.Backspace&&(0===i||i===t)||t===m.NumLock||t===m.ScrollLock||t===m.Insert||t===m.Command)return!0;if((o||r)&&t===m.a){if(this.settings.sNumber){e.preventDefault();var a=this.that.value.length,l=this.settings.aSign.length,c=w(this.that.value,"-")?1:0,d=this.settings.aSuffix.length,u=this.settings.pSign,h=this.settings.pNeg,p=void 0;p="s"===u?0:"l"===h&&1===c&&l>0?l+1:l;var f=void 0;if("p"===u)f=a-d;else switch(h){case"l":f=a-(d+l);break;case"r":f=l>0?a-(l+c+d):a-(l+d);break;default:
15f=a-(l+d)}D(this.that,p,f)}return!0}if((o||r)&&(t===m.c||t===m.v||t===m.x))return"keydown"===e.type&&this.expandSelectionOnSign(),t!==m.v&&t!==m.Insert||("keydown"===e.type||"keypress"===e.type?n(this.valuePartsBeforePaste)&&(this.valuePartsBeforePaste=this.getBeforeAfter()):this.checkPaste()),"keydown"===e.type||"ke
15ypress"===e.type||t===m.c;if(o||r)return!0;if(t===m.LeftArrow||t===m.RightArrow){var g=this.settingsClone.aSep,v=this.settingsClone.aDec,y=this.selection.start,b=this.that.value;return"keydown"!==e.type||this.shiftKey||(t!==m.LeftArrow||b.charAt(y-2)!==g&&b.charAt(y-2)!==v?t!==m.RightArrow||b.charAt(y+1)!==g&&b.charAt(y+1)!==v||this.setPosition(y+1):this.setPosition(y-1)),!0}return t>=m.PageDown&&t<=m.DownArrow},processTrailing:function(e){var t=s(e,2),n=t[0],i=t[1],o=this.settingsClone;return"p"===o.pSign&&"s"===o.pNeg&&(8===this.kdCode?(o.caretFix=this.selection.start>=this.value.indexOf(o.aSuffix)&&""!==o.aSuffix,"-"===this.value.charAt(this.selection.start-1)?n=n.substring(1):this.selection.start<=this.value.length-o.aSuffix.length&&(n=n.substring(0,n.length-1))):(o.caretFix=this.selection.start>=this.value.indexOf(o.aSuffix)&&""!==o.aSuffix,this.selection.start>=this.value.indexOf(o.aSign)+o.aSign.length&&(i=i.substring(1,i.length)),w(n,"-")&&"-"===this.value.charAt(this.selection.start)&&(n=n.substring(1)))),"s"===o.pSign&&"l"===o.pNeg&&(o.caretFix=this.selection.start>=this.value.indexOf(o.aNeg)+o.aNeg.length,8===this.kdCode?this.selection.start===this.value.indexOf(o.aNeg)+o.aNeg.length&&w(this.value,o.aNeg)?n=n.substring(1):"-"!==n&&(this.selection.start<=this.value.indexOf(o.aNeg)||!w(this.value,o.aNeg))&&(n=n.substring(0,n.length-1)):("-"===n[0]&&(i=i.substring(1)),this.selection.start===this.value.indexOf(o.aNeg)&&w(this.value,o.aNeg)&&(n=n.substring(1)))),"s"===o.pSign&&"r"===o.pNeg&&(o.caretFix=this.selection.start>=this.value.indexOf(o.aNeg)+o.aNeg.length,8===this.kdCode?this.selection.start===this.value.indexOf(o.aNeg)+o.aNeg.length?n=n.substring(1):"-"!==n&&this.selection.start<=this.value.indexOf(o.aNeg)-o.aSign.length?n=n.substring(0,n.length-1):""===n||w(this.value,o.aNeg)||(n=n.substring(0,n.length-1)):(o.caretFix=this.selection.start>=this.value.indexOf(o.aSign)&&""!==o.aSign,this.selection.start===this.value.indexOf(o.aNeg)&&(n=n.substring(1)),i=i.substring(1))),[n,i]},processAlways:function(){var e=this.settingsClone;if(this.kdCode===m.Backspace||this.kdCode===m.Delete){var t=void 0,n=void 0;if(this.selection.length){this.expandSelectionOnSign(!1);var i=this.getBeforeAfterStriped(),o=s(i,2);t=o[0],n=o[1],this.setValueParts(t,n)}else{var r=this.getBeforeAfterStriped(),a=s(r,2);if(t=a[0],n=a[1],""===t&&""===n&&(e.throwInput=!1),("p"===e.pSign&&"s"===e.pNeg||"s"===e.pSign&&("l"===e.pNeg||"r"===e.pNeg))&&w(this.value,"-")){var l=this.processTrailing([t,n]),c=s(l,2);t=c[0],n=c[1]}else 8===this.kdCode?t=t.substring(0,t.length-1):n=n.substring(1,n.length);this.setValueParts(t,n)}return!0}return!1},processKeypress:function(){var e=this.settingsClone,t=String.fromCharCode(this.which),n=this.getBeforeAfterStriped(),i=s(n,2),o=i[0],r=i[1];return e.throwInput=!0,t===e.aDec||e.altDec&&t===e.altDec||("."===t||","===t)&&this.kdCode===m.DotNumpad?!e.mDec||!e.aDec||!(!e.aNeg||!w(r,e.aNeg))||!!w(o,e.aDec)||r.indexOf(e.aDec)>0||(0===r.indexOf(e.aDec)&&(r=r.substr(1)),this.setValueParts(o+e.aDec,r,null),!0):"-"!==t&&"+"!==t||"-"!==e.aNeg?t>="0"&&t<="9"?(e.aNeg&&""===o&&w(r,e.aNeg)&&(o=e.aNeg,r=r.substring(1,r.length)),e.vMax<=0&&e.vMin<e.vMax&&!w(this.value,e.aNeg)&&"0"!==t&&(o=e.aNeg+o),this.setValueParts(o+t,r,null),!0):(e.throwInput=!1,!0):!e||("p"===e.pSign&&"s"===e.pNeg||"s"===e.pSign&&"p"!==e.pNeg?(""===o&&w(r,e.aNeg)&&(o=e.aNeg,r=r.substring(1,r.length)),o="-"===o.charAt(0)||w(o,e.aNeg)?o.substring(1,o.length):"-"===t?e.aNeg+o:o):(""===o&&w(r,e.aNeg)&&(o=e.aNeg,r=r.substring(1,r.length)),o=o.charAt(0)===e.aNeg?o.substring(1,o.length):"-"===t?e.aNeg+o:o),this.setValueParts(o,r,null),!0)},formatQuick:function(t){var n=this,i=this.settingsClone,o=this.value,r=t.keyCode,a=this.getBeforeAfterStriped(),l=s(a,1)[0];if((""===i.aSep||""!==i.aSep&&!w(o,i.aSep))&&(""===i.aSign||""!==i.aSign&&!w(o,i.aSign))){var c=o.split(i.aDec),d=s(c,1)[0],u="";w(d,"-")&&(u="-",d=d.replace("-",""),l=l.replace("-","")),""===u&&d.length>i.mIntPos&&"0"===l.charAt(0)&&(l=l.slice(1)),"-"===u&&d.length>i.mIntNeg&&"0"===l.charAt(0)&&(l=l.slice(1)),l=u+l}var h=$(this.value,this.settingsClone),p=h.length;if(h){var f=l.split("");("s"===i.pNeg||"s"===i.pSign&&"p"!==i.pNeg)&&"-"===f[0]&&""!==i.aNeg&&(f.shift(),"s"!==i.pSign||"l"!==i.pNeg||r!==m.Backspace&&this.kdCode!==m.Backspace&&r!==m.Delete&&this.kdCode!==m.Delete||!i.caretFix||(f.push("-"),i.caretFix="keydown"===t.type),"p"!==i.pSign||"s"!==i.pNeg||r!==m.Backspace&&this.kdCode!==m.Backspace&&r!==m.Delete&&this.kdCode!==m.Delete||!i.caretFix||(f.push("-"),i.caretFix="keydown"===t.type),"s"!==i.pSign||"r"!==i.pNeg||r!==m.Backspace&&this.kdCode!==m.Backspace&&r!==m.Delete&&this.kdCode!==m.Delete||!i.caretFix||function(){var o=i.aSign.split(""),s=["\\","^","$",".","|","?","*","+","(",")","["],a=[];e.each(o,function(e,t){C(t=o[e],s)?a.push("\\"+t):a.push(t)}),r!==m.Backspace&&n.kdCode!==m.Backspace||a.push("-"),f.push(a.join("")),i.caretFix="keydown"===t.type}());for(var g=0;g<f.length;g++)f[g].match("\\d")||(f[g]="\\"+f[g]);var v=new RegExp("^.*?"+f.join(".*?")),y=h.match(v);y?(0===(p=y[0].length)&&h.charAt(0)!==i.aNeg||1===p&&h.charAt(0)===i.aNeg)&&i.aSign&&"p"===i.pSign&&(p=this.settingsClone.aSign.length+("-"===h.charAt(0)?1:0)):(i.aSign&&"s"===i.pSign&&(p-=i.aSign.length),i.aSuffix&&(p-=i.aSuffix.length))}this.that.value=h,this.setPosition(p),this.formatted=!0}
15};var fe={init:function(n){return this.each(function(){var i=e(this),o=le(i),r=ue(n,i);if(t(r))return this;K(r);var s=G(i,r);r.mDec=r.scaleDivisor&&r.scaleDecimal?r.scaleDecimal:r.mDec,!1===r.runOnce&&r.aForm&&ce(r,o,i),r.runOnce=!0,o&&ae(i,s=se(i,s=oe(i,s=ie(i,s=ne(i,s=re(i,s=te(i,s)))),r)))})},destroy:function(){return e(this).each(function(){var e=Y(this),t=e.data("autoNumeric");"object"===(void 0===t?"undefined":a(t))&&(e.val(""),Z(e,t,"wipe"),e.removeData("autoNumeric"),e.off(".autoNumeric"))})},wipe:function(){return e(this).each(function(){var e=Y(this),t=e.data("autoNumeric");"object"===(void 0===t?"undefined":a(t))&&(e.val(""),t.rawValue="",Z(e,t,"wipe"))})},update:function(t){return e(this).each(function(){var n=Y(this),i=n.data("autoNumeric");"object"!==(void 0===i?"undefined":a(i))&&T('Initializing autoNumeric is required prior to calling the "update" method');var o=n.autoNumeric("get");if((i=e.extend(i,t)).scaleDivisor&&(i.mDec=i.scaleDecimal?i.scaleDecimal:i.mDec),K(i),G(n,i,!0),i.aDec===i.aSep&&T('autoNumeric will not function properly when the decimal character aDec: "'+i.aDec+'" and thousand separator aSep: "'+i.aSep+'" are the same character'),de(t,
15i),n.data("autoNumeric",i),""!==n.val()||""!==n.text())return n.autoNumeric("set",o)})},set:function(t){return e(this).each(function(){if(null!==t&&!n(t)){var i=Y(this),o=i.data("autoNumeric"),r=i.is("input[type=text], input[type=hidden], input[type=tel], input:not([type])"),l=t.toString();if("object"!==(void 0===o?"undefined":a(o))&&T('Initializing autoNumeric is required prior to calling the "set" method'),l=O(l),!e.isNumeric(Number(l)))return A('The value "'+l+'" being "set" is not numeric and therefore cannot be used appropriately.'),i.val("");if(""===l)return i.val("");var c=V(l,o),d=s(c,2),u=d[0],h=d[1];if(!u||!h){o.rawValue="",Z(i,o,"wipe");var p=l;return l="",u||i.trigger("autoNumeric:minExceeded"),h||i.trigger("autoNumeric:maxExceeded"),T("The value ["+p+"] being set falls outside of the vMin ["+o.vMin+"] and vMax ["+o.vMax+"] range set for this element"),i.val("")}return r&&(o.eDec||o.scaleDivisor)&&(o.rawValue=l),(r||C(i.prop("tagName").toLowerCase(),o.tagList))&&(o.scaleDivisor&&!o.onOff&&(l=(l/=o.scaleDivisor).toString(),o.mDec=o.scaleDecimal?o.scaleDecimal:o.mDec),l=j(l,o),null===o.eDec&&null===o.scaleDivisor&&(o.rawValue=l),l=$(l=F(l,o),o)),o.aStor&&(o.eDec||o.scaleDivisor)&&Z(i,o,"set"),!o.onOff&&o.scaleSymbol&&(l+=o.scaleSymbol),r?i.val(l):!!C(i.prop("tagName").toLowerCase(),o.tagList)&&i.text(l)}})},unSet:function(){return e(this).each(function(){var e=Y(this),t=e.data("autoNumeric");"object"===(void 0===t?"undefined":a(t))&&(t.onOff=!0,e.val(e.autoNumeric("getLocalized")))})},reSet:function(){return e(this).each(function(){var e=Y(this),t=e.data("autoNumeric");"object"===(void 0===t?"undefined":a(t))&&e.autoNumeric("set",e.val())})},get:function(){var e=Y(this),t=e.is("input[type=text], input[type=hidden], input[type=tel], input:not([type])"),n=e.data("autoNumeric");"object"!==(void 0===n?"undefined":a(n))&&T('Initializing autoNumeric is required prior to calling the "get" method');var i="";if(t?i=e.eq(0).val():C(e.prop("tagName").toLowerCase(),n.tagList)?i=e.eq(0).text():T('The "<'+e.prop("tagName").toLowerCase()+'>" tag is not supported by autoNumeric'),n.eDec||n.scaleDivisor)i=n.rawValue;else{if(!/\d/.test(i)&&0!==Number(i)&&"focus"===n.wEmpty)return"";""!==i&&null!==n.nBracket&&(n.onOff=!0,i=P(i,n)),(n.runOnce||!1===n.aForm)&&(i=I(i,n)),i=B(i,n)}return i},getLocalized:function(){var e=Y(this),t=e.autoNumeric("get"),n=e.data("autoNumeric");return 0===Number(t)&&"keep"!==n.lZero&&(t="0"),L(t,n.outputType)},getFormatted:function(){return this.hasOwnProperty("0")&&"value"in this[0]||T("Unable to get the formatted string from the element."),this[0].value},getString:function(){return ee(!1,this)},getArray:function(){return ee(!0,this)},getSettings:function(){return Y(this).eq(0).data("autoNumeric")}};e.fn.autoNumeric=function(e){if(fe[e]){for(var t=arguments.length,n=Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return fe[e].apply(this,n)}return"object"!==(void 0===e?"undefined":a(e))&&e?void T('Method "'+e+'" is not supported by autoNumeric'):fe.init.apply(this,[e])},d=function(){return f},e.fn.autoNumeric.defaults=f,l=function(t,i){if(n(t)||null===t)return null;var o=e.extend({},f,{strip:!1},i);if(t=O(t=t.toString()),Number(t)<0&&(o.aNeg="-"),null===o.mDec){var r=o.vMax.toString().split("."),a=o.vMin||0===o.vMin?o.vMin.toString().split("."):[];o.mDec=R(a,r)}var l=V(t,o),c=s(l,2),d=c[0],u=c[1];return d&&u||(pe("autoFormat.autoNumeric","Range test failed"),T("The value ["+t+"] being set falls outside of the vMin ["+o.vMin+"] and vMax ["+o.vMax+"] range set for this element")),$(t=F(t=j(t,o),o),o)},e.fn.autoFormat=l,c=function(t,i){if(n(t)||null===t)return null;var o=e.extend({},f,{strip:!1},i),r="-0123456789\\"+o.aDec,s=new RegExp("[^"+r+"]","gi");return"-"===(t=t.toString()).charAt(0)?o.aNeg="-":o.nBracket&&o.nBracket.split(",")[0]===t.charAt(0)&&(o.aNeg="-",o.onOff=!0,t=P(t,o)),L(t=(t=t.replace(s,"")).replace(",","."),o.outputType)},e.fn.autoUnformat=c,u=function(n){var s=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],a=!0;(i(n)||!v(n)||y(n))&&T("The userOptions are invalid ; it should be a valid object, ["+n+"] given.");var l=void 0,c=/^[0-9]+$/,d=/[0-9]+/,u=/^-?[0-9]+(\.?[0-9]+)?$/,h=/^[0-9]+(\.?[0-9]+)?$/;C((l=s?e.extend({},f,n):n).aSep,[",","."," ",""])||T("The thousand separator character option 'aSep' is invali
15d ; it should be ',', '.', ' ' or empty (''), ["+l.aSep+"] given."),g(l.nSep)||r(l.nSep)||T("The 'nSep' option is invalid ; it should be either 'false' or 'true', ["+l.nSep+"] given."),c.test(l.dGroup)||T("The digital grouping for thousand separator option 'dGroup' is invalid ; it should be a positive integer, ["+l.dGroup+"] given."),C(l.aDec,[",","."])||T("The decimal separator character option 'aDec' is invalid ; it should be '.' or ',', ["+l.aDec+"] given."),l.aDec===l.aSep&&T("autoNumeric will not function properly when the decimal character 'aDec' ["+l.aDec+"] and the thousand separator 'aSep' ["+l.aSep+"] are the same character."),t(l.altDec)||o(l.altDec)||T("The alternate decimal separator character option 'altDec' is invalid ; it should be a string, ["+l.altDec+"] given."),""===l.aSign||o(l.aSign)||T("The currency symbol option 'aSign' is invalid ; it should be a string, ["+l.aSign+"] given."),C(l.pSign,["p","s"])||T("The placement of the currency sign option 'pSign' is invalid ; it should either be 'p' (prefix) or 's' (suffix), ["+l.pSign+"] given."),C(l.pNeg,["p","s","l","r"])||T("The placement of the negative sign option 'pNeg' is invalid ; it should either be 'p' (prefix), 's' (suffix), 'l' (left) or 'r' (right), ["+l.pNeg+"] given."),(!o(l.aSuffix)||""!==l.aSuffix&&(w(l.aSuffix,"-")||d.test(l.aSuffix)))&&T("The additional suffix option 'aSuffix' is invalid ; it should not contains the negative sign '-' nor any numerical characters, ["+l.aSuffix+"] given."),t(l.oLimits)||C(l.oLimits,["ceiling","floor","ignore"])||T("The override min & max limits option 'oLimits' is invalid ; it should either be 'ceiling', 'floor' or 'ignore', ["+l.oLimits+"] given."),o(l.vMax)&&u.test(l.vMax)||T("The maximum possible value option 'vMax' is invalid ; it should be a string that represents a positive or negative number, ["+l.vMax+"] given."),o(l.vMin)&&u.test(l.vMin)||T("The minimum possible value option 'vMin' is invalid ; it should be a string that represents a positive or negative number, ["+l.vMin+"] given."),parseFloat(l.vMin)>parseFloat(l.vMax)&&T("The minimum possible value option is greater than the maximum possible value option ; 'vMin' ["+l.vMin+"] should be smaller than 'vMax' ["+l.vMax+"]."),t(l.mDec)||o(l.mDec)&&c.test(l.mDec)||T("The maximum number of decimal places option 'mDec' is invalid ; it should be a positive integer, ["+l.mDec+"] given."),l.aPad||t(l.mDec)||A("Setting 'aPad' to [false] will override the current 'mDec' setting ["+l.mDec+"].",a);var p=S(l.vMin),m=S(l.vMax);p=t(p)?0:p,m=t(m)?0:m;var b=Math.max(p,m);t(l.mDec)||!x(l.vMin)&&!x(l.vMax)||b===Number(l.mDec)||A("Setting 'mDec' to ["+l.mDec+"] will override the decimals declared in 'vMin' ["+l.vMin+"] and 'vMax' ["+l.vMax+"].",a),t(l.eDec)||o(l.eDec)&&c.test(l.eDec)||T("The number of expanded decimal places option 'eDec' is invalid ; it should be a positive integer, ["+l.eDec+"] given."),!t(l.eDec)&&!t(l.mDec)&&Number(l.mDec)<Number(l.eDec)&&T("autoNumeric will not function properly when the extended decimal places 'eDec' ["+l.eDec+"] is greater than the 'mDec' ["+l.mDec+"] value."),t(l.scaleDivisor)||h.test(l.scaleDivisor)||T("The scale divisor option 'scaleDivisor' is invalid ; it should be a positive number, preferably an integer, ["+l.scaleDivisor+"] given."),t(l.scaleDecimal)||c.test(l.scaleDecimal)||T("The scale number of decimals option 'scaleDecimal' is invalid ; it should be a positive integer, ["+l.scaleDecimal+"] given."),t(l.scaleSymbol)||o(l.scaleSymbol)||T("The scale symbol option 'scaleSymbol' is invalid ; it should be a string, ["+l.scaleSymbol+"] given."),g(l.aStor)||r(l.aStor)||T("The save to session storage option 'aStor' is invalid ; it should be either 'false' or 'true', ["+l.aStor+"] given."),C(l.mRound,["S","A","s","a","B","U","D","C","F","N05","CHF","U05","D05"])||T("The rounding method option 'mRound' is invalid ; it should either be 'S', 'A', 's', 'a', 'B', 'U', 'D', 'C', 'F', 'N05', 'CHF', 'U05' or 'D05' (cf. documentation), ["+l.mRound+"] given."),g(l.aPad)||r(l.aPad)||T("The control decimal padding option 'aPad' is invalid ; it should be either 'false' or 'true', ["+l.aPad+"] given."),t(l.nBracket)||C(l.nBracket,["(,)","[,]","<,>","{,}"])||T("The brackets for negative values option 'nBracket' is invali
15d ; it should either be '(,)', '[,]', '<,>' or '{,}', ["+l.nBracket+"] given."),C(l.wEmpty,["focus","press","always","zero"])||T("The display on empty string option 'wEmpty' is invalid ; it should either be 'focus', 'press', 'always' or 'zero', ["+l.wEmpty+"] given."),C(l.lZero,["allow","deny","keep"])||T("The leading zero behavior option 'lZero' is invalid ; it should either be 'allow', 'deny' or 'keep', ["+l.lZero+"] given."),g(l.aForm)||r(l.aForm)||T("The format on initialization option 'aForm' is invalid ; it should be either 'false' or 'true', ["+l.aForm+"] given."),g(l.sNumber)||r(l.sNumber)||T("The select number only option 'sNumber' is invalid ; it should be either 'false' or 'true', ["+l.sNumber+"] given."),t(l.anDefault)||""===l.anDefault||u.test(l.anDefault)||T("The unformatted default value option 'anDefault' is invalid ; it should be a string that represents a positive or negative number, ["+l.anDefault+"] given."),g(l.unSetOnSubmit)||r(l.unSetOnSubmit)||T("The remove formatting on submit option 'unSetOnSubmit' is invalid ; it should be either 'false' or 'true', ["+l.unSetOnSubmit+"] given."),t(l.outputType)||C(l.outputType,["string","number",".","-.",",","-,",".-",",-"])||T("The custom locale format option 'outputType' is invalid ; it should either be null, 'string', 'number', '.', '-.', ',', '-,', '.-' or ',-', ["+l.outputType+"] given."),g(l.debug)||r(l.debug)||T("The debug option 'debug' is invalid ; it should be either 'false' or 'true', ["+l.debug+"] given.")},e.fn.validate=u,h=function(e){var t=!0;try{u(e)}catch(e){t=!1}return t},function(){function e(e,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),n}"function"!=typeof window.CustomEvent&&(e.prototype=window.Event.prototype,window.CustomEvent=e)}()}),t.default={format:l,unFormat:c,getDefaultConfig:d,validate:u,areSettingsValid:h}}.call(window)},function(t){t.exports=e}])}),window.AutonumericRails=AutonumericRails=function(){function e(e){this.field=e,this.field.data("autonumeric-initialized",!0),this.create_hidden_field(),this.init_autonumeric(),this.sanitize_value(),this.field.on("keyup blur",$.proxy(function(){this.sanitize_value()},this))}return e.create_autonumeric_object=function(e){if(!e.data("autonumeric-initialized"))return new this(e)},e.delete_autonumeric_object=function(e){e.data("autonumeric-initialized")&&(e.removeData("autonumeric-initialized").removeData("autonumeric").removeAttr("data-autonumeric").off("keyup blur").autoNumeric("destroy"),$("input#"+e.attr("id")+'_val[type="hidden"][name="'+e.attr("name")+'"]').remove())},e.prototype.create_hidden_field=function(){this.hidden=$("<input>").attr("type","hidden").attr("id",this.field.attr("id")+"_val").attr("name",this.field.attr("name")),this.hidden.insertAfter(this.field)},e.prototype.init_autonumeric=function(){this.field.autoNumeric("init",$.parseJSON(this.field.attr("data-autonumeric")))},e.prototype.sanitize_value=function(){this.hidden.val(this.field.autoNumeric("getSettings").rawValue)},e}(),window.refresh_autonumeric=function(){$("input[data-autonumeric]").each(function(){AutonumericRails.create_autonumeric_object($(this))})},jQuery(function(){window.refresh_autonumeric(),$(document).on("refresh_autonumeric",function(){window.refresh_autonumeric()}),$(document).on("ajaxComplete",function(){window.refresh_autonumeric()})}),function(e){e.fn.railsAutocomplete=function(t){var n=function(){this.railsAutoCompleter||(this.railsAutoCompleter=new e.railsAutocomplete(this))};if(void 0!==e.fn.on){if(!t)return;return e(document).on("focus",t,n)}return this.live("focus",n)},e.railsAutocomplete=function(e){var t=e;this.init(t)},e.railsAutocomplete.options={showNoMatches:!0,noMatchesLabel:"no existing match"},e.railsAutocomplete.fn=e.railsAutocomplete.prototype={railsAutocomplete:"0.0.1"},e.railsAutocomplete.fn.extend=e.railsAutocomplete.extend=e.extend,e.railsAutocomplete.fn.extend({init:function(t){function n(e){return e.split(t.delimiter)}function i(e){return n(e).pop().replace(/^\s+/,"")}t.delimiter=e(t).attr("data-delimiter")||null,t.min_length=e(t).attr("data-min-length")||e(t).attr("min-length")||2,t.append_to=e(t).attr("data-append-to")||null,t.autoFocus=e(t).attr("data-auto-focus")||!1,e(t).autocomplete({appendTo:t.append_to,autoFocus:t.autoF
15ocus,delay:e(t).attr("delay")||0,source:function(n,o){var r=this.element[0],s={term:i(n.term)};e(t).attr("data-autocomplete-fields")&&e.each(e.parseJSON(e(t).attr("data-autocomplete-fields")),function(t,n){s[t]=e(n).val()}),e.getJSON(e(t).attr("data-autocomplete"),s,function(){var n={};e.extend(n,e.railsAutocomplete.options),e.each(n,function(i,o){if(n.hasOwnProperty(i)){var r=e(t).attr("data-"+i);n[i]=r||o}}),0==arguments[0].length&&e.inArray(n.showNoMatches,[!0,"true"])>=0&&(arguments[0]=[],arguments[0][0]={id:"",label:n.noMatchesLabel}),e(arguments[0]).each(function(n,i){var o={};o[i.id]=i,e(t).data(o)}),o.apply(null,arguments),e(r).trigger("railsAutocomplete.source",arguments)})},change:function(t,n){if(e(this).is("[data-id-element]")&&""!==e(e(this).attr("data-id-element")).val()&&(e(e(this).attr("data-id-element")).val(n.item?n.item.id:"").trigger("change"),e(this).attr("data-update-elements"))){var i=e.parseJSON(e(this).attr("data-update-elements")),o=n.item?e(this).data(n.item.id.toString()):{};if(i&&""===e(i.id).val())return;for(var r in i){var s=e(i[r]);s.is(":checkbox")?null!=o[r]&&s.prop("checked",o[r]):s.val(n.item?o[r]:"").trigger("change")}}},search:function(){if(i(this.value).length<t.min_length)return!1},focus:function(){return!1},select:function(i,o){if(o.item.value=o.item.value.toString(),-1!=o.item.value.toLowerCase().indexOf("no match")||-1!=o.item.value.toLowerCase().indexOf("too many results"))return e(this).trigger("railsAutocomplete.noMatch",o),!1;var r=n(this.value);if(r.pop(),r.push(o.item.value),null!=t.delimiter)r.push(""),this.value=r.join(t.delimiter);else if(this.value=r.join(""),e(this).attr("data-id-element")&&e(e(this).attr("data-id-element")).val(o.item.id).trigger("change"),e(this).attr("data-update-elements")){var s=o.item,a=-1!=o.item.value.indexOf("Create New"),l=e.parseJSON(e(this).attr("data-update-elements"));for(var c in l)"checkbox"===e(l[c]).attr("type")?!0===s[c]||1===s[c]?e(l[c]).attr("checked","checked"):e(l[c]).removeAttr("checked"):a&&s[c]&&-1==s[c].indexOf("Create New")||!a?e(l[c]).val(s[c]).trigger("change"):e(l[c]).val("").trigger("change")}var d=this.value;return e(this).bind("keyup.clearId",function(){e.trim(e(this).val())!=e.trim(d)&&(e(e(this).attr("data-id-element")).val("").trigger("change"),e(this).unbind("keyup.clearId"))}),e(t).trigger("railsAutocomplete.select",o),!1}}),e(t).trigger("railsAutocomplete.init")}}),e(document).ready(function(){e("input[data-autocomplete]").railsAutocomplete("input[data-autocomplete]")})}(jQuery),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.moment=t()}(this,function(){"use strict";function e(){return to.apply(null,arguments)}function t(e){to=e}function n(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function i(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function o(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function r(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(o(e,t))return!1;return!0}function s(e){return void 0===e}function a(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function l(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function c(e,t){var n,i=[],o=e.length;for(n=0;n<o;++n)i.push(t(e[n],n));return i}function d(e,t){for(var n in t)o(t,n)&&(e[n]=t[n]);return o(t,"toString")&&(e.toString=t.toString),o(t,"valueOf")&&(e.valueOf=t.valueOf),e}function u(e,t,n,i){return Et(e,t,n,i,!0).utc()}function h(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function p(e){return null==e._pf&&(e._pf=h()),e._pf}function f(e){if(null==e._isValid){var t=p(e),n=no.call(t.parsedDateParts,function(e){return null!=e}
vendor: 1,761 bytes, line 15
15),i=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n);if(e._strict&&(i=i&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return i;e._isValid=i}return e._isValid}function m(e){var t=u(NaN);return null!=e?d(p(t),e):p(t).userInvalidated=!0,t}function g(e,t){var n,i,o,r=oo.length;if(s(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),s(t._i)||(e._i=t._i),s(t._f)||(e._f=t._f),s(t._l)||(e._l=t._l),s(t._strict)||(e._strict=t._strict),s(t._tzm)||(e._tzm=t._tzm),s(t._isUTC)||(e._isUTC=t._isUTC),s(t._offset)||(e._offset=t._offset),s(t._pf)||(e._pf=p(t)),s(t._locale)||(e._locale=t._locale),r>0)for(n=0;n<r;n++)s(o=t[i=oo[n]])||(e[i]=o);return e}function v(t){g(this,t),this._d=new Date(null!=t._d?t._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===ro&&(ro=!0,e.updateOffset(this),ro=!1)}function y(e){return e instanceof v||null!=e&&null!=e._isAMomentObject}function b(t){!1===e.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+t)}function _(t,n){var i=!0;return d(function(){if(null!=e.deprecationHandler&&e.deprecationHandler(null,t),i){var r,s,a,l=[],c=arguments.length;for(s=0;s<c;s++){if(r="","object"==typeof arguments[s]){for(a in r+="\n["+s+"] ",arguments[0])o(arguments[0],a)&&(r+=a+": "+arguments[0][a]+", ");r=r.slice(0,-2)}else r=arguments[s];l.push(r)}b(t+"\nArguments: "+Array.prototype.slice.call(l).join("")+"\n"+(new Error).stack),i=!1}return n.apply(this,arguments)},n)}function w(t,n){null!=e.deprecationHandler&&e.deprecationHandler(t,n),so[t]||(b
vendor: 3,650 bytes, line 15
15(n),so[t]=!0)}function C(e){return"undefined"!=typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function k(e){var t,n;for(n in e)o(e,n)&&(C(t=e[n])?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function x(e,t){var n,r=d({},e);for(n in t)o(t,n)&&(i(e[n])&&i(t[n])?(r[n]={},d(r[n],e[n]),d(r[n],t[n])):null!=t[n]?r[n]=t[n]:delete r[n]);for(n in e)o(e,n)&&!o(t,n)&&i(e[n])&&(r[n]=d({},r[n]));return r}function S(e){null!=e&&this.set(e)}function E(e,t,n){var i=this._calendar[e]||this._calendar.sameElse;return C(i)?i.call(t,n):i}function D(e,t,n){var i=""+Math.abs(e),o=t-i.length;return(e>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,o)).toString().substr(1)+i}function T(e,t,n,i){var o=i;"string"==typeof i&&(o=function(){return this[i]()}),e&&(po[e]=o),t&&(po[t[0]]=function(){return D(o.apply(this,arguments),t[1],t[2])}),n&&(po[n]=function(){return this.localeData().ordinal(o.apply(this,arguments),e)})}function A(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function M(e){var t,n,i=e.match(co);for(t=0,n=i.length;t<n;t++)po[i[t]]?i[t]=po[i[t]]:i[t]=A(i[t]);return function(t){var o,r="";for(o=0;o<n;o++)r+=C(i[o])?i[o].call(t,e):i[o];return r}}function R(e,t){return e.isValid()?(t=N(t,e.localeData()),ho[t]=ho[t]||M(t),ho[t](e)):e.localeData().invalidDate()}function N(e,t){function n(e){return t.longDateFormat(e)||e}var i=5;for(uo.lastIndex=0;i>=0&&uo.test(e);)e=e.replace(uo,n),uo.lastIndex=0,i-=1;return e}function I(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(co).map(function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e}).join(""),this._longDateFormat[e])}function P(){return this._invalidDate}function O(e){return this._ordinal.replace("%d",e)}function L(e,t,n,i){var o=this._relativeTime[n];return C(o)?o(e,t,n,i):o.replace(/%d/i,e)}function B(e,t){var n=this._relativeTime[e>0?"future":"past"];return C(n)?n(t):n.replace(/%s/i,t)}function F(e,t){var n=e.toLowerCase();bo[n]=bo[n+"s"]=bo[t]=e}function H(e){return"string"==typeof e?bo[e]||bo[e.toLowerCase()]:void 0}function $(e){var t,n,i={};for(n in e)o(e,n)&&(t=H(n))&&(i[t]=e[n]);return i}function z(e,t){_o[e]=t}function j(e){var t,n=[];for(t in e)o(e,t)&&n.push({unit:t,priority:_o[t]});return n.sort(function(e,t){return e.priority-t.priority}),n}function q(e){return e%4==0&&e%100!=0||e%400==0}function U(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function W(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=U(t)),n}function V(t,n){return function(i){return null!=i?(G(this,t,i),e.updateOffset(this,n),this):Y(this,t)}}function Y(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function G(e,t,n){e.isValid()&&!isNaN(n)&&("FullYear"===t&&q(e.year())&&1===e.month()&&29===e.date()?(n=W(n),e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),re(n,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](n))}function K(e){return C(this[e=H(e)])?this[e]():this}function X(e,t){if("object"==typeof e){var n,i=j(e=$(e)),o=i.length;for(n=0;n<o;n++)this[i[n].unit](e[i[n].unit])}else if(C(this[e=H(e)]))return this[e](t);return this}function Q(e,t,n){ao[e]=C(t)?t:function(e){return e&&n?n:t}}function Z(e,t){return o(ao,e)?ao[e](t._strict,t._locale):new RegExp(J(e))}function J(e){return ee(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,n,i,o){return t||n||i||o}))}function ee(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function te(e,t){var n,i,o=t;
vendor: 13,504 bytes, lines 15-16
15for("string"==typeof e&&(e=[e]),a(t)&&(o=function(e,n){n[t]=W(e)}),i=e.length,n=0;n<i;n++)Ho[e[n]]=o}function ne(e,t){te(e,function(e,n,i,o){i._w=i._w||{},t(e,i._w,i,o)})}function ie(e,t,n){null!=t&&o(Ho,e)&&Ho[e](t,n._a,n,e)}function oe(e,t){return(e%t+t)%t}function re(e,t){if(isNaN(e)||isNaN(t))return NaN;var n=oe(t,12);return e+=(t-n)/12,1===n?q(e)?29:28:31-n%7%2}function se(e,t){return e?n(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||Qo).test(t)?"format":"standalone"][e.month()]:n(this._months)?this._months:this._months.standalone}function ae(e,t){return e?n(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[Qo.test(t)?"format":"standalone"][e.month()]:n(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function le(e,t,n){var i,o,r,s=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],i=0;i<12;++i)r=u([2e3,i]),this._shortMonthsParse[i]=this.monthsShort(r,"").toLocaleLowerCase(),this._longMonthsParse[i]=this.months(r,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(o=Fo.call(this._shortMonthsParse,s))?o:null:-1!==(o=Fo.call(this._longMonthsParse,s))?o:null:"MMM"===t?-1!==(o=Fo.call(this._shortMonthsParse,s))||-1!==(o=Fo.call(this._longMonthsParse,s))?o:null:-1!==(o=Fo.call(this._longMonthsParse,s))||-1!==(o=Fo.call(this._shortMonthsParse,s))?o:null}function ce(e,t,n){var i,o,r;if(this._monthsParseExact)return le.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),i=0;i<12;i++){if(o=u([2e3,i]),n&&!this._longMonthsParse[i]&&(this._longMonthsParse[i]=new RegExp("^"+this.months(o,"").replace(".","")+"$","i"),this._shortMonthsParse[i]=new RegExp("^"+this.monthsShort(o,"").replace(".","")+"$","i")),n||this._monthsParse[i]||(r="^"+this.months(o,"")+"|^"+this.monthsShort(o,""),this._monthsParse[i]=new RegExp(r.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[i].test(e))return i;if(n&&"MMM"===t&&this._shortMonthsParse[i].test(e))return i;if(!n&&this._monthsParse[i].test(e))return i}}function de(e,t){var n;if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=W(t);else if(!a(t=e.localeData().monthsParse(t)))return e;return n=Math.min(e.date(),re(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,n),e}function ue(t){return null!=t?(de(this,t),e.updateOffset(this,!0),this):Y(this,"Month")}function he(){return re(this.year(),this.month())}function pe(e){return this._monthsParseExact?(o(this,"_monthsRegex")||me.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(o(this,"_monthsShortRegex")||(this._monthsShortRegex=Zo),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function fe(e){return this._monthsParseExact?(o(this,"_monthsRegex")||me.call(this),e?this._monthsStrictRegex:this._monthsRegex):(o(this,"_monthsRegex")||(this._monthsRegex=Jo),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function me(){function e(e,t){return t.length-e.length}var t,n,i=[],o=[],r=[];for(t=0;t<12;t++)n=u([2e3,t]),i.push(this.monthsShort(n,"")),o.push(this.months(n,"")),r.push(this.months(n,"")),r.push(this.monthsShort(n,""));for(i.sort(e),o.sort(e),r.sort(e),t=0;t<12;t++)i[t]=ee(i[t]),o[t]=ee(o[t]);for(t=0;t<24;t++)r[t]=ee(r[t]);this._monthsRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,
16this._monthsStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+i.join("|")+")","i")}function ge(e){return q(e)?366:365}function ve(){return q(this.year())}function ye(e,t,n,i,o,r,s){var a;return e<100&&e>=0?(a=new Date(e+400,t,n,i,o,r,s),isFinite(a.getFullYear())&&a.setFullYear(e)):a=new Date(e,t,n,i,o,r,s),a}function be(e){var t,n;return e<100&&e>=0?((n=Array.prototype.slice.call(arguments))[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function _e(e,t,n){var i=7+t-n;return-((7+be(e,0,i).getUTCDay()-t)%7)+i-1}function we(e,t,n,i,o){var r,s,a=1+7*(t-1)+(7+n-i)%7+_e(e,i,o);return a<=0?s=ge(r=e-1)+a:a>ge(e)?(r=e+1,s=a-ge(e)):(r=e,s=a),{year:r,dayOfYear:s}}function Ce(e,t,n){var i,o,r=_e(e.year(),t,n),s=Math.floor((e.dayOfYear()-r-1)/7)+1;return s<1?i=s+ke(o=e.year()-1,t,n):s>ke(e.year(),t,n)?(i=s-ke(e.year(),t,n),o=e.year()+1):(o=e.year(),i=s),{week:i,year:o}}function ke(e,t,n){var i=_e(e,t,n),o=_e(e+1,t,n);return(ge(e)-i+o)/7}function xe(e){return Ce(e,this._week.dow,this._week.doy).week}function Se(){return this._week.dow}function Ee(){return this._week.doy}function De(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")}function Te(e){var t=Ce(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")}function Ae(e,t){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}function Me(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Re(e,t){return e.slice(t,7).concat(e.slice(0,t))}function Ne(e,t){var i=n(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?Re(i,this._week.dow):e?i[e.day()]:i}function Ie(e){return!0===e?Re(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function Pe(e){return!0===e?Re(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function Oe(e,t,n){var i,o,r,s=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],i=0;i<7;++i)r=u([2e3,1]).day(i),this._minWeekdaysParse[i]=this.weekdaysMin(r,"").toLocaleLowerCase(),this._shortWeekdaysParse[i]=this.weekdaysShort(r,"").toLocaleLowerCase(),this._weekdaysParse[i]=this.weekdays(r,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(o=Fo.call(this._weekdaysParse,s))?o:null:"ddd"===t?-1!==(o=Fo.call(this._shortWeekdaysParse,s))?o:null:-1!==(o=Fo.call(this._minWeekdaysParse,s))?o:null:"dddd"===t?-1!==(o=Fo.call(this._weekdaysParse,s))||-1!==(o=Fo.call(this._shortWeekdaysParse,s))||-1!==(o=Fo.call(this._minWeekdaysParse,s))?o:null:"ddd"===t?-1!==(o=Fo.call(this._shortWeekdaysParse,s))||-1!==(o=Fo.call(this._weekdaysParse,s))||-1!==(o=Fo.call(this._minWeekdaysParse,s))?o:null:-1!==(o=Fo.call(this._minWeekdaysParse,s))||-1!==(o=Fo.call(this._weekdaysParse,s))||-1!==(o=Fo.call(this._shortWeekdaysParse,s))?o:null}function Le(e,t,n){var i,o,r;if(this._weekdaysParseExact)return Oe.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),i=0;i<7;i++){if(o=u([2e3,1]).day(i),n&&!this._fullWeekdaysParse[i]&&(this._fullWeekdaysParse[i]=new RegExp("^"+this.weekdays(o,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[i]=new RegExp("^"+this.weekdaysShort(o,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[i]=new RegExp("^"+this.weekdaysMin(o,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[i]||(r="^"+this.weekdays(o,"")+"|^"+this.weekdaysShort(o,"")+"|^"+this.weekdaysMin(o,""),this._weekdaysParse[i]=new RegExp(r.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[i].test(e))return i;if(n&&"ddd"===t&&this._shortWeekdaysParse[i].test(e))return i;if(n&&"dd"===t&&this._minWeekdaysParse[i].test(e))return i;if(!n&&this._weekdaysParse[i].test(e))return i}}function Be(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=Ae(e,this.localeData()),this.add(e-t,"d")):t}function Fe(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")}function He(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=Me(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7}function $e(e){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||qe.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(o(this,"_weekdaysRegex")||(this._weekdaysRegex=rr),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function ze(e){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||qe.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(o(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=sr),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function je(e){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||qe.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(o(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=ar),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function qe(){function e(e,t){return t.length-e.length}var t,n,i,o,r,s=[],a=[],l=[],c=[];for(t=0;t<7;t++)n=u([2e3,1]).day(t),i=ee(this.weekdaysMin(n,"")),o=ee(this.weekdaysShort(n,"")),r=ee(this.weekdays(n,"")),s.push(i),a.push(o),l.push(r),c.push(i),c.push(o),c.push(r);s.sort(e),a.sort(e),l.sort(e),c.sort(e),this._weekdaysRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+s.join("|")+")","i")}function Ue(){return this.hours()%12||12}function We(){return this.hours()||24}function Ve(e,t){T(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function Ye(e,t){return t._meridiemParse}function Ge(e){return"p"===(e+"").toLowerCase().charAt(0)}function Ke(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}function Xe(e,t){var n,i=Math.min(e.length,t.length);for(n=0;n<i;n+=1)if(e[n]!==t[n])return n;return i}function Qe(e){return e?e.toLowerCase().replace("_","-"):e}function Ze(e){for(var t,n,i,o,r=0;r<e.length;){for(t=(o=Qe(e[r]).split("-")).length,n=(n=Qe(e[r+1]))?n.split("-"):null;t>0;){if(i=et(o.slice(0,t).join("-")))return i;if(n&&n.length>=t&&Xe(o,n)>=t-1)break;t--}r++}return lr}function Je(e){return null!=e.match("^[^/\\\\]*$")}function et(e){var t=null;if(void 0===hr[e]&&"undefined"!=typeof module&&module&&module.exports&&Je(e))try{t=lr._abbr,require("./locale/"+e),tt(t)}catch(t){hr[e]=null}return hr[e]}function tt(e,t){var n;return e&&((n=s(t)?ot(e):nt(e,t))?lr=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),lr._abbr}function nt(e,t){if(null!==t){var n,i=ur;if(t.abbr=e,null!=hr[e])w("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),i=hr[e]._config;else if(null!=t.parentLocale)if(null!=hr[t.parentLocale])i=hr[t.parentLocale]._config;else{if(null==(n=et(t.parentLocale)))return pr[t.parentLocale]||(pr[t.parentLocale]=[]),pr[t.parentLocale].push({name:e,config:t}),null;i=n._config}return hr[e]=new S(x(i,t)),pr[e]&&pr[e].forEach(function(e){nt(e.name,e.config)}),tt(e),hr[e]}return delete hr[e],null}function it(e,t){if(null!=t){var n,i,o=ur;null!=hr[e]&&null!=hr[e].parentLocale?hr[e].set(x(hr[e]._config,t)):(null!=(i=et(e))&&(o=i._config),t=x(o,t),null==i&&(t.abbr=e),(n=new S(t)).parentLocale=hr[e],hr[e]=n),tt(e)}else null!=hr[e]&&(null!=hr[e].parentLocale?(hr[e]=hr[e].parentLocale,e===tt()&&tt(e)):null!=hr[e]&&delete hr[e]);return hr[e]}function ot(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return lr;if(!n(e)){if(t=et(e))return t;e=[e]}return Ze(e)}function rt(){return io(hr)}function st(e){var t,n=e._a;return n&&-2===p(e).overflow&&(t=n[zo]<0||n[zo]>11?zo:n[jo]<1||n[jo]>re(n[$o],n[zo])?jo:n[qo]<0||n[qo]>24||24===n[qo]&&(0!==n[Uo]||0!==n[Wo]||0!==n[Vo])?qo:n[Uo]<0||n[Uo]>59?Uo:n[Wo]<0||n[Wo]>59?Wo:n[Vo]<0||n[Vo]>999?Vo:-1,p(e)._overflowDayOfYear&&(t<$o||t>jo)&&(t=jo),p(e)._overflowWeeks&&-1===t&&(t=Yo),p(e)._overflowWeekday&&-1===t&&(t=Go),p(e).overflow=t),e}function at(e){var t,n,i,o,r,s,a=e._i,l=fr.exec(a)||mr.exec(a),c=vr.length,d=yr.length;if(l){for(p(e).iso=!0,t=0,n=c;t<n;t++)if(vr[t][1].exec(l[1])){o=vr[t][0],i=!1!==vr[t][2];break}if(null==o)return void(e._isValid=!1);if(l[3]){for(t=0,n=d;t<n;t++)if(yr[t][1].exec(l[3])){r=(l[2]||" ")+yr[t][0];break}if(null==r)return void(e._isValid=!1)}if(!i&&null!=r)return void(e._isValid=!1);if(l[4]){if(!gr.exec(l[4]))return void(e._isValid=!1);s="Z"}e._f=o+(r||"")+(s||""),bt(e)}else e._isValid=!1}function lt(e,t,n,i,o,r){var s=[ct(e),Xo.indexOf(t),parseInt(n,10),parseInt(i,10),parseInt(o,10)];return r&&s.push(parseInt(r,10)),s}function ct(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function dt(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function ut(e,t,n){if(e&&ir.indexOf(e)!==new Date(t[0],t[1],t[2]).getDay())return p(n).weekdayMismatch=!0,n._isValid=!1,!1;return!0}function ht(e,t,n){if(e)return wr[e];if(t)return 0;var i=parseInt(n,10),o=i%100;return 60*((i-o)/100)+o}function pt(e){var t,n=_r.exec(dt(e._i));if(n){if(t=lt(n[4],n[3],n[2],n[5],n[6],n[7]),!ut(n[1],t,e))return;e._a=t,e._tzm=ht(n[8],n[9],n[10]),e._d=be.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),p(e).rfc2822=!0}else e._isValid=!1}function ft(t){var n=br.exec(t._i);
vendor: 10,780 bytes, line 16
16null===n?(at(t),!1===t._isValid&&(delete t._isValid,pt(t),!1===t._isValid&&(delete t._isValid,t._strict?t._isValid=!1:e.createFromInputFallback(t)))):t._d=new Date(+n[1])}function mt(e,t,n){return null!=e?e:null!=t?t:n}function gt(t){var n=new Date(e.now());return t._useUTC?[n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate()]:[n.getFullYear(),n.getMonth(),n.getDate()]}function vt(e){var t,n,i,o,r,s=[];if(!e._d){for(i=gt(e),e._w&&null==e._a[jo]&&null==e._a[zo]&&yt(e),null!=e._dayOfYear&&(r=mt(e._a[$o],i[$o]),(e._dayOfYear>ge(r)||0===e._dayOfYear)&&(p(e)._overflowDayOfYear=!0),n=be(r,0,e._dayOfYear),e._a[zo]=n.getUTCMonth(),e._a[jo]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=s[t]=i[t];for(;t<7;t++)e._a[t]=s[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[qo]&&0===e._a[Uo]&&0===e._a[Wo]&&0===e._a[Vo]&&(e._nextDay=!0,e._a[qo]=0),e._d=(e._useUTC?be:ye).apply(null,s),o=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[qo]=24),e._w&&void 0!==e._w.d&&e._w.d!==o&&(p(e).weekdayMismatch=!0)}}function yt(e){var t,n,i,o,r,s,a,l,c;null!=(t=e._w).GG||null!=t.W||null!=t.E?(r=1,s=4,n=mt(t.GG,e._a[$o],Ce(Dt(),1,4).year),i=mt(t.W,1),((o=mt(t.E,1))<1||o>7)&&(l=!0)):(r=e._locale._week.dow,s=e._locale._week.doy,c=Ce(Dt(),r,s),n=mt(t.gg,e._a[$o],c.year),i=mt(t.w,c.week),null!=t.d?((o=t.d)<0||o>6)&&(l=!0):null!=t.e?(o=t.e+r,(t.e<0||t.e>6)&&(l=!0)):o=r),i<1||i>ke(n,r,s)?p(e)._overflowWeeks=!0:null!=l?p(e)._overflowWeekday=!0:(a=we(n,i,o,r,s),e._a[$o]=a.year,e._dayOfYear=a.dayOfYear)}function bt(t){if(t._f!==e.ISO_8601)if(t._f!==e.RFC_2822){t._a=[],p(t).empty=!0;var n,i,o,r,s,a,l,c=""+t._i,d=c.length,u=0;for(l=(o=N(t._f,t._locale).match(co)||[]).length,n=0;n<l;n++)r=o[n],(i=(c.match(Z(r,t))||[])[0])&&((s=c.substr(0,c.indexOf(i))).length>0&&p(t).unusedInput.push(s),c=c.slice(c.indexOf(i)+i.length),u+=i.length),po[r]?(i?p(t).empty=!1:p(t).unusedTokens.push(r),ie(r,i,t)):t._strict&&!i&&p(t).unusedTokens.push(r);p(t).charsLeftOver=d-u,c.length>0&&p(t).unusedInput.push(c),t._a[qo]<=12&&!0===p(t).bigHour&&t._a[qo]>0&&(p(t).bigHour=void 0),p(t).parsedDateParts=t._a.slice(0),p(t).meridiem=t._meridiem,t._a[qo]=_t(t._locale,t._a[qo],t._meridiem),null!==(a=p(t).era)&&(t._a[$o]=t._locale.erasConvertYear(a,t._a[$o])),vt(t),st(t)}else pt(t);else at(t)}function _t(e,t,n){var i;return null==n?t:null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((i=e.isPM(n))&&t<12&&(t+=12),i||12!==t||(t=0),t):t}function wt(e){var t,n,i,o,r,s,a=!1,l=e._f.length;if(0===l)return p(e).invalidFormat=!0,void(e._d=new Date(NaN));for(o=0;o<l;o++)r=0,s=!1,t=g({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[o],bt(t),f(t)&&(s=!0),r+=p(t).charsLeftOver,r+=10*p(t).unusedTokens.length,p(t).score=r,a?r<i&&(i=r,n=t):(null==i||r<i||s)&&(i=r,n=t,s&&(a=!0));d(e,n||t)}function Ct(e){if(!e._d){var t=$(e._i),n=void 0===t.day?t.date:t.day;e._a=c([t.year,t.month,n,t.hour,t.minute,t.second,t.millisecond],function(e){return e&&parseInt(e,10)}),vt(e)}}function kt(e){var t=new v(st(xt(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function xt(e){var t=e._i,i=e._f;return e._locale=e._locale||ot(e._l),null===t||void 0===i&&""===t?m({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),y(t)?new v(st(t)):(l(t)?e._d=t:n(i)?wt(e):i?bt(e):St(e),f(e)||(e._d=null),e))}function St(t){var o=t._i;s(o)?t._d=new Date(e.now()):l(o)?t._d=new Date(o.valueOf()):"string"==typeof o?ft(t):n(o)?(t._a=c(o.slice(0),function(e){return parseInt(e,10)}),vt(t)):i(o)?Ct(t):a(o)?t._d=new Date(o):e.createFromInputFallback(t)}function Et(e,t,o,s,a){var l={};return!0!==t&&!1!==t||(s=t,t=void 0),!0!==o&&!1!==o||(s=o,o=void 0),(i(e)&&r(e)||n(e)&&0===e.length)&&(e=void 0),l._isAMomentObject=!0,l._useUTC=l._isUTC=a,l._l=o,l._i=e,l._f=t,l._strict=s,kt(l)}function Dt(e,t,n,i){return Et(e,t,n,i,!1)}function Tt(e,t){var i,o;if(1===t.length&&n(t[0])&&(t=t[0]),!t.length)return Dt();for(i=t[0],o=1;o<t.length;++o)t[o].isValid()&&!t[o][e](i)||(i=t[o]);return i}function At(){return Tt("isBefore",[].slice.call(arguments,0))}function Mt(){return Tt("isAfter",[].slice.call(arguments,0))}function Rt(e){var t,n,i=!1,r=Sr.length;for(t in e)if(o(e,t)&&(-1===Fo.call(Sr,t)||null!=e[t]&&isNaN(e[t])))return!1;for(n=0;n<r;++n)if(e[Sr[n]]){if(i)return!1;parseFloat(e[Sr[n]])!==W(e[Sr[n]])&&(i=!0)}return!0}function Nt(){return this._isValid}function It(){return Jt(NaN)}function Pt(e){var t=$(e),n=t.year||0,i=t.quarter||0,o=t.month||0,r=t.week||t.isoWeek||0,s=t.day||0,a=t.hour||0,l=t.minute||0,c=t.second||0,d=t.millisecond||0;this._isValid=Rt(t),this._milliseconds=+d+1e3*c+6e4*l+1e3*a*60*60,this._days=+s+7*r,this._months=+o+3*i+12*n,this._data={},this._locale=ot(),this._bubble()}function Ot(e){return e instanceof Pt}function Lt(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function Bt(e,t,n){var i,o=Math.min(e.length,t.length),r=Math.abs(e.length-t.length),s=0;for(i=0;i<o;i++)(n&&e[i]!==t[i]||!n&&W(e[i])!==W(t[i]))&&s++;return s+r}function Ft(e,t){T(e,0,0,function(){var e=this.utcOffset(),n="+";return e<0&&(e=-e,n="-"),n+D(~~(e/60),2)+t+D(~~e%60,2)})}function Ht(e,t){var n,i,o=(t||"").match(e);return null===o?null:0===(i=60*(n=((o[o.length-1]||[])+"").match(Er)||["-",0,0])[1]+W(n[2]))?0:"+"===n[0]?i:-i}function $t(t,n){var i,o;return n._isUTC?(i=n.clone(),o=(y(t)||l(t)?t.valueOf():Dt(t).valueOf())-i.valueOf(),i._d.setTime(i._d.valueOf()+o),e.updateOffset(i,!1),i):Dt(t).local()}function zt(e){return-Math.round(e._d.getTimezoneOffset())}function jt(t,n,i){var o,r=this._offset||0;if(!this.isValid())return null!=t?this:NaN;if(null!=t){if("string"==typeof t){if(null===(t=Ht(Oo,t)))return this}else Math.abs(t)<16&&!i&&(t*=60);return!this._isUTC&&n&&(o=zt(this)),this._offset=t,this._isUTC=!0,null!=o&&this.add(o,"m"),r!==t&&(!n||this._changeInProgress?rn(this,Jt(t-r,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,e.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?r:zt(this)}function qt(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function Ut(e){return this.utcOffset(0,e)}function Wt(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(zt(this),"m")),this}function Vt(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=Ht(Po,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this}function Yt(e){return!!this.isValid()&&(e=e?Dt(e).utcOffset():0,(this.utcOffset()-e)%60==0)}function Gt(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Kt(){if(!s(this._isDSTShifted))return this._isDSTShifted;var e,t={};return g(t,this),(t=xt(t))._a?(e=t._isUTC?u(t._a):Dt(t._a),this._isDSTShifted=this.isValid()&&Bt(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function Xt(){return!!this.isValid()&&!this._isUTC}function Qt(){return!!this.isValid()&&this._isUTC}function Zt(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}function Jt(e,t){var n,i,r,s=e,l=null;return Ot(e)?s={ms:e._milliseconds,d:e._days,M:e._months}:a(e)||!isNaN(+e)?(s={},t?s[t]=+e:s.milliseconds=+e):(l=Dr.exec(e))?(n="-"===l[1]?-1:1,s={y:0,d:W(l[jo])*n,h:W(l[qo])*n,m:W(l[Uo])*n,s:W(l[Wo])*n,ms:W(Lt(1e3*l[Vo]))*n}):(l=Tr.exec(e))?(n="-"===l[1]?-1:1,s={y:en(l[2],n),M:en(l[3],n),w:en(l[4],n),d:en(l[5],n),h:en(l[6],n),m:en(l[7],n),s:en(l[8],n)}):null==s?s={}:"object"==typeof s&&("from"in s||"to"in s)&&(r=nn(Dt(s.from),Dt(s.to)),(s={}).ms=r.milliseconds,s.M=r.months),i=new Pt(s),Ot(e)&&o(e,"_locale")&&(i._locale=e._locale),Ot(e)&&o(e,"_isValid")&&(i._isValid=e._isValid),i}function en(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function tn(e,t){var n={};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function nn(e,t){var n;return e.isValid()&&t.isValid()?(t=$t(t,e),e.isBefore(t)?n=tn(e,t):((n=tn(t,e)).milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function on(e,t){return function(n,i){var o;return null===i||isNaN(+i)||(w(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),o=n,n=i,i=o),rn(this,Jt(n,i),e),this}}function rn(t,n,i,o){var r=n._milliseconds,s=Lt(n._days),a=Lt(n._months);t.isValid()&&(o=null==o||o,a&&de(t,Y(t,"Month")+a*i),s&&G(t,"Date",Y(t,"Date")+s*i),r&&t._d.setTime(t._d.valueOf()+r*i),o&&e.updateOffset(t,s||a))}function sn(e){return"string"==typeof e||e instanceof String}function an(e){return y(e)||l(e)||sn(e)||a(e)||cn(e)||ln(e)||null==e}function ln(e){var t,n,s=i(e)&&!r(e),a=!1,l=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],c=l.length;for(t=0;t<c;t+=1)n=l[t],a=a||o(e,n);return s&&a}function cn(e){var t=n(e),i=!1;return t&&(i=0===e.filter(function(t){return!a(t)&&sn(e)}).length),t&&i}function dn(e){var t,n,s=i(e)&&!r(e),a=!1,l=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"];for(t=0;t<l.length;t+=1)n=l[t],a=a||o(e,n);return s&&a}function un(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"}function hn(t,n){1===arguments.length&&(arguments[0]?an(arguments[0])?(t=arguments[0],n=void 0):dn(arguments[0])&&(n=arguments[0],t=void 0):(t=void 0,n=void 0));var i=t||Dt(),o=$t(i,this).startOf("day"),r=e.calendarFormat(this,o)||"sameElse",s=n&&(C(n[r])?n[r].call(this,i):n[r]);return this.format(s||this.localeData().calendar(r,this,Dt(i)))}function pn(){return new v(this)}function fn(e,t){var n=y(e)?e:Dt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=H(t)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())}function mn(e,t){var n=y(e)?e:Dt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=H(t)||"millisecond")?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())}function gn(e,t,n,i){var o=y(e)?e:Dt(e),r=y(t)?t:Dt(t);return!!(this.isValid()&&o.isValid()&&r.isValid())&&(("("===(i=i||"()")[0]?this.isAfter(o,n):!this.isBefore(o,n))&&(")"===i[1]?this.isBefore(r,n):!this.isAfter(r,n)))}function vn(e,t){var n,i=y(e)?e:Dt(e);return!(!this.isValid()||!i.isValid())&&("millisecond"===(t=H(t)||"millisecond")?this.valueOf()===i.valueOf():(n=i.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf()))}function yn(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function bn(e,t){return this.isSame(e,t)||this.isBefore(e,t)}
vendor: 8,873 bytes, line 16
16function _n(e,t,n){var i,o,r;if(!this.isValid())return NaN;if(!(i=$t(e,this)).isValid())return NaN;switch(o=6e4*(i.utcOffset()-this.utcOffset()),t=H(t)){case"year":r=wn(this,i)/12;break;case"month":r=wn(this,i);break;case"quarter":r=wn(this,i)/3;break;case"second":r=(this-i)/1e3;break;case"minute":r=(this-i)/6e4;break;case"hour":r=(this-i)/36e5;break;case"day":r=(this-i-o)/864e5;break;case"week":r=(this-i-o)/6048e5;break;default:r=this-i}return n?r:U(r)}function wn(e,t){if(e.date()<t.date())return-wn(t,e);var n=12*(t.year()-e.year())+(t.month()-e.month()),i=e.clone().add(n,"months");return-(n+(t-i<0?(t-i)/(i-e.clone().add(n-1,"months")):(t-i)/(e.clone().add(n+1,"months")-i)))||0}function Cn(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function kn(e){if(!this.isValid())return null;var t=!0!==e,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?R(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):C(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",R(n,"Z")):R(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function xn(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t,n,i,o="moment",r="";return this.isLocal()||(o=0===this.utcOffset()?"moment.utc":"moment.parseZone",r="Z"),e="["+o+'("]',t=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",n="-MM-DD[T]HH:mm:ss.SSS",i=r+'[")]',this.format(e+t+n+i)}function Sn(t){t||(t=this.isUtc()?e.defaultFormatUtc:e.defaultFormat);var n=R(this,t);return this.localeData().postformat(n)}function En(e,t){return this.isValid()&&(y(e)&&e.isValid()||Dt(e).isValid())?Jt({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function Dn(e){return this.from(Dt(),e)}function Tn(e,t){return this.isValid()&&(y(e)&&e.isValid()||Dt(e).isValid())?Jt({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function An(e){return this.to(Dt(),e)}function Mn(e){var t;return void 0===e?this._locale._abbr:(null!=(t=ot(e))&&(this._locale=t),this)}function Rn(){return this._locale}function Nn(e,t){return(e%t+t)%t}function In(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-Or:new Date(e,t,n).valueOf()}function Pn(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-Or:Date.UTC(e,t,n)}function On(t){var n,i;if(void 0===(t=H(t))||"millisecond"===t||!this.isValid())return this;switch(i=this._isUTC?Pn:In,t){case"year":n=i(this.year(),0,1);break;case"quarter":n=i(this.year(),this.month()-this.month()%3,1);break;case"month":n=i(this.year(),this.month(),1);break;case"week":n=i(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":n=i(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":n=i(this.year(),this.month(),this.date());break;case"hour":n=this._d.valueOf(),n-=Nn(n+(this._isUTC?0:this.utcOffset()*Ir),Pr);break;case"minute":n=this._d.valueOf(),n-=Nn(n,Ir);break;case"second":n=this._d.valueOf(),n-=Nn(n,Nr)}return this._d.setTime(n),e.updateOffset(this,!0),this}function Ln(t){var n,i;if(void 0===(t=H(t))||"millisecond"===t||!this.isValid())return this;switch(i=this._isUTC?Pn:In,t){case"year":n=i(this.year()+1,0,1)-1;break;case"quarter":n=i(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":n=i(this.year(),this.month()+1,1)-1;break;case"week":n=i(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":n=i(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":n=i(this.year(),this.month(),this.date()+1)-1;break;case"hour":n=this._d.valueOf(),n+=Pr-Nn(n+(this._isUTC?0:this.utcOffset()*Ir),Pr)-1;break;case"minute":n=this._d.valueOf(),n+=Ir-Nn(n,Ir)-1;break;case"second":n=this._d.valueOf(),n+=Nr-Nn(n,Nr)-1}return this._d.setTime(n),e.updateOffset(this,!0),this}function Bn(){return this._d.valueOf()-6e4*(this._offset||0)}function Fn(){return Math.floor(this.valueOf()/1e3)}function Hn(){return new Date(this.valueOf())}function $n(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function zn(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function jn(){return this.isValid()?this.toISOString():null}function qn(){return f(this)}function Un(){return d({},p(this))}function Wn(){return p(this).overflow}function Vn(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function Yn(){var t,n,i,o=this._eras||ot("en")._eras;for(t=0,n=o.length;t<n;++t){if("string"==typeof o[t].since)i=e(o[t].since).startOf("day"),o[t].since=i.valueOf();switch(typeof o[t].until){case"undefined":o[t].until=1/0;break;case"string":i=e(o[t].until).startOf("day").valueOf(),o[t].until=i.valueOf()}}return o}function Gn(e,t,n){var i,o,r,s,a,l=this.eras();for(e=e.toUpperCase(),i=0,o=l.length;i<o;++i)if(r=l[i].name.toUpperCase(),s=l[i].abbr.toUpperCase(),a=l[i].narrow.toUpperCase(),n)switch(t){case"N":case"NN":case"NNN":if(s===e)return l[i];break;case"NNNN":if(r===e)return l[i];break;case"NNNNN":if(a===e)return l[i]}else if([r,s,a].indexOf(e)>=0)return l[i]}function Kn(t,n){var i=t.since<=t.until?1:-1;return void 0===n?e(t.since).year():e(t.since).year()+(n-t.offset)*i}function Xn(){var e,t,n,i=this.localeData().eras();for(e=0,t=i.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),i[e].since<=n&&n<=i[e].until)return i[e].name;if(i[e].until<=n&&n<=i[e].since)return i[e].name}return""}function Qn(){var e,t,n,i=this.localeData().eras();for(e=0,t=i.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),i[e].since<=n&&n<=i[e].until)return i[e].narrow;if(i[e].until<=n&&n<=i[e].since)return i[e].narrow}return""}function Zn(){var e,t,n,i=this.localeData().eras();for(e=0,t=i.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),i[e].since<=n&&n<=i[e].until)return i[e].abbr;if(i[e].until<=n&&n<=i[e].since)return i[e].abbr}return""}function Jn(){var t,n,i,o,r=this.localeData().eras();for(t=0,n=r.length;t<n;++t)if(i=r[t].since<=r[t].until?1:-1,o=this.clone().startOf("day").valueOf(),r[t].since<=o&&o<=r[t].until||r[t].until<=o&&o<=r[t].since)return(this.year()-e(r[t].since).year())*i+r[t].offset;return this.year()}function ei(e){return o(this,"_erasNameRegex")||ai.call(this),e?this._erasNameRegex:this._erasRegex}function ti(e){return o(this,"_erasAbbrRegex")||ai.call(this),e?this._erasAbbrRegex:this._erasRegex}function ni(e){return o(this,"_erasNarrowRegex")||ai.call(this),e?this._erasNarrowRegex:this._erasRegex}function ii(e,t){return t.erasAbbrRegex(e)}function oi(e,t){return t.erasNameRegex(e)}function ri(e,t){return t.erasNarrowRegex(e)}function si(e,t){return t._eraYearOrdinalRegex||No}function ai(){var e,t,n=[],i=[],o=[],r=[],s=this.eras();for(e=0,t=s.length;e<t;++e)i.push(ee(s[e].name)),n.push(ee(s[e].abbr)),o.push(ee(s[e].narrow)),r.push(ee(s[e].name)),r.push(ee(s[e].abbr)),r.push(ee(s[e].narrow));this._erasRegex=new RegExp("^("+r.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+i.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+n.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+o.join("|")+")","i")}function li(e,t){T(0,[e,e.length],0,t)}function ci(e){return mi.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function di(e){return mi.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function ui(){return ke(this.year(),1,4)}function hi(){return ke(this.isoWeekYear(),1,4)}function pi(){var e=this.localeData()._week;return ke(this.year(),e.dow,e.doy)}function fi(){var e=this.localeData()._week;return ke(this.weekYear(),e.dow,e.doy)}function mi(e,t,n,i,o){var r;return null==e?Ce(this,i,o).year:(t>(r=ke(e,i,o))&&(t=r),gi.call(this,e,t,n,i,o))}function gi(e,t,n,i,o){var r=we(e,t,n,i,o),s=be(r.year,0,r.dayOfYear);return this.year(s.getUTCFullYear()),this.month(s.getUTCMonth()),this.date(s.getUTCDate()),this}function vi(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)}function yi(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")}function bi(e,t){t[Vo]=W(1e3*("0."+e))}function _i(){return this._isUTC?"UTC":""}function wi(){return this._isUTC?"Coordinated Universal Time":""}function Ci(e){return Dt(1e3*e)}function ki(){return Dt.apply(null,arguments).parseZone()}function xi(e){return e}function Si(e,t,n,i){var o=ot(),r=u().set(i,t);return o[n](r,e)}function Ei(e,t,n){if(a(e)&&(t=e,e=void 0),e=e||"",null!=t)return Si(e,t,n,"month");var i,o=[];for(i=0;i<12;i++)o[i]=Si(e,i,n,"month");return o}function Di(e,t,n,i){"boolean"==typeof e?(a(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,a(t)&&(n=t,t=void 0),t=t||"");var o,r=ot(),s=e?r._week.dow:0,l=[];
vendor: 17,183 bytes, lines 16-17
16if(null!=n)return Si(t,(n+s)%7,i,"day");for(o=0;o<7;o++)l[o]=Si(t,(o+s)%7,i,"day");return l}function Ti(e,t){return Ei(e,t,"months")}function Ai(e,t){return Ei(e,t,"monthsShort")}function Mi(e,t,n){return Di(e,t,n,"weekdays")}function Ri(e,t,n){return Di(e,t,n,"weekdaysShort")}function Ni(e,t,n){return Di(e,t,n,"weekdaysMin")}function Ii(){var e=this._data;return this._milliseconds=qr(this._milliseconds),this._days=qr(this._days),this._months=qr(this._months),e.milliseconds=qr(e.milliseconds),e.seconds=qr(e.seconds),e.minutes=qr(e.minutes),e.hours=qr(e.hours),e.months=qr(e.months),e.years=qr(e.years),this}function Pi(e,t,n,i){var o=Jt(t,n);return e._milliseconds+=i*o._milliseconds,e._days+=i*o._days,e._months+=i*o._months,e._bubble()}function Oi(e,t){return Pi(this,e,t,1)}function Li(e,t){return Pi(this,e,t,-1)}function Bi(e){return e<0?Math.floor(e):Math.ceil(e)}function Fi(){var e,t,n,i,o,r=this._milliseconds,s=this._days,a=this._months,l=this._data;return r>=0&&s>=0&&a>=0||r<=0&&s<=0&&a<=0||(r+=864e5*Bi($i(a)+s),s=0,a=0),l.milliseconds=r%1e3,e=U(r/1e3),l.seconds=e%60,t=U(e/60),l.minutes=t%60,n=U(t/60),l.hours=n%24,s+=U(n/24),a+=o=U(Hi(s)),s-=Bi($i(o)),i=U(a/12),a%=12,l.days=s,l.months=a,l.years=i,this}function Hi(e){return 4800*e/146097}function $i(e){return 146097*e/4800}function zi(e){if(!this.isValid())return NaN;var t,n,i=this._milliseconds;if("month"===(e=H(e))||"quarter"===e||"year"===e)switch(t=this._days+i/864e5,n=this._months+Hi(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round($i(this._months)),e){case"week":return t/7+i/6048e5;case"day":return t+i/864e5;case"hour":return 24*t+i/36e5;case"minute":return 1440*t+i/6e4;case"second":return 86400*t+i/1e3;case"millisecond":return Math.floor(864e5*t)+i;default:throw new Error("Unknown unit "+e)}}function ji(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*W(this._months/12):NaN}function qi(e){return function(){return this.as(e)}}function Ui(){return Jt(this)}function Wi(e){return e=H(e),this.isValid()?this[e+"s"]():NaN}function Vi(e){return function(){return this.isValid()?this._data[e]:NaN}}function Yi(){return U(this.days()/7)}function Gi(e,t,n,i,o){return o.relativeTime(t||1,!!n,e,i)}function Ki(e,t,n,i){var o=Jt(e).abs(),r=ss(o.as("s")),s=ss(o.as("m")),a=ss(o.as("h")),l=ss(o.as("d")),c=ss(o.as("M")),d=ss(o.as("w")),u=ss(o.as("y")),h=r<=n.ss&&["s",r]||r<n.s&&["ss",r]||s<=1&&["m"]||s<n.m&&["mm",s]||a<=1&&["h"]||a<n.h&&["hh",a]||l<=1&&["d"]||l<n.d&&["dd",l];return null!=n.w&&(h=h||d<=1&&["w"]||d<n.w&&["ww",d]),(h=h||c<=1&&["M"]||c<n.M&&["MM",c]||u<=1&&["y"]||["yy",u])[2]=t,h[3]=+e>0,h[4]=i,Gi.apply(null,h)}function Xi(e){return void 0===e?ss:"function"==typeof e&&(ss=e,!0)}function Qi(e,t){return void 0!==as[e]&&(void 0===t?as[e]:(as[e]=t,"s"===e&&(as.ss=t-1),!0))}function Zi(e,t){if(!this.isValid())return this.localeData().invalidDate();var n,i,o=!1,r=as;return"object"==typeof e&&(t=e,e=!1),"boolean"==typeof e&&(o=e),
17"object"==typeof t&&(r=Object.assign({},as,t),null!=t.s&&null==t.ss&&(r.ss=t.s-1)),i=Ki(this,!o,r,n=this.localeData()),o&&(i=n.pastFuture(+this,i)),n.postformat(i)}function Ji(e){return(e>0)-(e<0)||+e}function eo(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n,i,o,r,s,a,l=ls(this._milliseconds)/1e3,c=ls(this._days),d=ls(this._months),u=this.asSeconds();return u?(e=U(l/60),t=U(e/60),l%=60,e%=60,n=U(d/12),d%=12,i=l?l.toFixed(3).replace(/\.?0+$/,""):"",o=u<0?"-":"",r=Ji(this._months)!==Ji(u)?"-":"",s=Ji(this._days)!==Ji(u)?"-":"",a=Ji(this._milliseconds)!==Ji(u)?"-":"",o+"P"+(n?r+n+"Y":"")+(d?r+d+"M":"")+(c?s+c+"D":"")+(t||e||l?"T":"")+(t?a+t+"H":"")+(e?a+e+"M":"")+(l?a+i+"S":"")):"P0D"}var to,no;no=Array.prototype.some?Array.prototype.some:function(e){var t,n=Object(this),i=n.length>>>0;for(t=0;t<i;t++)if(t in n&&e.call(this,n[t],t,n))return!0;return!1};var io,oo=e.momentProperties=[],ro=!1,so={};e.suppressDeprecationWarnings=!1,e.deprecationHandler=null,io=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)o(e,t)&&n.push(t);return n};var ao,lo={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},co=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,uo=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,ho={},po={},fo={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},mo="Invalid date",go="%d",vo=/\d{1,2}/,yo={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},bo={},_o={},wo=/\d/,Co=/\d\d/,ko=/\d{3}/,xo=/\d{4}/,So=/[+-]?\d{6}/,Eo=/\d\d?/,Do=/\d\d\d\d?/,To=/\d\d\d\d\d\d?/,Ao=/\d{1,3}/,Mo=/\d{1,4}/,Ro=/[+-]?\d{1,6}/,No=/\d+/,Io=/[+-]?\d+/,Po=/Z|[+-]\d\d:?\d\d/gi,Oo=/Z|[+-]\d\d(?::?\d\d)?/gi,Lo=/[+-]?\d+(\.\d{1,3})?/,Bo=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i;ao={};var Fo,Ho={},$o=0,zo=1,jo=2,qo=3,Uo=4,Wo=5,Vo=6,Yo=7,Go=8;Fo=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},T("M",["MM",2],"Mo",function(){return this.month()+1}),T("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),T("MMMM",0,0,function(e){return this.localeData().months(this,e)}),F("month","M"),z("month",8),Q("M",Eo),Q("MM",Eo,Co),Q("MMM",function(e,t){return t.monthsShortRegex(e)}),Q("MMMM",function(e,t){return t.monthsRegex(e)}),te(["M","MM"],function(e,t){t[zo]=W(e)-1}),te(["MMM","MMMM"],function(e,t,n,i){var o=n._locale.monthsParse(e,i,n._strict);null!=o?t[zo]=o:p(n).invalidMonth=e});var Ko="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Xo="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),Qo=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Zo=Bo,Jo=Bo;T("Y",0,0,function(){var e=this.year();return e<=9999?D(e,4):"+"+e}),T(0,["YY",2],0,function(){return this.year()%100}),T(0,["YYYY",4],0,"year"),T(0,["YYYYY",5],0,"year"),T(0,["YYYYYY",6,!0],0,"year"),F("year","y"),z("year",1),Q("Y",Io),Q("YY",Eo,Co),Q("YYYY",Mo,xo),Q("YYYYY",Ro,So),Q("YYYYYY",Ro,So),te(["YYYYY","YYYYYY"],$o),te("YYYY",function(t,n){n[$o]=2===t.length?e.parseTwoDigitYear(t):W(t)}),te("YY",function(t,n){n[$o]=e.parseTwoDigitYear(t)}),te("Y",function(e,t){t[$o]=parseInt(e,10)}),e.parseTwoDigitYear=function(e){return W(e)+(W(e)>68?1900:2e3)};var er=V("FullYear",!0);T("w",["ww",2],"wo","week"),T("W",["WW",2],"Wo","isoWeek"),F("week","w"),F("isoWeek","W"),z("week",5),z("isoWeek",5),Q("w",Eo),Q("ww",Eo,Co),Q("W",Eo),Q("WW",Eo,Co),ne(["w","ww","W","WW"],function(e,t,n,i){t[i.substr(0,1)]=W(e)});var tr={dow:0,doy:6};T("d",0,"do","day"),T("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),T("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),T("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),T("e",0,0,"weekday"),T("E",0,0,"isoWeekday"),F("day","d"),F("weekday","e"),F("isoWeekday","E"),z("day",11),z("weekday",11),z("isoWeekday",11),Q("d",Eo),Q("e",Eo),Q("E",Eo),Q("dd",function(e,t){return t.weekdaysMinRegex(e)}),Q("ddd",function(e,t){return t.weekdaysShortRegex(e)}),Q("dddd",function(e,t){return t.weekdaysRegex(e)}),ne(["dd","ddd","dddd"],function(e,t,n,i){var o=n._locale.weekdaysParse(e,i,n._strict);null!=o?t.d=o:p(n).invalidWeekday=e}),ne(["d","e","E"],function(e,t,n,i){t[i]=W(e)});var nr="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),ir="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),or="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),rr=Bo,sr=Bo,ar=Bo;T("H",["HH",2],0,"hour"),T("h",["hh",2],0,Ue),T("k",["kk",2],0,We),T("hmm",0,0,function(){return""+Ue.apply(this)+D(this.minutes(),2)}),T("hmmss",0,0,function(){return""+Ue.apply(this)+D(this.minutes(),2)+D(this.seconds(),2)}),T("Hmm",0,0,function(){return""+this.hours()+D(this.minutes(),2)}),T("Hmmss",0,0,function(){return""+this.hours()+D(this.minutes(),2)+D(this.seconds(),2)}),Ve("a",!0),Ve("A",!1),F("hour","h"),z("hour",13),Q("a",Ye),Q("A",Ye),Q("H",Eo),Q("h",Eo),Q("k",Eo),Q("HH",Eo,Co),Q("hh",Eo,Co),Q("kk",Eo,Co),Q("hmm",Do),Q("hmmss",To),Q("Hmm",Do),Q("Hmmss",To),te(["H","HH"],qo),te(["k","kk"],function(e,t){var n=W(e);t[qo]=24===n?0:n}),te(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),te(["h","hh"],function(e,t,n){t[qo]=W(e),p(n).bigHour=!0}),te("hmm",function(e,t,n){var i=e.length-2;t[qo]=W(e.substr(0,i)),t[Uo]=W(e.substr(i)),p(n).bigHour=!0}),te("hmmss",function(e,t,n){var i=e.length-4,o=e.length-2;t[qo]=W(e.substr(0,i)),t[Uo]=W(e.substr(i,2)),t[Wo]=W(e.substr(o)),p(n).bigHour=!0}),te("Hmm",function(e,t){var n=e.length-2;t[qo]=W(e.substr(0,n)),t[Uo]=W(e.substr(n))}),te("Hmmss",function(e,t){var n=e.length-4,i=e.length-2;t[qo]=W(e.substr(0,n)),t[Uo]=W(e.substr(n,2)),t[Wo]=W(e.substr(i))});var lr,cr=/[ap]\.?m?\.?/i,dr=V("Hours",!0),ur={calendar:lo,longDateFormat:fo,invalidDate:mo,ordinal:go,dayOfMonthOrdinalParse:vo,relativeTime:yo,months:Ko,monthsShort:Xo,week:tr,weekdays:nr,weekdaysMin:or,weekdaysShort:ir,meridiemParse:cr},hr={},pr={},fr=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,mr=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,gr=/Z|[+-]\d\d(?::?\d\d)?/,vr=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],yr=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],br=/^\/?Date\((-?\d+)/i,_r=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,wr={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};e.createFromInputFallback=_("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))}),e.ISO_8601=function(){},e.RFC_2822=function(){};var Cr=_("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Dt.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:m()}),kr=_("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Dt.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:m()}),xr=function(){return Date.now?Date.now():+new Date},Sr=["year","quarter","month","week","day","hour","minute","second","millisecond"];Ft("Z",":"),Ft("ZZ",""),Q("Z",Oo),Q("ZZ",Oo),te(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=Ht(Oo,e)});var Er=/([\+\-]|\d\d)/gi;e.updateOffset=function(){};var Dr=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Tr=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;Jt.fn=Pt.prototype,Jt.invalid=It;var Ar=on(1,"add"),Mr=on(-1,"subtract");e.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",e.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var Rr=_("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return void 0===e?this.localeData():this.locale(e)}),Nr=1e3,Ir=60*Nr,Pr=60*Ir,Or=3506328*Pr;T("N",0,0,"eraAbbr"),T("NN",0,0,"eraAbbr"),T("NNN",0,0,"eraAbbr"),T("NNNN",0,0,"eraName"),T("NNNNN",0,0,"eraNarrow"),T("y",["y",1],"yo","eraYear"),T("y",["yy",2],0,"eraYear"),T("y",["yyy",3],0,"eraYear"),T("y",["yyyy",4],0,"eraYear"),Q("N",ii),Q("NN",ii),Q("NNN",ii),Q("NNNN",oi),Q("NNNNN",ri),te(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,i){var o=n._locale.erasParse(e,i,n._strict);o?p(n).era=o:p(n).invalidEra=e}),Q("y",No),Q("yy",No),Q("yyy",No),Q("yyyy",No),Q("yo",si),te(["y","yy","yyy","yyyy"],$o),te(["yo"],function(e,t,n){var i;n._locale._eraYearOrdinalRegex&&(i=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[$o]=n._locale.eraYearOrdinalParse(e,i):t[$o]=parseInt(e,10)}),T(0,["gg",2],0,function(){return this.weekYear()%100}),T(0,["GG",2],0,function(){return this.isoWeekYear()%100}),li("gggg","weekYear"),li("ggggg","weekYear"),li("GGGG","isoWeekYear"),li("GGGGG","isoWeekYear"),F("weekYear","gg"),F("isoWeekYear","GG"),z("weekYear",1),z("isoWeekYear",1),Q("G",Io),Q("g",Io),Q("GG",Eo,Co),Q("gg",Eo,Co),Q("GGGG",Mo,xo),Q("gggg",Mo,xo),Q("GGGGG",Ro,So),Q("ggggg",Ro,So),ne(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,i){t[i.substr(0,2)]=W(e)}),ne(["gg","GG"],function(t,n,i,o){n[o]=e.parseTwoDigitYear(t)}),T("Q",0,"Qo","quarter"),F("quarter","Q"),z("quarter",7),Q("Q",wo),te("Q",function(e,t){t[zo]=3*(W(e)-1)}),T("D",["DD",2],"Do","date"),F("date","D"),z("date",9),Q("D",Eo),Q("DD",Eo,Co),Q("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),te(["D","DD"],jo),te("Do",function(e,t){t[jo]=W(e.match(Eo)[0])});var Lr=V("Date",!0);T("DDD",["DDDD",3],"DDDo","dayOfYear"),F("dayOfYear","DDD"),z("dayOfYear",4),Q("DDD",Ao),Q("DDDD",ko),te(["DDD","DDDD"],function(e,t,n){n._dayOfYear=W(e)}),T("m",["mm",2],0,"minute"),F("minute","m"),z("minute",14),Q("m",Eo),Q("mm",Eo,Co),te(["m","mm"],Uo);var Br=V("Minutes",!1);T("s",["ss",2],0,"second"),F("second","s"),z("second",15),Q("s",Eo),Q("ss",Eo,Co),te(["s","ss"],Wo);var Fr,Hr,$r=V("Seconds",!1);for(T("S",0,0,function(){return~~(this.millisecond()/100)}),T(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),T(0,["SSS",3],0,"millisecond"),T(0,["SSSS",4],0,function(){return 10*this.millisecond()}),T(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),T(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),T(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),T(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),T(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),F("millisecond","ms"),z("millisecond",16),Q("S",Ao,wo),Q("SS",Ao,Co),Q("SSS",Ao,ko),Fr="SSSS";Fr.length<=9;Fr+="S")Q(Fr,No);for(Fr="S";Fr.length<=9;Fr+="S")te(Fr,bi);Hr=V("Milliseconds",!1),T("z",0,0,"zoneAbbr"),T("zz",0,0,"zoneName");var zr=v.prototype;zr.add=Ar,zr.calendar=hn,zr.clone=pn,zr.diff=_n,zr.endOf=Ln,zr.format=Sn,zr.from=En,zr.fromNow=Dn,zr.to=Tn,zr.toNow=An,zr.get=K,zr.invalidAt=Wn,zr.isAfter=fn,zr.isBefore=mn,zr.isBetween=gn,zr.isSame=vn,zr.isSameOrAfter=yn,zr.isSameOrBefore=bn,zr.isValid=qn,zr.lang=Rr,zr.locale=Mn,zr.localeData=Rn,zr.max=kr,zr.min=Cr,zr.parsingFlags=Un,zr.set=X,zr.startOf=On,zr.subtract=Mr,zr.toArray=$n,zr.toObject=zn,zr.toDate=Hn,zr.toISOString=kn,zr.inspect=xn,"undefined"!=typeof Symbol&&null!=Symbol.for&&(zr[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),zr.toJSON=jn,zr.toString=Cn,zr.unix=Fn,zr.valueOf=Bn,zr.creationData=Vn,zr.eraName=Xn,zr.eraNarrow=Qn,zr.eraAbbr=Zn,zr.eraYear=Jn,zr.year=er,zr.isLeapYear=ve,zr.weekYear=ci,zr.isoWeekYear=di,zr.quarter=zr.quarters=vi,zr.month=ue,zr.daysInMonth=he,zr.week=zr.weeks=De,zr.isoWeek=zr.isoWeeks=Te,zr.weeksInYear=pi,zr.weeksInWeekYear=fi,zr.isoWeeksInYear=ui,zr.isoWeeksInISOWeekYear=hi,zr.date=Lr,zr.day=zr.days=Be,zr.weekday=Fe,zr.isoWeekday=He,zr.dayOfYear=yi,zr.hour=zr.hours=dr,zr.minute=zr.minutes=Br,zr.second=zr.seconds=$r,zr.millisecond=zr.milliseconds=Hr,zr.utcOffset=jt,zr.utc=Ut,zr.local=Wt,zr.parseZone=Vt,zr.hasAlignedHourOffset=Yt,zr.isDST=Gt,zr.isLocal=Xt,zr.isUtcOffset=Qt,zr.isUtc=Zt,zr.isUTC=Zt,zr.zoneAbbr=_i,zr.zoneName=wi,zr.dates=_("dates accessor is deprecated. Use date instead.",Lr),zr.months=_("months accessor is deprecated. Use month instead",ue),zr.years=_("years accessor is deprecated. Use year instead",er),zr.zone=_("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",qt),zr.isDSTShifted=_("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Kt);var jr=S.prototype;jr.calendar=E,jr.longDateFormat=I,jr.invalidDate=P,jr.ordinal=O,
17jr.preparse=xi,jr.postformat=xi,jr.relativeTime=L,jr.pastFuture=B,jr.set=k,jr.eras=Yn,jr.erasParse=Gn,jr.erasConvertYear=Kn,jr.erasAbbrRegex=ti,jr.erasNameRegex=ei,jr.erasNarrowRegex=ni,jr.months=se,jr.monthsShort=ae,jr.monthsParse=ce,jr.monthsRegex=fe,jr.monthsShortRegex=pe,jr.week=xe,jr.firstDayOfYear=Ee,jr.firstDayOfWeek=Se,jr.weekdays=Ne,jr.weekdaysMin=Pe,jr.weekdaysShort=Ie,jr.weekdaysParse=Le,jr.weekdaysRegex=$e,jr.weekdaysShortRegex=ze,jr.weekdaysMinRegex=je,jr.isPM=Ge,jr.meridiem=Ke,tt("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===W(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),e.lang=_("moment.lang is deprecated. Use moment.locale instead.",tt),e.langData=_("moment.langData is deprecated. Use moment.localeData instead.",ot);var qr=Math.abs,Ur=qi("ms"),Wr=qi("s"),Vr=qi("m"),Yr=qi("h"),Gr=qi("d"),Kr=qi("w"),Xr=qi("M"),Qr=qi("Q"),Zr=qi("y"),Jr=Vi("milliseconds"),es=Vi("seconds"),ts=Vi("minutes"),ns=Vi("hours"),is=Vi("days"),os=Vi("months"),rs=Vi("years"),ss=Math.round,as={ss:44,s:45,m:45,h:22,d:26,w:null,M:11},ls=Math.abs,cs=Pt.prototype;return cs.isValid=Nt,cs.abs=Ii,cs.add=Oi,cs.subtract=Li,cs.as=zi,cs.asMilliseconds=Ur,cs.asSeconds=Wr,cs.asMinutes=Vr,cs.asHours=Yr,cs.asDays=Gr,cs.asWeeks=Kr,cs.asMonths=Xr,cs.asQuarters=Qr,cs.asYears=Zr,cs.valueOf=ji,cs._bubble=Fi,cs.clone=Ui,cs.get=Wi,cs.milliseconds=Jr,cs.seconds=es,cs.minutes=ts,cs.hours=ns,cs.days=is,cs.weeks=Yi,cs.months=os,cs.years=rs,cs.humanize=Zi,cs.toISOString=eo,cs.toString=eo,cs.toJSON=eo,cs.locale=Mn,cs.localeData=Rn,cs.toIsoString=_("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",eo),cs.lang=Rr,T("X",0,0,"unix"),T("x",0,0,"valueOf"),Q("x",Io),Q("X",Lo),te("X",function(e,t,n){n._d=new Date(1e3*parseFloat(e))}),te("x",function(e,t,n){n._d=new Date(W(e))}),e.version="2.29.4",t(Dt),e.fn=zr,e.min=At,e.max=Mt,e.now=xr,e.utc=u,e.unix=Ci,e.months=Ti,e.isDate=l,e.locale=tt,e.invalid=m,e.duration=Jt,e.isMoment=y,e.weekdays=Mi,e.parseZone=ki,e.localeData=ot,e.isDuration=Ot,e.monthsShort=Ai,e.weekdaysMin=Ni,e.defineLocale=nt,e.updateLocale=it,e.locales=rt,e.weekdaysShort=Ri,e.normalizeUnits=H,e.relativeTimeRounding=Xi,e.relativeTimeThreshold=Qi,e.calendarFormat=un,e.prototype=zr,e.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},e}),function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("moment"),require("jquery")):"function"==typeof define&&define.amd?define(["moment","jquery"],t):"object"==typeof exports?exports.FullCalendar=t(require("moment"),require("jquery")):e.FullCalendar=t(e.moment,e.jQuery)}("undefined"!=typeof self?self:this,function(e,t){return function(e){function t(i){if(n[i])return n[i].exports;var o=n[i]={i:i,l:!1,exports:{}};return e[i].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,i){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:i})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=236)}([function(t){t.exports=e},,function(e,t){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};t.__extends=function(e,t){function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}},function(e){e.exports=t},function(e,t,n){function i(e,t){t.left&&e.css({"border-left-width":1,"margin-left":t.left-1}),t.right&&e.css({"border-right-width":1,"margin-right":t.right-1})}function o(e){e.css({"margin-left":"","margin-right":"","border-left-width":"","border-right-width":""})}function r(){pe("body").addClass("fc-not-allowed")}function s(){pe("body").removeClass("fc-not-allowed")}function a(e,t,n){var i=Math.floor(t/e.length),o=Math.floor(t-i*(e.length-1)),r=[],s=[],a=[],c=0;l(e),e.each(function(t,n){var l=t===e.length-1?o:i,d=pe(n).outerHeight(!0);d<l?(r.push(n),s.push(d),a.push(pe(n).height())):c+=d}),n&&(t-=c,i=Math.floor(t/r.length),o=Math.floor(t-i*(r.length-1))),pe(r).each(function(e,t){var n=e===r.length-1?o:i,l=s[e],c=n-(l-a[e]);l<n&&pe(t).height(c)})}function l(e){e.height("")}function c(e){var t=0;return e.find("> *").each(function(e,n){var i=pe(n).outerWidth();i>t&&(t=i)}),t++,e.width(t),t}function d(e,t){var n,i=e.add(t);return i.css({position:"relative",left:-1}),n=e.outerHeight()-t.outerHeight(),i.css({position:"",left:""}),n}function u(e){var t=e.css("position"),n=e.parents().filter(function(){var e=pe(this);return/(auto|scroll)/.test(e.css("overflow")+e.css("overflow-y")+e.css("overflow-x"))}).eq(0);return"fixed"!==t&&n.length?n:pe(e[0].ownerDocument||document)}function h(e,t){var n=e.offset(),i=n.left-(t?t.left:0),o=n.top-(t?t.top:0);return{left:i,right:i+e.outerWidth(),top:o,bottom:o+e.outerHeight()}}function p(e,t){var n=e.offset(),i=m(e),o=n.left+b(e,"border-left-width")+i.left-(t?t.left:0),r=n.top+b(e,"border-top-width")+i.top-(t?t.top:0);return{left:o,right:o+e[0].clientWidth,top:r,bottom:r+e[0].clientHeight}}function f(e,t){var n=e.offset(),i=n.left+b(e,"border-left-width")+b(e,"padding-left")-(t?t.left:0),o=n.top+b(e,"border-top-width")+b(e,"padding-top")-(t?t.top:0);return{left:i,right:i+e.width(),top:o,bottom:o+e.height()}}function m(e){var t,n=e[0].offsetWidth-e[0].clientWidth,i=e[0].offsetHeight-e[0].clientHeight;return n=g(n),t={left:0,right:0,top:0,bottom:i=g(i)},v()&&"rtl"===e.css("direction")?t.left=n:t.right=n,t}function g(e){return e=Math.max(0,e),e=Math.round(e)}function v(){return null===fe&&(fe=y()),fe}function y(){var e=pe("<div><div/></div>").css({position:"absolute",top:-1e3,left:0,border:0,padding:0,overflow:"scroll",direction:"rtl"}).appendTo("body"),t=e.children().offset().left>e.offset().left;return e.remove(),t}function b(e,t){return parseFloat(e.css(t))||0}function _(e){return 1===e.which&&!e.ctrlKey}function w(e){var t=e.originalEvent.touches;return t&&t.length?t[0].pageX:e.pageX}function C(e){var t=e.originalEvent.touches;return t&&t.length?t[0].pageY:e.pageY}function k(e){return/^touch/.test(e.type)}function x(e){e.addClass("fc-unselectable").on("selectstart",E)}function S(e){e.removeClass("fc-unselectable").off("selectstart",E)}function E(e){e.preventDefault()}function D(e,t){var n={left:Math.max(e.left,t.left),right:Math.min(e.right,t.right),top:Math.max(e.top,t.top),bottom:Math.min(e.bottom,t.bottom)};return n.left<n.right&&n.top<n.bottom&&n}function T(e,t){return{left:Math.min(Math.max(e.left,t.left),t.right),top:Math.min(Math.max(e.top,t.top),t.bottom)}}function A(e){return{left:(e.left+e.right)/2,top:(e.top+e.bottom)/2}}function M(e,t){return{left:e.left-t.left,top:e.top-t.top}}function R(e){var t,n,i=[],o=[];for("string"==typeof e?o=e.split(/\s*,\s*/):"function"==typeof e?o=[e]:pe.isArray(e)&&(o=e),t=0;t<o.length;t++)"string"==typeof(n=o[t])?i.push("-"===n.charAt(0)?{field:n.substring(1),order:-1}:{field:n,order:1}):"function"==typeof n&&i.push({func:n});return i}function N(e,t,n,i,o){var r,s;for(r=0;r<n.length;r++)if(s=I(e,t,n[r],i,o))return s;return 0}function I(e,t,n,i,o){if(n.func)return n.func(e,t);var r=e[n.field],s=t[n.field];return null==r&&i&&(r=i[n.field]),null==s&&o&&(s=o[n.field]),P(r,s)*(n.order||1)}function P(e,t){return e||t?null==t?-1:null==e?1:"string"===pe.type(e)||"string"===pe.type(t)?String(e).localeCompare(String(t)):e-t:0}function O(e,t){return he.duration({days:e.clone().stripTime().diff(t.clone().stripTime(),"days"),ms:e.time()-t.time()})}function L(e,t){return he.duration({days:e.clone().stripTime().diff(t.clone().stripTime(),"days")})}function B(e,t,n){return he.duration(Math.round(e.diff(t,n,!0)),n)}function F(e,n){var i,o,r;for(i=0;i<t.unitsDesc.length&&!((r=$(o=t.unitsDesc[i],e,n))>=1&&ce(r));i++);return o}function H(e,t){var n=F(e);return"week"===n&&"object"==typeof t&&t.days&&(n="day"),n}function $(e,t,n){return null!=n?n.diff(t,e,!0):he.isDuration(t)?t.as(e):t.end.diff(t.start,e,!0)}function z(e,t,n){var i;return U(n)?(t-e)/n:(i=n.asMonths(),Math.abs(i)>=1&&ce(i)?t.diff(e,"months",!0)/i:t.diff(e,"days",!0)/n.asDays())}function j(e,t){var n,i;return U(e)||U(t)?e/t:(n=e.asMonths(),i=t.asMonths(),Math.abs(n)>=1&&ce(n)&&Math.abs(i)>=1&&ce(i)?n/i:e.asDays()/t.asDays())}function q(e,t){var n;return U(e)?he.duration(e*t):(n=e.asMonths(),Math.abs(n)>=1&&ce(n)?he.duration({months:n*t}):he.duration({days:e.asDays()*t}))}function U(e){return Boolean(e.hours()||e.minutes()||e.seconds()||e.milliseconds())}function W(e){return"[object Date]"===Object.prototype.toString.call(e)||e instanceof Date}function V(e){return"string"==typeof e&&/^\d+\:\d+(?:\:\d+\.?(?:\d{3})?)?$/.test(e)}function Y(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=window.console;if(n&&n.log)return n.log.apply(n,e)}function G(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=window.console;return n&&n.warn?n.warn.apply(n,e):Y.apply(null,e)}function K(e,t){var n,i,o,r,s,a,l={};if(t)for(n=0;n<t.length;n++){for(i=t[n],o=[],r=e.length-1;r>=0;r--)if("object"==typeof(s=e[r][i]))o.unshift(s);else if(void 0!==s){l[i]=s;break}o.length&&(l[i]=K(o))}for(n=e.length-1;n>=0;n--)for(i in a=e[n])i in l||(l[i]=a[i]);return l}
17function X(e,t){for(var n in e)Q(e,n)&&(t[n]=e[n])}function Q(e,t){return me.call(e,t)}function Z(e,t,n){if(pe.isFunction(e)&&(e=[e]),e){var i=void 0,o=void 0;for(i=0;i<e.length;i++)o=e[i].apply(t,n)||o;return o}}function J(e,t){for(var n=0,i=0;i<e.length;)t(e[i])?(e.splice(i,1),n++):i++;return n}function ee(e,t){for(var n=0,i=0;i<e.length;)e[i]===t?(e.splice(i,1),n++):i++;return n}function te(e,t){var n,i=e.length;if(null==i||i!==t.length)return!1;for(n=0;n<i;n++)if(e[n]!==t[n])return!1;return!0}function ne(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=0;n<e.length;n++)if(void 0!==e[n])return e[n]}function ie(e){return(e+"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/'/g,"&#039;").replace(/"/g,"&quot;").replace(/\n/g,"<br />")}function oe(e){return e.replace(/&.*?;/g,"")}function re(e){var t=[];return pe.each(e,function(e,n){null!=n&&t.push(e+":"+n)}),t.join(";")}function se(e){var t=[];return pe.each(e,function(e,n){null!=n&&t.push(e+'="'+ie(n)+'"')}),t.join(" ")}function ae(e){return e.charAt(0).toUpperCase()+e.slice(1)}function le(e,t){return e-t}function ce(e){return e%1==0}function de(e,t){var n=e[t];return function(){return n.apply(e,arguments)}}function ue(e,t,n){var i,o,r,s,a;void 0===n&&(n=!1);var l=function(){var c=+new Date-s;c<t?i=setTimeout(l,t-c):(i=null,n||(a=e.apply(r,o),r=o=null))};return function(){r=this,o=arguments,s=+new Date;var c=n&&!i;return i||(i=setTimeout(l,t)),c&&(a=e.apply(r,o),r=o=null),a}}Object.defineProperty(t,"__esModule",{value:!0});var he=n(0),pe=n(3);t.compensateScroll=i,t.uncompensateScroll=o,t.disableCursor=r,t.enableCursor=s,t.distributeHeight=a,t.undistributeHeight=l,t.matchCellWidths=c,t.subtractInnerElHeight=d,t.getScrollParent=u,t.getOuterRect=h,t.getClientRect=p,t.getContentRect=f,t.getScrollbarWidths=m;var fe=null;t.isPrimaryMouseButton=_,t.getEvX=w,t.getEvY=C,t.getEvIsTouch=k,t.preventSelection=x,t.allowSelection=S,t.preventDefault=E,t.intersectRects=D,t.constrainPoint=T,t.getRectCenter=A,t.diffPoints=M,t.parseFieldSpecs=R,t.compareByFieldSpecs=N,t.compareByFieldSpec=I,t.flexibleCompare=P,t.dayIDs=["sun","mon","tue","wed","thu","fri","sat"],t.unitsDesc=["year","month","week","day","hour","minute","second","millisecond"],t.diffDayTime=O,t.diffDay=L,t.diffByUnit=B,t.computeGreatestUnit=F,t.computeDurationGreatestUnit=H,t.divideRangeByDuration=z,t.divideDurationByDuration=j,t.multiplyDuration=q,t.durationHasTime=U,t.isNativeDate=W,t.isTimeString=V,t.log=Y,t.warn=G;var me={}.hasOwnProperty;t.mergeProps=K,t.copyOwnProps=X,t.hasOwnProp=Q,t.applyAll=Z,t.removeMatching=J,t.removeExact=ee,t.isArraysEqual=te,t.firstDefined=ne,t.htmlEscape=ie,t.stripHtmlEntities=oe,t.cssToStr=re,t.attrsToStr=se,t.capitaliseFirstLetter=ae,t.compareNumbers=le,t.isInt=ce,t.proxy=de,t.debounce=ue},function(e,t,n){function i(e,t){return e.startMs-t.startMs}Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),r=n(10),s=function(){function e(e,t){this.isStart=!0,this.isEnd=!0,o.isMoment(e)&&(e=e.clone().stripZone()),o.isMoment(t)&&(t=t.clone().stripZone()),e&&(this.startMs=e.valueOf()),t&&(this.endMs=t.valueOf())}return e.invertRanges=function(t,n){var o,r,s=[],a=n.startMs;for(t.sort(i),o=0;o<t.length;o++)(r=t[o]).startMs>a&&s.push(new e(a,r.startMs)),r.endMs>a&&(a=r.endMs);return a<n.endMs&&s.push(new e(a,n.endMs)),s},e.prototype.intersect=function(t){var n=this.startMs,i=this.endMs,o=null;return null!=t.startMs&&(n=null==n?t.startMs:Math.max(n,t.startMs)),null!=t.endMs&&(i=null==i?t.endMs:Math.min(i,t.endMs)),(null==n||null==i||n<i)&&((o=new e(n,i)).isStart=this.isStart&&n===this.startMs,o.isEnd=this.isEnd&&i===this.endMs),o},e.prototype.intersectsWith=function(e){return(null==this.endMs||null==e.startMs||this.endMs>e.startMs)&&(null==this.startMs||null==e.endMs||this.startMs<e.endMs)},e.prototype.containsRange=function(e){return(null==this.startMs||null!=e.startMs&&e.startMs>=this.startMs)&&(null==this.endMs||null!=e.endMs&&e.endMs<=this.endMs)},e.prototype.containsDate=function(e){var t=e.valueOf();return(null==this.startMs||t>=this.startMs)&&(null==this.endMs||t<this.endMs)},e.prototype.constrainDate=function(e){var t=e.valueOf();return null!=this.startMs&&t<this.startMs&&(t=this.startMs),null!=this.endMs&&t>=this.endMs&&(t=this.endMs-1),t},e.prototype.equals=function(e){return this.startMs===e.startMs&&this.endMs===e.endMs},e.prototype.clone=function(){var t=new e(this.startMs,this.endMs);return t.isStart=this.isStart,t.isEnd=this.isEnd,t},e.prototype.getStart=function(){return null!=this.startMs?r.default.utc(this.startMs).stripZone():null},e.prototype.getEnd=function(){return null!=this.endMs?r.default.utc(this.endMs).stripZone():null},e.prototype.as=function(e){return o.utc(this.endMs).diff(o.utc(this.startMs),e,!0)},e}();t.default=s}
17,function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),o=n(3),r=n(208),s=n(33),a=n(49),l=function(e){function t(n){var i=e.call(this)||this;return i.calendar=n,i.className=[],i.uid=String(t.uuid++),i}return i.__extends(t,e),t.parse=function(e,t){var n=new this(t);return!("object"!=typeof e||!n.applyProps(e))&&n},t.normalizeId=function(e){return e?String(e):null},t.prototype.fetch=function(){},t.prototype.removeEventDefsById=function(){},t.prototype.removeAllEventDefs=function(){},t.prototype.getPrimitive=function(){},t.prototype.parseEventDefs=function(e){var t,n,i=[];for(t=0;t<e.length;t++)(n=this.parseEventDef(e[t]))&&i.push(n);return i},t.prototype.parseEventDef=function(e){var t=this.calendar.opt("eventDataTransform"),n=this.eventDataTransform;return t&&(e=t(e,this.calendar)),n&&(e=n(e,this.calendar)),a.default.parse(e,this)},t.prototype.applyManualStandardProps=function(e){return null!=e.id&&(this.id=t.normalizeId(e.id)),o.isArray(e.className)?this.className=e.className:"string"==typeof e.className&&(this.className=e.className.split(/\s+/)),!0},t.uuid=0,t.defineStandardProps=r.default.defineStandardProps,t.copyVerbatimStandardProps=r.default.copyVerbatimStandardProps,t}(s.default);t.default=l,r.default.mixInto(l),l.defineStandardProps({id:!1,className:!1,color:!0,backgroundColor:!0,borderColor:!0,textColor:!0,editable:!0,startEditable:!0,durationEditable:!0,rendering:!0,overlap:!0,constraint:!0,allDayDefault:!0,eventDataTransform:!0})},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),o=n(3),r=n(14),s=0,a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.prototype.listenTo=function(e,t,n){if("object"==typeof t)for(var i in t)t.hasOwnProperty(i)&&this.listenTo(e,i,t[i]);else"string"==typeof t&&e.on(t+"."+this.getListenerNamespace(),o.proxy(n,this))},t.prototype.stopListeningTo=function(e,t){e.off((t||"")+"."+this.getListenerNamespace())},t.prototype.getListenerNamespace=function(){return null==this.listenerId&&(this.listenerId=s++),"_listener"+this.listenerId},t}(r.default);t.default=a},,,function(e,t,n){function i(e,t){return u.format.call(e,t)}function o(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var i,o,d,u,h=e[0],p=1===e.length&&"string"==typeof h;return r.isMoment(h)||a.isNativeDate(h)||void 0===h?u=r.apply(null,e):(i=!1,o=!1,p?l.test(h)?(e=[h+="-01"],i=!0,o=!0):(d=c.exec(h))&&(i=!d[5],o=!0):s.isArray(h)&&(o=!0),u=t||i?r.utc.apply(r,e):r.apply(null,e),i?(u._ambigTime=!0,u._ambigZone=!0):n&&(o?u._ambigZone=!0:p&&u.utcOffset(h))),u._fullCalendar=!0,u}Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),s=n(3),a=n(4),l=/^\s*\d{4}-\d\d$/,c=/^\s*\d{4}-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?)?$/,d=r.fn;t.newMomentProto=d;var u=s.extend({},d);t.oldMomentProto=u;var h=r.momentProperties;h.push("_fullCalendar"),h.push("_ambigTime"),h.push("_ambigZone"),t.oldMomentFormat=i;var p=function(){return o(arguments)};t.default=p,p.utc=function(){var e=o(arguments,!0);return e.hasTime()&&e.utc(),e},p.parseZone=function(){return o(arguments,!0,!0)},d.week=d.weeks=function(e){var t=this._locale._fullCalendar_weekCalc;return null==e&&"function"==typeof t?t(this):"ISO"===t?u.isoWeek.apply(this,arguments):u.week.apply(this,arguments)},d.time=function(e){if(!this._fullCalendar)return u.time.apply(this,arguments);if(null==e)return r.duration({hours:this.hours(),minutes:this.minutes(),seconds:this.seconds(),milliseconds:this.milliseconds()});this._ambigTime=!1,r.isDuration(e)||r.isMoment(e)||(e=r.duration(e));var t=0;return r.isDuration(e)&&(t=24*Math.floor(e.asDays())),this.hours(t+e.hours()).minutes(e.minutes()).seconds(e.seconds()).milliseconds(e.milliseconds())},d.stripTime=function(){return this._ambigTime||(this.utc(!0),this.set({hours:0,minutes:0,seconds:0,ms:0}),this._ambigTime=!0,this._ambigZone=!0),this},d.hasTime=function(){return!this._ambigTime},d.stripZone=function(){var e;return this._ambigZone||(e=this._ambigTime,this.utc(!0),this._ambigTime=e||!1,this._ambigZone=!0),this}
17,d.hasZone=function(){return!this._ambigZone},
18d.local=function(e){return u.local.call(this,this._ambigZone||e),this._ambigTime=!1,this._ambigZone=!1,this},d.utc=function(e){return u.utc.call(this,e),this._ambigTime=!1,this._ambigZone=!1,this},d.utcOffset=function(e){return null!=e&&(this._ambigTime=!1,this._ambigZone=!1),u.utcOffset.apply(this,arguments)}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),o=n(3),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.prototype.on=function(e,t){return o(this).on(e,this._prepareIntercept(t)),this},t.prototype.one=function(e,t){return o(this).one(e,this._prepareIntercept(t)),this},t.prototype._prepareIntercept=function(e){var t=function(t,n){return e.apply(n.context||this,n.args||[])};return e.guid||(e.guid=o.guid++),t.guid=e.guid,t},t.prototype.off=function(e,t){return o(this).off(e,t),this},t.prototype.trigger=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return o(this).triggerHandler(e,{args:t}),this},t.prototype.triggerWith=function(e,t,n){return o(this).triggerHandler(e,{context:t,args:n}),this},t.prototype.hasHandlers=function(e){var t=o._data(this,"events");return t&&t[e]&&t[e].length>0},t}(n(14).default);t.default=r},function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){this.isAllDay=!1,this.unzonedRange=e,this.isAllDay=t}return e.prototype.toLegacy=function(e){return{start:e.msToMoment(this.unzonedRange.startMs,this.isAllDay),end:e.msToMoment(this.unzonedRange.endMs,this.isAllDay)}},e}();t.default=n},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),o=n(34),r=n(209),s=n(17),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.prototype.buildInstances=function(){return[this.buildInstance()]},t.prototype.buildInstance=function(){return new r.default(this,this.dateProfile)},t.prototype.isAllDay=function(){return this.dateProfile.isAllDay()},t.prototype.clone=function(){var t=e.prototype.clone.call(this);return t.dateProfile=this.dateProfile,t},t.prototype.rezone=function(){var e=this.source.calendar,t=this.dateProfile;this.dateProfile=new s.default(e.moment(t.start),t.end?e.moment(t.end):null,e)},t.prototype.applyManualStandardProps=function(t){var n=e.prototype.applyManualStandardProps.call(this,t),i=s.default.parse(t,this.source);return!!i&&(this.dateProfile=i,null!=t.date&&(this.miscProps.date=t.date),n)},t}(o.default);t.default=a,a.defineStandardProps({start:!1,date:!1,end:!1,allDay:!1})},function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){}return e.mixInto=function(e){var t=this;Object.getOwnPropertyNames(this.prototype).forEach(function(n){e.prototype[n]||(e.prototype[n]=t.prototype[n])})},e.mixOver=function(e){var t=this;Object.getOwnPropertyNames(this.prototype).forEach(function(n){e.prototype[n]=t.prototype[n]})},e}();t.default=n},function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e){this.view=e._getView(),this.component=e}return e.prototype.opt=function(e){return this.view.opt(e)},e.prototype.end=function(){},e}();t.default=n},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.version="3.9.0",t.internalApiVersion=12;var i=n(4);t.applyAll=i.applyAll,t.debounce=i.debounce,t.isInt=i.isInt,t.htmlEscape=i.htmlEscape,t.cssToStr=i.cssToStr,t.proxy=i.proxy,t.capitaliseFirstLetter=i.capitaliseFirstLetter,t.getOuterRect=i.getOuterRect,t.getClientRect=i.getClientRect,t.getContentRect=i.getContentRect,t.getScrollbarWidths=i.getScrollbarWidths,t.preventDefault=i.preventDefault,t.parseFieldSpecs=i.parseFieldSpecs,t.compareByFieldSpecs=i.compareByFieldSpecs,t.compareByFieldSpec=i.compareByFieldSpec,t.flexibleCompare=i.flexibleCompare,t.computeGreatestUnit=i.computeGreatestUnit,t.divideRangeByDuration=i.divideRangeByDuration,t.divideDurationByDuration=i.divideDurationByDuration,t.multiplyDuration=i.multiplyDuration,t.durationHasTime=i.durationHasTime,t.log=i.log,t.warn=i.warn,t.removeExact=i.removeExact,t.intersectRects=i.intersectRects;var o=n(47);t.formatDate=o.formatDate,t.formatRange=o.formatRange,t.queryMostGranularFormatUnit=o.queryM
18ostGranularFormatUnit;var r=n(31);t.datepickerLocale=r.datepickerLocale,t.locale=r.locale;var s=n(10);t.moment=s.default;var a=n(11);t.EmitterMixin=a.default;var l=n(7);t.ListenerMixin=l.default;var c=n(48);t.Model=c.default;var d=n(207);t.Constraints=d.default;var u=n(5);t.UnzonedRange=u.default;var h=n(12);t.ComponentFootprint=h.default;var p=n(212);t.BusinessHourGenerator=p.default;var f=n(34);t.EventDef=f.default;var m=n(37);t.EventDefMutation=m.default;var g=n(38);t.EventSourceParser=g.default;var v=n(6);t.EventSource=v.default;var y=n(51);t.defineThemeSystem=y.defineThemeSystem;var b=n(18);t.EventInstanceGroup=b.default;var _=n(52);t.ArrayEventSource=_.default;var w=n(215);t.FuncEventSource=w.default;var C=n(216);t.JsonFeedEventSource=C.default;var k=n(36);t.EventFootprint=k.default;var x=n(33);t.Class=x.default;var S=n(14);t.Mixin=S.default;var E=n(53);t.CoordCache=E.default;var D=n(54);t.DragListener=D.default;var T=n(20);t.Promise=T.default;var A=n(217);t.TaskQueue=A.default;var M=n(218);t.RenderQueue=M.default;var R=n(39);t.Scroller=R.default;var N=n(19);t.Theme=N.default;var I=n(219);t.DateComponent=I.default;var P=n(40);t.InteractiveDateComponent=P.default;var O=n(220);t.Calendar=O.default;var L=n(41);t.View=L.default;var B=n(22);t.defineView=B.defineView,t.getViewConfig=B.getViewConfig;var F=n(55);t.DayTableMixin=F.default;var H=n(56);t.BusinessHourRenderer=H.default;var $=n(42);t.EventRenderer=$.default;var z=n(57);t.FillRenderer=z.default;var j=n(58);t.HelperRenderer=j.default;var q=n(222);t.ExternalDropping=q.default;var U=n(223);t.EventResizing=U.default;var W=n(59);t.EventPointing=W.default;var V=n(224);t.EventDragging=V.default;var Y=n(225);t.DateSelecting=Y.default;var G=n(60);t.StandardInteractionsMixin=G.default;var K=n(226);t.AgendaView=K.default;var X=n(227);t.TimeGrid=X.default;var Q=n(61);t.DayGrid=Q.default;var Z=n(62);t.BasicView=Z.default;var J=n(229);t.MonthView=J.default;var ee=n(230);t.ListView=ee.default},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(5),o=function(){function e(e,t,n){this.start=e,this.end=t||null,this.unzonedRange=this.buildUnzonedRange(n)}return e.parse=function(t,n){var i=t.start||t.date,o=t.end;if(!i)return!1;var r=n.calendar,s=r.moment(i),a=o?r.moment(o):null,l=t.allDay,c=r.opt("forceEventDuration");return!!s.isValid()&&(!a||a.isValid()&&a.isAfter(s)||(a=null),null==l&&null==(l=n.allDayDefault)&&(l=r.opt("allDayDefault")),!0===l?(s.stripTime(),a&&a.stripTime()):!1===l&&(s.hasTime()||s.time(0),a&&!a.hasTime()&&a.time(0)),!a&&c&&(a=r.getDefaultEventEnd(!s.hasTime(),s)),new e(s,a,r))},e.isStandardProp=function(e){return"start"===e||"date"===e||"end"===e||"allDay"===e},e.prototype.isAllDay=function(){return!(this.start.hasTime()||this.end&&this.end.hasTime())},e.prototype.buildUnzonedRange=function(e){var t=this.start.clone().stripZone().valueOf(),n=this.getEnd(e).stripZone().valueOf();return new i.default(t,n)},e.prototype.getEnd=function(e){return this.end?this.end.clone():e.getDefaultEventEnd(this.isAllDay(),this.start)},e}();t.default=o},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(5),o=n(35),r=n(211),s=function(){function e(e){this.eventInstances=e||[]}return e.prototype.getAllEventRanges=function(e){return e?this.sliceNormalRenderRanges(e):this.eventInstances.map(o.eventInstanceToEventRange)},e.prototype.sliceRenderRanges=function(e){return this.isInverse()?this.sliceInverseRenderRanges(e):this.sliceNormalRenderRanges(e)},e.prototype.sliceNormalRenderRanges=function(e){var t,n,i,o=this.eventInstances,s=[];for(t=0;t<o.length;t++)(i=(n=o[t]).dateProfile.unzonedRange.intersect(e))&&s.push(new r.default(i,n.def,n));return s},e.prototype.sliceInverseRenderRanges=function(e){var t=this.eventInstances.map(o.eventInstanceToUnzonedRange),n=this.getEventDef();return(t=i.default.invertRanges(t,e)).map(function(e){return new r.default(e,n)})},e.prototype.isInverse=function(){return this.getEventDef().hasInverseRendering()},e.prototype.getEventDef=function(){return this.explicitEventDef||this.eventInstances[0].def},e}();t.default=s}
18,function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),o=function(){function e(e){this.optionsManager=e,this.processIconOverride()}return e.prototype.processIconOverride=function(){this.iconOverrideOption&&this.setIconOverride(this.optionsManager.get(this.iconOverrideOption))},e.prototype.setIconOverride=function(e){var t,n;if(i.isPlainObject(e)){for(n in t=i.extend({},this.iconClasses),e)t[n]=this.applyIconOverridePrefix(e[n]);this.iconClasses=t}else!1===e&&(this.iconClasses={})},e.prototype.applyIconOverridePrefix=function(e){var t=this.iconOverridePrefix;return t&&0!==e.indexOf(t)&&(e=t+e),e},e.prototype.getClass=function(e){return this.classes[e]||""},e.prototype.getIconClass=function(e){var t=this.iconClasses[e];return t?this.baseIconClass+" "+t:""},e.prototype.getCustomButtonIconClass=function(e){var t;return this.iconOverrideCustomButtonOption&&(t=e[this.iconOverrideCustomButtonOption])?this.baseIconClass+" "+this.applyIconOverridePrefix(t):""},e}();t.default=o,o.prototype.classes={},o.prototype.iconClasses={},o.prototype.baseIconClass="",o.prototype.iconOverridePrefix=""},function(e,t,n){function i(e,t){e.then=function(n){return"function"==typeof n?s.resolve(n(t)):e}}function o(e){e.then=function(t,n){return"function"==typeof n&&n(),e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s={construct:function(e){var t=r.Deferred(),n=t.promise();return"function"==typeof e&&e(function(e){t.resolve(e),i(n,e)},function(){t.reject(),o(n)}),n},resolve:function(e){var t=r.Deferred().resolve(e).promise();return i(t,e),t},reject:function(){var e=r.Deferred().reject().promise();return o(e),e}};t.default=s},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),o=n(16),r=n(11),s=n(7);o.touchMouseIgnoreWait=500;var a=null,l=0,c=function(){function e(){this.isTouching=!1,this.mouseIgnoreDepth=0}return e.get=function(){return a||(a=new e).bind(),a},e.needed=function(){e.get(),l++},e.unneeded=function(){--l||(a.unbind(),a=null)},e.prototype.bind=function(){var e=this;this.listenTo(i(document),{touchstart:this.handleTouchStart,touchcancel:this.handleTouchCancel,touchend:this.handleTouchEnd,mousedown:this.handleMouseDown,mousemove:this.handleMouseMove,mouseup:this.handleMouseUp,click:this.handleClick,selectstart:this.handleSelectStart,contextmenu:this.handleContextMenu}),window.addEventListener("touchmove",this.handleTouchMoveProxy=function(t){e.handleTouchMove(i.Event(t))},{passive:!1}),window.addEventListener("scroll",this.handleScrollProxy=function(t){e.handleScroll(i.Event(t))},!0)},e.prototype.unbind=function(){this.stopListeningTo(i(document)),window.removeEventListener("touchmove",this.handleTouchMoveProxy),window.removeEventListener("scroll",this.handleScrollProxy,!0)},e.prototype.handleTouchStart=function(e){this.stopTouch(e,!0),this.isTouching=!0,this.trigger("touchstart",e)},e.prototype.handleTouchMove=function(e){this.isTouching&&this.trigger("touchmove",e)},e.prototype.handleTouchCancel=function(e){this.isTouching&&(this.trigger("touchcancel",e),this.stopTouch(e))},e.prototype.handleTouchEnd=function(e){this.stopTouch(e)},e.prototype.handleMouseDown=function(e){this.shouldIgnoreMouse()||this.trigger("mousedown",e)},e.prototype.handleMouseMove=function(e){this.shouldIgnoreMouse()||this.trigger("mousemove",e)},e.prototype.handleMouseUp=function(e){this.shouldIgnoreMouse()||this.trigger("mouseup",e)},e.prototype.handleClick=function(e){this.shouldIgnoreMouse()||this.trigger("click",e)},e.prototype.handleSelectStart=function(e){this.trigger("selectstart",e)},e.prototype.handleContextMenu=function(e){this.trigger("contextmenu",e)},e.prototype.handleScroll=function(e){this.trigger("scroll",e)},e.prototype.stopTouch=function(e,t){void 0===t&&(t=!1),this.isTouching&&(this.isTouching=!1,this.trigger("touchend",e),t||this.startTouchMouseIgnore())},e.prototype.startTouchMouseIgnore=function(){var e=this,t=o.touchMouseIgnoreWait;t&&(this.mouseIgnoreDepth++,setTimeout(function(){e.mouseIgnoreDepth--},t))},e.prototype.shouldIgnoreMouse=function(){return this.isTouching||Boolean(this.mouseIgnoreDepth)},e}();t.default=c,s.default.mixInto(c),r.default.mixInto(c)},function(e,t,n){function i(e,n){t.viewHash[e]=n}function o(e){return t.viewHash[e]}
18Object.defineProperty(t,"__esModule",{value:!0});var r=n(16);t.viewHash={},r.views=t.viewHash,t.defineView=i,t.getViewConfig=o},function(e,t,n){function i(e,t){return!e&&!t||!(!e||!t)&&(e.component===t.component&&o(e,t)&&o(t,e))}function o(e,t){for(var n in e)if(!/^(component|left|right|top|bottom)$/.test(n)&&e[n]!==t[n])return!1;return!0}Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),s=n(4),a=function(e){function t(t,n){var i=e.call(this,n)||this;return i.component=t,i}return r.__extends(t,e),t.prototype.handleInteractionStart=function(t){var n,i,o,r=this.subjectEl;this.component.hitsNeeded(),this.computeScrollBounds(),t?(o=i={left:s.getEvX(t),top:s.getEvY(t)},r&&(n=s.getOuterRect(r),o=s.constrainPoint(o,n)),this.origHit=this.queryHit(o.left,o.top),r&&this.options.subjectCenter&&(this.origHit&&(n=s.intersectRects(this.origHit,n)||n),o=s.getRectCenter(n)),this.coordAdjust=s.diffPoints(o,i)):(this.origHit=null,this.coordAdjust=null),e.prototype.handleInteractionStart.call(this,t)},t.prototype.handleDragStart=function(t){var n;e.prototype.handleDragStart.call(this,t),(n=this.queryHit(s.getEvX(t),s.getEvY(t)))&&this.handleHitOver(n)},t.prototype.handleDrag=function(t,n,o){var r;e.prototype.handleDrag.call(this,t,n,o),i(r=this.queryHit(s.getEvX(o),s.getEvY(o)),this.hit)||(this.hit&&this.handleHitOut(),r&&this.handleHitOver(r))},t.prototype.handleDragEnd=function(t){this.handleHitDone(),e.prototype.handleDragEnd.call(this,t)},t.prototype.handleHitOver=function(e){var t=i(e,this.origHit);this.hit=e,this.trigger("hitOver",this.hit,t,this.origHit)},t.prototype.handleHitOut=function(){this.hit&&(this.trigger("hitOut",this.hit),this.handleHitDone(),this.hit=null)},t.prototype.handleHitDone=function(){this.hit&&this.trigger("hitDone",this.hit)},t.prototype.handleInteractionEnd=function(t,n){e.prototype.handleInteractionEnd.call(this,t,n),this.origHit=null,this.hit=null,this.component.hitsNotNeeded()},t.prototype.handleScrollEnd=function(){e.prototype.handleScrollEnd.call(this),this.isDragging&&(this.component.releaseHits(),this.component.prepareHits())},t.prototype.queryHit=function(e,t){return this.coordAdjust&&(e+=this.coordAdjust.left,t+=this.coordAdjust.top),this.component.queryHit(e,t)},t}(n(54).default);t.default=a},,,,,,,,function(e,t,n){function i(e){a.each(f,function(t,n){null==e[t]&&(e[t]=n(e))})}function o(e,n,i){var o=t.localeOptionHash[e]||(t.localeOptionHash[e]={});o.isRTL=i.isRTL,o.weekNumberTitle=i.weekHeader,a.each(h,function(e,t){o[e]=t(i)});var r=a.datepicker;r&&(r.regional[n]=r.regional[e]=i,r.regional.en=r.regional[""],r.setDefaults(i))}function r(e,n){var i,o;i=t.localeOptionHash[e]||(t.localeOptionHash[e]={}),n&&(i=t.localeOptionHash[e]=d.mergeOptions([i,n])),o=s(e),a.each(p,function(e,t){null==i[e]&&(i[e]=t(o,i))}),d.globalDefaults.locale=e}function s(e){return l.localeData(e)||l.localeData("en")}Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),l=n(0),c=n(16),d=n(32),u=n(4);t.localeOptionHash={},c.locales=t.localeOptionHash;var h={buttonText:function(e){return{prev:u.stripHtmlEntities(e.prevText),next:u.stripHtmlEntities(e.nextText),today:u.stripHtmlEntities(e.currentText)}},monthYearFormat:function(e){return e.showMonthAfterYear?"YYYY["+e.yearSuffix+"] MMMM":"MMMM YYYY["+e.yearSuffix+"]"}},p={dayOfMonthFormat:function(e,t){var n=e.longDateFormat("l");return n=n.replace(/^Y+[^\w\s]*|[^\w\s]*Y+$/g,""),t.isRTL?n+=" ddd":n="ddd "+n,n},mediumTimeFormat:function(e){return e.longDateFormat("LT").replace(/\s*a$/i,"a")},smallTimeFormat:function(e){return e.longDateFormat("LT").replace(":mm","(:mm)").replace(/(\Wmm)$/,"($1)").replace(/\s*a$/i,"a")},extraSmallTimeFormat:function(e){return e.longDateFormat("LT").replace(":mm","(:mm)").replace(/(\Wmm)$/,"($1)").replace(/\s*a$/i,"t")},hourFormat:function(e){return e.longDateFormat("LT").replace(":mm","").replace(/(\Wmm)$/,"").replace(/\s*a$/i,"a")},noMeridiemTimeFormat:function(e){return e.longDateFormat("LT").replace(/\s*a$/i,"")}},f={smallDayDateFormat:function(e){return e.isRTL?"D dd":"dd D"},weekFormat:function(e){return e.isRTL?"w[ "+e.weekNumberTitle+"]":"["+e.weekNumberTitle+" ]w"},smallWeekFormat:function(e){return e.isRTL?"w["+e.weekNumberTitle+"]":"["+e.weekNumberTitle+"]w"}};t.populateInstanceComputableOptions=i,t.datepickerLocale=o,t.locale=r,t.getMomentLocaleData=s,r("en",d.englishDefaults)},function(e,t,n){function i(e){return o.mergeProps(e,r)}
18Object.defineProperty(t,"__esModule",{value:!0});var o=n(4);t.globalDefaults={titleRangeSeparator:" \u2013 ",monthYearFormat:"MMMM YYYY",defaultTimedEventDuration:"02:00:00",defaultAllDayEventDuration:{days:1},forceEventDuration:!1,nextDayThreshold:"09:00:00",columnHeader:!0,defaultView:"month",aspectRatio:1.35,header:{left:"title",center:"",right:"today prev,next"},weekends:!0,weekNumbers:!1,weekNumberTitle:"W",weekNumberCalculation:"local",scrollTime:"06:00:00",minTime:"00:00:00",maxTime:"24:00:00",showNonCurrentDates:!0,lazyFetching:!0,startParam:"start",endParam:"end",timezoneParam:"timezone",timezone:!1,locale:null,isRTL:!1,buttonText:{prev:"prev",next:"next",prevYear:"prev year",nextYear:"next year",year:"year",today:"today",month:"month",week:"week",day:"day"},allDayText:"all-day",agendaEventMinHeight:0,theme:!1,dragOpacity:.75,dragRevertDuration:500,dragScroll:!0,unselectAuto:!0,dropAccept:"*",eventOrder:"title",eventLimit:!1,eventLimitText:"more",eventLimitClick:"popover",dayPopoverFormat:"LL",handleWindowResize:!0,windowResizeDelay:100,longPressDelay:1e3},t.englishDefaults={dayPopoverFormat:"dddd, MMMM D"},t.rtlDefaults={header:{left:"next,prev today",center:"",right:"title"},buttonIcons:{prev:"right-single-arrow",next:"left-single-arrow",prevYear:"right-double-arrow",nextYear:"left-double-arrow"},themeButtonIcons:{prev:"circle-triangle-e",next:"circle-triangle-w",nextYear:"seek-prev",prevYear:"seek-next"}};var r=["header","footer","buttonText","buttonIcons","themeButtonIcons"];t.mergeOptions=i},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),o=n(4),r=function(){function e(){}return e.extend=function(e){var t=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t}(this);return o.copyOwnProps(e,t.prototype),t},e.mixin=function(e){o.copyOwnProps(e,this.prototype)},e}();t.default=r},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),o=n(208),r=function(){function e(e){this.source=e,this.className=[],this.miscProps={}}return e.parse=function(e,t){var n=new this(t);return!!n.applyProps(e)&&n},e.normalizeId=function(e){return String(e)},e.generateId=function(){return"_fc"+e.uuid++},e.prototype.clone=function(){var t=new this.constructor(this.source);return t.id=this.id,t.rawId=this.rawId,t.uid=this.uid,e.copyVerbatimStandardProps(this,t),t.className=this.className.slice(),t.miscProps=i.extend({},this.miscProps),t},e.prototype.hasInverseRendering=function(){return"inverse-background"===this.getRendering()},e.prototype.hasBgRendering=function(){var e=this.getRendering();return"inverse-background"===e||"background"===e},e.prototype.getRendering=function(){return null!=this.rendering?this.rendering:this.source.rendering},e.prototype.getConstraint=function(){return null!=this.constraint?this.constraint:null!=this.source.constraint?this.source.constraint:this.source.calendar.opt("eventConstraint")},e.prototype.getOverlap=function(){return null!=this.overlap?this.overlap:null!=this.source.overlap?this.source.overlap:this.source.calendar.opt("eventOverlap")},e.prototype.isStartExplicitlyEditable=function(){return null!=this.startEditable?this.startEditable:this.source.startEditable},e.prototype.isDurationExplicitlyEditable=function(){return null!=this.durationEditable?this.durationEditable:this.source.durationEditable},e.prototype.isExplicitlyEditable=function(){return null!=this.editable?this.editable:this.source.editable},e.prototype.toLegacy=function(){var t=i.extend({},this.miscProps);return t._id=this.uid,t.source=this.source,t.className=this.className.slice(),t.allDay=this.isAllDay(),null!=this.rawId&&(t.id=this.rawId),e.copyVerbatimStandardProps(this,t),t},e.prototype.applyManualStandardProps=function(t){return null!=t.id?this.id=e.normalizeId(this.rawId=t.id):this.id=e.generateId(),null!=t._id?this.uid=String(t._id):this.uid=e.generateId(),i.isArray(t.className)&&(this.className=t.className),"string"==typeof t.className&&(this.className=t.className.split(/\s+/)),!0},e.prototype.applyMiscProps=function(e){i.extend(this.miscProps,e)},e.uuid=0,e.defineStandardProps=o.default.defineStandardProps,e.copyVerbatimStandardProps=o.default.copyVerbatimStandardProps,e}();t.default=r,o.default.mixInto(r),r.defineStandardProps({_id:!1,id:!1,className:!1,source:!1,title:!0,url:!0,rendering:!0,constraint:!0,overlap:!0,editable:!0,startEditable:!0,durationEditable:!0,color:!0,backgroundColor:!0,borderColor:!0,textColor:!0})},function(e,t,n){function i(e,t){var n,i=[];for(n=0;n<e.length;n++)i.push.apply(i,e[n].buildInstances(t));return i}function o(e){return new l.default(e.dateProfile.unzonedRange,e.def,e)}function r(e){return new c.default(new d.default(e.unzonedRange,e.eventDef.isAllDay()),e.eventDef,e.eventInstance)}function s(e){return e.dateProfile.unzonedRange}function a(e){return e.componentFootprint}
18Object.defineProperty(t,"__esModule",{value:!0});var l=n(211),c=n(36),d=n(12);t.eventDefsToEventInstances=i,t.eventInstanceToEventRange=o,t.eventRangeToEventFootprint=r,t.eventInstanceToUnzonedRange=s,t.eventFootprintToComponentFootprint=a},function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t,n){this.componentFootprint=e,this.eventDef=t,n&&(this.eventInstance=n)}return e.prototype.getEventLegacy=function(){return(this.eventInstance||this.eventDef).toLegacy()},e}();t.default=n},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(4),o=n(17),r=n(34),s=n(50),a=n(13),l=function(){function e(){}return e.createFromRawProps=function(t,n,a){var l,c,d,u,h=t.def,p={},f={},m={},g={},v=null,y=null;for(l in n)o.default.isStandardProp(l)?p[l]=n[l]:h.isStandardProp(l)?f[l]=n[l]:h.miscProps[l]!==n[l]&&(m[l]=n[l]);return(c=o.default.parse(p,h.source))&&(d=s.default.createFromDiff(t.dateProfile,c,a)),f.id!==h.id&&(v=f.id),i.isArraysEqual(f.className,h.className)||(y=f.className),r.default.copyVerbatimStandardProps(f,g),(u=new e).eventDefId=v,u.className=y,u.verbatimStandardProps=g,u.miscProps=m,d&&(u.dateMutation=d),u},e.prototype.mutateSingle=function(e){var t;return this.dateMutation&&(t=e.dateProfile,e.dateProfile=this.dateMutation.buildNewDateProfile(t,e.source.calendar)),null!=this.eventDefId&&(e.id=r.default.normalizeId(e.rawId=this.eventDefId)),this.className&&(e.className=this.className),this.verbatimStandardProps&&a.default.copyVerbatimStandardProps(this.verbatimStandardProps,e),this.miscProps&&e.applyMiscProps(this.miscProps),t?function(){e.dateProfile=t}:function(){}},e.prototype.setDateMutation=function(e){e&&!e.isEmpty()?this.dateMutation=e:this.dateMutation=null},e.prototype.isEmpty=function(){return!this.dateMutation},e}();t.default=l},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default={sourceClasses:[],registerClass:function(e){this.sourceClasses.unshift(e)},parse:function(e,t){var n,i,o=this.sourceClasses;for(n=0;n<o.length;n++)if(i=o[n].parse(e,t))return i}}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),o=n(3),r=n(4),s=function(e){function t(t){var n=e.call(this)||this;return t=t||{},n.overflowX=t.overflowX||t.overflow||"auto",n.overflowY=t.overflowY||t.overflow||"auto",n}return i.__extends(t,e),t.prototype.render=function(){this.el=this.renderEl(),this.applyOverflow()},t.prototype.renderEl=function(){return this.scrollEl=o('<div class="fc-scroller"></div>')},t.prototype.clear=function(){this.setHeight("auto"),this.applyOverflow()},t.prototype.destroy=function(){this.el.remove()},t.prototype.applyOverflow=function(){this.scrollEl.css({"overflow-x":this.overflowX,"overflow-y":this.overflowY})},t.prototype.lockOverflow=function(e){var t=this.overflowX,n=this.overflowY;e=e||this.getScrollbarWidths(),"auto"===t&&(t=e.top||e.bottom||this.scrollEl[0].scrollWidth-1>this.scrollEl[0].clientWidth?"scroll":"hidden"),"auto"===n&&(n=e.left||e.right||this.scrollEl[0].scrollHeight-1>this.scrollEl[0].clientHeight?"scroll":"hidden"),this.scrollEl.css({"overflow-x":t,"overflow-y":n})},t.prototype.setHeight=function(e){this.scrollEl.height(e)},t.prototype.getScrollTop=function(){return this.scrollEl.scrollTop()},t.prototype.setScrollTop=function(e){this.scrollEl.scrollTop(e)},t.prototype.getClientWidth=function(){return this.scrollEl[0].clientWidth},t.prototype.getClientHeight=function(){return this.scrollEl[0].clientHeight},t.prototype.getScrollbarWidths=function(){return r.getScrollbarWidths(this.scrollEl)},t}(n(33).default);t.default=s},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),o=n(3),r=n(4),s=n(219),a=n(21),l=function(e){function t(t,n){var i=e.call(this,t,n)||this;return i.segSelector=".fc-event-container > *",i.dateSelectingClass&&(i.dateClicking=new i.dateClickingClass(i)),i.dateSelectingClass&&(i.dateSelecting=new i.dateSelectingClass(i)),i.eventPointingClass&&(i.eventPointing=new i.eventPointingClass(i)),i.eventDraggingClass&&i.eventPointing&&(i.eventDragging=new i.eventDraggingClass(i,i.eventPointing)),i.eventResizingClass&&i.eventPointing&&(i.eventResizing=new i.eventResizingClass(i,i.eventPointing)),i.externalDroppingClass&&(i.externalDropping=new i.externalDroppingClass(i)),i}return i.__extends(t,e),t.prototype.setElement=function(t){e.prototype.setElement.call(this,t),this.dateClicking&&this.dateClicking.bindToEl(t),this.dateSelecting&&this.dateSelecting.bindToEl(t),this.bindAllSegHandlersToEl(t)},t.prototype.removeElement=function(){this.endInteractions(),e.prototype.removeElement.call(this)},t.prototype.executeEventUnrender=function(){this.endInteractions(),e.prototype.executeEventUnrender.call(this)},t.prototype.bindGlobalHandlers=function(){e.prototype.bindGlobalHandlers.call(this),this.externalDropping&&this.externalDropping.bindToDocument()},t.prototype.unbindGlobalHandlers=function(){e.prototype.unbindGlobalHandlers.call(this),this.externalDropping&&this.externalDropping.unbindFromDocument()},t.prototype.bindDateHandlerToEl=function(e,t,n){var i=this;this.el.on(t,function(e){if(!o(e.target).is(i.segSelector+":not(.fc-helper),"+i.segSelector+":not(.fc-helper) *,.fc-more,a[data-goto]"))return n.call(i,e)})},t.prototype.bindAllSegHandlersToEl=function(e){[this.eventPointing,this.eventDragging,this.eventResizing].forEach(function(t){t&&t.bindToEl(e)})},t.prototype.bindSegHandlerToEl=function(e,t,n){var i=this;e.on(t,this.segSelector,function(e){var t=o(e.currentTarget);if(!t.is(".fc-helper")){var r=t.data("fc-seg");if(r&&!i.shouldIgnoreEventPointing())return n.call(i,r,e)}})},t.prototype.shouldIgnoreMouse=function(){return a.default.get().shouldIgnoreMouse()},t.prototype.shouldIgnoreTouch=function(){var e=this._getView();return e.isSelected||e.selectedEvent},t.prototype.shouldIgnoreEventPointing=function(){return this.eventDragging&&this.eventDragging.isDragging||this.eventResizing&&this.eventResizing.isResizing},t.prototype.canStartSelection=function(e,t){return r.getEvIsTouch(t)&&!this.canStartResize(e,t)&&(this.isEventDefDraggable(e.footprint.eventDef)||this.isEventDefResizable(e.footprint.eventDef))},t.prototype.canStartDrag=function(e,t){return!this.canStartResize(e,t)&&this.isEventDefDraggable(e.footprint.eventDef)},t.prototype.canStartResize=function(e,t){var n=this._getView(),i=e.footprint.eventDef;return(!r.getEvIsTouch(t)||n.isEventDefSelected(i))&&this.isEventDefResizable(i)&&o(t.target).is(".fc-resizer")},t.prototype.endInteractions=function(){[this.dateClicking,this.dateSelecting,this.eventPointing,this.eventDragging,this.eventResizing].forEach(function(e){e&&e.end()})},t.prototype.isEventDefDraggable=function(e){return this.isEventDefStartEditable(e)},t.prototype.isEventDefStartEditable=function(e){var t=e.isStartExplicitlyEditable();return null==t&&null==(t=this.opt("eventStartEditable"))&&(t=this.isEventDefGenerallyEditable(e)),t},t.prototype.isEventDefGenerallyEditable=function(e){var t=e.isExplicitlyEditable();return null==t&&(t=this.opt("editable")),t},t.prototype.isEventDefResizableFromStart=function(e){return this.opt("eventResizableFromStart")&&this.isEventDefResizable(e)},t.prototype.isEventDefResizableFromEnd=function(e){return this.isEventDefResizable(e)},t.prototype.isEventDefResizable=function(e){var t=e.isDurationExplicitlyEditable();return null==t&&null==(t=this.opt("eventDurationEditable"))&&(t=this.isEventDefGenerallyEditable(e)),t},t.prototype.diffDates=function(e,t){return this.largeUnit?r.diffByUnit(e,t,this.largeUnit):r.diffDayTime(e,t)},t.prototype.isEventInstanceGroupAllowed=function(e){var t,n=this._getView(),i=this.dateProfile,o=this.eventRangesToEventFootprints(e.getAllEventRanges());for(t=0;t<o.length;t++)if(!i.validUnzonedRange.containsRange(o[t].componentFootprint.unzonedRange))return!1;return n.calendar.constraints.isEventInstanceGroupAllowed(e)},t.prototype.isExternalInstanceGroupAllowed=function(e){var t,n=this._getView(),i=this.dateProfile,o=this.eventRangesToEventFootprints(e.getAllEventRanges());for(t=0;t<o.length;t++)if(!i.validUnzonedRange.containsRange(o[t].componentFootprint.unzonedRange))return!1;for(t=0;t<o.length;t++)if(!n.calendar.constraints.isSelectionFootprintAllowed(o[t].componentFootprint))return!1;return!0},t}(s.default);t.default=l}
18,function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),o=n(3),r=n(0),s=n(4),a=n(218),l=n(221),c=n(40),d=n(21),u=n(5),h=function(e){function t(t,n){var i=e.call(this,null,n.options)||this;return i.batchRenderDepth=0,i.isSelected=!1,i.calendar=t,i.viewSpec=n,i.type=n.type,i.name=i.type,i.initRenderQueue(),i.initHiddenDays(),i.dateProfileGenerator=new i.dateProfileGeneratorClass(i),i.bindBaseRenderHandlers(),i.eventOrderSpecs=s.parseFieldSpecs(i.opt("eventOrder")),i.initialize&&i.initialize(),i}return i.__extends(t,e),t.prototype._getView=function(){return this},t.prototype.opt=function(e){return this.options[e]},t.prototype.initRenderQueue=function(){this.renderQueue=new a.default({event:this.opt("eventRenderWait")}),this.renderQueue.on("start",this.onRenderQueueStart.bind(this)),this.renderQueue.on("stop",this.onRenderQueueStop.bind(this)),this.on("before:change",this.startBatchRender),this.on("change",this.stopBatchRender)},t.prototype.onRenderQueueStart=function(){this.calendar.freezeContentHeight(),this.addScroll(this.queryScroll())},t.prototype.onRenderQueueStop=function(){this.calendar.updateViewSize()&&this.popScroll(),this.calendar.thawContentHeight()},t.prototype.startBatchRender=function(){this.batchRenderDepth++||this.renderQueue.pause()},t.prototype.stopBatchRender=function(){--this.batchRenderDepth||this.renderQueue.resume()},t.prototype.requestRender=function(e,t,n){this.renderQueue.queue(e,t,n)},t.prototype.whenSizeUpdated=function(e){this.renderQueue.isRunning?this.renderQueue.one("stop",e.bind(this)):e.call(this)},t.prototype.computeTitle=function(e){var t;return t=/^(year|month)$/.test(e.currentRangeUnit)?e.currentUnzonedRange:e.activeUnzonedRange,this.formatRange({start:this.calendar.msToMoment(t.startMs,e.isRangeAllDay),end:this.calendar.msToMoment(t.endMs,e.isRangeAllDay)},e.isRangeAllDay,this.opt("titleFormat")||this.computeTitleFormat(e),this.opt("titleRangeSeparator"))},t.prototype.computeTitleFormat=function(e){var t=e.currentRangeUnit;return"year"===t?"YYYY":"month"===t?this.opt("monthYearFormat"):e.currentUnzonedRange.as("days")>1?"ll":"LL"},t.prototype.setDate=function(e){var t=this.get("dateProfile"),n=this.dateProfileGenerator.build(e,void 0,!0);t&&t.activeUnzonedRange.equals(n.activeUnzonedRange)||this.set("dateProfile",n)},t.prototype.unsetDate=function(){this.unset("dateProfile")},t.prototype.fetchInitialEvents=function(e){var t=this.calendar,n=e.isRangeAllDay&&!this.usesMinMaxTime;return t.requestEvents(t.msToMoment(e.activeUnzonedRange.startMs,n),t.msToMoment(e.activeUnzonedRange.endMs,n))},
19t.prototype.bindEventChanges=function(){this.listenTo(this.calendar,"eventsReset",this.resetEvents)},t.prototype.unbindEventChanges=function(){this.stopListeningTo(this.calendar,"eventsReset")},t.prototype.setEvents=function(e){this.set("currentEvents",e),this.set("hasEvents",!0)},t.prototype.unsetEvents=function(){this.unset("currentEvents"),this.unset("hasEvents")},t.prototype.resetEvents=function(e){this.startBatchRender(),this.unsetEvents(),this.setEvents(e),this.stopBatchRender()},t.prototype.requestDateRender=function(e){var t=this;this.requestRender(function(){t.executeDateRender(e)},"date","init")},t.prototype.requestDateUnrender=function(){var e=this;this.requestRender(function(){e.executeDateUnrender()},"date","destroy")},t.prototype.executeDateRender=function(t){e.prototype.executeDateRender.call(this,t),this.render&&this.render(),this.trigger("datesRendered"),this.addScroll({isDateInit:!0}),this.startNowIndicator()},t.prototype.executeDateUnrender=function(){this.unselect(),this.stopNowIndicator(),this.trigger("before:datesUnrendered"),this.destroy&&this.destroy(),e.prototype.executeDateUnrender.call(this)},t.prototype.bindBaseRenderHandlers=function(){var e=this;this.on("datesRendered",function(){e.whenSizeUpdated(e.triggerViewRender)}),this.on("before:datesUnrendered",function(){e.triggerViewDestroy()})},t.prototype.triggerViewRender=function(){this.publiclyTrigger("viewRender",{context:this,args:[this,this.el]})},t.prototype.triggerViewDestroy=function(){this.publiclyTrigger("viewDestroy",{context:this,args:[this,this.el]})},t.prototype.requestEventsRender=function(e){var t=this;this.requestRender(function(){t.executeEventRender(e),t.whenSizeUpdated(t.triggerAfterEventsRendered)},"event","init")},t.prototype.requestEventsUnrender=function(){var e=this;this.requestRender(function(){e.triggerBeforeEventsDestroyed(),e.executeEventUnrender()},"event","destroy")},t.prototype.requestBusinessHoursRender=function(e){var t=this;this.requestRender(function(){t.renderBusinessHours(e)},"businessHours","init")},t.prototype.requestBusinessHoursUnrender=function(){var e=this;this.requestRender(function(){e.unrenderBusinessHours()},"businessHours","destroy")},t.prototype.bindGlobalHandlers=function(){e.prototype.bindGlobalHandlers.call(this),this.listenTo(d.default.get(),{touchstart:this.processUnselect,mousedown:this.handleDocumentMousedown})},t.prototype.unbindGlobalHandlers=function(){e.prototype.unbindGlobalHandlers.call(this),this.stopListeningTo(d.default.get())},t.prototype.startNowIndicator=function(){var e,t,n,i=this;
19this.opt("nowIndicator")&&(e=this.getNowIndicatorUnit())&&(t=s.proxy(this,"updateNowIndicator"),this.initialNowDate=this.calendar.getNow(),this.initialNowQueriedMs=(new Date).valueOf(),n=this.initialNowDate.clone().startOf(e).add(1,e).valueOf()-this.initialNowDate.valueOf(),this.nowIndicatorTimeoutID=setTimeout(function(){i.nowIndicatorTimeoutID=null,t(),n=+r.duration(1,e),n=Math.max(100,n),i.nowIndicatorIntervalID=setInterval(t,n)},n))},t.prototype.updateNowIndicator=function(){this.isDatesRendered&&this.initialNowDate&&(this.unrenderNowIndicator(),this.renderNowIndicator(this.initialNowDate.clone().add((new Date).valueOf()-this.initialNowQueriedMs)),this.isNowIndicatorRendered=!0)},t.prototype.stopNowIndicator=function(){this.isNowIndicatorRendered&&(this.nowIndicatorTimeoutID&&(clearTimeout(this.nowIndicatorTimeoutID),this.nowIndicatorTimeoutID=null),this.nowIndicatorIntervalID&&(clearInterval(this.nowIndicatorIntervalID),this.nowIndicatorIntervalID=null),this.unrenderNowIndicator(),this.isNowIndicatorRendered=!1)},t.prototype.updateSize=function(t,n,i){this.setHeight?this.setHeight(t,n):e.prototype.updateSize.call(this,t,n,i),this.updateNowIndicator()},t.prototype.addScroll=function(e){var t=this.queuedScroll||(this.queuedScroll={});o.extend(t,e)},t.prototype.popScroll=function(){this.applyQueuedScroll(),this.queuedScroll=null},t.prototype.applyQueuedScroll=function(){this.queuedScroll&&this.applyScroll(this.queuedScroll)},t.prototype.queryScroll=function(){var e={};return this.isDatesRendered&&o.extend(e,this.queryDateScroll()),e},t.prototype.applyScroll=function(e){e.isDateInit&&this.isDatesRendered&&o.extend(e,this.computeInitialDateScroll()),this.isDatesRendered&&this.applyDateScroll(e)},t.prototype.computeInitialDateScroll=function(){return{}},t.prototype.queryDateScroll=function(){return{}},t.prototype.applyDateScroll=function(){},t.prototype.reportEventDrop=function(e,t,n,i){var o=this.calendar.eventManager.mutateEventsWithId(e.def.id,t),s=t.dateMutation;s&&(e.dateProfile=s.buildNewDateProfile(e.dateProfile,this.calendar)),this.triggerEventDrop(e,s&&s.dateDelta||r.duration(),o,n,i)},t.prototype.triggerEventDrop=function(e,t,n,i,o){this.publiclyTrigger("eventDrop",{context:i[0],args:[e.toLegacy(),t,n,o,{},this]})},t.prototype.reportExternalDrop=function(e,t,n,i,o,r){t&&this.calendar.eventManager.addEventDef(e,n),this.triggerExternalDrop(e,t,i,o,r)},t.prototype.triggerExternalDrop=function(e,t,n,i,o){this.publiclyTrigger("drop",{context:n[0],args:[e.dateProfile.start.clone(),i,o,this]}),t&&this.publiclyTrigger("eventReceive",{context:this,args:[e.buildInstance().toLegacy(),this]})},t.prototype.reportEventResize=function(e,t,n,i){var o=this.calendar.eventManager.mutateEventsWithId(e.def.id,t);e.dateProfile=t.dateMutation.buildNewDateProfile(e.dateProfile,this.calendar),this.triggerEventResize(e,t.dateMutation.endDelta,o,n,i)},t.prototype.triggerEventResize=function(e,t,n,i,o){this.publiclyTrigger("eventResize",{context:i[0],args:[e.toLegacy(),t,n,o,{},this]})},t.prototype.select=function(e,t){this.unselect(t),this.renderSelectionFootprint(e),this.reportSelection(e,t)},t.prototype.renderSelectionFootprint=function(t){this.renderSelection?this.renderSelection(t.toLegacy(this.calendar)):e.prototype.renderSelectionFootprint.call(this,t)},t.prototype.reportSelection=function(e,t){this.isSelected=!0,this.triggerSelect(e,t)},t.prototype.triggerSelect=function(e,t){var n=this.calendar.footprintToDateProfile(e);this.publiclyTrigger("select",{context:this,args:[n.start,n.end,t,this]})},t.prototype.unselect=function(e){this.isSelected&&(this.isSelected=!1,this.destroySelection&&this.destroySelection(),this.unrenderSelection(),this.publiclyTrigger("unselect",{context:this,args:[e,this]}))},t.prototype.selectEventInstance=function(e){this.selectedEventInstance&&this.selectedEventInstance===e||(this.unselectEventInstance(),this.getEventSegs().forEach(function(t){t.footprint.eventInstance===e&&t.el&&t.el.addClass("fc-selected")}),this.selectedEventInstance=e)},t.prototype.unselectEventInstance=function(){this.selectedEventInstance&&(this.getEventSegs().forEac
19h(function(e){e.el&&e.el.removeClass("fc-selected")}),this.selectedEventInstance=null)},t.prototype.isEventDefSelected=function(e){return this.selectedEventInstance&&this.selectedEventInstance.def.id===e.id},t.prototype.handleDocumentMousedown=function(e){s.isPrimaryMouseButton(e)&&this.processUnselect(e)},t.prototype.processUnselect=function(e){this.processRangeUnselect(e),this.processEventUnselect(e)},t.prototype.processRangeUnselect=function(e){var t;this.isSelected&&this.opt("unselectAuto")&&((t=this.opt("unselectCancel"))&&o(e.target).closest(t).length||this.unselect(e))},t.prototype.processEventUnselect=function(e){this.selectedEventInstance&&(o(e.target).closest(".fc-selected").length||this.unselectEventInstance())},t.prototype.triggerBaseRendered=function(){this.publiclyTrigger("viewRender",{context:this,args:[this,this.el]})},t.prototype.triggerBaseUnrendered=function(){this.publiclyTrigger("viewDestroy",{context:this,args:[this,this.el]})},t.prototype.triggerDayClick=function(e,t,n){var i=this.calendar.footprintToDateProfile(e);this.publiclyTrigger("dayClick",{context:t,args:[i.start,n,this]})},t.prototype.isDateInOtherMonth=function(){return!1},t.prototype.getUnzonedRangeOption=function(e){var t=this.opt(e);if("function"==typeof t&&(t=t.apply(null,Array.prototype.slice.call(arguments,1))),t)return this.calendar.parseUnzonedRange(t)},t.prototype.initHiddenDays=function(){var e,t=this.opt("hiddenDays")||[],n=[],i=0;for(!1===this.opt("weekends")&&t.push(0,6),e=0;e<7;e++)(n[e]=-1!==o.inArray(e,t))||i++;if(!i)throw new Error("invalid hiddenDays");this.isHiddenDayHash=n},t.prototype.trimHiddenDays=function(e){var t=e.getStart(),n=e.getEnd();return t&&(t=this.skipHiddenDays(t)),n&&(n=this.skipHiddenDays(n,-1,!0)),null===t||null===n||t<n?new u.default(t,n):null},t.prototype.isHiddenDay=function(e){return r.isMoment(e)&&(e=e.day()),this.isHiddenDayHash[e]},t.prototype.skipHiddenDays=function(e,t,n){void 0===t&&(t=1),void 0===n&&(n=!1);for(var i=e.clone();this.isHiddenDayHash[(i.day()+(n?t:0)+7)%7];)i.add(t,"days");return i},t}(c.default);t.default=h,h.prototype.usesMinMaxTime=!1,h.prototype.dateProfileGeneratorClass=l.default,h.watch("displayingDates",["isInDom","dateProfile"],function(e){this.requestDateRender(e.dateProfile)},function(){this.requestDateUnrender()}),h.watch("displayingBusinessHours",["displayingDates","businessHourGenerator"],function(e){this.requestBusinessHoursRender(e.businessHourGenerator)},function(){this.requestBusinessHoursUnrender()}),h.watch("initialEvents",["dateProfile"],function(e){return this.fetchInitialEvents(e.dateProfile)}),h.watch("bindingEvents",["initialEvents"],function(e){this.setEvents(e.initialEvents),this.bindEventChanges()},function(){this.unbindEventChanges(),this.unsetEvents()}),h.watch("displayingEvents",["displayingDates","hasEvents"],function(){this.requestEventsRender(this.get("currentEvents"))},function(){this.requestEventsUnrender()}),h.watch("title",["dateProfile"],function(e){return this.title=this.computeTitle(e.dateProfile)}),h.watch("legacyDateProps",["dateProfile"],function(e){var t=this.calendar,n=e.dateProfile;this.start=t.msToMoment(n.activeUnzonedRange.startMs,n.isRangeAllDay),this.end=t.msToMoment(n.activeUnzonedRange.endMs,n.isRangeAllDay),this.intervalStart=t.msToMoment(n.currentUnzonedRange.startMs,n.isRangeAllDay),this.intervalEnd=t.msToMoment(n.currentUnzonedRange.endMs,n.isRangeAllDay)})},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),o=n(4),r=function(){function e(e,t){this.view=e._getView(),this.component=e,this.fillRenderer=t}return e.prototype.opt=function(e){return this.view.opt(e)},e.prototype.rangeUpdated=function(){var e,t;this.eventTimeFormat=this.opt("eventTimeFormat")||this.opt("timeFormat")||this.computeEventTimeFormat(),null==(e=this.opt("displayEventTime"))&&(e=this.computeDisplayEventTime()),null==(t=this.opt("displayEventEnd"))&&(t=this.computeDisplayEventEnd()),this.displayEventTime=e,this.displayEventEnd=t},e.prototype.render=function(e){var t,n,i,o=this.component._getDateProfile(),r=[],s=[];for(t in e)i=(n=e[t]).sliceRenderRanges(o.activeUnzonedRange),n.getEventDef().hasBgRendering()?r.push.apply(r,i):s.push.apply(s,i);this.renderBgRanges(r),this.renderFgRanges(s)},e.prototype.unrender=function(){this.unrenderBgRanges(),this.unrenderFgRanges()},e.prototype.renderFgRanges=function(e){var t=this.component.eventRangesToEventFootprints(e),n=this.component.eventFootprintsToSegs(t);n=this.renderFgSegEls(n),!1!==this.renderFgSegs(n)&&(this.fgSegs=n)},e.prototype.unrenderFgRanges=function(){this.unrenderFgSegs(this.fgSegs||[]),this.fgSegs=null},e.prototype.renderBgRanges=function(e){var t=this.component.eventRangesToEventFootprints(e),n=this.component.eventFootprintsToSegs(t);!1!==this.renderBgSegs(n)&&(this.bgSegs=n)},e.prototype.unrenderBgRanges=function(){this.unrenderBgSegs(),this.bgSegs=null},e.prototype.getSegs=function(){return(this.bgSegs||[]).concat(this.fgSegs||[])},e.prototype.renderFgSegs=function(){return!1},e.prototype.unrenderFgSegs=function(){},e.prototype.renderBgSegs=function(e){var t=this;if(!this.fillRenderer)return!1;this.fillRenderer.renderSegs("bgEvent",e,{getClasses:function(e){return t.getBgClasses(e.footprint.eventDef)},getCss:function(e){return{"background-color":t.getBgColor(e.footprint.eventDef)}},filterEl:function(e,n){return t.filterEventRenderEl(e.footprint,n)}})},e.prototype.unrenderBgSegs=function(){this.fillRenderer&&this.fillRenderer.unrender("bgEvent")},e.prototype.renderFgSegEls=function(e,t){var n=this;void 0===t&&(t=!1);var o,r=this.view.hasPublicHandlers("eventRender"),s="",a=[];if(e.length){for(o=0;o<e.length;o++)this.beforeFgSegHtml(e[o]),s+=this.fgSegHtml(e[o],t);i(s).each(function(t,o){var s=e[t],l=i(o);r&&(l=n.filterEventRenderEl(s.footprint,l)),l&&(l.data("fc-seg",s
19),s.el=l,a.push(s))})}return a},e.prototype.beforeFgSegHtml=function(){},e.prototype.fgSegHtml=function(){},e.prototype.getSegClasses=function(e,t,n){var i=["fc-event",e.isStart?"fc-start":"fc-not-start",e.isEnd?"fc-end":"fc-not-end"].concat(this.getClasses(e.footprint.eventDef));return t&&i.push("fc-draggable"),n&&i.push("fc-resizable"),this.view.isEventDefSelected(e.footprint.eventDef)&&i.push("fc-selected"),i},e.prototype.filterEventRenderEl=function(e,t){var n=e.getEventLegacy(),o=this.view.publiclyTrigger("eventRender",{context:n,args:[n,t,this.view]});return!1===o?t=null:o&&!0!==o&&(t=i(o)),t},e.prototype.getTimeText=function(e,t,n){return this._getTimeText(e.eventInstance.dateProfile.start,e.eventInstance.dateProfile.end,e.componentFootprint.isAllDay,t,n)},e.prototype._getTimeText=function(e,t,n,i,o){return null==i&&(i=this.eventTimeFormat),null==o&&(o=this.displayEventEnd),this.displayEventTime&&!n?o&&t?this.view.formatRange({start:e,end:t},!1,i):e.format(i):""},e.prototype.computeEventTimeFormat=function(){return this.opt("smallTimeFormat")},e.prototype.computeDisplayEventTime=function(){return!0},e.prototype.computeDisplayEventEnd=function(){return!0},e.prototype.getBgClasses=function(e){var t=this.getClasses(e);return t.push("fc-bgevent"),t},e.prototype.getClasses=function(e){var t,n=this.getStylingObjs(e),i=[];for(t=0;t<n.length;t++)i.push.apply(i,n[t].eventClassName||n[t].className||[]);return i},e.prototype.getSkinCss=function(e){return{"background-color":this.getBgColor(e),"border-color":this.getBorderColor(e),color:this.getTextColor(e)}},e.prototype.getBgColor=function(e){var t,n,i=this.getStylingObjs(e);for(t=0;t<i.length&&!n;t++)n=i[t].eventBackgroundColor||i[t].eventColor||i[t].backgroundColor||i[t].color;return n||(n=this.opt("eventBackgroundColor")||this.opt("eventColor")),n},e.prototype.getBorderColor=function(e){var t,n,i=this.getStylingObjs(e);for(t=0;t<i.length&&!n;t++)n=i[t].eventBorderColor||i[t].eventColor||i[t].borderColor||i[t].color;return n||(n=this.opt("eventBorderColor")||this.opt("eventColor")),n},e.prototype.getTextColor=function(e){var t,n,i=this.getStylingObjs(e);for(t=0;t<i.length&&!n;t++)n=i[t].eventTextColor||i[t].textColor;return n||(n=this.opt("eventTextColor")),n},e.prototype.getStylingObjs=function(e){var t=this.getFallbackStylingObjs(e);return t.unshift(e),t},e.prototype.getFallbackStylingObjs=function(e){return[e.source]},e.prototype.sortEventSegs=function(e){e.sort(o.proxy(this,"compareEventSegs"))},e.prototype.compareEventSegs=function(e,t){var n=e.footprint,i=t.footprint,r=n.componentFootprint,s=i.componentFootprint,a=r.unzonedRange,l=s.unzonedRange;return a.startMs-l.startMs||l.endMs-l.startMs-(a.endMs-a.startMs)||s.isAllDay-r.isAllDay||o.compareByFieldSpecs(n.eventDef,i.eventDef,this.view.eventOrderSpecs,n.eventDef.miscProps,i.eventDef.miscProps)},e}();t.default=r},,,,,function(e,t,n){function i(e){return"en"!==e.locale()?e.clone().locale("en"):e}function o(e,t){return p(a(t).fakeFormatString,e)}function r(e,t,n,i,o){return e=v.default.parseZone(e),t=v.default.parseZone(t),s(a(n=e.localeData().longDateFormat(n)||n),e,t,i||" - ",o)}function s(e,t,n,i,o){var r,s,a,l=e.sameUnits,c=t.clone().stripZone(),d=n.clone().stripZone(),u=f(e.fakeFormatString,t),h=f(e.fakeFormatString,n),p="",g="",v="",y="",b="";for(r=0;r<l.length&&(!l[r]||c.isSame(d,l[r]));r++)p+=u[r];for(s=l.length-1;s>r&&(!l[s]||c.isSame(d,l[s]))&&(s-1!==r||"."!==u[s]);s--)g=u[s]+g;for(a=r;a<=s;a++)v+=u[a],y+=h[a];return(v||y)&&(b=o?y+i+v:v+i+y),m(p+b+g)}function a(e){return x[e]||(x[e]=l(e))}function l(e){var t=c(e);return{fakeFormatString:u(t),sameUnits:h(t)}}function c(e){for(var t,n=[],i=/\[([^\]]*)\]|\(([^\)]*)\)|(LTS|LT|(\w)\4*o?)|([^\w\[\(]+)/g;t=i.exec(e);)t[1]?n.push.apply(n,d(t[1])):t[2]?n.push({maybe:c(t[2])}):t[3]?n.push({token:t[3]}):t[5]&&n.push.apply(n,d(t[5]));return n}function d(e){return". "===e?["."," "]:[e]}function u(e){var t,n,i=[];for(t=0;t<e.length;t++)"string"==typeof(n=e[t])?i.push("["+n+"]"):n.token?n.token in C?i.push(b+"["+n.token+"]"):i.push(n.token):n.maybe&&i.push(_+u(n.maybe)+_);return i.join(y)}function h(e){var t,n,i,o=[];for(t=0;t<e.length;t++)(n=e[t]).token?(i=k[n.token.charAt(0)],o.push(i?i.unit:"second")):n.maybe?o.push.apply(o,h(n.maybe)):o.push(null);return o}function p(e,t){return m(f(e,t).join(""))}function f(e,t){var n,i,o=[],r=v.oldMomentFormat(t,e).split(y);for(n=0;n<r.length;n++)(i=r[n]).charAt(0)===b?o.push(C[i.substring(1)](t)):o.push(i);return o}function m(e){return e.replace(w,function(e,t){return t.match(/[1-9]/)?t:""})}function g(e){var t,n,i,o,r=c(e);for(t=0;t<r.length;t++)(n=r[t]).token&&(i=k[n.token.charAt(0)])&&(!o||i.value>o.value)&&(o=i);return o?o.unit:null}
19Object.defineProperty(t,"__esModule",{value:!0});var v=n(10);v.newMomentProto.format=function(){return this._fullCalendar&&arguments[0]?o(this,arguments[0]):this._ambigTime?v.oldMomentFormat(i(this),"YYYY-MM-DD"):this._ambigZone?v.oldMomentFormat(i(this),"YYYY-MM-DD[T]HH:mm:ss"):this._fullCalendar?v.oldMomentFormat(i(this)):v.oldMomentProto.format.apply(this,arguments)},v.newMomentProto.toISOString=function(){return this._ambigTime?v.oldMomentFormat(i(this),"YYYY-MM-DD"):this._ambigZone?v.oldMomentFormat(i(this),"YYYY-MM-DD[T]HH:mm:ss"):this._fullCalendar?v.oldMomentProto.toISOString.apply(i(this),arguments):v.oldMomentProto.toISOString.apply(this,arguments)};var y="\v",b="\x1f",_="\x1e",w=new RegExp(_+"([^"+_+"]*)"+_,"g"),C={t:function(e){return v.oldMomentFormat(e,"a").charAt(0)},T:function(e){return v.oldMomentFormat(e,"A").charAt(0)}},k={Y:{value:1,unit:"year"},M:{value:2,unit:"month"},W:{value:3,unit:"week"},w:{value:3,unit:"week"},D:{value:4,unit:"day"},d:{value:4,unit:"day"}};t.formatDate=o,t.formatRange=r;var x={};t.queryMostGranularFormatUnit=g},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),o=n(33),r=n(11),s=n(7),a=function(e){function t(){var t=e.call(this)||this;return t._watchers={},t._props={},t.applyGlobalWatchers(),t.constructed(),t}return i.__extends(t,e),t.watch=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this.prototype.hasOwnProperty("_globalWatchArgs")||(this.prototype._globalWatchArgs=Object.create(this.prototype._globalWatchArgs)),this.prototype._globalWatchArgs[e]=t},t.prototype.constructed=function(){},t.prototype.applyGlobalWatchers=function(){var e,t=this._globalWatchArgs;for(e in t)this.watch.apply(this,[e].concat(t[e]))},t.prototype.has=function(e){return e in this._props},t.prototype.get=function(e){return void 0===e?this._props:this._props[e]},t.prototype.set=function(e,t){var n;"string"==typeof e?(n={})[e]=void 0===t?null:t:n=e,this.setProps(n)},t.prototype.reset=function(e){var t,n=this._props,i={};for(t in n)i[t]=void 0;for(t in e)i[t]=e[t];this.setProps(i)},t.prototype.unset=function(e){var t,n,i={};for(t="string"==typeof e?[e]:e,n=0;n<t.length;n++)i[t[n]]=void 0;this.setProps(i)},t.prototype.setProps=function(e){var t,n,i={},o=0;for(t in e)"object"!=typeof(n=e[t])&&n===this._props[t]||(i[t]=n,o++);if(o){for(t in this.trigger("before:batchChange",i),i)n=i[t],this.trigger("before:change",t,n),this.trigger("before:change:"+t,n);for(t in i)void 0===(n=i[t])?delete this._props[t]:this._props[t]=n,this.trigger("change:"+t,n),this.trigger("change",t,n);this.trigger("batchChange",i)}},t.prototype.watch=function(e,t,n,i){var o=this;this.unwatch(e),this._watchers[e]=this._watchDeps(t,function(t){var i=n.call(o,t);i&&i.then?(o.unset(e),i.then(function(t){o.set(e,t)})):o.set(e,i)},function(t){o.unset(e),i&&i.call(o,t)}
19)},t.prototype.unwatch=function(e){var t=this._watchers[e];t&&(delete this._watchers[e],t.teardown())},t.prototype._watchDeps=function(e,t,n){var i=this,o=0,r=e.length,s=0,a={},l=[],c=!1,d=function(){1===++o&&s===r&&(c=!0,n(a),c=!1)},u=function(e,n,i){void 0===n?(i||void 0===a[e]||s--,delete a[e]):(i||void 0!==a[e]||s++,a[e]=n),--o||s===r&&(c||t(a))},h=function(e,t){i.on(e,t),l.push([e,t])};return e.forEach(function(e){var t=!1;"?"===e.charAt(0)&&(e=e.substring(1),t=!0),h("before:change:"+e,function(n){d(e,n,t)}),h("change:"+e,function(n){u(e,n,t)})}),e.forEach(function(e){var t=!1;"?"===e.charAt(0)&&(e=e.substring(1),t=!0),i.has(e)?(a[e]=i.get(e),s++):t&&s++}),s===r&&t(a),{teardown:function(){for(var e=0;e<l.length;e++)i.off(l[e][0],l[e][1]);l=null,s===r&&n()},flash:function(){s===r&&(n(),t(a))}}},t.prototype.flash=function(e){var t=this._watchers[e];t&&t.flash()},t}(o.default);t.default=a,a.prototype._globalWatchArgs={},r.default.mixInto(a),s.default.mixInto(a)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),o=n(4),r=n(13),s=n(210);t.default={parse:function(e,t){return o.isTimeString(e.start)||i.isDuration(e.start)||o.isTimeStr
19ing(e.end)||i.isDuration(e.end)?s.default.parse(e,t):r.default.parse(e,t)}}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(4),o=n(17),r=function(){function e(){this.clearEnd=!1,this.forceTimed=!1,this.forceAllDay=!1}return e.createFromDiff=function(t,n,o){function r(e,t){return o?i.diffByUnit(e,t,o):n.isAllDay()?i.diffDay(e,t):i.diffDayTime(e,t)}var s,a,l,c=t.end&&!n.end,d=t.isAllDay()&&!n.isAllDay(),u=!t.isAllDay()&&n.isAllDay();return s=r(n.start,t.start),n.end&&(a=r(n.unzonedRange.getEnd(),t.unzonedRange.getEnd()).subtract(s)),(l=new e).clearEnd=c,l.forceTimed=d,l.forceAllDay=u,l.setDateDelta(s),l.setEndDelta(a),l},e.prototype.buildNewDateProfile=function(e,t){var n=e.start.clone(),i=null,r=!1;return e.end&&!this.clearEnd?i=e.end.clone():this.endDelta&&!i&&(i=t.getDefaultEventEnd(e.isAllDay(),n)),this.forceTimed?(r=!0,n.hasTime()||n.time(0),i&&!i.hasTime()&&i.time(0)):this.forceAllDay&&(n.hasTime()&&n.stripTime(),i&&i.hasTime()&&i.stripTime()),this.dateDelta&&(r=!0,n.add(this.dateDelta),i&&i.add(this.dateDelta)),this.endDelta&&(r=!0,i.add(this.endDelta)),this.startDelta&&(r=!0,n.add(this.startDelta)),r&&(n=t.applyTimezone(n),i&&(i=t.applyTimezone(i))),!i&&t.opt("forceEventDuration")&&(i=t.getDefaultEventEnd(e.isAllDay(),n)),new o.default(n,i,t)},e.prototype.setDateDelta=function(e){e&&e.valueOf()?this.dateDelta=e:this.dateDelta=null},e.prototype.setStartDelta=function(e){e&&e.valueOf()?this.startDelta=e:this.startDelta=null},e.prototype.setEndDelta=function(e){e&&e.valueOf()?this.endDelta=e:this.endDelta=null},e.prototype.isEmpty=function(){return!(this.clearEnd||this.forceTimed||this.forceAllDay||this.dateDelta||this.startDelta||this.endDelta)},e}();t.default=r},function(e,t,n){function i(e,t){a[e]=t}function o(e){return e?!0===e?s.default:a[e]:r.default}Object.defineProperty(t,"__esModule",{value:!0});var r=n(213),s=n(214),a={};t.defineThemeSystem=i,t.getThemeSystemClass=o},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),o=n(3),r=n(4),s=n(20),a=n(6),l=n(13),c=function(e){function t(t){var n=e.call(this,t)||this;return n.eventDefs=[],n}return i.__extends(t,e),t.parse=function(e,t){var n;return o.isArray(e.events)?n=e:o.isArray(e)&&(n={events:e}),!!n&&a.default.parse.call(this,n,t)},t.prototype.setRawEventDefs=function(e){this.rawEventDefs=e,this.eventDefs=this.parseEventDefs(e)},t.prototype.fetch=function(e,t,n){var i,o=this.eventDefs;if(null!=this.currentTimezone&&this.currentTimezone!==n)for(i=0;i<o.length;i++)o[i]instanceof l.default&&o[i].rezone();return this.currentTimezone=n,s.default.resolve(o)},t.prototype.addEventDef=function(e){this.eventDefs.push(e)},t.prototype.removeEventDefsById=function(e){return r.removeMatching(this.eventDefs,function(t){return t.id===e})},t.prototype.removeAllEventDefs=function(){this.eventDefs=[]},t.prototype.getPrimitive=function(){return this.rawEventDefs},t.prototype.applyManualStandardProps=function(t){var n=e.prototype.applyManualStandardProps.call(this,t);return this.setRawEventDefs(t.events),n},t}(a.default);t.default=c,c.defineStandardProps({events:!1})},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),o=n(4),r=function(){function e(e){this.isHorizontal=!1,this.isVertical=!1,this.els=i(e.els),this.isHorizontal=e.isHorizontal,this.isVertical=e.isVertical,this.forcedOffsetParentEl=e.offsetParent?i(e.offsetParent):null}return e.prototype.build=function(){var e=this.forcedOffsetParentEl;!e&&this.els.length>0&&(e=this.els.eq(0).offsetParent()),this.origin=e?e.offset():null,this.boundingRect=this.queryBoundingRect
19(),this.isHorizontal&&this.buildElHorizontals(),this.isVertical&&this.buildElVerticals()},e.prototype.clear=function(){this.origin=null,this.boundingRect=null,this.lefts=null,this.rights=null,this.tops=null,this.bottoms=null},e.prototype.ensureBuilt=function(){this.origin||this.build()},e.prototype.buildElHorizontals=function(){var e=[],t=[];this.els.each(function(n,o){var r=i(o),s=r.offset().left,a=r.outerWidth();e.push(s),t.push(s+a)}),this.lefts=e,this.rights=t},e.prototype.buildElVerticals=function(){var e=[],t=[];this.els.each(function(n,o){var r=i(o),s=r.offset().top,a=r.outerHeight();e.push(s),t.push(s+a)}),this.tops=e,this.bottoms=t},e.prototype.getHorizontalIndex=function(e){this.ensureBuilt();var t,n=this.lefts,i=this.rights,o=n.length;for(t=0;t<o;t++)if(e>=n[t]&&e<i[t])return t},e.prototype.getVerticalIndex=function(e){this.ensureBuilt();var t,n=this.tops,i=this.bottoms,o=n.length;for(t=0;t<o;t++)if(e>=n[t]&&e<i[t])return t},e.prototype.getLeftOffset=function(e){return this.ensureBuilt(),this.lefts[e]},e.prototype.getLeftPosition=function(e){return this.ensureBuilt(),this.lefts[e]-this.origin.left},e.prototype.getRightOffset=function(e){return this.ensureBuilt(),this.rights[e]},e.prototype.getRightPosition=function(e){return this.ensureBuilt(),this.rights[e]-this.origin.left},e.prototype.getWidth=function(e){return this.ensureBuilt(),this.rights[e]-this.lefts[e]},e.prototype.getTopOffset=function(e){return this.ensureBuilt(),this.tops[e]},e.prototype.getTopPosition=function(e){return this.ensureBuilt(),this.tops[e]-this.origin.top},e.prototype.getBottomOffset=function(e){return this.ensureBuilt(),this.bottoms[e]},e.prototype.getBottomPosition=function(e){return this.ensureBuilt(),this.bottoms[e]-this.origin.top},e.prototype.getHeight=function(e){return this.ensureBuilt(),this.bottoms[e]-this.tops[e]},e.prototype.queryBoundingRect=function(){var e;return this.els.length>0&&!(e=o.getScrollParent(this.els.eq(0))).is(document)?o.getClientRect(e):null},e.prototype.isPointInBounds=function(e,t){return this.isLeftInBounds(e)&&this.isTopInBounds(t)},e.prototype.isLeftInBounds=function(e){return!this.boundingRect||e>=this.boundingRect.left&&e<this.boundingRect.right},e.prototype.isTopInBounds=function(e){return!this.boundingRect||e>=this.boundingRect.top&&e<this.boundingRect.bottom},e}();t.default=r},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),o=n(4),r=n(7),s=n(21),a=function(){function e(e){this.isInteracting=!1,this.isDistanceSurpassed=!1,this.isDelayEnded=!1,this.isDragging=!1,this.isTouch=!1,this.isGeneric=!1,this.shouldCancelTouchScroll=!0,this.scrollAlwaysKills=!1,this.isAutoScroll=!1,this.scrollSensitivity=30,this.scrollSpeed=200,this.scrollIntervalMs=50,this.options=e||{}}return e.prototype.startInteraction=function(e,t){if(void 0===t&&(t={}),"mousedown"===e.type){if(s.default.get().shouldIgnoreMouse())return;if(!o.isPrimaryMouseButton(e))return;e.preventDefault()}this.isInteracting||(this.delay=o.firstDefined(t.delay,this.options.delay,0),this.minDistance=o.firstDefined(t.distance,this.options.distance,0),this.subjectEl=this.options.subjectEl,o.preventSelection(i("body")),this.isInteracting=!0,this.isTouch=o.getEvIsTouch(e),this.isGeneric="dragstart"===e.type,this.isDelayEnded=!1,this.isDistanceSurpassed=!1,this.originX=o.getEvX(e),this.originY=o.getEvY(e),this.scrollEl=o.getScrollParent(i(e.target)),this.bindHandlers(),this.initAutoScroll(),this.handleInteractionStart(e),this.startDelay(e),this.minDistance||this.handleDistanceSurpassed(e))},e.prototype.handleInteractionStart=function(e){this.trigger("interactionStart",e)},e.prototype.endInteraction=function(e,t){this.isInteracting&&(this.endDrag(e),this.delayTimeoutId&&(clearTimeout(this.delayTimeoutId),this.delayTimeoutId=null),this.destroyAutoScroll(),this.unbindHandlers(),this.isInteracting=!1,this.handleInteractionEnd(e,t),o.allowSelection(i("body")))},e.prototype.handleInteractionEnd=function(e,t){this.trigger("interactionEnd",e,t||!1)},e.prototype.bindHandlers=function(){var e=s.default.get();this.isGeneric?this.listenTo(i(document),{drag:this.handleMove,dragstop:this.endInteraction}):this.isTouch?this.listenTo(e,{touchmove:this.handleTouchMove,touchend:this.endInteraction,scroll:this.handleTouchScroll}):this.listenTo(e,{mousemove:this.handleMouseMove,mouseup:this.endInteraction}),this.listenTo(e,{selectstart:o.preventDefault,contextmenu:o.preventDefault})},e.prototype.unbindHandlers=function(){this.stopListeningTo(s.default.get()),this.stopListeningTo(i(document))},e.prototype.startDrag=function(e,t){this.startInteraction(e,t),this.isDragging||(this.isDragging=!0,this.handleDragStart(e))},e.prototype.handleDragStart=function(e){this.trigger("dragStart",e)},e.prototype.handleMove=function(e){var t=o.getEvX(e)-this.originX,n=o.getEvY(e)-this.originY,i=this.minDistance;this.isDistanceSurpassed||t*t+n*n>=i*i&&this.handleDistanceSurpassed(e),this.isDragging&&this.handleDrag(t,n,e)},e.prototype.handleDrag=function(e,t,n){this.trigger("drag",e,t,n),this.updateAutoScroll(n)},e.prototype.endDrag=function(e){this.isDragging&&(this.isDragging=!1,this.handleDragEnd(e))},e.prototype.handleDragEnd=function(e){this.trigger("dragEnd",e)},e.prototype.startDelay=function(e){var t=this;this.delay?this.delayTimeoutId=setTimeout(function(){t.handleDelayEnd(e)},this.delay):this.handleDelayEnd(e)},e.prototype.handleDelayEnd=function(e){this.isDelayEnded=!0,this.isDistanceSurpassed&&this.startDrag(e)},e.prototype.handleDistanceSurpassed=function(e){this.isDistanceSurpassed=!0,this.isDelayEnded&&this.startDrag(e)},e.prototype.handleTouchMove=function(e){this.isDragging&&this.shouldCancelTouchScroll&&e.preventDefault(),this.handleMove(e)},e.prototype.handleMouseMove=function(e){this.handleMove(e)},e.prototype.handleTouchScroll=function(e){this.isDragging&&!this.scrollAlwaysKills||this.endInteraction(e,!0)},e.prototype.trigger=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this.options[e]&&this.options[e].apply(this,t),this["_"+e]&&this["_"+e].apply(this,t)},e.prototype.initAutoScroll=function(){var e=this.scrollEl;
19this.isAutoScroll=this.options.scroll&&e&&!e.is(window)&&!e.is(document),this.isAutoScroll&&this.listenTo(e,"scroll",o.debounce(this.handleDebouncedScroll,100))},e.prototype.destroyAutoScroll=function(){this.endAutoScroll(),this.isAutoScroll&&this.stopListeningTo(this.scrollEl,"scroll")},e.prototype.computeScrollBounds=function(){this.isAutoScroll&&(this.scrollBounds=o.getOuterRect(this.scrollEl))},e.prototype.updateAutoScroll=function(e){var t,n,i,r,s=this.scrollSensitivity,a=this.scrollBounds,l=0,c=0;a&&(t=(s-(o.getEvY(e)-a.top))/s,n=(s-(a.bottom-o.getEvY(e)))/s,i=(s-(o.getEvX(e)-a.left))/s,r=(s-(a.right-o.getEvX(e)))/s,t>=0&&t<=1?l=t*this.scrollSpeed*-1:n>=0&&n<=1&&(l=n*this.scrollSpeed),i>=0&&i<=1?c=i*this.scrollSpeed*-1:r>=0&&r<=1&&(c=r*this.scrollSpeed)),this.setScrollVel(l,c)},e.prototype.setScrollVel=function(e,t){this.scrollTopVel=e,this.scrollLeftVel=t,this.constrainScrollVel(),!this.scrollTopVel&&!this.scrollLeftVel||this.scrollIntervalId||(this.scrollIntervalId=setInterval(o.proxy(this,"scrollIntervalFunc"),this.scrollIntervalMs))},e.prototype.constrainScrollVel=function(){var e=this.scrollEl;this.scrollTopVel<0?e.scrollTop()<=0&&(this.scrollTopVel=0):this.scrollTopVel>0&&e.scrollTop()+e[0].clientHeight>=e[0].scrollHeight&&(this.scrollTopVel=0),this.scrollLeftVel<0?e.scrollLeft()<=0&&(this.scrollLeftVel=0):this.scrollLeftVel>0&&e.scrollLeft()+e[0].clientWidth>=e[0].scrollWidth&&(this.scrollLeftVel=0)},e.prototype.scrollIntervalFunc=function(){var e=this.scrollEl,t=this.scrollIntervalMs/1e3;this.scrollTopVel&&e.scrollTop(e.scrollTop()+this.scrollTopVel*t),this.scrollLeftVel&&e.scrollLeft(e.scrollLeft()+this.scrollLeftVel*t),this.constrainScrollVel(),this.scrollTopVel||this.scrollLeftVel||this.endAutoScroll()},
20e.prototype.endAutoScroll=function(){this.scrollIntervalId&&(clearInterval(this.scrollIntervalId),this.scrollIntervalId=null,this.handleScrollEnd())},e.prototype.handleDebouncedScroll=function(){this.scrollIntervalId||this.handleScrollEnd()},e.prototype.handleScrollEnd=function(){},e}();t.default=a,r.default.mixInto(a)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),o=n(4),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.prototype.updateDayTable=function(){for(var e,t,n,i=this,o=i.view,r=o.calendar,s=r.msToUtcMoment(i.dateProfile.renderUnzonedRange.startMs,!0),a=r.msToUtcMoment(i.dateProfile.renderUnzonedRange.endMs,!0),l=-1,c=[],d=[];s.isBefore(a);)o.isHiddenDay(s)?c.push(l+.5):(l++,c.push(l),d.push(s.clone())),s.add(1,"days");if(this.breakOnWeeks){for(t=d[0].day(),e=1;e<d.length&&d[e].day()!==t;e++);n=Math.ceil(d.length/e)}else n=1,e=d.length;this.dayDates=d,this.dayIndices=c,this.daysPerRow=e,this.rowCnt=n,this.updateDayTableCols()},t.prototype.updateDayTableCols=function(){this.colCnt=this.computeColCnt(),this.colHeadFormat=this.opt("columnHeaderFormat")||this.opt("columnFormat")||this.computeColHeadFormat()},t.prototype.computeColCnt=function(){return this.daysPerRow},t.prototype.getCellDate=function(e,t){return this.dayDates[this.getCellDayIndex(e,t)].clone()},t.prototype.getCellRange=function(e,t){var n=this.getCellDate(e,t),i=n.clone().add(1,"days");return{start:n,end:i}},t.prototype.getCellDayIndex=function(e,t){return e*this.daysPerRow+this.getColDayIndex(t)},t.prototype.getColDayIndex=function(e){return this.isRTL?this.colCnt-1-e:e},t.prototype.getDateDayIndex=function(e){var t=this.dayIndices,n=e.diff(this.dayDates[0],"days");return n<0?t[0]-1:n>=t.length?t[t.length-1]+1:t[n]},t.prototype.computeColHeadFormat=function(){return this.rowCnt>1||this.colCnt>10?"ddd":this.colCnt>1?this.opt("dayOfMonthFormat"):"dddd"},t.prototype.sliceRangeByRow=function(e){var t,n,i,o,r,s=this.daysPerRow,a=this.view.computeDayRange(e),l=this.getDateDayIndex(a.start),c=this.getDateDayIndex(a.end.clone().subtract(1,"days")),d=[];for(t=0;t<this.rowCnt;t++)i=(n=t*s)+s-1,o=Math.max(l,n),r=Math.min(c,i),(o=Math.ceil(o))<=(r=Math.floor(r))&&d.push({row:t,firstRowDayIndex:o-n,lastRowDayIndex:r-n,isStart:o===l,isEnd:r===c});return d},t.prototype.sliceRangeByDay=function(e){var t,n,i,o,r,s,a=this.daysPerRow,l=this.view.computeDayRange(e),c=this.getDateDayIndex(l.start),d=this.getDateDayIndex(l.end.clone().subtract(1,"days")),u=[];for(t=0;t<this.rowCnt;t++)for(i=(n=t*a)+a-1,o=n;o<=i;
20o++)r=Math.max(c,o),s=Math.min(d,o),(r=Math.ceil(r))<=(s=Math.floor(s))&&u.push({row:t,firstRowDayIndex:r-n,lastRowDayIndex:s-n,isStart:r===c,isEnd:s===d});return u},t.prototype.renderHeadHtml=function(){var e=this.view.calendar.theme;return'<div class="fc-row '+e.getClass("headerRow")+'"><table class="'+e.getClass("tableGrid")+'"><thead>'+this.renderHeadTrHtml()+"</thead></table></div>"},t.prototype.renderHeadIntroHtml=function(){return this.renderIntroHtml()},t.prototype.renderHeadTrHtml=function(){return"<tr>"+(this.isRTL?"":this.renderHeadIntroHtml())+this.renderHeadDateCellsHtml()+(this.isRTL?this.renderHeadIntroHtml():"")+"</tr>"},t.prototype.renderHeadDateCellsHtml=function(){var e,t,n=[];for(e=0;e<this.colCnt;e++)t=this.getCellDate(0,e),n.push(this.renderHeadDateCellHtml(t));return n.join("")},t.prototype.renderHeadDateCellHtml=function(e,t,n){var i,r=this,s=r.view,a=r.dateProfile.activeUnzonedRange.containsDate(e),l=["fc-day-header",s.calendar.theme.getClass("widgetHeader")];return i="function"==typeof r.opt("columnHeaderHtml")?r.opt("columnHeaderHtml")(e):"function"==typeof r.opt("columnHeaderText")?o.htmlEscape(r.opt("columnHeaderText")(e)):o.htmlEscape(e.format(r.colHeadFormat)),1===r.rowCnt?l=l.concat(r.getDayClasses(e,!0)):l.push("fc-"+o.dayIDs[e.day()]),'<th class="'+l.join(" ")+'"'+(1===(a&&r.rowCnt)?' data-date="'+e.format("YYYY-MM-DD")+'"':"")+(t>1?' colspan="'+t+'"':"")+(n?" "+n:"")+">"+(a?s.buildGotoAnchorHtml({date:e,forceOff:r.rowCnt>1||1===r.colCnt},i):i)+"</th>"},t.prototype.renderBgTrHtml=function(e){return"<tr>"+(this.isRTL?"":this.renderBgIntroHtml(e))+this.renderBgCellsHtml(e)+(this.isRTL?this.renderBgIntroHtml(e):"")+"</tr>"},t.prototype.renderBgIntroHtml=function(){return this.renderIntroHtml()},t.prototype.renderBgCellsHtml=function(e){var t,n,i=[];for(t=0;t<this.colCnt;t++)n=this.getCellDate(e,t),i.push(this.renderBgCellHtml(n));return i.join("")},t.prototype.renderBgCellHtml=function(e,t){var n=this,i=n.view,o=n.dateProfile.activeUnzonedRange.containsDate(e),r=n.getDayClasses(e);return r.unshift("fc-day",i.calendar.theme.getClass("widgetContent")),'<td class="'+r.join(" ")+'"'+(o?' data-date="'+e.format("YYYY-MM-DD")+'"':"")+(t?" "+t:"")+"></td>"},t.prototype.renderIntroHtml=function(){},t.prototype.bookendCells=function(e){var t=this.renderIntroHtml();t&&(this.isRTL?e.append(t):e.prepend(t))},t}(n(14).default);t.default=r},function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){this.component=e,this.fillRenderer=t}return e.prototype.render=function(e){var t=this.component,n=t._getDateProfile().activeUnzonedRange,i=e.buildEventInstanceGroup(t.hasAllDayBusinessHours,n),o=i?t.eventRangesToEventFootprints(i.sliceRenderRanges(n)):[];this.renderEventFootprints(o)},e.prototype.renderEventFootprints=function(e){var t=this.component.eventFootprintsToSegs(e);this.renderSegs(t),this.segs=t},e.prototype.renderSegs=function(e){this.fillRenderer&&this.fillRenderer.renderSegs("businessHours",e,{getClasses:function(){return["fc-nonbusiness","fc-bgevent"]}})},e.prototype.unrender=function(){this.fillRenderer&&this.fillRenderer.unrender("businessHours"),this.segs=null},e.prototype.getSegs=function(){return this.segs||[]},e}();t.default=n},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),o=n(4),r=function(){function e(e){this.fillSegTag="div",this.component=e,this.elsByFill={}}return e.prototype.renderFootprint=function(e,t,n){this.renderSegs(e,this.component.componentFootprintToSegs(t),n)},e.prototype.renderSegs=function(e,t,n){var i;return t=this.buildSegEls(e,t,n),(i=this.attachSegEls(e,t))&&this.reportEls(e,i),t},e.prototype.unrender=function(e){var t=this.elsByFill[e];t&&(t.remove(),delete this.elsByFill[e])},e.prototype.buildSegEls=function(e,t,n){var o,r=this,s="",a=[];if(t.length){for(o=0;o<t.length;o++)s+=this.buildSegHtml(e,t[o],n);i(s).each(function(e,o){var s=t[e],l=i(o);n.filterEl&&(l=n.filterEl(s,l)),l&&(l=i(l)).is(r.fillSegTag)&&(s.el=l,a.push(s))})}return a},e.prototype.buildSegHtml=function(e,t,n){var i=n.getClasses?n.getClasses(t):[],r=o.cssToStr(n.getCss?n.getCss(t):{});return"<"+this.fillSegTag+(i.length?' class="'+i.join(" ")+'"':"")+(r?' style="'+r+'"':"")+" />"},e.prototype.attachSegEls=function(){},e.prototype.reportEls=function(e,t){this.elsByFill[e]?this.elsByFill[e]=this.elsByFill[e].add(t):this.elsByFill[e]=i(t)},e}();t.default=r}
20,function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(13),o=n(36),r=n(6),s=function(){function e(e,t){this.view=e._getView(),this.component=e,this.eventRenderer=t}return e.prototype.renderComponentFootprint=function(e){this.renderEventFootprints([this.fabricateEventFootprint(e)])},e.prototype.renderEventDraggingFootprints=function(e,t,n){this.renderEventFootprints(e,t,"fc-dragging",n?null:this.view.opt("dragOpacity"))},e.prototype.renderEventResizingFootprints=function(e,t){this.renderEventFootprints(e,t,"fc-resizing")},e.prototype.renderEventFootprints=function(e,t,n,i){var o,r=this.component.eventFootprintsToSegs(e),s="fc-helper "+(n||"");for(r=this.eventRenderer.renderFgSegEls(r),o=0;o<r.length;o++)r[o].el.addClass(s);if(null!=i)for(o=0;o<r.length;o++)r[o].el.css("opacity",i);this.helperEls=this.renderSegs(r,t)},e.prototype.renderSegs=function(){},e.prototype.unrender=function(){this.helperEls&&(this.helperEls.remove(),this.helperEls=null)},e.prototype.fabricateEventFootprint=function(e){var t,n=this.view.calendar,s=n.footprintToDateProfile(e),a=new i.default(new r.default(n));return a.dateProfile=s,t=a.buildInstance(),new o.default(e,a,t)},e}();t.default=s},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),o=n(21),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.prototype.bindToEl=function(e){var t=this.component;t.bindSegHandlerToEl(e,"click",this.handleClick.bind(this)),t.bindSegHandlerToEl(e,"mouseenter",this.handleMouseover.bind(this)),t.bindSegHandlerToEl(e,"mouseleave",this.handleMouseout.bind(this))},t.prototype.handleClick=function(e,t){!1===this.component.publiclyTrigger("eventClick",{context:e.el[0],args:[e.footprint.getEventLegacy(),t,this.view]})&&t.preventDefault()},t.prototype.handleMouseover=function(e,t){o.default.get().shouldIgnoreMouse()||this.mousedOverSeg||(this.mousedOverSeg=e,this.view.isEventDefResizable(e.footprint.eventDef)&&e.el.addClass("fc-allow-mouse-resize"),this.component.publiclyTrigger("eventMouseover",{context:e.el[0],args:[e.footprint.getEventLegacy(),t,this.view]}))},t.prototype.handleMouseout=function(e,t){this.mousedOverSeg&&(this.mousedOverSeg=null,this.view.isEventDefResizable(e.footprint.eventDef)&&e.el.removeClass("fc-allow-mouse-resize"),this.component.publiclyTrigger("eventMouseout",{context:e.el[0],args:[e.footprint.getEventLegacy(),t||{},this.view]}))},t.prototype.end=function(){this.mousedOverSeg&&this.handleMouseout(this.mousedOverSeg)},t}(n(15).default);t.default=r},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),o=n(14),r=n(245),s=n(225),a=n(59),l=n(224),c=n(223),d=n(222),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t}(o.default);t.default=u,u.prototype.dateClickingClass=r.default,u.prototype.dateSelectingClass=s.default,u.prototype.eventPointingClass=a.default,u.prototype.eventDraggingClass=l.default,u.prototype.eventResizingClass=c.default,u.prototype.externalDroppingClass=d.default},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),o=n(3),r=n(4),s=n(53),a=n(249),l=n(5),c=n(12),d=n(36),u=n(56),h=n(60),p=n(40),f=n(55),m=n(250),g=n(251),v=n(252),y=function(e){function t(t){var n=e.call(this,t)||this;return n.cellWeekNumbersVisible=!1,n.bottomCoordPadding=0,n.isRigid=!1,n.hasAllDayBusinessHours=!0,n}return i.__extends(t,e),t.prototype.componentFootprintToSegs=function(e){var t,n,i=this.sliceRangeByRow(e.unzonedRange);for(t=0;t<i.length;t++)n=i[t],this.isRTL?(n.leftCol=this.daysPerRow-1-n.lastRowDayIndex,n.rightCol=this.daysPerRow-1-n.firstRowDayIndex):(n.leftCol=n.firstRowDayIndex,n.rightCol=n.lastRowDayIndex);return i},t.prototype.renderDates=function(e){this.dateProfile=e,this.updateDayTable(),this.renderGrid()},t.prototype.unrenderDates=function(){this.removeSegPopover()},t.prototype.renderGrid=function(){var e,t,n=this.view,i=this.rowCnt,o=this.colCnt,r="";for(this.headContainerEl&&this.headContainerEl.html(this.renderHeadHtml()),e=0;e<i;e++)r+=this.renderDayRowHtml(e,this.isRigid);for(this.el.html(r),this.rowEls=this.el.find(".fc-row"),this.cellEls=this.el.find(".fc-day, .fc-disabled-day"),this.rowCoordCache=new s.default({els:this.rowEls,isVertical:!0}),this.colCoordCache=new s.default({els:this.cellEls.slice(0,this.colCnt),isHorizontal:!0}),e=0;e<i;e++)for(t=0;t<o;t++)this.publiclyTrigger("dayRender",{context:n,args:[this.getCellDate(e,t),this.getCellEl(e,t),n]})},t.prototype.renderDayRowHtml=function(e,t){var n=this.view.calendar.theme,i=["fc-row","fc-week",n.getClass("dayRow")];return t&&i.push("fc-rigid"),'<div class="'+i.join(" ")+'"><div class="fc-bg"><table class="'+n.getClass("tableGrid")+'">'+this.renderBgTrHtml(e)+'</table></div><div class="fc-content-skeleton"><table>'+(this.getIsNumbersVisible()?"<thead>"+this.renderNumberTrHtml(e)+"</thead>":"")+"</table></div></div>"},t.prototype.getIsNumbersVisible=function(){return this.getIsDayNumbersVisible()||this.cellWeekNumbersVisible},t.prototype.getIsDayNumbersVisible=function(){return this.rowCnt>1},t.prototype.renderNumberTrHtml=function(e){return"<tr>"+(this.isRTL?"":this.renderNumberIntroHtml(e))+this.renderNumberCellsHtml(e)+(this.isRTL?this.renderNumberIntroHtml(e):"")+"</tr>"},t.prototype.renderNumberIntroHtml=function(){return this.renderIntroHtml()},t.prototype.renderNumberCellsHtml=function(e){var t,n,i=[];for(t=0;t<this.colCnt;t++)n=this.getCellDate(e,t),i.push(this.renderNumberCellHtml(n));return i.join("")},t.prototype.renderNumberCellHtml=function(e){var t,n,i=this.view,o="",r=this.dateProfile.activeUnzonedRange.containsDate(e),s=this.getIsDayNumbersVisible()&&r;return s||this.cellWeekNumbersVisible?((t=this.getDayClasses(e)).unshift("fc-day-top"),this.cellWeekNumbersVisible&&(n="ISO"===e._locale._fullCalendar_weekCalc?1:e._locale.firstDayOfWeek()),o+='<td class="'+t.join(" ")+'"'+(r?' data-date="'+e.format()+'"':"")+">",this.cellWeekNumbersVisible&&e.day()===n&&(o+=i.buildGotoAnchorHtml({date:e,type:"week"},{class:"fc-week-number"},e.format("w"))),s&&(o+=i.buildGotoAnchorHtml(e,{class:"fc-day-number"},e.format("D"))),o+="</td>"):"<td/>"},t.prototype.prepareHits=function(){this.colCoordCache.build(),this.rowCoordCache.build(),this.rowCoordCache.bottoms[this.rowCnt-1]+=this.bottomCoordPadding},t.prototype.releaseHits=function(){this.colCoordCache.clear(),this.rowCoordCache.clear()},t.prototype.queryHit=function(e,t){if(this.colCoordCache.isLeftInBounds(e)&&this.rowCoordCache.isTopInBounds(t)){var n=this.colCoordCache.getHorizontalIndex(e),i=this.rowCoordCache.getVerticalIndex(t);if(null!=i&&null!=n)return this.getCellHit(i,n)}},t.prototype.getHitFootprint=function(e){var t=this.getCellRange(e.row,e.col);
20return new c.default(new l.default(t.start,t.end),!0)},t.prototype.getHitEl=function(e){return this.getCellEl(e.row,e.col)},t.prototype.getCellHit=function(e,t){return{row:e,col:t,component:this,left:this.colCoordCache.getLeftOffset(t),right:this.colCoordCache.getRightOffset(t),top:this.rowCoordCache.getTopOffset(e),bottom:this.rowCoordCache.getBottomOffset(e)}},t.prototype.getCellEl=function(e,t){return this.cellEls.eq(e*this.colCnt+t)},t.prototype.executeEventUnrender=function(){this.removeSegPopover(),e.prototype.executeEventUnrender.call(this)},t.prototype.getOwnEventSegs=function(){return e.prototype.getOwnEventSegs.call(this).concat(this.popoverSegs||[])},t.prototype.renderDrag=function(e,t,n){var i;for(i=0;i<e.length;i++)this.renderHighlight(e[i].componentFootprint);if(e.length&&t&&t.component!==this)return this.helperRenderer.renderEventDraggingFootprints(e,t,n),!0},t.prototype.unrenderDrag=function(){this.unrenderHighlight(),this.helperRenderer.unrender()},t.prototype.renderEventResize=function(e,t,n){var i;for(i=0;i<e.length;i++)this.renderHighlight(e[i].componentFootprint);this.helperRenderer.renderEventResizingFootprints(e,t,n)},t.prototype.unrenderEventResize=function(){this.unrenderHighlight(),this.helperRenderer.unrender()},t.prototype.removeSegPopover=function(){this.segPopover&&this.segPopover.hide()},t.prototype.limitRows=function(e){var t,n,i=this.eventRenderer.rowStructs||[];for(t=0;t<i.length;t++)this.unlimitRow(t),!1!==(n=!!e&&("number"==typeof e?e:this.computeRowLevelLimit(t)))&&this.limitRow(t,n)},t.prototype.computeRowLevelLimit=function(e){function t(e,t){r=Math.max(r,o(t).outerHeight())}var n,i,r,s=this.rowEls.eq(e).height(),a=this.eventRenderer.rowStructs[e].tbodyEl.children();for(n=0;n<a.length;n++)if(i=a.eq(n).removeClass("fc-limited"),r=0,i.find("> td > :first-child").each(t),i.position().top+r>s)return n;return!1},t.prototype.limitRow=function(e,t){var n,i,r,s,a,l,c,d,u,h,p,f,m,g,v,y=this,b=this.eventRenderer.rowStructs[e],_=[],w=0,C=function(n){for(;w<n;)(l=y.getCellSegs(e,w,t)).length&&(u=i[t-1][w],v=y.renderMoreLink(e,w,l),g=o("<div/>").append(v),u.append(g),_.push(g[0])),w++};if(t&&t<b.segLevels.length){for(n=b.segLevels[t-1],i=b.cellMatrix,r=b.tbodyEl.children().slice(t).addClass("fc-limited").get(),s=0;s<n.length;s++){for(C((a=n[s]).leftCol),d=[],c=0;w<=a.rightCol;)l=this.getCellSegs(e,w,t),d.push(l),c+=l.length,w++;if(c){for(h=(u=i[t-1][a.leftCol]).attr("rowspan")||1,p=[],f=0;f<d.length;f++)m=o('<td class="fc-more-cell"/>').attr("rowspan",h),l=d[f],v=this.renderMoreLink(e,a.leftCol+f,[a].concat(l)),g=o("<div/>").append(v),m.append(g),p.push(m[0]),_.push(m[0]);u.addClass("fc-limited").after(o(p)),r.push(u[0])}}C(this.colCnt),b.moreEls=o(_),b.limitedEls=o(r)}},t.prototype.unlimitRow=function(e){var t=this.eventRenderer.rowStructs[e];t.moreEls&&(t.moreEls.remove(),t.moreEls=null),t.limitedEls&&(t.limitedEls.removeClass("fc-limited"),t.limitedEls=null)},t.prototype.renderMoreLink=function(e,t,n){var i=this,r=this.view;return o('<a class="fc-more"/>').text(this.getMoreLinkText(n.length)).on("click",function(s){var a=i.opt("eventLimitClick"),l=i.getCellDate(e,t),c=o(s.currentTarget),d=i.getCellEl(e,t),u=i.getCellSegs(e,t),h=i.resliceDaySegs(u,l),p=i.resliceDaySegs(n,l);"function"==typeof a&&(a=i.publiclyTrigger("eventLimitClick",{context:r,args:[{date:l.clone(),dayEl:d,moreEl:c,segs:h,hiddenSegs:p},s,r]})),"popover"===a?i.showSegPopover(e,t,c,h):"string"==typeof a&&r.calendar.zoomTo(l,a)})},t.prototype.showSegPopover=function(e,t,n,i){var o,r,s=this,l=this.view,c=n.parent();o=1===this.rowCnt?l.el:this.rowEls.eq(e),r={className:"fc-more-popover "+l.calendar.theme.getClass("popover"),content:this.renderSegPopoverContent(e,t,i),parentEl:l.el,top:o.offset().top,autoHide:!0,viewportConstrain:this.opt("popoverViewportConstrain"),hide:function(){s.popoverSegs&&s.triggerBeforeEventSegsDestroyed(s.popoverSegs),s.segPopover.removeElement(),s.segPopover=null,s.popoverSegs=null}},this.isRTL?r.right=c.offset().left+c.outerWidth()+1:r.left=c.offset().left-1,this.segPopover=new a.default(r),this.segPopover.show(),this.bindAllSegHandlersToEl(this.segPopover.el),this.triggerAfterEventSegsRendered(i)},t.prototype.renderSegPopoverContent=function(e,t,n){var i,s=this.view.calendar.theme,a=this.getCellDate(e,t).format(this.opt("dayPopoverFormat")),l=o('<div class="fc-header '+s.getClass("popoverHeader")+'"><span class="fc-close '+s.getIconClass("close")+'"></span><span class="fc-title">'+r.htmlEscape(a)+'</span><div class="fc-clear"/></div><div class="fc-body '+s.getClass("popoverContent")+'"><div class="fc-event-container"></div></div>
20'),c=l.find(".fc-event-container");for(n=this.eventRenderer.renderFgSegEls(n,!0),this.popoverSegs=n,i=0;i<n.length;i++)this.hitsNeeded(),n[i].hit=this.getCellHit(e,t),this.hitsNotNeeded(),c.append(n[i].el);return l},t.prototype.resliceDaySegs=function(e,t){var n,i,r,s=t.clone(),a=s.clone().add(1,"days"),u=new l.default(s,a),h=[];for(n=0;n<e.length;n++)(r=(i=e[n]).footprint.componentFootprint.unzonedRange.intersect(u))&&h.push(o.extend({},i,{footprint:new d.default(new c.default(r,i.footprint.componentFootprint.isAllDay),i.footprint.eventDef,i.footprint.eventInstance),isStart:i.isStart&&r.isStart,isEnd:i.isEnd&&r.isEnd}));return this.eventRenderer.sortEventSegs(h),h},t.prototype.getMoreLinkText=function(e){var t=this.opt("eventLimitText");return"function"==typeof t?t(e):"+"+e+" "+t},t.prototype.getCellSegs=function(e,t,n){for(var i,o=this.eventRenderer.rowStructs[e].segMatrix,r=n||0,s=[];r<o.length;)(i=o[r][t])&&s.push(i),r++;return s},t}(p.default);t.default=y,y.prototype.eventRendererClass=m.default,y.prototype.businessHourRendererClass=u.default,y.prototype.helperRendererClass=g.default,y.prototype.fillRendererClass=v.default,h.default.mixInto(y),f.default.mixInto(y)},function(e,t,n){function i(e){return function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.colWeekNumbersVisible=!1,t}return o.__extends(t,e),t.prototype.renderHeadIntroHtml=function(){var e=this.view;return this.colWeekNumbersVisible?'<th class="fc-week-number '+e.calendar.theme.getClass("widgetHeader")+'" '+e.weekNumberStyleAttr()+"><span>"+s.htmlEscape(this.opt("weekNumberTitle"))+"</span></th>":""},t.prototype.renderNumberIntroHtml=function(e){var t=this.view,n=this.getCellDate(e,0);return this.colWeekNumbersVisible?'<td class="fc-week-number" '+t.weekNumberStyleAttr()+">"+t.buildGotoAnchorHtml({date:n,type:"week",forceOff:1===this.colCnt},n.format("w"))+"</td>":""},t.prototype.renderBgIntroHtml=function(){var e=this.view;return this.colWeekNumbersVisible?'<td class="fc-week-number '+e.calendar.theme.getClass("widgetContent")+'" '+e.weekNumberStyleAttr()+"></td>":""},t.prototype.renderIntroHtml=function(){var e=this.view;return this.colWeekNumbersVisible?'<td class="fc-week-number" '+e.weekNumberStyleAttr()+"></td>":""},t.prototype.getIsNumbersVisible=function(){return d.default.prototype.getIsNumbersVisible.apply(this,arguments)||this.colWeekNumbersVisible},t}(e)}Object.defineProperty(t,"__esModule",{value:!0});var o=n(2),r=n(3),s=n(4),a=n(39),l=n(41),c=n(228),d=n(61),u=function(e){function t(t,n){var i=e.call(this,t,n)||this;return i.dayGrid=i.instantiateDayGrid(),i.dayGrid.isRigid=i.hasRigidRows(),i.opt("weekNumbers")&&(i.opt("weekNumbersWithinDays")?(i.dayGrid.cellWeekNumbersVisible=!0,i.dayGrid.colWeekNumbersVisible=!1):(i.dayGrid.cellWeekNumbersVisible=!1,i.dayGrid.colWeekNumbersVisible=!0)),i.addChild(i.dayGrid),i.scroller=new a.default({overflowX:"hidden",overflowY:"auto"}),i}return o.__extends(t,e),t.prototype.instantiateDayGrid=function(){return new(i(this.dayGridClass))(this)},t.prototype.executeDateRender=function(t){this.dayGrid.breakOnWeeks=/year|month|week/.test(t.currentRangeUnit),e.prototype.executeDateRender.call(this,t)},t.prototype.renderSkeleton=function(){var e,t;this.el.addClass("fc-basic-view").html(this.renderSkeletonHtml()),this.scroller.render(),e=this.scroller.el.addClass("fc-day-grid-container"),t=r('<div class="fc-day-grid" />').appendTo(e),this.el.find(".fc-body > tr > td").append(e),this.dayGrid.headContainerEl=this.el.find(".fc-head-container"),this.dayGrid.setElement(t)},t.prototype.unrenderSkeleton=function(){this.dayGrid.removeElement(),this.scroller.destroy()},t.prototype.renderSkeletonHtml=function(){var e=this.calendar.theme;return'<table class="'+e.getClass("tableGrid")+'">'+(this.opt("columnHeader")?'<thead class="fc-head"><tr><td class="fc-head-container '+e.getClass("widgetHeader")+'">&nbsp;</td></tr></thead>':"")+'<tbody class="fc-body"><tr><td class="'+e.getClass("widgetContent")+'"></td></tr></tbody></table>'},t.prototype.weekNumberStyleAttr=function(){return null!=this.weekNumberWidth?'style="width:'+this.weekNumberWidth+'px"':""},t.prototype.hasRigidRows=function(){var e=this.opt("eventLimit");return e&&"number"!=typeof e},t.prototype.updateSize=function(t,n,i){var o,r,a=this.opt("eventLimit"),l=this.dayGrid.headContainerEl.find(".fc-row");this.dayGrid.rowEls?(e.prototype.updateSize.call(this,t,n,i),this.dayGrid.colWeekNumbersVisible&&(this.weekNumberWidth=s.matchCellWidths(this.el.find(".fc-week-number"))),this.scroller.clear(),s.uncompensateScroll(l),this.dayGrid.removeSegPopover(),a&&"number"==typeof a&&this.dayGrid.limitRows(a),o=this.computeScrollerHeight(t),this.setGridHeight(o,n),a&&"number"!=typeof a&&this.dayGrid.limitRows(a),n||(this.scroller.setHeight(o),((r=this.scroller.getScrollbarWidths()).left||r.right)&&(s.compensateScroll(l,r),o=this.computeScrollerHeight(t),this.scroller.setHeight(o)),this.scroller.lockOverflow(r))):n||(o=this.computeScrollerHeight(t),this.scroller.setHeight(o))},t.prototype.computeScrollerHeight=function(e){return e-s.subtractInnerElHe
20ight(this.el,this.scroller.el)},t.prototype.setGridHeight=function(e,t){t?s.undistributeHeight(this.dayGrid.rowEls):s.distributeHeight(this.dayGrid.rowEls,e,!0)},t.prototype.computeInitialDateScroll=function(){return{top:0}},t.prototype.queryDateScroll=function(){return{top:this.scroller.getScrollTop()}},t.prototype.applyDateScroll=function(e){void 0!==e.top&&this.scroller.setScrollTop(e.top)},t}(l.default);t.default=u,u.prototype.dateProfileGeneratorClass=c.default,u.prototype.dayGridClass=d.default},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){function i(e,t,n){var i;for(i=0;i<e.length;i++)if(!t(e[i].eventInstance.toLegacy(),n?n.toLegacy():null))return!1;return!0}function o(e,t){var n,i,o,r=t.toLegacy();for(n=0;n<e.length;n++){if(!1===(o=(i=e[n].eventInstance).def.getOverlap()))return!1;if("function"==typeof o&&!o(i.toLegacy(),r))return!1}return!0}Object.defineProperty(t,"__esModule",{value:!0});var r=n(5),s=n(12),a=n(49),l=n(6),c=n(35),d=function(){function e(e,t){this.eventManager=e,this._calendar=t}return e.prototype.opt=function(e){return this._calendar.opt(e)},e.prototype.isEventInstanceGroupAllowed=function(e){var t,n=e.getEventDef(),i=this.eventRangesToEventFootprints(e.getAllEventRanges()),o=this.getPeerEventInstances(n).map(c.eventInstanceToEventRange),r=this.eventRangesToEventFootprints(o),s=n.getConstraint(),a=n.getOverlap(),l=this.opt("eventAllow");for(t=0;t<i.length;t++)if(!this.isFootprintAllowed(i[t].componentFootprint,r,s,a,i[t].eventInstance))return!1;if(l)for(t=0;t<i.length;t++)if(!1===l(i[t].componentFootprint.toLegacy(this._calendar),i[t].getEventLegacy()))return!1;return!0},e.prototype.getPeerEventInstances=function(e){return this.eventManager.getEventInstancesWithoutId(e.id)},e.prototype.isSelectionFootprintAllowed=function(e){var t,n=this.eventManager.getEventInstances().map(c.eventInstanceToEventRange),i=this.eventRangesToEventFootprints(n);return!!this.isFootprintAllowed(e,i,this.opt("selectConstraint"),this.opt("selectOverlap"))&&(!(t=this.opt("selectAllow"))||!1!==t(e.toLegacy(this._calendar)))},e.prototype.isFootprintAllowed=function(e,t,n,r,s){var a,l;if(null!=n&&(a=this.constraintValToFootprints(n,e.isAllDay),!this.isFootprintWithinConstraints(e,a))
20)return!1;if(l=this.collectOverlapEventFootprints(t,e),!1===r){if(l.length)return!1}else if("function"==typeof r&&!i(l,r,s))return!1;return!(s&&!o(l,s))},e.prototype.isFootprintWithinConstraints=function(e,t){var n;for(n=0;n<t.length;n++)if(this.footprintContainsFootprint(t[n],e))return!0;return!1},e.prototype.constraintValToFootprints=function(e,t){var n;return"businessHours"===e?this.buildCurrentBusinessFootprints(t):"object"==typeof e?(n=this.parseEventDefToInstances(e))?this.eventInstancesToFootprints(n):this.parseFootprints(e):null!=e?(n=this.eventManager.getEventInstancesWithId(e),this.eventInstancesToFootprints(n)):void 0},e.prototype.buildCurrentBusinessFootprints=function(e){var t=this._calendar.view,n=t.get("businessHourGenerator"),i=t.dateProfile.activeUnzonedRange,o=n.buildEventInstanceGroup(e,i);return o?this.eventInstancesToFootprints(o.eventInstances):[]},e.prototype.eventInstancesToFootprints=function(e){var t=e.map(c.eventInstanceToEventRange);return this.eventRangesToEventFootprints(t).map(c.eventFootprintToComponentFootprint)},e.prototype.collectOverlapEventFootprints=function(e,t){var n,i=[];for(n=0;n<e.length;n++)this.footprintsIntersect(t,e[n].componentFootprint)&&i.push(e[n]);return i},e.prototype.parseEventDefToInstances=function(e){var t=this.eventManager,n=a.default.parse(e,new l.default(this._calendar));return!!n&&n.buildInstances(t.currentPeriod.unzonedRange)},e.prototype.eventRangesToEventFootprints=function(e){var t,n=[];for(t=0;t<e.length;t++)n.push.apply(n,this.eventRangeToEventFootprints(e[t]));return n},e.prototype.eventRangeToEventFootprints=function(e){return[c.eventRangeToEventFootprint(e)]},e.prototype.parseFootprints=function(e){var t,n;return e.start&&((t=this._calendar.moment(e.start)).isValid()||(t=null)),e.end&&((n=this._calendar.moment(e.end)).isValid()||(n=null)),[new s.default(new r.default(t,n),t&&!t.hasTime()||n&&!n.hasTime())]},e.prototype.footprintContainsFootprint=function(e,t){return e.unzonedRange.containsRange(t.unzonedRange)},e.prototype.footprintsIntersect=function(e,t){return e.unzonedRange.intersectsWith(t.unzonedRange)},e}();t.default=d},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),o=n(4),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.defineStandardProps=function(e){var t=this.prototype;t.hasOwnProperty("standardPropMap")||(t.standardPropMap=Object.create(t.standardPropMap)),o.copyOwnProps(e,t.standardPropMap)},t.copyVerbatimStandardProps=function(e,t){var n,i=this.prototype.standardPropMap;for(n in i)null!=e[n]&&!0===i[n]&&(t[n]=e[n])},t.prototype.applyProps=function(e){var t,n=this.standardPropMap,i={},o={};for(t in e)!0===n[t]?this[t]=e[t]:!1===n[t]?i[t]=e[t]:o[t]=e[t];return this.applyMiscProps(o),this.applyManualStandardProps(i)},t.prototype.applyManualStandardProps=function(){return!0},t.prototype.applyMiscProps=function(){},t.prototype.isStandardProp=function(e){return e in this.standardPropMap},t}(n(14).default);t.default=r,r.prototype.standardPropMap={}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){this.def=e,this.dateProfile=t}return e.prototype.toLegacy=function(){var e=this.dateProfile,t=this.def.toLegacy();return t.start=e.start.clone(),t.end=e.end?e.end.clone():null,t},e}();t.default=n},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),o=n(3),r=n(0),s=n(34),a=n(209),l=n(17),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.prototype.isAllDay=function(){return!this.startTime&&!this.endTime},t.prototype.buildInstances=function(e){for(var t,n,i,o=this.source.calendar,r=e.getStart(),s=e.getEnd(),c=[];r.isBefore(s);)this.dowHash&&!this.dowHash[r.day()]||(n=(t=o.applyTimezone(r)).clone(),i=null,this.startTime?n.time(this.startTime):n.stripTime(),this.endTime&&(i=t.clone().time(this.endTime)),c.push(new a.default(this,new l.default(n,i,o)))),r.add(1,"days");return c},t.prototype.setDow=function(e){this.dowHash||(this.dowHash={});for(var t=0;t<e.length;t++)this.dowHash[e[t]]=!0},t.prototype.clone=function(){var t=e.prototype.clone.call(this);return t.startTime&&(t.startTime=r.duration(this.startTime)),t.endTime&&(t.endTime=r.duration(this.endTime)),this.dowHash&&(t.dowHash=o.extend({},this.dowHash)),t},t}(s.default);t.default=c,c.prototype.applyProps=function(e){var t=s.default.prototype.applyProps.call(this,e);return e.start&&(this.startTime=r.duration(e.start)),e.end&&(this.endTime=r.duration(e.end)),e.dow&&this.setDow(e.dow),t},c.defineStandardProps({start:!1,end:!1,dow:!1})}
20,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t,n){this.unzonedRange=e,this.eventDef=t,n&&(this.eventInstance=n)}return e}();t.default=n},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),o=n(35),r=n(18),s=n(210),a=n(6),l={start:"09:00",end:"17:00",dow:[1,2,3,4,5],rendering:"inverse-background"},c=function(){function e(e,t){this.rawComplexDef=e,this.calendar=t}return e.prototype.buildEventInstanceGroup=function(e,t){var n,i=this.buildEventDefs(e);if(i.length)return(n=new r.default(o.eventDefsToEventInstances(i,t))).explicitEventDef=i[0],n},e.prototype.buildEventDefs=function(e){var t,n=this.rawComplexDef,o=[],r=!1,s=[];for(!0===n?o=[{}]:i.isPlainObject(n)?o=[n]:i.isArray(n)&&(o=n,r=!0),t=0;t<o.length;t++)r&&!o[t].dow||s.push(this.buildEventDef(e,o[t]));return s},e.prototype.buildEventDef=function(e,t){var n=i.extend({},l,t);return e&&(n.start=null,n.end=null),s.default.parse(n,new a.default(this.calendar))},e}();t.default=c},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t}(n(19).default);t.default=o,o.prototype.classes={widget:"fc-unthemed",widgetHeader:"fc-widget-header",widgetContent:"fc-widget-content",buttonGroup:"fc-button-group",button:"fc-button",cornerLeft:"fc-corner-left",cornerRight:"fc-corner-right",stateDefault:"fc-state-default",stateActive:"fc-state-active",stateDisabled:"fc-state-disabled",stateHover:"fc-state-hover",stateDown:"fc-state-down",popoverHeader:"fc-widget-header",popoverContent:"fc-widget-content",headerRow:"fc-widget-header",dayRow:"fc-widget-content",listView:"fc-widget-content"},o.prototype.baseIconClass="fc-icon",o.prototype.iconClasses={close:"fc-icon-x",prev:"fc-icon-left-single-arrow",next:"fc-icon-right-single-arrow",prevYear:"fc-icon-left-double-arrow",nextYear:"fc-icon-right-double-arrow"},o.prototype.iconOverrideOption="buttonIcons",o.prototype.iconOverrideCustomButtonOption="icon",o.prototype.iconOverridePrefix="fc-icon-"},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t}(n(19).default)
21;t.default=o,o.prototype.classes={widget:"ui-widget",widgetHeader:"ui-widget-header",widgetContent:"ui-widget-content",buttonGroup:"fc-button-group",button:"ui-button",cornerLeft:"ui-corner-left",cornerRight:"ui-corner-right",stateDefault:"ui-state-default",stateActive:"ui-state-active",stateDisabled:"ui-state-disabled",stateHover:"ui-state-hover",stateDown:"ui-state-down",today:"ui-state-highlight",popoverHeader:"ui-widget-header",popoverContent:"ui-widget-content",headerRow:"ui-widget-header",dayRow:"ui-widget-content",listView:"ui-widget-content"},o.prototype.baseIconClass="ui-icon",o.prototype.iconClasses={close:"ui-icon-closethick",prev:"ui-icon-circle-triangle-w",next:"ui-icon-circle-triangle-e",prevYear:"ui-icon-seek-prev",nextYear:"ui-icon-seek-next"},o.prototype.iconOverrideOption="themeButtonIcons",o.prototype.iconOverrideCustomButtonOption="themeIcon",o.prototype.iconOverridePrefix="ui-icon-"},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),o=n(3),r=n(20),s=n(6),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.parse=function(e,t){var n;return o.isFunction(e.events)?n=e:o.isFunction(e)&&(n={events:e}),!!n&&s.default.parse.call(this,n,t)},t.prototype.fetch=function(e,t,n){var i=this;return this.calendar.pushLoading(),r.default.construct(function(o){i.func.call(i.calendar,e.clone(),t.clone(),n,function(e){i.calendar.popLoading(),o(i.parseEventDefs(e))})})},t.prototype.getPrimitive=function(){return this.func},t.prototype.applyManualStandardProps=function(t){var n=e.prototype.applyManualStandardProps.call(this,t);return this.func=t.events,n},t}(s.default);t.default=a,a.defineStandardProps({events:!1})},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),o=n(3),r=n(4),s=n(20),a=n(6),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.parse=function(e,t){var n;return"string"==typeof e.url?n=e:"string"==typeof e&&(n={url:e}),!!n&&a.default.parse.call(this,n,t)},t.prototype.fetch=function(e,n,i){var a=this,l=this.ajaxSettings,c=l.success,d=l.error,u=this.buildRequestParam
21s(e,n,i);return this.calendar.pushLoading(),s.default.construct(function(e,n){o.ajax(o.extend({},t.AJAX_DEFAULTS,l,{url:a.url,data:u,success:function(t,i,s){var l;a.calendar.popLoading(),t?(l=r.applyAll(c,a,[t,i,s]),o.isArray(l)&&(t=l),e(a.parseEventDefs(t))):n()},error:function(e,t,i){a.calendar.popLoading(),r.applyAll(d,a,[e,t,i]),n()}}))})},t.prototype.buildRequestParams=function(e,t,n){var i,r,s,a,l=this.calendar,c=this.ajaxSettings,d={};return null==(i=this.startParam)&&(i=l.opt("startParam")),null==(r=this.endParam)&&(r=l.opt("endParam")),null==(s=this.timezoneParam)&&(s=l.opt("timezoneParam")),a=o.isFunction(c.data)?c.data():c.data||{},o.extend(d,a),d[i]=e.format(),d[r]=t.format(),n&&"local"!==n&&(d[s]=n),d},t.prototype.getPrimitive=function(){return this.url},t.prototype.applyMiscProps=function(e){this.ajaxSettings=e},t.AJAX_DEFAULTS={dataType:"json",cache:!1},t}(a.default);t.default=l,l.defineStandardProps({url:!0,startParam:!0,endParam:!0,timezoneParam:!0})},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(11),o=function(){function e(){this.q=[],this.isPaused=!1,this.isRunning=!1}return e.prototype.queue=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.q.push.apply(this.q,e),this.tryStart()},e.prototype.pause=function(){this.isPaused=!0},e.prototype.resume=function(){this.isPaused=!1,this.tryStart()},e.prototype.getIsIdle=function(){return!this.isRunning&&!this.isPaused},e.prototype.tryStart=function(){!this.isRunning&&this.canRunNext()&&(this.isRunning=!0,this.trigger("start"),this.runRemaining())},e.prototype.canRunNext=function(){return!this.isPaused&&this.q.length},e.prototype.runRemaining=function(){var e,t,n=this;do{if(e=this.q.shift(),(t=this.runTask(e))&&t.then)return void t.then(function(){n.canRunNext()&&n.runRemaining()})}while(this.canRunNext());this.trigger("stop"),this.isRunning=!1,this.tryStart()},e.prototype.runTask=function(e){return e()},e}();t.default=o,i.default.mixInto(o)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),o=function(e){function t(t){var n=e.call(this)||this;return n.waitsByNamespace=t||{},n}return i.__extends(t,e),t.prototype.queue=function(e,t,n){var i,o={func:e,namespace:t,type:n};t&&(i=this.waitsByNamespace[t]),this.waitNamespace&&(t===this.waitNamespace&&null!=i?this.delayWait(i):(this.clearWait(),this.tryStart())),this.compoundTask(o)&&(this.waitNamespace||null==i?this.tryStart():this.startWait(t,i))},t.prototype.startWait=function(e,t){this.waitNamespace=e,this.spawnWait(t)},t.prototype.delayWait=function(e){clearTimeout(this.waitId),this.spawnWait(e)},t.prototype.spawnWait=function(e){var t=this;this.waitId=setTimeout(function(){t.waitNamespace=null,t.tryStart()},e)},t.prototype.clearWait=function(){this.waitNamespace&&(clearTimeout(this.waitId),this.waitId=null,this.waitNamespace=null)},t.prototype.canRunNext=function(){if(!e.prototype.canRunNext.call(this))return!1;if(this.waitNamespace){for(var t=this.q,n=0;n<t.length;n++)if(t[n].namespace!==this.waitNamespace)return!0;return!1}return!0},t.prototype.runTask=function(e){e.func()},t.prototype.compoundTask=function(e){var t,n=this.q,i=!0;if(e.namespace&&"destroy"===e.type)for(t=n.length-1;t>=0;t--)switch(n[t].type){case"init":i=!1;case"add":case"remove":n.splice(t,1)}return i&&n.push(e),i},t}(n(217).default);t.default=o},function(e,t,n){function i(e){var t,n,i,o=[];for(t in e)for(n=e[t].eventInstances,i=0;i<n.length;i++)o.push(n[i].toLegacy());return o}Object.defineProperty(t,"__esModule",{value:!0});var o=n(2),r=n(3),s=n(0),a=n(4),l=n(10),c=n(47),d=n(237),u=n(35),h=function(e){function t(n,i){var o=e.call(this)||this;return o.isRTL=!1,o.hitsNeededDepth=0,o.hasAllDayBusinessHours=!1,o.isDatesRendered=!1,n&&(o.view=n),i&&(o.options=i),o.uid=String(t.guid++),o.childrenByUid={},o.nextDayThreshold=s.duration(o.opt("nextDayThreshold")),o.isRTL=o.opt("isRTL"),o.fillRendererClass&&(o.fillRenderer=new o.fillRendererClass(o)),o.eventRendererClass&&(o.eventRenderer=new o.eventRendererClass(o,o.fillRenderer)),o.helperRendererClass&&o.eventRenderer&&(o.helperRenderer=new o.helperRendererClass(o,o.eventRenderer)),o.businessHourRendererClass&&o.fillRenderer&&(o.businessHourRenderer=new o.businessHourRendererClass(o,o.fillRenderer)),o}return o.__extends(t,e),t.prototype.addChild=function(e){return!this.childrenByUid[e.uid]&&(this.childrenByUid[e.uid]=e,!0)},t.prototype.removeChild=function(e){return!!this.childrenByUid[e.uid]&&(delete this.childrenByUid[e.uid],!0)},t.prototype.updateSize=function(e,t,n){this.callChildren("updateSize",arguments)},t.prototype.opt=function(e){return this._getView().opt(e)},t.prototype.publiclyTrigger=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];
21var n=this._getCalendar();return n.publiclyTrigger.apply(n,e)},t.prototype.hasPublicHandlers=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=this._getCalendar();return n.hasPublicHandlers.apply(n,e)},t.prototype.executeDateRender=function(e){this.dateProfile=e,this.renderDates(e),this.isDatesRendered=!0,this.callChildren("executeDateRender",arguments)},t.prototype.executeDateUnrender=function(){this.callChildren("executeDateUnrender",arguments),this.dateProfile=null,this.unrenderDates(),this.isDatesRendered=!1},t.prototype.renderDates=function(){},t.prototype.unrenderDates=function(){},t.prototype.getNowIndicatorUnit=function(){},t.prototype.renderNowIndicator=function(e){this.callChildren("renderNowIndicator",arguments)},t.prototype.unrenderNowIndicator=function(){this.callChildren("unrenderNowIndicator",arguments)},t.prototype.renderBusinessHours=function(e){this.businessHourRenderer&&this.businessHourRenderer.render(e),this.callChildren("renderBusinessHours",arguments)},t.prototype.unrenderBusinessHours=function(){this.callChildren("unrenderBusinessHours",arguments),this.businessHourRenderer&&this.businessHourRenderer.unrender()},t.prototype.executeEventRender=function(e){this.eventRenderer?(this.eventRenderer.rangeUpdated(),this.eventRenderer.render(e)):this.renderEvents&&this.renderEvents(i(e)),this.callChildren("executeEventRender",arguments)},t.prototype.executeEventUnrender=function(){this.callChildren("executeEventUnrender",arguments),this.eventRenderer?this.eventRenderer.unrender():this.destroyEvents&&this.destroyEvents()},t.prototype.getBusinessHourSegs=function(){var e=this.getOwnBusinessHourSegs();return this.iterChildren(function(t){e.push.apply(e,t.getBusinessHourSegs())}),e},t.prototype.getOwnBusinessHourSegs=function(){return this.businessHourRenderer?this.businessHourRenderer.getSegs():[]},t.prototype.getEventSegs=function(){var e=this.getOwnEventSegs();return this.iterChildren(function(t){e.push.apply(e,t.getEventSegs())}),e},t.prototype.getOwnEventSegs=function(){return this.eventRenderer?this.eventRenderer.getSegs():[]},t.prototype.triggerAfterEventsRendered=function(){this.triggerAfterEventSegsRendered(this.getEventSegs()),this.publiclyTrigger("eventAfterAllRender",{context:this,args:[this]})},t.prototype.triggerAfterEventSegsRendered=function(e){var t=this;this.hasPublicHandlers("eventAfterRender")&&e.forEach(function(e){var n;e.el&&(n=e.footprint.getEventLegacy(),t.publiclyTrigger("eventAfterRender",{context:n,args:[n,e.el,t]}))})},t.prototype.triggerBeforeEventsDestroyed=function(){this.triggerBeforeEventSegsDestroyed(this.getEventSegs())},t.prototype.triggerBeforeEventSegsDestroyed=function(e){var t=this;this.hasPublicHandlers("eventDestroy")&&e.forEach(function(e){var n;e.el&&(n=e.footprint.getEventLegacy(),t.publiclyTrigger("eventDestroy",{context:n,args:[n,e.el,t]}))})},t.prototype.showEventsWithId=function(e){this.getEventSegs().forEach(function(t){t.footprint.eventDef.id===e&&t.el&&t.el.css("visibility","")}),this.callChildren("showEventsWithId",arguments)},t.prototype.hideEventsWithId=function(e){this.getEventSegs().forEach(function(t){t.footprint.eventDef.id===e&&t.el&&t.el.css("visibility","hidden")}),this.callChildren("hideEventsWithId",arguments)},t.prototype.renderDrag=function(e,t,n){var i=!1;return this.iterChildren(function(o){o.renderDrag(e,t,n)&&(i=!0)}),i},t.prototype.unrenderDrag=function(){this.callChildren("unrenderDrag",arguments)},t.prototype.renderEventResize=function(e,t,n){this.callChildren("renderEventResize",arguments)},t.prototype.unrenderEventResize=function(){this.callChildren("unrenderEventResize",arguments)},t.prototype.renderSelectionFootprint=function(e){this.renderHighlight(e),this.callChildren("renderSelectionFootprint",arguments)},t.prototype.unrenderSelection=function(){this.unrenderHighlight(),this.callChildren("unrenderSelection",arguments)},t.prototype.renderHighlight=function(e){this.fillRenderer&&this.fillRenderer.renderFootprint("highlight",e,{getClasses:function(){return["fc-highlight"]}}),this.callChildren("renderHighlight",arguments)},t.prototype.unrenderHighlight=function(){this.fillRenderer&&this.fillRenderer.unrender("highlight"),this.callChildren("unrenderHighlight",arguments)},t.prototype.hitsNeeded=function(){this.hitsNeededDepth++||this.prepareHits(),this.callChildren("hitsNeeded",arguments)},t.prototype.hitsNotNeeded=function(){this.hitsNeededDepth&&! --this.hitsNeededDepth&&this.releaseHits(),this.callChildren("hitsNotNeeded",arguments)},t.prototype.prepareHits=function(){},t.prototype.releaseHits=function(){},t.prototype.queryHit=function(e,t){var n,i,o=this.childrenByUid;for(n in o)if(i=o[n].queryHit(e,t))break;return i},t.prototype.getSafeHitFootprint=function(e){var t=this.getHitFootprint(e);return this.dateProfile.activeUnzonedRange.containsRange(t.unzonedRange)?t:null},t.prototype.getHitFootprint=function(){},t.prototype.getHitEl=function(){},t.prototype.eventRangesToEventFootprints=function(e){var t,n=[];for(t=0;t<e.length;t++)n.push.apply(n,this.eventRangeToEventFootprints(e[t]));return n},t.prototype.eventRangeToEventFootprints=function(e){return[u.eventRangeToEventFootprint(e)]},t.prototype.eventFootprintsToSegs=function(e){var t,n=[];for(t=0;t<e.length;t++)n.push.apply(n,this.eventFootprintToSegs(e[t]));return n},t.prototype.eventFootprintToSegs=function(e){var t,n,i,o=e.componentFootprint.unzonedRange;
21for(t=this.componentFootprintToSegs(e.componentFootprint),n=0;n<t.length;n++)i=t[n],o.isStart||(i.isStart=!1),o.isEnd||(i.isEnd=!1),i.footprint=e;return t},t.prototype.componentFootprintToSegs=function(){return[]},t.prototype.callChildren=function(e,t){this.iterChildren(function(n){n[e].apply(n,t)})},t.prototype.iterChildren=function(e){var t,n=this.childrenByUid;for(t in n)e(n[t])},t.prototype._getCalendar=function(){var e=this;return e.calendar||e.view.calendar},t.prototype._getView=function(){return this.view},t.prototype._getDateProfile=function(){return this._getView().get("dateProfile")},t.prototype.buildGotoAnchorHtml=function(e,t,n){var i,o,s,c;return r.isPlainObject(e)?(i=e.date,o=e.type,s=e.forceOff):i=e,c={date:(i=l.default(i)).format("YYYY-MM-DD"),type:o||"day"},"string"==typeof t&&(n=t,t=null),t=t?" "+a.attrsToStr(t):"",n=n||"",!s&&this.opt("navLinks")?"<a"+t+' data-goto="'+a.htmlEscape(JSON.stringify(c))+'">'+n+"</a>":"<span"+t+">"+n+"</span>"},t.prototype.getAllDayHtml=function(){return this.opt("allDayHtml")||a.htmlEscape(this.opt("allDayText"))},t.prototype.getDayClasses=function(e,t){var n,i=this._getView(),o=[];return this.dateProfile.activeUnzonedRange.containsDate(e)?(o.push("fc-"+a.dayIDs[e.day()]),i.isDateInOtherMonth(e,this.dateProfile)&&o.push("fc-other-month"),n=i.calendar.getNow(),e.isSame(n,"day")?(o.push("fc-today"),!0!==t&&o.push(i.calendar.theme.getClass("today"))):e<n?o.push("fc-past"):o.push("fc-future")):o.push("fc-disabled-day"),o},t.prototype.formatRange=function(e,t,n,i){var o=e.end;return t&&(o=o.clone().subtract(1)),c.formatRange(e.start,o,n,i,this.isRTL)},t.prototype.currentRangeAs=function(e){return this._getDateProfile().currentUnzonedRange.as(e)},t.prototype.computeDayRange=function(e){var t=this._getCalendar(),n=t.msToUtcMoment(e.startMs,!0),i=t.msToUtcMoment(e.endMs),o=+i.time(),r=i.clone().stripTime();return o&&o>=this.nextDayThreshold&&r.add(1,"days"),r<=n&&(r=n.clone().add(1,"days")),{start:n,end:r}},t.prototype.isMultiDayRange=function(e){var t=this.computeDayRange(e);return t.end.diff(t.start,"days")>1},t.guid=0,t}(d.default);t.default=h},function(e,t,n){function i(e,t){return null==t?e:o.isFunction(t)?e.filter(t):(t+="",e.filter(function(e){return e.id==t||e._id===t}))}Object.defineProperty(t,"__esModule",{value:!0});var o=n(3),r=n(0),s=n(4),a=n(32),l=n(238),c=n(21),d=n(11),u=n(7),h=n(239),p=n(240),f=n(241),m=n(207),g=n(31),v=n(10),y=n(5),b=n(12),_=n(17),w=n(242),C=n(212),k=n(38),x=n(49),S=n(13),E=n(37),D=n(6),T=n(51),A=function(){function e(e,t){this.loadingLevel=0,this.ignoreUpdateViewSize=0,this.freezeContentHeightDepth=0,c.default.needed(),this.el=e,this.viewsByType={},this.optionsManager=new p.default(this,t),this.viewSpecManager=new f.default(this.optionsManager,this),this.initMomentInternals(),this.initCurrentDate(),this.initEventManager(),this.constraints=new m.default(this.eventManager,this),this.constructed()}return e.prototype.constructed=function(){},e.prototype.getView=function(){return this.view},e.prototype.publiclyTrigger=function(e,t){var n,i,r=this.opt(e);if(o.isPlainObject(t)?(n=t.context,i=t.args):o.isArray(t)&&(i=t),null==n&&(n=this.el[0]),i||(i=[]),this.triggerWith(e,n,i),r)return r.apply(n,i)},e.prototype.hasPublicHandlers=function(e){return this.hasHandlers(e)||this.opt(e)},e.prototype.option=function(e,t){var n;if("string"==typeof e){if(void 0===t)return this.optionsManager.get(e);(n={})[e]=t,this.optionsManager.add(n)}else"object"==typeof e&&this.optionsManager.add(e)},e.prototype.opt=function(e){return this.optionsManager.get(e)},e.prototype.instantiateView=function(e){var t=this.viewSpecManager.getViewSpec(e);if(!t)throw new Error('View type "'+e+'" is not valid');return new t.class(this,t)},e.prototype.isValidViewType=function(e){return Boolean(this.viewSpecManager.getViewSpec(e))},e.prototype.changeView=function(e,t){t&&(t.start&&t.end?this.optionsManager.recordOverrides({visibleRange:t}):this.currentDate=this.moment(t).stripZone()),this.renderView(e)},e.prototype.zoomTo=function(e,t){var n;t=t||"day",n=this.viewSpecManager.getViewSpec(t)||this.viewSpecManager.getUnitViewSpec(t),this.currentDate=e.clone(),this.renderView(n?n.type:null)},e.prototype.initCurrentDate=function(){var e=this.opt("defaultDate");this.currentDate=null!=e?this.moment(e).stripZone():this.getNow()},e.prototype.prev=function(){var e=this.view,t=e.dateProfileGenerator.buildPrev(e.get("dateProfile"));
21t.isValid&&(this.currentDate=t.date,this.renderView())},e.prototype.next=function(){var e=this.view,t=e.dateProfileGenerator.buildNext(e.get("dateProfile"));t.isValid&&(this.currentDate=t.date,this.renderView())},e.prototype.prevYear=function(){this.currentDate.add(-1,"years"),this.renderView()},e.prototype.nextYear=function(){this.currentDate.add(1,"years"),this.renderView()},e.prototype.today=function(){this.currentDate=this.getNow(),this.renderView()},e.prototype.gotoDate=function(e){this.currentDate=this.moment(e).stripZone(),this.renderView()},e.prototype.incrementDate=function(e){this.currentDate.add(r.duration(e)),this.renderView()},e.prototype.getDate=function(){return this.applyTimezone(this.currentDate)},e.prototype.pushLoading=function(){this.loadingLevel++||this.publiclyTrigger("loading",[!0,this.view])},e.prototype.popLoading=function(){--this.loadingLevel||this.publiclyTrigger("loading",[!1,this.view])},e.prototype.render=function(){this.contentEl?this.elementVisible()&&(this.calcSize(),this.updateViewSize()):this.initialRender()},e.prototype.initialRender=function(){var e=this,t=this.el;t.addClass("fc"),t.on("click.fc","a[data-goto]",function(t){var n=o(t.currentTarget).data("goto"),i=e.moment(n.date),r=n.type,a=e.view.opt("navLink"+s.capitaliseFirstLetter(r)+"Click");"function"==typeof a?a(i,t):("string"==typeof a&&(r=a),e.zoomTo(i,r))}),this.optionsManager.watch("settingTheme",["?theme","?themeSystem"],function(n){var i=new(T.getThemeSystemClass(n.themeSystem||n.theme))(e.optionsManager),o=i.getClass("widget");e.theme=i,o&&t.addClass(o)},function(){var n=e.theme.getClass("widget");e.theme=null,n&&t.removeClass(n)}),this.optionsManager.watch("settingBusinessHourGenerator",["?businessHours"],function(t){e.businessHourGenerator=new C.default(t.businessHours,e),e.view&&e.view.set("businessHourGenerator",e.businessHourGenerator)},function(){e.businessHourGenerator=null}),this.optionsManager.watch("applyingDirClasses",["?isRTL","?locale"],function(e){t.toggleClass("fc-ltr",!e.isRTL),t.toggleClass("fc-rtl",e.isRTL)}),this.contentEl=o("<div class='fc-view-container'/>").prependTo(t),this.initToolbars(),this.renderHeader(),this.renderFooter(),this.renderView(this.opt("defaultView")),this.opt("handleWindowResize")&&o(window).resize(this.windowResizeProxy=s.debounce(this.windowResize.bind(this),this.opt("windowResizeDelay")))},e.prototype.destroy=function(){this.view&&this.clearView(),this.toolbarsManager.proxyCall("removeElement"),this.contentEl.remove(),this.el.removeClass("fc fc-ltr fc-rtl"),this.optionsManager.unwatch("settingTheme"),this.optionsManager.unwatch("settingBusinessHourGenerator"),this.el.off(".fc"),this.windowResizeProxy&&(o(window).unbind("resize",this.windowResizeProxy),this.windowResizeProxy=null),c.default.unneeded()},e.prototype.elementVisible=function(){return this.el.is(":visible")},e.prototype.bindViewHandlers=function(e){var t=this;e.watch("titleForCalendar",["title"],function(n){e===t.view&&t.setToolbarsTitle(n.title)}),e.watch("dateProfileForCalendar",["dateProfile"],function(n){e===t.view&&(t.currentDate=n.dateProfile.date,t.updateToolbarButtons(n.dateProfile))})},e.prototype.unbindViewHandlers=function(e){e.unwatch("titleForCalendar"),e.unwatch("dateProfileForCalendar")},e.prototype.renderView=function(e){var t,n=this.view;this.freezeContentHeight(),n&&e&&n.type!==e&&this.clearView(),!this.view&&e&&(t=this.view=this.viewsByType[e]||(this.viewsByType[e]=this.instantiateView(e)),this.bindViewHandlers(t),t.startBatchRender(),t.setElement(o("<div class='fc-view fc-"+e+"-view' />").appendTo(this.contentEl)),this.toolbarsManager.proxyCall("activateButton",e)),this.view&&(this.view.get("businessHourGenerator")!==this.businessHourGenerator&&this.view.set("businessHourGenerator",this.businessHourGenerator),this.view.setDate(this.currentDate),t&&t.stopBatchRender()),this.thawContentHeight()},e.prototype.clearView=function(){var e=this.view;this.toolbarsManager.proxyCall("deactivateButton",e.type),this.unbindViewHandlers(e),e.removeElement(),e.unsetDate(),this.view=null},e.prototype.reinitView=function(){var e=this.view,t=e.queryScroll();this.freezeContentHeight(),this.clearView(),this.calcSize(),this.renderView(e.type),this.view.applyScroll(t),this.thawContentHeight()},e.prototype.getSuggestedViewHeight=function(){return null==this.suggestedViewHeight&&this.calcSize(),this.suggestedViewHeight},e.prototype.isHeightAuto=function(){return"auto"===this.opt("contentHeight")||"auto"===this.opt("height")},e.prototype.updateViewSize=function(e){void 0===e&&(e=!1);var t,n=this.view;if(!this.ignoreUpdateViewSize&&n)return e&&(this.calcSize(),t=n.queryScroll()),this.ignoreUpdateViewSize++,n.updateSize(this.getSuggestedViewHeight(),this.isHeightAuto(),e),this.ignoreUpdateViewSize--,e&&n.applyScroll(t),!0},e.prototype.calcSize=function(){this.elementVisible()&&this._calcSize()},e.prototype._calcSize=function(){var e=this.opt("contentHeight"),t=this.opt("height");this.suggestedViewHeight="number"==typeof e?e:"function"==typeof e?e():"number"==typeof t?t-this.queryToolbarsHeight():"function"==typeof t?t()-this.queryToolbarsHeight():"parent"===t?this.el.parent().height()-this.queryToolbarsHeight():Math.round(this.contentEl.width()/Math.max(this.opt("aspectRatio"),.5))},e.prototype.windowResize=function(e){e.target===window&&this.view&&this.view.isDatesRendered&&this.updateViewSize(!0)&&this.publiclyTrigger("windowResize",[this.view])},e.prototype.freezeContentHeight=function(){this.freezeContentHeightDepth++||this.forceFreezeContentHeight()},e.prototype.forceFreezeContentHeight=function(){this.contentEl.css({width:"100%",height:this.contentEl.height(),overflow:"hidden"})},e.prototype.thawContentHeight=function(){this.freezeContentHeightDepth--,this.contentEl.css({width:"",height:"",overflow:""}),this.freezeContentHeightDepth&&this.forceFreezeContentHeight()},e.prototype.initToolbars=function(){this.header=new h.default(this,this.computeHeaderOptions()),this.footer=new h.default(this,this.computeFooterOptions()),this.toolbarsManager=new l.default([this.header,this.footer])}
21,e.prototype.computeHeaderOptions=function(){return{extraClasses:"fc-header-toolbar",layout:this.opt("header")}},e.prototype.computeFooterOptions=function(){return{extraClasses:"fc-footer-toolbar",layout:this.opt("footer")}},e.prototype.renderHeader=function(){var e=this.header;e.setToolbarOptions(this.computeHeaderOptions()),e.render(),e.el&&this.el.prepend(e.el)},e.prototype.renderFooter=function(){var e=this.footer;e.setToolbarOptions(this.computeFooterOptions()),e.render(),e.el&&this.el.append(e.el)},e.prototype.setToolbarsTitle=function(e){this.toolbarsManager.proxyCall("updateTitle",e)},e.prototype.updateToolbarButtons=function(e){var t=this.getNow(),n=this.view,i=n.dateProfileGenerator.build(t),o=n.dateProfileGenerator.buildPrev(n.get("dateProfile")),r=n.dateProfileGenerator.buildNext(n.get("dateProfile"));this.toolbarsManager.proxyCall(i.isValid&&!e.currentUnzonedRange.containsDate(t)?"enableButton":"disableButton","today"),this.toolbarsManager.proxyCall(o.isValid?"enableButton":"disableButton","prev"),this.toolbarsManager.proxyCall(r.isValid?"enableButton":"disableButton","next")},e.prototype.queryToolbarsHeight=function(){return this.toolbarsManager.items.reduce(function(e,t){return e+(t.el?t.el.outerHeight(!0):0)},0)},e.prototype.select=function(e,t){this.view.select(this.buildSelectFootprint.apply(this,arguments))},e.prototype.unselect=function(){this.view&&this.view.unselect()},e.prototype.buildSelectFootprint=function(e,t){var n,i=this.moment(e).stripZone();return n=t?this.moment(t).stripZone():i.hasTime()?i.clone().add(this.defaultTimedEventDuration):i.clone().add(this.defaultAllDayEventDuration),new b.default(new y.default(i,n),!i.hasTime())},e.prototype.initMomentInternals=function(){var e=this;this.defaultAllDayEventDuration=r.duration(this.opt("defaultAllDayEventDuration")),this.defaultTimedEventDuration=r.duration(this.opt("defaultTimedEventDuration")),this.optionsManager.watch("buildingMomentLocale",["?locale","?monthNames","?monthNamesShort","?dayNames","?dayNamesShort","?firstDay","?weekNumberCalculation"],function(t){var n,i=t.
21weekNumberCalculation,o=t.firstDay;"iso"===i&&(i="ISO");var r=Object.create(g.getMomentLocaleData(t.locale));t.monthNames&&(r._months=t.monthNames),t.monthNamesShort&&(r._monthsShort=t.monthNamesShort),t.dayNames&&(r._weekdays=t.dayNames),t.dayNamesShort&&(r._weekdaysShort=t.dayNamesShort),null==o&&"ISO"===i&&(o=1),null!=o&&((n=Object.create(r._week)).dow=o,r._week=n),"ISO"!==i&&"local"!==i&&"function"!=typeof i||(r._fullCalendar_weekCalc=i),e.localeData=r,e.currentDate&&e.localizeMoment(e.currentDate)})},e.prototype.moment=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return"local"===this.opt("timezone")?(e=v.default.apply(null,t)).hasTime()&&e.local():e="UTC"===this.opt("timezone")?v.default.utc.apply(null,t):v.default.parseZone.apply(null,t),this.localizeMoment(e),e},e.prototype.msToMoment=function(e,t){var n=v.default.utc(e);return t?n.stripTime():n=this.applyTimezone(n),this.localizeMoment(n),n},e.prototype.msToUtcMoment=function(e,t){var n=v.default.utc(e);return t&&n.stripTime(),this.localizeMoment(n),n},e.prototype.localizeMoment=function(e){e._locale=this.localeData},e.prototype.getIsAmbigTimezone=function(){return"local"!==this.opt("timezone")&&"UTC"!==this.opt("timezone")},e.prototype.applyTimezone=function(e){if(!e.hasTime())return e.clone();var t,n=this.moment(e.toArray()),i=e.time().asMilliseconds()-n.time().asMilliseconds();return i&&(t=n.clone().add(i),e.time().asMilliseconds()-t.time().asMilliseconds()===0&&(n=t)),n},e.prototype.footprintToDateProfile=function(e,t){void 0===t&&(t=!1);var n,i=v.default.utc(e.unzonedRange.startMs);return t||(n=v.default.utc(e.unzonedRange.endMs)),e.isAllDay?(i.stripTime(),n&&n.stripTime()):(i=this.applyTimezone(i),n&&(n=this.applyTimezone(n))),new _.default(i,n,this)},e.prototype.getNow=function(){var e=this.opt("now");return"function"==typeof e&&(e=e()),this.moment(e).stripZone()},e.prototype.humanizeDuration=function(e){return e.locale(this.opt("locale")).humanize()},e.prototype.parseUnzonedRange=function(e){var t=null,n=null;return e.start&&(t=this.moment(e.start).stripZone()),e.end&&(n=this.moment(e.end).stripZone()),t||n?t&&n&&n.isBefore(t)?null:new y.default(t,n):null},e.prototype.initEventManager=function(){var e=this,t=new w.default(this),n=this.opt("eventSources")||[],i=this.opt("events");this.eventManager=t,i&&n.unshift(i),t.on("release",function(t){e.trigger("eventsReset",t)}),t.freeze(),n.forEach(function(n){var i=k.default.parse(n,e);i&&t.addSource(i)}),t.thaw()},e.prototype.requestEvents=function(e,t){return this.eventManager.requestEvents(e,t,this.opt("timezone"),!this.opt("lazyFetching"))},e.prototype.getEventEnd=function(e){return e.end?e.end.clone():this.getDefaultEventEnd(e.allDay,e.start)},e.prototype.getDefaultEventEnd=function(e,t){var n=t.clone();return e?n.stripTime().add(this.defaultAllDayEventDuration):n.add(this.defaultTimedEventDuration),this.getIsAmbigTimezone()&&n.stripZone(),n},e.prototype.rerenderEvents=function(){this.view.flash("displayingEvents")},e.prototype.refetchEvents=function(){this.eventManager.refetchAllSources()},e.prototype.renderEvents=function(e,t){this.eventManager.freeze();for(var n=0;n<e.length;n++)this.renderEvent(e[n],t);this.eventManager.thaw()},e.prototype.renderEvent=function(e,t){void 0===t&&(t=!1);var n=this.eventManager,i=x.default.parse(e,e.source||n.stickySource);i&&n.addEventDef(i,t)},e.prototype.removeEvents=function(e){var t,n=this.eventManager,o=[],r={};if(null==e)n.removeAllEventDefs();else{for(n.getEventInstances().forEach(function(e){o.push(e.toLegacy())}),o=i(o,e),t=0;t<o.length;t++)r[this.eventManager.getEventDefByUid(o[t]._id).id]=!0;for(t in n.freeze(),r)n.removeEventDefsById(t);n.thaw()}},e.prototype.clientEvents=function(e){var t=[];return this.eventManager.getEventInstances().forEach(function(e){t.push(e.toLegacy())}),i(t,e)},e.prototype.updateEvents=function(e){this.eventManager.freeze();for(var t=0;t<e.length;t++)this.updateEvent(e[t]);this.eventManager.thaw()},e.prototype.updateEvent=function(e){var t,n,i=this.eventManager.getEventDefByUid(e._id);i instanceof S.default&&(t=i.buildInstance(),n=E.default.createFromRawProps(t,e,null),this.eventManager.mutateEventsWithId(i.id,n))},e.prototype.getEventSources=function(){return this.eventManager.otherSources.slice()},e.prototype.getEventSourceById=function(e){return this.eventManager.getSourceById(D.default.normalizeId(e))},e.prototype.addEventSource=function(e){var t=k.default.parse(e,this);t&&this.eventManager.addSource(t)},e.prototype.removeEventSources=function(e){var t,n,i=this.eventManager;if(null==e)this.eventManager.removeAllSources();else{for(t=i.multiQuerySources(e),i.freeze(),n=0;n<t.length;n++)i.removeSource(t[n]);i.thaw()}},e.prototype.removeEventSource=function(e){var t,n=this.eventManager,i=n.querySources(e);for(n.freeze(),t=0;t<i.length;t++)n.removeSource(i[t]);n.thaw()},e.prototype.refetchEventSources=function(e){var t,n=this.eventManager,i=n.multiQuerySources(e);for(n.freeze(),t=0;t<i.length;t++)n.refetchSource(i[t]);n.thaw()},e.defaults=a.globalDefaults,e.englishDefaults=a.englishDefaults,e.rtlDefaults=a.rtlDefaults,e}();t.default=A,d.default.mixInto(A),u.default.mixInto(A)}
21,function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),o=n(4),r=n(5),s=function(){function e(e){this._view=e}return e.prototype.opt=function(e){return this._view.opt(e)},e.prototype.trimHiddenDays=function(e){return this._view.trimHiddenDays(e)},e.prototype.msToUtcMoment=function(e,t){return this._view.calendar.msToUtcMoment(e,t)},e.prototype.buildPrev=function(e){var t=e.date.clone().startOf(e.currentRangeUnit).subtract(e.dateIncrement);return this.build(t,-1)},e.prototype.buildNext=function(e){var t=e.date.clone().startOf(e.currentRangeUnit).add(e.dateIncrement);return this.build(t,1)},e.prototype.build=function(e,t,n){void 0===n&&(n=!1);var o,r,s,a,l,c,d=!e.hasTime(),u=null,h=null;return o=this.buildValidRange(),o=this.trimHiddenDays(o),n&&(e=this.msToUtcMoment(o.constrainDate(e),d)),r=this.buildCurrentRangeInfo(e,t),s=/^(year|month|week|day)$/.test(r.unit),a=this.buildRenderRange(this.trimHiddenDays(r.unzonedRange),r.unit,s),l=(a=this.trimHiddenDays(a)).clone(),this.opt("showNonCurrentDates")||(l=l.intersect(r.unzonedRange)),u=i.duration(this.opt("minTime")),h=i.duration(this.opt("maxTime")),(l=(l=this.adjustActiveRange(l,u,h)).intersect(o))&&(e=this.msToUtcMoment(l.constrainDate(e),d)),c=r.unzonedRange.intersectsWith(o),{validUnzonedRange:o,currentUnzonedRange:r.unzonedRange,currentRangeUnit:r.unit,isRangeAllDay:s,activeUnzonedRange:l,renderUnzonedRange:a,minTime:u,maxTime:h,isValid:c,date:e,dateIncrement:this.buildDateIncrement(r.duration)}},e.prototype.buildValidRange=function(){return this._view.getUnzonedRangeOption("validRange",this._view.calendar.getNow())||new r.default},e.prototype.buildCurrentRangeInfo=function(e,t){var n,i=this._view.viewSpec,r=null,s=null,a=null;return i.duration?(r=i.duration,s=i.durationUnit,a=this.buildRangeFromDuration(e,t,r,s)):(n=this.opt("dayCount"))?(s="day",a=this.buildRangeFromDayCount(e,t,n)):(a=this.buildCustomVisibleRange(e))?s=o.computeGreatestUnit(a.getStart(),a.getEnd()):(r=this.getFallbackDuration(),s=o.computeGreatestUnit(r),a=this.buildRangeFromDuration(e,t,r,s)),{duration:r,unit:s,unzonedRange:a}},e.prototype.getFallbackDuration=function(){return i.duration({days:1})},e.prototype.adjustActiveRange=function(e,t,n){var i=e.getStart(),o=e.getEnd();return this._view.usesMinMaxTime&&(t<0&&i.time(0).add(t),n>864e5&&o.time(n-864e5)),new r.default(i,o)},e.prototype.buildRangeFromDuration=function(e,t,n,s){function a(){d=e.clone().startOf(p),u=d.clone().add(n),h=new r.default(d,u)}var l,c,d,u,h,p=this.opt("dateAlignment");return p||((l=this.opt("dateIncrement"))?(c=i.duration(l),p=c<n?o.computeDurationGreatestUnit(c,l):s):p=s),
22n.as("days")<=1&&this._view.isHiddenDay(d)&&(d=this._view.skipHiddenDays(d,t)).startOf("day"),a(),this.trimHiddenDays(h)||(e=this._view.skipHiddenDays(e,t),a()),h},e.prototype.buildRangeFromDayCount=function(e,t,n){var i,o=this.opt("dateAlignment"),s=0,a=e.clone();o&&a.startOf(o),a.startOf("day"),i=(a=this._view.skipHiddenDays(a,t)).clone();do{i.add(1,"day"),this._view.isHiddenDay(i)||s++}while(s<n);return new r.default(a,i)},e.prototype.buildCustomVisibleRange=function(e){var t=this._view.getUnzonedRangeOption("visibleRange",this._view.calendar.applyTimezone(e));return!t||null!=t.startMs&&null!=t.endMs?t:null},e.prototype.buildRenderRange=function(e){return e.clone()},e.prototype.buildDateIncrement=function(e){var t,n=this.opt("dateIncrement");return n?i.duration(n):(t=this.opt("dateAlignment"))?i.duration(1,t):e||i.duration({days:1})},e}();t.default=s},function(e,t,n){function i(e){var t,n,i,o,l=a.dataAttrPrefix;return l&&(l+="-"),(t=e.data(l+"event")||null)&&(null==(n=(t="object"==typeof t?r.extend({},t):{}).start)&&(n=t.time),i=t.duration,o=t.stick,delete t.start,delete t.time,delete t.duration,delete t.stick),null==n&&(n=e.data(l+"start")),null==n&&(n=e.data(l+"time")),null==i&&(i=e.data(l+"duration")),null==o&&(o=e.data(l+"stick")),{eventProps:t,startTime:n=null!=n?s.duration(n):null,duration:i=null!=i?s.duration(i):null,stick:o=Boolean(o)}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(2),r=n(3),s=n(0),a=n(16),l=n(4),c=n(10),d=n(7),u=n(23),h=n(13),p=n(18),f=n(6),m=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.isDragging=!1,t}return o.__extends(t,e),t.prototype.end=function(){this.dragListener&&this.dragListener.endInteraction()},t.prototype.bindToDocument=function(){this.listenTo(r(document),{dragstart:this.handleDragStart,sortstart:this.handleDragStart})},t.prototype.unbindFromDocument=function(){this.stopListeningTo(r(document))},t.prototype.handleDragStart=function(e,t){var n,i;
22this.opt("droppable")&&(n=r((t?t.item:null)||e.target),i=this.opt("dropAccept"),(r.isFunction(i)?i.call(n[0],n):n.is(i))&&(this.isDragging||this.listenToExternalDrag(n,e,t)))},t.prototype.listenToExternalDrag=function(e,t,n){var o,r=this,s=this.component,a=this.view,c=i(e),d=this.dragListener=new u.default(s,{interactionStart:function(){r.isDragging=!0},hitOver:function(e){var t,n=!0,i=e.component.getSafeHitFootprint(e);i&&(o=r.computeExternalDrop(i,c))?(t=new p.default(o.buildInstances()),n=c.eventProps?s.isEventInstanceGroupAllowed(t):s.isExternalInstanceGroupAllowed(t)):n=!1,n||(o=null,l.disableCursor()),o&&s.renderDrag(s.eventRangesToEventFootprints(t.sliceRenderRanges(s.dateProfile.renderUnzonedRange,a.calendar)))},hitOut:function(){o=null},hitDone:function(){l.enableCursor(),s.unrenderDrag()},interactionEnd:function(t){o&&a.reportExternalDrop(o,Boolean(c.eventProps),Boolean(c.stick),e,t,n),r.isDragging=!1,r.dragListener=null}});d.startDrag(t)},t.prototype.computeExternalDrop=function(e,t){var n,i=this.view.calendar,o=c.default.utc(e.unzonedRange.startMs).stripZone();return e.isAllDay&&(t.startTime?o.time(t.startTime):o.stripTime()),t.duration&&(n=o.clone().add(t.duration)),o=i.applyTimezone(o),n&&(n=i.applyTimezone(n)),h.default.parse(r.extend({},t.eventProps,{start:o,end:n}),new f.default(i))},t}(n(15).default);t.default=m,d.default.mixInto(m),a.dataAttrPrefix=""},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),o=n(3),r=n(4),s=n(37),a=n(50),l=n(23),c=function(e){function t(t,n){var i=e.call(this,t)||this;return i.isResizing=!1,i.eventPointing=n,i}return i.__extends(t,e),t.prototype.end=function(){this.dragListener&&this.dragListener.endInteraction()},t.prototype.bindToEl=function(e){var t=this.component;t.bindSegHandlerToEl(e,"mousedown",this.handleMouseDown.bind(this)),t.bindSegHandlerToEl(e,"touchstart",this.handleTouchStart.bind(this))},t.prototype.handleMouseDown=function(e,t){this.component.canStartResize(e,t)&&this.buildDragListener(e,o(t.target).is(".fc-start-resizer")).startInteraction(t,{distance:5})},t.prototype.handleTouchStart=function(e,t){this.component.canStartResize(e,t)&&this.buildDragListener(e,o(t.target).is(".fc-start-resizer")).startInteraction(t)},t.prototype.buildDragListener=function(e,t){var n,i,o=this,s=this.component,a=this.view,c=a.calendar,d=c.eventManager,u=e.el,h=e.footprint.eventDef,p=e.footprint.eventInstance;return this.dragListener=new l.default(s,{scroll:this.opt("dragScroll"),subjectEl:u,interactionStart:function(){n=!1},dragStart:function(t){n=!0,o.eventPointing.handleMouseout(e,t),o.segResizeStart(e,t)},hitOver:function(n,l,u){var p,f=!0,m=s.getSafeHitFootprint(u),g=s.getSafeHitFootprint(n);m&&g&&(i=t?o.computeEventStartResizeMutation(m,g,e.footprint):o.computeEventEndResizeMutation(m,g,e.footprint))?(p=d.buildMutatedEventInstanceGroup(h.id,i),f=s.isEventInstanceGroupAllowed(p)):f=!1,f?i.isEmpty()&&(i=null):(i=null,r.disableCursor()),i&&(a.hideEventsWithId(e.footprint.eventDef.id),a.renderEventResize(s.eventRangesToEventFootprints(p.sliceRenderRanges(s.dateProfile.renderUnzonedRange,c)),e))},hitOut:function(){i=null},hitDone:function(){a.unrenderEventResize(e),a.showEventsWithId(e.footprint.eventDef.id),r.enableCursor()},interactionEnd:function(t){n&&o.segResizeStop(e,t),i&&a.reportEventResize(p,i,u,t),o.dragListener=null}})},t.prototype.segResizeStart=function(e,t){this.isResizing=!0,this.component.publiclyTrigger("eventResizeStart",{context:e.el[0],args:[e.footprint.getEventLegacy(),t,{},this.view]})},t.prototype.segResizeStop=function(e,t){this.isResizing=!1,this.component.publiclyTrigger("eventResizeStop",{context:e.el[0],args:[e.footprint.getEventLegacy(),t,{},this.view]})},t.prototype.computeEventStartResizeMutation=function(e,t,n){var i,o,r=n.componentFootprint.unzonedRange,l=this.component.diffDates(t.unzonedRange.getStart(),e.unzonedRange.getStart());return r.getStart().add(l)<r.getEnd()&&((i=new a.default).setStartDelta(l),(o=new s.default).setDateMutation(i),o)},t.prototype.computeEventEndResizeMutation=function(e,t,n){var i,o,r=n.componentFootprint.unzonedRange,l=this.component.diffDates(t.unzonedRange.getEnd(),e.unzonedRange.getEnd());return r.getEnd().add(l)>r.getStart()&&((i=new a.default).setEndDelta(l),(o=new s.default).setDateMutation(i),o)},t}(n(15).default);t.default=c}
22,function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),o=n(4),r=n(37),s=n(50),a=n(54),l=n(23),c=n(244),d=function(e){function t(t,n){var i=e.call(this,t)||this;return i.isDragging=!1,i.eventPointing=n,i}return i.__extends(t,e),t.prototype.end=function(){this.dragListener&&this.dragListener.endInteraction()},t.prototype.getSelectionDelay=function(){var e=this.opt("eventLongPressDelay");return null==e&&(e=this.opt("longPressDelay")),e},t.prototype.bindToEl=function(e){var t=this.component;t.bindSegHandlerToEl(e,"mousedown",this.handleMousedown.bind(this)),t.bindSegHandlerToEl(e,"touchstart",this.handleTouchStart.bind(this))},t.prototype.handleMousedown=function(e,t){!this.component.shouldIgnoreMouse()&&this.component.canStartDrag(e,t)&&this.buildDragListener(e).startInteraction(t,{distance:5})},t.prototype.handleTouchStart=function(e,t){var n=this.component,i={delay:this.view.isEventDefSelected(e.footprint.eventDef)?0:this.getSelectionDelay()};n.canStartDrag(e,t)?this.buildDragListener(e).startInteraction(t,i):n.canStartSelection(e,t)&&this.buildSelectListener(e).startInteraction(t,i)},t.prototype.buildSelectListener=function(e){var t=this,n=this.view,i=e.footprint.eventDef,o=e.footprint.eventInstance;if(this.dragListener)return this.dragListener;var r=this.dragListener=new a.default({dragStart:function(){r.isTouch&&!n.isEventDefSelected(i)&&o&&n.selectEventInstance(o)},interactionEnd:function(){t.dragListener=null}});return r},t.prototype.buildDragListener=function(e){var t,n,i,r=this,s=this.component,a=this.view,d=a.calendar,u=d.eventManager,h=e.el,p=e.footprint.eventDef,f=e.footprint.eventInstance;if(this.dragListener)return this.dragListener;var m=this.dragListener=new l.default(a,{scroll:this.opt("dragScroll"),subjectEl:h,subjectCenter:!0,interactionStart:function(i){e.component=s,t=!1,(n=new c.default(e.el,{additionalClass:"fc-dragging",parentEl:a.el,opacity:m.isTouch?null:r.opt("dragOpacity"),revertDuration:r.opt("dragRevertDuration"),zIndex:2})).hide(),n.start(i)},dragStart:function(n){m.isTouch&&!a.isEventDefSelected(p)&&f&&a.selectEventInstance(f),t=!0,r.eventPointing.handleMouseout(e,n),r.segDragStart(e,n),a.hideEventsWithId(e.footprint.eventDef.id)},hitOver:function(t,l,c){var h,f,g,v=!0;e.hit&&(c=e.hit),h=c.component.getSafeHitFootprint(c),f=t.component.getSafeHitFootprint(t),h&&f&&(i=r.computeEventDropMutation(h,f,p))?(g=u.buildMutatedEventInstanceGroup(p.id,i),v=s.isEventInstanceGroupAllowed(g)):v=!1,v||(i=null,o.disableCursor()),i&&a.renderDrag(s.eventRangesToEventFootprints(g.sliceRenderRanges(s.dateProfile.renderUnzonedRange,d)),e,m.isTouch)?n.hide():n.show(),l&&(i=null)},hitOut:function(){a.unrenderDrag(e),n.show(),i=null},hitDone:function(){o.enableCursor()},interactionEnd:function(o){delete e.component,n.stop(!i,function(){t&&(a.unrenderDrag(e),r.segDragStop(e,o)),a.showEventsWithId(e.footprint.eventDef.id),i&&a.reportEventDrop(f,i,h,o)}),r.dragListener=null}});return m},t.prototype.segDragStart=function(e,t){this.isDragging=!0,this.component.publiclyTrigger("eventDragStart",{context:e.el[0],args:[e.footprint.getEventLegacy(),t,{},this.view]})},t.prototype.segDragStop=function(e,t){this.isDragging=!1,this.component.publiclyTrigger("eventDragStop",{context:e.el[0],args:[e.footprint.getEventLegacy(),t,{},this.view]})},t.prototype.computeEventDropMutation=function(e,t){var n=new r.default;return n.setDateMutation(this.computeEventDateMutation(e,t)),n},t.prototype.computeEventDateMutation=function(e,t){var n,i,o=e.unzonedRange.getStart(),r=t.unzonedRange.getStart(),a=!1,l=!1,c=!1;return e.isAllDay!==t.isAllDay&&(a=!0,t.isAllDay?(c=!0,o.stripTime()):l=!0),n=this.component.diffDates(r,o),(i=new s.default).clearEnd=a,i.forceTimed=l,i.forceAllDay=c,i.setDateDelta(n),i},t}(n(15).default);t.default=d},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),o=n(4),r=n(23),s=n(12),a=n(5),l=function(e){function t(t){var n=e.call(this,t)||this;return n.dragListener=n.buildDragListener(),n}return i.__extends(t,e),t.prototype.end=function(){this.dragListener.endInteraction()},t.prototype.getDelay=function(){var e=this.opt("selectLongPressDelay");return null==e&&(e=this.opt("longPressDelay")),e},t.prototype.bindToEl=function(e){var t=this,n=this.component,i=this.dragListener;n.bindDateHandlerToEl(e,"mousedown",function(e){t.opt("selectable")&&!n.shouldIgnoreMouse()&&i.startInteraction(e,{distance:t.opt("selectMinDistance")})}),n.bindDateHandlerToEl(e,"touchstart",function(e){t.opt("selectable")&&!n.shouldIgnoreTouch()&&i.startInteraction(e,{delay:t.getDelay()})}),o.preventSelection(e)},t.prototype.buildDragListener=function(){var e,t=this,n=this.component;return new r.default(n,{scroll:this.opt("dragScroll"),interactionStart:function(){e=null},dragStart:function(e){t.view.unselect(e)},hitOver:function(i,r,s){var a,l;s&&(a=n.getSafeHitFootprint(s),l=n.getSafeHitFootprint(i),(e=a&&l?t.computeSelection(a,l):null)?n.renderSelectionFootprint(e):!1===e&&o.disableCursor(
22))},hitOut:function(){e=null,n.unrenderSelection()},hitDone:function(){o.enableCursor()},interactionEnd:function(n,i){!i&&e&&t.view.reportSelection(e,n)}})},t.prototype.computeSelection=function(e,t){var n=this.computeSelectionFootprint(e,t);return!(n&&!this.isSelectionFootprintAllowed(n))&&n},t.prototype.computeSelectionFootprint=function(e,t){var n=[e.unzonedRange.startMs,e.unzonedRange.endMs,t.unzonedRange.startMs,t.unzonedRange.endMs];return n.sort(o.compareNumbers),new s.default(new a.default(n[0],n[3]),e.isAllDay)},t.prototype.isSelectionFootprintAllowed=function(e){return this.component.dateProfile.validUnzonedRange.containsRange(e.unzonedRange)&&this.view.calendar.constraints.isSelectionFootprintAllowed(e)},t}(n(15).default);t.default=l},function(e,t,n){function i(e){var t,n=[],i=[];for(t=0;t<e.length;t++)e[t].componentFootprint.isAllDay?n.push(e[t]):i.push(e[t]);return{allDay:n,timed:i}}Object.defineProperty(t,"__esModule",{value:!0});var o,r,s=n(2),a=n(0),l=n(3),c=n(4),d=n(39),u=n(41),h=n(227),p=n(61),f=5,m=function(e){function t(t,n){var i=e.call(this,t,n)||this;return i.usesMinMaxTime=!0,i.timeGrid=i.instantiateTimeGrid(),i.addChild(i.timeGrid),i.opt("allDaySlot")&&(i.dayGrid=i.instantiateDayGrid(),i.addChild(i.dayGrid)),i.scroller=new d.default({overflowX:"hidden",overflowY:"auto"}),i}return s.__extends(t,e),t.prototype.instantiateTimeGrid=function(){var e=new this.timeGridClass(this);return c.copyOwnProps(o,e),e},t.prototype.instantiateDayGrid=function(){var e=new this.dayGridClass(this);return c.copyOwnProps(r,e),e},t.prototype.renderSkeleton=function(){var e,t;this.el.addClass("fc-agenda-view").html(this.renderSkeletonHtml()),this.scroller.render(),e=this.scroller.el.addClass("fc-time-grid-container"),t=l('<div class="fc-time-grid" />').appendTo(e),this.el.find(".fc-body > tr > td").append(e),this.timeGrid.headContainerEl=this.el.find(".fc-head-container"),this.timeGrid.setElement(t),this.dayGrid&&(this.dayGrid.setElement(this.el.find(".fc-day-grid")),this.dayGrid.bottomCoordPadding=this.dayGrid.el.next("hr").outerHeight())},t.prototype.unrenderSkeleton=function(){this.timeGrid.removeElement(),this.dayGrid&&this.dayGrid.removeElement(),this.scroller.destroy()},t.prototype.renderSkeletonHtml=function(){var e=this.calendar.theme;return'<table class="'+e.getClass("tableGrid")+'">'+(this.opt("columnHeader")?'<thead class="fc-head"><tr><td class="fc-head-container '+e.getClass("widgetHeader")+'">&nbsp;</td></tr></thead>':"")+'<tbody class="fc-body"><tr><td class="'+e.getClass("widgetContent")+'">'+(this.dayGrid?'<div class="fc-day-grid"/><hr class="fc-divider '+e.getClass("widgetHeader")+'"/>':"")+"</td></tr></tbody></table>"},t.prototype.axisStyleAttr=function(){return null!=this.axisWidth?'style="width:'+this.axisWidth+'px"':""},t.prototype.getNowIndicatorUnit=function(){return this.timeGrid.getNowIndicatorUnit()},t.prototype.updateSize=function(t,n,i){var o,r,s;if(e.prototype.updateSize.call(this,t,n,i),this.axisWidth=c.matchCellWidths(this.el.find(".fc-axis")),this.timeGrid.colEls){var a=this.el.find(".fc-row:not(.fc-scroller *)");this.timeGrid.bottomRuleEl.hide(),this.scroller.clear(),c.uncompensateScroll(a),this.dayGrid&&(this.dayGrid.removeSegPopover(),(o=this.opt("eventLimit"))&&"number"!=typeof o&&(o=f),o&&this.dayGrid.limitRows(o)),n||(r=this.computeScrollerHeight(t),this.scroller.setHeight(r),((s=this.scroller.getScrollbarWidths()).left||s.right)&&(c.compensateScroll(a,s),r=this.computeScrollerHeight(t),this.scroller.setHeight(r)),this.scroller.lockOverflow(s),this.timeGrid.getTotalSlatHeight()<r&&this.timeGrid.bottomRuleEl.show())}else n||(r=this.computeScrollerHeight(t),this.scroller.setHeight(r))},t.prototype.computeScrollerHeight=function(e){return e-c.subtractInnerElHeight(this.el,this.scroller.el)},t.prototype.computeInitialDateScroll=function(){var e=a.duration(this.opt("scrollTime")),t=this.timeGrid.computeTimeTop(e);return(t=Math.ceil(t))&&t++,{top:t}},t.prototype.queryDateScroll=function(){return{top:this.scroller.getScrollTop()}},t.prototype.applyDateScroll=function(e){void 0!==e.top&&this.scroller.setScrollTop(e.top)},t.prototype.getHitFootprint=function(e){return e.component.getHitFootprint(e)},t.prototype.getHitEl=function(e){return e.component.getHitEl(e)},t.prototype.executeEventRender=function(e){var t,n,i={},o={};for(t in e)(n=e[t]).getEventDef().isAllDay()?i[t]=n:o[t]=n;this.timeGrid.executeEventRender(o),this.dayGrid&&this.dayGrid.executeEventRender(i)},t.prototype.renderDrag=function(e,t,n){var o=i(e),r=!1;return r=this.timeGrid.renderDrag(o.timed,t,n),this.dayGrid&&(r=this.dayGrid.renderDrag(o.allDay,t,n)||r),r},t.prototype.renderEventResize=function(e,t,n){var o=i(e);this.timeGrid.renderEventResize(o.timed,t,n),this.dayGrid&&this.dayGrid.renderEventResize(o.allDay,t,n)},t.prototype.renderSelectionFootprint=function(e){e.isAllDay?this.dayGrid&&this.dayGrid.renderSelectionFootprint(e):this.timeGrid.renderSelectionFootprint(e)},t}(u.default);t.default=m,m.prototype.timeGridClass=h.default,m.prototype.dayGridClass=p.default,o={renderHeadIntroHtml:function(){var e,t=this.view,n=t.calendar,i=n.msToUtcMoment(this.dateProfile.renderUnzonedRange.startMs,!0);return this.opt("weekNumbers")?(e=i.format(this.opt("smallWeekFormat")),'<th class="fc-axis fc-week-number '+n.theme.getClass("widgetHeader")+'" '+t.axisStyleAttr()+">"+t.buildGotoAnchorHtml({date:i,type:"week",forceOff:this.colCnt>1},c.htmlEscape(e))+"</th>"):'<th class="fc-axis '+n.theme.getClass("widgetHeader")+'" '+t.axisStyleAttr()+"></th>"},renderBgIntroHtml:function(){var e=this.view;return'<td class="fc-axis '+e.calendar.theme.getClass("widgetContent")+'" '+e.axisStyleAttr()+"></td>"},renderIntroHtml:function(){return'<td class="fc-axis" '+this.view.axisStyleAttr()+"></td>"}},r={renderBgIntroHtml:function(){var e=this.view;return'<td class="fc-axis '+e.calendar.theme.getClass("widgetContent")+'" '+e.axisStyleAttr()+"><span>"+e.getAllDayHtml()+"</span></td>"},renderIntroHtml:function(){return'<td class="fc-axis" '+this.view.axisStyleAttr()+"></td>"}}}
22,function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),o=n(3),r=n(0),s=n(4),a=n(40),l=n(56),c=n(60),d=n(55),u=n(53),h=n(5),p=n(12),f=n(246),m=n(247),g=n(248),v=[{hours:1},{minutes:30},{minutes:15},{seconds:30},{seconds:15}],y=function(e){function t(t){var n=e.call(this,t)||this;return n.processOptions(),n}return i.__extends(t,e),t.prototype.componentFootprintToSegs=function(e){var t,n=this.sliceRangeByTimes(e.unzonedRange);for(t=0;t<n.length;t++)this.isRTL?n[t].col=this.daysPerRow-1-n[t].dayIndex:n[t].col=n[t].dayIndex;return n},t.prototype.sliceRangeByTimes=function(e){var t,n,i=[];for(n=0;n<this.daysPerRow;n++)(t=e.intersect(this.dayRanges[n]))&&i.push({startMs:t.startMs,endMs:t.endMs,isStart:t.isStart,isEnd:t.isEnd,dayIndex:n});return i},t.prototype.processOptions=function(){var e,t=this.opt("slotDuration"),n=this.opt("snapDuration");t=r.duration(t),n=n?r.duration(n):t,this.slotDuration=t,this.snapDuration=n,this.snapsPerSlot=t/n,e=this.opt("slotLabelFormat"),o.isArray(e)&&(e=e[e.length-1]),this.labelFormat=e||this.opt("smallTimeFormat"),e=this.opt("slotLabelInterval"),this.labelInterval=e?r.duration(e):this.computeLabelInterval(t)},t.prototype.computeLabelInterval=function(e){var t,n,i;for(t=v.length-1;t>=0;t--)if(n=r.duration(v[t]),i=s.divideDurationByDuration(n,e),s.isInt(i)&&i>1)return n;return r.duration(e)},t.prototype.renderDates=function(e){this.dateProfile=e,this.updateDayTable(),this.renderSlats(),this.renderColumns()},t.prototype.unrenderDates=function(){this.unrenderColumns()},t.prototype.renderSkeleton=function(){var e=this.view.calendar.theme;this.el.html('<div class="fc-bg"></div><div class="fc-slats"></div><hr class="fc-divider '+e.getClass("widgetHeader")+'" style="display:none" />'),this.bottomRuleEl=this.el.find("hr")},t.prototype.renderSlats=function(){var e=this.view.calendar.theme;this.slatContainerEl=this.el.find("> .fc-slats").html('<table class="'+e.getClass("tableGrid")+'">'+this.renderSlatRowHtml()+"</table>"),this.slatEls=this.slatContainerEl.find("tr"),this.slatCoordCache=new u.default({els:this.slatEls,isVertical:!0})},t.prototype.renderSlatRowHtml=function(){for(var e,t,n,i=this.view,o=i.calendar,a=o.theme,l=this.isRTL,c=this.dateProfile,d="",u=r.duration(+c.minTime),h=r.duration(0);u<c.maxTime;)e=o.msToUtcMoment(c.renderUnzonedRange.startMs).time(u),t=s.isInt(s.divideDurationByDuration(h,this.labelInterval)),n='<td class="fc-axis fc-time '+a.getClass("widgetContent")+'" '+i.axisStyleAttr()+">"+(t?"<span>"+s.htmlEscape(e.format(this.labelFormat))+"</span>":"")+"</td>",d+='<tr data-time="'+e.format("HH:mm:ss")+'"'+(t?"":' class="fc-minor"')+">"+(l?"":n)+'<td class="'+a.getClass("widgetContent")+'"/>'+(l?n:"")+"</tr>",u.add(this.slotDuration),h.add(this.slotDuration);return d},t.prototype.renderColumns=function(){var e=this.dateProfile,t=this.view.calendar.theme;this.dayRanges=this.dayDates.map(function(t){return new h.default(t.clone().add(e.minTime),t.clone().add(e.maxTime))}),this.headContainerEl&&this.headContainerEl.html(this.renderHeadHtml()),this.el.find("> .fc-bg").html('<table class="'+t.getClass("tableGrid")+'">'+this.renderBgTrHtml(0)+"</table>"),this.colEls=this.el.find(".fc-day, .fc-disabled-day"),this.colCoordCache=new u.default({els:this.colEls,isHorizontal:!0}),this.renderContentSkeleton()},t.prototype.unrenderColumns=function(){this.unrenderContentSkeleton()},t.prototype.renderContentSkeleton=function(){var e,t,n="";for(e=0;e<this.colCnt;e++)n+='<td><div class="fc-content-col"><div class="fc-event-container fc-helper-container"></div><div class="fc-event-container"></div><div class="fc-highlight-container"></div><div class="fc-bgevent-container"></div><div class="fc-business-container"></div></div></td>';t=this.contentSkeletonEl=o('<div class="fc-content-skeleton"><table><tr>'+n+"</tr></table></div>"),this.colContainerEls=t.find(".fc-content-col"),this.helperContainerEls=t.find(".fc-helper-container"),this.fgContainerEls=t.find(".fc-event-container:not(.fc-helper-container)"),this.bgContainerEls=t.find(".fc-bgevent-container"),this.highlightContainerEls=t.find(".fc-highlight-container"),this.businessContainerEls=t.find(".fc-business-container"),this.bookendCells(t.find("tr")),this.el.append(t)},t.prototype.unrenderContentSkeleton=function(){this.contentSkeletonEl&&(this.contentSkeletonEl.remove(),this.contentSkeletonEl=null,this.colContainerEls=null,this.helperContainerEls=null,this.fgContainerEls=null,this.bgContainerEls=null,this.highlightContainerEls=null,this.businessContainerEls=null)},t.prototype.groupSegsByCol=function(e){var t,n=[];for(t=0;t<this.colCnt;t++)n.push([]);for(t=0;t<e.length;t++)n[e[t].col].push(e[t]);return n},t.prototype.attachSegsByCol=function(e,t){var n,i,o;for(n=0;n<this.colCnt;n++)for(i=e[n],o=0;o<i.length;o++)t.eq(n).append(i[o].el)},t.prototype.getNowIndicatorUnit=function(){return"minute"},t.prototype.renderNowIndicator=function(e){if(this.colContainerEls){var t,n=this.componentFootprintToSegs(new p.default(new h.default(e,e.valueOf()+1),!1)),i=this.computeDateTop(e,e),r=[];for(t=0;t<n.length;t++)r.push(o('<div class="fc-now-indicator fc-now-indicator-line"></div>').css("top",i).appendTo(this.colContainerEls.eq(n[t].col))[0]);n.length>0&&r.push(o('<div class="fc-now-indicator fc-now-indicator-arrow"></div>').css("top",i).appendTo(this.el.find(".fc-content-skeleton"))[0]),this.nowIndicatorEls=o(r)}},t.prototype.unrenderNowIndicator=function(){this.nowIndicatorEls&&(this.nowIndicatorEls.remove(),this.nowIndicatorEls=null)},t.prototype.updateSize=function(t,n,i){e.prototype.updateSize.call(this,t,n,i),this.slat
22CoordCache.build(),i&&this.updateSegVerticals([].concat(this.eventRenderer.getSegs(),this.businessSegs||[]))},t.prototype.getTotalSlatHeight=function(){return this.slatContainerEl.outerHeight()},t.prototype.computeDateTop=function(e,t){return this.computeTimeTop(r.duration(e-t.clone().stripTime()))},t.prototype.computeTimeTop=function(e){var t,n,i=this.slatEls.length,o=(e-this.dateProfile.minTime)/this.slotDuration;return o=Math.max(0,o),o=Math.min(i,o),t=Math.floor(o),n=o-(t=Math.min(t,i-1)),this.slatCoordCache.getTopPosition(t)+this.slatCoordCache.getHeight(t)*n},t.prototype.updateSegVerticals=function(e){this.computeSegVerticals(e),this.assignSegVerticals(e)},t.prototype.computeSegVerticals=function(e){var t,n,i,o=this.opt("agendaEventMinHeight");for(t=0;t<e.length;t++)n=e[t],i=this.dayDates[n.dayIndex],n.top=this.computeDateTop(n.startMs,i),n.bottom=Math.max(n.top+o,this.computeDateTop(n.endMs,i))},t.prototype.assignSegVerticals=function(e){var t,n;for(t=0;t<e.length;t++)(n=e[t]).el.css(this.generateSegVerticalCss(n))},t.prototype.generateSegVerticalCss=function(e){return{top:e.top,bottom:-e.bottom}},t.prototype.prepareHits=function(){this.colCoordCache.build(),this.slatCoordCache.build()},t.prototype.releaseHits=function(){this.colCoordCache.clear()},t.prototype.queryHit=function(e,t){var n=this.snapsPerSlot,i=this.colCoordCache,o=this.slatCoordCache;if(i.isLeftInBounds(e)&&o.isTopInBounds(t)){var r=i.getHorizontalIndex(e),s=o.getVerticalIndex(t);if(null!=r&&null!=s){var a=o.getTopOffset(s),l=o.getHeight(s),c=(t-a)/l,d=Math.floor(c*n),u=a+d/n*l,h=a+(d+1)/n*l;return{col:r,snap:s*n+d,component:this,left:i.getLeftOffset(r),right:i.getRightOffset(r),top:u,bottom:h}}}},t.prototype.getHitFootprint=function(e){var t,n=this.getCellDate(0,e.col),i=this.computeSnapTime(e.snap);return n.time(i),t=n.clone().add(this.snapDuration),new p.default(new h.default(n,t),!1)},t.prototype.computeSnapTime=function(e){return r.duration(this.dateProfile.minTime+this.snapDuration*e)},t.prototype.getHitEl=function(e){return this.colEls.eq(e.col)},t.prototype.renderDrag=function(e,t,n){var i;if(t){if(e.length)return this.helperRenderer.renderEventDraggingFootprints(e,t,n),!0}else for(i=0;i<e.length;i++)this.renderHighlight(e[i].componentFootprint)},t.prototype.unrenderDrag=function(){this.unrenderHighlight(),this.helperRenderer.unrender()},t.prototype.renderEventResize=function(e,t,n){this.helperRenderer.renderEventResizingFootprints(e,t,n)},t.prototype.unrenderEventResize=function(){this.helperRenderer.unrender()},t.prototype.renderSelectionFootprint=function(e){this.opt("selectHelper")?this.helperRenderer.renderComponentFootprint(e):this.renderHighlight(e)},t.prototype.unrenderSelection=function(){this.helperRenderer.unrender(),this.unrenderHighlight()},t}(a.default);t.default=y,y.prototype.eventRendererClass=f.default,y.prototype.businessHourRendererClass=l.default,y.prototype.helperRendererClass=m.default,y.prototype.fillRendererClass=g.default,c.default.mixInto(y),d.default.mixInto(y)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),o=n(5),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.prototype.buildRenderRange=function(t,n,i){var r=e.prototype.buildRenderRange.call(this,t,n,i),s=this.msToUtcMoment(r.startMs,i),a=this.msToUtcMoment(r.endMs,i);return/^(year|month)$/.test(n)&&(s.startOf("week"),a.weekday()&&a.add(1,"week").startOf("week")),new o.default(s,a)},t}(n(221).default);t.default=r},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),o=n(0),r=n(4),s=n(62),a=n(253),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.prototype.setGridHeight=function(e,t){t&&(e*=this.dayGrid.rowCnt/6),r.distributeHeight(this.dayGrid.rowEls,e,!t)},t.prototype.isDateInOtherMonth=function(e,t){return e.month()!==o.utc(t.currentUnzonedRange.startMs).month()},t}(s.default);t.default=l,l.prototype.dateProfileGeneratorClass=a.default},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),o=n(3),r=n(4),s=n(5),a=n(41),l=n(39),c=n(254),d=n(255),u=function(e){function t(t,n){var i=e.call(this,t,n)||this;return i.segSelector=".fc-list-item",i.scroller=new l.default({overflowX:"hidden",overflowY:"auto"}),i}return i.__extends(t,e),t.prototype.renderSkeleton=function(){this.el.addClass("fc-list-view "+this.calendar.theme.getClass("listView")),this.scroller.render(),this.scroller.el.appendTo(this.el),this.contentEl=this.scroller.scrollEl},t.prototype.unrenderSkeleton=function(){this.scroller.destroy()},t.prototype.updateSize=function(t,n,i){e.prototype.updateSize.call(this,t,n,i),this.scroller.clear(),n||this.scroller.setHeight(this.computeScrollerHeight(t))},t.prototype.computeScrollerHeight=function(e){return e-r.subtractInnerElHe
22ight(this.el,this.scroller.el)},t.prototype.renderDates=function(e){for(var t=this.calendar,n=t.msToUtcMoment(e.renderUnzonedRange.startMs,!0),i=t.msToUtcMoment(e.renderUnzonedRange.endMs,!0),o=[],r=[];n<i;)o.push(n.clone()),r.push(new s.default(n,n.clone().add(1,"day"))),n.add(1,"day");this.dayDates=o,this.dayRanges=r},t.prototype.componentFootprintToSegs=function(e){var t,n,i,o=this.dayRanges,r=[];for(t=0;t<o.length;t++)if((n=e.unzonedRange.intersect(o[t]))&&(i={startMs:n.startMs,endMs:n.endMs,isStart:n.isStart,isEnd:n.isEnd,dayIndex:t},r.push(i),!i.isEnd&&!e.isAllDay&&t+1<o.length&&e.unzonedRange.endMs<o[t+1].startMs+this.nextDayThreshold)){i.endMs=e.unzonedRange.endMs,i.isEnd=!0;break}return r},t.prototype.renderEmptyMessage=function(){this.contentEl.html('<div class="fc-list-empty-wrap2"><div class="fc-list-empty-wrap1"><div class="fc-list-empty">'+r.htmlEscape(this.opt("noEventsMessage"))+"</div></div></div>")},t.prototype.renderSegList=function(e){var t,n,i,r=this.groupSegsByDay(e),s=o('<table class="fc-list-table '+this.calendar.theme.getClass("tableList")+'"><tbody/></table>'),a=s.find("tbody");for(t=0;t<r.length;t++)if(n=r[t])for(a.append(this.dayHeaderHtml(this.dayDates[t])),this.eventRenderer.sortEventSegs(n),i=0;i<n.length;i++)a.append(n[i].el);this.contentEl.empty().append(s)},t.prototype.groupSegsByDay=function(e){var t,n,i=[];for(t=0;t<e.length;t++)(i[(n=e[t]).dayIndex]||(i[n.dayIndex]=[])).push(n);return i},t.prototype.dayHeaderHtml=function(e){var t=this.opt("listDayFormat"),n=this.opt("listDayAltFormat");return'<tr class="fc-list-heading" data-date="'+e.format("YYYY-MM-DD")+'"><td class="'+(this.calendar.theme.getClass("tableListHeading")||this.calendar.theme.getClass("widgetHeader"))+'" colspan="3">'+(t?this.buildGotoAnchorHtml(e,{class:"fc-list-heading-main"},r.htmlEscape(e.format(t))):"")+(n?this.buildGotoAnchorHtml(e,{class:"fc-list-heading-alt"},r.htmlEscape(e.format(n))):"")+"</td></tr>"},t}(a.default);t.default=u,u.prototype.eventRendererClass=c.default,u.prototype.eventPointingClass=d.default},,,,,,function(e,t,n){var i=n(3),o=n(16),r=n(4),s=n(220);n(10),n(47),n(256),n(257),n(260),n(261),n(262),n(263),i.fullCalendar=o,i.fn.fullCalendar=function(e){var t=Array.prototype.slice.call(arguments,1),n=this;return this.each(function(o,a){var l,c=i(a),d=c.data("fullCalendar");"string"==typeof e?"getCalendar"===e?o||(n=d):"destroy"===e?d&&(d.destroy(),c.removeData("fullCalendar")):d?i.isFunction(d[e])?(l=d[e].apply(d,t),o||(n=l),"destroy"===e&&c.removeData("fullCalendar")):r.warn("'"+e+"' is an unknown FullCalendar method."):r.warn("Attempting to call a FullCalendar method on an element with no calendar."):d||(d=new s.default(c,e),c.data("fullCalendar",d),d.render())}),n},e.exports=o},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.prototype.setElement=function(e){this.el=e,this.bindGlobalHandlers(),this.renderSkeleton(),this.set("isInDom",!0)},t.prototype.removeElement=function(){this.unset("isInDom"),this.unrenderSkeleton(),this.unbindGlobalHandlers(),this.el.remove()},t.prototype.bindGlobalHandlers=function(){},t.prototype.unbindGlobalHandlers=function(){},t.prototype.renderSkeleton=function(){},t.prototype.unrenderSkeleton=function(){},t}(n(48).default);t.default=o},function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e){this.items=e||[]}return e.prototype.proxyCall=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var i=[];return this.items.forEach(function(n){i.push(n[e].apply(n,t))}),i},e}();t.default=n},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),o=n(4),r=function(){function e(e,t){this.el=null,this.viewsWithButtons=[],this.calendar=e,this.toolbarOptions=t}return e.prototype.setToolbarOptions=function(e){this.toolbarOptions=e},e.prototype.render=function(){var e=this.toolbarOptions.layout,t=this.el;e?(t?t.empty():t=this.el=i("<div class='fc-toolbar "+this.toolbarOptions.extraClasse
22s+"'/>"),t.append(this.renderSection("left")).append(this.renderSection("right")).append(this.renderSection("center")).append('<div class="fc-clear"/>')):this.removeElement()},e.prototype.removeElement=function(){this.el&&(this.el.remove(),this.el=null)},e.prototype.renderSection=function(e){var t=this,n=this.calendar,r=n.theme,s=n.optionsManager,a=n.viewSpecManager,l=i('<div class="fc-'+e+'"/>'),c=this.toolbarOptions.layout[e],d=s.get("customButtons")||{},u=s.overrides.buttonText||{},h=s.get("buttonText")||{};return c&&i.each(c.split(" "),function(e,s){var c,p=i(),f=!0;i.each(s.split(","),function(e,s){var l,c,m,g,v,y,b,_,w;"title"===s?(p=p.add(i("<h2>&nbsp;</h2>")),f=!1):((l=d[s])?(m=function(e){l.click&&l.click.call(_[0],e)},
23(g=r.getCustomButtonIconClass(l))||(g=r.getIconClass(s))||(v=l.text)):(c=a.getViewSpec(s))?(t.viewsWithButtons.push(s),m=function(){n.changeView(s)},(v=c.buttonTextOverride)||(g=r.getIconClass(s))||(v=c.buttonTextDefault)):n[s]&&(m=function(){n[s]()},(v=u[s])||(g=r.getIconClass(s))||(v=h[s])),m&&(b=["fc-"+s+"-button",r.getClass("button"),r.getClass("stateDefault")],v?(y=o.htmlEscape(v),w=""):g&&(y="<span class='"+g+"'></span>",w=' aria-label="'+s+'"'),_=i('<button type="button" class="'+b.join(" ")+'"'+w+">"+y+"</button>").click(function(e){_.hasClass(r.getClass("stateDisabled"))||(m(e),(_.hasClass(r.getClass("stateActive"))||_.hasClass(r.getClass("stateDisabled")))&&_.removeClass(r.getClass("stateHover")))}).mousedown(function(){_.not("."+r.getClass("stateActive")).not("."+r.getClass("stateDisabled")).addClass(r.getClass("stateDown"))}).mouseup(function(){_.removeClass(r.getClass("stateDown"))}).hover(function(){_.not("."+r.getClass("stateActive")).not("."+r.getClass("stateDisabled")).addClass(r.getClass("stateHover"))},function(){_.removeClass(r.getClass("stateHover")).removeClass(r.getClass("stateDown"))}),p=p.add(_)))}),f&&p.first().addClass(r.getClass("cornerLeft")).end().last().addClass(r.getClass("cornerRight")).end(),p.length>1?(c=i("<div/>"),f&&c.addClass(r.getClass("buttonGroup")),c.append(p),l.append(c)):l.append(p)}),l},e.prototype.updateTitle=function(e){this.el&&this.el.find("h2").text(e)},e.prototype.activateButton=function(e){this.el&&this.el.find(".fc-"+e+"-button").addClass(this.calendar.theme.getClass("stateActive"))},e.prototype.deactivateButton=function(e){this.el&&this.el.find(".fc-"+e+"-button").removeClass(this.calendar.theme.getClass("stateActive"))},e.prototype.disableButton=function(e){this.el&&this.el.find(".fc-"+e+"-button").prop("disabled",!0).addClass(this.calendar.theme.getClass("stateDisabled"))},e.prototype.enableButton=function(e){this.el&&this.el.find(".fc-"+e+"-button").prop("disabled",!1).removeClass(this.calendar.theme.getClass("stateDisabled"))},e.prototype.getViewsWithButtons=function(){return this.viewsWithButtons},e}();t.default=r},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),o=n(3),r=n(4),s=n(32),a=n(31),l=function(e){function t(t,n){var i=e.call(this)||this;return i._calendar=t,i.overrides=o.extend({},n),i.dynamicOverrides={},i.compute(),i}return i.__extends(t,e),t.prototype.add=function(e){var t,n=0;for(t in this.recordOverrides(e),e)n++;if(1===n){if("height"===t||"contentHeight"===t||"aspectRatio"===t)return void this._calendar.updateViewSize(!0);if("defaultDate"===t)return;if("businessHours"===t)return;if(/^(event|select)(Overlap|Constraint|Allow)$/.test(t))return;if("timezone"===t)return void this._calendar.view.flash("initialEvents")}this._calendar.renderHeader(),this._calendar.renderFooter(),this._calendar.viewsByType={},this._calendar.reinitView()},t.prototype.compute=function(){var e,t,n,i;e=r.firstDefined(this.dynamicOverrides.locale,this.overrides.locale),(t=a.localeOptionHash[e])||(e=s.globalDefaults.locale,t=a.localeOptionHash[e]||{}),n=r.firstDefined(this.dynamicOverrides.isRTL,this.overrides.isRTL,t.isRTL,s.globalDefaults.isRTL)?s.rtlDefaults:{},this.dirDefaults=n,this.localeDefaults=t,i=s.mergeOptions([s.globalDefaults,n,t,this.overrides,this.dynamicOverrides]),a.populateInstanceComputableOptions(i),this.reset(i)},t.prototype.recordOverrides=function(e){var t;for(t in e)this.dynamicOverrides[t]=e[t];this._calendar.viewSpecManager.clearCache(),this.compute()},t}(n(48).default);t.default=l}
23,function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),o=n(3),r=n(22),s=n(4),a=n(32),l=n(31),c=function(){function e(e,t){this.optionsManager=e,this._calendar=t,this.clearCache()}return e.prototype.clearCache=function(){this.viewSpecCache={}},e.prototype.getViewSpec=function(e){var t=this.viewSpecCache;return t[e]||(t[e]=this.buildViewSpec(e))},e.prototype.getUnitViewSpec=function(e){var t,n,i;if(-1!==o.inArray(e,s.unitsDesc))for(t=this._calendar.header.getViewsWithButtons(),o.each(r.viewHash,function(e){t.push(e)}),n=0;n<t.length;n++)if((i=this.getViewSpec(t[n]))&&i.singleUnit===e)return i},e.prototype.buildViewSpec=function(e){for(var t,n,o,l,c,d=this.optionsManager.overrides.views||{},u=[],h=[],p=[],f=e;f;)t=r.viewHash[f],n=d[f],f=null,"function"==typeof t&&(t={class:t}),t&&(u.unshift(t),h.unshift(t.defaults||{}),o=o||t.duration,f=f||t.type),n&&(p.unshift(n),o=o||n.duration,f=f||n.type);return(t=s.mergeProps(u)).type=e,!!t.class&&((o=o||this.optionsManager.dynamicOverrides.duration||this.optionsManager.overrides.duration)&&(l=i.duration(o)).valueOf()&&(c=s.computeDurationGreatestUnit(l,o),t.duration=l,t.durationUnit=c,1===l.as(c)&&(t.singleUnit=c,p.unshift(d[c]||{}))),t.defaults=a.mergeOptions(h),t.overrides=a.mergeOptions(p),this.buildViewSpecOptions(t),this.buildViewSpecButtonText(t,e),t)},e.prototype.buildViewSpecOptions=function(e){var t=this.optionsManager;e.options=a.mergeOptions([a.globalDefaults,e.defaults,t.dirDefaults,t.localeDefaults,t.overrides,e.overrides,t.dynamicOverrides]),l.populateInstanceComputableOptions(e.options)},e.prototype.buildViewSpecButtonText=function(e,t){function n(n){var i=n.buttonText||{};return i[t]||(e.buttonTextKey?i[e.buttonTextKey]:null)||(e.singleUnit?i[e.singleUnit]:null)}var i=this.optionsManager;e.buttonTextOverride=n(i.dynamicOverrides)||n(i.overrides)||e.overrides.buttonText,e.buttonTextDefault=n(i.localeDefaults)||n(i.dirDefaults)||e.defaults.buttonText||n(a.globalDefaults)||(e.duration?this._calendar.humanizeDuration(e.duration):null)||t},e}();t.default=c},function(e,t,n){function i(e,t){return e.getPrimitive()===t.getPrimitive()}Object.defineProperty(t,"__esModule",{value:!0});var o=n(3),r=n(4),s=n(243),a=n(52),l=n(6),c=n(38),d=n(13),u=n(18),h=n(11),p=n(7),f=function(){function e(e){this.calendar=e,this.stickySource=new a.default(e),this.otherSources=[]}return e.prototype.requestEvents=function(e,t,n,i){return!i&&this.currentPeriod&&this.currentPeriod.isWithinRange(e,t)&&n===this.currentPeriod.timezone||this.setPeriod(new s.default(e,t,n)),this.currentPeriod.whenReleased()},e.prototype.addSource=function(e){this.otherSources.push(e),this.currentPeriod&&this.currentPeriod.requestSource(e)},e.prototype.removeSource=function(e){r.removeExact(this.otherSources,e),this.currentPeriod&&this.currentPeriod.purgeSource(e)},e.prototype.removeAllSources=function(){this.otherSources=[],this.currentPeriod&&this.currentPeriod.purgeAllSources()},e.prototype.refetchSource=function(e){var t=this.currentPeriod;t&&(t.freeze(),t.purgeSource(e),t.requestSource(e),t.thaw())},e.prototype.refetchAllSources=function(){var e=this.currentPeriod;e&&(e.freeze(),e.purgeAllSources(),e.requestSources(this.getSources()),e.thaw())},e.prototype.getSources=function(){return[this.stickySource].concat(this.otherSources)},e.prototype.multiQuerySources=function(e){e?o.isArray(e)||(e=[e]):e=[];var t,n=[];for(t=0;t<e.length;t++)n.push.apply(n,this.querySources(e[t]));return n},e.prototype.querySources=function(e){var t,n,r=this.otherSources;for(t=0;t<r.length;t++)if((n=r[t])===e)return[n];return(n=this.getSourceById(l.default.normalizeId(e)))?[n]:(e=c.default.parse(e,this.calendar))?o.grep(r,function(t){return i(e,t)}):void 0},e.prototype.getSourceById=function(e){return o.grep(this.otherSources,function(t){return t.id&&t.id===e})[0]},e.prototype.setPeriod=function(e){this.currentPeriod&&(this.unbindPeriod(this.currentPeriod),this.currentPeriod=null),this.currentPeriod=e,this.bindPeriod(e),e.requestSources(this.getSources())},e.prototype.bindPeriod=function(e){this.listenTo(e,"release",function(e){this.trigger("release",e)})},e.prototype.unbindPeriod=function(e){this.stopListeningTo(e)},e.prototype.getEventDefByUid=function(e){if(this.currentPeriod)return this.currentPeriod.getEventDefByUid(e)},e.prototype.addEventDef=function(e,t){t&&this.stickySource.addEventDef(e),this.currentPeriod&&this.currentPeriod.addEventDef(e)}
23,e.prototype.removeEventDefsById=function(e){this.getSources().forEach(function(t){t.removeEventDefsById(e)}),this.currentPeriod&&this.currentPeriod.removeEventDefsById(e)},e.prototype.removeAllEventDefs=function(){this.getSources().forEach(function(e){e.removeAllEventDefs()}),this.currentPeriod&&this.currentPeriod.removeAllEventDefs()},e.prototype.mutateEventsWithId=function(e,t){var n,i=this.currentPeriod,o=[];return i?(i.freeze(),(n=i.getEventDefsById(e)).forEach(function(e){i.removeEventDef(e),o.push(t.mutateSingle(e)),i.addEventDef(e)}),i.thaw(),function(){i.freeze();for(var e=0;e<n.length;e++)i.removeEventDef(n[e]),o[e](),i.addEventDef(n[e]);i.thaw()}):function(){}},e.prototype.buildMutatedEventInstanceGroup=function(e,t){var n,i,o=this.getEventDefsById(e),r=[];for(n=0;n<o.length;n++)(i=o[n].clone())instanceof d.default&&(t.mutateSingle(i),r.push.apply(r,i.buildInstances()));return new u.default(r)},e.prototype.freeze=function(){this.currentPeriod&&this.currentPeriod.freeze()},e.prototype.thaw=function(){this.currentPeriod&&this.currentPeriod.thaw()},e.prototype.getEventDefsById=function(e){return this.currentPeriod.getEventDefsById(e)},e.prototype.getEventInstances=function(){return this.currentPeriod.getEventInstances()},e.prototype.getEventInstancesWithId=function(e){return this.currentPeriod.getEventInstancesWithId(e)},e.prototype.getEventInstancesWithoutId=function(e){return this.currentPeriod.getEventInstancesWithoutId(e)},e}();t.default=f,h.default.mixInto(f),p.default.mixInto(f)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),o=n(4),r=n(20),s=n(11),a=n(5),l=n(18),c=function(){function e(e,t,n){this.pendingCnt=0,this.freezeDepth=0,this.stuntedReleaseCnt=0,this.releaseCnt=0,this.start=e,this.end=t,this.timezone=n,this.unzonedRange=new a.default(e.clone().stripZone(),t.clone().stripZone()),this.requestsByUid={},this.eventDefsByUid={},this.eventDefsById={},this.eventInstanceGroupsById={}}return e.prototype.isWithinRange=function(e,t){return!e.isBefore(this.start)&&!t.isAfter(this.end)},e.prototype.requestSources=function(e){this.freeze();for(var t=0;t<e.length;t++)this.requestSource(e[t]);this.thaw()},e.prototype.requestSource=function(e){var t=this,n={source:e,status:"pending",eventDefs:null};this.requestsByUid[e.uid]=n,this.pendingCnt+=1,e.fetch(this.start,this.end,this.timezone).then(function(e){"cancelled"!==n.status&&(n.status="completed",n.eventDefs=e,t.addEventDefs(e),t.pendingCnt--,t.tryRelease())},function(){"cancelled"!==n.status&&(n.status="failed",t.pendingCnt--,t.tryRelease())})},e.prototype.purgeSource=function(e){var t=this.requestsByUid[e.uid];t&&(delete this.requestsByUid[e.uid],"pending"===t.status?(t.status="cancelled",this.pendingCnt--,this.tryRelease()):"completed"===t.status&&t.eventDefs.forEach(this.removeEventDef.bind(this)))},e.prototype.purgeAllSources=function(){var e,t,n=this.requestsByUid,i=0;for(e in n)"pending"===(t=n[e]).status?t.status="cancelled":"completed"===t.status&&i++;this.requestsByUid={},this.pendingCnt=0,i&&this.removeAllEventDefs()},e.prototype.getEventDefByUid=function(e){return this.eventDefsByUid[e]},e.prototype.getEventDefsById=function(e){var t=this.eventDefsById[e];return t?t.slice():[]},e.prototype.addEventDefs=function(e){for(var t=0;t<e.length;t++)this.addEventDef(e[t])},e.prototype.addEventDef=function(e){var t,n=this.eventDefsById,i=e.id,o=n[i]||(n[i]=[]),r=e.buildInstances(this.unzonedRange);for(o.push(e),this.eventDefsByUid[e.uid]=e,t=0;t<r.length;t++)this.addEventInstance(r[t],i)},e.prototype.removeEventDefsById=function(e){var t=this;this.getEventDefsById(e).forEach(function(e){t.removeEventDef(e)})},e.prototype.removeAllEventDefs=function(){var e=i.isEmptyObject(this.eventDefsByUid);this.eventDefsByUid={},this.eventDefsById={},this.eventInstanceGroupsById={},e||this.tryRelease()},e.prototype.removeEventDef=function(e){var t=this.eventDefsById,n=t[e.id];delete this.eventDefsByUid[e.uid],n&&(o.removeExact(n,e),n.length||delete t[e.id],this.removeEventInstancesForDef(e))},e.prototype.getEventInstances=function(){var e,t=this.eventInstanceGroupsById,n=[];for(e in t)n.push.apply(n,t[e].eventInstances);return n},e.prototype.getEventInstancesWithId=function(e){var t=this.eventInstanceGroupsById[e];return t?t.eventInstances.slice():[]},e.prototype.getEventInstancesWithoutId=function(e){var t,n=this.eventInstanceGroupsById,i=[];for(t in n)t!==e&&i.push.apply(i,n[t].eventInstances);return i},e.prototype.addEventInstance=function(e,t){var n=this.eventInstanceGroupsById;(n[t]||(n[t]=new l.default)).eventInstances.push(e),this.tryRelease()},e.prototype.removeEventInstancesForDef=function(e){var t,n=this.eventInstanceGroupsById,i=n[e.id];i&&(t=o.removeMatching(i.eventInstances,function(t){return t.def===e}),i.eventInstances.length||delete n[e.id],t&&this.tryRelease())},e.prototype.tryRelease=function(){this.pendingCnt||(this.freezeDepth?this.stuntedReleaseCnt++:this.release()
23)},e.prototype.release=function(){this.releaseCnt++,this.trigger("release",this.eventInstanceGroupsById)},e.prototype.whenReleased=function(){var e=this;return this.releaseCnt?r.default.resolve(this.eventInstanceGroupsById):r.default.construct(function(t){e.one("release",t)})},e.prototype.freeze=function(){this.freezeDepth++||(this.stuntedReleaseCnt=0)},e.prototype.thaw=function(){--this.freezeDepth||!this.stuntedReleaseCnt||this.pendingCnt||this.release()},e}();t.default=c,s.default.mixInto(c)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),o=n(4),r=n(7),s=function(){function e(e,t){this.isFollowing=!1,this.isHidden=!1,this.isAnimating=!1,this.options=t=t||{},this.sourceEl=e,this.parentEl=t.parentEl?i(t.parentEl):e.parent()}return e.prototype.start=function(e){this.isFollowing||(this.isFollowing=!0,this.y0=o.getEvY(e),this.x0=o.getEvX(e),this.topDelta=0,this.leftDelta=0,this.isHidden||this.updatePosition(),o.getEvIsTouch(e)?this.listenTo(i(document),"touchmove",this.handleMove):this.listenTo(i(document),"mousemove",this.handleMove))},e.prototype.stop=function(e,t){var n=this,o=this.options.revertDuration,r=function(){n.isAnimating=!1,n.removeElement(),n.top0=n.left0=null,t&&t()};this.isFollowing&&!this.isAnimating&&(this.isFollowing=!1,this.stopListeningTo(i(document)),e&&o&&!this.isHidden?(this.isAnimating=!0,this.el.animate({top:this.top0,left:this.left0},{duration:o,complete:r})):r())},e.prototype.getEl=function(){var e=this.el;return e||((e=this.el=this.sourceEl.clone().addClass(this.options.additionalClass||"").css({position:"absolute",visibility:"",display:this.isHidden?"none":"",margin:0,right:"auto",bottom:"auto",width:this.sourceEl.width(),height:this.sourceEl.height(),opacity:this.options.opacity||"",zIndex:this.options.zIndex})).addClass("fc-unselectable"),e.appendTo(this.parentEl)),e},e.prototype.removeElement=function(){this.el&&(this.el.remove(),this.el=null)},e.prototype.updatePosition=function(){var e,t;this.getEl(),null==this.top0&&(e=this.sourceEl.offset(),t=this.el.offsetParent().offset(),this.top0=e.top-t.top,this.left0=e.left-t.left),this.el.css({top:this.top0+this.topDelta,left:this.left0+this.leftDelta})},e.prototype.handleMove=function(e){this.topDelta=o.getEvY(e)-this.y0,this.leftDelta=o.getEvX(e)-this.x0,this.isHidden||this.updatePosition()},e.prototype.hide=function(){this.isHidden||(this.isHidden=!0,this.el&&this.el.hide())},e.prototype.show=function(){this.isHidden&&(this.isHidden=!1,this.updatePosition(),this.getEl().show())},e}();t.default=s,r.default.mixInto(s)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),o=n(23),r=function(e){function t(t){var n=e.call(this,t)||this;return n.dragListener=n.buildDragListener(),n}return i.__extends(t,e),t.prototype.end=function(){this.dragListener.endInteraction()},t.prototype.bindToEl=function(e){var t=this.component,n=this.dragListener;t.bindDateHandlerToEl(e,"mousedown",function(e){t.shouldIgnoreMouse()||n.startInteraction(e)}),t.bindDateHandlerToEl(e,"touchstart",function(e){t.shouldIgnoreTouch()||n.startInteraction(e)})},t.prototype.buildDragListener=function(){var e,t=this,n=this.component,i=new o.default(n,{scroll:this.opt("dragScroll"),interactionStart:function(){e=i.origHit},hitOver:function(t,n){n||(e=null)},hitOut:function(){e=null},interactionEnd:function(i,o){var r;!o&&e&&(r=n.getSafeHitFootprint(e))&&t.view.triggerDayClick(r,n.getHitEl(e),i)}});return i.shouldCancelTouchScroll=!1,i.scrollAlwaysKills=!0,i},t}(n(15).default);t.default=r},function(e,t,n){function i(e){var t,n,i,o=[];for(t=0;t<e.length;t++){for(n=e[t],i=0;i<o.length&&s(n,o[i]).length;i++);n.level=i,(o[i]||(o[i]=[])).push(n)}return o}function o(e){var t,n,i,o,r;for(t=0;t<e.length;t++)for(n=e[t],i=0;i<n.length;i++)for((o=n[i]).forwardSegs=[],r=t+1;r<e.length;r++)s(o,e[r],o.forwardSegs)}function r(e){var t,n,i=e.forwardSegs,o=0;if(void 0===e.forwardPressure){for(t=0;t<i.length;t++)r(n=i[t]),o=Math.max(o,1+n.forwardPressure);e.forwardPressure=o}}function s(e,t,n){void 0===n&&(n=[]);for(var i=0;i<t.length;i++)a(e,t[i])&&n.push(t[i]);return n}function a(e,t){return e.bottom>t.top&&e.top<t.bottom}
23Object.defineProperty(t,"__esModule",{value:!0});var l=n(2),c=n(4),d=function(e){function t(t,n){var i=e.call(this,t,n)||this;return i.timeGrid=t,i}return l.__extends(t,e),t.prototype.renderFgSegs=function(e){this.renderFgSegsIntoContainers(e,this.timeGrid.fgContainerEls)},t.prototype.renderFgSegsIntoContainers=function(e,t){var n,i;for(n=this.timeGrid.groupSegsByCol(e),i=0;i<this.timeGrid.colCnt;i++)this.updateFgSegCoords(n[i]);this.timeGrid.attachSegsByCol(n,t)},t.prototype.unrenderFgSegs=function(){this.fgSegs&&this.fgSegs.forEach(function(e){e.el.remove()})},t.prototype.computeEventTimeFormat=function(){return this.opt("noMeridiemTimeFormat")},t.prototype.computeDisplayEventEnd=function(){return!0},t.prototype.fgSegHtml=function(e,t){var n,i,o,r=this.view,s=r.calendar,a=e.footprint.componentFootprint,l=a.isAllDay,d=e.footprint.eventDef,u=r.isEventDefDraggable(d),h=!t&&e.isStart&&r.isEventDefResizableFromStart(d),p=!t&&e.isEnd&&r.isEventDefResizableFromEnd(d),f=this.getSegClasses(e,u,h||p),m=c.cssToStr(this.getSkinCss(d));if(f.unshift("fc-time-grid-event","fc-v-event"),r.isMultiDayRange(a.unzonedRange)){if(e.isStart||e.isEnd){var g=s.msToMoment(e.startMs),v=s.msToMoment(e.endMs);n=this._getTimeText(g,v,l),i=this._getTimeText(g,v,l,"LT"),o=this._getTimeText(g,v,l,null,!1)}}else n=this.getTimeText(e.footprint),i=this.getTimeText(e.footprint,"LT"),o=this.getTimeText(e.footprint,null,!1);return'<a class="'+f.join(" ")+'"'+(d.url?' href="'+c.htmlEscape(d.url)+'"':"")+(m?' style="'+m+'"':"")+'><div class="fc-content">'+(n?'<div class="fc-time" data-start="'+c.htmlEscape(o)+'" data-full="'+c.htmlEscape(i)+'"><span>'+c.htmlEscape(n)+"</span></div>":"")+(d.title?'<div class="fc-title">'+c.htmlEscape(d.title)+"</div>":"")+'</div><div class="fc-bg"/>'+(p?'<div class="fc-resizer fc-end-resizer" />':"")+"</a>"},t.prototype.updateFgSegCoords=function(e){this.timeGrid.computeSegVerticals(e),this.computeFgSegHorizontals(e),this.timeGrid.assignSegVerticals(e),this.assignFgSegHorizontals(e)},t.prototype.computeFgSegHorizontals=function(e){var t,n,s;if(this.sortEventSegs(e),o(t=i(e)),n=t[0]){for(s=0;s<n.length;s++)r(n[s]);for(s=0;s<n.length;s++)this.computeFgSegForwardBack(n[s],0,0)}},t.prototype.computeFgSegForwardBack=function(e,t,n){var i,o=e.forwardSegs;if(void 0===e.forwardCoord)for(o.length?(this.sortForwardSegs(o),this.computeFgSegForwardBack(o[0],t+1,n),e.forwardCoord=o[0].backwardCoord):e.forwardCoord=1,e.backwardCoord=e.forwardCoord-(e.forwardCoord-n)/(t+1),i=0;i<o.length;i++)this.computeFgSegForwardBack(o[i],0,e.forwardCoord)},t.prototype.sortForwardSegs=function(e){e.sort(c.proxy(this,"compareForwardSegs"))},t.prototype.compareForwardSegs=function(e,t){return t.forwardPressure-e.forwardPressure||(e.backwardCoord||0)-(t.backwardCoord||0)||this.compareEventSegs(e,t)},t.prototype.assignFgSegHorizontals=function(e){var t,n;for(t=0;t<e.length;t++)(n=e[t]).el.css(this.generateFgSegHorizontalCss(n)),n.bottom-n.top<30&&n.el.addClass("fc-short")},t.prototype.generateFgSegHorizontalCss=function(e){var t,n,i=this.opt("slotEventOverlap"),o=e.backwardCoord,r=e.forwardCoord,s=this.timeGrid.generateSegVerticalCss(e),a=this.timeGrid.isRTL;return i&&(r=Math.min(1,o+2*(r-o))),a?(t=1-r,n=o):(t=o,n=1-r),s.zIndex=e.level+1,s.left=100*t+"%",s.right=100*n+"%",i&&e.forwardPressure&&(s[a?"marginLeft":"marginRight"]=20),s},t}(n(42).default);t.default=d},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),o=n(3),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.prototype.renderSegs=function(e,t){var n,i,r,s=[];for(this.eventRenderer.renderFgSegsIntoContainers(e,this.component.helperContainerEls),n=0;n<e.length;n++)i=e[n],t&&t.col===i.col&&(r=t.el,i.el.css({left:r.css("left"),right:r.css("right"),"margin-left":r.css("margin-left"),"margin-right":r.css("margin-right")})),s.push(i.el[0]);return o(s)},t}(n(58).default);t.default=r},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.prototype.attachSegEls=function(e,t){var n,i=this.component;return"bgEvent"===e?n=i.bgContainerEls:"businessHours"===e?n=i.businessContainerEls:"highlight"===e&&(n=i.highlightContainerEls),i.updateSegVerticals(t),i.attachSegsByCol(i.groupSegsByCol(t),n),t.map(function(e){return e.el[0]})},t}(n(57).default);t.default=o}
23,function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),o=n(4),r=n(7),s=function(){function e(e){this.isHidden=!0,this.margin=10,this.options=e||{}}return e.prototype.show=function(){this.isHidden&&(this.el||this.render(),this.el.show(),this.position(),this.isHidden=!1,this.trigger("show"))},e.prototype.hide=function(){this.isHidden||(this.el.hide(),this.isHidden=!0,this.trigger("hide"))},e.prototype.render=function(){var e=this,t=this.options;this.el=i('<div class="fc-popover"/>').addClass(t.className||"").css({top:0,left:0}).append(t.content).appendTo(t.parentEl),this.el.on("click",".fc-close",function(){e.hide()}),t.autoHide&&this.listenTo(i(document),"mousedown",this.documentMousedown)},e.prototype.documentMousedown=function(e){this.el&&!i(e.target).closest(this.el).length&&this.hide()},e.prototype.removeElement=function(){this.hide(),this.el&&(this.el.remove(),this.el=null),this.stopListeningTo(i(document),"mousedown")},e.prototype.position=function(){var e,t,n,r,s,a=this.options,l=this.el.offsetParent().offset(),c=this.el.outerWidth(),d=this.el.outerHeight(),u=i(window),h=o.getScrollParent(this.el);r=a.top||0,s=void 0!==a.left?a.left:void 0!==a.right?a.right-c:0,h.is(window)||h.is(document)?(h=u,e=0,t=0):(e=(n=h.offset()).top,t=n.left),e+=u.scrollTop(),t+=u.scrollLeft(),!1!==a.viewportConstrain&&(r=Math.min(r,e+h.outerHeight()-d-this.margin),r=Math.max(r,e+this.margin),s=Math.min(s,t+h.outerWidth()-c-this.margin),s=Math.max(s,t+this.margin)),this.el.css({top:r-l.top,left:s-l.left})},e.prototype.trigger=function(e){this.options[e]&&this.options[e].apply(this,Array.prototype.slice.call(arguments,1))},e}();t.default=s,r.default.mixInto(s)},function(e,t,n){function i(e,t){var n,i;for(n=0;n<t.length;n++)if((i=t[n]).leftCol<=e.rightCol&&i.rightCol>=e.leftCol)return!0;return!1}function o(e,t){return e.leftCol-t.leftCol}Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),s=n(3),a=n(4),l=function(e){function t(t,n){var i=e.call(this,t,n)||this;return i.dayGrid=t,i}return r.__extends(t,e),t.prototype.renderBgRanges=function(t){t=s.grep(t,function(e){return e.eventDef.isAllDay()}),e.prototype.renderBgRanges.call(this,t)},t.prototype.renderFgSegs=function(e){var t=this.rowStructs=this.renderSegRows(e);this.dayGrid.rowEls.each(function(e,n){s(n).find(".fc-content-skeleton > table").append(t[e].tbodyEl)})},t.prototype.unrenderFgSegs=function(){for(var e,t=this.rowStructs||[];e=t.pop();)e.tbodyEl.remove();this.rowStructs=null},t.prototype.renderSegRows=function(e){var t,n,i=[];for(t=this.groupSegRows(e),n=0;n<t.length;n++)i.push(this.renderSegRow(n,t[n]));return i},t.prototype.renderSegRow=function(e,t){function n(e){for(;r<e;)(d=(v[i-1]||[])[r])?d.attr("rowspan",parseInt(d.attr("rowspan")||1,10)+1):(d=s("<td/>"),a.append(d)),g[i][r]=d,v[i][r]=d,r++}var i,o,r,a,l,c,d,u=this.dayGrid.colCnt,h=this.buildSegLevels(t),p=Math.max(1,h.length),f=s("<tbody/>"),m=[],g=[],v=[];for(i=0;i<p;i++){if(o=h[i],r=0,a=s("<tr/>"),m.push([]),g.push([]),v.push([]),o)for(l=0;l<o.length;l++){for(n((c=o[l]).leftCol),d=s('<td class="fc-event-container"/>').append(c.el),c.leftCol!==c.rightCol?d.attr("colspan",c.rightCol-c.leftCol+1):v[i][r]=d;r<=c.rightCol;)g[i][r]=d,m[i][r]=c,r++;a.append(d)}n(u),this.dayGrid.bookendCells(a),f.append(a)}return{row:e,tbodyEl:f,cellMatrix:g,segMatrix:m,segLevels:h,segs:t}},t.prototype.buildSegLevels=function(e){var t,n,r,s=[];for(this.sortEventSegs(e),t=0;t<e.length;t++){for(n=e[t],r=0;r<s.length&&i(n,s[r]);r++);n.level=r,(s[r]||(s[r]=[])).push(n)}for(r=0;r<s.length;r++)s[r].sort(o);return s},t.prototype.groupSegRows=function(e){var t,n=[];for(t=0;t<this.dayGrid.rowCnt;t++)n.push([]);for(t=0;t<e.length;t++)n[e[t].row].push(e[t]);return n},t.prototype.computeEventTimeFormat=function(){return this.opt("extraSmallTimeFormat")},t.prototype.computeDisplayEventEnd=function(){return 1===this.dayGrid.colCnt},t.prototype.fgSegHtml=function(e,t){var n,i,o=this.view,r=e.footprint.eventDef,s=e.footprint.componentFootprint.isAllDay,l=o.isEventDefDraggable(r),c=!t&&s&&e.isStart&&o.isEventDefResizableFromStart(r),d=!t&&s&&e.isEnd&&o.isEventDefResizableFromEnd(r),u=this.getSegClasses(e,l,c||d),h=a.cssToStr(this.getSkinCss(r)),p="";return u.unshift("fc-day-grid-event","fc-h-event"),e.isStart&&(n=this.getTimeText(e.footprint))&&(p='<span class="fc-time">'+a.htmlEscape(n)+"</span>"),i='<span class="fc-title">
23'+(a.htmlEscape(r.title||"")||"&nbsp;")+"</span>",'<a class="'+u.join(" ")+'"'+(r.url?' href="'+a.htmlEscape(r.url)+'"':"")+(h?' style="'+h+'"':"")+'><div class="fc-content">'+(this.dayGrid.isRTL?i+" "+p:p+" "+i)+"</div>"+(c?'<div class="fc-resizer fc-start-resizer" />':"")+(d?'<div class="fc-resizer fc-end-resizer" />':"")+"</a>"},t}(n(42).default);t.default=l},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),o=n(3),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.prototype.renderSegs=function(e,t){var n,i=[];return n=this.eventRenderer.renderSegRows(e),this.component.rowEls.each(function(e,r){var s,a,l=o(r),c=o('<div class="fc-helper-skeleton"><table/></div>');t&&t.row===e?a=t.el.position().top:((s=l.find(".fc-content-skeleton tbody")).length||(s=l.find(".fc-content-skeleton table")),a=s.position().top),c.css("top",a).find("table").append(n[e].tbodyEl),l.append(c),i.push(c[0])}),o(i)},t}(n(58).default);t.default=r},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),o=n(3),r=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.fillSegTag="td",t}return i.__extends(t,e),t.prototype.attachSegEls=function(e,t){var n,i,o,r=[];for(n=0;n<t.length;n++)i=t[n],o=this.renderFillRow(e,i),this.component.rowEls.eq(i.row).append(o),r.push(o[0]);return r},t.prototype.renderFillRow=function(e,t){var n,i,r,s=this.component.colCnt,a=t.leftCol,l=t.rightCol+1;return n="businessHours"===e?"bgevent":e.toLowerCase(),r=(i=o('<div class="fc-'+n+'-skeleton"><table><tr/></table></div>')).find("tr"),a>0&&r.append('<td colspan="'+a+'"/>'),r.append(t.el.attr("colspan",l-a)),l<s&&r.append('<td colspan="'+(s-l)+'"/>'),this.component.bookendCells(r),i},t}(n(57).default);t.default=r},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),o=n(228),r=n(5),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.prototype.buildRenderRange=function(t,n,i){var o,s=e.prototype.buildRenderRange.call(this,t,n,i),a=this.msToUtcMoment(s.startMs,i),l=this.msToUtcMoment(s.endMs,i);return this.opt("fixedWeekCount")&&(o=Math.ceil(l.diff(a,"weeks",!0)),l.add(6-o,"weeks")),new r.default(a,l)},t}(o.default);t.default=s},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),o=n(4),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.prototype.renderFgSegs=function(e){e.length?this.component.renderSegList(e):this.component.renderEmptyMessage()},t.prototype.fgSegHtml=function(e){var t,n=this.view,i=n.calendar,r=i.theme,s=e.footprint,a=s.eventDef,l=s.componentFootprint,c=a.url,d=["fc-list-item"].concat(this.getClasses(a)),u=this.getBgColor(a);return t=l.isAllDay?n.getAllDayHtml():n.isMultiDayRange(l.unzonedRange)?e.isStart||e.isEnd?o.htmlEscape(this._getTimeText(i.msToMoment(e.startMs),i.msToMoment(e.endMs),l.isAllDay)):n.getAllDayHtml():o.htmlEscape(this.getTimeText(s)),c&&d.push("fc-has-url"),'<tr class="'+d.join(" ")+'">'+(this.displayEventTime?'<td class="fc-list-item-time '+r.getClass("widgetContent")+'">'+(t||"")+"</td>":"")+'<td class="fc-list-item-marker '+r.getClass("widgetContent")+'"><span class="fc-event-dot"'+(u?' style="background-color:'+u+'"':"")+'></span></td><td class="fc-list-item-title '+r.getClass("widgetContent")+'"><a'+(c?' href="'+o.htmlEscape(c)+'"':"")+">"+o.htmlEscape(a.title||"")+"</a></td></tr>"},t.prototype.computeEventTimeFormat=function(){return this.opt("mediumTimeFormat")},t}(n(42).default);t.default=r},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),o=n(3),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.prototype.handleClick=function(t,n){var i;e.prototype.handleClick.call(this,t,n),o(n.target).closest("a[href]").length||(i=t.footprint.eventDef.url)&&!n.isDefaultPrevented()&&(window.location.href=i)},t}(n(59).default);t.default=r},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(38),o=n(52),r=n(215),s=n(216);i.default.registerClass(o.default),i.default.registerClass(r.default),i.default.registerClass(s.default)}
23,function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(51),o=n(213),r=n(214),s=n(258),a=n(259);i.defineThemeSystem("standard",o.default),i.defineThemeSystem("jquery-ui",r.default),i.defineThemeSystem("bootstrap3",s.default),i.defineThemeSystem("bootstrap4",a.default)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t}(n(19).default);t.default=o,o.prototype.classes={widget:"fc-bootstrap3",tableGrid:"table-bordered",tableList:"table",tableListHeading:"active",buttonGroup:"btn-group",button:"btn btn-default",stateActive:"active",stateDisabled:"disabled",today:"alert alert-info",popover:"panel panel-default",popoverHeader:"panel-heading",popoverContent:"panel-body",headerRow:"panel-default",dayRow:"panel-default",listView:"panel panel-default"},o.prototype.baseIconClass="glyphicon",o.prototype.iconClasses={close:"glyphicon-remove",prev:"glyphicon-chevron-left",next:"glyphicon-chevron-right",prevYear:"glyphicon-backward",nextYear:"glyphicon-forward"},o.prototype.iconOverrideOption="bootstrapGlyphicons",o.prototype.iconOverrideCustomButtonOption="bootstrapGlyphicon",o.prototype.iconOverridePrefix="glyphicon-"},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t}(n(19).default);t.default=o,o.prototype.classes={widget:"fc-bootstrap4",tableGrid:"table-bordered",tableList:"table",tableListHeading:"table-active",buttonGroup:"btn-group",button:"btn btn-primary",stateActive:"active",stateDisabled:"disabled",today:"alert alert-info",popover:"card card-primary",popoverHeader:"card-header",popoverContent:"card-body",headerRow:"table-bordered",dayRow:"table-bordered",listView:"card card-primary"},o.prototype.baseIconClass="fa",o.prototype.iconClasses={close:"fa-times",prev:"fa-chevron-left",next:"fa-chevron-right",prevYear:"fa-angle-double-left",nextYear:"fa-angle-double-right"},o.prototype.iconOverrideOption="bootstrapFontAwesome",o.prototype.iconOverrideCustomButtonOption="bootstrapFontAwesome",o.prototype.iconOverridePrefix="fa-"},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(22),o=n(62),r=n(229);i.defineView("basic",{class:o.default}),i.defineView("basicDay",{type:"basic",duration:{days:1}}),i.defineView("basicWeek",{type:"basic",duration:{weeks:1}}),i.defineView("month",{class:r.default,duration:{months:1},defaults:{fixedWeekCount:!0}})},function(e,t,n){
24Object.defineProperty(t,"__esModule",{value:!0});var i=n(22),o=n(226);i.defineView("agenda",{class:o.default,defaults:{allDaySlot:!0,slotDuration:"00:30:00",slotEventOverlap:!0}}),i.defineView("agendaDay",{type:"agenda",duration:{days:1}}),i.defineView("agendaWeek",{type:"agenda",duration:{weeks:1}})},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(22),o=n(230);i.defineView("list",{class:o.default,buttonTextKey:"list",defaults:{buttonText:"list",listDayFormat:"LL",noEventsMessage:"No events to display"}}),i.defineView("listDay",{type:"list",duration:{days:1},defaults:{listDayFormat:"dddd"}}),i.defineView("listWeek",{type:"list",duration:{weeks:1},defaults:{listDayFormat:"dddd",listDayAltFormat:"LL"}}),i.defineView("listMonth",{type:"list",duration:{month:1},defaults:{listDayAltFormat:"dddd"}}),i.defineView("listYear",{type:"list",duration:{year:1},defaults:{listDayAltFormat:"dddd"}})},function(e,t){Object.defineProperty(t,"__esModule",{value:!0})}])}),function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("fullcalendar"),require("jquery")):"function"==typeof define&&define.amd?define(["fullcalendar","jquery"],t):"object"==typeof exports?t(require("fullcalendar"),require("jquery")):t(e.FullCalendar,e.jQuery)}("undefined"!=typeof self?self:this,function(e,t){return function(e){function t(i){if(n[i])return n[i].exports;var o=n[i]={i:i,l:!1,exports:{}};return e[i].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,i){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:i})}
24,t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=266)}({1:function(t){t.exports=e},2:function(e,t){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};t.__extends=function(e,t){function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}},266:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),o=n(267);i.EventSourceParser.registerClass(o.default),i.GcalEventSource=o.default},267:function(e,t,n){function i(e){var t;return/^[^\/]+@([^\/\.]+\.)*(google|googlemail|gmail)\.com$/.test(e)?e:(t=/^https:\/\/www.googleapis.com\/calendar\/v3\/calendars\/([^\/]*)/.exec(e))||(t=/^https?:\/\/www.google.com\/calendar\/feeds\/([^\/]*)/.exec(e))?decodeURIComponent(t[1]):void 0}function o(e,t){return e.replace(/(\?.*?)?(#|$)/,function(e,n,i){return(n?n+"&":"?")+t+i})}Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),s=n(3),a=n(1),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t.parse=function(e,t){var n;return"object"==typeof e?n=e:"string"==typeof e&&(n={url:e}),!!n&&a.EventSource.parse.call(this,n,t)},t.prototype.fetch=function(e,t,n){var i=this,o=this.buildUrl(),r=this.buildRequestParams(e,t,n),l=this.ajaxSettings||{},c=l.success;return r?(this.calendar.pushLoading(),a.Promise.construct(function(e,t){s.ajax(s.extend({},a.JsonFeedEventSource.AJAX_DEFAULTS,l,{url:o,data:r,success:function(n,o,l){var d,u;i.calendar.popLoading(),n.error?(i.reportError("Google Calendar API: "+n.error.message,n.error.errors),t()):n.items&&(d=i.gcalItemsToRawEventDefs(n.items,r.timeZone),u=a.applyAll(c,i,[n,o,l]),s.isArray(u)&&(d=u),e(i.parseEventDefs(d)))},error:function(e,n,o){i.reportError("Google Calendar network failure: "+n,[e,o]),i.calendar.popLoading(),t()}}))})):a.Promise.reject()},t.prototype.gcalItemsToRawEventDefs=function(e,t){var n=this;return e.map(function(e){return n.gcalItemToRawEventDef(e,t)})},t.prototype.gcalItemToRawEventDef=function(e,t){var n=e.htmlLink||null;return n&&t&&(n=o(n,"ctz="+t)),{id:e.id,title:e.summary,start:e.start.dateTime||e.start.date,end:e.end.dateTime||e.end.date,url:n,location:e.location,description:e.description}},t.prototype.buildUrl=function(){return t.API_BASE+"/"+encodeURIComponent(this.googleCalendarId)+"/events?callback=?"},t.prototype.buildRequestParams=function(e,t,n){var i,o=this.googleCalendarApiKey||this.calendar.opt("googleCalendarApiKey");return o?(e.hasZone()||(e=e.clone().utc().add(-1,"day")),t.hasZone()||(t=t.clone().utc().add(1,"day")),i=s.extend(this.ajaxSettings.data||{},{key:o,timeMin:e.format(),timeMax:t.format(),singleEvents:!0,maxResults:9999}),n&&"local"!==n&&(i.timeZone=n.replace(" ","_")),i):(this.reportError("Specify a googleCalendarApiKey. See http://fullcalendar.io/docs/google_calendar/"),null)},t.prototype.reportError=function(e,t){var n=this.calendar,i=n.opt("googleCalendarError"),o=t||[{message:e}];this.googleCalendarError&&this.googleCalendarError.apply(n,o),i&&i.apply(n,o),a.warn.apply(null,[e].concat(t||[]))},t.prototype.getPrimitive=function(){return this.googleCalendarId},t.prototype.applyManualStandardProps=function(e){var t=a.EventSource.prototype.applyManualStandardProps.apply(this,arguments),n=e.googleCalendarId;return null==n&&e.url&&(n=i(e.url)),null!=n&&(this.googleCalendarId=n,t)},t.prototype.applyMiscProps=function(e){this.ajaxSettings||(this.ajaxSettings={}),s.extend(this.ajaxSettings,e)},t.API_BASE="https://www.googleapis.com/calendar/v3/calendars",t}(a.EventSource);t.default=l,l.defineStandardProps({url:!1,googleCalendarId:!1,googleCalendarApiKey:!0,googleCalendarError:!0})},3:function(e){e.exports=t}})}),window.TinyMCERails={configuration:{default:{}},initialize:function(e,t){if("undefined"!=typeof tinyMCE){var n=TinyMCERails.configuration[e||"default"];n=TinyMCERails._merge(n,t),tinymce.init(n)}else setTimeout(function(){TinyMCERails.initialize(e,t)},50)},setupTurbolinks:function(){document.addEventListener("turbolinks:before-render",function(){tinymce.remove()})},_merge:function(){for(var e={},t=0;t<arguments.length;++t){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&("[object Object]"===Object.prototype.toString.call(n[i])?e[i]=TinyMCERails._merge(e[i],n[i]):e[i]=n[i])}return e}},"undefined"!=typeof Turbolinks&&Turbolinks.supported&&TinyMCERails.setupTurbolinks(),window.tinymce=window.tinymce||{base:"/assets/tinymce",suffix:""},function(){"use strict";function e(e,...t){return(...n)=>{const i=t.concat(n);return e.apply(null,i)}}function t(e){return function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];return uT(e,t,i)}}function n(e){return function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return hT(e,n)}}function i(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:gT;oT&&oT(e,null);let i=t.length;for(;i--;){let o=t[i];if("string"==typeof o){const e=n(o);e!==o&&(rT(t)||(t[i]=e),o=e)}e[o]=!0}return e}function o(e){for(let t=0;t<e.length;t++){CT(e,t)||(e[t]=null)}return e}function r(e){const t=dT(null);for(const[n,i]of iT(e)){CT(e,n)&&(Array.isArray(i)?t[n]=o(i):i&&"object"==typeof i&&i.constructor===Object?t[n]=r(i):t[n]=i)}return t}function s(e,n){function i(){return null}for(;null!==e;){const i=aT(e,n);if(i){if(i.get)return t(i.get);if("function"==typeof i.value)return t(i.value)}e=sT(e)}return i}function a(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:GT();const t=e=>a(e);if(t.version="3.1.7",t.removed=[],!e||!e.document||e.document.nodeType!==YT.document)return t.isSupported=!1,t;let{document:n}=e;const o=n,l=o.currentScript,{DocumentFragment:c,HTMLTemplateElement:d,Node:u,Element:h,NodeFilter:p,NamedNodeMap:f=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:m,DOMParser:g,trustedTypes:v}=e,y=h.prototype,b=s(y,"cloneNode"),_=s(y,"remove"),w=s(y,"nextSibling"),C=s(y,"childNodes"),k=s(y,"parentNode");if("function"==typeof d){const e=n.createElement("template");e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let x,S="";const{implementation:E,createNodeIterator:D,createDocumentFragment:T,getElementsByTagName:A}=n,{importNode:M}=o;let R={};t.isSupported="function"==typeof iT&&"function"==typeof k&&E&&void 0!==E.createHTMLDocument;const{MUSTACHE_EXPR:N,ERB_EXPR:I,TMPLIT_EXPR:P,DATA_ATTR:O,ARIA_ATTR:L,IS_SCRIPT_OR_DATA:B,ATTR_WHITESPACE:F,CUSTOM_ELEMENT:H}=VT;let{IS_ALLOWED_URI:$}=VT,z=null;const j=i({},[...ST,...ET,...DT,...AT,...RT]);let q=null;const U=i({},[...NT,...IT,...PT,...OT]);let W=Object.seal(dT(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),V=null,Y=null,G=!0,K=!0,X=!1,Q=!0,Z=!1,J=!0,ee=!1,te=!1,ne=!1,ie=!1,oe=!1,re=!1,se=!0,ae=!1;const le="user-content-";let ce=!0,de=!1,ue={},he=null;const pe=i({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let fe=null;const me=i({},["audio","video","img","source","image","track"]);let ge=null;const ve=i({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ye="http://www.w3.org/1998/Math/MathML",be="http://www.w3.org/2000/svg",_e="http://www.w3.org/1999/xhtml";let we=_e,Ce=!1,ke=null;const xe=i({},[ye,be,_e],vT);let Se=null;const Ee=["application/xhtml+xml","text/html"],De="text/html";let Te=null,Ae=null;const Me=n.createElement("form"),Re=function(e){return e instanceof RegExp||e instanceof Function},Ne=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Ae||Ae!==e){if(e&&"object"==typeof e||(e={}
vendor: 5,140 bytes, line 24
24),e=r(e),Se=-1===Ee.indexOf(e.PARSER_MEDIA_TYPE)?De:e.PARSER_MEDIA_TYPE,Te="application/xhtml+xml"===Se?vT:gT,z=CT(e,"ALLOWED_TAGS")?i({},e.ALLOWED_TAGS,Te):j,q=CT(e,"ALLOWED_ATTR")?i({},e.ALLOWED_ATTR,Te):U,ke=CT(e,"ALLOWED_NAMESPACES")?i({},e.ALLOWED_NAMESPACES,vT):xe,ge=CT(e,"ADD_URI_SAFE_ATTR")?i(r(ve),e.ADD_URI_SAFE_ATTR,Te):ve,fe=CT(e,"ADD_DATA_URI_TAGS")?i(r(me),e.ADD_DATA_URI_TAGS,Te):me,he=CT(e,"FORBID_CONTENTS")?i({},e.FORBID_CONTENTS,Te):pe,V=CT(e,"FORBID_TAGS")?i({},e.FORBID_TAGS,Te):{},Y=CT(e,"FORBID_ATTR")?i({},e.FORBID_ATTR,Te):{},ue=!!CT(e,"USE_PROFILES")&&e.USE_PROFILES,G=!1!==e.ALLOW_ARIA_ATTR,K=!1!==e.ALLOW_DATA_ATTR,X=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Q=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Z=e.SAFE_FOR_TEMPLATES||!1,J=!1!==e.SAFE_FOR_XML,ee=e.WHOLE_DOCUMENT||!1,ie=e.RETURN_DOM||!1,oe=e.RETURN_DOM_FRAGMENT||!1,re=e.RETURN_TRUSTED_TYPE||!1,ne=e.FORCE_BODY||!1,se=!1!==e.SANITIZE_DOM,ae=e.SANITIZE_NAMED_PROPS||!1,ce=!1!==e.KEEP_CONTENT,de=e.IN_PLACE||!1,$=e.ALLOWED_URI_REGEXP||zT,we=e.NAMESPACE||_e,W=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&Re(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(W.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Re(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(W.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(W.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Z&&(K=!1),oe&&(ie=!0),ue&&(z=i({},RT),q=[],!0===ue.html&&(i(z,ST),i(q,NT)),!0===ue.svg&&(i(z,ET),i(q,IT),i(q,OT)),!0===ue.svgFilters&&(i(z,DT),i(q,IT),i(q,OT)),!0===ue.mathMl&&(i(z,AT),i(q,PT),i(q,OT))),e.ADD_TAGS&&(z===j&&(z=r(z)),i(z,e.ADD_TAGS,Te)),e.ADD_ATTR&&(q===U&&(q=r(q)),i(q,e.ADD_ATTR,Te)),e.ADD_URI_SAFE_ATTR&&i(ge,e.ADD_URI_SAFE_ATTR,Te),e.FORBID_CONTENTS&&(he===pe&&(he=r(he)),i(he,e.FORBID_CONTENTS,Te)),ce&&(z["#text"]=!0),ee&&i(z,["html","head","body"]),z.table&&(i(z,["tbody"]),delete V.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw xT('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw xT('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');x=e.TRUSTED_TYPES_POLICY,S=x.createHTML("")}else void 0===x&&(x=KT(v,l)),null!==x&&"string"==typeof S&&(S=x.createHTML(""));lT&&lT(e),Ae=e}},Ie=i({},["mi","mo","mn","ms","mtext"]),Pe=i({},["annotation-xml"]),Oe=i({},["title","style","font","a","script"]),Le=i({},[...ET,...DT,...TT]),Be=i({},[...AT,...MT]),Fe=function(e){let t=k(e);t&&t.tagName||(t={namespaceURI:we,tagName:"template"});const n=gT(e.tagName),i=gT(t.tagName);return!!ke[e.namespaceURI]&&(e.namespaceURI===be?t.namespaceURI===_e?"svg"===n:t.namespaceURI===ye?"svg"===n&&("annotation-xml"===i||Ie[i]):Boolean(Le[n]):e.namespaceURI===ye?t.namespaceURI===_e?"math"===n:t.namespaceURI===be?"math"===n&&Pe[i]:Boolean(Be[n]):e.namespaceURI===_e?!(t.namespaceURI===be&&!Pe[i])&&(!(t.namespaceURI===ye&&!Ie[i])&&(!Be[n]&&(Oe[n]||!Le[n]))):!("application/xhtml+xml"!==Se||!ke[e.namespaceURI]))},He=function(e){mT(t.removed,{element:e});try{k(e).removeChild(e)}catch(t){_(e)}},$e=function(e,n){try{mT(t.removed,{attribute:n.getAttributeNode(e),from:n})}catch(e){mT(t.removed,{attribute:null,from:n})}if(n.removeAttribute(e),"is"===e&&!q[e])if(ie||oe)try{He(n)}catch(e){}else try{n.setAttribute(e,"")}catch(e){}},ze=function(e){let t=null,i=null;if(ne)e="<remove></remove>"+e;else{const t=yT(e,/^[\r\n\t ]+/);i=t&&t[0]}"application/xhtml+xml"===Se&&we===_e&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const o=x?x.createHTML(e):e;if(we===_e)try{t=(new g).parseFromString(o,Se)}catch(e){}if(!t||!t.documentElement){t=E.createDocument(we,"template",null);try{t.documentElement.innerHTML=Ce?S:o}catch(e){}}const r=t.body||t.documentElement;return e&&i&&r.insertBefore(n.createTextNode(i),r.childNodes[0]||null),we===_e?A.call(t,ee?"html":"body")[0]:ee?t.documentElement:r},je=function(e){return D.call(e.ownerDocument||e,e,p.SHOW_ELEMENT|p.SHOW_COMMENT|p.SHOW_TEXT|p.SHOW_PROCESSING_INSTRUCTION|p.SHOW_CDATA_SECTION,null)},qe=function(e){return e instanceof m&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof f)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},Ue=function(e){return"function"==typeof u&&e instanceof u},We=function(e,n,i){R[e]&&pT(R[e],e=>{e.call(t,n,i,Ae)})},Ve=function(e){let n=null;if(We("beforeSanitizeElements",e,null),qe(e))return He(e),!0;const i=Te(e.nodeName);if(We("uponSanitizeElement",e,{tagName:i,allowedTags:z}),e.hasChildNodes()&&!Ue(e.firstElementChild)&&kT(/<[/\w]/g,e.innerHTML)&&kT(/<[/\w]/g,e.textContent))return He(e),!0;if(e.nodeType===YT.progressingInstruction)return He(e),!0;if(J&&e.nodeType===YT.comment&&kT(/<[/\w]/g,e.data))return He(e),!0;
24if(!z[i]||V[i]){if(!V[i]&&Ge(i)){if(W.tagNameCheck instanceof RegExp&&kT(W.tagNameCheck,i))return!1;if(W.tagNameCheck instanceof Function&&W.tagNameCheck(i))return!1}if(ce&&!he[i]){const t=k(e)||e.parentNode,n=C(e)||e.childNodes;if(n&&t){for(let i=n.length-1;i>=0;--i){const o=b(n[i],!0);o.__removalCount=(e.__removalCount||0)+1,t.insertBefore(o,w(e))}}}return He(e),!0}return e instanceof h&&!Fe(e)?(He(e),!0):"noscript"!==i&&"noembed"!==i&&"noframes"!==i||!kT(/<\/no(script|embed|frames)/i,e.innerHTML)?(Z&&e.nodeType===YT.text&&(n=e.textContent,pT([N,I,P],e=>{n=bT(n,e," ")}),e.textContent!==n&&(mT(t.removed,{element:e.cloneNode()}),e.textContent=n)),We("afterSanitizeElements",e,null),!1):(He(e),!0)},Ye=function(e,t,i){if(se&&("id"===t||"name"===t)&&(i in n||i in Me))return!1;if(K&&!Y[t]&&kT(O,t));else if(G&&kT(L,t));else if(!q[t]||Y[t]){if(!(Ge(e)&&(W.tagNameCheck instanceof RegExp&&kT(W.tagNameCheck,e)||W.tagNameCheck instanceof Function&&W.tagNameCheck(e))&&(W.attributeNameCheck instanceof RegExp&&kT(W.attributeNameCheck,t)||W.attributeNameCheck instanceof Function&&W.attributeNameCheck(t))||"is"===t&&W.allowCustomizedBuiltInElements&&(W.tagNameCheck instanceof RegExp&&kT(W.tagNameCheck,i)||W.tagNameCheck instanceof Function&&W.tagNameCheck(i))))return!1}else if(ge[t]);else if(kT($,bT(i,F,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==_T(i,"data:")||!fe[e]){if(X&&!kT(B,bT(i,F,"")));else if(i)return!1}else;return!0},Ge=function(e){return"annotation-xml"!==e&&yT(e,H)},Ke=function(e){We("beforeSanitizeAttributes",e,null);const{attributes:n}=e;if(!n)return;const i={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:q};let o=n.length;for(;o--;){const r=n[o],{name:s,namespaceURI:a,value:l}=r,c=Te(s);let d="value"===s?l:wT(l);const u=d;if(i.attrName=c,i.attrValue=d,i.keepAttr=!0,i.forceKeepAttr=void 0,We("uponSanitizeAttribute",e,i),d=i.attrValue,i.forceKeepAttr)continue;if(!i.keepAttr){$e(s,e);continue}if(!Q&&kT(/\/>/i,d)){$e(s,e);continue}Z&&pT([N,I,P],e=>{d=bT(d,e," ")});const h=Te(e.nodeName);if(Ye(h,c,d))if(!ae||"id"!==c&&"name"!==c||($e(s,e),d=le+d),J&&kT(/((--!?|])>)|<\/(style|title)/i,d))$e(s,e);else{if(x&&"object"==typeof v&&"function"==typeof v.getAttributeType)if(a);else switch(v.getAttributeType(h,c)){case"TrustedHTML":d=x.createHTML(d);break;case"TrustedScriptURL":d=x.createScriptURL(d)}if(d!==u)try{a?e.setAttributeNS(a,s,d):e.setAttribute(s,d),qe(e)?He(e):fT(t.removed)}catch(e){}}else $e(s,e)}We("afterSanitizeAttributes",e,null)},Xe=function e(t){let n=null;const i=je(t);for(We("beforeSanitizeShadowDOM",t,null);n=i.nextNode();)We("uponSanitizeShadowNode",n,null),Ve(n)||(n.content instanceof c&&e(n.content),Ke(n));We("afterSanitizeShadowDOM",t,null)};return t.sanitize=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=null,r=null,s=null,a=null;if(Ce=!e,Ce&&(e="<!-->"),"string"!=typeof e&&!Ue(e)){if("function"!=typeof e.toString)throw xT("toString is not a function");if("string"!=typeof(e=e.toString()))throw xT("dirty is not a string, aborting")}if(!t.isSupported)return e;if(te||Ne(n),t.removed=[],"string"==typeof e&&(de=!1),de){if(e.nodeName){const t=Te(e.nodeName);if(!z[t]||V[t])throw xT("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof u)i=ze("<!---->"),r=i.ownerDocument.importNode(e,!0),r.nodeType===YT.element&&"BODY"===r.nodeName||"HTML"===r.nodeName?i=r:i.appendChild(r);else{if(!ie&&!Z&&!ee&&-1===e.indexOf("<"))return x&&re?x.createHTML(e):e;if(i=ze(e),!i)return ie?null:re?S:""}i&&ne&&He(i.firstChild);const l=je(de?e:i);for(;s=l.nextNode();)Ve(s)||(s.content instanceof c&&Xe(s.content),Ke(s));if(de)return e;if(ie){if(oe)for(a=T.call(i.ownerDocument);i.firstChild;)a.appendChild(i.firstChild);else a=i;return(q.shadowroot||q.shadowrootmode)&&(a=M.call(o,a,!0)),a}let d=ee?i.outerHTML:i.innerHTML;return ee&&z["!doctype"]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&kT(UT,i.ownerDocument.doctype.name)&&(d="<!DOCTYPE "+i.ownerDocument.doctype.name+">\n"+d),Z&&pT([N,I,P],e=>{d=bT(d,e," ")}),x&&re?x.createHTML(d):d},t.setConfig=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Ne(e),te=!0},t.clearConfig=function(){Ae=null,te=!1},t.isValidAttribute=function(e,t,n){Ae||Ne({});const i=Te(e),o=Te(t);return Ye(i,o,n)},t.addHook=function(e,t){"function"==typeof t&&(R[e]=R[e]||[],mT(R[e],t))},t.removeHook=function(e){if(R[e])return fT(R[e])},t.removeHooks=function(e){R[e]&&(R[e]=[])},t.removeAllHooks=function(){R={}},t}var l=function(e){if(null===e)return"null";if(void 0===e)return"undefined";var t=typeof e;return"object"===t&&(Array.prototype.isPrototypeOf(e)||e.constructor&&"Array"===e.constructor.name)?"array":"object"===t&&(String.prototype.isPrototypeOf(e)||e.constructor&&"String"===e.constructor.name)?"string":t},c=function(e){return-1!==["undefined","boolean","number","string","function","xml","null"].indexOf(e)},d=function(e,t){return Array.prototype.slice.call(e).sort(t)},u=function(e,t){return h(function(n,i){return e.eq(t(n),t(i))})},h=function(e){return{eq:e}}
vendor: 2,432 bytes, line 24
24,p=h(function(e,t){return e===t}),f=function(e){return h(function(t,n){if(t.length!==n.length)return!1;for(var i=t.length,o=0;o<i;o++)if(!e.eq(t[o],n[o]))return!1;return!0})},m=function(e,t){return u(f(e),function(e){return d(e,t)})},g=function(e){return h(function(t,n){var i=Object.keys(t),o=Object.keys(n);if(!m(p).eq(i,o))return!1;for(var r=i.length,s=0;s<r;s++){var a=i[s];if(!e.eq(t[a],n[a]))return!1}return!0})},v=h(function(e,t){if(e===t)return!0;var n=l(e);return n===l(t)&&(c(n)?e===t:"array"===n?f(v).eq(e,t):"object"===n&&g(v).eq(e,t))});const y=Object.getPrototypeOf,b=(e,t,n)=>{var i;return!!n(e,t.prototype)||(null===(i=e.constructor)||void 0===i?void 0:i.name)===t.name},_=e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&b(e,String,(e,t)=>t.isPrototypeOf(e))?"string":t},w=e=>t=>_(t)===e,C=e=>t=>typeof t===e,k=e=>t=>e===t,x=(e,t)=>E(e)&&b(e,t,(e,t)=>y(e)===t),S=w("string"),E=w("object"),D=e=>x(e,Object),T=w("array"),A=k(null),M=C("boolean"),R=k(void 0),N=e=>null==e,I=e=>!N(e),P=C("function"),O=C("number"),L=(e,t)=>{if(T(e)){for(let n=0,i=e.length;n<i;++n)if(!t(e[n]))return!1;return!0}return!1},B=()=>{},F=(e,t)=>(...n)=>e(t.apply(null,n)),H=(e,t)=>n=>e(t(n)),$=e=>()=>e,z=e=>e,j=(e,t)=>e===t,q=e=>t=>!e(t),U=e=>()=>{throw new Error(e)},W=e=>e(),V=e=>{e()},Y=$(!1),G=$(!0);class K{constructor(e,t){this.tag=e,this.value=t}static some(e){return new K(!0,e)}static none(){return K.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?K.some(e(this.value)):K.none()}bind(e){return this.tag?e(this.value):K.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:K.none()}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(this.tag)return this.value;throw new Error(null!=e?e:"Called getOrDie on None")}static from(e){return I(e)?K.some(e):K.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}K.singletonNone=new K(!1);const X=Array.prototype.slice,Q=Array.prototype.indexOf,Z=Array.prototype.push,J=(e,t)=>Q.call(e,t),ee=(e,t)=>
vendor: 1,846 bytes, line 24
24{const n=J(e,t);return-1===n?K.none():K.some(n)},te=(e,t)=>J(e,t)>-1,ne=(e,t)=>{for(let n=0,i=e.length;n<i;n++){if(t(e[n],n))return!0}return!1},ie=(e,t)=>{const n=e.length,i=new Array(n);for(let o=0;o<n;o++){const n=e[o];i[o]=t(n,o)}return i},oe=(e,t)=>{for(let n=0,i=e.length;n<i;n++){t(e[n],n)}},re=(e,t)=>{for(let n=e.length-1;n>=0;n--){t(e[n],n)}},se=(e,t)=>{const n=[],i=[];for(let o=0,r=e.length;o<r;o++){const r=e[o];(t(r,o)?n:i).push(r)}return{pass:n,fail:i}},ae=(e,t)=>{const n=[];for(let i=0,o=e.length;i<o;i++){const o=e[i];t(o,i)&&n.push(o)}return n},le=(e,t,n)=>(re(e,(e,i)=>{n=t(n,e,i)}),n),ce=(e,t,n)=>(oe(e,(e,i)=>{n=t(n,e,i)}),n),de=(e,t,n)=>{for(let i=0,o=e.length;i<o;i++){const o=e[i];if(t(o,i))return K.some(o);if(n(o,i))break}return K.none()},ue=(e,t)=>de(e,t,Y),he=(e,t)=>{for(let n=0,i=e.length;n<i;n++){if(t(e[n],n))return K.some(n)}return K.none()},pe=e=>{const t=[];for(let n=0,i=e.length;n<i;++n){if(!T(e[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+e);Z.apply(t,e[n])}return t},fe=(e,t)=>pe(ie(e,t)),me=(e,t)=>{for(let n=0,i=e.length;n<i;++n){if(!0!==t(e[n],n))return!1}return!0},ge=e=>{const t=X.call(e,0);return t.reverse(),t},ve=(e,t)=>ae(e,e=>!te(t,e)),ye=(e,t)=>{const n={};for(let i=0,o=e.length;i<o;i++){const o=e[i];n[String(o)]=t(o,i)}return n},be=(e,t)=>{const n=X.call(e,0);return n.sort(t),n},_e=(e,t)=>t>=0&&t<e.length?K.some(e[t]):K.none(),we=e=>_e(e,0),Ce=e=>_e(e,e.length-1),ke=P(Array.from)?Array.from:e=>X.call(e),xe=(e,t)=>{for(let n=0;n<e.length;n++){const i=t(e[n],n);if(i.isSome())return i}return K.none()},Se=(e,t)=>{const n=[],i=P(t)?e=>ne(n,n=>t(n,e)):e=>te(n,e);for(let t=0,o=e.length;t<o;t++){const o=e[t];i(o)||n.push(o)}return n},Ee=Object.keys,De=Object.hasOwnProperty,Te=(e,t)=>{const n=Ee(e);for(let i=0,o=n.length;i<o;i++){const o=n[i];t(e[o],o)}},Ae=(e,t)=>
vendor: 5,411 bytes, line 24
24Me(e,(e,n)=>({k:n,v:t(e,n)})),Me=(e,t)=>{const n={};return Te(e,(e,i)=>{const o=t(e,i);n[o.k]=o.v}),n},Re=e=>(t,n)=>{e[n]=t},Ne=(e,t,n,i)=>{Te(e,(e,o)=>{(t(e,o)?n:i)(e,o)})},Ie=(e,t)=>{const n={},i={};return Ne(e,t,Re(n),Re(i)),{t:n,f:i}},Pe=(e,t)=>{const n={};return Ne(e,t,Re(n),B),n},Oe=(e,t)=>{const n=[];return Te(e,(e,i)=>{n.push(t(e,i))}),n},Le=e=>Oe(e,z),Be=(e,t)=>Fe(e,t)?K.from(e[t]):K.none(),Fe=(e,t)=>De.call(e,t),He=(e,t)=>Fe(e,t)&&void 0!==e[t]&&null!==e[t],$e=(e,t,n=v)=>g(n).eq(e,t),ze=e=>{const t={};return oe(e,e=>{t[e]={}}),Ee(t)},je=e=>void 0!==e.length,qe=Array.isArray,Ue=e=>{if(qe(e))return e;{const t=[];for(let n=0,i=e.length;n<i;n++)t[n]=e[n];return t}},We=(e,t,n)=>{if(!e)return!1;if(n=n||e,je(e)){for(let i=0,o=e.length;i<o;i++)if(!1===t.call(n,e[i],i,e))return!1}else for(const i in e)if(Fe(e,i)&&!1===t.call(n,e[i],i,e))return!1;return!0},Ve=(e,t)=>{const n=[];return We(e,(i,o)=>{n.push(t(i,o,e))}),n},Ye=(e,t)=>{const n=[];return We(e,(i,o)=>{t&&!t(i,o,e)||n.push(i)}),n},Ge=(e,t)=>{if(e)for(let n=0,i=e.length;n<i;n++)if(e[n]===t)return n;return-1},Ke=(e,t,n,i)=>{let o=R(n)?e[0]:n;for(let n=0;n<e.length;n++)o=t.call(i,o,e[n],n);return o},Xe=(e,t,n)=>{for(let i=0,o=e.length;i<o;i++)if(t.call(n,e[i],i,e))return i;return-1},Qe=e=>e[e.length-1],Ze=e=>{let t,n=!1;return(...i)=>(n||(n=!0,t=e.apply(null,i)),t)},Je=(e,t,n,i)=>{const o=e.isiOS()&&!0===/ipad/i.test(n),r=e.isiOS()&&!o,s=e.isiOS()||e.isAndroid(),a=s||i("(pointer:coarse)"),l=o||!r&&s&&i("(min-device-width:768px)"),c=r||s&&!l,d=t.isSafari()&&e.isiOS()&&!1===/safari/i.test(n),u=!c&&!l&&!d;return{isiPad:$(o),isiPhone:$(r),isTablet:$(l),isPhone:$(c),isTouch:$(a),isAndroid:e.isAndroid,isiOS:e.isiOS,isWebView:$(d),isDesktop:$(u)}},et=(e,t)=>{for(let n=0;n<e.length;n++){const i=e[n];if(i.test(t))return i}},tt=(e,t)=>{const n=et(e,t);if(!n)return{major:0,minor:0};const i=e=>Number(t.replace(n,"$"+e));return ot(i(1),i(2))},nt=(e,t)=>{const n=String(t).toLowerCase();return 0===e.length?it():tt(e,n)},it=()=>ot(0,0),ot=(e,t)=>({major:e,minor:t}),rt={nu:ot,detect:nt,unknown:it},st=(e,t)=>xe(t.brands,t=>{const n=t.brand.toLowerCase();return ue(e,e=>{var t;return n===(null===(t=e.brand)||void 0===t?void 0:t.toLowerCase())}).map(e=>({current:e.name,version:rt.nu(parseInt(t.version,10),0)}))}),at=(e,t)=>{const n=String(t).toLowerCase();return ue(e,e=>e.search(n))},lt=(e,t)=>at(e,t).map(e=>{const n=rt.detect(e.versionRegexes,t);return{current:e.name,version:n}}),ct=(e,t)=>at(e,t).map(e=>{const n=rt.detect(e.versionRegexes,t);return{current:e.name,version:n}}),dt=(e,t)=>e.substring(t),ut=(e,t,n)=>""===t||e.length>=t.length&&e.substr(n,n+t.length)===t,ht=(e,t)=>ft(e,t)?dt(e,t.length):e,pt=(e,t,n=0,i)=>{const o=e.indexOf(t,n);return-1!==o&&(!!R(i)||o+t.length<=i)},ft=(e,t)=>ut(e,t,0),mt=(e,t)=>ut(e,t,e.length-t.length),gt=e=>t=>t.replace(e,""),vt=gt(/^\s+|\s+$/g),yt=gt(/^\s+/g),bt=gt(/\s+$/g),_t=e=>e.length>0,wt=e=>!_t(e),Ct=(e,t)=>t<=0?"":new Array(t+1).join(e),kt=(e,t=10)=>{const n=parseInt(e,t);return isNaN(n)?K.none():K.some(n)},xt=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,St=e=>t=>pt(t,e),Et=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:e=>pt(e,"edge/")&&pt(e,"chrome")&&pt(e,"safari")&&pt(e,"applewebkit")},{name:"Chromium",brand:"Chromium",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,xt],search:e=>pt(e,"chrome")&&!pt(e,"chromeframe")},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:e=>pt(e,"msie")||pt(e,"trident")},{name:"Opera",versionRegexes:[xt,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:St("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:St("firefox")},{name:"Safari",versionRegexes:[xt,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:e=>(pt(e,"safari")||pt(e,"mobile/"))&&pt(e,"applewebkit")}],Dt=[{name:"Windows",search:St("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:e=>pt(e,"iphone")||pt(e,"ipad"),versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:St("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"macOS",search:St("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:St("linux"),versionRegexes:[]},{name:"Solaris",search:St("sunos"),versionRegexes:[]},{name:"FreeBSD",search:St("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:St("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],Tt={browsers:$(Et),oses:$(Dt)},At="Edge",Mt="Chromium",Rt="IE",Nt="Opera",It="Firefox",Pt="Safari",Ot=()=>Lt({current:void 0,version:rt.unknown()}),Lt=e=>{const t=e.current,n=e.version,i=e=>()=>t===e;return{current:t,version:n,isEdge:i(At),isChromium:i(Mt),isIE:i(Rt),isOpera:i(Nt),isFirefox:i(It),isSafari:i(Pt)}},Bt={unknown:Ot,nu:Lt,edge:$(At),chromium:$(Mt),ie:$(Rt),opera:$(Nt),firefox:$(It),safari:$(Pt)},Ft="Windows",Ht="iOS",$t="Android",zt="Linux",jt="macOS",qt="Solaris",Ut="FreeBSD",Wt="ChromeOS",Vt=()=>Yt({current:void 0,version:rt.unknown()}),Yt=e=>{const t=e.current,n=e.version,i=e=>()=>t===e;return{current:t,version:n,isWindows:i(Ft),isiOS:i(Ht),isAndroid:i($t),isMacOS:i(jt),isLinux:i(zt),isSolaris:i(qt),isFreeBSD:i(Ut),isChromeOS:i(Wt)}},Gt={unknown:Vt,nu:Yt,windows:$(Ft),ios:$(Ht),android:$($t),linux:$(zt),macos:$(jt),solaris:$(qt),freebsd:$(Ut),chromeos:$(Wt)}
24,Kt=(e,t,n)=>{const i=Tt.browsers(),o=Tt.oses(),r=t.bind(e=>st(i,e)).orThunk(()=>lt(i,e)).fold(Bt.unknown,Bt.nu),s=ct(o,e).fold(Gt.unknown,Gt.nu);return{browser:r,os:s,deviceType:Je(s,r,e,n)}},Xt={detect:Kt},Qt=e=>window.matchMedia(e).matches;let Zt=Ze(()=>Xt.detect(navigator.userAgent,K.from(navigator.userAgentData),Qt));const Jt=()=>Zt(),en=navigator.userAgent,tn=Jt(),nn=tn.browser,on=tn.os,rn=tn.deviceType,sn=-1!==en.indexOf("Windows Phone"),an={transparentSrc:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",documentMode:nn.isIE()?document.documentMode||7:10,cacheSuffix:null,container:null,canHaveCSP:!nn.isIE(),windowsPhone:sn,browser:{current:nn.current,version:nn.version,isChromium:nn.isChromium,isEdge:nn.isEdge,isFirefox:nn.isFirefox,isIE:nn.isIE,isOpera:nn.isOpera,isSafari:nn.isSafari},os:{current:on.current,version:on.version,isAndroid:on.isAndroid,isChromeOS:on.isChromeOS,isFreeBSD:on.isFreeBSD,isiOS:on.isiOS,isLinux:on.isLinux,isMacOS:on.isMacOS,isSolaris:on.isSolaris,isWindows:on.isWindows},deviceType:{isDesktop:rn.isDesktop,isiPad:rn.isiPad,isiPhone:rn.isiPhone,isPhone:rn.isPhone,isTablet:rn.isTablet,isTouch:rn.isTouch,isWebView:rn.isWebView}},ln=/^\s*|\s*$/g,cn=e=>N(e)?"":(""+e).replace(ln,""),dn=(e,t)=>t?!("array"!==t||!qe(e))||typeof e===t:void 0!==e,un=(e,t,n={})=>{const i=S(e)?e.split(t||","):e||[];let o=i.length;for(;o--;)n[i[o]]={};return n},hn=(e,...t)=>{for(let n=0;n<t.length;n++){const i=t[n];for(const t in i)if(Fe(i,t)){const n=i[t];void 0!==n&&(e[t]=n)}}return e},pn=function(e,t,n,i){i=i||this,e&&(n&&(e=e[n]),We(e,(e,o)=>!1!==t.call(i,e,o,n)&&(pn(e,t,n,i),!0)))},fn=(e,t=window)=>{const n=e.split(".");for(let e=0,i=n.length;e<i&&(t=t[n[e]]);e++);return t},mn=(e,t)=>T(e)?e:""===e?[]:Ve(e.split(t||","),cn),gn={trim:cn,isArray:qe,is:dn,toArray:Ue,makeMap:un,each:We,map:Ve,grep:Ye,inArray:Ge,hasOwn:Fe,extend:hn,walk:pn,resolve:fn,explode:mn,_addCacheSuffix:e=>{const t=an.cacheSuffix;return t&&(e+=(-1===e.indexOf("?")?"?":"&")+t),e}},vn=(e,t,n=j)=>e.exists(e=>n(e,t)),yn=(e,t,n=j)=>_n(e,t,n).getOr(e.isNone()&&t.isNone()),bn=e=>{const t=[],n=e=>{t.push(e)};for(let t=0;t<e.length;t++)e[t].each(n);return t},_n=(e,t,n)=>e.isSome()&&t.isSome()?K.some(n(e.getOrDie(),t.getOrDie())):K.none(),wn=(e,t,n,i)=>e.isSome()&&t.isSome()&&n.isSome()?K.some(i(e.getOrDie(),t.getOrDie(),n.getOrDie())):K.none(),Cn=(e,t)=>e?K.some(t):K.none(),kn="undefined"!=typeof window?window:Function("return this;")(),xn=(e,t)=>{let n=null!=t?t:kn;for(let t=0;t<e.length&&null!=n;++t)n=n[e[t]];return n},Sn=(e,t)=>{const n=e.split(".");return xn(n,t)},En=(e,t)=>Sn(e,t),Dn=(e,t)=>{const n=En(e,t);if(null==n)throw new Error(e+" not available on this browser");return n},Tn=Object.getPrototypeOf,An=e=>Dn("HTMLElement",e),Mn=e=>{const t=Sn("ownerDocument.defaultView",e);return E(e)&&(An(t).prototype.isPrototypeOf(e)||/^HTML\w*Element$/.test(Tn(e).constructor.name))
25},Rn=8,Nn=9,In=11,Pn=1,On=3,Ln=e=>e.dom.nodeName.toLowerCase(),Bn=e=>e.dom.nodeType,Fn=e=>t=>Bn(t)===e,Hn=e=>Bn(e)===Rn||"#comment"===Ln(e),$n=e=>zn(e)&&Mn(e.dom),zn=Fn(Pn),jn=Fn(On),qn=Fn(Nn),Un=Fn(In),Wn=e=>t=>zn(t)&&Ln(t)===e,Vn=(e,t,n)=>{if(!(S(n)||M(n)||O(n)))throw console.error("Invalid call to Attribute.set. Key ",t,":: Value ",n,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(t,n+"")},Yn=(e,t,n)=>{Vn(e.dom,t,n)},Gn=(e,t)=>{const n=e.dom;Te(t,(e,t)=>{Vn(n,t,e)})},Kn=(e,t)=>{const n=e.dom.getAttribute(t);return null===n?void 0:n},Xn=(e,t)=>K.from(Kn(e,t)),Qn=(e,t)=>{const n=e.dom;return!(!n||!n.hasAttribute)&&n.hasAttribute(t)},Zn=(e,t)=>{e.dom.removeAttribute(t)},Jn=e=>{const t=e.dom.attributes;return null==t||0===t.length},ei=e=>ce(e.dom.attributes,(e,t)=>(e[t.name]=t.value,e),{}),ti=(e,t)=>{const n=Kn(e,t);return void 0===n||""===n?[]:n.split(" ")},ni=(e,t,n)=>{const i=ti(e,t).concat([n]);return Yn(e,t,i.join(" ")),!0},ii=(e,t,n)=>{const i=ae(ti(e,t),e=>e!==n);return i.length>0?Yn(e,t,i.join(" ")):Zn(e,t),!1},oi=e=>void 0!==e.dom.classList,ri=e=>ti(e,"class"),si=(e,t)=>ni(e,"class",t),ai=(e,t)=>ii(e,"class",t),li=(e,t)=>te(ri(e),t)?ai(e,t):si(e,t),ci=(e,t)=>{oi(e)?e.dom.classList.add(t):si(e,t)},di=e=>{0===(oi(e)?e.dom.classList:ri(e)).length&&Zn(e,"class")},ui=(e,t)=>{if(oi(e)){e.dom.classList.remove(t)}else ai(e,t);di(e)},hi=(e,t)=>{const n=oi(e)?e.dom.classList.toggle(t):li(e,t);return di(e),n},pi=(e,t)=>oi(e)&&e.dom.classList.contains(t),fi=(e,t)=>{const n=(t||document).createElement("div");if(n.innerHTML=e,!n.hasChildNodes()||n.childNodes.length>1){const t="HTML does not have a single root node";throw console.error(t,e),new Error(t)}return vi(n.childNodes[0])},mi=(e,t)=>{const n=(t||document).createElement(e);return vi(n)},gi=(e,t)=>{const n=(t||document).createTextNode(e);return vi(n)},vi=e=>{if(null==e)throw new Error("Node cannot be null or undefined");return{dom:e}},yi={fromHtml:fi,fromTag:mi,fromText:gi,fromDom:vi,fromPoint:(e,t,n
vendor: 8,826 bytes, line 25
25)=>K.from(e.dom.elementFromPoint(t,n)).map(vi)},bi=(e,t)=>{const n=[],i=e=>(n.push(e),t(e));let o=t(e);do{o=o.bind(i)}while(o.isSome());return n},_i=(e,t)=>{const n=e.dom;if(n.nodeType!==Pn)return!1;{const e=n;if(void 0!==e.matches)return e.matches(t);if(void 0!==e.msMatchesSelector)return e.msMatchesSelector(t);if(void 0!==e.webkitMatchesSelector)return e.webkitMatchesSelector(t);if(void 0!==e.mozMatchesSelector)return e.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")}},wi=e=>e.nodeType!==Pn&&e.nodeType!==Nn&&e.nodeType!==In||0===e.childElementCount,Ci=(e,t)=>{const n=void 0===t?document:t.dom;return wi(n)?[]:ie(n.querySelectorAll(e),yi.fromDom)},ki=(e,t)=>{const n=void 0===t?document:t.dom;return wi(n)?K.none():K.from(n.querySelector(e)).map(yi.fromDom)},xi=(e,t)=>e.dom===t.dom,Si=(e,t)=>{const n=e.dom,i=t.dom;return n!==i&&n.contains(i)},Ei=e=>yi.fromDom(e.dom.ownerDocument),Di=e=>qn(e)?e:Ei(e),Ti=e=>yi.fromDom(Di(e).dom.documentElement),Ai=e=>yi.fromDom(Di(e).dom.defaultView),Mi=e=>K.from(e.dom.parentNode).map(yi.fromDom),Ri=e=>K.from(e.dom.parentElement).map(yi.fromDom),Ni=(e,t)=>{const n=P(t)?t:Y;let i=e.dom;const o=[];for(;null!==i.parentNode&&void 0!==i.parentNode;){const e=i.parentNode,t=yi.fromDom(e);if(o.push(t),!0===n(t))break;i=e}return o},Ii=e=>{const t=t=>ae(t,t=>!xi(e,t));return Mi(e).map(Fi).map(t).getOr([])},Pi=e=>K.from(e.dom.previousSibling).map(yi.fromDom),Oi=e=>K.from(e.dom.nextSibling).map(yi.fromDom),Li=e=>ge(bi(e,Pi)),Bi=e=>bi(e,Oi),Fi=e=>ie(e.dom.childNodes,yi.fromDom),Hi=(e,t)=>{const n=e.dom.childNodes;return K.from(n[t]).map(yi.fromDom)},$i=e=>Hi(e,0),zi=e=>Hi(e,e.dom.childNodes.length-1),ji=e=>e.dom.childNodes.length,qi=e=>e.dom.hasChildNodes(),Ui=e=>{const t=e.dom.head;if(null==t)throw new Error("Head is not available yet");return yi.fromDom(t)},Wi=e=>Un(e)&&I(e.dom.host),Vi=P(Element.prototype.attachShadow)&&P(Node.prototype.getRootNode),Yi=$(Vi),Gi=Vi?e=>yi.fromDom(e.dom.getRootNode()):Di,Ki=e=>Wi(e)?e:Ui(Di(e)),Xi=e=>Wi(e)?e:yi.fromDom(Di(e).dom.body),Qi=e=>{const t=Gi(e);return Wi(t)?K.some(t):K.none()},Zi=e=>yi.fromDom(e.dom.host),Ji=e=>{if(Yi()&&I(e.target)){const t=yi.fromDom(e.target);if(zn(t)&&eo(t)&&e.composed&&e.composedPath){const t=e.composedPath();if(t)return we(t)}}return K.from(e.target)},eo=e=>I(e.dom.shadowRoot),to=e=>{const t=jn(e)?e.dom.parentNode:e.dom;if(null==t||null===t.ownerDocument)return!1;const n=t.ownerDocument;return Qi(yi.fromDom(t)).fold(()=>n.body.contains(t),H(to,Zi))};var no=(e,t,n,i,o)=>e(n,i)?K.some(n):P(o)&&o(n)?K.none():t(n,i,o);const io=(e,t,n)=>{let i=e.dom;const o=P(n)?n:Y;for(;i.parentNode;){i=i.parentNode;const e=yi.fromDom(i);if(t(e))return K.some(e);if(o(e))break}return K.none()},oo=(e,t,n)=>no((e,t)=>t(e),io,e,t,n),ro=(e,t)=>{const n=e.dom;return n.parentNode?so(yi.fromDom(n.parentNode),n=>!xi(e,n)&&t(n)):K.none()},so=(e,t)=>{const n=e=>t(yi.fromDom(e));return ue(e.dom.childNodes,n).map(yi.fromDom)},ao=(e,t)=>{const n=e=>{for(let i=0;i<e.childNodes.length;i++){const o=yi.fromDom(e.childNodes[i]);if(t(o))return K.some(o);const r=n(e.childNodes[i]);if(r.isSome())return r}return K.none()};return n(e.dom)},lo=(e,t,n)=>io(e,e=>_i(e,t),n),co=(e,t)=>ki(t,e),uo=(e,t,n)=>{const i=(e,t)=>_i(e,t);return no(i,lo,e,t,n)},ho=e=>uo(e,"[contenteditable]"),po=(e,t=!1)=>to(e)?e.dom.isContentEditable:ho(e).fold($(t),e=>"true"===fo(e)),fo=e=>e.dom.contentEditable,mo=e=>void 0!==e.style&&P(e.style.getPropertyValue),go=(e,t,n)=>{if(!S(n))throw console.error("Invalid call to CSS.set. Property ",t,":: Value ",n,":: Element ",e),new Error("CSS value must be a string: "+n);mo(e)&&e.style.setProperty(t,n)},vo=(e,t)=>{mo(e)&&e.style.removeProperty(t)},yo=(e,t,n)=>{const i=e.dom;go(i,t,n)},bo=(e,t)=>{const n=e.dom;Te(t,(e,t)=>{go(n,t,e)})},_o=(e,t)=>{const n=e.dom,i=window.getComputedStyle(n).getPropertyValue(t);return""!==i||to(e)?i:wo(n,t)},wo=(e,t)=>mo(e)?e.style.getPropertyValue(t):"",Co=(e,t)=>{const n=e.dom,i=wo(n,t);return K.from(i).filter(e=>e.length>0)},ko=e=>{const t={},n=e.dom;if(mo(n))for(let e=0;e<n.style.length;e++){const i=n.style.item(e);t[i]=n.style[i]}return t},xo=(e,t)=>{const n=e.dom;vo(n,t),vn(Xn(e,"style").map(vt),"")&&Zn(e,"style")},So=e=>e.dom.offsetWidth,Eo=(e,t)=>{Mi(e).each(n=>{n.dom.insertBefore(t.dom,e.dom)})},Do=(e,t)=>{Oi(e).fold(()=>{Mi(e).each(e=>{Ao(e,t)})},e=>{Eo(e,t)})},To=(e,t)=>{$i(e).fold(()=>{Ao(e,t)},n=>{e.dom.insertBefore(t.dom,n.dom)})},Ao=(e,t)=>{e.dom.appendChild(t.dom)},Mo=(e,t)=>{Eo(e,t),Ao(t,e)},Ro=(e,t)=>{oe(t,(n,i)=>{const o=0===i?e:t[i-1];Do(o,n)})},No=(e,t)=>{oe(t,t=>{Ao(e,t)})},Io=e=>{e.dom.textContent="",oe(Fi(e),e=>{Po(e)})},Po=e=>{const t=e.dom;null!==t.parentNode&&t.parentNode.removeChild(t)},Oo=e=>{const t=Fi(e);t.length>0&&Ro(e,t),Po(e)},Lo=(e,t)=>{const n=(t||document).createElement("div");return n.innerHTML=e,Fi(yi.fromDom(n))},Bo=e=>ie(e,yi.fromDom),Fo=e=>e.dom.innerHTML,Ho=(e,t)=>{const n=Ei(e).dom,i=yi.fromDom(n.createDocumentFragment()),o=Lo(t,n);No(i,o),Io(e),Ao(e,i)},$o=e=>{const t=yi.fromTag("div"),n=yi.fromDom(e.dom.cloneNode(!0));return Ao(t,n),Fo(t)},zo=(e,t,n,i,o,r,s)=>({target:e,x:t,y:n,stop:i,prevent:o,kill:r,raw:s}),jo=e=>{const t=yi.fromDom(Ji(e).getOr(e.target)),n=()=>e.stopPropagation(),i=()=>e.preventDefault(),o=F(i,n);return zo(t,e.clientX,e.clientY,n,i,o,e)},qo=(e,t)=>n=>{e(n)&&t(jo(n))},Uo=(t,n,i,o,r)=>{const s=qo(i,o);return t.dom.addEventListener(n,s,r),{unbind:e(Vo,t,n,s,r)}},Wo=(e,t,n,i)=>Uo(e,t,n,i,!1),Vo=(e,t,n,i)=>{e.dom.removeEventListener(t,n,i)},Yo=(e,t)=>({left:e,top:t,translate:(n,i)=>Yo(e+n,t+i)}),Go=Yo,Ko=e=>{const t=e.getBoundingClientRect();return Go(t.left,t.top)},Xo=(e,t)=>void 0!==e?e:void 0!==t?t:0,Qo=e=>{const t=e.dom.ownerDocument,n=t.body,i=t.defaultView,o=t.documentElement;if(n===e.dom)return Go(n.offsetLeft,n.offsetTop);const r=Xo(null==i?void 0:i.pageYOffset,o.scrollTop),s=Xo(null==i?void 0:i.pageXOffset,o.scrollLeft),a=Xo(o.clientTop,n.clientTop),l=Xo(o.clientLeft,n.clientLeft);return Zo(e).translate(s-l,r-a)},Zo=e=>{const t=e.dom,n=t.ownerDocument.body;return n===t?Go(n.offsetLeft,n.offsetTop):to(e)?Ko(t):Go(0,0)},Jo=e=>{const t=void 0!==e?e.dom:document,n=t.body.scrollLeft||t.documentElement.scrollLeft,i=t.body.scrollTop||t.documentElement.scrollTop;return Go(n,i)},er=(e,t,n)=>{const i=(void 0!==n?n.dom:document).defaultView;i&&i.scrollTo(e,t)},tr=(e,t)=>{Jt().browser.isSafari()&&P(e.dom.scrollIntoViewIfNeeded)?e.dom.scrollIntoViewIfNeeded(!1):e.dom.scrollIntoView(t)},nr=e=>{const t=void 0===e?window:e;return Jt().browser.isFirefox()?K.none():K.from(t.visualViewport)},ir=(e,t,n,i)=>({x:e,y:t,width:n,height:i,right:e+n,bottom:t+i}),or=e=>{const t=void 0===e?window:e,n=t.document,i=Jo(yi.fromDom(n));return nr(t).fold(()=>{const e=t.document.documentElement,n=e.clientWidth,o=e.clientHeight;return ir(i.left,i.top,n,o)},e=>ir(Math.max(e.pageLeft,i.left),Math.max(e.pageTop,i.top),e.width,e.height))},rr=(e,t)=>ae(Fi(e),t),sr=(e,t)=>{let n=[];return oe(Fi(e),e=>{t(e)&&(n=n.concat([e])),n=n.concat(sr(e,t))}),n},ar=(e,t)=>Ci(t,e),lr=(e,t,n)=>lo(e,t,n).isSome();class cr{constructor(e,t){this.node=e,this.rootNode=t,this.current=this.current.bind(this),this.next=this.next.bind(this),this.prev=this.prev.bind(this),this.prev2=this.prev2.bind(this)}current(){return this.node}next(e){return this.node=this.findSibling(this.node,"firstChild","nextSibling",e),this.node}prev(e){return this.node=this.findSibling(this.node,"lastChild","previousSibling",e),this.node}prev2(e){return this.node=this.findPreviousNode(this.node,e),this.node}findSibling(e,t,n,i){if(e){if(!i&&e[t])return e[t];if(e!==this.rootNode){let t=e[n];if(t)return t;for(let i=e.parentNode;i&&i!==this.rootNode;i=i.parentNode)if(t=i[n],t)return t}}}findPreviousNode(e,t){if(e){const n=e.previousSibling;if(this.rootNode&&n===this.rootNode)return;if(n){if(!t)for(let e=n.lastChild;e;e=e.lastChild)if(!e.lastChild)return e;return n}const i=e.parentNode;if(i&&i!==this.rootNode)return i}}}const dr=e=>t=>!!t&&t.nodeType===e,ur=e=>!!e&&!Object.getPrototypeOf(e),hr=dr(1),pr=e=>hr(e)&&$n(yi.fromDom(e)),fr=e=>hr(e)&&"http://www.w3.org/2000/svg"===e.namespaceURI,mr=e=>{const t=e.toLowerCase();return e=>I(e)&&e.nodeName.toLowerCase()===t},gr=e=>{const t=e.map(e=>e.toLowerCase());return e=>{if(e&&e.nodeName){const n=e.nodeName.toLowerCase();return te(t,n)}return!1}},vr=(e,t)=>{const n=t.toLowerCase().split(" ");return t=>{if(hr(t)){const i=t.ownerDocument.defaultView;if(i)for(let o=0;o<n.length;o++){const r=i.getComputedStyle(t,null);if((r?r.getPropertyValue(e):null)===n[o])return!0}}return!1}},yr=e=>t=>hr(t)&&t.hasAttribute(e),br=(e,t)=>n=>hr(n)&&n.getAttribute(e)===t,_r=e=>hr(e)&&e.hasAttribute("data-mce-bogus"),wr=e=>hr(e)&&"all"===e.getAttribute("data-mce-bogus"),Cr=e=>hr(e)&&"TABLE"===e.tagName,kr=e=>t=>{if(pr(t)){if(t.contentEditable===e)return!0;
25if(t.getAttribute("data-mce-contenteditable")===e)return!0}return!1},xr=gr(["textarea","input"]),Sr=dr(3),Er=dr(4),Dr=dr(7),Tr=dr(8),Ar=dr(9),Mr=dr(11),Rr=mr("br"),Nr=mr("img"),Ir=kr("true"),Pr=kr("false"),Or=gr(["td","th"]),Lr=gr(["td","th","caption"]),Br=gr(["video","audio","object","embed"]),Fr=mr("li"),Hr=mr("details"),$r=mr("summary"),zr="\ufeff",jr="\xa0",qr=e=>e===zr,Ur=e=>e.replace(/\uFEFF/g,""),Wr=(e,t)=>{const n=n=>{if(!e(n))throw new Error("Can only get "+t+" value of a "+t+" node");return i(n).getOr("")},i=t=>e(t)?K.from(t.dom.nodeValue):K.none(),o=(n,i)=>{if(!e(n))throw new Error("Can only set raw "+t+" value of a "+t+" node");n.dom.nodeValue=i};return{get:n,getOption:i,set:o}},Vr=Wr(jn,"text"),Yr=e=>Vr.get(e),Gr=e=>Vr.getOption(e),Kr=(e,t)=>Vr.set(e,t),Xr=["td","th"],Qr=["thead","tbody","tfoot"],Zr=["li","dd","dt"],Jr=["ul","ol","dl"],es=["pre","script","textarea","style"],ts=e=>{let t;return n=>(t=t||ye(e,G),Fe(t,Ln(n)))},ns=e=>"table"===Ln(e),is=e=>zn(e)&&"br"===Ln(e),os=ts(["h1","h2","h3","h4","h5","h6","p","div","address","pre","form","blockquote","center","dir","fieldset","header","footer","article","section","hgroup","aside","nav","figure"]),rs=ts(Jr),ss=ts(Zr),as=ts(Qr),ls=ts(Xr),cs=ts(es),ds=e=>{const t=[];let n=e.dom;for(;n;)t.push(yi.fromDom(n)),n=n.lastChild;return t},us=e=>{const t=ar(e,"br"),n=ae(ds(e).slice(-1),is);t.length===n.length&&oe(n,Po)},hs=()=>{const e=yi.fromTag("br");return Yn(e,"data-mce-bogus","1"),e},ps=e=>{Io(e),Ao(e,hs())},fs=(e,t)=>{zi(e).each(n=>{Pi(n).each(i=>{t.isBlock(Ln(e))&&is(n)&&t.isBlock(Ln(i))&&Po(n)})})},ms=zr,gs=qr,vs=Ur,ys=e=>e.insertContent(ms,{preserve_zwsp:!0}),bs=hr,_s=Sr,ws=e=>(_s(e)&&(e=e.parentNode),bs(e)&&e.hasAttribute("data-mce-caret")),Cs=e=>_s(e)&&gs(e.data),ks=e=>ws(e)||Cs(e),xs=e=>e.firstChild!==e.lastChild||!Rr(e.firstChild),Ss=(e,t)=>{var n;const i=(null!==(n=e.ownerDocument)&&void 0!==n?n:document).createTextNode(ms),o=e.parentNode;if(t){const t=e.previousSibling;if(_s(t)){if(ks(t))return t;if(Ms(t))return t.splitText(t.data.length-1)}null==o||o.insertBefore(i,e)}else{const t=e.nextSibling;if(_s(t)){if(ks(t))return t;if(As(t))return t.splitText(1),t}e.nextSibling?null==o||o.insertBefore(i,e.nextSibling):null==o||o.appendChild(i)}return i},Es=e=>{const t=e.container();return!!Sr(t)&&(t.data.charAt(e.offset())===ms||e.isAtStart()&&Cs(t.previousSibling))},Ds=e=>{const t=e.container();return!!Sr(t)&&(t.data.charAt(e.offset()-1)===ms||e.isAtEnd()&&Cs(t.nextSibling))},Ts=(e,t,n)=>{var i;const o=(null!==(i=t.ownerDocument)&&void 0!==i?i:document).createElement(e);o.setAttribute("data-mce-caret",n?"before":"after"),o.setAttribute("data-mce-bogus","all"),o.appendChild(hs().dom);const r=t.parentNode;return n?null==r||r.insertBefore(o,t):t.nextSibling?null==r||r.insertBefore(o,t.nextSibling):null==r||r.appendChild(o),o},As=e=>_s(e)&&e.data[0]===ms,Ms=e=>_s(e)&&e.data[e.data.length-1]===ms,Rs=e=>{var t;const n=e.getElementsByTagName("br"),i=n[n.length-1];_r(i)&&(null===(t=i.parentNode)||void 0===t||t.removeChild(i))},Ns=e=>e&&e.hasAttribute("data-mce-caret")?(Rs(e),e.removeAttribute("data-mce-caret"),e.removeAttribute("data-mce-bogus"),e.removeAttribute("style"),e.removeAttribute("data-mce-style"),e.removeAttribute("_moz_abspos"),e):null,Is=e=>ws(e.startContainer),Ps=Ir,Os=Pr,Ls=Rr,Bs=Sr,Fs=gr(["script","style","textarea"]),Hs=gr(["img","input","textarea","hr","iframe","video","audio","object","embed"]),$s=gr(["table"]),zs=ks,js=e=>!zs(e)&&(Bs(e)?!Fs(e.parentNode):Hs(e)||Ls(e)||$s(e)||Us(e)),qs=e=>hr(e)&&"true"===e.getAttribute("unselectable"),Us=e=>!qs(e)&&Os(e),Ws=(e,t)=>{for(let n=e.parentNode;n&&n!==t;n=n.parentNode){if(Us(n))return!1;if(Ps(n))return!0}return!0},Vs=e=>!!Us(e)&&!ce(ke(e.getElementsByTagName("*")),(e,t)=>e||Ps(t),!1),Ys=e=>Hs(e)||Vs(e),Gs=(e,t)=>js(e)&&Ws(e,t),Ks=/^[ \t\r\n]*$/,Xs=e=>Ks.test(e),Qs=e=>{for(const t of e)if(!qr(t))return!1;return!0},Zs=e=>-1!==" \f\t\v".indexOf(e),Js=e=>"\n"===e||"\r"===e,ea=(e,t)=>t<e.length&&t>=0&&Js(e[t]),ta=(e,t=4,n=!0,i=!0)=>{const o=Ct(" ",t),r=e.replace(/\t/g,o);return ce(r,(e,t)=>Zs(t)||t===jr?e.pcIsSpace||""===e.str&&n||e.str.length===r.length-1&&i||ea(r,e.str.length+1)?{pcIsSpace:!1,str:e.str+jr}:{pcIsSpace:!0,str:e.str+" "}:{pcIsSpace:Js(t),str:e.str+t}
25,{pcIsSpace:!1,str:""}).str},na=(t,n)=>{const i=yi.fromDom(n),o=yi.fromDom(t);return lr(o,"pre,code",e(xi,i))},ia=(e,t)=>Sr(e)&&Xs(e.data)&&!na(e,t),oa=e=>hr(e)&&"A"===e.nodeName&&!e.hasAttribute("href")&&(e.hasAttribute("name")||e.hasAttribute("id")),ra=(e,t)=>js(e)&&!ia(e,t)||oa(e)||sa(e),sa=yr("data-mce-bookmark"),aa=yr("data-mce-bogus"),la=br("data-mce-bogus","all"),ca=e=>Ri(yi.fromDom(e)).exists(e=>!po(e)),da=(e,t)=>{let n=0;if(ra(e,e))return!1;{let i=e.firstChild;if(!i)return!0;const o=new cr(i,e);do{if(t){if(la(i)){i=o.next(!0);continue}if(aa(i)){i=o.next();continue}}if(Ir(i)&&ca(i))return!1;if(Rr(i))n++,i=o.next();else{if(ra(i,e))return!1;i=o.next()}}while(i);return n<=1}},ua=(e,t=!0)=>da(e.dom,t),ha=e=>"svg"===e.toLowerCase(),pa=e=>ha(e.nodeName),fa=e=>"svg"===(null==e?void 0:e.nodeName)?"svg":"html",ma=["svg"],ga=()=>{let e=[];const t=()=>e[e.length-1];return{track:n=>{pa(n)&&e.push(n);let i=t();return i&&!i.contains(n)&&(e.pop(),i=t()),fa(i)},current:()=>fa(t()),reset:()=>{e=[]}}},va="data-mce-block",ya=e=>ae(Ee(e),e=>!/[A-Z]/.test(e)),ba=e=>ie(ya(e),e=>`${e}:`+ie(ma,t=>`not(${t} ${e})`).join(":")).join(","),_a=(e,t)=>I(t.querySelector(e))?(t.setAttribute(va,"true"),"inline-boundary"===t.getAttribute("data-mce-selected")&&t.removeAttribute("data-mce-selected"),!0):(t.removeAttribute(va),!1),wa=(e,t)=>{const n=ba(e.getTransparentElements()),i=ba(e.getBlockElements());return ae(t.querySelectorAll(n),e=>_a(i,e))},Ca=(e,t)=>{var n;const i=t?"lastChild":"firstChild";for(let t=e[i];t;t=t[i])if(ua(yi.fromDom(t)))return void(null===(n=t.parentNode)||void 0===n||n.removeChild(t))},ka=(e,t)=>{const n=document.createRange(),i=e.parentNode;if(i){n.setStartBefore(e),n.setEndBefore(t);const o=n.extractContents();Ca(o,!0),n.setStartAfter(t),n.setEndAfter(e);const r=n.extractContents();Ca(r,!1),ua(yi.fromDom(o))||i.insertBefore(o,e),ua(yi.fromDom(t))||i.insertBefore(t,e),ua(yi.fromDom(r))||i.insertBefore(r,e),i.removeChild(e)}},xa=(e,t,n)=>{const i=e.getBlockElements(),o=yi.fromDom(t),r=e=>Ln(e)in i,s=e=>xi(e,o);oe(Bo(n),t=>{io(t,r,s).each(n=>{const i=rr(t,t=>r(t)&&!e.isValidChild(Ln(n),Ln(t)));if(i.length>0){const t=Ri(n);oe(i,e=>{io(e,r,s).each(t=>{ka(t.dom,e.dom)})}),t.each(t=>wa(e,t.dom))}})})},Sa=(e,t,n)=>{oe([...n,...Na(e,t)?[t]:[]],t=>oe(ar(yi.fromDom(t),t.nodeName.toLowerCase()),t=>{Ia(e,t.dom)&&Oo(t)}))},Ea=(e,t)=>{const n=wa(e,t);xa(e,t,n),Sa(e,t,n)},Da=(e,t)=>{if(Ra(e,t)){const n=ba(e.getBlockElements());_a(n,t)}},Ta=(e,t,n)=>{const i=e=>xi(e,yi.fromDom(t)),o=Ni(yi.fromDom(n),i);_e(o,o.length-2).filter(zn).fold(()=>Ea(e,t),t=>Ea(e,t.dom))},Aa=e=>e.hasAttribute(va),Ma=(e,t)=>Fe(e.getTransparentElements(),t),Ra=(e,t)=>hr(t)&&Ma(e,t.nodeName),Na=(e,t)=>Ra(e,t)&&Aa(t),Ia=(e,t)=>Ra(e,t)&&!Aa(t),Pa=(e,t)=>1===t.type&&Ma(e,t.name)&&S(t.attr(va)),Oa=Jt().browser,La=e=>ue(e,zn),Ba=e=>Oa.isFirefox()&&"table"===Ln(e)?La(Fi(e)).filter(e=>"caption"===Ln(e)).bind(e=>La(Bi(e)).map(t=>{const n=t.dom.offsetTop,i=e.dom.offsetTop,o=e.dom.offsetHeight;return n<=i?-o:0})).getOr(0):0,Fa=(e,t)=>e.children&&te(e.children,t),Ha=(e,t,n)=>{let i=0,o=0;const r=e.ownerDocument;if(n=n||e,t){if(n===e&&t.getBoundingClientRect&&"static"===_o(yi.fromDom(e),"position")){const n=t.getBoundingClientRect();return i=n.left+(r.documentElement.scrollLeft||e.scrollLeft)-r.documentElement.clientLeft,o=n.top+(r.documentElement.scrollTop||e.scrollTop)-r.documentElement.clientTop,{x:i,y:o}}let s=t;for(;s&&s!==n&&s.nodeType&&!Fa(s,n);){const e=s;i+=e.offsetLeft||0,o+=e.offsetTop||0,s=e.offsetParent}for(s=t.parentNode;s&&s!==n&&s.nodeType&&!Fa(s,n);)i-=s.scrollLeft||0,o-=s.scrollTop||0,s=s.parentNode;o+=Ba(yi.fromDom(t))}return{x:i,y:o}},$a=(e,t={})=>{let n=0;const i={},o=yi.fromDom(e),r=Di(o),s=e=>{Ao(Ki(o),e)},a=e=>{const t=Ki(o);co(t,"#"+e).each(Po)},l=e=>Be(i,e).getOrThunk(()=>({id:"mce-u"+n++,passed:[],failed:[],count:0})),c=e=>new Promise((n,o)=>{let a;const c=gn._addCacheSuffix(e),d=l(c);i[c]=d,d.count++;const u=(e,t)=>{oe(e,V),d.status=t,d.passed=[],d.failed=[],a&&(a.onload=null,a.onerror=null,a=null)},h=()=>u(d.passed,2),p=()=>u(d.failed,3);if(n&&d.passed.push(n),o&&d.failed.push(o),1===d.status)return;if(2===d.status)return void h();if(3===d.status)return void p();d.status=1;const f=yi.fromTag("link",r.dom);Gn(f,{rel:"stylesheet",type:"text/css",id:d.id}),t.contentCssCors&&Yn(f,"crossOrigin","anonymous"),t.referrerPolicy&&Yn(f,"referrerpolicy",t.referrerPolicy),a=f.dom,a.onload=h,a.onerror=p,s(f),Yn(f,"href",c)}),d=e=>Promise.allSettled(ie(e,e=>
25c(e).then($(e)))).then(e=>{const t=se(e,e=>"fulfilled"===e.status);return t.fail.length>0?Promise.reject(ie(t.fail,e=>e.reason)):ie(t.pass,e=>e.value)}),u=e=>{const t=gn._addCacheSuffix(e);Be(i,t).each(e=>{0===--e.count&&(delete i[t],a(e.id))})},h=e=>{oe(e,e=>{u(e)})};return{load:c,loadRawCss:(e,t)=>{const n=l(e);i[e]=n,n.count++;const o=yi.fromTag("style",r.dom);Gn(o,{rel:"stylesheet",type:"text/css",id:n.id}),o.dom.innerHTML=t,s(o)},loadAll:d,unload:u,unloadRawCss:e=>{Be(i,e).each(t=>{0===--t.count&&(delete i[e],a(t.id))})},unloadAll:h,_setReferrerPolicy:e=>{t.referrerPolicy=e},_setContentCssCors:e=>{t.contentCssCors=e}}},za=()=>{const e=new WeakMap;return{forElement:(t,n)=>{const i=Gi(t).dom;return K.from(e.get(i)).getOrThunk(()=>{const t=$a(i,n);return e.set(i,t),t})}}},ja=za(),qa=e=>"span"===e.nodeName.toLowerCase(),Ua=(e,t,n)=>I(e)&&(ra(e,t)||n.isInline(e.nodeName.toLowerCase())),Wa=(e,t,n)=>{const i=new cr(e,t).prev(!1),o=new cr(e,t).next(!1),r=R(i)||Ua(i,t,n),s=R(o)||Ua(o,t,n);return r&&s},Va=e=>qa(e)&&"bookmark"===e.getAttribute("data-mce-type"),Ya=(e,t,n)=>Sr(e)&&e.data.length>0&&Wa(e,t,n),Ga=e=>!!hr(e)&&e.childNodes.length>0,Ka=e=>Mr(e)||Ar(e),Xa=(e,t,n,i)=>{var o;const r=i||t;if(hr(t)&&Va(t))return t;const s=t.childNodes;for(let t=s.length-1;t>=0;t--)Xa(e,s[t],n,r);if(hr(t)){const e=t.childNodes;1===e.length&&Va(e[0])&&(null===(o=t.parentNode)||void 0===o||o.insertBefore(e[0],t))}return Ka(t)||ra(t,r)||Ga(t)||Ya(t,r,n)||e.remove(t),t},Qa=gn.makeMap,Za=/[&<>\"\u0060\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Ja=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,el=/[<>&\"\']/g,tl=/&#([a-z0-9]+);?|&([a-z0-9]+);/gi,nl={128:"\u20ac",130:"\u201a",131:"\u0192",132:"\u201e",133:"\u2026",134:"\u2020",135:"\u2021",136:"\u02c6",137:"\u2030",138:"\u0160",139:"\u2039",140:"\u0152",142:"\u017d",145:"\u2018",146:"\u2019",147:"\u201c",148:"\u201d",149:"\u2022",150:"\u2013",151:"\u2014",152:"\u02dc",153:"\u2122",154:"\u0161",155:"\u203a",156:"\u0153",158:"\u017e",159:"\u0178"},il={'"':"&quot;","'":"&#39;","<":"&lt;",">":"&gt;","&":"&amp;","`":"&#96;"},ol={"&lt;":"<","&gt;":">","&amp;":"&","&quot;":'"',"&apos;":"'"},rl=e=>{const t=yi.fromTag("div").dom;return t.innerHTML=e,t.textContent||t.innerText||e},sl=(e,t)=>{const n={};if(e){const i=e.split(",");t=t||10;for(let e=0;e<i.length;e+=2){const o=String.fromCharCode(parseInt(i[e],t));if(!il[o]){const t="&"+i[e+1]+";";n[o]=t,n[t]=o}}return n}},al=sl("50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,t9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8
25k4,nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro",32),ll=(e,t)=>e.replace(t?Za:Ja,e=>il[e]||e),cl=e=>(""+e).replace(el,e=>il[e]||e),dl=(e,t)=>e.replace(t?Za:Ja,e=>e.length>1?"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";":il[e]||"&#"+e.charCodeAt(0)+";"),ul=(e,t,n)=>{const i=n||al;return e.replace(t?Za:Ja,e=>il[e]||i[e]||e)},hl=(e,t)=>{const n=sl(t)||al,i=(e,t)=>e.replace(t?Za:Ja,e=>void 0!==il[e]?il[e]:void 0!==n[e]?n[e]:e.length>1?"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";":"&#"+e.charCodeAt(0)+";"),o=(e,t)=>ul(e,t,n),r=Qa(e.replace(/\+/g,","));return r.named&&r.numeric?i:r.named?t?o:ul:r.numeric?dl:ll},pl=e=>e.replace(tl,(e,t)=>t?(t="x"===t.charAt(0).toLowerCase()?parseInt(t.substr(1),16):parseInt(t,10))>65535?(t-=65536,String.fromCharCode(55296+(t>>10),56320+(1023&t))):nl[t]||String.fromCharCode(t):ol[e]||al[e]||rl(e)),fl={encodeRaw:ll,encodeAllRaw:cl,encodeNumeric:dl,encodeNamed:ul,getEncodeFunc:hl,decode:pl},ml=(e,t)=>(e=gn.trim(e))?e.split(t||" "):[],gl=e=>new RegExp("^"+e.replace(/([?+*])/g,".$1")+"$"),vl=e=>{const t=/^(~)?(.+)$/;return fe(ml(e,","),e=>{const n=t.exec(e);if(n){const e="~"===n[1];return[{inline:e,cloneName:e?"span":"div",name:n[2]}]}return[]})},yl=e=>{let t,n,i;if(t="id accesskey class dir lang style tabindex title role",n="address blockquote div dl fieldset form h1 h2 h3 h4 h5 h6 hr menu ol p pre table ul",i="a abbr b bdo br button cite code del dfn em embed i iframe img input ins kbd label map noscript object q s samp script select small span strong sub sup textarea u var #text #comment","html4"!==e){t+=" contenteditable contextmenu draggable dropzone hidden spellcheck translate",n+=" article aside details dialog figure main header footer hgroup section nav "+"a ins del canvas map",i+=" audio canvas command datalist mark meter output picture progress time wbr video ruby bdi keygen svg"}if("html5-strict"!==e){t+=" xml:lang";i=[i,"acronym applet basefont big font strike tt"].join(" ");n=[n,"center dir isindex noframes"].join(" ")}const o=[n,i].join(" ");return{globalAttributes:t,blockContent:n,phrasingContent:i,flowContent:o}},bl=e=>{const{globalAttributes:t,phrasingContent:n,flowContent:i}=yl(e),o={},r=(e,t,n)=>{o[e]={attributes:ye(t,$({})),attributesOrder:t,children:ye(n,$({}))}},s=(e,n="",i="")=>{const o=ml(i),s=ml(e);let a=s.length;const l=ml([t,n].join(" "));for(;a--;)r(s[a],l.slice(),o)},a=(e,t)=>{const n=ml(e),i=ml(t);let r=n.length;for(;r--;){const e=o[n[r]];for(let t=0,n=i.length;t<n;t++)e.attributes[i[t]]={},e.attributesOrder.push(i[t])}};if("html5-strict"!==e){oe(ml("acronym applet basefont big font strike tt"),e=>{s(e,"",n)});oe(ml("center dir isindex noframes"),e=>{s(e,"",i)})}return s("html","manifest","head body"),s("head","","base command link meta noscript script style title"),s("title hr noscript br"),s("base","href target"),s("link","href rel media hreflang type sizes hreflang"),s("meta","name http-equiv content charset"),s("style","media type scoped"),s("script","src async defer type charset"),s("body","onafterprint onbeforeprint onbeforeunload onblur onerror onfocus onhashchange onload onmessage onoffline ononline onpagehide onpageshow onpopstate onresize onscroll onstorage onunload",i),s("dd div","",i),s("address dt caption","","html4"===e?n:i),s("h1 h2 h3 h4 h5 h6 pre p abbr code var samp kbd sub sup i b u bdo span legend em strong small s cite dfn","",n),s("blockquote","cite",i),s("ol","reversed start type","li"),s("ul","","li"),s("li","value",i),s("dl","","dt dd"),s("a","href target rel media hreflang type","html4"===e?n:i),s("q","cite",n),s("ins del","cite datetime",i),s("img","src sizes srcset alt usemap ismap width height"),s("iframe","src name width height",i),s("embed","src type width height"),s("object","data type typemustmatch name usemap form width height",[i,"param"].join(" ")),s("param","name value"),s("map","name",[i,"area"].join(" ")),s("area","alt coords shape href target rel media hreflang type"),s("table","border","caption colgroup thead tfoot tbody tr"+("html4"===e?" col":"")),s("colgroup","span","col"),s("col","span"),s("tbody thead tfoot","","tr"),s("tr","","td th"),s("td","colspan rowspan headers",i),s("th","colspan rowspan headers scope abbr",i),s("form","accept-charset action autocomplete enctype method n
25ame novalidate target",i),s("fieldset","disabled form name",[i,"legend"].join(" ")),s("label","form for",n),s("input","accept alt autocomplete checked dirname disabled form formaction formenctype formmethod formnovalidate formtarget height list max maxlength min multiple name pattern readonly required size src step type value width"),s("button","disabled form formaction formenctype formmethod formnovalidate formtarget name type value","html4"===e?i:n),s("select","disabled form multiple name required size","option optgroup"),s("optgroup","disabled label","option"),s("option","disabled label selected value"),s("textarea","cols dirname disabled form maxlength name readonly required rows wrap"),s("menu","type label",[i,"li"].join(" ")),s("noscript","",i),"html4"!==e&&(s("wbr"),s("ruby","",[n,"rt rp"].join(" ")),s("figcaption","",i),s("mark rt rp bdi","",n),s("summary","",[n,"h1 h2 h3 h4 h5 h6"].join(" ")),s("canvas","width height",i),s("video","src crossorigin poster preload autoplay mediagroup loop muted controls width height buffered",[i,"track source"].join(" ")),s("audio","src crossorigin preload autoplay mediagroup loop muted controls buffered volume",[i,"track source"].join(" ")),s("picture","","img source"),s("source","src srcset type media sizes"),s("track","kind src srclang label default"),s("datalist","",[n,"option"].join(" ")),s("article section nav aside main header footer","",i),s("hgroup","","h1 h2 h3 h4 h5 h6"),s("figure","",[i,"figcaption"].join(" ")),s("time","datetime",n),s("dialog","open",i),s("command","type label icon disabled checked radiogroup command"),s("output","for form name",n),s("progress","value max",n),s("meter","value min max low high optimum",n),s("details","open",[i,"summary"].join(" ")),s("keygen","autofocus challenge disabled form keytype name"),r("svg","id tabindex lang xml:space class style x y width height viewBox preserveAspectRatio zoomAndPan transform".split(" "),[])),"html5-strict"!==e&&(a("script","language xml:space"),a("style","xml:space"),a("object","declare classid code codebase codetype archive standby align border hspace vspace"),a("embed","align name hspace vspace"),a("param","valuetype type"),a("a","charset name rev shape coords"),a("br","clear"),a("applet","codebase archive code object alt name width height align hspace vspace"),a("img","name longdesc align border hspace vspace"),a("iframe","longdesc frameborder marginwidth marginheight scrolling align"),a("font basefont","size color face"),a("input","usemap align"),a("select"),a("textarea"),a("h1 h2 h3 h4 h5 h6 div p legend caption","align"),a("ul","type compact"),a("li","type"),a("ol dl menu dir","compact"),a("pre","width xml:space"),a("hr","align noshade size width"),a("isindex","prompt"),a("table","summary width frame rules cellspacing cellpadding align bgcolor"),a("col","width align char charoff valign"),a("colgroup","width align char charoff valign"),a("thead","align char charoff valign"),a("tr","align char charoff valign bgcolor"),a("th","axis align char charoff valign nowrap bgcolor width height"),a("form","accept"),a("td","abbr axis scope align char charoff valign nowrap bgcolor width height"),a("tfoot","align char charoff valign"),a("tbody","align char charoff valign"),a("area","nohref"),a("body","background bgcolor text link vlink alink")),"html4"!==e&&(a("input button select textarea","autofocus"),a("input textarea","placeholder"),a("a","download"),a("link script img","crossorigin"),a("img","loading"),a("iframe","sandbox seamless allow allowfullscreen loading")),"html4"!==e&&oe([o.video,o.audio],e=>{delete e.children.audio,delete e.children.video}),oe(ml("a form meter progress dfn"),e=>{o[e]&&delete o[e].children[e]}),delete o.caption.children.table,delete o.script,o},_l=e=>"-"===e?"remove":"add",wl=e=>{const t=/^([+\-]?)([A-Za-z0-9_\-.\u00b7\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u037d\u037f-\u1fff\u200c-\u200d\u203f-\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]+)\[([^\]]+)]$/;return fe(ml(e,","),e=>{const n=t.exec(e);if(n){const e=n[1];return[{operation:e?_l(e):"replace",name:n[2],validChildren:ml(n[3],"|")}]}return[]})},Cl=(e,t)=>{
26const n=/^([!\-])?(\w+[\\:]:\w+|[^=~<]+)?(?:([=~<])(.*))?$/,i=/[*?+]/,{attributes:o,attributesOrder:r}=t;return oe(ml(e,"|"),e=>{const s=n.exec(e);if(s){const e={},n=s[1],a=s[2].replace(/[\\:]:/g,":"),l=s[3],c=s[4];if("!"===n&&(t.attributesRequired=t.attributesRequired||[],t.attributesRequired.push(a),e.required=!0),"-"===n)return delete o[a],void r.splice(gn.inArray(r,a),1);if(l&&("="===l?(t.attributesDefault=t.attributesDefault||[],t.attributesDefault.push({name:a,value:c}),e.defaultValue=c):"~"===l?(t.attributesForced=t.attributesForced||[],t.attributesForced.push({name:a,value:c}),e.forcedValue=c):"<"===l&&(e.validValues=gn.makeMap(c,"?"))),i.test(a)){const n=e;t.attributePatterns=t.attributePatterns||[],n.pattern=gl(a),t.attributePatterns.push(n)}else o[a]||r.push(a),o[a]=e}})},kl=(e,t)=>{Te(e.attributes,(e,n)=>{t.attributes[n]=e}),t.attributesOrder.push(...e.attributesOrder)},xl=(e,t)=>{const n=/^([#+\-])?([^\[!\/]+)(?:\/([^\[!]+))?(?:(!?)\[([^\]]+)])?$/;return fe(ml(t,","),t=>{const i=n.exec(t);if(i){const t=i[1],n=i[2],o=i[3],r=i[4],s=i[5],a={attributes:{},attributesOrder:[]};if(e.each(e=>
26kl(e,a)),"#"===t?a.paddEmpty=!0:"-"===t&&(a.removeEmpty=!0),"!"===r&&(a.removeEmptyAttrs=!0),s&&Cl(s,a),o&&(a.outputName=n),"@"===n){if(!e.isNone())return[];e=K.some(a)}return[o?{name:n,element:a,aliasName:o}:{name:n,element:a}]}return[]})},Sl={},El=gn.makeMap,Dl=gn.each,Tl=gn.extend,Al=gn.explode,Ml=(e,t={})=>{const n=El(e," ",El(e.toUpperCase()," "));return Tl(n,t)},Rl=e=>Ml("td th li dt dd figcaption caption details summary",e.getTextBlockElements()),Nl=(e,t)=>{if(e){const n={};return S(e)&&(e={"*":e}),Dl(e,(e,i)=>{n[i]=n[i.toUpperCase()]="map"===t?El(e,/[, ]/):Al(e,/[, ]/)}),n}},Il=(e={})=>{var t;const n={},i={};let o=[];const r={},s={},a=(t,n,i)=>{const o=e[t];if(o)return El(o,/[, ]/,El(o.toUpperCase(),/[, ]/));{let e=Sl[t];return e||(e=Ml(n,i),Sl[t]=e),e}},l=null!==(t=e.schema)&&void 0!==t?t:"html5",c=bl(l);!1===e.verify_html&&(e.valid_elements="*[*]");const d=Nl(e.valid_styles),u=Nl(e.invalid_styles,"map"),h=Nl(e.valid_classes,"map"),p=a("whitespace_elements","pre script noscript style textarea video audio iframe object code"),f=a("self_closing_elements","colgroup dd dt li option p td tfoot th thead tr"),m=a("void_elements","area base basefont br col frame hr img input isindex link meta param embed source wbr track"),g=a("boolean_attributes","checked compact declare defer disabled ismap multiple nohref noresize noshade nowrap readonly selected autoplay loop controls allowfullscreen"),v="td th iframe video audio object script code",y=a("non_empty_elements",v+" pre svg",m),b=a("move_caret_before_on_enter_elements",v+" table",m),_="h1 h2 h3 h4 h5 h6",w=a("text_block_elements",_+" p div address pre form blockquote center dir fieldset header footer article section hgroup aside main nav figure"),C=a("block_elements","hr table tbody thead tfoot th tr td li ol ul caption dl dt dd noscript menu isindex option datalist select optgroup figcaption details summary html body multicol listing",w),k=a("text_inline_elements","span strong b em i font s strike u var cite dfn code mark q sup sub samp"),x=a("transparent_elements","a ins del canvas map"),S=a("wrap_block_elements","pre "+_);Dl("script noscript iframe noframes noembed title style textarea xmp plaintext".split(" "),e=>{s[e]=new RegExp("</"+e+"[^>]*>","gi")});const E=e=>{const t=K.from(n["@"]),i=/[*?+]/;oe(xl(t,null!=e?e:""),({name:e,element:t,aliasName:r})=>{if(r&&(n[r]=t),i.test(e)){const n=t;n.pattern=gl(e),o.push(n)}else n[e]=t})},D=e=>{o=[],oe(Ee(n),e=>{delete n[e]}),E(e)},T=e=>{delete Sl.text_block_elements,delete Sl.block_elements,oe(vl(null!=e?e:""),({inline:e,name:t,cloneName:o})=>{if(i[t]=i[o],r[t]=o,y[t.toUpperCase()]={},y[t]={},e||(C[t.toUpperCase()]={},C[t]={}),!n[t]){let e=n[o];e=Tl({},e),delete e.removeEmptyAttrs,delete e.removeEmpty,n[t]=e}Te(i,(e,n)=>{e[o]&&(i[n]=e=Tl({},i[n]),e[t]=e[o])})})},A=e=>{oe(wl(null!=e?e:""),({operation:e,name:t,validChildren:n})=>{const o="replace"===e?{"#comment":{}}:i[t];oe(n,t=>{"remove"===e?delete o[t]:o[t]={}}),i[t]=o})},M=e=>{const t=n[e];if(t)return t;let i=o.length;for(;i--;){const t=o[i];if(t.pattern.test(e))return t}};e.valid_elements?(D(e.valid_elements),Dl(c,(e,t)=>{i[t]=e.children})):(Dl(c,(e,t)=>{n[t]={attributes:e.attributes,attributesOrder:e.attributesOrder},i[t]=e.children}),Dl(ml("strong/b em/i"),e=>{const t=ml(e,"/");n[t[1]].outputName=t[0]}),Dl(k,(t,i)=>{n[i]&&(e.padd_empty_block_inline_children&&(n[i].paddInEmptyBlock=!0),n[i].removeEmpty=!0)}),Dl(ml("ol ul blockquote a table tbody"),e=>{n[e]&&(n[e].removeEmpty=!0)}),Dl(ml("p h1 h2 h3 h4 h5 h6 th td pre div address caption li summary"),e=>{n[e]&&(n[e].paddEmpty=!0)}),Dl(ml("span"),e=>{n[e].removeEmptyAttrs=!0})),delete n.svg,T(e.custom_elements),A(e.valid_children),E(e.extended_valid_elements),A("+ol[ul|ol],+ul[ul|ol]"),Dl({dd:"dl",dt:"dl",li:"ul ol",td:"tr",th:"tr",tr:"tbody thead tfoot",tbody:"table",thead:"table",tfoot:"table",legend:"fieldset",area:"map",param:"video audio object"},(e,t)=>{n[t]&&(n[t].parentsRequired=ml(e))}),e.invalid_elements&&Dl(Al(e.invalid_elements),e=>{n[e]&&delete n[e]}),M("span")||E("span[!data-mce-type|*]");const R=$(d),N=$(u),I=$(h),P=$(g),O=$(C),L=$(w),B=$(k),F=$(Object.seal(m)),H=$(f),z=$(y),j=$(b),q=$(p),U=$(x),W=$(S),V=$(Object.seal(s)),Y=(e,t)=>
vendor: 2,211 bytes, line 26
26{const n=i[e.toLowerCase()];return!(!n||!n[t.toLowerCase()])},G=(e,t)=>{const n=M(e);if(n){if(!t)return!0;{if(n.attributes[t])return!0;const e=n.attributePatterns;if(e){let n=e.length;for(;n--;)if(e[n].pattern.test(t))return!0}}}return!1},X=e=>Fe(O(),e),Q=e=>!ft(e,"#")&&G(e)&&!X(e),Z=e=>Fe(W(),e)||Q(e),J=$(r);return{type:l,children:i,elements:n,getValidStyles:R,getValidClasses:I,getBlockElements:O,getInvalidStyles:N,getVoidElements:F,getTextBlockElements:L,getTextInlineElements:B,getBoolAttrs:P,getElementRule:M,getSelfClosingElements:H,getNonEmptyElements:z,getMoveCaretBeforeOnEnterElements:j,getWhitespaceElements:q,getTransparentElements:U,getSpecialElements:V,isValidChild:Y,isValid:G,isBlock:X,isInline:Q,isWrapper:Z,getCustomElements:J,addValidElements:E,setValidElements:D,addCustomElements:T,addValidChildren:A}},Pl=e=>({value:Ol(e)}),Ol=e=>ht(e,"#").toUpperCase(),Ll=e=>{const t=e.toString(16);return(1===t.length?"0"+t:t).toUpperCase()},Bl=e=>{const t=Ll(e.red)+Ll(e.green)+Ll(e.blue);return Pl(t)},Fl=/^\s*rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)\s*$/i,Hl=/^\s*rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?(?:\.\d+)?)\s*\)\s*$/i,$l=(e,t,n,i)=>({red:e,green:t,blue:n,alpha:i}),zl=(e,t,n,i)=>{const o=parseInt(e,10),r=parseInt(t,10),s=parseInt(n,10),a=parseFloat(i);return $l(o,r,s,a)},jl=e=>{if("transparent"===e)return K.some($l(0,0,0,0));const t=Fl.exec(e);if(null!==t)return K.some(zl(t[1],t[2],t[3],"1"));const n=Hl.exec(e);return null!==n?K.some(zl(n[1],n[2],n[3],n[4])):K.none()},ql=e=>`rgba(${e.red},${e.green},${e.blue},${e.alpha})`,Ul=e=>jl(e).map(Bl).map(e=>"#"+e.value).getOr(e),Wl=(e={},t)=>{const n=/(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi,i=/\s*([^:]+):\s*([^;]+);?/g,o=/\s+$/,r={};let s,a;const l=zr;t&&(s=t.getValidStyles(),a=t.getInvalidStyles());const c=("\\\" \\' \\; \\: ; : "+l).split(" ");for(let e=0;e<c.length;e++)r[c[e]]=l+e,r[l+e]=c[e];const d={parse:t=>{const s={};let a=!1;const c=e.url_converter,u=e.url_converter_scope||d,h=(e,t,n)=>{const i=s[e+"-top"+t];if(!i)return;const o=s[e+"-right"+t];if(!o)return;const r=s[e+"-bottom"+t];if(!r)return;const a=s[e+"-left"+t];
vendor: 6,659 bytes, line 26
26if(!a)return;const l=[i,o,r,a];let c=l.length-1;for(;c--&&l[c]===l[c+1];);c>-1&&n||(s[e+t]=-1===c?l[0]:l.join(" "),delete s[e+"-top"+t],delete s[e+"-right"+t],delete s[e+"-bottom"+t],delete s[e+"-left"+t])},p=e=>{const t=s[e];if(!t)return;const n=t.indexOf(",")>-1?[t]:t.split(" ");let i=n.length;for(;i--;)if(n[i]!==n[0])return!1;return s[e]=n[0],!0},f=(e,t,n,i)=>{p(t)&&p(n)&&p(i)&&(s[e]=s[t]+" "+s[n]+" "+s[i],delete s[t],delete s[n],delete s[i])},m=e=>(a=!0,r[e]),g=(e,t)=>(a&&(e=e.replace(/\uFEFF[0-9]/g,e=>r[e])),t||(e=e.replace(/\\([\'\";:])/g,"$1")),e),v=e=>String.fromCharCode(parseInt(e.slice(1),16)),y=e=>e.replace(/\\[0-9a-f]+/gi,v),b=(t,n,i,o,r,s)=>{if(r=r||s)return"'"+(r=g(r)).replace(/\'/g,"\\'")+"'";if(n=g(n||i||o||""),!e.allow_script_urls){const t=n.replace(/[\s\r\n]+/g,"");if(/(java|vb)script:/i.test(t))return"";if(!e.allow_svg_data_urls&&/^data:image\/svg/i.test(t))return""}return c&&(n=c.call(u,n,"style")),"url('"+n.replace(/\'/g,"\\'")+"')"};if(t){let r;for(t=(t=t.replace(/[\u0000-\u001F]/g,"")).replace(/\\[\"\';:\uFEFF]/g,m).replace(/\"[^\"]+\"|\'[^\']+\'/g,e=>e.replace(/[;:]/g,m));r=i.exec(t);){i.lastIndex=r.index+r[0].length;let t=r[1].replace(o,"").toLowerCase(),c=r[2].replace(o,"");if(t&&c){if(t=y(t),c=y(c),-1!==t.indexOf(l)||-1!==t.indexOf('"'))continue;if(!e.allow_script_urls&&("behavior"===t||/expression\s*\(|\/\*|\*\//.test(c)))continue;"font-weight"===t&&"700"===c?c="bold":"color"!==t&&"background-color"!==t||(c=c.toLowerCase()),S(e.force_hex_color)&&"off"!==e.force_hex_color&&jl(c).each(t=>{"always"!==e.force_hex_color&&1!==t.alpha||(c=Ul(ql(t)))}),c=c.replace(n,b),s[t]=a?g(c,!0):c}}h("border","",!0),h("border","-width"),h("border","-color"),h("border","-style"),h("padding",""),h("margin",""),f("border","border-width","border-style","border-color"),"medium none"===s.border&&delete s.border,"none"===s["border-image"]&&delete s["border-image"]}return s},serialize:(e,t)=>{let n="";const i=(t,i)=>{const o=i[t];if(o)for(let t=0,i=o.length;t<i;t++){const i=o[t],r=e[i];r&&(n+=(n.length>0?" ":"")+i+": "+r+";")}},o=(e,t)=>{if(!a||!t)return!0;let n=a["*"];return(!n||!n[e])&&(n=a[t],!(n&&n[e]))};return t&&s?(i("*",s),i(t,s)):Te(e,(e,i)=>{e&&o(i,t)&&(n+=(n.length>0?" ":"")+i+": "+e+";")}),n}};return d},Vl={keyLocation:!0,layerX:!0,layerY:!0,returnValue:!0,webkitMovementX:!0,webkitMovementY:!0,keyIdentifier:!0,mozPressure:!0},Yl=e=>e instanceof Event||P(e.initEvent),Gl=e=>e.isDefaultPrevented===G||e.isDefaultPrevented===Y,Kl=e=>N(e.preventDefault)||Yl(e),Xl=(e,t)=>{const n=null!=t?t:{};for(const t in e)Fe(Vl,t)||(n[t]=e[t]);return I(e.composedPath)&&(n.composedPath=()=>e.composedPath()),I(e.getModifierState)&&(n.getModifierState=t=>e.getModifierState(t)),I(e.getTargetRanges)&&(n.getTargetRanges=()=>e.getTargetRanges()),n},Ql=(e,t,n,i)=>{var o;const r=Xl(t,i);return r.type=e,N(r.target)&&(r.target=null!==(o=r.srcElement)&&void 0!==o?o:n),Kl(t)&&(r.preventDefault=()=>{r.defaultPrevented=!0,r.isDefaultPrevented=G,P(t.preventDefault)&&t.preventDefault()},r.stopPropagation=()=>{r.cancelBubble=!0,r.isPropagationStopped=G,P(t.stopPropagation)&&t.stopPropagation()},r.stopImmediatePropagation=()=>{r.isImmediatePropagationStopped=G,r.stopPropagation()},Gl(r)||(r.isDefaultPrevented=!0===r.defaultPrevented?G:Y,r.isPropagationStopped=!0===r.cancelBubble?G:Y,r.isImmediatePropagationStopped=Y)),r},Zl="mce-data-",Jl=/^(?:mouse|contextmenu)|click/,ec=(e,t,n,i)=>{e.addEventListener(t,n,i||!1)},tc=(e,t,n,i)=>{e.removeEventListener(t,n,i||!1)},nc=e=>I(e)&&Jl.test(e.type),ic=(e,t)=>{const n=Ql(e.type,e,document,t);if(nc(e)&&R(e.pageX)&&!R(e.clientX)){const t=n.target.ownerDocument||document,i=t.documentElement,o=t.body,r=n;r.pageX=e.clientX+(i&&i.scrollLeft||o&&o.scrollLeft||0)-(i&&i.clientLeft||o&&o.clientLeft||0),r.pageY=e.clientY+(i&&i.scrollTop||o&&o.scrollTop||0)-(i&&i.clientTop||o&&o.clientTop||0)}return n},oc=(e,t,n)=>{const i=e.document,o={type:"ready"};if(n.domLoaded)return void t(o);const r=()=>{tc(e,"DOMContentLoaded",r),tc(e,"load",r),n.domLoaded||(n.domLoaded=!0,t(o)),e=null};(()=>"complete"===i.readyState||"interactive"===i.readyState&&i.body)()?r():ec(e,"DOMContentLoaded",r),n.domLoaded||ec(e,"load",r)};class rc{constructor(){this.domLoaded=!1,this.events={},this.count=1,this.expando=Zl+(+new Date).toString(32),this.hasFocusIn="onfocusin"in document.documentElement,this.count=1}bind(e,t,n,i){const o=this;let r;const s=window,a=e=>{o.executeHandlers(ic(e||s.event),l)};if(!e||Sr(e)||Tr(e))return n;let l;e[o.expando]?l=e[o.expando]:(l=o.count++,e[o.expando]=l,o.events[l]={}),i=i||e;const c=t.split(" ");let d=c.length;for(;d--;){let t=c[d],u=a,h=!1,p=!1;"DOMContentLoaded"===t&&(t="ready"),o.domLoaded&&"ready"===t&&"complete"===e.readyState?n.call(i,ic({type:t})):(o.hasFocusIn||"focusin"!==t&&"focusout"!==t||(h=!0,p="focusin"===t?"focus":"blur",u=e=>{const t=ic(e||s.event);t.type="focus"===t.type?"focusin":"focusout",o.executeHandlers(t,l)}),r=o.events[l][t],r?"ready"===t&&o.domLoaded?n(ic({type:t})):r.push({func:n,scope:i}):(o.events[l][t]=r=[{func:n,scope:i}],r.fakeName=p,r.capture=h,r.nativeHandler=u,"ready"===t?oc(e,u,o):ec(e,p||t,u,h)))}return e=r=null,n}unbind(e,t,n){if(!e||Sr(e)||Tr(e))return this;const i=e[this.expando];if(i){let o=this.events[i];if(t){const i=t.split(" ");let r=i.length;for(;r--;){const t=i[r],s=o[t];if(s){if(n){let e=s.length;for(;e--;)if(s[e].func===n){const n=s.nativeHandler,i=s.fakeName,r=s.capture,a=s.slice(0,e).concat(s.slice(e+1));a.nativeHandler=n,a.fakeName=i,a.capture=r,o[t]=a}}n&&0!==s.length||(delete o[t],tc(e,s.fakeName||t,s.nativeHandler,s.capture))}}}else Te(o,(t,n)=>{tc(e,t.fakeName||n,t.nativeHandler,t.capture)}),o={};for(const e in o)if(Fe(o,e))return this;delete this.events[i];try{delete e[this.expando]}catch(t){e[this.expando]=null}}return this}fire(e,t,n){return this.dispatch(e,t,n)}dispatch(e,t,n){if(!e||Sr(e)||Tr(e))return this;const i=ic({type:t,target:e},n);do{const t=e[this.expando];t&&this.executeHandlers(i,t),e=e.parentNode||e.ownerDocument||e.defaultView||e.parentWindow}while(e&&!i.isPropagationStopped());return this}clean(e){if(!e||Sr(e)||Tr(e))return this;if(e[this.expando]&&this.unbind(e),e.getElementsByTagName||(e=e.document),e&&e.getElementsByTagName){this.unbind(e);const t=e.getElementsByTagName("*");let n=t.length;for(;n--;)(e=t[n])[this.expando]&&this.unbind(e)}return this}destroy(){this.events={}}cancel(e){return e&&(e.preventDefault(),e.stopImmediatePropagation()),!1}executeHandlers(e,t){const n=this.events[t],i=n&&n[e.type];if(i)for(let t=0,n=i.length;t<n;t++){const n=i[t];if(n&&!1===n.func.call(n.scope,e)&&e.preventDefault(),e.isImmediatePropagationStopped())return}}}
vendor: 4,347 bytes, line 26
26rc.Event=new rc;const sc=gn.each,ac=gn.grep,lc="data-mce-style",cc=gn.makeMap("fill-opacity font-weight line-height opacity orphans widows z-index zoom"," "),dc=(e,t,n)=>{N(n)||""===n?Zn(e,t):Yn(e,t,n)},uc=e=>e.replace(/[A-Z]/g,e=>"-"+e.toLowerCase()),hc=(e,t)=>{let n=0;if(e)for(let i=e.nodeType,o=e.previousSibling;o;o=o.previousSibling){const e=o.nodeType;(!t||!Sr(o)||e!==i&&o.data.length)&&(n++,i=e)}return n},pc=(e,t)=>{const n=Kn(t,"style"),i=e.serialize(e.parse(n),Ln(t));dc(t,lc,i)},fc=(e,t)=>O(e)?Fe(cc,t)?e+"":e+"px":e,mc=(e,t,n)=>{const i=uc(t);N(n)||""===n?xo(e,i):yo(e,i,fc(n,i))},gc=(e,t,n)=>{const i=t.keep_values,o={set:(e,i,o)=>{const r=yi.fromDom(e);P(t.url_converter)&&I(i)&&(i=t.url_converter.call(t.url_converter_scope||n(),String(i),o,e));dc(r,"data-mce-"+o,i),dc(r,o,i)},get:(e,t)=>{const n=yi.fromDom(e);return Kn(n,"data-mce-"+t)||Kn(n,t)}},r={style:{set:(t,n)=>{const o=yi.fromDom(t);i&&dc(o,lc,n),Zn(o,"style"),S(n)&&bo(o,e.parse(n))},get:t=>{const n=yi.fromDom(t),i=Kn(n,lc)||Kn(n,"style");return e.serialize(e.parse(i),Ln(n))}}};return i&&(r.href=r.src=o),r},vc=(e,t={})=>{const n={},i=window,o={};let r=0;const s=!0,a=!0,l=ja.forElement(yi.fromDom(e),{contentCssCors:t.contentCssCors,referrerPolicy:t.referrerPolicy}),c=[],d=t.schema?t.schema:Il({}),u=Wl({url_converter:t.url_converter,url_converter_scope:t.url_converter_scope,force_hex_color:t.force_hex_color},t.schema),h=t.ownEvents?new rc:rc.Event,p=d.getBlockElements(),f=e=>S(e)?Fe(p,e):hr(e)&&(Fe(p,e.nodeName)||Na(d,e)),m=t=>t&&e&&S(t)?e.getElementById(t):t,g=e=>{const t=m(e);return I(t)?yi.fromDom(t):null},v=(e,t,n="")=>{let i;const o=g(e);if(I(o)&&zn(o)){const e=De[t];i=e&&e.get?e.get(o.dom,t):Kn(o,t)}return I(i)?i:n},y=e=>{const t=m(e);return N(t)?[]:t.attributes},b=(e,n,i)=>{U(e,e=>{if(hr(e)){const o=yi.fromDom(e),r=""===i?null:i,s=Kn(o,n),a=De[n];a&&a.set?a.set(o.dom,r,n):dc(o,n,r),s!==r&&t.onSetAttrib&&t.onSetAttrib({attrElm:o.dom,attrName:n,attrValue:r})}})},_=(e,t)=>e.cloneNode(t),w=()=>t.root_element||e.body,C=e=>{const t=or(e);return{x:t.x,y:t.y,w:t.width,h:t.height}},k=(t,n)=>Ha(e.body,m(t),n),x=(e,n,i)=>{U(e,e=>{const o=yi.fromDom(e);mc(o,n,i),t.update_styles&&pc(u,o)})},E=(e,n)=>{U(e,e=>{const i=yi.fromDom(e);Te(n,(e,t)=>{mc(i,t,e)}),t.update_styles&&pc(u,i)})},D=(e,t,n)=>{const i=m(e);if(!N(i)&&(pr(i)||fr(i)))return n?_o(yi.fromDom(i),uc(t)):("float"===(t=t.replace(/-(\D)/g,(e,t)=>t.toUpperCase()))&&(t="cssFloat"),i.style?i.style[t]:void 0)},A=e=>{const t=m(e);if(!t)return{w:0,h:0};let n=D(t,"width"),i=D(t,"height");return n&&-1!==n.indexOf("px")||(n="0"),i&&-1!==i.indexOf("px")||(i="0"),{w:parseInt(n,10)||t.offsetWidth||t.clientWidth,h:parseInt(i,10)||t.offsetHeight||t.clientHeight}},M=e=>{const t=m(e),n=k(t),i=A(t);return{x:n.x,y:n.y,w:i.w,h:i.h}},R=(e,t)=>{if(!e)return!1;const n=T(e)?e:[e];return ne(n,e=>_i(yi.fromDom(e),t))},O=(e,t,n,i)=>{const o=[];let r=m(e);i=void 0===i;const s=n||("BODY"!==w().nodeName?w().parentNode:null);if(S(t))if("*"===t)t=hr;else{const e=t;t=t=>R(t,e)}for(;r&&!(r===s||N(r.nodeType)||Ar(r)||Mr(r));){if(!t||t(r)){if(!i)return[r];o.push(r)}r=r.parentNode}return i?o:null},L=(e,t,n)=>{const i=O(e,t,n,!1);return i&&i.length>0?i[0]:null},F=(e,t,n)=>{let i=t;if(e){S(t)&&(i=e=>R(e,t));for(let t=e[n];t;t=t[n])if(P(i)&&i(t))return t}return null},H=(e,t)=>F(e,t,"nextSibling"),z=(e,t)=>F(e,t,"previousSibling"),j=e=>P(e.querySelectorAll),q=(n,i)=>{var o,r;const s=null!==(r=null!==(o=m(i))&&void 0!==o?o:t.root_element)&&void 0!==r?r:e;return j(s)?ke(s.querySelectorAll(n)):[]},U=function(e,t,n){const i=null!=n?n:this;if(T(e)){const n=[];return sc(e,(e,o)=>{const r=m(e);r&&n.push(t.call(i,r,o))}),n}{const n=m(e);return!!n&&t.call(i,n)}},W=(e,t)=>{U(e,e=>{Te(t,(t,n)=>{b(e,n,t)})})},V=(e,t)=>{U(e,e=>{const n=yi.fromDom(e);Ho(n,t)})},Y=(t,n,i,o,r)=>U(t,t=>{const s=S(n)?e.createElement(n):n;return I(i)&&W(s,i),o&&(!S(o)&&o.nodeType?s.appendChild(o):S(o)&&V(s,o)),r?s:t.appendChild(s)}),G=(t,n,i)=>Y(e.createElement(t),t,n,i,!0),K=fl.decode,X=fl.encodeAllRaw,Q=(e,t,n="")=>{let i="<"+e;for(const e in t)He(t,e)&&(i+=" "+e+'="'+X(t[e])+'"');return wt(n)&&Fe(d.getVoidElements(),e)?i+" />":i+">"+n+"</"+e+">"},Z=t=>{const n=e.createElement("div"),i=e.createDocumentFragment();let o;for(i.appendChild(n),t&&(n.innerHTML=t);o=n.firstChild;)i.appendChild(o);return i.removeChild(n),i},J=(e,t)=>
26U(e,e=>{const n=yi.fromDom(e);return t&&oe(Fi(n),e=>{jn(e)&&0===e.dom.length?Po(e):Eo(n,e)}),Po(n),n.dom}),ee=e=>u.parse(e),te=(e,t)=>u.serialize(e,t),ie=t=>{if(Ee!==vc.DOM&&e===document){if(n[t])return;n[t]=!0}let i=e.getElementById("mceDefaultStyles");if(!i){i=e.createElement("style"),i.id="mceDefaultStyles",i.type="text/css";const t=e.head;t.firstChild?t.insertBefore(i,t.firstChild):t.appendChild(i)}i.styleSheet?i.styleSheet.cssText+=t:i.appendChild(e.createTextNode(t))},re=e=>{e||(e=""),oe(e.split(","),e=>{o[e]=!0,l.load(e).catch(B)})},se=(e,t,n)=>{U(e,e=>{if(hr(e)){const i=yi.fromDom(e),o=t.split(" ");oe(o,e=>{if(I(n)){(n?ci:ui)(i,e)}else hi(i,e)})}})},ae=(e,t)=>{U(e,e=>{hr(e)&&(e.outerHTML=t)})},le=(e,t)=>{const n=m(t);return U(e,e=>{const t=null==n?void 0:n.parentNode,i=null==n?void 0:n.nextSibling;return t&&(i?t.insertBefore(e,i):t.appendChild(e)),e})},ce=(e,t,n)=>U(t,i=>{var o;const r=T(t)?e.cloneNode(!0):e;return n&&sc(ac(i.childNodes),e=>{r.appendChild(e)}),null===(o=i.parentNode)||void 0===o||o.replaceChild(r,i),i}),de=(e,t)=>{if(e.nodeName!==t.toUpperCase()){const n=G(t);return sc(y(e),t=>{b(n,t.nodeName,v(e,t.nodeName))}),ce(n,e,!0),n}return e},ue=e=>{if(hr(e)){const t="a"===e.nodeName.toLowerCase()&&!v(e,"href")&&v(e,"id");if(v(e,"name")||v(e,"data-mce-bookmark")||t)return!0}return!1},he=(e,t,n)=>{let i=0;if(ue(e))return!1;const o=e.firstChild;if(o){const r=new cr(o,e),s=d?d.getWhitespaceElements():{},a=t||(d?d.getNonEmptyElements():null);let l=o;do{if(hr(l)){const e=l.getAttribute("data-mce-bogus");if(e){l=r.next("all"===e);continue}const t=l.nodeName.toLowerCase();if(a&&a[t]){if("br"===t){i++,l=r.next();continue}return!1}if(ue(l))return!1}if(Tr(l))return!1;if(Sr(l)&&!Xs(l.data)&&(!(null==n?void 0:n.includeZwsp)||!Qs(l.data)))return!1;if(Sr(l)&&l.parentNode&&s[l.parentNode.nodeName]&&Xs(l.data))return!1;l=r.next()}while(l)}return i<=1},pe=()=>e.createRange(),fe=(e,t,n)=>{let i,o,r=pe();if(e&&t&&e.parentNode&&t.parentNode){const s=e.parentNode;return r.setStart(s,hc(e)),r.setEnd(t.parentNode,hc(t)),i=r.extractContents(),r=pe(),r.setStart(t.parentNode,hc(t)+1),r.setEnd(s,hc(e)+1),o=r.extractContents(),s.insertBefore(Xa(Ee,i,d),e),n?s.insertBefore(n,e):s.insertBefore(t,e),s.insertBefore(Xa(Ee,o,d),e),J(e),n||t}},ge=(n,o,r,s)=>{if(T(n)){let e=n.length;const t=[];for(;e--;)t[e]=ge(n[e],o,r,s);return t}return!t.collect||n!==e&&n!==i||c.push([n,o,r,s]),h.bind(n,o,r,s||Ee)},ve=(t,n,o)=>{if(T(t)){let e=t.length;const i=[];for(;e--;)i[e]=ve(t[e],n,o);return i}if(c.length>0&&(t===e||t===i)){let e=c.length;for(;e--;){const[i,r,s]=c[e];t!==i||n&&n!==r||o&&o!==s||h.unbind(i,r,s)}}return h.unbind(t,n,o)},ye=(e,t,n)=>h.dispatch(e,t,n),be=(e,t,n)=>h.dispatch(e,t,n),_e=e=>{if(e&&pr(e)){const t=e.getAttribute("data-mce-contenteditable");return t&&"inherit"!==t?t:"inherit"!==e.contentEditable?e.contentEditable:null}return null},we=e=>{const t=w();let n=null;for(let i=e;i&&i!==t&&(n=_e(i),null===n);i=i.parentNode);return n},Ce=()=>{if(c.length>0){let e=c.length;for(;e--;){const[t,n,i]=c[e];h.unbind(t,n,i)}}Te(o,(e,t)=>{l.unload(t),delete o[t]})},xe=(e,t)=>e===t||t.contains(e),Se=e=>"startContainer: "+e.startContainer.nodeName+", startOffset: "+e.startOffset+", endContainer: "+e.endContainer.nodeName+", endOffset: "+e.endOffset,Ee={doc:e,settings:t,win:i,files:o,stdMode:s,boxModel:a,styleSheetLoader:l,boundEvents:c,styles:u,schema:d,events:h,isBlock:f,root:null,clone:_,getRoot:w,getViewPort:C,getRect:M,getSize:A,getParent:L,getParents:O,get:m,getNext:H,getPrev:z,select:q,is:R,add:Y,create:G,createHTML:Q,createFragment:Z,remove:J,setStyle:x,getStyle:D,setStyles:E,removeAllAttribs:e=>U(e,e=>{const t=e.attributes;for(let n=t.length-1;n>=0;n--)e.removeAttributeNode(t.item(n))}),setAttrib:b,setAttribs:W,getAttrib:v,getPos:k,parseStyle:ee,serializeStyle:te,addStyle:ie,loadCSS:re,addClass:(e,t)=>{se(e,t,!0)},removeClass:(e,t)=>{se(e,t,!1)},hasClass:(e,t)=>{const n=g(e),i=t.split(" ");return I(n)&&me(i,e=>pi(n,e))},toggleClass:se,show:e=>{U(e,e=>
26xo(yi.fromDom(e),"display"))},hide:e=>{U(e,e=>yo(yi.fromDom(e),"display","none"))},isHidden:e=>{const t=g(e);return I(t)&&vn(Co(t,"display"),"none")},uniqueId:e=>(e||"mce_")+r++,setHTML:V,getOuterHTML:e=>{const t=g(e);return I(t)?hr(t.dom)?t.dom.outerHTML:$o(t):""},setOuterHTML:ae,decode:K,encode:X,insertAfter:le,replace:ce,rename:de,findCommonAncestor:(e,t)=>{let n=e;for(;n;){let e=t;for(;e&&n!==e;)e=e.parentNode;if(n===e)break;n=n.parentNode}return!n&&e.ownerDocument?e.ownerDocument.documentElement:n},run:U,getAttribs:y,isEmpty:he,createRng:pe,nodeIndex:hc,split:fe,bind:ge,unbind:ve,fire:be,dispatch:ye,getContentEditable:_e,getContentEditableParent:we,isEditable:e=>{if(I(e)){const t=hr(e)?e:e.parentElement;return I(t)&&pr(t)&&po(yi.fromDom(t))}return!1},destroy:Ce,isChildOf:xe,dumpRng:Se},De=gc(u,t,$(Ee));return Ee};vc.DOM=vc(document),vc.nodeIndex=hc;const yc=vc.DOM,bc=0,_c=1,wc=2,Cc=3;class kc{constructor(e={}){this.states={},this.queue=[],this.scriptLoadedCallbacks={},this.queueLoadedCallbacks=[],this.loading=!1,this.settings=e}_setReferrerPolicy(e){this.settings.referrerPolicy=e}loadScript(e){return new Promise((t,n)=>{const i=yc;let o;const r=()=>{i.remove(l),o&&(o.onerror=o.onload=o=null)},s=()=>{r(),t()},a=()=>{r(),n("Failed to load script: "+e)},l=i.uniqueId();o=document.createElement("script"),o.id=l,o.type="text/javascript",o.src=gn._addCacheSuffix(e),this.settings.referrerPolicy&&i.setAttrib(o,"referrerpolicy",this.settings.referrerPolicy),o.onload=s,o.onerror=a,(document.getElementsByTagName("head")[0]||document.body).appendChild(o)})}isDone(e){return this.states[e]===wc}markDone(e){this.states[e]=wc}add(e){const t=this;t.queue.push(e);return void 0===t.states[e]&&(t.states[e]=bc),new Promise((n,i)=>{t.scriptLoadedCallbacks[e]||(t.scriptLoadedCallbacks[e]=[]),t.scriptLoadedCallbacks[e].push({resolve:n,reject:i})})}load(e){return this.add(e)}remove(e){delete this.states[e],delete this.scriptLoadedCallbacks[e]}loadQueue(){const e=this.queue;return this.queue=[],this.loadScripts(e)}loadScripts(e){const t=this,n=(e,n)=>{Be(t.scriptLoadedCallbacks,n).each(t=>{oe(t,t=>t[e](n))}),delete t.scriptLoadedCallbacks[n]},i=e=>{const t=ae(e,e=>"rejected"===e.status);return t.length>0?Promise.reject(fe(t,({reason:e})=>T(e)?e:[e])):Promise.resolve()},o=e=>Promise.allSettled(ie(e,e=>t.states[e]===wc?(n("resolve",e),Promise.resolve()):t.states[e]===Cc?(n("reject",e),Promise.reject(e)):(t.states[e]=_c,t.loadScript(e).then(()=>{t.states[e]=wc,n("resolve",e);const r=t.queue;return r.length>0?(t.queue=[],o(r).then(i)):Promise.resolve()},()=>(t.states[e]=Cc,n("reject",e),Promise.reject(e)))))),r=e=>(t.loading=!0,o(e).then(e=>{t.loading=!1;const n=t.queueLoadedCallbacks.shift();return K.from(n).each(V),i(e)})),s=ze(e);return t.loading?new Promise((e,n)=>{t.queueLoadedCallbacks.push(()=>{r(s).then(e,n)})}):r(s)}}kc.ScriptLoader=new kc;const xc=e=>{let t=e;return{get:()=>t,set:e=>{t=e}}},Sc=(e,t)=>{const n=e.indexOf(t);return-1!==n&&e.indexOf(t,n+1)>n},Ec=e=>E(e)&&Fe(e,"raw"),Dc=e=>T(e)&&e.length>1,Tc={},Ac=xc("en"),Mc=()=>Be(Tc,Ac.get()),Rc=()=>Ae(Tc,e=>({...e})),Nc=(e,t)=>{let n=Tc[e];n||(Tc[e]=n={});const i=ie(Ee(t),e=>e.toLowerCase());Te(t,(e,o)=>{const r=o.toLowerCase();r!==o&&Sc(i,r)?(Fe(t,r)||(n[r]=e),n[o]=e):n[r]=e})},Ic=e=>{const t=Mc().getOr({}),n=e=>P(e)?Object.prototype.toString.call(e):i(e)?"":""+e,i=e=>""===e||null==e,o=e=>{const i=n(e);return Fe(t,i)?n(t[i]):Be(t,i.toLowerCase()).map(n).getOr(i)},r=e=>e.replace(/{context:\w+}$/,"");if(i(e))return"";if(Ec(e))return n(e.raw);if(Dc(e)){const t=e.slice(1);return r(o(e[0]).replace(/\{([0-9]+)\}
26/g,(e,i)=>Fe(t,i)?n(t[i]):e))}return r(o(e))},Pc={getData:Rc,setCode:e=>{e&&Ac.set(e)},getCode:()=>Ac.get(),add:Nc,translate:Ic,isRtl:()=>Mc().bind(e=>Be(e,"_dir")).exists(e=>"rtl"===e),hasCode:e=>Fe(Tc,e)},Oc=()=>{const e=[],t={},n={},i=[],o=(e,t)=>{const n=ae(i,n=>n.name===e&&n.state===t);oe(n,e=>e.resolve())},r=e=>Fe(t,e),s=e=>Fe(n,e),a=e=>{if(n[e])return n[e].instance},l=(e,n)=>{const i=Pc.getCode();!i||n&&-1===(","+(n||"")+",").indexOf(","+i+",")||kc.ScriptLoader.add(t[e]+"/langs/"+i+".js")},c=(e,t)=>{!1!==Oc.languageLoad&&(r(e)?l(e,t):p(e,"loaded").then(()=>l(e,t)))},d=(t,i)=>(e.push(i),n[t]={instance:i},o(t,"added"),i),u=e=>{delete t[e],delete n[e]},h=(e,i)=>{if(t[e])return Promise.resolve();let r=S(i)?i:i.prefix+i.resource+i.suffix;0!==r.indexOf("/")&&-1===r.indexOf("://")&&(r=Oc.baseURL+"/"+r),t[e]=r.substring(0,r.lastIndexOf("/"));const s=()=>(o(e,"loaded"),Promise.resolve());return n[e]?s():kc.ScriptLoader.add(r).then(s)},p=(e,t="added")=>"added"===t&&s(e)||"loaded"===t&&r(e)?Promise.resolve():new Promise(n=>{i.push({name:e,state:t,resolve:n})});return{items:e,urls:t,lookup:n,get:a,requireLangPack:c,add:d,remove:u,createUrl:(e,t)=>S(t)?S(e)?{prefix:"",resource:t,suffix:""}:{prefix:e.prefix,resource:t,suffix:e.suffix}:t,load:h,waitFor:p}};Oc.languageLoad=!0,Oc.baseURL="",Oc.PluginManager=Oc(),Oc.ThemeManager=Oc(),Oc.ModelManager=Oc();const Lc=e=>{const t=xc(K.none()),n=()=>t.get().each(e);return{clear:()=>{n(),t.set(K.none())},isSet:()=>t.get().isSome(),get:()=>t.get(),set:e=>{n(),t.set(K.some(e))}}},Bc=e=>{const t=xc(K.none()),n=()=>t.get().each(e=>clearInterval(e));return{clear:()=>{n(),t.set(K.none())},isSet:()=>t.get().isSome(),get:()=>t.get(),set:i=>{n(),t.set(K.some(setInterval(i,e)))}}},Fc=()=>{const e=Lc(B),t=t=>e.get().each(t);return{...e,on:t}},Hc=(e,t)=>{let n=null;return{cancel:()=>{A(n)||(clearTimeout(n),n=null)},throttle:(...i)=>{A(n)&&(n=setTimeout(()=>{n=null,e.apply(null,i)},t))}}},$c=(e,t)=>{let n=null;const i=()=>{A(n)||(clearTimeout(n),n=null)},o=(...o)=>{i(),n=setTimeout(()=>{n=null,e.apply(null,o)},t)};return{cancel:i,throttle:o}},zc=$("mce-annotation"),jc=$("data-mce-annotation"),qc=$("data-mce-annotation-uid"),Uc=$("data-mce-annotation-active"),Wc=$("data-mce-annotation-classes"),Vc=$("data-mce-annotation-attrs"),Yc=e=>t=>xi(t,e),Gc=(e,t)=>{const n=e.selection.getRng(),i=yi.fromDom(n.startContainer),o=yi.fromDom(e.getBody()),r=t.fold(()=>"."+zc(),e=>`[${jc()}="${e}"]`),s=Hi(i,n.startOffset).getOr(i);return uo(s,r,Yc(o)).bind(t=>Xn(t,`${qc()}`).bind(n=>Xn(t,`${jc()}`).map(t=>{const i=Qc(e,n);return{uid:n,name:t,elements:i}})))},Kc=e=>zn(e)&&pi(e,zc()),Xc=(e,t)=>Qn(e,"data-mce-bogus")||lr(e,'[data-mce-bogus="all"]',Yc(t)),Qc=(e,t)=>{const n=yi.fromDom(e.getBody()),i=ar(n,`[${qc()}="${t}"]`);return ae(i,e=>!Xc(e,n))},Zc=(e,t)=>{const n=yi.fromDom(e.getBody()),i=ar(n,`[${jc()}="${t}"]`),o={};return oe(i,e=>{if(!Xc(e,n)){const t=Kn(e,qc()),n=Be(o,t).getOr([]);o[t]=n.concat([e])}}),o},Jc=(e,t)=>{const n=xc({}),i=()=>({listeners:[],previous:Fc()}),o=(e,t)=>{r(e,e=>(t(e),e))},r=(e,t)=>{const o=n.get(),r=t(Be(o,e).getOrThunk(i));o[e]=r,n.set(o)},s=(e,t,n)=>{o(e,i=>{oe(i.listeners,i=>i(!0,e,{uid:t,nodes:ie(n,e=>e.dom)}))})},a=e=>{o(e,t=>{oe(t.listeners,t=>t(!1,e))})},l=(t,n)=>{oe(Qc(e,t),e=>{n?Yn(e,Uc(),"true"):Zn(e,Uc())})},c=$c(()=>{const n=be(t.getNames());oe(n,t=>{r(t,n=>{const i=n.previous.get();return Gc(e,K.some(t)).fold(()=>{i.each(e=>{a(t),n.previous.clear(),l(e,!1)})},({uid:e,name:t,elements:o})=>{vn(i,e)||(i.each(e=>l(e,!1)),s(t,e,o),n.previous.set(e),l(e,!0))}),{previous:n.previous,listeners:n.listeners}})})},30);e.on("remove",()=>{c.cancel()}),e.on("NodeChange",()=>{c.throttle()});const d=(e,t)=>{r(e,e=>({previous:e.previous,listeners:e.listeners.concat([t])}))};return{addListener:d}},ed=(e,t)=>{const n=jc(),i=e=>K.from(e.attr(n)).bind(t.lookup),o=e=>{var t,n;e.attr(qc(),null),e.attr(jc(),null),e.attr(Uc(),null);const i=K.from(e.attr(Vc())).map(e=>e.split(",")).getOr([]),o=K.from(e.attr(Wc())).map(e=>e.split(",")).getOr([]);oe(i,t=>e.attr(t,null));const r=null!==(n=null===(t=e.attr("class"))||void 0===t?void 0:t.split(" "))&&void 0!==n?n:[],s=ve(r,[zc()].concat(o));e.attr("class",s.length>0?s.join(" "):null),e.attr(Wc(),null),e.attr(Vc(),null)};e.serializer.addTempAttr(Uc()),e.serializer.addAttributeFilter(n,e=>{for(const t of e)i(t).each(e=>{!1===e.persistent&&("span"===t.name?t.unwrap():o(t))})})},td=()=>{const e={},t=(t,n)=>{e[t]={name:t,settings:n}},n=t=>Be(e,t).map(e=>e.settings);return{register:t,lookup:n,getNames:()=>Ee(e)}};let nd=0;const id=e=>{const t=(new Date).getTime(),n=Math.floor(1e9*Math.random());return nd++,e+"_"+n+nd+String(t)},od=(e,t)=>{oe(t,t=>{ci(e,t)})},rd=(e,t)=>{oe(t,t=>{ui(e,t)})},sd=(e,t)=>yi.fromDom(e.dom.cloneNode(t)),ad=e=>sd(e,!1),ld=e=>sd(e,!0),cd=(e,t)=>{const n=yi.fromTag(t),i=ei(e);return Gn(n,i),n},dd=(e,t)=>{const n=cd(e,t);Do(e,n);const i=Fi(e);return No(n,i),Po(e),n},ud=(e,t,n=Y)=>{const i=new cr(e,t),o=e=>{let t;do{t=i[e]()}while(t&&!Sr(t)&&!n(t));return K.from(t).filter(Sr)};return{current:()=>K.from(i.current()).filter(Sr),next:()=>
vendor: 5,555 bytes, lines 26-27
26o("next"),prev:()=>o("prev"),prev2:()=>o("prev2")}},hd=(e,t)=>{const n=t||(t=>e.isBlock(t)||Rr(t)||Pr(t)),i=(e,t,n,o)=>{if(Sr(e)){const n=o(e,t,e.data);if(-1!==n)return K.some({container:e,offset:n})}return n().bind(e=>i(e.container,e.offset,n,o))},o=(t,o,r,s)=>{const a=ud(t,null!=s?s:e.getRoot(),n);return i(t,o,()=>a.prev().map(e=>({container:e,offset:e.length})),r).getOrNull()},r=(t,o,r,s)=>{const a=ud(t,null!=s?s:e.getRoot(),n);return i(t,o,()=>a.next().map(e=>({container:e,offset:0})),r).getOrNull()};return{backwards:o,forwards:r}},pd=Math.round,fd=e=>e?{left:pd(e.left),top:pd(e.top),bottom:pd(e.bottom),right:pd(e.right),width:pd(e.width),height:pd(e.height)}:{left:0,top:0,bottom:0,right:0,width:0,height:0},md=(e,t)=>(e=fd(e),t||(e.left=e.left+e.width),e.right=e.left,e.width=0,e),gd=(e,t)=>e.left===t.left&&e.top===t.top&&e.bottom===t.bottom&&e.right===t.right,vd=(e,t,n)=>e>=0&&e<=Math.min(t.height,n.height)/2,yd=(e,t)=>{const n=Math.min(t.height/2,e.height/2);return e.bottom-n<t.top||!(e.top>t.bottom)&&vd(t.top-e.bottom,e,t)},bd=(e,t)=>e.top>t.bottom||!(e.bottom<t.top)&&vd(t.bottom-e.top,e,t),_d=(e,t,n)=>t>=e.left&&t<=e.right&&n>=e.top&&n<=e.bottom,wd=e=>ce(e,(e,t)=>e.fold(()=>K.some(t),e=>{const n=Math.min(t.left,e.left),i=Math.min(t.top,e.top),o=Math.max(t.right,e.right),r=Math.max(t.bottom,e.bottom);return K.some({top:i,right:o,bottom:r,left:n,width:o-n,height:r-i})}),K.none()),Cd=(e,t,n)=>{
27const i=Math.max(Math.min(t,e.left+e.width),e.left),o=Math.max(Math.min(n,e.top+e.height),e.top);return Math.sqrt((t-i)*(t-i)+(n-o)*(n-o))},kd=(e,t)=>Math.max(0,Math.min(e.bottom,t.bottom)-Math.max(e.top,t.top)),xd=(e,t,n)=>Math.min(Math.max(e,t),n),Sd=e=>{const t=e.startContainer,n=e.startOffset;return t===e.endContainer&&t.hasChildNodes()&&e.endOffset===n+1?t.childNodes[n]:null},Ed=(e,t)=>{if(hr(e)&&e.hasChildNodes()){const n=e.childNodes;return n[xd(t,0,n.length-1)]}return e},Dd=(e,t)=>t<0&&hr(e)&&e.hasChildNodes()?void 0:Ed(e,t),Td=new RegExp("[\u0300-\u036f\u0483-\u0487\u0488-\u0489\u0591-\u05bd\u05bf\u05c1-\u05c2\u05c4-\u05c5\u05c7\u0610-\u061a\u064b-\u065f\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7-\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08e3-\u0902\u093a\u093c\u0941-\u0948\u094d\u0951-\u0957\u0962-\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2-\u09e3\u0a01-\u0a02\u0a3c\u0a41-\u0a42\u0a47-\u0a48\u0a4b-\u0a4d\u0a51\u0a70-\u0a71\u0a75\u0a81-\u0a82\u0abc\u0ac1-\u0ac5\u0ac7-\u0ac8\u0acd\u0ae2-\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62-\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c00\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55-\u0c56\u0c62-\u0c63\u0c81\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc-\u0ccd\u0cd5-\u0cd6\u0ce2-\u0ce3\u0d01\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62-\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb-\u0ebc\u0ec8-\u0ecd\u0f18-\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86-\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039-\u103a\u103d-\u103e\u1058-\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085-\u1086\u108d\u109d\u135d-\u135f\u1712-\u1714\u1732-\u1734\u1752-\u1753\u1772-\u1773\u17b4-\u17b5\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927-\u1928\u1932\u1939-\u193b\u1a17-\u1a18\u1a1b\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1ab0-\u1abd\u1abe\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80-\u1b81\u1ba2-\u1ba5\u1ba8-\u1ba9\u1bab-\u1bad\u1be6\u1be8-\u1be9\u1bed\u1bef-\u1bf1\u1c2c-\u1c33\u1c36-\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1cf4\u1cf8-\u1cf9\u1dc0-\u1df5\u1dfc-\u1dff\u200c-\u200d\u20d0-\u20dc\u20dd-\u20e0\u20e1\u20e2-\u20e4\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302d\u302e-\u302f\u3099-\u309a\ua66f\ua670-\ua672\ua674-\ua67d\ua69e-\ua69f\ua6f0-\ua6f1\ua802\ua806\ua80b\ua825-\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\ua9e5\uaa29-\uaa2e\uaa31-\uaa32\uaa35-\uaa36\uaa43\uaa4c\uaa7c\uaab0\uaab2-\uaab4\uaab7-\uaab8\uaabe-\uaabf\uaac1\uaaec-\uaaed\uaaf6\uabe5\uabe8\uabed\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\uff9e-\uff9f]"),Ad=e=>S(e)&&e.charCodeAt(0)>=768&&Td.test(e),Md=(...e)=>t=>{for(let n=0;n<e.length;n++)if(e[n](t))return!0;return!1},Rd=(...e)=>t=>{for(let n=0;n<e.length;n++)if(!e[n](t))return!1;return!0},Nd=hr,Id=js,Pd=vr("display","block table"),Od=vr("float","left right"),Ld=Rd(Nd,Id,q(Od)),Bd=q(vr("white-space","pre pre-line pre-wrap")),Fd=Sr,Hd=Rr,$d=vc.nodeIndex,zd=Dd,jd=e=>e?e.createRange():vc.DOM.createRng(),qd=e=>S(e)&&/[\r\n\t ]/.test(e),Ud=e=>!!e.setStart&&!!e.setEnd,Wd=e=>{const t=e.startContainer,n=e.startOffset;if(qd(e.toString())&&Bd(t.parentNode)&&Sr(t)){const e=t.data;if(qd(e[n-1])||qd(e[n+1]))return!0}return!1},Vd=e=>{const t=e.ownerDocument,n=jd(t),i=t.createTextNode(jr),o=e.parentNode;o.insertBefore(i,e),n.setStart(i,0),n.setEnd(i,1);const r=fd(n.getBoundingClientRect());return o.removeChild(i),r},Yd=e=>{const t=e.startContainer,n=e.endContainer,i=e.startOffset,o=e.endOffset;if(t===n&&Sr(n)&&0===i&&1===o){const t=e.cloneRange();return t.setEndAfter(n),Kd(t)}return null},Gd=e=>0===e.left&&0===e.right&&0===e.top&&0===e.bottom,Kd=e=>{var t;let n;const i=e.getClientRects();return n=i.length>0?fd(i[0]):fd(e.getBoundingClientRect()),!Ud(e)&&Hd(e)&&Gd(n)?Vd(e):Gd(n)&&Ud(e)&&null!==(t=Yd(e))&&void 0!==t?t:n},Xd=(e,t)=>{const n=md(e,t);return n.width=1,n.right=n.left+1,n},Qd=e=>{const t=[],n=e=>{0!==e.height&&(t.length>
270&&gd(e,t[t.length-1])||t.push(e))},i=(e,t)=>{const i=jd(e.ownerDocument);if(t<e.data.length){if(Ad(e.data[t]))return;if(Ad(e.data[t-1])&&(i.setStart(e,t),i.setEnd(e,t+1),!Wd(i)))return void n(Xd(Kd(i),!1))}t>0&&(i.setStart(e,t-1),i.setEnd(e,t),Wd(i)||n(Xd(Kd(i),!1))),t<e.data.length&&(i.setStart(e,t),i.setEnd(e,t+1),Wd(i)||n(Xd(Kd(i),!0)))},o=e.container(),r=e.offset();if(Fd(o))return i(o,r),t;if(Nd(o))if(e.isAtEnd()){const e=zd(o,r);Fd(e)&&i(e,e.data.length),Ld(e)&&!Hd(e)&&n(Xd(Kd(e),!1))}else{const s=zd(o,r);if(Fd(s)&&i(s,0),Ld(s)&&e.isAtEnd())return n(Xd(Kd(s),!1)),t;const a=zd(e.container(),e.offset()-1);Ld(a)&&!Hd(a)&&(Pd(a)||Pd(s)||!Ld(s))&&n(Xd(Kd(a),!1)),Ld(s)&&n(Xd(Kd(s),!0))}return t},Zd=(e,t,n)=>{const i=()=>(Fd(e),0===t),o=()=>Fd(e)?t>=e.data.length:t>=e.childNodes.length,r=()=>{const n=jd(e.ownerDocument);return n.setStart(e,t),n.setEnd(e,t),n},s=()=>(n||(n=Qd(Zd(e,t))),n),a=()=>s().length>0,l=n=>n&&e===n.container()&&t===n.offset(),c=n=>zd(e,n?t-1:t);return{container:$(e),offset:$(t),toRange:r,getClientRects:s,isVisible:a,isAtStart:i,isAtEnd:o,isEqual:l,getNode:c}};Zd.fromRangeStart=e=>Zd(e.startContainer,e.startOffset),Zd.fromRangeEnd=e=>Zd(e.endContainer,e.endOffset),Zd.after=e=>Zd(e.parentNode,$d(e)+1),Zd.before=e=>Zd(e.parentNode,$d(e)),Zd.isAbove=(e,t)=>_n(we(t.getClientRects()),Ce(e.getClientRects()),yd).getOr(!1),Zd.isBelow=(e,t)=>_n(Ce(t.getClientRects()),we(e.getClientRects()),bd).getOr(!1),Zd.isAtStart=e=>!!e&&e.isAtStart(),Zd.isAtEnd=e=>!!e&&e.isAtEnd(),Zd.isTextPosition=e=>!!e&&Sr(e.container()),Zd.isElementPosition=e=>!Zd.isTextPosition(e);const Jd=(e,t)=>{Sr(t)&&0===t.data.length&&e.remove(t)},eu=(e,t,n)=>{t.insertNode(n),Jd(e,n.previousSibling),Jd(e,n.nextSibling)}
vendor: 4,501 bytes, line 27
27,tu=(e,t,n)=>{const i=K.from(n.firstChild),o=K.from(n.lastChild);t.insertNode(n),i.each(t=>Jd(e,t.previousSibling)),o.each(t=>Jd(e,t.nextSibling))},nu=(e,t,n)=>{Mr(n)?tu(e,t,n):eu(e,t,n)},iu=Sr,ou=_r,ru=vc.nodeIndex,su=e=>{const t=e.parentNode;return ou(t)?su(t):t},au=e=>e?Ke(e.childNodes,(e,t)=>(ou(t)&&"BR"!==t.nodeName?e=e.concat(au(t)):e.push(t),e),[]):[],lu=(e,t)=>{let n=e;for(;(n=n.previousSibling)&&iu(n);)t+=n.data.length;return t},cu=e=>t=>e===t,du=e=>{let t,n;t=au(su(e)),n=Xe(t,cu(e),e),t=t.slice(0,n+1);const i=Ke(t,(e,n,i)=>(iu(n)&&iu(t[i-1])&&e++,e),0);return t=Ye(t,gr([e.nodeName])),n=Xe(t,cu(e),e),n-i},uu=e=>(iu(e)?"text()":e.nodeName.toLowerCase())+"["+du(e)+"]",hu=(e,t,n)=>{const i=[];for(let o=t.parentNode;o&&o!==e&&(!n||!n(o));o=o.parentNode)i.push(o);return i},pu=(e,t)=>{let n,i=[],o=t.container(),r=t.offset();if(iu(o))n=lu(o,r);else{const e=o.childNodes;r>=e.length?(n="after",r=e.length-1):n="before",o=e[r]}i.push(uu(o));let s=hu(e,o);return s=Ye(s,q(_r)),i=i.concat(Ve(s,e=>uu(e))),i.reverse().join("/")+","+n},fu=(e,t,n)=>{let i=au(e);return i=Ye(i,(e,t)=>!iu(e)||!iu(i[t-1])),i=Ye(i,gr([t])),i[n]},mu=(e,t)=>{let n=e,i=0;for(;iu(n);){const o=n.data.length;if(t>=i&&t<=i+o){e=n,t-=i;break}if(!iu(n.nextSibling)){e=n,t=o;break}i+=o,n=n.nextSibling}return iu(e)&&t>e.data.length&&(t=e.data.length),Zd(e,t)},gu=(e,t)=>{if(!t)return null;const n=t.split(","),i=n[0].split("/"),o=n.length>1?n[1]:"before",r=Ke(i,(e,t)=>{const n=/([\w\-\(\)]+)\[([0-9]+)\]/.exec(t);return n?("text()"===n[1]&&(n[1]="#text"),fu(e,n[1],parseInt(n[2],10))):null},e);if(!r)return null;if(!iu(r)&&r.parentNode){let e;return e="after"===o?ru(r)+1:ru(r),Zd(r.parentNode,e)}return mu(r,parseInt(o,10))},vu=Pr,yu=(e,t,n)=>{let i=e(t.data.slice(0,n)).length;for(let n=t.previousSibling;n&&Sr(n);n=n.previousSibling)i+=e(n.data).length;return i},bu=(e,t,n,i,o)=>{const r=o?i.startContainer:i.endContainer;let s=o?i.startOffset:i.endOffset;const a=[],l=e.getRoot();if(Sr(r))a.push(n?yu(t,r,s):s);else{let t=0;const i=r.childNodes;s>=i.length&&i.length&&(t=1,s=Math.max(0,i.length-1)),a.push(e.nodeIndex(i[s],n)+t)}for(let t=r;t&&t!==l;t=t.parentNode)a.push(e.nodeIndex(t,n));return a},_u=(e,t,n,i)=>{const o=t.dom,r=bu(o,e,n,i,!0),s=t.isForward(),a=Is(i)?{isFakeCaret:!0}:{};if(t.isCollapsed())return{start:r,forward:s,...a};return{start:r,end:bu(o,e,n,i,!1),forward:s,...a}},wu=(e,t,n)=>{let i=0;return gn.each(e.select(t),e=>"all"===e.getAttribute("data-mce-bogus")?void 0:e!==n&&void i++),i},Cu=(e,t)=>{let n=t?e.startContainer:e.endContainer,i=t?e.startOffset:e.endOffset;if(hr(n)&&"TR"===n.nodeName){const o=n.childNodes;n=o[Math.min(t?i:i-1,o.length-1)],n&&(i=t?0:n.childNodes.length,t?e.setStart(n,i):e.setEnd(n,i))}},ku=e=>(Cu(e,!0),Cu(e,!1),e),xu=(e,t)=>{if(hr(e)&&(e=Ed(e,t),vu(e)))return e;if(ks(e)){Sr(e)&&ws(e)&&(e=e.parentNode);let t=e.previousSibling;if(vu(t))return t;if(t=e.nextSibling,vu(t))return t}},Su=e=>xu(e.startContainer,e.startOffset)||xu(e.endContainer,e.endOffset),Eu=(e,t,n)=>{const i=n.getNode(),o=n.getRng();if("IMG"===i.nodeName||vu(i)){const e=i.nodeName;return{name:e,index:wu(n.dom,e,i)}}const r=Su(o);if(r){const e=r.tagName;return{name:e,index:wu(n.dom,e,r)}}return _u(e,n,t,o)},Du=e=>{const t=e.getRng();return{start:pu(e.dom.getRoot(),Zd.fromRangeStart(t)),end:pu(e.dom.getRoot(),Zd.fromRangeEnd(t)),forward:e.isForward()}},Tu=e=>({rng:e.getRng(),forward:e.isForward()}),Au=(e,t,n)=>{const i={"data-mce-type":"bookmark",id:t,style:"overflow:hidden;line-height:0px"};return n?e.create("span",i,"&#xFEFF;"):e.create("span",i)},Mu=(e,t)=>{const n=e.dom;let i=e.getRng();const o=n.uniqueId(),r=e.isCollapsed(),s=e.getNode(),a=s.nodeName,l=e.isForward();if("IMG"===a)return{name:a,index:wu(n,a,s)};const c=ku(i.cloneRange());if(!r){c.collapse(!1);const e=Au(n,o+"_end",t);nu(n,c,e)}i=ku(i),i.collapse(!0);const d=Au(n,o+"_start",t);return nu(n,i,d),e.moveToBookmark({id:o,keep:!0,forward:l}),{id:o,forward:l}},Ru=(e,t,n=!1)=>2===t?Eu(vs,n,e):3===t?Du(e):t?Tu(e):Mu(e,!1),Nu=e(Eu,z,!0),Iu=e=>{const t=t=>t(e),n=$(e),i=()=>o,o={tag:!0,inner:e,fold:(t,n)=>n(e),isValue:G,isError:Y,map:t=>Lu.value(t(e)),mapError:i,bind:t,exists:t,forall:t,getOr:n,or:i,getOrThunk:n,orThunk:i,getOrDie:n,each:t=>{t(e)},toOptional:()=>K.some(e)};return o},Pu=e=>{const t=()=>n,n={tag:!1,inner:e,fold:t=>t(e),isValue:Y,isError:G,map:t,mapError:t=>Lu.error(t(e)),bind:t,exists:Y,forall:G,getOr:z,or:z,getOrThunk:W,orThunk:W,getOrDie:U(String(e)),each:B,toOptional:K.none};return n},Ou=(e,t)=>
vendor: 6,509 bytes, line 27
27e.fold(()=>Pu(t),Iu),Lu={value:Iu,error:Pu,fromOption:Ou},Bu=e=>{if(!T(e))throw new Error("cases must be an array");if(0===e.length)throw new Error("there must be at least one case");const t=[],n={};return oe(e,(i,o)=>{const r=Ee(i);if(1!==r.length)throw new Error("one and only one name per case");const s=r[0],a=i[s];if(void 0!==n[s])throw new Error("duplicate key detected:"+s);if("cata"===s)throw new Error("cannot have a case named cata (sorry)");if(!T(a))throw new Error("case arguments must be an array");t.push(s),n[s]=(...n)=>{const i=n.length;if(i!==a.length)throw new Error("Wrong number of arguments to case "+s+". Expected "+a.length+" ("+a+"), got "+i);return{fold:(...t)=>{if(t.length!==e.length)throw new Error("Wrong number of arguments to fold. Expected "+e.length+", got "+t.length);return t[o].apply(null,n)},match:e=>{const i=Ee(e);if(t.length!==i.length)throw new Error("Wrong number of arguments to match. Expected: "+t.join(",")+"\nActual: "+i.join(","));if(!me(t,e=>te(i,e)))throw new Error("Not all branches were specified when using match. Specified: "+i.join(", ")+"\nRequired: "+t.join(", "));return e[s].apply(null,n)},log:e=>{console.log(e,{constructors:t,constructor:s,params:n})}}}}),n},Fu={generate:Bu};Fu.generate([{bothErrors:["error1","error2"]},{firstError:["error1","value2"]},{secondError:["value1","error2"]},{bothValues:["value1","value2"]}]);const Hu=e=>{const t=[],n=[];return oe(e,e=>{e.fold(e=>{t.push(e)},e=>{n.push(e)})}),{errors:t,values:n}},$u=e=>"inline-command"===e.type||"inline-format"===e.type,zu=e=>"block-command"===e.type||"block-format"===e.type,ju=e=>{const t=t=>Lu.error({message:t,pattern:e}),n=(n,i,o)=>{if(void 0!==e.format){let o;if(T(e.format)){if(!me(e.format,S))return t(n+" pattern has non-string items in the `format` array");o=e.format}else{if(!S(e.format))return t(n+" pattern has non-string `format` parameter");o=[e.format]}return Lu.value(i(o))}return void 0!==e.cmd?S(e.cmd)?Lu.value(o(e.cmd,e.value)):t(n+" pattern has non-string `cmd` parameter"):t(n+" pattern is missing both `format` and `cmd` parameters")};if(!E(e))return t("Raw pattern is not an object");if(!S(e.start))return t("Raw pattern is missing `start` parameter");if(void 0!==e.end){if(!S(e.end))return t("Inline pattern has non-string `end` parameter");if(0===e.start.length&&0===e.end.length)return t("Inline pattern has empty `start` and `end` parameters");let i=e.start,o=e.end;return 0===o.length&&(o=i,i=""),n("Inline",e=>({type:"inline-format",start:i,end:o,format:e}),(e,t)=>({type:"inline-command",start:i,end:o,cmd:e,value:t}))}return void 0!==e.replacement?S(e.replacement)?0===e.start.length?t("Replacement pattern has empty `start` parameter"):Lu.value({type:"inline-command",start:"",end:e.start,cmd:"mceInsertContent",value:e.replacement}):t("Replacement pattern has non-string `replacement` parameter"):0===e.start.length?t("Block pattern has empty `start` parameter"):n("Block",t=>({type:"block-format",start:e.start,format:t[0]}),(t,n)=>({type:"block-command",start:e.start,cmd:t,value:n}))},qu=e=>ae(e,zu),Uu=e=>ae(e,$u),Wu=(e,t)=>({inlinePatterns:Uu(e),blockPatterns:qu(e),dynamicPatternsLookup:t}),Vu=e=>{const t=Hu(ie(e,ju));return oe(t.errors,e=>console.error(e.message,e.pattern)),t.values},Yu=e=>t=>{const n=e(t);return Vu(n)},Gu=Jt().deviceType,Ku=Gu.isTouch(),Xu=vc.DOM,Qu=e=>{const t=e.indexOf("=")>0?e.split(/[;,](?![^=;,]*(?:[;,]|$))/):e.split(",");return ce(t,(e,t)=>{const n=t.split("="),i=n[0],o=n.length>1?n[1]:i;return e[vt(i)]=vt(o),e},{})},Zu=e=>x(e,RegExp),Ju=e=>t=>t.options.get(e),eh=e=>S(e)||E(e),th=(e,t="")=>n=>{const i=S(n);if(i){if(-1!==n.indexOf("=")){const o=Qu(n);return{value:Be(o,e.id).getOr(t),valid:i}}return{value:n,valid:i}}return{valid:!1,message:"Must be a string."}},nh=e=>{const t=e.options.register;t("id",{processor:"string",default:e.id}),t("selector",{processor:"string"}),t("target",{processor:"object"}),t("suffix",{processor:"string"}),t("cache_suffix",{processor:"string"}),t("base_url",{processor:"string"}),t("referrer_policy",{processor:"string",default:""}),t("language_load",{processor:"boolean",default:!0}),t("inline",{processor:"boolean",default:!1}),t("iframe_attrs",{processor:"object",default:{}}),t("doctype",{processor:"string",default:"<!DOCTYPE html>"}),t("document_base_url",{processor:"string",default:e.documentBaseUrl}),t("body_id",{processor:th(e,"tinymce"),default:"tinymce"}),t("body_class",{processor:th(e),default:""}),t("content_security_policy",{processor:"string",default:""}),t("br_in_pre",{processor:"boolean",default:!0}),t("forced_root_block",{processor:e=>{const t=S(e)&&_t(e);return t?{value:e,valid:t}:{valid:!1,message:"Must be a non-empty string."}},default:"p"}),t("forced_root_block_attrs",{processor:"object",default:{}}),t("newline_behavior",{processor:e=>{const t=te(["block","linebreak","invert","default"],e);return t?{value:e,valid:t}:{valid:!1,message:"Must be one of: block, linebreak, invert or default."}},default:"default"}),t("br_newline_selector",{processor:"string",default:".mce-toc h2,figcaption,caption"}),t("no_newline_selector",{processor:"string",default:""}),t("keep_styles",{processor:"boolean",default:!0}),t("end_container_on_empty_block",{processor:e=>M(e)||S(e)?{valid:!0,value:e}:{valid:!1,message:"Must be boolean or a string"},default:"blockquote"}),t("font_size_style_values",{processor:"string",default:"xx-small,x-small,small,medium,large,x-large,xx-large"}),t("font_size_legacy_values",{processor:"string",default:"xx-small,small,medium,large,x-large,xx-large,300%"}),t("font_size_classes",{processor:"string",default:""}),t("automatic_uploads",{processor:"boolean",default:!0}),t("images_reuse_filename",{processor:"boolean",default:!1}),t("images_replace_blob_uris",{processor:"boolean",default:!0}),t("icons",{processor:"string",default:""}),t("icons_url",{processor:"string",default:""}),t("images_upload_url",{processor:"string",default:""}),t("images_upload_base_path",{processor:"string",default:""}),t("images_upload_credentials",{processor:"boolean",default:!1}),t("images_upload_handler",{processor:"function"}),t("language",{processor:"string",default:"en"}),t("language_url",{processor:"string",default:""}),t("entity_encoding",{processor:"string",default:"named"}),t("indent",{processor:"boolean",default:!0}),t("indent_before",{processor:"string",default:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,th,ul,ol,li,dl,dt,dd,area,table,thead,tfoot,tbody,tr,section,details,summary,article,hgroup,aside,f
27igure,figcaption,option,optgroup,datalist"}),t("indent_after",{processor:"string",default:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,th,ul,ol,li,dl,dt,dd,area,table,thead,tfoot,tbody,tr,section,details,summary,article,hgroup,aside,figure,figcaption,option,optgroup,datalist"}),t("indent_use_margin",{processor:"boolean",default:!1}),t("indentation",{processor:"string",default:"40px"}),t("content_css",{processor:e=>{const t=!1===e||S(e)||L(e,S);return t?S(e)?{value:ie(e.split(","),vt),valid:t}:T(e)?{value:e,valid:t}:!1===e?{value:[],valid:t}:{value:e,valid:t}:{valid:!1,message:"Must be false, a string or an array of strings."}},default:Zh(e)?[]:["default"]}),t("content_style",{processor:"string"}),t("content_css_cors",{processor:"boolean",default:!1}),t("font_css",{processor:e=>{const t=S(e)||L(e,S);if(t){return{value:T(e)?e:ie(e.split(","),vt),valid:t}}return{valid:!1,message:"Must be a string or an array of strings."}},default:[]}),t("inline_boundaries",{processor:"boolean",default:!0}),t("inline_boundaries_selector",{processor:"string",default:"a[href],code,span.mce-annotation"}),t("object_resizing",{processor:e=>{const t=M(e)||S(e);return t?!1===e||Gu.isiPhone()||Gu.isiPad()?{value:"",valid:t}:{value:!0===e?"table,img,figure.image,div,video,iframe":e,valid:t}:{valid:!1,message:"Must be boolean or a string"}},default:!Ku}),t("resize_img_proportional",{processor:"boolean",default:!0}),t("event_root",{processor:"object"}),t("service_message",{processor:"string"}),t("theme",{processor:e=>!1===e||S(e)||P(e),default:"silver"}),t("theme_url",{processor:"string"}),t("formats",{processor:"object"}),t("format_empty_lines",{processor:"boolean",default:!1}),t("format_noneditable_selector",{processor:"string",default:""}),t("preview_styles",{processor:e=>{const t=!1===e||S(e);return t?{value:!1===e?"":e,valid:t}:{valid:!1,message:"Must be false or a string"}},default:"font-family font-size font-weight font-style text-decoration text-transform color background-color border border-radius outline text-shadow"}),t("custom_ui_selector",{processor:"string",default:""}),t("hidden_input",{processor:"boolean",default:!0}),t("submit_patch",{processor:"boolean",default:!0}),t("encoding",{processor:"string"}),t("add_form_submit_trigger",{processor:"boolean",default:!0}),t("add_unload_trigger",{processor:"boolean",default:!0}),t("custom_undo_redo_levels",{processor:"number",default:0}),t("disable_nodechange",{processor:"boolean",default:!1}),t("readonly",{processor:"boolean",default:!1}),t("editable_root",{processor:"boolean",default:!0}),t("plugins",{processor:"string[]",default:[]}),t("external_plugins",{processor:"object"}),t("forced_plugins",{processor:"string[]"}),t("model",{processor:"string",default:e.hasPlugin("rtc")?"plugin":"dom"}),t("model_url",{processor:"string"}),t("block_unsupported_drop",{processor:"boolean",default:!0}),t("visual",{processor:"boolean",default:!0}),t("visual_table_class",{processor:"string",default:"mce-item-table"}),t("visual_anchor_class",{processor:"string",default:"mce-item-anchor"}),t("iframe_aria_text",{processor:"string",default:"Rich Text Area. Press ALT-0 for help."}),t("setup",{processor:"function"}),t("init_instance_callback",{processor:"function"}),t("url_converter",{processor:"function",default:e.convertURL}),t("url_converter_scope",{processor:"object",default:e}),t("urlconverter_callback",{processor:"function"}),t("allow_conditional_comments",{processor:"boolean",default:!1}),t("allow_html_data_urls",{processor:"boolean",default:!1}),t("allow_svg_data_urls",{processor:"boolean"}),t("allow_html_in_named_anchor",{processor:"boolean",default:!1}),t("allow_script_urls",{processor:"boolean",default:!1}),t("allow_unsafe_link_target",{processor:"boolean",default:!1}),t("convert_fonts_to_spans",{processor:"boolean",default:!0,deprecated:!0}),t("fix_list_elements",{processor:"boolean",default:!1}),t("preserve_cdata",{processor:"boolean",default:!1}),t("remove_trailing_brs",{processor:"boolean",default:!0}),t("pad_empty_with_br",{processor:"boolean",default:!1}),t("inline_styles",{processor:"boolean",default:!0,deprecated:!0}),t("element_format",{processor:"string",default:"html"}),t("entities",{processor:"string"}),t("schema",{processor:"string",default:"html5"}),t("convert_urls",{processor:"boolean",default:!0}),t("relative_urls",{processor:"boolean",default:!0}),t("remove_script_host",{processor:"boolean",default:!0}),t("custom_elements",{processor:"string"}),t("extended_valid_elements",{processor:"string"}),t("invalid_elements",{processor:"string"}),t("invalid_styles",{processor:eh}),t("valid_children",{processor:"string"}),t("valid_classes",{processor:eh}),t("valid_elements",{processor:"string"}),t("valid_styles",{processor:eh}),t("verify_html",{processor:"boolean",default:!0}),t("auto_focus",{processor:e=>S(e)||!0===e}),t("browser_spellcheck",{processor:"boolean",default:!1}),t("protect",{processor:"array"}),t("images_file_types",{processor:"string",default:"jpeg,jpg,jpe,jfi,jif,jfif,png,gif,bmp,webp"}),t("deprecation_warnings",{processor:"boolean",default:!0}),t("a11y_advanced_options",{processor:"boolean",default:!1}),t("api_key",{processor:"string"}),t("paste_block_drop",{processor:"boolean",default:!1}),t("paste_data_images",{processor:"boolean",default:!0}),t("paste_preprocess",{processor:"function"}),t("paste_postprocess",{processor:"function"}),t("paste_webkit_styles",{processor:"string",default:"none"}),t("paste_remove_styles_if_webkit",{processor:"boolean",default:!0}),t("paste_merge_formats",{processor:"boolean",default:!0}),t("smart_paste",{processor:"boolean",default:!0}),t("paste_as_text",{processor:"boolean",default:!1}
27),t("paste_tab_spaces",{processor:"number",default:4}),t("text_patterns",{processor:e=>{if(L(e,E)||!1===e){return{value:Vu(!1===e?[]:e),valid:!0}}return{valid:!1,message:"Must be an array of objects or false."}},default:[{start:"*",end:"*",format:"italic"},{start:"**",end:"**",format:"bold"},{start:"#",format:"h1"},{start:"##",format:"h2"},{start:"###",format:"h3"},{start:"####",format:"h4"},{start:"#####",format:"h5"},{start:"######",format:"h6"},{start:"1. ",cmd:"InsertOrderedList"},{start:"* ",cmd:"InsertUnorderedList"},{start:"- ",cmd:"InsertUnorderedList"}]}),t("text_patterns_lookup",{processor:e=>P(e)?{value:Yu(e),valid:!0}:{valid:!1,message:"Must be a single function"},default:()=>[]}),t("noneditable_class",{processor:"string",default:"mceNonEditable"}),t("editable_class",{processor:"string",default:"mceEditable"}),t("noneditable_regexp",{processor:e=>L(e,Zu)?{value:e,valid:!0}:Zu(e)?{value:[e],valid:!0}:{valid:!1,message:"Must be a RegExp or an array of RegExp."},default:[]}),t("table_tab_navigation",{processor:"boolean",default:!0}),t("highlight_on_focus",{processor:"boolean",default:!1}),t("xss_sanitization",{processor:"boolean",default:!0}),t("details_initial_state",{processor:e=>{const t=te(["inherited","collapsed","expanded"],e);return t?{value:e,valid:t}:{valid:!1,message:"Must be one of: inherited, collapsed, or expanded."}},default:"inherited"}),t("details_serialized_state",{processor:e=>{const t=te(["inherited","collapsed","expanded"],e);return t?{value:e,valid:t}:{valid:!1,message:"Must be one of: inherited, collapsed, or expanded."}},default:"inherited"}),t("init_content_sync",{processor:"boolean",default:!1}),t("newdocument_content",{processor:"string",default:""}),t("force_hex_color",{processor:e=>{const t=["always","rgb_only","off"],n=te(t,e);return n?{value:e,valid:n}:{valid:!1,message:`Must be one of: ${t.join(", ")}.`}},default:"off"}),t("sandbox_iframes",{processor:"boolean",default:!1}),t("convert_unsafe_embeds",{processor:"boolean",default:!1}),e.on("ScriptsLoaded",()=>{t("directionality",{processor:"string",default:Pc.isRtl()?"rtl":void 0}),t("placeholder",{processor:"string",default:Xu.getAttrib(e.getElement(),"placeholder")})})},ih=Ju("iframe_attrs"),oh=Ju("doctype"),rh=Ju("document_base_url"),sh=Ju("body_id"),ah=Ju("body_class"),lh=Ju("content_security_policy"),ch=Ju("br_in_pre"),dh=Ju("forced_root_block"),uh=Ju("forced_root_block_attrs"),hh=Ju("newline_behavior"),ph=Ju("br_newline_selector"),fh=Ju("no_newline_selector"),mh=Ju("keep_styles"),gh=Ju("end_container_on_empty_block"),vh=Ju("automatic_uploads"),yh=Ju("images_reuse_filename"),bh=Ju("images_replace_blob_uris"),_h=Ju("icons"),wh=Ju("icons_url"),Ch=Ju("images_upload_url"),kh=Ju("images_upload_base_path"),xh=Ju("images_upload_credentials"),Sh=Ju("images_upload_handler"),Eh=Ju("content_css_cors"),Dh=Ju("referrer_policy"),Th=Ju("language"),Ah=Ju("language_url"),Mh=Ju("indent_use_margin"),Rh=Ju("indentation"),Nh=Ju("content_css"),Ih=Ju("content_style"),Ph=Ju("font_css"),Oh=Ju("directionality"),Lh=Ju("inline_boundaries_selector"),Bh=Ju("object_resizing"),Fh=Ju("resize_img_proportional"),Hh=Ju("placeholder"),$h=Ju("event_root"),zh=Ju("service_message"),jh=Ju("theme"),qh=Ju("theme_url"),Uh=Ju("model"),Wh=Ju("model_url"),Vh=Ju("inline_boundaries"),Yh=Ju("formats"),Gh=Ju("preview_styles"),Kh=Ju("format_empty_lines"),Xh=Ju("format_noneditable_selector"),Qh=Ju("custom_ui_selector"),Zh=Ju("inline"),Jh=Ju("hidden_input"),ep=Ju("submit_patch"),tp=Ju("add_form_submit_trigger"),np=Ju("add_unload_trigger"),ip=Ju("custom_undo_redo_levels"),op=Ju("disable_nodechange"),rp=Ju("readonly"),sp=Ju("editable_root"),ap=Ju("content_css_cors"),lp=Ju("plugins"),cp=Ju("external_plugins"),dp=Ju("block_unsupported_drop"),up=Ju("visual"),hp=Ju("visual_table_class"),pp=Ju("visual_anchor_class"),fp=Ju("iframe_aria_text"),mp=Ju("setup"),gp=Ju("init_instance_callback"),vp=Ju("urlconverter_callback"),yp=Ju("auto_focus"),bp=Ju("browser_spellcheck"),_p=Ju("protect"),wp=Ju("paste_block_drop"),Cp=Ju("paste_data_images"),kp=Ju("paste_preprocess"),xp=Ju("paste_postprocess"),Sp=Ju("newdocument_content"),Ep=Ju("paste_webkit_styles"),Dp=Ju("paste_remove_styles_if_webkit"),Tp=Ju("paste_merge_formats"),Ap=Ju("smart_paste"),Mp=Ju("paste_as_text"),Rp=Ju("paste_tab_space
27s"),Np=Ju("allow_html_data_urls"),Ip=Ju("text_patterns"),Pp=Ju("text_patterns_lookup"),Op=Ju("noneditable_class"),Lp=Ju("editable_class"),Bp=Ju("noneditable_regexp"),Fp=Ju("preserve_cdata"),Hp=Ju("highlight_on_focus"),$p=Ju("xss_sanitization"),zp=Ju("init_content_sync"),jp=e=>e.options.isSet("text_patterns_lookup"),qp=e=>gn.explode(e.options.get("font_size_style_values")),Up=e=>gn.explode(e.options.get("font_size_classes")),Wp=e=>"xml"===e.options.get("encoding"),Vp=e=>gn.explode(e.options.get("images_file_types")),Yp=Ju("table_tab_navigation"),Gp=Ju("details_initial_state"),Kp=Ju("details_serialized_state"),Xp=Ju("force_hex_color"),Qp=Ju("sandbox_iframes"),Zp=hr,Jp=Sr,ef=e=>{const t=e.parentNode;t&&t.removeChild(e)},tf=e=>{const t=vs(e);return{count:e.length-t.length,text:t}},nf=e=>{let t;for(;-1!==(t=e.data.lastIndexOf(ms));)e.deleteData(t,1)},of=(e,t)=>(df(e),t),rf=(e,t)=>{const n=tf(e.data.substr(0,t.offset())),i=tf(e.data.substr(t.offset()));return(n.text+i.text).length>0?(nf(e),Zd(e,t.offset()-n.count)):t},sf=(e,t)=>{const n=t.container(),i=ee(ke(n.childNodes),e).map(e=>e<t.offset()?Zd(n,t.offset()-1):t).getOr(t);return df(e),i},af=(e,t)=>Jp(e)&&t.container()===e?rf(e,t):of(e,t),lf=(e,t)=>t.container()===e.parentNode?sf(e,t):of(e,t),cf=(e,t)=>Zd.isTextPosition(t)?af(e,t):lf(e,t),df=e=>{Zp(e)&&ks(e)&&(xs(e)?e.removeAttribute("data-mce-caret"):ef(e)),Jp(e)&&(nf(e),0===e.data.length&&ef(e))},uf=Pr,hf=Br,pf=Or,ff="*[contentEditable=false],video,audio,embed,object",mf=(e,t,n)=>{const i=md(t.getBoundingClientRect(),n);let o,r;if("BODY"===e.tagName){const t=e.ownerDocument.documentElement;o=e.scrollLeft||t.scrollLeft,r=e.scrollTop||t.scrollTop}else{const t=e.getBoundingClientRect();o=e.scrollLeft-t.left,r=e.scrollTop-t.top}i.left+=o,i.right+=o,i.top+=r,i.bottom+=r,i.width=1;let s=t.offsetWidth-t.clientWidth;return s>0&&(n&&(s*=-1),i.left+=s,i.right+=s),i},gf=e=>{var t,n;const i=ar(yi.fromDom(e),ff);for(let e=0;e<i.length;e++){const o=i[e].dom;let r=o.previousSibling;if(Ms(r)){const e=r.data;1===e.length?null===(t=r.parentNode)||void 0===t||t.removeChild(r):r.deleteData(e.length-1,1)}if(r=o.nextSibling,As(r)){1===r.data.length?null===(n=r.parentNode)||void 0===n||n.removeChild(r):r.deleteData(0,1)}}},vf=(e,t,n,i)=>{const o=Fc();let r,s;const a=dh(e),l=e.dom,c=(e,i)=>{let r;if(d(),pf(i))return null;if(!n(i))return s=Ss(i,e),r=i.ownerDocument.createRange(),bf(s.nextSibling)?(r.setStart(s,0),r.setEnd(s,0)):(r.setStart(s,1),r.setEnd(s,1)),r;{const n=Ts(a,i,e),c=mf(t,i,e);l.setStyle(n,"top",c.top),s=n;const d=l.create("div",{class:"mce-visual-caret","data-mce-bogus":"all"});l.setStyles(d,{...c}),l.add(t,d),o.set({caret:d,element:i,before:e}),e&&l.addClass(d,"mce-visual-caret-before"),u(),r=i.ownerDocument.createRange(),r.setStart(n,0),r.setEnd(n,0)}return r},d=()=>{gf(t),s&&(df(s),s=null),o.on(e=>{l.remove(e.caret),o.clear()}),r&&(clearInterval(r),r=void 0)},u=()=>{r=setInterval(()=>{o.on(e=>{i()?l.toggleClass(e.caret,"mce-visual-caret-hidden"):l.addClass(e.caret,"mce-visual-caret-hidden")})},500)};return{show:c,hide:d,getCss:()=>".mce-visual-caret {position: absolute;background-color: black;background-color: currentcolor;}.mce-visual-caret-hidden {display: none;}*[data-mce-caret] {position: absolute;left: -1000px;right: auto;top: 0;margin: 0;padding: 0;}",reposition:()=>{o.on(e=>{const n=mf(t,e.element,e.before);l.setStyles(e.caret,{...n})})},destroy:()=>clearInterval(r)}},yf=()=>an.browser.isFirefox(),bf=e=>uf(e)||hf(e),_f=e=>(bf(e)||Cr(e)&&yf())&&Ri(yi.fromDom(e)).exists(po),wf=Ir,Cf=Pr,kf=Br,xf=vr("display","block table table-cell table-caption list-item"),Sf=ks,Ef=ws,Df=hr,Tf=Sr,Af=js,Mf=e=>e>0,Rf=e=>e<0,Nf=(e,t)=>{let n;for(;n=e(t);)if(!Ef(n))return n;return null},If=(e,t,n,i,o)=>{const r=new cr(e,i),s=Cf(e)||Ef(e);let a;if(Rf(t)){if(s&&(a=Nf(r.prev.bind(r),!0),n(a)))return a;for(;a=Nf(r.prev.bind(r),o);)if(n(a))return a}if(Mf(t)){if(s&&(a=Nf(r.next.bind(r),!0),n(a)))return a;for(;a=Nf(r.next.bind(r),o);)if(n(a))return a}return null},Pf=(e,t)=>{const n=e=>wf(e.dom),i=e=>e.dom===t;return io(yi.fromDom(e),n,i).map(e=>e.dom).getOr(t)},Of=(e,t)=>{for(;e&&e!==t;){if(xf(e))return e;e=e.parentNode}return null}
vendor: 13,737 bytes, lines 27-28
27,Lf=(e,t,n)=>Of(e.container(),n)===Of(t.container(),n),Bf=(e,t)=>{if(!t)return K.none();const n=t.container(),i=t.offset();return Df(n)?K.from(n.childNodes[i+e]):K.none()},Ff=(e,t)=>{var n;const i=(null!==(n=t.ownerDocument)&&void 0!==n?n:document).createRange();return e?(i.setStartBefore(t),i.setEndBefore(t)):(i.setStartAfter(t),i.setEndAfter(t)),i},Hf=(e,t,n)=>Of(t,e)===Of(n,e),$f=(e,t,n)=>{const i=e?"previousSibling":"nextSibling";let o=n;for(;o&&o!==t;){let e=o[i];if(e&&Sf(e)&&(e=e[i]),Cf(e)||kf(e)){if(Hf(t,e,o))return e;break}if(Af(e))break;o=o.parentNode}return null},zf=e(Ff,!0),jf=e(Ff,!1),qf=(t,n,i)=>{let o;const r=e($f,!0,n),s=e($f,!1,n),a=i.startContainer,l=i.startOffset;if(ws(a)){const e=Tf(a)?a.parentNode:a,t=e.getAttribute("data-mce-caret");if("before"===t&&(o=e.nextSibling,_f(o)))return zf(o);if("after"===t&&(o=e.previousSibling,_f(o)))return jf(o)}if(!i.collapsed)return i;if(Sr(a)){if(Sf(a)){if(1===t){if(o=s(a),o)return zf(o);if(o=r(a),o)return jf(o)}if(-1===t){if(o=r(a),o)return jf(o);if(o=s(a),o)return zf(o)}return i}if(Ms(a)&&l>=a.data.length-1)return 1===t&&(o=s(a),o)?zf(o):i;if(As(a)&&l<=1)return-1===t&&(o=r(a),o)?jf(o):i;if(l===a.data.length)return o=s(a),o?zf(o):i;if(0===l)return o=r(a),o?jf(o):i}return i},Uf=(e,t)=>Bf(e?0:-1,t).filter(Cf),Wf=(e,t,n)=>{const i=qf(e,t,n);return-1===e?Zd.fromRangeStart(i):Zd.fromRangeEnd(i)},Vf=e=>K.from(e.getNode()).map(yi.fromDom),Yf=e=>K.from(e.getNode(!0)).map(yi.fromDom),Gf=(e,t)=>{let n=t;for(;n=e(n);)if(n.isVisible())return n;return n},Kf=(e,t)=>{const n=Lf(e,t);return!(n||!Rr(e.getNode()))||n};var Xf;!function(e){e[e.Backwards=-1]="Backwards",e[e.Forwards=1]="Forwards"}(Xf||(Xf={}));const Qf=Pr,Zf=Sr,Jf=hr,em=Rr,tm=js,nm=Ys,im=Gs,om=(e,t)=>{const n=[];let i=e
28;for(;i&&i!==t;)n.push(i),i=i.parentNode;return n},rm=(e,t)=>e.hasChildNodes()&&t<e.childNodes.length?e.childNodes[t]:null,sm=(e,t)=>{if(Mf(e)){if(tm(t.previousSibling)&&!Zf(t.previousSibling))return Zd.before(t);if(Zf(t))return Zd(t,0)}if(Rf(e)){if(tm(t.nextSibling)&&!Zf(t.nextSibling))return Zd.after(t);if(Zf(t))return Zd(t,t.data.length)}return Rf(e)?em(t)?Zd.before(t):Zd.after(t):Zd.before(t)},am=(e,t)=>{const n=t.nextSibling;return n&&tm(n)?Zf(n)?Zd(n,0):Zd.before(n):lm(Xf.Forwards,Zd.after(t),e)},lm=(e,t,n)=>{let i,o,r,s;if(!Jf(n)||!t)return null;if(t.isEqual(Zd.after(n))&&n.lastChild){if(s=Zd.after(n.lastChild),Rf(e)&&tm(n.lastChild)&&Jf(n.lastChild))return em(n.lastChild)?Zd.before(n.lastChild):s}else s=t;const a=s.container();let l=s.offset();if(Zf(a)){if(Rf(e)&&l>0)return Zd(a,--l);if(Mf(e)&&l<a.length)return Zd(a,++l);i=a}else{if(Rf(e)&&l>0&&(o=rm(a,l-1),tm(o)))return!nm(o)&&(r=If(o,e,im,o),r)?Zf(r)?Zd(r,r.data.length):Zd.after(r):Zf(o)?Zd(o,o.data.length):Zd.before(o);if(Mf(e)&&l<a.childNodes.length&&(o=rm(a,l),tm(o)))return em(o)?am(n,o):!nm(o)&&(r=If(o,e,im,o),r)?Zf(r)?Zd(r,0):Zd.before(r):Zf(o)?Zd(o,0):Zd.after(o);i=o||s.getNode()}if(i&&(Mf(e)&&s.isAtEnd()||Rf(e)&&s.isAtStart())&&(i=If(i,e,G,n,!0),im(i,n)))return sm(e,i);o=i?If(i,e,im,n):i;const c=Qe(ae(om(a,n),Qf));return!c||o&&c.contains(o)?o?sm(e,o):null:(s=Mf(e)?Zd.after(c):Zd.before(c),s)},cm=e=>({next:t=>lm(Xf.Forwards,t,e),prev:t=>lm(Xf.Backwards,t,e)}),dm=(e,t,n)=>{const i=e?Zd.before(n):Zd.after(n);return vm(e,t,i)},um=e=>Rr(e)?Zd.before(e):Zd.after(e),hm=e=>Zd.isTextPosition(e)?0===e.offset():js(e.getNode()),pm=e=>{if(Zd.isTextPosition(e)){const t=e.container();return e.offset()===t.data.length}return js(e.getNode(!0))},fm=(e,t)=>!Zd.isTextPosition(e)&&!Zd.isTextPosition(t)&&e.getNode()===t.getNode(!0),mm=e=>!Zd.isTextPosition(e)&&Rr(e.getNode()),gm=(e,t,n)=>e?!fm(t,n)&&!mm(t)&&pm(t)&&hm(n):!fm(n,t)&&hm(t)&&pm(n),vm=(e,t,n)=>{const i=cm(t);return K.from(e?i.next(n):i.prev(n))},ym=(e,t,n)=>vm(e,t,n).bind(i=>Lf(n,i,t)&&gm(e,n,i)?vm(e,t,i):K.some(i)),bm=(e,t,n,i)=>ym(e,t,n).bind(n=>i(n)?bm(e,t,n,i):K.some(n)),_m=(e,t)=>{const n=e?t.firstChild:t.lastChild;return Sr(n)?K.some(Zd(n,e?0:n.data.length)):n?js(n)?K.some(e?Zd.before(n):um(n)):dm(e,t,n):K.none()},wm=e(vm,!0),Cm=e(vm,!1),km=e(_m,!0),xm=e(_m,!1),Sm="_mce_caret",Em=e=>hr(e)&&e.id===Sm,Dm=(e,t)=>{let n=t;for(;n&&n!==e;){if(Em(n))return n;n=n.parentNode}return null},Tm=e=>S(e.start),Am=e=>Fe(e,"rng"),Mm=e=>Fe(e,"id"),Rm=e=>Fe(e,"name"),Nm=e=>gn.isArray(e.start),Im=e=>!(!Rm(e)&&M(e.forward))||e.forward,Pm=(e,t)=>(hr(t)&&e.isBlock(t)&&!t.innerHTML&&(t.innerHTML='<br data-mce-bogus="1" />'),t),Om=(e,t)=>{const n=K.from(gu(e.getRoot(),t.start)),i=K.from(gu(e.getRoot(),t.end));return _n(n,i,(n,i)=>{const o=e.createRng();return o.setStart(n.container(),n.offset()),o.setEnd(i.container(),i.offset()),{range:o,forward:Im(t)}})},Lm=(e,t)=>{var n;const i=(null!==(n=e.ownerDocument)&&void 0!==n?n:document).createTextNode(ms);e.appendChild(i),t.setStart(i,0),t.setEnd(i,0)},Bm=e=>!e.hasChildNodes(),Fm=(e,t)=>xm(e).fold(Y,e=>(t.setStart(e.container(),e.offset()),t.setEnd(e.container(),e.offset()),!0)),Hm=(e,t,n)=>!(!Bm(t)||!Dm(e,t))&&(Lm(t,n),!0),$m=(e,t,n,i)=>{const o=n[t?"start":"end"],r=e.getRoot();if(o){let e=r,n=o[0];for(let t=o.length-1;e&&t>=1;t--){const n=e.childNodes;if(Hm(r,e,i))return!0;if(o[t]>n.length-1)return!!Hm(r,e,i)||Fm(e,i);e=n[o[t]]}Sr(e)&&(n=Math.min(o[0],e.data.length)),hr(e)&&(n=Math.min(o[0],e.childNodes.length)),t?i.setStart(e,n):i.setEnd(e,n)}return!0},zm=e=>Sr(e)&&e.data.length>0,jm=(e,t,n)=>{const i=e.get(n.id+"_"+t),o=null==i?void 0:i.parentNode,r=n.keep;if(i&&o){let s,a;if("start"===t?r?i.hasChildNodes()?(s=i.firstChild,a=1):zm(i.nextSibling)?(s=i.nextSibling,a=0):zm(i.previousSibling)?(s=i.previousSibling,a=i.previousSibling.data.length):(s=o,a=e.nodeIndex(i)+1):(s=o,a=e.nodeIndex(i)):r?i.hasChildNodes()?(s=i.firstChild,a=1):zm(i.previousSibling)?(s=i.previousSibling,a=i.previousSibling.data.length):(s=o,a=e.nodeIndex(i)):(s=o,a=e.nodeIndex(i)),!r){const o=i.previousSibling,r=i.nextSibling;let l;for(gn.each(gn.grep(i.childNodes),e=>{Sr(e)&&(e.data=e.data.replace(/\uFEFF/g,""))});l=e.get(n.id+"_"+t);)e.remove(l,!0);if(Sr(r)&&Sr(o)&&!an.browser.isOpera()){const t=o.data.length;o.appendData(r.data),e.remove(r),s=o,a=t}}return K.some(Zd(s,a))}return K.none()},qm=(e,t)=>{const n=e.createRng();return $m(e,!0,t,n)&&$m(e,!1,t,n)?K.some({range:n,forward:Im(t)}):K.none()},Um=(e,t)=>{const n=jm(e,"start",t),i=jm(e,"end",t);return _n(n,i.or(n),(n,i)=>{const o=e.createRng();return o.setStart(Pm(e,n.container()),n.offset()),o.setEnd(Pm(e,i.container()),i.offset()),{range:o,forward:Im(t)}})},Wm=(e,t)=>K.from(e.select(t.name)[t.index]).map(t=>{const n=e.createRng();return n.selectNode(t),{range:n,forward:!0}}),Vm=(e,t)=>{const n=e.dom;if(t){if(Nm(t))return qm(n,t);if(Tm(t))return Om(n,t);if(Mm(t))return Um(n,t);if(Rm(t))return Wm(n,t);if(Am(t))return K.some({range:t.rng,forward:Im(t)})}return K.none()},Ym=(e,t,n)=>Ru(e,t,n),Gm=(e,t)=>{Vm(e,t).each(({range:t,forward:n})=>{e.setRng(t,n)})},Km=e=>hr(e)&&"SPAN"===e.tagName&&"bookmark"===e.getAttribute("data-mce-type"),Xm=(e=>t=>e===t)(jr),Qm=e=>""!==e&&-1!==" \f\n\r\t\v".indexOf(e),Zm=e=>!Qm(e)&&!Xm(e)&&!qr(e),Jm=e=>{const t=[];if(e)for(let n=0;n<e.rangeCount;n++)t.push(e.getRangeAt(n));return t},eg=e=>fe(e,e=>{const t=Sd(e);return t?[yi.fromDom(t)]:[]}),tg=e=>Jm(e).length>1,ng=e=>ae(eg(e),ls),ig=e=>ar(e,"td[data-mce-selected],th[data-mce-selected]"),og=(e,t)=>{const n=ig(t);return n.length>0?n:ng(e)},rg=e=>og(Jm(e.selection.getSel()),yi.fromDom(e.getBody())),sg=(e,t)=>lo(e,"table",t),ag=e=>{const t=e.startContainer,n=e.startOffset;return Sr(t)?0===n?K.some(yi.fromDom(t)):K.none():K.from(t.childNodes[n]).map(yi.fromDom)},lg=e=>{const t=e.endContainer,n=e.endOffset;return Sr(t)?n===t.data.length?K.some(yi.fromDom(t)):K.none():K.from(t.childNodes[n-1]).map(yi.fromDom)},cg=e=>$i(e).fold($([e]),t=>[e].concat(cg(t))),dg=e=>zi(e).fold($([e]),t=>"br"===Ln(t)?Pi(t).map(t=>[e].concat(dg(t))).getOr([]):[e].concat(dg(t))),ug=(t,n)=>_n(ag(n),lg(n),(n,i)=>{const o=ue(cg(t),e(xi,n)),r=ue(dg(t),e(xi,i));return o.isSome()&&r.isSome()}).getOr(!1),hg=(e,t,n,i)=>{const o=n,r=new cr(n,o),s=Pe(e.schema.getMoveCaretBeforeOnEnterElements(),(e,t)=>!te(["td","th","table"],t.toLowerCase()));let a=n;do{if(Sr(a)&&0!==gn.trim(a.data).length)return void(i?t.setStart(a,0):t.setEnd(a,a.data.length));if(s[a.nodeName])return void(i?t.setStartBefore(a):"BR"===a.nodeName?t.setEndBefore(a):t.setEndAfter(a))}while(a=i?r.next():r.prev());"BODY"===o.nodeName&&(i?t.setStart(o,0):t.setEnd(o,o.childNodes.length))},pg=e=>{const t=e.selection.getSel();return I(t)&&t.rangeCount>0},fg=(e,t)=>{const n=rg(e);n.length>0?oe(n,n=>{const i=n.dom,o=e.dom.createRng();o.setStartBefore(i),o.setEndAfter(i),t(o,!0)}):t(e.selection.getRng(),!1)},mg=(e,t,n)=>{const i=Mu(e,t);n(i),e.moveToBookmark(i)},gg=e=>O(null==e?void 0:e.nodeType),vg=e=>hr(e)&&!Km(e)&&!Em(e)&&!_r(e),yg=(e,t)=>{if(vg(t)&&!/^(TD|TH)$/.test(t.nodeName)){const n=e.getAttrib(t,"data-mce-selected"),i=parseInt(n,10);return!isNaN(i)&&i>0}return!1},bg=(e,t,n)=>{const{selection:i,dom:o}=e,r=i.getNode(),s=Pr(r);mg(i,!0,()=>{t()});s&&Pr(r)&&o.isChildOf(r,e.getBody())?e.selection.select(r):n(i.getStart())&&_g(o,i)},_g=(e,t)=>{var n,i;const o=t.getRng(),{startContainer:r,startOffset:s}=o,a=t.getNode();if(!yg(e,a)&&hr(r)){const a=r.childNodes,l=e.getRoot();let c;if(s<a.length){const t=a[s];c=new cr(t,null!==(n=e.getParent(t,e.isBlock))&&void 0!==n?n:l)}else{const t=a[a.length-1];c=new cr(t,null!==(i=e.getParent(t,e.isBlock))&&void 0!==i?i:l),c.next(!0)}for(let n=c.current();n;n=c.next()){if("false"===e.getContentEditable(n))return;if(Sr(n)&&!xg(n))return o.setStart(n,0),void t.setRng(o)}}},wg=(e,t,n)=>{if(e){const i=t?"nextSibling":"previousSibling";for(e=n?e:e[i];e;e=e[i])if(hr(e)||!xg(e))return e}},Cg=(e,t)=>!!e.getTextBlockElements()[t.nodeName.toLowerCase()]||Na(e,t),kg=(e,t,n)=>e.schema.isValidChild(t,n),xg=(e,t=!1)=>{if(I(e)&&Sr(e)){const n=t?e.data.replace(/ /g,"\xa0"):e.data;return Xs(n)}return!1},Sg=e=>I(e)&&Sr(e)&&0===e.length,Eg=(e,t)=>{const n="[data-mce-cef-wrappable]",i=Xh(e),o=wt(i)?n:`${n},${i}`;return _i(yi.fromDom(t),o)},Dg=(e,t)=>{const n=e.dom;return vg(t)&&"false"===n.getContentEditable(t)&&Eg(e,t)&&0===n.select('[contenteditable="true"]',t).length},Tg=(e,t)=>P(e)?e(t):(I(t)&&(e=e.replace(/%(\w+)/g,(e,n)=>t[n]||e)),e),Ag=(e,t)=>(t=t||"",e=""+((e=e||"").nodeName||e),t=""+(t.nodeName||t),e.toLowerCase()===t.toLowerCase()),Mg=(e,t)=>{if(N(e))return null;{let n=String(e);return"color"!==t&&"backgroundColor"!==t||(n=Ul(n)),"fontWeight"===t&&700===e&&(n="bold"),"fontFamily"===t&&(n=n.replace(/[\'\"]/g,"").replace(/,\s+/g,",")),n}},Rg=(e,t,n)=>{const i=e.getStyle(t,n);return Mg(i,n)},Ng=(e,t)=>{let n;return e.getParent(t,t=>!!hr(t)&&(n=e.getStyle(t,"text-decoration"),!!n&&"none"!==n)),n},Ig=(e,t,n)=>e.getParents(t,n,e.getRoot()),Pg=(e,t,n)=>{const i=e.formatter.get(t);return I(i)&&ne(i,n)},Og=(e,t)=>{const n=e=>{const t=e=>P(e)||e.length>1&&"%"===e.charAt(0);return ne(["styles","attributes"],n=>Be(e,n).exists(e=>{const n=T(e)?e:Le(e);return ne(n,t)}))};return Pg(e,t,n)},Lg=(e,t,n)=>{const i=["inline","block","selector","attributes","styles","classes"],o=e=>Pe(e,(e,t)=>ne(i,e=>e===t));return Pg(e,t,t=>{const i=o(t);return Pg(e,n,e=>{const t=o(e);return $e(i,t)})})},Bg=e=>He(e,"block"),Fg=e=>Bg(e)&&!0===e.wrapper,Hg=e=>Bg(e)&&!0!==e.wrapper,$g=e=>He(e,"selector"),zg=e=>He(e,"inline"),jg=e=>$g(e)&&zg(e)&&vn(Be(e,"mixed"),!0),qg=e=>$g(e)&&!1!==e.expand&&!zg(e),Ug=e=>{const t=[];let n=e;for(;n;){if(Sr(n)&&n.data!==ms||n.childNodes.length>1)return[];hr(n)&&t.push(n),n=n.firstChild}return t},Wg=e=>Ug(e).length>0,Vg=e=>Em(e.dom)&&Wg(e.dom),Yg=Km,Gg=Ig,Kg=xg,Xg=Cg,Qg=e=>Rr(e)&&e.getAttribute("data-mce-bogus")&&!e.nextSibling,Zg=(e,t)=>{let n=t;for(;n;){if(hr(n)&&e.getContentEditable(n))return"false"===e.getContentEditable(n)?n:t;n=n.parentNode}return t},Jg=(e,t,n,i)=>{const o=t.data;if(e){for(let e=n;e>0;e--)if(i(o.charAt(e-1)))return e}else for(let e=n;e<o.length;e++)if(i(o.charAt(e)))return e;return-1},ev=(e,t,n)=>Jg(e,t,n,e=>Xm(e)||Qm(e)),tv=(e,t,n)=>Jg(e,t,n,Zm),nv=(e,t,n,i,o,r)=>{let s;const a=e.getParent(n,e.isBlock)||t,l=(t,n,i)=>{const r=hd(e),l=o?r.backwards:r.forwards;return K.from(l(t,n,(e,t)=>Yg(e.parentNode)?-1:(s=e,i(o,e,t)),a))};return l(n,i,ev).bind(e=>r?l(e.container,e.offset+(o?-1:0),tv):K.some(e)).orThunk(()=>s?K.some({container:s,offset:o?0:s.length}):K.none())},iv=(e,t,n,i,o)=>{const r=i[o];Sr(i)&&wt(i.data)&&r&&(i=r);const s=Gg(e,i);for(let i=0;i<s.length;i++)for(let o=0;o<t.length;o++){const r=t[o];if((!I(r.collapsed)||r.collapsed===n.collapsed)&&($g(r)&&e.is(s[i],r.selector)))return s[i]}return i},ov=(e,t,n,i)=>{var o;let r=n;const s=e.getRoot(),a=t[0];if(Bg(a)&&(r=a.wrapper?null:e.getParent(n,a.block,s)),!r){const t=null!==(o=e.getParent(n,"LI,TD,TH,SUMMARY"))&&void 0!==o?o:s;r=e.getParent(Sr(n)?n.parentNode:n,t=>t!==s&&Xg(e.schema,t),t)}if(r&&Bg(a)&&a.wrapper&&(r=Gg(e,r,"ul,ol").reverse()[0]||r),!r)for(r=n;r&&r[i]&&!e.isBlock(r[i])&&(r=r[i],!Ag(r,"br")););return r||n},rv=(e,t,n,i)=>{const o=n.parentNode;return!I(n[i])&&(!(o!==t&&!N(o)&&!e.isBlock(o))||rv(e,t,o,i))},sv=(e,t,n,i,o)=>{let r=n;const s=o?"previousSibling":"nextSibling",a=e.getRoot();if(Sr(n)&&!Kg(n)&&(o?i>0:i<n.data.length))return n;for(;r;){if(!t[0].block_expand&&e.isBlock(r))return r;for(let t=r[s];t;t=t[s]){const n=Sr(t)&&!rv(e,a,t,s);if(!Yg(t)&&!Qg(t)&&!Kg(t,n))return r}if(r===a||r.parentNode===a){n=r;break}r=r.parentNode}return n},av=e=>Yg(e.parentNode)||Yg(e),lv=(e,t,n,i=!1)=>{let{startContainer:o,startOffset:r,endContainer:s,endOffset:a}=t;const l=n[0];if(hr(o)&&o.hasChildNodes()&&(o=Ed(o,r),Sr(o)&&(r=0)),hr(s)&&s.hasChildNodes()&&(s=Ed(s,t.collapsed?a:a-1),Sr(s)&&(a=s.data.length)),o=Zg(e,o),s=Zg(e,s),av(o)&&(o=Yg(o)?o:o.parentNode,o=t.collapsed?o.previousSibling||o:o.nextSibling||o,Sr(o)&&
28(r=t.collapsed?o.length:0)),av(s)&&(s=Yg(s)?s:s.parentNode,s=t.collapsed?s.nextSibling||s:s.previousSibling||s,Sr(s)&&(a=t.collapsed?0:s.length)),t.collapsed){nv(e,e.getRoot(),o,r,!0,i).each(({container:e,offset:t})=>{o=e,r=t});nv(e,e.getRoot(),s,a,!1,i).each(({container:e,offset:t})=>{s=e,a=t})}return(zg(l)||l.block_expand)&&(zg(l)&&Sr(o)&&0!==r||(o=sv(e,n,o,r,!0)),zg(l)&&Sr(s)&&a!==s.data.length||(s=sv(e,n,s,a,!1))),qg(l)&&(o=iv(e,n,t,o,"previousSibling"),s=iv(e,n,t,s,"nextSibling")),(Bg(l)||$g(l))&&(o=ov(e,n,o,"previousSibling"),s=ov(e,n,s,"nextSibling"),Bg(l)&&(e.isBlock(o)||(o=sv(e,n,o,r,!0)),e.isBlock(s)||(s=sv(e,n,s,a,!1)))),hr(o)&&o.parentNode&&(r=e.nodeIndex(o),o=o.parentNode),hr(s)&&s.parentNode&&(a=e.nodeIndex(s)+1,s=s.parentNode),{startContainer:o,startOffset:r,endContainer:s,endOffset:a}},cv=(e,t,n)=>{var i;const o=t.startOffset,r=Ed(t.startContainer,o),s=t.endOffset,a=Ed(t.endContainer,s-1),l=e=>{const t=e[0];Sr(t)&&t===r&&o>=t.data.length&&e.splice(0,1);const n=e[e.length-1];return 0===s&&e.length>0&&n===a&&Sr(n)&&e.splice(e.length-1,1),e},c=(e,t,n)=>{const i=[];for(;e&&e!==n;e=e[t])i.push(e);return i},d=(t,n)=>e.getParent(t,e=>e.parentNode===n,n),u=(e,t,i)=>{const o=i?"nextSibling":"previousSibling";for(let r=e,s=r.parentNode;r&&r!==t;r=s){s=r.parentNode;const t=c(r===e?r:r[o],o);t.length&&(i||t.reverse(),n(l(t)))}};if(r===a)return n(l([r]));const h=null!==(i=e.findCommonAncestor(r,a))&&void 0!==i?i:e.getRoot();if(e.isChildOf(r,a))return u(r,h,!0);if(e.isChildOf(a,r))return u(a,h);const p=d(r,h)||r,f=d(a,h)||a;u(r,p,!0);const m=c(p===r?p:p.nextSibling,"nextSibling",f===a?f.nextSibling:f);m.length&&n(l(m)),u(a,f)},dv=['pre[class*=language-][contenteditable="false"]',"figure.image","div[data-ephox-embed-iri]","div.tiny-pageembed","div.mce-toc","div[data-mce-toc]"],uv=e=>jn(e)&&Yr(e)===ms,hv=(e,t,n,i)=>Mi(t).fold(()=>"skipping",o=>"br"===i||uv(t)?"valid":Kc(t)?"existing":Em(t.dom)?"caret":ne(dv,e=>_i(t,e))?"valid-block":kg(e,n,i)&&kg(e,Ln(o),n)?"valid":"invalid-child"),pv=(e,t)=>{const n=lv(e.dom,t,[{inline:"span"}]);t.setStart(n.startContainer,n.startOffset),t.setEnd(n.endContainer,n.endOffset),e.selection.setRng(t)},fv=(e,t,n,i,o,r)=>{const{uid:s=t,...a}=n;ci(e,zc()),Yn(e,`${qc()}`,s),Yn(e,`${jc()}`,i);const{attributes:l={},classes:c=[]}=o(s,a);if(Gn(e,l),od(e,c),r){c.length>0&&Yn(e,`${Wc()}`,c.join(","));const t=Ee(l);t.length>0&&Yn(e,`${Vc()}`,t.join(","))}},mv=e=>{ui(e,zc()),Zn(e,`${qc()}`),Zn(e,`${jc()}`),Zn(e,`${Uc()}`);const t=Xn(e,`${Vc()}`).map(e=>e.split(",")).getOr([]),n=Xn(e,`${Wc()}`).map(e=>e.split(",")).getOr([]);oe(t,t=>Zn(e,t)),rd(e,n),Zn(e,`${Wc()}`),Zn(e,`${Vc()}`)},gv=(e,t,n,i,o)=>{const r=yi.fromTag("span",e);return fv(r,t,n,i,o,!1),r},vv=(e,t,n,i,o,r)=>{const s=[],a=gv(e.getDoc(),n,r,i,o),l=Fc(),c=()=>{l.clear()},d=()=>l.get().getOrThunk(()=>{const e=ad(a);return s.push(e),l.set(e),e}),u=e=>{oe(e,h)},h=t=>{switch(hv(e,t,"span",Ln(t))){case"invalid-child":{c();const e=Fi(t);u(e),c();break}case"valid-block":c(),fv(t,n,r,i,o,!0);break;case"valid":{const e=d();Mo(t,e);break}}},p=e=>{const t=ie(e,yi.fromDom);u(t)};return cv(e.dom,t,e=>{c(),p(e)}),s},yv=(e,t,n,i)=>{e.undoManager.transact(()=>{const o=e.selection,r=o.getRng(),s=rg(e).length>0,a=id("mce-annotation");if(r.collapsed&&!s&&pv(e,r),o.getRng().collapsed&&!s){const r=gv(e.getDoc(),a,i,t,n.decorate);Ho(r,jr),o.getRng().insertNode(r.dom),o.select(r.dom)}else mg(o,!1,()=>{fg(e,o=>{vv(e,o,a,t,n.decorate,i)})})})},bv=e=>{const t=td();ed(e,t);const n=Jc(e,t),i=Wn("span"),o=e=>{oe(e,e=>
vendor: 5,766 bytes, line 28
28{i(e)?Oo(e):mv(e)})};return{register:(e,n)=>{t.register(e,n)},annotate:(n,i)=>{t.lookup(n).each(t=>{yv(e,n,t,i)})},annotationChanged:(e,t)=>{n.addListener(e,t)},remove:t=>{Gc(e,K.some(t)).each(({elements:t})=>{const n=e.selection.getBookmark();o(t),e.selection.moveToBookmark(n)})},removeAll:t=>{const n=e.selection.getBookmark();Te(Zc(e,t),e=>{o(e)}),e.selection.moveToBookmark(n)},getAll:t=>{const n=Zc(e,t);return Ae(n,e=>ie(e,e=>e.dom))}}},_v=t=>({getBookmark:e(Ym,t),moveToBookmark:e(Gm,t)});_v.isBookmarkNode=Km;const wv=(e,t,n)=>!n.collapsed&&ne(n.getClientRects(),n=>_d(n,e,t)),Cv=(e,t)=>e.dispatch("PreProcess",t),kv=(e,t)=>e.dispatch("PostProcess",t),xv=e=>{e.dispatch("remove")},Sv=e=>{e.dispatch("detach")},Ev=(e,t)=>{e.dispatch("SwitchMode",{mode:t})},Dv=(e,t,n,i,o)=>{e.dispatch("ObjectResizeStart",{target:t,width:n,height:i,origin:o})},Tv=(e,t,n,i,o)=>{e.dispatch("ObjectResized",{target:t,width:n,height:i,origin:o})},Av=e=>{e.dispatch("PreInit")},Mv=e=>{e.dispatch("PostRender")},Rv=e=>{e.dispatch("Init")},Nv=(e,t)=>{e.dispatch("PlaceholderToggle",{state:t})},Iv=(e,t,n)=>{e.dispatch(t,n)},Pv=(e,t,n,i)=>{e.dispatch("FormatApply",{format:t,node:n,vars:i})},Ov=(e,t,n,i)=>{e.dispatch("FormatRemove",{format:t,node:n,vars:i})},Lv=(e,t)=>e.dispatch("BeforeSetContent",t),Bv=(e,t)=>e.dispatch("SetContent",t),Fv=(e,t)=>e.dispatch("BeforeGetContent",t),Hv=(e,t)=>e.dispatch("GetContent",t),$v=(e,t)=>{e.dispatch("AutocompleterStart",t)},zv=(e,t)=>{e.dispatch("AutocompleterUpdate",t)},jv=e=>{e.dispatch("AutocompleterEnd")},qv=(e,t,n)=>e.dispatch("PastePreProcess",{content:t,internal:n}),Uv=(e,t,n)=>e.dispatch("PastePostProcess",{node:t,internal:n}),Wv=(e,t)=>e.dispatch("PastePlainTextToggle",{state:t}),Vv=(e,t)=>e.dispatch("EditableRootStateChange",{state:t}),Yv={BACKSPACE:8,DELETE:46,DOWN:40,ENTER:13,ESC:27,LEFT:37,RIGHT:39,SPACEBAR:32,TAB:9,UP:38,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,modifierPressed:e=>e.shiftKey||e.ctrlKey||e.altKey||Yv.metaKeyPressed(e),metaKeyPressed:e=>an.os.isMacOS()||an.os.isiOS()?e.metaKey:e.ctrlKey&&!e.altKey},Gv="data-mce-selected",Kv="table,img,figure.image,hr,video,span.mce-preview-object,details",Xv=Math.abs,Qv=Math.round,Zv={nw:[0,0,-1,-1],ne:[1,0,1,-1],se:[1,1,1,1],sw:[0,1,-1,1]},Jv=e=>"longpress"===e.type||0===e.type.indexOf("touch"),ey=(e,t)=>{const n=t.dom,i=t.getDoc(),o=document,r=t.getBody();let s,a,l,c,d,u,h,p,f,m,g,v,y,b,_,w,C;const k=e=>I(e)&&(Nr(e)||n.is(e,"figure.image")),x=e=>Br(e)||n.hasClass(e,"mce-preview-object"),S=(e,t)=>{if(Jv(e)){const n=e.touches[0];return k(e.target)&&!wv(n.clientX,n.clientY,t)}return k(e.target)&&!wv(e.clientX,e.clientY,t)},E=e=>{const n=e.target;S(e,t.selection.getRng())&&!e.isDefaultPrevented()&&t.selection.select(n)},D=e=>n.hasClass(e,"mce-preview-object")&&I(e.firstElementChild)?[e,e.firstElementChild]:n.is(e,"figure.image")?[e.querySelector("img")]:[e],T=e=>{const i=Bh(t);return!!i&&("false"!==e.getAttribute("data-mce-resize")&&(e!==t.getBody()&&(n.hasClass(e,"mce-preview-object")&&I(e.firstElementChild)?_i(yi.fromDom(e.firstElementChild),i):_i(yi.fromDom(e),i))))},A=e=>x(e)?n.create("img",{src:an.transparentSrc}):e.cloneNode(!0),M=(e,i,o)=>{if(I(o)){const r=D(e);oe(r,e=>{e.style[i]||!t.schema.isValid(e.nodeName.toLowerCase(),i)?n.setStyle(e,i,o):n.setAttrib(e,i,""+o)})}},R=(e,t,n)=>{M(e,"width",t),M(e,"height",n)},N=e=>{let i,o,d,S,E;i=e.screenX-u,o=e.screenY-h,b=i*c[2]+m,_=o*c[3]+g,b=b<5?5:b,_=_<5?5:_,d=(k(s)||x(s))&&!1!==Fh(t)?!Yv.modifierPressed(e):Yv.modifierPressed(e),d&&(Xv(i)>Xv(o)?(_=Qv(b*v),b=Qv(_/v)):(b=Qv(_/v),_=Qv(b*v))),R(a,b,_),S=c.startPos.x+i,E=c.startPos.y+o,S=S>0?S:0,E=E>0?E:0,n.setStyles(l,{left:S,top:E,display:"block"}),l.innerHTML=b+" &times; "+_,c[2]<0&&a.clientWidth<=b&&n.setStyle(a,"left",p+(m-b)),c[3]<0&&a.clientHeight<=_&&n.setStyle(a,"top",f+(g-_)),i=r.scrollWidth-w,o=r.scrollHeight-C,i+o!==0&&n.setStyles(l,{left:S-i,top:E-o}),y||(Dv(t,s,m,g,"corner-"+c.name),y=!0)},P=()=>{const e=y;y=!1,e&&(M(s,"width",b),M(s,"height",_)),n.unbind(i,"mousemove",N),n.unbind(i,"mouseup",P),o!==i&&(n.unbind(o,"mousemove",N),n.unbind(o,"mouseup",P)),n.remove(a),n.remove(l),n.remove(d),O(s),e&&(Tv(t,s,b,_,"corner-"+c.name),n.setAttrib(s,"style",n.getAttrib(s,"style"))),t.nodeChanged()},O=e=>{$();const p=n.getPos(e,r),f=p.x,y=p.y,k=e.getBoundingClientRect(),x=k.width||k.right-k.left,S=k.height||k.bottom-k.top;s!==e&&(B(),s=e,b=_=0);const E=t.dispatch("ObjectSelected",{target:e});T(e)&&!E.isDefaultPrevented()?Te(Zv,(e,t)=>{const p=p=>{const b=D(s)[0];u=p.screenX,h=p.screenY,m=b.clientWidth,g=b.clientHeight,v=g/m,c=e,c.name=t,c.startPos={x:x*e[0]+f,y:S*e[1]+y},w=r.scrollWidth,C=r.scrollHeight,d=n.add(r,"div",{class:"mce-resize-backdrop","data-mce-bogus":"all"}),n.setStyles(d,{position:"fixed",left:"0",top:"0",width:"100%",height:"100%"}),a=A(s),n.addClass(a,"mce-clonedresizable"),n.setAttrib(a,"data-mce-bogus","all"),a.contentEditable="false",n.setStyles(a,{left:f,top:y,margin:0}),R(a,x,S),a.removeAttribute(Gv),r.appendChild(a),n.bind(i,"mousemove",N),n.bind(i,"mouseup",P),o!==i&&(n.bind(o,"mousemove",N),n.bind(o,"mouseup",P)),l=n.add(r,"div",{class:"mce-resize-helper","data-mce-bogus":"all"},m+" &times; "+g)};let b=n.get("mceResizeHandle"+t);b&&n.remove(b),b=n.add(r,"div",{id:"mceResizeHandle"+t,"data-mce-bogus":"all",class:"mce-resizehandle",unselectable:!0,style:"cursor:"+t+"-resize; margin:0; padding:0"}),n.bind(b,"mousedown",e=>{e.stopImmediatePropagation(),e.preventDefault(),p(e)}),e.elm=b,n.setStyles(b,{left:x*e[0]+f-b.offsetWidth/2,top:S*e[1]+y-b.offsetHeight/2})}):B(!1)},L=Hc(O,0),B=(e=!0)=>{L.cancel(),$(),s&&e&&s.removeAttribute(Gv),Te(Zv,(e,t)=>{const i=n.get("mceResizeHandle"+t);i&&(n.unbind(i),n.remove(i))})},F=(e,t)=>n.isChildOf(e,t),H=i=>{if(y||t.removed||t.composing)return;
28const o="mousedown"===i.type?i.target:e.getNode(),s=uo(yi.fromDom(o),Kv).map(e=>e.dom).filter(e=>n.isEditable(e.parentElement)||"IMG"===e.nodeName&&n.isEditable(e)).getOrUndefined(),a=I(s)?n.getAttrib(s,Gv,"1"):"1";if(oe(n.select(`img[${Gv}],hr[${Gv}]`),e=>{e.removeAttribute(Gv)}),I(s)&&F(s,r)&&t.hasFocus()){z();const t=e.getStart(!0);if(F(t,s)&&F(e.getEnd(!0),s))return n.setAttrib(s,Gv,a),void L.throttle(s)}B()},$=()=>{Te(Zv,e=>{e.elm&&(n.unbind(e.elm),delete e.elm)})},z=()=>{try{t.getDoc().execCommand("enableObjectResizing",!1,"false")}catch(e){}};t.on("init",()=>{z(),t.on("NodeChange ResizeEditor ResizeWindow ResizeContent drop",H),t.on("keyup compositionend",e=>{s&&"TABLE"===s.nodeName&&H(e)}),t.on("hide blur",B),t.on("contextmenu longpress",E,!0)}),t.on("remove",$);return{isResizable:T,showResizeRect:O,hideResizeRect:B,updateResizeRect:H,destroy:()=>{L.cancel(),s=a=d=null}}},ty=(e,t)=>{t.fold(t=>{e.setStartBefore(t.dom)},(t,n)=>{e.setStart(t.dom,n)},t=>{e.setStartAfter(t.dom)})},ny=(e,t)=>{t.fold(t=>{e.setEndBefore(t.dom)},(t,n)=>{e.setEnd(t.dom,n)},t=>{e.setEndAfter(t.dom)})},iy=(e,t,n)=>{const i=e.document.createRange();return ty(i,t),ny(i,n),i},oy=(e,t,n,i,o)=>{const r=e.document.createRange();return r.setStart(t.dom,n),r.setEnd(i.dom,o),r},ry=Fu.generate([{ltr:["start","soffset","finish","foffset"]},{rtl:["start","soffset","finish","foffset"]}]),sy=(e,t,n)=>t(yi.fromDom(n.startContainer),n.startOffset,yi.fromDom(n.endContainer),n.endOffset),ay=(e,t)=>t.match({domRange:e=>({ltr:$(e),rtl:K.none}),relative:(t,n)=>({ltr:Ze(()=>iy(e,t,n)),rtl:Ze(()=>K.some(iy(e,n,t)))}),exact:(t,n,i,o)=>({ltr:Ze(()=>oy(e,t,n,i,o)),rtl:Ze(()=>K.some(oy(e,i,o,t,n)))})}),ly=(e,t)=>{const n=t.ltr();if(n.collapsed){return t.rtl().filter(e=>!1===e.collapsed).map(e=>ry.rtl(yi.fromDom(e.endContainer),e.endOffset,yi.fromDom(e.startContainer),e.startOffset)).getOrThunk(()=>sy(e,ry.ltr,n))}return sy(e,ry.ltr,n)},cy=(e,t)=>{const n=ay(e,t);return ly(e,n)};ry.ltr,ry.rtl;const dy=(e,t,n,i)=>({start:e,soffset:t,finish:n,foffset:i}),uy={create:dy},hy=(e,t,n)=>{var i,o;return K.from(null===(o=(i=e.dom).caretPositionFromPoint)||void 0===o?void 0:o.call(i,t,n)).bind(t=>{if(null===t.offsetNode)return K.none();const n=e.dom.createRange();return n.setStart(t.offsetNode,t.offset),n.collapse(),K.some(n)})},py=(e,t,n)=>{var i,o;return K.from(null===(o=(i=e.dom).caretRangeFromPoint)||void 0===o?void 0:o.call(i,t,n))},fy=document.caretPositionFromPoint?hy:document.caretRangeFromPoint?py:K.none,my=(e,t,n)=>{const i=yi.fromDom(e.document);return fy(i,t,n).map(e=>uy.create(yi.fromDom(e.startContainer),e.startOffset,yi.fromDom(e.endContainer),e.endOffset))},gy=Fu.generate([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),vy=(e,t,n,i)=>e.fold(t,n,i),yy=e=>e.fold(z,z,z),by={before:gy.before,on:gy.on,after:gy.after,cata:vy,getStart:yy},_y=Fu.generate([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),wy=e=>_y.exact(e.start,e.soffset,e.finish,e.foffset),Cy=e=>e.match({domRange:e=>yi.fromDom(e.startContainer),relative:e=>by.getStart(e),exact:e=>e}),ky=e=>{const t=Cy(e);return Ai(t)},xy={domRange:_y.domRange,relative:_y.relative,exact:_y.exact,exactFromRange:wy,getWin:ky,range:uy.create},Sy=(e,t)=>{const n=Ln(e);return"input"===n?by.after(e):te(["br","img"],n)?0===t?by.before(e):by.after(e):by.on(e,t)},Ey=(e,t)=>{const n=e.fold(by.before,Sy,by.after),i=t.fold(by.before,Sy,by.after);return xy.relative(n,i)},Dy=(e,t,n,i)=>{const o=Sy(e,t),r=Sy(n,i);return xy.relative(o,r)},Ty=e=>e.match({domRange:e=>{const t=yi.fromDom(e.startContainer),n=yi.fromDom(e.endContainer);return Dy(t,e.startOffset,n,e.endOffset)},relative:Ey,exact:Dy}),Ay=(e,t)=>{const n=(t||document).createDocumentFragment();return oe(e,e=>{n.appendChild(e.dom)}),yi.fromDom(n)},My=e=>{const t=xy.getWin(e).dom,n=(e,n,i,o)=>oy(t,e,n,i,o),i=Ty(e);return cy(t,i).match({ltr:n,rtl:n})},Ry=(e,t,n)=>my(e,t,n),Ny=(e,t,n)=>{const i=Ai(yi.fromDom(n));return Ry(i.dom,e,t).map(e=>{const t=n.createRange();return t.setStart(e.start.dom,e.soffset),t.setEnd(e.finish.dom,e.foffset),t}).getOrUndefined()},Iy=(e,t)=>I(e)&&I(t)&&e.startContainer===t.startContainer&&e.startOffset===t.startOffset&&e.endContainer===t.endContainer&&e.endOffset===t.endOffset,Py=(e,t,n)=>{let i=e;for(;i&&i!==t;){if(n(i))return i;i=i.parentNode}return null},Oy=(e,t,n)=>
vendor: 4,516 bytes, line 28
28null!==Py(e,t,n),Ly=(e,t,n)=>Oy(e,t,e=>e.nodeName===n),By=(e,t)=>ks(e)&&!Oy(e,t,Em),Fy=(e,t,n)=>{const i=t.parentNode;if(i){const o=new cr(t,e.getParent(i,e.isBlock)||e.getRoot());let r;for(;r=o[n?"prev":"next"]();)if(Rr(r))return!0}return!1},Hy=(e,t)=>{var n;return(null===(n=e.previousSibling)||void 0===n?void 0:n.nodeName)===t},$y=(e,t)=>{let n=t;for(;n&&n!==e;){if(Pr(n))return!0;n=n.parentNode}return!1},zy=(e,t,n,i,o)=>{const r=e.getRoot(),s=e.schema.getNonEmptyElements(),a=o.parentNode;let l,c;if(!a)return K.none();const d=e.getParent(a,e.isBlock)||r;if(i&&Rr(o)&&t&&e.isEmpty(d))return K.some(Zd(a,e.nodeIndex(o)));const u=new cr(o,d);for(;c=u[i?"prev":"next"]();){if("false"===e.getContentEditableParent(c)||By(c,r))return K.none();if(Sr(c)&&c.data.length>0)return Ly(c,r,"A")?K.none():K.some(Zd(c,i?c.data.length:0));if(e.isBlock(c)||s[c.nodeName.toLowerCase()])return K.none();l=c}return Tr(l)?K.none():n&&l?K.some(Zd(l,0)):K.none()},jy=(e,t,n,i)=>{const o=e.getRoot();let r,s=!1,a=n?i.startContainer:i.endContainer,l=n?i.startOffset:i.endOffset;const c=hr(a)&&l===a.childNodes.length,d=e.schema.getNonEmptyElements();let u=n;if(ks(a))return K.none();if(hr(a)&&l>a.childNodes.length-1&&(u=!1),Ar(a)&&(a=o,l=0),a===o){if(u&&(r=a.childNodes[l>0?l-1:0],r)){if(ks(r))return K.none();if(d[r.nodeName]||Cr(r))return K.none()}if(a.hasChildNodes()){if(l=Math.min(!u&&l>0?l-1:l,a.childNodes.length-1),a=a.childNodes[l],l=Sr(a)&&c?a.data.length:0,!t&&a===o.lastChild&&Cr(a))return K.none();if($y(o,a)||ks(a))return K.none();if(Hr(a))return K.none();if(a.hasChildNodes()&&!Cr(a)){r=a;const t=new cr(a,o);do{if(Pr(r)||ks(r)){s=!1;break}if(Sr(r)&&r.data.length>0){l=u?0:r.data.length,a=r,s=!0;break}if(d[r.nodeName.toLowerCase()]&&!Lr(r)){l=e.nodeIndex(r),a=r.parentNode,u||l++,s=!0;break}}while(r=u?t.next():t.prev())}}}return t&&(Sr(a)&&0===l&&zy(e,c,t,!0,a).each(e=>{a=e.container(),l=e.offset(),s=!0}),hr(a)&&(r=a.childNodes[l],r||(r=a.childNodes[l-1]),!r||!Rr(r)||Hy(r,"A")||Fy(e,r,!1)||Fy(e,r,!0)||zy(e,c,t,!0,r).each(e=>{a=e.container(),l=e.offset(),s=!0}))),u&&!t&&Sr(a)&&l===a.data.length&&zy(e,c,t,!1,a).each(e=>{a=e.container(),l=e.offset(),s=!0}),s&&a?K.some(Zd(a,l)):K.none()},qy=(e,t)=>{const n=t.collapsed,i=t.cloneRange(),o=Zd.fromRangeStart(t);return jy(e,n,!0,i).each(e=>{n&&Zd.isAbove(o,e)||i.setStart(e.container(),e.offset())}),n||jy(e,n,!1,i).each(e=>{i.setEnd(e.container(),e.offset())}),n&&i.collapse(!0),Iy(t,i)?K.none():K.some(i)},Uy=(e,t)=>e.splitText(t),Wy=e=>{let t=e.startContainer,n=e.startOffset,i=e.endContainer,o=e.endOffset;if(t===i&&Sr(t)){if(n>0&&n<t.data.length)if(i=Uy(t,n),t=i.previousSibling,o>n){o-=n;const e=Uy(i,o).previousSibling;t=i=e,o=e.data.length,n=0}else o=0}else if(Sr(t)&&n>0&&n<t.data.length&&(t=Uy(t,n),n=0),Sr(i)&&o>0&&o<i.data.length){const e=Uy(i,o).previousSibling;i=e,o=e.data.length}return{startContainer:t,startOffset:n,endContainer:i,endOffset:o}},Vy=e=>({walk:(t,n)=>cv(e,t,n),split:Wy,expand:(t,n={type:"word"})=>{if("word"===n.type){const n=lv(e,t,[{inline:"span"}]),i=e.createRng();return i.setStart(n.startContainer,n.startOffset),i.setEnd(n.endContainer,n.endOffset),i}return t},normalize:t=>qy(e,t).fold(Y,e=>(t.setStart(e.startContainer,e.startOffset),t.setEnd(e.endContainer,e.endOffset),!0))});Vy.compareRanges=Iy,Vy.getCaretRangeFromPoint=Ny,Vy.getSelectedNode=Sd,Vy.getNode=Ed;const Yy=(e,t)=>{const n=(t,n)=>{if(!O(n)&&!n.match(/^[0-9]+$/))throw new Error(e+".set accepts only positive integer values. Value was "+n);const i=t.dom;mo(i)&&(i.style[e]=n+"px")},i=n=>{const i=t(n);if(i<=0||null===i){const t=_o(n,e);return parseFloat(t)||0}return i},o=(e,t)=>ce(t,(t,n)=>{const i=_o(e,n),o=void 0===i?0:parseInt(i,10);return isNaN(o)?t:t+o},0),r=(e,t,n)=>{const i=o(e,n);return t>i?t-i:0};return{set:n,get:i,getOuter:i,aggregate:o,max:r}},Gy=Yy("height",e=>{const t=e.dom;return to(e)?t.getBoundingClientRect().height:t.offsetHeight}),Ky=e=>Gy.get(e),Xy=()=>yi.fromDom(document),Qy=(e,t)=>e.view(t).fold($([]),t=>{const n=e.owner(t),i=Qy(e,n);return[t].concat(i)}),Zy=(e,t)=>{const n=t.owner(e);return Qy(t,n)},Jy=e=>{var t;return(e.dom===document?K.none():K.from(null===(t=e.dom.defaultView)||void 0===t?void 0:t.frameElement)).map(yi.fromDom)},eb=e=>Di(e);var tb=Object.freeze({__proto__:null,view:Jy,owner:eb});const nb=e=>{const t=Xy(),n=Jo(t),i=Zy(e,tb),o=Zo(e),r=le(i,(e,t)=>{const n=Zo(t);return{left:e.left+n.left,top:e.top+n.top}},{left:0,top:0});return Go(r.left+o.left+n.left,r.top+o.top+n.top)},ib=e=>"textarea"===Ln(e),ob=(e,t)=>
28e.dispatch("ScrollIntoView",t).isDefaultPrevented(),rb=(e,t)=>{e.dispatch("AfterScrollIntoView",t)},sb=(e,t)=>{const n=Fi(e);if(0===n.length||ib(e))return{element:e,offset:t};if(t<n.length&&!ib(n[t]))return{element:n[t],offset:0};{const i=n[n.length-1];return ib(i)?{element:e,offset:t}:"img"===Ln(i)?{element:i,offset:1}:jn(i)?{element:i,offset:Yr(i).length}:{element:i,offset:Fi(i).length}}},ab=(e,t)=>{const n=Qo(e),i=Ky(e);return{element:e,bottom:n.top+i,height:i,pos:n,cleanup:t}},lb=(e,t)=>{const n=sb(e,t),i=yi.fromHtml('<span data-mce-bogus="all" style="display: inline-block;">'+ms+"</span>");return Eo(n.element,i),ab(i,()=>Po(i))},cb=e=>ab(yi.fromDom(e),B),db=(e,t,n,i)=>{fb(e,()=>hb(e,t,n,i),n)},ub=(e,t,n,i,o)=>{const r={elm:i.element.dom,alignToTop:o};if(ob(e,r))return;n(e,t,Jo(t).top,i,o),rb(e,r)},hb=(e,t,n,i)=>{const o=yi.fromDom(e.getBody()),r=yi.fromDom(e.getDoc());So(o);const s=lb(yi.fromDom(n.startContainer),n.startOffset);ub(e,r,t,s,i),s.cleanup()},pb=(e,t,n,i)=>{const o=yi.fromDom(e.getDoc());ub(e,o,n,cb(t),i)},fb=(e,t,n)=>{const i=n.startContainer,o=n.startOffset,r=n.endContainer,s=n.endOffset;t(yi.fromDom(i),yi.fromDom(r));const a=e.dom.createRng();a.setStart(i,o),a.setEnd(r,s),e.selection.setRng(n)},mb=(e,t,n,i,o)=>{const r=t.pos;if(i)er(r.left,r.top,o);else{const i=r.top-n+t.height;er(-e.getBody().getBoundingClientRect().left,i,o)}},gb=(e,t,n,i,o,r)=>{const s=i+n,a=o.pos.top,l=o.bottom,c=l-a>=i;if(a<n)mb(e,o,i,!1!==r,t);else if(a>s){mb(e,o,i,c?!1!==r:!0===r,t)}else l>s&&!c&&mb(e,o,i,!0===r,t)},vb=(e,t,n,i,o)=>{const r=Ai(t).dom.innerHeight;gb(e,t,n,r,i,o)},yb=(e,t,n,i,o)=>{const r=Ai(t).dom.innerHeight;gb(e,t,n,r,i,o);const s=nb(i.element),a=or(window);s.top<a.y?tr(i.element,!1!==o):s.top>a.bottom&&tr(i.element,!0===o)},bb=(e,t,n)=>db(e,vb,t,n),_b=(e,t,n)=>pb(e,t,vb,n),wb=(e,t,n)=>db(e,yb,t,n),Cb=(e,t,n)=>pb(e,t,yb,n),kb=(e,t,n)=>{(e.inline?_b:Cb)(e,t,n)},xb=(e,t,n)=>{(e.inline?bb:wb)(e,t,n)},Sb=(e,t=!1)=>e.dom.focus({preventScroll:t}),Eb=e=>{const t=Gi(e).dom;return e.dom===t.activeElement},Db=(e=Xy())=>K.from(e.dom.activeElement).map(yi.fromDom),Tb=e=>Db(Gi(e)).filter(t=>e.dom.contains(t.dom)),Ab=(e,t)=>{const n=jn(t)?Yr(t).length:Fi(t).length+1;return e>n?n:e<0?0:e},Mb=e=>xy.range(e.start,Ab(e.soffset,e.start),e.finish,Ab(e.foffset,e.finish)),Rb=(e,t)=>!ur(t.dom)&&(Si(e,t)||xi(e,t)),Nb=e=>t=>Rb(e,t.start)&&Rb(e,t.finish),Ib=e=>e.inline||an.browser.isFirefox(),Pb=e=>xy.range(yi.fromDom(e.startContainer),e.startOffset,yi.fromDom(e.endContainer),e.endOffset),Ob=e=>{const t=e.getSelection()
29;return(t&&0!==t.rangeCount?K.from(t.getRangeAt(0)):K.none()).map(Pb)},Lb=e=>{const t=Ai(e);return Ob(t.dom).filter(Nb(e))},Bb=(e,t)=>K.from(t).filter(Nb(e)).map(Mb),Fb=e=>{const t=document.createRange();try{return t.setStart(e.start.dom,e.soffset),t.setEnd(e.finish.dom,e.foffset),K.some(t)}catch(e){return K.none()}},Hb=e=>{const t=Ib(e)?Lb(yi.fromDom(e.getBody())):K.none();e.bookmark=t.isSome()?t:e.bookmark},$b=e=>(e.bookmark?e.bookmark:K.none()).bind(t=>Bb(yi.fromDom(e.getBody()),t)).bind(Fb),zb=e=>{$b(e).each(t=>e.selection.setRng(t))},jb={isEditorUIElement:e=>{const t=e.className.toString();return-1!==t.indexOf("tox-")||-1!==t.indexOf("mce-")}},qb=(e,t)=>(O(t)||(t=0),setTimeout(e,t)),Ub=(e,t)=>(O(t)||(t=0),setInterval(e,t)),Wb={setEditorTimeout:(e,t,n)=>qb(()=>{e.removed||t()},n),setEditorInterval:(e,t,n)=>{const i=Ub(()=>{e.removed?clearInterval(i):t()},n);return i}},Vb=e=>"nodechange"===e.type&&e.selectionChange,Yb=(e,t)=>{const n=()=>{t.throttle()};vc.DOM.bind(document,"mouseup",n),e.on("remove",()=>{vc.DOM.unbind(document,"mouseup",n)})},Gb=(e,t)=>{e.on("mouseup touchend",()=>{t.throttle()})},Kb=(e,t)=>{Gb(e,t),e.on("keyup NodeChange AfterSetSelectionRange",t=>{Vb(t)||Hb(e)}
29)},Xb=e=>{const t=Hc(()=>{Hb(e)},0);e.on("init",()=>{e.inline&&Yb(e,t),Kb(e,t)}),e.on("remove",()=>{t.cancel()})};let Qb;const Zb=vc.DOM,Jb=e=>hr(e)&&jb.isEditorUIElement(e),e_=e=>{const t=e.classList;return void 0!==t&&(t.contains("tox-edit-area")||t.contains("tox-edit-area__iframe")||t.contains("mce-content-body"))},t_=(e,t)=>{const n=Qh(e),i=Zb.getParent(t,t=>Jb(t)||!!n&&e.dom.is(t,n));return null!==i},n_=e=>{try{const t=Gi(yi.fromDom(e.getElement()));return Db(t).fold(()=>document.body,e=>e.dom)}catch(e){return document.body}},i_=(e,t)=>{const n=t.editor;Xb(n);const i=(e,t)=>{if(Hp(e)&&!0!==e.inline){t(yi.fromDom(e.getContainer()),"tox-edit-focus")}};n.on("focusin",()=>{const t=e.focusedEditor;e_(n_(n))&&i(n,ci),t!==n&&(t&&t.dispatch("blur",{focusedEditor:n}),e.setActive(n),e.focusedEditor=n,n.dispatch("focus",{blurredEditor:t}),n.focus(!0))}),n.on("focusout",()=>{Wb.setEditorTimeout(n,()=>{const t=e.focusedEditor;e_(n_(n))&&t===n||i(n,ui),t_(n,n_(n))||t!==n||(n.dispatch("blur",{focusedEditor:null}),e.focusedEditor=null)})}),Qb||(Qb=t=>{const n=e.activeEditor;n&&Ji(t).each(t=>{const i=t;i.ownerDocument===document&&(i===document.body||t_(n,i)||e.focusedEditor!==n||(n.dispatch("blur",{focusedEditor:null}),e.focusedEditor=null))})},Zb.bind(document,"focusin",Qb))},o_=(e,t)=>{e.focusedEditor===t.editor&&(e.focusedEditor=null),!e.activeEditor&&Qb&&(Zb.unbind(document,"focusin",Qb),Qb=null)},r_=t=>{t.on("AddEditor",e(i_,t)),t.on("RemoveEditor",e(o_,t))},s_=(e,t)=>e.dom.getParent(t,t=>"true"===e.dom.getContentEditable(t)),a_=e=>e.collapsed?K.from(Ed(e.startContainer,e.startOffset)).map(yi.fromDom):K.none(),l_=(e,t)=>a_(t).bind(t=>as(t)?K.some(t):Si(e,t)?K.none():K.some(e)),c_=(e,t)=>{l_(yi.fromDom(e.getBody()),t).bind(e=>km(e.dom)).fold(()=>{e.selection.normalize()},t=>e.selection.setRng(t.toRange()))},d_=e=>{if(e.setActive)try{e.setActive()}catch(t){e.focus()}else e.focus()},u_=e=>Eb(e)||Tb(e).isSome(),h_=e=>I(e.iframeElement)&&Eb(yi.fromDom(e.iframeElement)),p_=e=>{const t=e.getBody();return t&&u_(yi.fromDom(t))},f_=e=>{const t=Gi(yi.fromDom(e.getElement()));return Db(t).filter(t=>!e_(t.dom)&&t_(e,t.dom)).isSome()},m_=e=>e.inline?p_(e):h_(e),g_=e=>m_(e)||f_(e),v_=e=>{const t=e.selection,n=e.getBody();let i=t.getRng();e.quirks.refreshContentEditable(),I(e.bookmark)&&!m_(e)&&$b(e).each(t=>{e.selection.setRng(t),i=t});const o=s_(e,t.getNode());if(o&&e.dom.isChildOf(o,n))return d_(o),c_(e,i),void y_(e);e.inline||(an.browser.isOpera()||d_(n),e.getWin().focus()),(an.browser.isFirefox()||e.inline)&&(d_(n),c_(e,i)),y_(e)},y_=e=>e.editorManager.setActive(e),b_=(e,t)=>{e.removed||(t?y_(e):v_(e))},__=(e,t)=>t.collapsed?e.isEditable(t.startContainer):e.isEditable(t.startContainer)&&e.isEditable(t.endContainer),w_=(e,t,n,i,o)=>{const r=n?t.startContainer:t.endContainer,s=n?t.startOffset:t.endOffset;return K.from(r).map(yi.fromDom).map(e=>i&&t.collapsed?e:Hi(e,o(e,s)).getOr(e)).bind(e=>zn(e)?K.some(e):Mi(e).filter(zn)).map(e=>e.dom).getOr(e)},C_=(e,t,n=!1)=>w_(e,t,!0,n,(e,t)=>Math.min(ji(e),t)),k_=(e,t,n=!1)=>w_(e,t,!1,n,(e,t)=>t>0?t-1:t),x_=(e,t)=>{const n=e;for(;e&&Sr(e)&&0===e.length;)e=t?e.nextSibling:e.previousSibling;return e||n},S_=(e,t)=>{if(!t)return e;let n=t.startContainer,i=t.endContainer;const o=t.startOffset,r=t.endOffset;let s=t.commonAncestorContainer;t.collapsed||(n===i&&r-o<2&&n.hasChildNodes()&&(s=n.childNodes[o]),Sr(n)&&Sr(i)&&(n=n.length===o?x_(n.nextSibling,!0):n.parentNode,i=0===r?x_(i.previousSibling,!1):i.parentNode,n&&n===i&&(s=n)));const a=Sr(s)?s.parentNode:s;return pr(a)?a:e},E_=(e,t,n,i)=>{const o=[],r=e.getRoot(),s=e.getParent(n||C_(r,t,t.collapsed),e.isBlock),a=e.getParent(i||k_(r,t,t.collapsed),e.isBlock);if(s&&s!==r&&o.push(s),s&&a&&s!==a){let t;const n=new cr(s,r);for(;(t=n.next())&&t!==a;)e.isBlock(t)&&o.push(t)}return a&&s!==a&&a!==r&&o.push(a),o},D_=(e,t,n)=>K.from(t).bind(t=>K.from(t.parentNode).map(i=>{const o=e.nodeIndex(t),r=e.createRng();return r.setStart(i,o),r.setEnd(i,o+1),n&&(hg(e,r,t,!0),hg(e,r,t,!1)),r})),T_=(e,t)=>ie(t,t=>{const n=e.dispatch("GetSelectionRange",{range:t});return n.range!==t?n.range:t}),A_=e=>"img"===Ln(e)?1:Gr(e).fold(()=>Fi(e).length,e=>e.length),M_=e=>Gr(e).filter(e=>0!==e.trim().length||e.indexOf(jr)>-1).isSome(),R_=e=>$n(e)&&"false"===Kn(e,"contenteditable"),N_=["img","br"],I_=e=>M_(e)||te(N_,Ln(e))||R_(e),P_=e=>ao(e,I_),O_=e=>L_(e,I_),L_=(e,t)=>{const n=e=>{const i=Fi(e);for(let e=i.length-1;e>=0;e--){const o=i[e];if(t(o))return K.some(o);const r=n(o);if(r.isSome())return r}return K.none()};return n(e)},B_="[data-mce-autocompleter]",F_=(e,t)=>{if($_(yi.fromDom(e.getBody())).isNone()){const n=yi.fromHtml('<span data-mce-autocompleter="1" data-mce-bogus="1"></span>',e.getDoc());
vendor: 9,047 bytes, line 29
29Ao(n,yi.fromDom(t.extractContents())),t.insertNode(n.dom),Mi(n).each(e=>e.dom.normalize()),O_(n).map(t=>{e.selection.setCursorLocation(t.dom,A_(t))})}},H_=e=>uo(e,B_),$_=e=>co(e,B_),z_=(e,t)=>$_(t).each(t=>{const n=e.selection.getBookmark();Oo(t),e.selection.moveToBookmark(n)}),j_={"#text":3,"#comment":8,"#cdata":4,"#pi":7,"#doctype":10,"#document-fragment":11},q_=(e,t,n)=>{const i=n?"lastChild":"firstChild",o=n?"prev":"next";if(e[i])return e[i];if(e!==t){let n=e[o];if(n)return n;for(let i=e.parent;i&&i!==t;i=i.parent)if(n=i[o],n)return n}},U_=e=>{var t;const n=null!==(t=e.value)&&void 0!==t?t:"";if(!Xs(n))return!1;const i=e.parent;return!i||"span"===i.name&&!i.attr("style")||!/^[ ]+$/.test(n)},W_=e=>{const t="a"===e.name&&!e.attr("href")&&e.attr("id");return e.attr("name")||e.attr("id")&&!e.firstChild||e.attr("data-mce-bookmark")||t};class V_{static create(e,t){const n=new V_(e,j_[e]||1);return t&&Te(t,(e,t)=>{n.attr(t,e)}),n}constructor(e,t){this.name=e,this.type=t,1===t&&(this.attributes=[],this.attributes.map={})}replace(e){const t=this;return e.parent&&e.remove(),t.insert(e,t),t.remove(),t}attr(e,t){const n=this;if(!S(e))return I(e)&&Te(e,(e,t)=>{n.attr(t,e)}),n;const i=n.attributes;if(i){if(void 0!==t){if(null===t){if(e in i.map){delete i.map[e];let t=i.length;for(;t--;)if(i[t].name===e)return i.splice(t,1),n}return n}if(e in i.map){let n=i.length;for(;n--;)if(i[n].name===e){i[n].value=t;break}}else i.push({name:e,value:t});return i.map[e]=t,n}return i.map[e]}}clone(){const e=this,t=new V_(e.name,e.type),n=e.attributes;if(n){const e=[];e.map={};for(let t=0,i=n.length;t<i;t++){const i=n[t];"id"!==i.name&&(e[e.length]={name:i.name,value:i.value},e.map[i.name]=i.value)}t.attributes=e}return t.value=e.value,t}wrap(e){const t=this;return t.parent&&(t.parent.insert(e,t),e.append(t)),t}unwrap(){const e=this;for(let t=e.firstChild;t;){const n=t.next;e.insert(t,e,!0),t=n}e.remove()}remove(){const e=this,t=e.parent,n=e.next,i=e.prev;return t&&(t.firstChild===e?(t.firstChild=n,n&&(n.prev=null)):i&&(i.next=n),t.lastChild===e?(t.lastChild=i,i&&(i.next=null)):n&&(n.prev=i),e.parent=e.next=e.prev=null),e}append(e){const t=this;e.parent&&e.remove();const n=t.lastChild;return n?(n.next=e,e.prev=n,t.lastChild=e):t.lastChild=t.firstChild=e,e.parent=t,e}insert(e,t,n){e.parent&&e.remove();const i=t.parent||this;return n?(t===i.firstChild?i.firstChild=e:t.prev&&(t.prev.next=e),e.prev=t.prev,e.next=t,t.prev=e):(t===i.lastChild?i.lastChild=e:t.next&&(t.next.prev=e),e.next=t.next,e.prev=t,t.next=e),e.parent=i,e}getAll(e){const t=this,n=[];for(let i=t.firstChild;i;i=q_(i,t))i.name===e&&n.push(i);return n}children(){const e=[];for(let t=this.firstChild;t;t=t.next)e.push(t);return e}empty(){const e=this;if(e.firstChild){const t=[];for(let n=e.firstChild;n;n=q_(n,e))t.push(n);let n=t.length;for(;n--;){const e=t[n];e.parent=e.firstChild=e.lastChild=e.next=e.prev=null}}return e.firstChild=e.lastChild=null,e}isEmpty(e,t={},n){var i;const o=this;let r=o.firstChild;if(W_(o))return!1;if(r)do{if(1===r.type){if(r.attr("data-mce-bogus"))continue;if(e[r.name])return!1;if(W_(r))return!1}if(8===r.type)return!1;if(3===r.type&&!U_(r))return!1;if(3===r.type&&r.parent&&t[r.parent.name]&&Xs(null!==(i=r.value)&&void 0!==i?i:""))return!1;if(n&&n(r))return!1}while(r=q_(r,o));return!0}walk(e){return q_(this,null,e)}}const Y_=gn.makeMap("NOSCRIPT STYLE SCRIPT XMP IFRAME NOEMBED NOFRAMES PLAINTEXT"," "),G_=e=>S(e.nodeValue)&&e.nodeValue.includes(ms),K_=e=>(0===e.length?"":`${ie(e,e=>`[${e}]`).join(",")},`)+'[data-mce-bogus="all"]',X_=(e,t)=>t.querySelectorAll(K_(e)),Q_=e=>document.createTreeWalker(e,NodeFilter.SHOW_COMMENT,e=>G_(e)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP),Z_=e=>document.createTreeWalker(e,NodeFilter.SHOW_TEXT,e=>{if(G_(e)){const t=e.parentNode;return t&&Fe(Y_,t.nodeName)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}return NodeFilter.FILTER_SKIP}),J_=e=>null!==Q_(e).nextNode(),ew=e=>null!==Z_(e).nextNode(),tw=(e,t)=>null!==t.querySelector(K_(e)),nw=(e,t)=>{oe(X_(e,t),t=>{const n=yi.fromDom(t);"all"===Kn(n,"data-mce-bogus")?Po(n):oe(e,e=>{Qn(n,e)&&Zn(n,e)})})},iw=e=>{let t=e.nextNode();for(;null!==t;)t.nodeValue=null,t=e.nextNode()},ow=F(iw,Q_),rw=F(iw,Z_),sw=(t,n)=>{const i=[{condition:e(tw,n),action:e(nw,n)},{condition:J_,action:ow},{condition:ew,action:rw}];let o=t,r=!1;return oe(i,({condition:e,action:n})=>{e(o)&&(r||(o=t.cloneNode(!0),r=!0),n(o))}),o},aw=e=>{const t=ar(e,"[data-mce-bogus]");oe(t,e=>{"all"===Kn(e,"data-mce-bogus")?Po(e):is(e)?(Eo(e,yi.fromText(zr)),Po(e)):Oo(e)})},lw=e=>{const t=ar(e,"input");oe(t,e=>{Zn(e,"name")})},cw=(e,t)=>{const n=dh(e),i=new RegExp(`^(<${n}[^>]*>(&nbsp;|&#160;|\\s|\xa0|<br \\/>|)<\\/${n}>[\r\n]*|<br \\/>[\r\n]*)$`);return t.replace(i,"")},dw=(e,t)=>{const n=e.getDoc(),i=Gi(yi.fromDom(e.getBody())),o=yi.fromTag("div",n);Yn(o,"data-mce-bogus","all"),bo(o,{position:"fixed",left:"-9999999px",top:"0"}),Ho(o,t.innerHTML),aw(o),lw(o);const r=Xi(i);Ao(r,o);const s=vs(o.dom.innerText);return Po(o),s},uw=(e,t,n)=>{let i;i="raw"===t.format?gn.trim(vs(sw(n,e.serializer.getTempAttrs()).innerHTML)):"text"===t.format?dw(e,n):"tree"===t.format?e.serializer.serialize(n,t):cw(e,e.serializer.serialize(n,t));return"text"!==t.format&&!cs(yi.fromDom(n))&&S(i)?gn.trim(i):i},hw=(e,t)=>K.from(e.getBody()).fold($("tree"===t.format?new V_("body",11):""),n=>uw(e,t,n)),pw=gn.makeMap,fw=e=>{const t=[],n=(e=e||{}).indent,i=pw(e.indent_before||""),o=pw(e.indent_after||""),r=fl.getEncodeFunc(e.entity_encoding||"raw",e.entities),s="xhtml"!==e.element_format;return{start:(e,a,l)=>{if(n&&i[e]&&t.length>0){const e=t[t.length-1];e.length>0&&"\n"!==e&&t.push("\n")}if(t.push("<",e),a)for(let e=0,n=a.length;e<n;e++){const n=a[e];t.push(" ",n.name,'="',r(n.value,!0),'"')}if(t[t.length]=!l||s?">":" />",l&&n&&o[e]&&t.length>0){const e=t[t.length-1];e.length>0&&"\n"!==e&&t.push("\n")}},end:e=>{let i;t.push("</",e,">"),n&&o[e]&&t.length>0&&(i=t[t.length-1],i.length>0&&"\n"!==i&&t.push("\n"))},text:(e,n)=>{e.length>0&&(t[t.length]=n?e:r(e))},cdata:e=>{t.push("<![CDATA[",e,"]]>")},comment:e=>{t.push("<!--",e,"-->")},pi:(e,i)=>{i?t.push("<?",e," ",r(i),"?>"):t.push("<?",e,"?>"),n&&t.push("\n")},doctype:e=>{t.push("<!DOCTYPE",e,">",n?"\n":"")},reset:()=>{t.length=0},getContent:()=>t.join("").replace(/\n$/,"")}},mw=(e={},t=Il())=>{const n=fw(e);e.validate=!("validate"in e)||e.validate;const i=i=>{const o=e.validate,r={3:e=>{var t;n.text(null!==(t=e.value)&&void 0!==t?t:"",e.raw)},8:e=>{var t;n.comment(null!==(t=e.value)&&void 0!==t?t:"")},7:e=>{n.pi(e.name,e.value)},10:e=>{var t;n.doctype(null!==(t=e.value)&&void 0!==t?t:"")},4:e=>{var t;n.cdata(null!==(t=e.value)&&void 0!==t?t:"")},11:e=>{let t=e;if(t=t.firstChild)do{s(t)}while(t=t.next)}};n.reset();const s=e=>{var i;const a=r[e.type];if(a)a(e);else{const r=e.name,a=r in t.getVoidElements();let l=e.attributes;if(o&&l&&l.length>1){const n=[];n.map={};const i=t.getElementRule(e.name);if(i){for(let e=0,t=i.attributesOrder.length;e<t;e++){const t=i.attributesOrder[e];if(t in l.map){const e=l.map[t];n.map[t]=e,n.push({name:t,value:e})}}for(let e=0,t=l.length;e<t;e++){const t=l[e].name;if(!(t in n.map)){const e=l.map[t];n.map[t]=e,n.push({name:t,value:e})}}l=n}}if(n.start(r,l,a),ha(r))S(e.value)&&n.text(e.value,!0),n.end(r);else if(!a){let t=e.firstChild;if(t){"pre"!==r&&"textarea"!==r||3!==t.type||"\n"!==(null===(i=t.value)||void 0===i?void 0:i[0])||n.text("\n",!0);do{s(t)}while(t=t.next)}n.end(r)}}};return 1!==i.type||e.inner?3===i.type?r[3](i):r[11](i):s(i),n.getContent()};return{serialize:i}},gw=new Set;oe(["margin","margin-left","margin-right","margin-top","margin-bottom","padding","padding-left","padding-right","padding-top","padding-bottom","border","border-width","border-style","border-color","background","background-attachment","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","float","position","left","right","top","bottom","z-index","display","transform","width","max-width","min-width","height","max-height","min-height","overflow","overflow-x","overflow-y","text-overflow","vertical-align","transition","transition-delay","transition-duration","transition-property","transition-timing-function"],e=>{gw.add(e)});const vw=["font","text-decoration","text-emphasis"],yw=(e,t)=>Ee(e.parseStyle(e.getAttrib(t,"style"))),bw=e=>gw.has(e),_w=(e,t)=>me(yw(e,t),e=>!bw(e)),ww=e=>ae(e,e=>ne(vw,t=>ft(e,t))),Cw=(e,t,n)=>{const i=yw(e,t),o=yw(e,n),r=i=>{var o,r;const s=null!==(o=e.getStyle(t,i))&&void 0!==o?o:"",a=null!==(r=e.getStyle(n,i))&&void 0!==r?r:"";return _t(s)&&_t(a)&&s!==a};return ne(i,e=>{const t=t=>ne(t,t=>t===e);if(!t(o)&&t(vw)){const e=ww(o);return ne(e,r)}return r(e)})},kw=(e,t,n)=>K.from(n.container()).filter(Sr).exists(i=>{const o=e?0:-1;return t(i.data.charAt(n.offset()+o))}),xw=e(kw,!0,Qm),Sw=e(kw,!1,Qm),Ew=e=>{const t=e.container();return Sr(t)&&(0===t.data.length||gs(t.data)&&_v.isBookmarkNode(t.parentNode))},Dw=(e,t)=>n=>Bf(e?0:-1,n).filter(t).isSome(),Tw=e=>
29Nr(e)&&"block"===_o(yi.fromDom(e),"display"),Aw=e=>Pr(e)&&!wr(e),Mw=Dw(!0,Tw),Rw=Dw(!1,Tw),Nw=Dw(!0,Br),Iw=Dw(!1,Br),Pw=Dw(!0,Cr),Ow=Dw(!1,Cr),Lw=Dw(!0,Aw),Bw=Dw(!1,Aw),Fw=e=>e.slice(0,-1),Hw=(e,t,n)=>Si(t,e)?Fw(Ni(e,e=>n(e)||xi(e,t))):[],$w=(e,t)=>Hw(e,t,Y),zw=(e,t)=>[e].concat($w(e,t)),jw=(e,t,n)=>bm(e,t,n,Ew),qw=e=>t=>e.isBlock(Ln(t)),Uw=(e,t,n)=>ue(zw(yi.fromDom(t.container()),e),qw(n)),Ww=(e,t,n,i)=>jw(e,t.dom,n).forall(e=>Uw(t,n,i).fold(()=>!Lf(e,n,t.dom),i=>!Lf(e,n,t.dom)&&Si(i,yi.fromDom(e.container())))),Vw=(e,t,n,i)=>Uw(t,n,i).fold(()=>jw(e,t.dom,n).forall(e=>!Lf(e,n,t.dom)),t=>jw(e,t.dom,n).isNone()),Yw=e(Vw,!1),Gw=e(Vw,!0),Kw=e(Ww,!1),Xw=e(Ww,!0),Qw=e=>Vf(e).exists(is),Zw=(e,t,n,i)=>{const o=ae(zw(yi.fromDom(n.container()),t),e=>i.isBlock(Ln(e))),r=we(o).getOr(t);return vm(e,r.dom,n).filter(Qw)},Jw=(e,t,n)=>Vf(t).exists(is)||Zw(!0,e,t,n).isSome(),eC=(e,t,n)=>Yf(t).exists(is)||Zw(!1,e,t,n).isSome(),tC=e(Zw,!1),nC=e(Zw,!0),iC=e=>Zd.isTextPosition(e)&&!e.isAtStart()&&!e.isAtEnd(),oC=(e,t,n)=>{const i=ae(zw(yi.fromDom(t.container()),e),e=>n.isBlock(Ln(e)));return we(i).getOr(e)},rC=(e,t,n)=>iC(t)?Sw(t):Sw(t)||Cm(oC(e,t,n).dom,t).exists(Sw),sC=(e,t,n)=>iC(t)?xw(t):xw(t)||wm(oC(e,t,n).dom,t).exists(xw),aC=e=>te(["pre","pre-wrap"],e),lC=e=>Vf(e).bind(e=>oo(e,zn)).exists(e=>aC(_o(e,"white-space"))),cC=(e,t)=>Cm(e.dom,t).isNone(),dC=(e,t)=>wm(e.dom,t).isNone(),uC=(e,t,n)=>
vendor: 5,364 bytes, line 29
29cC(e,t)||dC(e,t)||Yw(e,t,n)||Gw(e,t,n)||eC(e,t,n)||Jw(e,t,n),hC=e=>I(e)&&Pr(e)&&xf(e),pC=(e,t)=>n=>hC(new cr(n,e)[t]()),fC=(e,t)=>{const n=wm(e.dom,t).getOr(t),i=pC(e.dom,"next");return t.isAtEnd()&&(i(t.container())||i(n.container()))},mC=(e,t)=>{const n=Cm(e.dom,t).getOr(t),i=pC(e.dom,"prev");return t.isAtStart()&&(i(t.container())||i(n.container()))},gC=(e,t,n)=>!lC(t)&&(uC(e,t,n)||rC(e,t,n)||sC(e,t,n)),vC=(e,t,n)=>!lC(t)&&(Yw(e,t,n)||Kw(e,t,n)||eC(e,t,n)||rC(e,t,n)||mC(e,t)),yC=e=>{const t=e.container(),n=e.offset();return Sr(t)&&n<t.data.length?Zd(t,n+1):e},bC=(e,t,n)=>!lC(t)&&(Gw(e,t,n)||Xw(e,t,n)||Jw(e,t,n)||sC(e,t,n)||fC(e,t)),_C=(e,t,n)=>vC(e,t,n)||bC(e,yC(t),n),wC=(e,t)=>Xm(e.charAt(t)),CC=(e,t)=>Qm(e.charAt(t)),kC=e=>{const t=e.container();return Sr(t)&&pt(t.data,jr)},xC=e=>{const t=e.split("");return ie(t,(e,n)=>Xm(e)&&n>0&&n<t.length-1&&Zm(t[n-1])&&Zm(t[n+1])?" ":e).join("")},SC=(e,t,n,i)=>{const o=t.data,r=Zd(t,0);return n||!wC(o,0)||_C(e,r,i)?!!(n&&CC(o,0)&&vC(e,r,i))&&(t.data=jr+o.slice(1),!0):(t.data=" "+o.slice(1),!0)},EC=e=>{const t=e.data,n=xC(t);return n!==t&&(e.data=n,!0)},DC=(e,t,n,i)=>{const o=t.data,r=Zd(t,o.length-1);return n||!wC(o,o.length-1)||_C(e,r,i)?!!(n&&CC(o,o.length-1)&&bC(e,r,i))&&(t.data=o.slice(0,-1)+jr,!0):(t.data=o.slice(0,-1)+" ",!0)},TC=(e,t,n)=>{const i=t.container();if(!Sr(i))return K.none();if(kC(t)){const o=SC(e,i,!1,n)||EC(i)||DC(e,i,!1,n);return Cn(o,t)}if(_C(e,t,n)){const o=SC(e,i,!0,n)||DC(e,i,!0,n);return Cn(o,t)}return K.none()},AC=e=>{const t=yi.fromDom(e.getBody());e.selection.isCollapsed()&&TC(t,Zd.fromRangeStart(e.selection.getRng()),e.schema).each(t=>{e.selection.setRng(t.toRange())})},MC=(e,t,n,i)=>{if(0===n)return;const o=yi.fromDom(e),r=io(o,e=>i.isBlock(Ln(e))).getOr(o),s=e.data.slice(t,t+n),a=t+n>=e.data.length&&bC(r,Zd(e,e.data.length),i),l=0===t&&vC(r,Zd(e,0),i);e.replaceData(t,n,ta(s,4,l,a))},RC=(e,t,n)=>{const i=e.data.slice(t),o=i.length-yt(i).length;MC(e,t,o,n)},NC=(e,t,n)=>{const i=e.data.slice(0,t),o=i.length-bt(i).length;MC(e,t-o,o,n)},IC=(e,t,n,i,o=!0)=>{const r=bt(e.data).length,s=o?e:t,a=o?t:e;return o?s.appendData(a.data):s.insertData(0,a.data),Po(yi.fromDom(a)),i&&RC(s,r,n),s},PC=(e,t)=>{const n=e.container(),i=e.offset();return!Zd.isTextPosition(e)&&n===t.parentNode&&i>Zd.before(t).offset()},OC=(e,t)=>PC(t,e)?Zd(t.container(),t.offset()-1):t,LC=e=>Sr(e)?Zd(e,0):Zd.before(e),BC=e=>Sr(e)?Zd(e,e.data.length):Zd.after(e),FC=e=>js(e.previousSibling)?K.some(BC(e.previousSibling)):e.previousSibling?xm(e.previousSibling):K.none(),HC=e=>js(e.nextSibling)?K.some(LC(e.nextSibling)):e.nextSibling?km(e.nextSibling):K.none(),$C=(e,t)=>K.from(t.previousSibling?t.previousSibling:t.parentNode).bind(t=>Cm(e,Zd.before(t))).orThunk(()=>wm(e,Zd.after(t))),zC=(e,t)=>wm(e,Zd.after(t)).orThunk(()=>Cm(e,Zd.before(t))),jC=(e,t)=>FC(t).orThunk(()=>HC(t)).orThunk(()=>$C(e,t)),qC=(e,t)=>HC(t).orThunk(()=>FC(t)).orThunk(()=>zC(e,t)),UC=(e,t,n)=>e?qC(t,n):jC(t,n),WC=(t,n,i)=>UC(t,n,i).map(e(OC,i)),VC=(e,t,n)=>{n.fold(()=>{e.focus()},n=>{e.selection.setRng(n.toRange(),t)})},YC=e=>t=>t.dom===e,GC=(e,t)=>t&&Fe(e.schema.getBlockElements(),Ln(t)),KC=(e,t)=>{if(ua(e)){const n=yi.fromHtml('<br data-mce-bogus="1">');return t?oe(Fi(e),e=>{Vg(e)||Po(e)}):Io(e),Ao(e,n),K.some(Zd.before(n.dom))}return K.none()},XC=(e,t,n,i)=>{const o=Pi(e).filter(jn),r=Oi(e).filter(jn);return Po(e),wn(o,r,t,(e,t,o)=>{const r=e.dom,s=t.dom,a=r.data.length;return IC(r,s,n,i),o.container()===s?Zd(r,a):o}).orThunk(()=>(i&&(o.each(e=>NC(e.dom,e.dom.length,n)),r.each(e=>RC(e.dom,0,n))),t))},QC=(e,t)=>Fe(e.schema.getTextInlineElements(),Ln(t)),ZC=(t,n,i,o=!0,r=!1)=>{const s=WC(n,t.getBody(),i.dom),a=io(i,e(GC,t),YC(t.getBody())),l=XC(i,s,t.schema,QC(t,i));t.dom.isEmpty(t.getBody())?(t.setContent(""),t.selection.setCursorLocation()):a.bind(e=>KC(e,r)).fold(()=>{o&&VC(t,n,l)},e=>{o&&VC(t,n,K.some(e))})},JC=/[\u0591-\u07FF\uFB1D-\uFDFF\uFE70-\uFEFC]/,ek=e=>JC.test(e),tk=(e,t)=>_i(yi.fromDom(t),Lh(e))&&!Na(e.schema,t)&&e.dom.isEditable(t),nk=e=>{var t;return"rtl"===vc.DOM.getStyle(e,"direction",!0)||ek(null!==(t=e.textContent)&&void 0!==t?t:"")},ik=(e,t,n)=>ae(vc.DOM.getParents(n.container(),"*",t),e),ok=(e,t,n)=>{const i=ik(e,t,n);return K.from(i[i.length-1])},rk=(e,t,n)=>{const i=Of(t,e),o=Of(n,e);return I(i)&&i===o},sk=e=>Es(e)||Ds(e),ak=(e,t)=>{const n=t.container(),i=t.offset();return e?Cs(n)?Sr(n.nextSibling)?Zd(n.nextSibling,0):Zd.after(n):Es(t)?Zd(n,i+1):t:Cs(n)?Sr(n.previousSibling)?Zd(n.previousSibling,n.previousSibling.data.length):Zd.before(n):Ds(t)?Zd(n,i-1):t},lk=e(ak,!0),ck=e(ak,!1),dk=(e,t)=>{const n=e=>e.stopImmediatePropagation();e.on("beforeinput input",n,!0),e.getDoc().execCommand(t),e.off("beforeinput input",n)},uk=e=>{e.execCommand("delete")},hk=e=>dk(e,"Delete"),pk=e=>dk(e,"ForwardDelete"),fk=e=>t=>vn(Mi(t),e,xi),mk=e=>os(e)||ss(e),gk=(e,t)=>Si(e,t)?oo(t,mk,fk(e)):K.none(),vk=(e,t=!0)=>{e.dom.isEmpty(e.getBody())&&e.setContent("",{no_selection:!t})},yk=(e,t,n)=>_n(km(n),xm(n),(i,o)=>{const r=ak(!0,i),s=ak(!1,o),a=ak(!1,t);return e?wm(n,a).exists(e=>e.isEqual(s)&&t.isEqual(r)):Cm(n,a).exists(e=>e.isEqual(r)&&t.isEqual(s))}).getOr(!0),bk=e=>(Hn(e)?Pi(e):zi(e)).bind(bk).orThunk(()=>K.some(e)),_k=(e,t,n,i=!0)=>{var o;t.deleteContents();const r=bk(n).getOr(n),s=yi.fromDom(null!==(o=e.dom.getParent(r.dom,e.dom.isBlock))&&void 0!==o?o:n.dom);
vendor: 5,913 bytes, line 29
29if(s.dom===e.getBody()?vk(e,i):ua(s)&&(ps(s),i&&e.selection.setCursorLocation(s.dom,0)),!xi(n,s)){const e=vn(Mi(s),n)?[]:Ii(s);oe(e.concat(Fi(n)),e=>{xi(e,s)||Si(e,s)||!ua(e)||Po(e)})}},wk=(e,t,n)=>io(e,t,n).isSome(),Ck=(e,t)=>ro(e,t).isSome(),kk=(e,t)=>ao(e,t).isSome(),xk=e=>t=>xi(e,t),Sk=e=>ar(e,"td,th"),Ek=(e,t)=>sg(yi.fromDom(e),t),Dk=e=>_n(e.startTable,e.endTable,(t,n)=>{const i=kk(t,e=>xi(e,n)),o=kk(n,e=>xi(e,t));return i||o?{...e,startTable:i?K.none():e.startTable,endTable:o?K.none():e.endTable,isSameTable:!1,isMultiTable:!1}:e}).getOr(e),Tk=e=>Dk(e),Ak=(e,t)=>{const n=Ek(e.startContainer,t),i=Ek(e.endContainer,t),o=n.isSome(),r=i.isSome(),s=_n(n,i,xi).getOr(!1);return Tk({startTable:n,endTable:i,isStartInTable:o,isEndInTable:r,isSameTable:s,isMultiTable:!s&&o&&r})},Mk=(e,t)=>({start:e,end:t}),Rk=(e,t,n)=>({rng:e,table:t,cells:n}),Nk=Fu.generate([{singleCellTable:["rng","cell"]},{fullTable:["table"]},{partialTable:["cells","outsideDetails"]},{multiTable:["startTableCells","endTableCells","betweenRng"]}]),Ik=(e,t)=>uo(yi.fromDom(e),"td,th",t),Pk=e=>!xi(e.start,e.end),Ok=(e,t)=>sg(e.start,t).bind(n=>sg(e.end,t).bind(e=>Cn(xi(n,e),n))),Lk=(e,t)=>!Pk(e)&&Ok(e,t).exists(e=>{const t=e.dom.rows;return 1===t.length&&1===t[0].cells.length}),Bk=(e,t)=>{const n=Ik(e.startContainer,t),i=Ik(e.endContainer,t);return _n(n,i,Mk)},Fk=e=>t=>sg(t,e).bind(e=>Ce(Sk(e)).map(e=>Mk(t,e))),Hk=e=>t=>sg(t,e).bind(e=>we(Sk(e)).map(e=>Mk(e,t))),$k=e=>t=>Ok(t,e).map(e=>Rk(t,e,Sk(e))),zk=(e,t,n,i)=>{if(n.collapsed||!e.forall(Pk))return K.none();if(t.isSameTable){const t=e.bind($k(i));return K.some({start:t,end:t})}{const e=Ik(n.startContainer,i),t=Ik(n.endContainer,i),o=e.bind(Fk(i)).bind($k(i)),r=t.bind(Hk(i)).bind($k(i));return K.some({start:o,end:r})}},jk=(e,t)=>he(e,e=>xi(e,t)),qk=e=>_n(jk(e.cells,e.rng.start),jk(e.cells,e.rng.end),(t,n)=>e.cells.slice(t,n+1)),Uk=(e,t,n)=>e.exists(e=>Lk(e,n)&&ug(e.start,t)),Wk=(e,t)=>{const{startTable:n,endTable:i}=t,o=e.cloneRange();return n.each(e=>o.setStartAfter(e.dom)),i.each(e=>o.setEndBefore(e.dom)),o},Vk=(e,t,n,i)=>zk(e,t,n,i).bind(({start:e,end:t})=>e.or(t)).bind(e=>{const{isSameTable:i}=t,o=qk(e).getOr([]);if(i&&e.cells.length===o.length)return K.some(Nk.fullTable(e.table));if(o.length>0){if(i)return K.some(Nk.partialTable(o,K.none()));{const e=Wk(n,t);return K.some(Nk.partialTable(o,K.some({...t,rng:e})))}}return K.none()}),Yk=(e,t,n,i)=>zk(e,t,n,i).bind(({start:e,end:i})=>{const o=e.bind(qk).getOr([]),r=i.bind(qk).getOr([]);if(o.length>0&&r.length>0){const e=Wk(n,t);return K.some(Nk.multiTable(o,r,e))}return K.none()}),Gk=(e,t)=>{const n=xk(e),i=Bk(t,n),o=Ak(t,n);return Uk(i,t,n)?i.map(e=>Nk.singleCellTable(t,e.start)):o.isMultiTable?Yk(i,o,t,n):Vk(i,o,t,n)},Kk=e=>oe(e,e=>{Zn(e,"contenteditable"),ps(e)}),Xk=(e,t)=>K.from(e.dom.getParent(t,e.dom.isBlock)).map(yi.fromDom),Qk=(e,t,n)=>{n.each(n=>{t?Po(n):(ps(n),e.selection.setCursorLocation(n.dom,0))})},Zk=(e,t,n,i)=>{const o=n.cloneRange();i?(o.setStart(n.startContainer,n.startOffset),o.setEndAfter(t.dom.lastChild)):(o.setStartBefore(t.dom.firstChild),o.setEnd(n.endContainer,n.endOffset)),nx(e,o,t,!1).each(e=>e())},Jk=e=>{const t=rg(e),n=yi.fromDom(e.selection.getNode());Or(n.dom)&&ua(n)?e.selection.setCursorLocation(n.dom,0):e.selection.collapse(!0),t.length>1&&ne(t,e=>xi(e,n))&&Yn(n,"data-mce-selected","1")},ex=(e,t,n)=>K.some(()=>{const i=e.selection.getRng(),o=n.bind(({rng:n,isStartInTable:o})=>{const r=Xk(e,o?n.endContainer:n.startContainer);n.deleteContents(),Qk(e,o,r.filter(ua));const s=o?t[0]:t[t.length-1];return Zk(e,s,i,o),ua(s)?K.none():K.some(o?t.slice(1):t.slice(0,-1))}).getOr(t);Kk(o),Jk(e)}),tx=(e,t,n,i)=>K.some(()=>{const o=e.selection.getRng(),r=t[0],s=n[n.length-1];Zk(e,r,o,!0),Zk(e,s,o,!1);const a=ua(r)?t:t.slice(1),l=ua(s)?n:n.slice(0,-1);Kk(a.concat(l)),i.deleteContents(),Jk(e)}),nx=(e,t,n,i=!0)=>K.some(()=>{_k(e,t,n,i)}),ix=(e,t)=>K.some(()=>ZC(e,!1,t)),ox=(t,n,i)=>Gk(n,i).bind(n=>n.fold(e(nx,t),e(ix,t),e(ex,t),e(tx,t))),rx=(e,t)=>ux(e,t),sx=(e,t,n,i)=>cx(t,i).fold(()=>ox(e,t,n),t=>rx(e,t)),ax=(e,t,n)=>{const i=yi.fromDom(e.getBody()),o=e.selection.getRng();return 0!==n.length?ex(e,n,K.none()):sx(e,i,o,t)},lx=(e,t)=>ue(zw(t,e),ls),cx=(e,t)=>ue(zw(t,e),Wn("caption")),dx=(e,t,n,i,o)=>ym(n,e.getBody(),o).bind(e=>lx(t,yi.fromDom(e.getNode())).bind(e=>xi(e,i)?K.none():K.some(B))),ux=(e,t)=>K.some(()=>{ps(t),e.selection.setCursorLocation(t.dom,0)}),hx=(e,t,n,i)=>km(e.dom).bind(o=>xm(e.dom).map(e=>t?n.isEqual(o)&&i.isEqual(e):n.isEqual(e)&&i.isEqual(o))).getOr(!0),px=(e,t)=>ux(e,t),fx=(e,t,n)=>cx(e,yi.fromDom(n.getNode())).fold(()=>K.some(B),e=>Cn(!xi(e,t),B)),mx=(e,t,n,i,o)=>ym(n,e.getBody(),o).fold(()=>K.some(B),r=>hx(i,n,o,r)?px(e,i):fx(t,i,r)),gx=(e,t,n,i)=>{const o=Zd.fromRangeStart(e.selection.getRng());return lx(n,i).bind(i=>ua(i)?ux(e,i):dx(e,n,t,i,o))},vx=(e,t,n,i)=>{const o=Zd.fromRangeStart(e.selection.getRng());return ua(i)?ux(e,i):mx(e,n,t,i,o)},yx=(e,t)=>e?Pw(t):Ow(t),bx=(e,t)=>{const n=Zd.fromRangeStart(e.selection.getRng());return yx(t,n)||vm(t,e.getBody(),n).exists(e=>yx(t,e))},_x=(e,t,n)=>{const i=yi.fromDom(e.getBody());return cx(i,n).fold(()=>gx(e,t,i,n).orThunk(()=>Cn(bx(e,t),B)),n=>vx(e,t,i,n))},wx=(e,t)=>{const n=yi.fromDom(e.selection.getStart(!0)),i=rg(e);return e.selection.isCollapsed()&&0===i.length?_x(e,t,n):ax(e,n,i)},Cx=(e,t)=>{let n=t;for(;n&&n!==e;){if(Ir(n)||Pr(n))return n;n=n.parentNode}return null},kx=["data-ephox-","data-mce-","data-alloy-","data-snooker-","_"],xx=gn.each,Sx=e=>{const t=e.dom,n=new Set(e.serializer.getTempAttrs()),i=(e,n)=>{if(e.nodeName!==n.nodeName||e.nodeType!==n.nodeType)return!1;const i=e=>{const n={};return xx(t.getAttribs(e),i=>{const r=i.nodeName.toLowerCase();"style"===r||o(r)||(n[r]=t.getAttrib(e,r))}),n},r=(e,t)=>{for(const n in e)if(Fe(e,n)){const i=t[n];if(R(i))return!1;if(e[n]!==i)return!1;delete t[n]}for(const e in t)if(Fe(t,e))return!1;return!0};
vendor: 4,282 bytes, line 29
29if(hr(e)&&hr(n)){if(!r(i(e),i(n)))return!1;if(!r(t.parseStyle(t.getAttrib(e,"style")),t.parseStyle(t.getAttrib(n,"style"))))return!1}return!Km(e)&&!Km(n)},o=e=>ne(kx,t=>ft(e,t))||n.has(e);return{compare:i,isAttributeInternal:o}},Ex=e=>["h1","h2","h3","h4","h5","h6"].includes(e.name),Dx=e=>"summary"===e.name,Tx=(e,t)=>{let n=e;for(;n=n.walk();)t(n)},Ax=(e,t,n,i)=>{const o=n.name;for(let t=0,r=e.length;t<r;t++){const r=e[t];if(r.name===o){const e=i.nodes[o];e?e.nodes.push(n):i.nodes[o]={filter:r,nodes:[n]}}}if(n.attributes)for(let e=0,o=t.length;e<o;e++){const o=t[e],r=o.name;if(r in n.attributes.map){const e=i.attributes[r];e?e.nodes.push(n):i.attributes[r]={filter:o,nodes:[n]}}}},Mx=(e,t,n)=>{const i={nodes:{},attributes:{}};return n.firstChild&&Tx(n,n=>{Ax(e,t,n,i)}),i},Rx=(e,t)=>{const n=(e,n)=>{Te(e,e=>{const i=ke(e.nodes);oe(e.filter.callbacks,o=>{for(let t=i.length-1;t>=0;t--){const o=i[t];(n?void 0!==o.attr(e.filter.name):o.name===e.filter.name)&&!N(o.parent)||i.splice(t,1)}i.length>0&&o(i,e.filter.name,t)})})};n(e.nodes,!1),n(e.attributes,!0)},Nx=(e,t,n,i={})=>{const o=Mx(e,t,n);Rx(o,i)},Ix=(e,t,n,i)=>{if((e.pad_empty_with_br||t.insert)&&n(i)){const e=new V_("br",1);t.insert&&e.attr("data-mce-bogus","1"),i.empty().append(e)}else i.empty().append(new V_("#text",3)).value=jr},Px=e=>{var t;return Ox(e,"#text")&&(null===(t=null==e?void 0:e.firstChild)||void 0===t?void 0:t.value)===jr},Ox=(e,t)=>{const n=null==e?void 0:e.firstChild;return I(n)&&n===e.lastChild&&n.name===t},Lx=(e,t)=>{const n=e.getElementRule(t.name);return!0===(null==n?void 0:n.paddEmpty)},Bx=(e,t,n,i)=>i.isEmpty(t,n,t=>Lx(e,t)),Fx=(e,t)=>I(e)&&(t(e)||"br"===e.name),Hx=e=>{let t;for(let n=e;n;n=n.parent){const e=n.attr("contenteditable");if("false"===e)break;"true"===e&&(t=n)}return K.from(t)},$x=(e,t,n=e.parent)=>{if(t.getSpecialElements()[e.name])e.empty().remove();else{const i=e.children();for(const e of i)n&&!t.isValidChild(n.name,e.name)&&$x(e,t,n);e.unwrap()}},zx=(e,t,n,i=B)=>{const o=t.getTextBlockElements(),r=t.getNonEmptyElements(),s=t.getWhitespaceElements(),a=gn.makeMap("tr,td,th,tbody,thead,tfoot,table,summary"),l=new Set,c=e=>e!==n&&!a[e.name];for(let n=0;n<e.length;n++){const a=e[n];let d,u,h;if(!a.parent||l.has(a))continue;if(o[a.name]&&"li"===a.parent.name){let e=a.next;for(;e&&o[e.name];)e.name="li",l.add(e),a.parent.insert(e,a.parent),e=e.next;a.unwrap();continue}const p=[a];for(d=a.parent;d&&!t.isValidChild(d.name,a.name)&&c(d);d=d.parent)p.push(d);if(d&&p.length>1)if(qx(t,a,d))$x(a,t);else{p.reverse(),u=p[0].clone(),i(u);let e=u;for(let n=0;n<p.length-1;n++){t.isValidChild(e.name,p[n].name)&&n>0?(h=p[n].clone(),i(h),e.append(h)):h=e;for(let e=p[n].firstChild;e&&e!==p[n+1];){const t=e.next;h.append(e),e=t}e=h}Bx(t,r,s,u)?d.insert(a,p[0],!0):(d.insert(u,p[0],!0),d.insert(a,u)),d=p[0],(Bx(t,r,s,d)||Ox(d,"br"))&&d.empty().remove()}else if(a.parent){if("li"===a.name){let e=a.prev;if(e&&("ul"===e.name||"ol"===e.name)){e.append(a);continue}if(e=a.next,e&&("ul"===e.name||"ol"===e.name)&&e.firstChild){e.insert(a,e.firstChild,!0);continue}const t=new V_("ul",1);i(t),a.wrap(t);continue}if(t.isValidChild(a.parent.name,"div")&&t.isValidChild("div",a.name)){const e=new V_("div",1);i(e),a.wrap(e)}else $x(a,t)}}},jx=(e,t)=>{let n=e;for(;n;){if(n.name===t)return!0;n=n.parent}return!1},qx=(e,t,n=t.parent)=>!!n&&(!(!e.children[t.name]||e.isValidChild(n.name,t.name))||(!("a"!==t.name||!jx(n,"a"))||!(!Dx(n)||!Ex(t))&&!((null==n?void 0:n.firstChild)===t&&(null==n?void 0:n.lastChild)===t))),Ux=(e,t,n,i)=>{const o=document.createRange();return o.setStart(e,t),o.setEnd(n,i),o},Wx=e=>{const t=Zd.fromRangeStart(e),n=Zd.fromRangeEnd(e),i=e.commonAncestorContainer;return vm(!1,i,n).map(o=>!Lf(t,n,i)&&Lf(t,o,i)?Ux(t.container(),t.offset(),o.container(),o.offset()):e).getOr(e)},Vx=e=>e.collapsed?e:Wx(e),Yx=e=>I(e.firstChild)&&e.firstChild===e.lastChild,Gx=e=>"br"===e.name||e.value===jr,Kx=(e,t)=>e.getBlockElements()[t.name]&&Yx(t)&&Gx(t.firstChild),Xx=(e,t)=>{const n=e.getNonEmptyElements();return I(t)&&(t.isEmpty(n)||Kx(e,t))},Qx=(e,t)=>{let n=t.firstChild,i=t.lastChild;return n&&"meta"===n.name&&(n=n.next),i&&"mce_marker"===i.attr("id")&&(i=i.prev),Xx(e,i)&&(i=null==i?void 0:i.prev),!(!n||n!==i)&&("ul"===n.name||"ol"===n.name)},Zx=e=>{var t,n;
29const i=e.firstChild,o=e.lastChild;return i&&"META"===i.nodeName&&(null===(t=i.parentNode)||void 0===t||t.removeChild(i)),o&&"mce_marker"===o.id&&(null===(n=o.parentNode)||void 0===n||n.removeChild(o)),e},Jx=(e,t,n)=>{const i=t.serialize(n),o=e.createFragment(i);return Zx(o)},eS=e=>{var t;return ae(null!==(t=null==e?void 0:e.childNodes)&&void 0!==t?t:[],e=>"LI"===e.nodeName)},tS=e=>e.data===jr||Rr(e),nS=e=>I(null==e?void 0:e.firstChild)&&e.firstChild===e.lastChild&&tS(e.firstChild),iS=e=>!e.firstChild||nS(e),oS=e=>e.length>0&&iS(e[e.length-1])?e.slice(0,-1):e,rS=(e,t)=>{const n=e.getParent(t,e.isBlock);return n&&"LI"===n.nodeName?n:null},sS=(e,t)=>!!rS(e,t),aS=(e,t)=>{const n=t.cloneRange(),i=t.cloneRange();return n.setStartBefore(e),i.setEndAfter(e),[n.cloneContents(),i.cloneContents()]},lS=(e,t)=>{
30const n=Zd.before(e),i=cm(t).next(n);return i?i.toRange():null},cS=(e,t)=>{const n=Zd.after(e),i=cm(t).prev(n);return i?i.toRange():null},dS=(e,t,n,i)=>{const o=aS(e,i),r=e.parentNode;return r&&(r.insertBefore(o[0],e),gn.each(t,t=>{r.insertBefore(t,e)}),r.insertBefore(o[1],e),r.removeChild(e)),cS(t[t.length-1],n)},uS=(e,t,n)=>{const i=e.parentNode;return i&&gn.each(t,t=>{i.insertBefore(t,e)}),lS(e,n)},hS=(e,t,n,i)=>(i.insertAfter(t.reverse(),e),cS(t[0],n)),pS=(e,t,n,i)=>{const o=Jx(t,e,i),r=rS(t,n.startContainer),s=oS(eS(o.firstChild)),a=1,l=2,c=t.getRoot(),d=e=>{const i=Zd.fromRangeStart(n),o=cm(t.getRoot()),s=e===a?o.prev(i):o.next(i),l=null==s?void 0:s.getNode();return!l||rS(t,l)!==r};return r?d(a)?uS(r,s,c):d(l)?hS(r,s,c,t):dS(r,s,c,n):null},fS=["pre"],mS=(e,t,n,i)=>{var o;const r=t.firstChild,s=t.lastChild,a=r===("bookmark"===s.attr("data-mce-type")?s.prev:s),l=te(fS,r.name);if(a&&l){const t="false"!==r.attr("contenteditable"),s=(null===(o=e.getParent(n,e.isBlock))||void 0===o?void 0:o.nodeName.toLowerCase())===r.name,a=K.from(Cx(i,n)).forall(Ir);return t&&s&&a}return!1},gS=Or,vS=(e,t,n)=>{if(I(n)){return n===e.getParent(t.endContainer,gS)&&ug(yi.fromDom(n),t)}return!1},yS=(e,t,n)=>{var i;if("all"===n.getAttribute("data-mce-bogus"))null===(i=n.parentNode)||void 0===i||i.insertBefore(e.dom.createFragment(t),n);else{const i=n.firstChild,o=n.lastChild;!i||i===o&&"BR"===i.nodeName?e.dom.setHTML(n,t):e.selection.setContent(t,{no_events:!0})}},bS=(e,t,n)=>{K.from(e.getParent(t,"td,th")).map(yi.fromDom).each(e=>fs(e,n))},_S=(e,t)=>{const n=e.schema.getTextInlineElements(),i=e.dom;if(t){const t=e.getBody(),o=Sx(e);gn.each(i.select("*[data-mce-fragment]"),e=>{if(I(n[e.nodeName.toLowerCase()])&&_w(i,e))for(let n=e.parentElement;I(n)&&n!==t;n=n.parentElement){if(Cw(i,e,n))break;if(o.compare(n,e)){i.remove(e,!0);break}}})}},wS=e=>{let t=e;for(;t=t.walk();)1===t.type&&t.attr("data-mce-fragment","1")},CS=e=>{gn.each(e.getElementsByTagName("*"),e=>{e.removeAttribute("data-mce-fragment")})},kS=e=>!!e.getAttribute("data-mce-fragment"),xS=(e,t)=>I(t)&&!e.schema.getVoidElements()[t.nodeName],SS=(e,t)=>{var n,i,o;let r;const s=e.dom,a=e.selection;if(!t)return;a.scrollIntoView(t);const l=Cx(e.getBody(),t);if(l&&"false"===s.getContentEditable(l))return s.remove(t),void a.select(l);let c=s.createRng();const d=t.previousSibling;if(Sr(d)){c.setStart(d,null!==(i=null===(n=d.nodeValue)||void 0===n?void 0:n.length)&&void 0!==i?i:0);const e=t.nextSibling;Sr(e)&&(d.appendData(e.data),null===(o=e.parentNode)||void 0===o||o.removeChild(e))}else c.setStartBefore(t),c.setEndBefore(t);const u=t=>{let n=Zd.fromRangeStart(t);return n=cm(e.getBody()).next(n),null==n?void 0:n.toRange()},h=s.getParent(t,s.isBlock);if(s.remove(t),h&&s.isEmpty(h)){const e=gS(h);Io(yi.fromDom(h)),c.setStart(h,0),c.setEnd(h,0),e||kS(h)||!(r=u(c))?s.add(h,s.create("br",e?{}:{"data-mce-bogus":"1"})):(c=r,s.remove(h))}a.setRng(c)},ES=e=>{const t=e.dom,n=Vx(e.selection.getRng());e.selection.setRng(n);const i=t.getParent(n.startContainer,gS);vS(t,n,i)?nx(e,n,yi.fromDom(i)):n.startContainer===n.endContainer&&n.endOffset-n.startOffset===1&&Sr(n.startContainer.childNodes[n.startOffset])?n.deleteContents():e.getDoc().execCommand("Delete",!1)},DS=e=>{for(let t=e;t;t=t.walk())if("mce_marker"===t.attr("id"))return K.some(t);return K.none()},TS=(e,t,n)=>{var i;return ne(n.children(),Ex)&&"SUMMARY"===(null===(i=e.getParent(t,e.isBlock))||void 0===i?void 0:i.nodeName)},AS=(e,t,n)=>{var i,o;const r=e.selection,s=e.dom,a=e.parser,l=n.merge,c=mw({validate:!0},e.schema),d='<span id="mce_marker" data-mce-type="bookmark">
vendor: 5,589 bytes, line 30
30&#xFEFF;</span>';n.preserve_zwsp||(t=vs(t)),-1===t.indexOf("{$caret}")&&(t+="{$caret}"),t=t.replace(/\{\$caret\}/,d);let u=r.getRng();const h=u.startContainer,p=e.getBody();h===p&&r.isCollapsed()&&s.isBlock(p.firstChild)&&xS(e,p.firstChild)&&s.isEmpty(p.firstChild)&&(u=s.createRng(),u.setStart(p.firstChild,0),u.setEnd(p.firstChild,0),r.setRng(u)),r.isCollapsed()||ES(e);const f=r.getNode(),m={context:f.nodeName.toLowerCase(),data:n.data,insert:!0},g=a.parse(t,m);if(!0===n.paste&&Qx(e.schema,g)&&sS(s,f))return u=pS(c,s,r.getRng(),g),u&&r.setRng(u),t;!0===n.paste&&mS(s,g,f,e.getBody())&&(null===(i=g.firstChild)||void 0===i||i.unwrap()),wS(g);let v=g.lastChild;if(v&&"mce_marker"===v.attr("id")){const t=v;for(v=v.prev;v;v=v.walk(!0))if(3===v.type||!s.isBlock(v.name)){v.parent&&e.schema.isValidChild(v.parent.name,"span")&&v.parent.insert(t,v,"br"===v.name);break}}if(e._selectionOverrides.showBlockCaretContainer(f),m.invalid||TS(s,f,g)){e.selection.setContent(d);let n,i=r.getNode();const l=e.getBody();for(Ar(i)?i=n=l:n=i;n&&n!==l;)i=n,n=n.parentNode;t=i===l?l.innerHTML:s.getOuterHTML(i);const u=a.parse(t),h=DS(u),p=h.bind(Hx).getOr(u);h.each(e=>e.replace(g));const f=g.children(),m=null!==(o=g.parent)&&void 0!==o?o:u;g.unwrap();const v=ae(f,t=>qx(e.schema,t,m));zx(v,e.schema,p),Nx(a.getNodeFilters(),a.getAttributeFilters(),u),t=c.serialize(u),i===l?s.setHTML(l,t):s.setOuterHTML(i,t)}else t=c.serialize(g),yS(e,t,f);return _S(e,l),SS(e,s.get("mce_marker")),CS(e.getBody()),bS(s,r.getStart(),e.schema),Ta(e.schema,e.getBody(),r.getStart()),t},MS=e=>e instanceof V_,RS=e=>{m_(e)&&km(e.getBody()).each(t=>{const n=t.getNode(),i=Cr(n)?km(n).getOr(t):t;e.selection.setRng(i.toRange())})},NS=(e,t,n)=>{e.dom.setHTML(e.getBody(),t),!0!==n&&RS(e)},IS=(e,t,n,i)=>{if(0===(n=vs(n)).length||/^\s+$/.test(n)){const o='<br data-mce-bogus="1">';"TABLE"===t.nodeName?n="<tr><td>"+o+"</td></tr>":/^(UL|OL)$/.test(t.nodeName)&&(n="<li>"+o+"</li>");const r=dh(e);return e.schema.isValidChild(t.nodeName.toLowerCase(),r.toLowerCase())?(n=o,n=e.dom.createHTML(r,uh(e),n)):n||(n=o),NS(e,n,i.no_selection),{content:n,html:n}}{"raw"!==i.format&&(n=mw({validate:!1},e.schema).serialize(e.parser.parse(n,{isRootContent:!0,insert:!0})));const o=cs(yi.fromDom(t))?n:gn.trim(n);return NS(e,o,i.no_selection),{content:o,html:o}}},PS=(e,t,n,i)=>{Nx(e.parser.getNodeFilters(),e.parser.getAttributeFilters(),n);const o=mw({validate:!1},e.schema).serialize(n),r=vs(cs(yi.fromDom(t))?o:gn.trim(o));return NS(e,r,i.no_selection),{content:n,html:r}},OS=(e,t,n)=>K.from(e.getBody()).map(i=>MS(t)?PS(e,i,t,n):IS(e,i,t,n)).getOr({content:t,html:MS(n.content)?"":n.content}),LS=e=>P(e)?e:Y,BS=(e,t,n)=>{let i=e.dom;const o=LS(n);for(;i.parentNode;){i=i.parentNode;const e=yi.fromDom(i),n=t(e);if(n.isSome())return n;if(o(e))break}return K.none()},FS=(e,t,n)=>{const i=t(e),o=LS(n);return i.orThunk(()=>o(e)?K.none():BS(e,t,o))},HS=Ag,$S=(e,t,n)=>{const i=e.formatter.get(n);if(i)for(let n=0;n<i.length;n++){const o=i[n];if($g(o)&&!1===o.inherit&&e.dom.is(t,o.selector))return!0}return!1},zS=(e,t,n,i,o)=>{const r=e.dom.getRoot();if(t===r)return!1;const s=e.dom.getParent(t,t=>!!$S(e,t,n)||(t.parentNode===r||!!US(e,t,n,i,!0)));return!!US(e,s,n,i,o)},jS=(e,t,n)=>!(!zg(n)||!HS(t,n.inline))||(!(!Bg(n)||!HS(t,n.block))||!!$g(n)&&(hr(t)&&e.is(t,n.selector))),qS=(e,t,n,i,o,r)=>{const s=n[i],a="attributes"===i;if(P(n.onmatch))return n.onmatch(t,n,i);if(s)if(je(s)){for(let n=0;n<s.length;n++)if(a?e.getAttrib(t,s[n]):Rg(e,t,s[n]))return!0}else for(const i in s)if(Fe(s,i)){const l=a?e.getAttrib(t,i):Rg(e,t,i),c=Tg(s[i],r),d=N(l)||wt(l);if(d&&N(c))continue;if(o&&d&&!n.exact)return!1;if((!o||n.exact)&&!HS(l,Mg(c,i)))return!1}return!0},US=(e,t,n,i,o)=>{const r=e.formatter.get(n),s=e.dom;if(r&&hr(t))for(let n=0;n<r.length;n++){const a=r[n];if(jS(e.dom,t,a)&&qS(s,t,a,"attributes",o,i)&&qS(s,t,a,"styles",o,i)){const n=a.classes;if(n)for(let o=0;o<n.length;o++)if(!e.dom.hasClass(t,Tg(n[o],i)))return;return a}}},WS=(e,t,n,i,o)=>{if(i)return zS(e,i,t,n,o);if(i=e.selection.getNode(),zS(e,i,t,n,o))return!0;const r=e.selection.getStart();return!(r===i||!zS(e,r,t,n,o))},VS=(e,t,n)=>{const i=[],o={},r=e.selection.getStart();return e.dom.getParent(r,r=>{for(let s=0;s<t.length;s++){const a=t[s];!o[a]&&US(e,r,a,n)&&(o[a]=!0,i.push(a))}},e.dom.getRoot()),i},YS=(e,t)=>{const n=t=>xi(t,yi.fromDom(e.getBody())),i=(t,n)=>US(e,t.dom,n)?K.some(n):K.none();return K.from(e.selection.getStart(!0)).bind(e=>FS(yi.fromDom(e),e=>xe(t,t=>i(e,t)),n)).getOrNull()},GS=(e,t)=>{const n=e.formatter.get(t),i=e.dom;if(n&&e.selection.isEditable()){const t=e.selection.getStart(),o=Ig(i,t);for(let e=n.length-1;e>=0;e--){const t=n[e];if(!$g(t))return!0;for(let e=o.length-1;e>=0;e--)if(i.is(o[e],t.selector))return!0}}return!1},KS=(e,t,n)=>ce(n,(n,i)=>{const o=Og(e,i);return e.formatter.matchNode(t,i,{},o)?n.concat([i]):n},[]),XS=ms,QS=(e,t)=>e.importNode(t,!0),ZS=e=>{if(e){const t=new cr(e,e);for(let e=t.current();e;e=t.next())if(Sr(e))return e}return null},JS=e=>{const t=yi.fromTag("span");return Gn(t,{id:Sm,"data-mce-bogus":"1","data-mce-type":"format-caret"}),e&&Ao(t,yi.fromText(XS)),t},eE=e=>{const t=ZS(e);return t&&t.data.charAt(0)===XS&&t.deleteData(0,1),t},tE=(e,t,n)=>{const i=e.dom,o=e.selection;if(Wg(t))ZC(e,!1,yi.fromDom(t),n,!0);else{const e=o.getRng(),n=i.getParent(t,i.isBlock),r=e.startContainer,s=e.startOffset,a=e.endContainer,l=e.endOffset,c=eE(t);i.remove(t,!0),r===c&&s>0&&e.setStart(c,s-1),a===c&&l>0&&e.setEnd(c,l-1),n&&i.isEmpty(n)&&ps(yi.fromDom(n)),o.setRng(e)}},nE=(e,t,n)=>{const i=e.dom,o=e.selection;
vendor: 5,428 bytes, line 30
30if(t)tE(e,t,n);else if(!(t=Dm(e.getBody(),o.getStart())))for(;t=i.get(Sm);)tE(e,t,n)},iE=(t,n,i)=>{var o,r;const s=t.dom,a=s.getParent(i,e(Cg,t.schema));a&&s.isEmpty(a)?null===(o=i.parentNode)||void 0===o||o.replaceChild(n,i):(us(yi.fromDom(i)),s.isEmpty(i)?null===(r=i.parentNode)||void 0===r||r.replaceChild(n,i):s.insertAfter(n,i))},oE=(e,t)=>(e.appendChild(t),t),rE=(e,t)=>{var n;const i=le(e,(e,t)=>oE(e,t.cloneNode(!1)),t),o=null!==(n=i.ownerDocument)&&void 0!==n?n:document;return oE(i,o.createTextNode(XS))},sE=(e,t,n,i,o,r)=>{const s=e.formatter,a=e.dom,l=ae(Ee(s.get()),e=>e!==i&&!pt(e,"removeformat")),c=KS(e,n,l);if(ae(c,t=>!Lg(e,t,i)).length>0){const e=n.cloneNode(!1);return a.add(t,e),s.remove(i,o,e,r),a.remove(e),K.some(e)}return K.none()},aE=(e,t,n)=>{let i;const o=e.selection,r=e.formatter.get(t);if(!r)return;const s=o.getRng();let a=s.startOffset;const l=s.startContainer.nodeValue;i=Dm(e.getBody(),o.getStart());const c=/[^\s\u00a0\u00ad\u200b\ufeff]/;if(l&&a>0&&a<l.length&&c.test(l.charAt(a))&&c.test(l.charAt(a-1))){const i=o.getBookmark();s.collapse(!0);let a=lv(e.dom,s,r);a=Wy(a),e.formatter.apply(t,n,a),o.moveToBookmark(i)}else{let r=i?ZS(i):null;i&&(null==r?void 0:r.data)===XS||(i=QS(e.getDoc(),JS(!0).dom),r=i.firstChild,s.insertNode(i),a=1),e.formatter.apply(t,n,i),o.setCursorLocation(r,a)}},lE=(e,t,n,i)=>{const o=e.dom,r=e.selection;let s=!1;const a=e.formatter.get(t);if(!a)return;const l=r.getRng(),c=l.startContainer,d=l.startOffset;let u=c;Sr(c)&&(d!==c.data.length&&(s=!0),u=u.parentNode);const h=[];let p;for(;u;){if(US(e,u,t,n,i)){p=u;break}u.nextSibling&&(s=!0),h.push(u),u=u.parentNode}if(p)if(s){const s=r.getBookmark();l.collapse(!0);let c=lv(o,l,a,!0);c=Wy(c),e.formatter.remove(t,n,c,i),r.moveToBookmark(s)}else{const s=Dm(e.getBody(),p),a=I(s)?o.getParents(p.parentNode,G,s):[],l=JS(!1).dom;iE(e,l,null!=s?s:p);const c=sE(e,l,p,t,n,i),d=rE([...h,...c.toArray(),...a],l);s&&tE(e,s,I(s)),r.setCursorLocation(d,1),o.isEmpty(p)&&o.remove(p)}},cE=(e,t,n)=>{const i=e.selection,o=e.getBody();nE(e,null,n),8!==t&&46!==t||!i.isCollapsed()||i.getStart().innerHTML!==XS||nE(e,Dm(o,i.getStart()),!0),37!==t&&39!==t||nE(e,Dm(o,i.getStart()),!0)},dE=e=>Sr(e)&&mt(e.data,jr),uE=e=>{e.on("mouseup keydown",t=>{cE(e,t.keyCode,dE(e.selection.getRng().endContainer))})},hE=e=>{const t=JS(!1),n=rE(e,t.dom);return{caretContainer:t,caretPosition:Zd(n,0)}},pE=(e,t)=>{const{caretContainer:n,caretPosition:i}=hE(t);return Eo(yi.fromDom(e),n),Po(yi.fromDom(e)),i},fE=(e,t)=>{const{caretContainer:n,caretPosition:i}=hE(t);return e.insertNode(n.dom),i},mE=(e,t)=>{if(Em(t.dom))return!1;const n=e.schema.getTextInlineElements();return Fe(n,Ln(t))&&!Em(t.dom)&&!_r(t.dom)},gE={},vE=gr(["pre"]),yE=(e,t)=>{gE[e]||(gE[e]=[]),gE[e].push(t)},bE=(e,t)=>{Fe(gE,e)&&oe(gE[e],e=>{e(t)})};yE("pre",e=>{const t=e.selection.getRng(),n=e=>t=>{const n=t.previousSibling;return vE(n)&&te(e,n)},i=(e,t)=>{const n=yi.fromDom(t),i=Di(n).dom;Po(n),No(yi.fromDom(e),[yi.fromTag("br",i),yi.fromTag("br",i),...Fi(n)])};if(!t.collapsed){const t=e.selection.getSelectedBlocks(),o=ae(ae(t,vE),n(t));oe(o,e=>{i(e.previousSibling,e)})}});const _E=["fontWeight","fontStyle","color","fontSize","fontFamily"],wE=e=>E(e.styles)&&ne(Ee(e.styles),e=>te(_E,e)),CE=e=>ue(e,e=>zg(e)&&"span"===e.inline&&wE(e)),kE=(e,t)=>{const n=e.get(t);return T(n)?CE(n):K.none()},xE=(e,t)=>Cm(t,Zd.fromRangeStart(e)).isNone(),SE=(e,t)=>!1===wm(t,Zd.fromRangeEnd(e)).exists(e=>!Rr(e.getNode())||wm(t,e).isSome()),EE=e=>t=>Fr(t)&&e.isEditable(t),DE=e=>{const t=e.getSelectedBlocks(),n=e.getRng();if(e.isCollapsed())return[];if(1===t.length)return xE(n,t[0])&&SE(n,t[0])?t:[];{const e=we(t).filter(e=>xE(n,e)).toArray(),i=Ce(t).filter(e=>SE(n,e)).toArray(),o=t.slice(1,-1);return e.concat(o).concat(i)}},TE=e=>ae(DE(e),EE(e.dom)),AE=e=>ae(e.getSelectedBlocks(),EE(e.dom)),ME=gn.each,RE=e=>hr(e)&&!Km(e)&&!Em(e)&&!_r(e),NE=(e,t)=>{for(let n=e;n;n=n[t]){if(Sr(n)&&_t(n.data))return e;if(hr(n)&&!Km(n))return n}return e},IE=(e,t,n)=>{const i=Sx(e),o=pr(t)&&e.dom.isEditable(t),r=pr(n)&&e.dom.isEditable(n);if(o&&r){const o=NE(t,"previousSibling"),r=NE(n,"nextSibling");if(i.compare(o,r)){for(let e=o.nextSibling;e&&e!==r;){const t=e;e=e.nextSibling,o.appendChild(t)}return e.dom.remove(r),gn.each(gn.grep(r.childNodes),e=>{o.appendChild(e)}),o}}return n},PE=(e,t,n,i)=>{var o;if(i&&!1!==t.merge_siblings){const t=null!==(o=IE(e,wg(i),i))&&void 0!==o?o:i;IE(e,t,wg(t,!0))}},OE=(e,t,n)=>{if(t.clear_child_styles){const i=t.links?"*:not(a)":"*";ME(e.select(i,n),n=>{RE(n)&&e.isEditable(n)&&ME(t.styles,(t,i)=>{e.setStyle(n,i,"")})})}},LE=(e,t,n)=>{ME(e.childNodes,e=>{RE(e)&&(t(e)&&n(e),e.hasChildNodes()&&LE(e,t,n))})},BE=(e,t)=>{"SPAN"===t.nodeName&&0===e.getAttribs(t).length&&e.remove(t,!0)},FE=(e,t)=>n=>!(!n||!Rg(e,n,t)),HE=(e,t,n)=>i=>{e.setStyle(i,t,n),""===i.getAttribute("style")&&i.removeAttribute("style"),BE(e,i)},$E=Fu.generate([{keep:[]},{rename:["name"]},{removed:[]}]),zE=/^(src|href|style)$/,jE=gn.each,qE=Ag,UE=e=>/^(TR|TH|TD)$/.test(e.nodeName),WE=(e,t,n)=>e.isChildOf(t,n)&&t!==n&&!e.isBlock(n),VE=(e,t,n)=>{let i=t[n?"startContainer":"endContainer"],o=t[n?"startOffset":"endOffset"];if(hr(i)){const e=i.childNodes.length-1;!n&&o&&o--,i=i.childNodes[o>e?e:o]}return Sr(i)&&n&&o>=i.data.length&&(i=new cr(i,e.getBody()).next()||i),Sr(i)&&!n&&0===o&&(i=new cr(i,e.getBody()).prev()||i),i},YE=(e,t)=>{const n=t?"firstChild":"lastChild",i=e[n];
vendor: 13,115 bytes, line 30
30return UE(e)&&i?"TR"===e.nodeName&&i[n]||i:e},GE=(e,t,n,i)=>{var o;const r=e.create(n,i);return null===(o=t.parentNode)||void 0===o||o.insertBefore(r,t),r.appendChild(t),r},KE=(e,t,n,i,o)=>{const r=yi.fromDom(t),s=yi.fromDom(e.create(i,o)),a=n?Bi(r):Li(r);return No(s,a),n?(Eo(r,s),To(s,r)):(Do(r,s),Ao(s,r)),s.dom},XE=(e,t)=>t.links&&"A"===e.nodeName,QE=(e,t,n)=>{const i=t.parentNode;let o;const r=e.dom,s=dh(e);Bg(n)&&i===r.getRoot()&&(n.list_block&&qE(t,n.list_block)||oe(ke(t.childNodes),t=>{kg(e,s,t.nodeName.toLowerCase())?o?o.appendChild(t):(o=GE(r,t,s),r.setAttribs(o,uh(e))):o=null})),jg(n)&&!qE(n.inline,t)||r.remove(t,!0)},ZE=(e,t,n)=>O(e)?{name:t,value:null}:{name:e,value:Tg(t,n)},JE=(e,t)=>{""===e.getAttrib(t,"style")&&(t.removeAttribute("style"),t.removeAttribute("data-mce-style"))},eD=(e,t,n,i,o)=>{let r=!1;jE(n.styles,(s,a)=>{const{name:l,value:c}=ZE(a,s,i),d=Mg(c,l);(n.remove_similar||A(c)||!hr(o)||qE(Rg(e,o,l),d))&&e.setStyle(t,l,""),r=!0}),r&&JE(e,t)},tD=(e,t,n)=>{"removeformat"===t?oe(AE(e.selection),t=>{oe(_E,n=>e.dom.setStyle(t,n,"")),JE(e.dom,t)}):kE(e.formatter,t).each(t=>{oe(AE(e.selection),i=>eD(e.dom,i,t,n,null))})},nD=(e,t,n,i,o)=>{const r=e.dom,s=Sx(e),a=e.schema;if(zg(t)&&Ma(a,t.inline)&&Na(a,i)&&i.parentElement===e.getBody())return QE(e,i,t),$E.removed();if(!t.ceFalseOverride&&i&&"false"===r.getContentEditableParent(i))return $E.keep();if(i&&!jS(r,i,t)&&!XE(i,t))return $E.keep();const l=i,c=t.preserve_attributes;if(zg(t)&&"all"===t.remove&&T(c)){const e=ae(r.getAttribs(l),e=>te(c,e.name.toLowerCase()));if(r.removeAllAttribs(l),oe(e,e=>r.setAttrib(l,e.name,e.value)),e.length>0)return $E.rename("span")}if("all"!==t.remove){eD(r,l,t,n,o),jE(t.attributes,(e,i)=>{const{name:s,value:a}=ZE(i,e,n);if(t.remove_similar||A(a)||!hr(o)||qE(r.getAttrib(o,s),a)){if("class"===s){const e=r.getAttrib(l,s);if(e){let t="";if(oe(e.split(/\s+/),e=>{/mce\-\w+/.test(e)&&(t+=(t?" ":"")+e)}),t)return void r.setAttrib(l,s,t)}}if(zE.test(s)&&l.removeAttribute("data-mce-"+s),"style"===s&&gr(["li"])(l)&&"none"===r.getStyle(l,"list-style-type"))return l.removeAttribute(s),void r.setStyle(l,"list-style-type","none");"class"===s&&l.removeAttribute("className"),l.removeAttribute(s)}}),jE(t.classes,e=>{e=Tg(e,n),hr(o)&&!r.hasClass(o,e)||r.removeClass(l,e)});const e=r.getAttribs(l);for(let t=0;t<e.length;t++){const n=e[t].nodeName;if(!s.isAttributeInternal(n))return $E.keep()}}return"none"!==t.remove?(QE(e,l,t),$E.removed()):$E.keep()},iD=(e,t,n,i,o)=>{let r;return t.parentNode&&oe(Ig(e.dom,t.parentNode).reverse(),t=>{if(!r&&hr(t)&&"_start"!==t.id&&"_end"!==t.id){const s=US(e,t,n,i,o);s&&!1!==s.split&&(r=t)}}),r},oD=(e,t,n,i)=>nD(e,t,n,i,i).fold($(i),t=>(e.dom.createFragment().appendChild(i),e.dom.rename(i,t)),$(null)),rD=(e,t,n,i,o,r,s,a)=>{var l,c;let d,u;const h=e.dom;if(n){const p=n.parentNode;for(let n=i.parentNode;n&&n!==p;n=n.parentNode){let i=h.clone(n,!1);for(let n=0;n<t.length&&(i=oD(e,t[n],a,i),null!==i);n++);i&&(d&&i.appendChild(d),u||(u=i),d=i)}!r||s.mixed&&h.isBlock(n)||(i=null!==(l=h.split(n,i))&&void 0!==l?l:i),d&&u&&(null===(c=o.parentNode)||void 0===c||c.insertBefore(d,o),u.appendChild(o),zg(s)&&PE(e,s,a,d))}return i},sD=(e,t,n,i,o)=>{const r=e.formatter.get(t),s=r[0],a=e.dom,l=e.selection,c=i=>{const a=iD(e,i,t,n,o);return rD(e,r,a,i,i,!0,s,n)},d=e=>Km(e)&&hr(e)&&("_start"===e.id||"_end"===e.id),u=t=>ne(r,i=>lD(e,i,n,t,t)),h=t=>{const n=ke(t.childNodes),i=u(t)||ne(r,e=>jS(a,t,e)),o=t.parentNode;if(!i&&I(o)&&qg(s)&&u(o),s.deep&&n.length)for(let e=0;e<n.length;e++)h(n[e]);oe(["underline","line-through","overline"],n=>{hr(t)&&e.dom.getStyle(t,"text-decoration")===n&&t.parentNode&&Ng(a,t.parentNode)===n&&lD(e,{deep:!1,exact:!0,inline:"span",styles:{textDecoration:n}},void 0,t)})},p=e=>{const t=a.get(e?"_start":"_end");if(t){let n=t[e?"firstChild":"lastChild"];return d(n)&&(n=n[e?"firstChild":"lastChild"]),Sr(n)&&0===n.data.length&&(n=e?t.previousSibling||t.nextSibling:t.nextSibling||t.previousSibling),a.remove(t,!0),n}return null},f=t=>{let n,i,o=lv(a,t,r,t.collapsed);if(s.split){if(o=Wy(o),n=VE(e,o,!0),i=VE(e,o),n!==i){if(n=YE(n,!0),i=YE(i,!1),WE(a,n,i)){const e=K.from(n.firstChild).getOr(n);return c(KE(a,e,!0,"span",{id:"_start","data-mce-type":"bookmark"})),void p(!0)}if(WE(a,i,n)){const e=K.from(i.lastChild).getOr(i);return c(KE(a,e,!1,"span",{id:"_end","data-mce-type":"bookmark"})),void p(!1)}n=GE(a,n,"span",{id:"_start","data-mce-type":"bookmark"}),i=GE(a,i,"span",{id:"_end","data-mce-type":"bookmark"});const e=a.createRng();e.setStartAfter(n),e.setEndBefore(i),cv(a,e,e=>{oe(e,e=>{Km(e)||Km(e.parentNode)||c(e)})}),c(n),c(i),n=p(!0),i=p()}else n=i=c(n);o.startContainer=n.parentNode?n.parentNode:n,o.startOffset=a.nodeIndex(n),o.endContainer=i.parentNode?i.parentNode:i,o.endOffset=a.nodeIndex(i)+1}cv(a,o,e=>{oe(e,h)})};if(i){if(gg(i)){const e=a.createRng();e.setStartBefore(i),e.setEndAfter(i),f(e)}else f(i);Ov(e,t,i,n)}else l.isCollapsed()&&zg(s)&&!rg(e).length?lE(e,t,n,o):(bg(e,()=>fg(e,f),i=>zg(s)&&WS(e,t,n,i)),e.nodeChanged()),tD(e,t,n),Ov(e,t,i,n)},aD=(e,t,n,i,o)=>{(i||e.selection.isEditable())&&sD(e,t,n,i,o)},lD=(e,t,n,i,o)=>nD(e,t,n,i,o).fold(Y,t=>(e.dom.rename(i,t),!0),G),cD=gn.each,dD=(e,t,n,i)=>{const o=t=>{if(pr(t)&&hr(t.parentNode)&&e.isEditable(t)){const n=Ng(e,t.parentNode);e.getStyle(t,"color")&&n?e.setStyle(t,"text-decoration",n):e.getStyle(t,"text-decoration")===n&&e.setStyle(t,"text-decoration",null)}};t.styles&&(t.styles.color||t.styles.textDecoration)&&(gn.walk(i,o,"childNodes"),o(i))},uD=(e,t,n,i)=>{if(t.styles&&t.styles.backgroundColor){const o=FE(e,"fontSize");LE(i,t=>o(t)&&e.isEditable(t),HE(e,"backgroundColor",Tg(t.styles.backgroundColor,n)))}},hD=(e,t,n,i)=>{if(zg(t)&&("sub"===t.inline||"sup"===t.inline)){const n=FE(e,"fontSize");LE(i,t=>n(t)&&e.isEditable(t),HE(e,"fontSize",""));const o=ae(e.select("sup"===t.inline?"sub":"sup",i),e.isEditable);e.remove(o,!0)}},pD=(e,t,n,i)=>{cD(t,t=>{zg(t)&&cD(e.dom.select(t.inline,i),i=>{RE(i)&&lD(e,t,n,i,t.exact?i:null)}),OE(e.dom,t,i)})},fD=(e,t,n,i,o)=>{const r=o.parentNode;US(e,r,n,i)&&lD(e,t,i,o)||t.merge_with_parents&&r&&e.dom.getParent(r,r=>!!US(e,r,n,i)&&(lD(e,t,i,o),!0))},mD=gn.each,gD=(e,t,n,i)=>{if(Kh(e)&&zg(t)&&n.parentNode){const t=Rl(e.schema),o=Ck(yi.fromDom(n),e=>Em(e.dom));return He(t,i)&&ua(yi.fromDom(n.parentNode),!1)&&!o}return!1},vD=(e,t,n,i)=>{if(mD(n.styles,(n,o)=>{e.setStyle(t,o,Tg(n,i))}),n.styles){const n=e.getAttrib(t,"style");n&&e.setAttrib(t,"data-mce-style",n)}},yD=(e,t,n,i)=>{const o=e.formatter.get(t),r=o[0],s=!i&&e.selection.isCollapsed(),a=e.dom,l=e.selection,c=(e,t=r)=>{P(t.onformat)&&t.onformat(e,t,n,i),vD(a,e,t,n),mD(t.attributes,(t,i)=>{a.setAttrib(e,i,Tg(t,n))}),mD(t.classes,t=>{const i=Tg(t,n);a.hasClass(e,i)||a.addClass(e,i)})},d=(e,t)=>{let n=!1;return mD(e,e=>!!$g(e)&&("false"===a.getContentEditable(t)&&!e.ceFalseOverride||(!(!I(e.collapsed)||e.collapsed===s)||(!(a.is(t,e.selector)&&!Em(t))||(c(t,e),n=!0,!1))))),n},u=e=>{if(S(e)){const t=a.create(e);return c(t),t}return null},h=(i,s,a)=>{const l=[];let h=!0;const p=r.inline||r.block,f=u(p),m=i=>Fg(r)&&US(e,i,t,n),g=(t,n,i)=>{const o=Hg(r)&&Cg(e.schema,t)&&kg(e,n,p);return i&&o},v=(t,n,o,s)=>{const l=t.nodeName.toLowerCase(),c=kg(e,p,l)&&kg(e,n,p),d=!a&&Sr(t)&&gs(t.data),u=Em(t),h=!zg(r)||!i.isBlock(t);return(o||s)&&c&&!d&&!u&&h};cv(i,s,t=>{let n;const s=t=>{let a=!1,u=h,y=!1;const b=t.parentNode,_=b.nodeName.toLowerCase(),w=i.getContentEditable(t);I(w)&&(u=h,h="true"===w,a=!0,y=Dg(e,t));const C=h&&!a;if(Rr(t)&&!gD(e,r,t,_))return n=null,void(Bg(r)&&i.remove(t));if(m(t))n=null;else{if(g(t,_,C)){const e=i.rename(t,p);return c(e),l.push(e),void(n=null)}if($g(r)){let e=d(o,t);if(!e&&I(b)&&qg(r)&&(e=d(o,b)),!zg(r)||e)return void(n=null)}I(f)&&v(t,_,C,y)?(n||(n=i.clone(f,!1),b.insertBefore(n,t),l.push(n)),y&&a&&(h=u),n.appendChild(t)):(n=null,oe(ke(t.childNodes),s),a&&(h=u),n=null)}};oe(t,s)}),!0===r.links&&oe(l,e=>{const t=e=>{"A"===e.nodeName&&c(e,r),oe(ke(e.childNodes),t)};t(e)}),oe(l,s=>{const a=e=>{let t=0;return oe(e.childNodes,e=>{Sg(e)||Km(e)||t++}),t},d=e=>{const t=ue(e.childNodes,vg).filter(e=>"false"!==i.getContentEditable(e)&&jS(i,e,r));return t.map(t=>{const n=i.clone(t,!1);return c(n),i.replace(n,e,!0),i.remove(t,!0),n}).getOr(e)},u=a(s);!(l.length>1)&&i.isBlock(s)||0!==u?(zg(r)||Bg(r)&&r.wrapper)&&(r.exact||1!==u||(s=d(s)),pD(e,o,n,s),fD(e,r,t,n,s),uD(i,r,n,s),dD(i,r,n,s),hD(i,r,n,s),PE(e,r,n,s)):i.remove(s,!0)})},p=gg(i)?i:l.getNode();if("false"===a.getContentEditable(p)&&!Dg(e,p))return d(o,i=p),void Pv(e,t,i,n);if(r){if(i)if(gg(i)){if(!d(o,i)){const e=a.createRng();e.setStartBefore(i),e.setEndAfter(i),h(a,lv(a,e,o),!0)}}else h(a,i,!0);else s&&zg(r)&&!rg(e).length?aE(e,t,n):(l.setRng(Vx(l.getRng())),bg(e,()=>{fg(e,(e,t)=>{const n=t?e:lv(a,e,o);h(a,n,!1)})},G),e.nodeChanged()),kE(e.formatter,t).each(t=>{oe(TE(e.selection),e=>vD(a,e,t,n))});bE(t,e)}Pv(e,t,i,n)},bD=(e,t,n,i)=>{(i||e.selection.isEditable())&&yD(e,t,n,i)},_D=e=>Fe(e,"vars"),wD=(e,t)=>{e.set({}),t.on("NodeChange",n=>{SD(t,n.element,e.get())}),t.on("FormatApply FormatRemove",n=>{const i=K.from(n.node).map(e=>gg(e)?e:e.startContainer).bind(e=>hr(e)?K.some(e):K.from(e.parentElement)).getOrThunk(()=>CD(t));SD(t,i,e.get())})},CD=e=>e.selection.getStart(),kD=(e,t,n,i,o)=>de(t,t=>{const r=e.formatter.matchNode(t,n,null!=o?o:{},i);return!R(r)},t=>!!$S(e,t,n)||!i&&I(e.formatter.matchNode(t,n,o,!0))),xD=(e,t)=>{const n=null!=t?t:CD(e);return ae(Ig(e.dom,n),e=>hr(e)&&!_r(e))},SD=(e,t,n)=>{const i=xD(e,t);Te(n,(n,o)=>{const r=n=>{const r=kD(e,i,o,n.similar,_D(n)?n.vars:void 0),s=r.isSome();if(n.state.get()!==s){n.state.set(s);const e=r.getOr(t);_D(n)?n.callback(s,{node:e,format:o,parents:i}):oe(n.callbacks,t=>t(s,{node:e,format:o,parents:i}))}};oe([n.withSimilar,n.withoutSimilar],r),oe(n.withVars,r)})},ED=(e,t,n,i,o,r)=>{const s=t.get();oe(n.split(","),t=>{const n=Be(s,t).getOrThunk(()=>{const e={withSimilar:{state:xc(!1),similar:!0,callbacks:[]},withoutSimilar:{state:xc(!1),similar:!1,callbacks:[]},withVars:[]};return s[t]=e,e}),a=()=>{const n=xD(e);return kD(e,n,t,o,r).isSome()};if(R(r)){const e=o?n.withSimilar:n.withoutSimilar;e.callbacks.push(i),1===e.callbacks.length&&e.state.set(a())}else n.withVars.push({state:xc(a()),similar:o,vars:r,callback:i})}),t.set(s)},DD=(e,t,n)=>{const i=e.get();oe(t.split(","),e=>Be(i,e).each(t=>{i[e]={withSimilar:{...t.withSimilar,callbacks:ae(t.withSimilar.callbacks,e=>e!==n)},withoutSimilar:{...t.withoutSimilar,callbacks:ae(t.withoutSimilar.callbacks,e=>e!==n)},withVars:ae(t.withVars,e=>e.callback!==n)}})),e.set(i)},TD=(e,t,n,i,o,r)=>(ED(e,t,n,i,o,r),{unbind:()=>DD(t,n,i)}),AD=(e,t,n,i)=>{const o=e.formatter.get(t);o&&(!WS(e,t,n,i)||"toggle"in o[0]&&!o[0].toggle?bD(e,t,n,i):aD(e,t,n,i))},MD=gn.explode,RD=()=>{const e={},t=(t,n)=>{oe(MD(t),t=>{Fe(e,t)||(e[t]={name:t,callbacks:[]}),e[t].callbacks.push(n)})},n=(t,n)=>{oe(MD(t),t=>{if(Fe(e,t))if(I(n)){const i=e[t],o=ae(i.callbacks,e=>e!==n);o.length>0?i.callbacks=o:delete e[t]}else delete e[t]})};return{addFilter:t,getFilters:()=>Le(e),removeFilter:n}},ND=(e,t)=>{oe(t,t=>{e.attr(t,null)})},ID=(e,t,n)=>{e.addNodeFilter("font",e=>{oe(e,e=>{const i=t.parse(e.attr("style")),o=e.attr("color"),r=e.attr("face"),s=e.attr("size");o&&(i.color=o),r&&(i["font-family"]=r),s&&kt(s).each(e=>{i["font-size"]=n[e-1]}),e.name="span",e.attr("style",t.serialize(i)),ND(e,["color","face","size"])})})},PD=(e,t,n)=>{e.addNodeFilter("strike",e=>{const i="html4"!==t.type;oe(e,e=>{if(i)e.name="s";else{const t=n.parse(e.attr("style"));t["text-decoration"]="line-through",e.name="span",e.attr("style",n.serialize(t))}})})},OD=(e,t,n)=>{var i;const o=Wl();t.convert_fonts_to_spans&&ID(e,o,gn.explode(null!==(i=t.font_size_legacy_values)&&void 0!==i?i:"")),PD(e,n,o)},LD=(e,t,n)=>{t.inline_styles&&OD(e,t,n)},BD=(e,t,n)=>{t.addNodeFilter("br",(t,i,o)=>{const r=gn.extend({},n.getBlockElements()),s=n.getNonEmptyElements(),a=n.getWhitespaceElements();r.body=1;const l=e=>e.name in r||Pa(n,e);for(let i=0,c=t.length;i<c;i++){let c=t[i],d=c.parent;if(d&&l(d)&&c===d.lastChild){let t=c.prev;for(;t;){const e=t.name;if("span"!==e||"bookmark"!==t.attr("data-mce-type")){"br"===e&&(c=null);break}t=t.prev}if(c&&(c.remove(),Bx(n,s,a,d))){const t=n.getElementRule(d.name);t&&(t.removeEmpty?d.remove():t.paddEmpty&&Ix(e,o,l,d))}}else{let e=c;for(;d&&d.firstChild===e&&d.lastChild===e&&(e=d,!r[d.name]);)d=d.parent;if(e===d){const e=new V_("#text",3);e.value=jr,c.replace(e)}}}})},FD=e=>fetch(e).then(e=>e.ok?e.blob():Promise.reject()).catch(()=>Promise.reject({message:`Cannot convert ${e} to Blob. Resource might not exist or is inaccessible.`,uriType:"blob"})),HD=e=>{const t=/([a-z0-9+\/=\s]+)/i.exec(e);return t?t[1]:""},$D=e=>{const[t,...n]=e.split(","),i=n.join(","),o=/data:([^/]+\/[^;]+)(;.+)?/.exec(t);if(o){const e=";base64"===o[2],t=e?HD(i):decodeURIComponent(i);return K.some({type:o[1],data:t,base64Encoded:e})}return K.none()},zD=(e,t,n=!0)=>{let i=t;if(n)try{i=atob(t)}catch(e){return K.none()}const o=new Uint8Array(i.length);for(let e=0;e<o.length;e++)o[e]=i.charCodeAt(e);return K.some(new Blob([o],{type:e}))},jD=e=>
30new Promise((t,n)=>{$D(e).bind(({type:e,data:t,base64Encoded:n})=>zD(e,t,n)).fold(()=>n("Invalid data URI"),t)}),qD=e=>ft(e,"blob:")?FD(e):ft(e,"data:")?jD(e):Promise.reject("Unknown URI format"),UD=e=>new Promise((t,n)=>{const i=new FileReader;i.onloadend=()=>{t(i.result)},i.onerror=()=>{var e;n(null===(e=i.error)||void 0===e?void 0:e.message)},i.readAsDataURL(e)});let WD=0;const VD=e=>(e||"blobid")+WD++,YD=(e,t,n)=>$D(e).bind(({data:e,type:i,base64Encoded:o})=>{if(t&&!o)return K.none();{const t=o?e:btoa(e);return n(t,i)}}),GD=(e,t,n)=>{const i=e.create(VD(),t,n);return e.add(i),i},KD=(e,t,n=!1)=>YD(t,n,(t,n)=>K.from(e.getByData(t,n)).orThunk(()=>zD(n,t).map(n=>GD(e,n,t)))),XD=(e,t)=>{const n=()=>Promise.reject("Invalid data URI");if(ft(t,"blob:")){const i=e.getByUri(t);return I(i)?Promise.resolve(i):qD(t).then(t=>UD(t).then(i=>YD(i,!1,n=>K.some(GD(e,t,n))).getOrThunk(n)))}return ft(t,"data:")?KD(e,t).fold(n,e=>Promise.resolve(e)):Promise.reject("Unknown image data format")},QD=e=>I(e.attr("data-mce-bogus")),ZD=e=>e.attr("src")===an.transparentSrc||I(e.attr("data-mce-placeholder")),JD=(e,t)=>{const{blob_cache:n}=t;if(n){const t=e=>{const t=e.attr("src");ZD(e)||QD(e)||N(t)||KD(n,t,!0).each(t=>{e.attr("src",t.blobUri())})};e.addAttributeFilter("src",e=>oe(e,t))}},eT=(e,t)=>ft(e,`${t}/`),tT=(e,t,n,i,o)=>{let r;r=R(e)?"iframe":eT(e,"image")?"img":eT(e,"video")?"video":eT(e,"audio")?"audio":"iframe";const s=new V_(r,1);return s.attr("audio"===r?{src:t}:{src:t,width:n,height:i}),"audio"!==r&&"video"!==r||s.attr("controls",""),"iframe"===r&&o&&s.attr("sandbox",""),s},nT=(e,t)=>{const n=e.schema;t.remove_trailing_brs&&BD(t,e,n),e.addAttributeFilter("href",e=>{let n=e.length;const i=e=>e.split(" ").filter(e=>e.length>0).concat(["noopener"]).sort().join(" "),o=e=>{const t=e?gn.trim(e):"";return/\b(noopener)\b/g.test(t)?t:i(t)};if(!t.allow_unsafe_link_target)for(;n--;){const t=e[n];"a"===t.name&&"_blank"===t.attr("target")&&t.attr("rel",o(t.attr("rel")))}}),t.allow_html_in_named_anchor||e.addAttributeFilter("id,name",e=>{let t,n,i,o,r=e.length;for(;r--;)if(o=e[r],"a"===o.name&&o.firstChild&&!o.attr("href"))for(i=o.parent,t=o.lastChild;t&&i;)n=t.prev,i.insert(t,o),t=n}),t.fix_list_elements&&e.addNodeFilter("ul,ol",e=>{let t,n,i=e.length;for(;i--;)if(t=e[i],n=t.parent,n&&("ul"===n.name||"ol"===n.name))if(t.prev&&"li"===t.prev.name)t.prev.append(t);else{const e=new V_("li",1);e.attr("style","list-style-type: none"),t.wrap(e)}});const i=n.getValidClasses();t.validate&&i&&e.addAttributeFilter("class",e=>{var t;let n=e.length;for(;n--;){const o=e[n],r=null!==(t=o.attr("class"))&&void 0!==t?t:"",s=gn.explode(r," ");let a="";for(let e=0;e<s.length;e++){const t=s[e];let n=!1,r=i["*"];r&&r[t]&&(n=!0),r=i[o.name],!n&&r&&r[t]&&(n=!0),n&&(a&&(a+=" "),a+=t)}a.length||(a=null),o.attr("class",a)}}),JD(e,t),t.convert_unsafe_embeds&&e.addNodeFilter("object,embed",e=>oe(e,e=>{e.replace(tT(e.attr("type"),"object"===e.name?e.attr("data"):e.attr("src"),e.attr("width"),e.attr("height"),t.sandbox_iframes))})),t.sandbox_iframes&&e.addNodeFilter("iframe",e=>oe(e,e=>e.attr("sandbox","")))},{entries:iT,setPrototypeOf:oT,isFrozen:rT,getPrototypeOf:sT,getOwnPropertyDescriptor:aT}=Object;let{freeze:lT,seal:cT,create:dT}=Object,{apply:uT,construct:hT}="undefined"!=typeof Reflect&&Reflect;lT||(lT=function(e){return e}),cT||(cT=function(e){return e}),uT||(uT=function(e,t,n){return e.apply(t,n)}),hT||(hT=function(e,t){return new e(...t)})
31;const pT=t(Array.prototype.forEach),fT=t(Array.prototype.pop),mT=t(Array.prototype.push),gT=t(String.prototype.toLowerCase),vT=t(String.prototype.toString),yT=t(String.prototype.match),bT=t(String.prototype.replace),_T=t(String.prototype.indexOf),wT=t(String.prototype.trim),CT=t(Object.prototype.hasOwnProperty),kT=t(RegExp.prototype.test),xT=n(TypeError),ST=lT(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),ET=lT(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),DT=lT(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),TT=lT(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),AT=lT(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),MT=lT(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),RT=lT(["#text"]),NT=lT(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","
31spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),IT=lT(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),PT=lT(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),OT=lT(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),LT=cT(/\{\{[\w\W]*|[\w\W]*\}\}/gm),BT=cT(/<%[\w\W]*|[\w\W]*%>/gm),FT=cT(/\${[\w\W]*}/gm),HT=cT(/^data-[\-\w.\u00B7-\uFFFF]/),$T=cT(/^aria-[\-\w]+$/),zT=cT(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),jT=cT(/^(?:\w+script|data):/i),qT=cT(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),UT=cT(/^html$/i),WT=cT(/^[a-z][.\w]*(-[.\w]+)+$/i);var VT=Object.freeze({__proto__:null,MUSTACHE_EXPR:LT,ERB_EXPR:BT,TMPLIT_EXPR:FT,DATA_ATTR:HT,ARIA_ATTR:$T,IS_ALLOWED_URI:zT,IS_SCRIPT_OR_DATA:jT,ATTR_WHITESPACE:qT,DOCTYPE_NAME:UT,CUSTOM_ELEMENT:WT});const YT={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},GT=function(){return"undefined"==typeof window?null:window},KT=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;
vendor: 5,076 bytes, line 31
31const i="data-tt-policy-suffix";t&&t.hasAttribute(i)&&(n=t.getAttribute(i));const o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+o+" could not be created."),null}};var XT=a();const QT=gn.each,ZT=gn.trim,JT=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],eA={ftp:21,http:80,https:443,mailto:25},tA=["img","video"],nA=(e,t)=>I(e)?!e:!I(t)||!te(tA,t),iA=e=>{try{return decodeURIComponent(e)}catch(t){return unescape(e)}},oA=(e,t,n)=>{const i=iA(t).replace(/\s/g,"");return!e.allow_script_urls&&(!!/((java|vb)script|mhtml):/i.test(i)||!e.allow_html_data_urls&&(/^data:image\//i.test(i)?nA(e.allow_svg_data_urls,n)&&/^data:image\/svg\+xml/i.test(i):/^data:/i.test(i)))};class rA{static parseDataUri(e){let t;const n=decodeURIComponent(e).split(","),i=/data:([^;]+)/.exec(n[0]);return i&&(t=i[1]),{type:t,data:n[1]}}static isDomSafe(e,t,n={}){if(n.allow_script_urls)return!0;{const i=fl.decode(e).replace(/[\s\u0000-\u001F]+/g,"");return!oA(n,i,t)}}static getDocumentBaseUrl(e){var t;let n;return n=0!==e.protocol.indexOf("http")&&"file:"!==e.protocol?null!==(t=e.href)&&void 0!==t?t:"":e.protocol+"//"+e.host+e.pathname,/^[^:]+:\/\/\/?[^\/]+\//.test(n)&&(n=n.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(n)||(n+="/")),n}constructor(e,t={}){this.path="",this.directory="",e=ZT(e),this.settings=t;const n=t.base_uri,i=this;if(/^([\w\-]+):([^\/]{2})/i.test(e)||/^\s*#/.test(e))return void(i.source=e);const o=0===e.indexOf("//");if(0!==e.indexOf("/")||o||(e=(n&&n.protocol||"http")+"://mce_host"+e),!/^[\w\-]*:?\/\//.test(e)){const t=n?n.path:new rA(document.location.href).directory;if(""===(null==n?void 0:n.protocol))e="//mce_host"+i.toAbsPath(t,e);else{const o=/([^#?]*)([#?]?.*)/.exec(e);o&&(e=(n&&n.protocol||"http")+"://mce_host"+i.toAbsPath(t,o[1])+o[2])}}e=e.replace(/@@/g,"(mce_at)");const r=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*):?([^:@\/]*))?@)?(\[[a-zA-Z0-9:.%]+\]|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(e);r&&QT(JT,(e,t)=>{let n=r[t];n&&(n=n.replace(/\(mce_at\)/g,"@@")),i[e]=n}),n&&(i.protocol||(i.protocol=n.protocol),i.userInfo||(i.userInfo=n.userInfo),i.port||"mce_host"!==i.host||(i.port=n.port),i.host&&"mce_host"!==i.host||(i.host=n.host),i.source=""),o&&(i.protocol="")}setPath(e){const t=/^(.*?)\/?(\w+)?$/.exec(e);t&&(this.path=t[0],this.directory=t[1],this.file=t[2]),this.source="",this.getURI()}toRelative(e){if("./"===e)return e;const t=new rA(e,{base_uri:this});if("mce_host"!==t.host&&this.host!==t.host&&t.host||this.port!==t.port||this.protocol!==t.protocol&&""!==t.protocol)return t.getURI();const n=this.getURI(),i=t.getURI();if(n===i||"/"===n.charAt(n.length-1)&&n.substr(0,n.length-1)===i)return n;let o=this.toRelPath(this.path,t.path);return t.query&&(o+="?"+t.query),t.anchor&&(o+="#"+t.anchor),o}toAbsolute(e,t){const n=new rA(e,{base_uri:this});return n.getURI(t&&this.isSameOrigin(n))}isSameOrigin(e){if(this.host==e.host&&this.protocol==e.protocol){if(this.port==e.port)return!0;const t=this.protocol?eA[this.protocol]:null;if(t&&(this.port||t)==(e.port||t))return!0}return!1}toRelPath(e,t){let n,i,o=0,r="";const s=e.substring(0,e.lastIndexOf("/")).split("/"),a=t.split("/");if(s.length>=a.length)for(n=0,i=s.length;n<i;n++)if(n>=a.length||s[n]!==a[n]){o=n+1;break}if(s.length<a.length)for(n=0,i=a.length;n<i;n++)if(n>=s.length||s[n]!==a[n]){o=n+1;break}if(1===o)return t;for(n=0,i=s.length-(o-1);n<i;n++)r+="../";for(n=o-1,i=a.length;n<i;n++)r+=n!==o-1?"/"+a[n]:a[n];return r}toAbsPath(e,t){let n=0;const i=/\/$/.test(t)?"/":"",o=e.split("/"),r=t.split("/"),s=[];QT(o,e=>{e&&s.push(e)});const a=[];for(let e=r.length-1;e>=0;e--)0!==r[e].length&&"."!==r[e]&&(".."!==r[e]?n>0?n--:a.push(r[e]):n++);const l=s.length-n;let c;return c=l<=0?ge(a).join("/"):s.slice(0,l).join("/")+"/"+ge(a).join("/"),0!==c.indexOf("/")&&(c="/"+c),i&&c.lastIndexOf("/")!==c.length-1&&(c+=i),c}getURI(e=!1){let t;return this.source&&!e||(t="",e||(this.protocol?t+=this.protocol+"://":t+="//",this.userInfo&&(t+=this.userInfo+"@"),this.host&&(t+=this.host),this.port&&(t+=":"+this.port)),this.path&&(t+=this.path),this.query&&(t+="?"+this.query),this.anchor&&(t+="#"+this.anchor),this.source=t),this.source}}const sA=gn.makeMap("src,href,data,background,action,formaction,poster,xlink:href"),aA="data-mce-type";let lA=0;const cA=(e,t,n,i,o)=>{var r,s,a,l;const c=t.validate,d=n.getSpecialElements();e.nodeType===Rn&&!t.allow_conditional_comments&&/^\[if/i.test(null!==(r=e.nodeValue)&&void 0!==r?r:"")&&(e.nodeValue=" "+e.nodeValue);const u=null!==(s=null==o?void 0:o.tagName)&&void 0!==s?s:e.nodeName.toLowerCase();if("html"!==i&&n.isValid(i))return void(I(o)&&(o.allowedTags[u]=!0));if(e.nodeType!==Pn||"body"===u)return;const h=yi.fromDom(e),p=Qn(h,aA),f=Kn(h,"data-mce-bogus");if(!p&&S(f))return void("all"===f?Po(h):Oo(h));const m=n.getElementRule(u);
31if(!c||m){if(I(o)&&(o.allowedTags[u]=!0),c&&m&&!p){if(oe(null!==(a=m.attributesForced)&&void 0!==a?a:[],e=>{Yn(h,e.name,"{$uid}"===e.value?"mce_"+lA++:e.value)}),oe(null!==(l=m.attributesDefault)&&void 0!==l?l:[],e=>{Qn(h,e.name)||Yn(h,e.name,"{$uid}"===e.value?"mce_"+lA++:e.value)}),m.attributesRequired&&!ne(m.attributesRequired,e=>Qn(h,e)))return void Oo(h);if(m.removeEmptyAttrs&&Jn(h))return void Oo(h);m.outputName&&m.outputName!==u&&dd(h,m.outputName)}}else Fe(d,u)?Po(h):Oo(h)},dA=(e,t,n,i,o)=>{const r=e.tagName.toLowerCase(),{attrName:s,attrValue:a}=o;o.keepAttr=uA(t,n,i,r,s,a),o.keepAttr?(o.allowedAttributes[s]=!0,pA(s,n)&&(o.attrValue=s),t.allow_svg_data_urls&&ft(a,"data:image/svg+xml")&&(o.forceKeepAttr=!0)):hA(e,s)&&(o.forceKeepAttr=!0)},uA=(e,t,n,i,o,r)=>"html"!==n&&!ha(i)||!(o in sA&&oA(e,r,i))&&(!e.validate||t.isValid(i,o)||ft(o,"data-")||ft(o,"aria-")),hA=(e,t)=>e.hasAttribute(aA)&&("id"===t||"class"===t||"style"===t),pA=(e,t)=>e in t.getBoolAttrs(),fA=(e,t,n,i)=>{const{attributes:o}=e;for(let r=o.length-1;r>=0;r--){const s=o[r],a=s.name,l=s.value;uA(t,n,i,e.tagName.toLowerCase(),a,l)||hA(e,a)?pA(a,n)&&e.setAttribute(a,a):e.removeAttribute(a)}},mA=(e,t,n)=>{const i=XT();return i.addHook("uponSanitizeElement",(i,o)=>{cA(i,e,t,n.track(i),o)}),i.addHook("uponSanitizeAttribute",(i,o)=>{dA(i,e,t,n.current(),o)}),i},gA=(e,t)=>{const n={...{IN_PLACE:!0,ALLOW_UNKNOWN_PROTOCOLS:!0,ALLOWED_TAGS:["#comment","#cdata-section","body"],ALLOWED_ATTR:[],SAFE_FOR_XML:!1}};return n.PARSER_MEDIA_TYPE=t,e.allow_script_urls?n.ALLOWED_URI_REGEXP=/.*/:e.allow_html_data_urls&&(n.ALLOWED_URI_REGEXP=/^(?!(\w+script|mhtml):)/i),n},vA=e=>{const t=["type","href","role","arcrole","title","show","actuate","label","from","to"].map(e=>`xlink:${e}`),n={IN_PLACE:!0,USE_PROFILES:{html:!0,svg:!0,svgFilters:!0},ALLOWED_ATTR:t};return XT().sanitize(e,n),e.innerHTML},yA=(e,t)=>{const n=ga();if(e.sanitize){const i=mA(e,t,n);return{sanitizeHtmlElement:(t,o)=>{i.sanitize(t,gA(e,o)),i.removed=[],n.reset()},sanitizeNamespaceElement:vA}}return{sanitizeHtmlElement:i=>{const o=document.createNodeIterator(i,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_COMMENT|NodeFilter.SHOW_TEXT);let r;for(;r=o.nextNode();){const i=n.track(r);cA(r,e,t,i),hr(r)&&fA(r,e,t,i)}n.reset()},sanitizeNamespaceElement:B}},bA=gn.makeMap,_A=gn.extend,wA=(e,t,n,i)=>{const o=e.name,r=o in n&&"title"!==o&&"textarea"!==o&&"noscript"!==o,s=t.childNodes;for(let t=0,o=s.length;t<o;t++){const o=s[t],a=new V_(o.nodeName.toLowerCase(),o.nodeType);if(hr(o)){const e=o.attributes;for(let t=0,n=e.length;t<n;t++){const n=e[t];a.attr(n.name,n.value)}ha(a.name)&&(i(o),a.value=o.innerHTML)}else Sr(o)?(a.value=o.data,r&&(a.raw=!0)):(Tr(o)||Er(o)||Dr(o))&&(a.value=o.data);ha(a.name)||wA(a,o,n,i),e.append(a)}},CA=(e,t,n)=>{const i=[];for(let n=e,o=n;n;o=n,n=n.walk()){const r=n;oe(t,e=>e(r)),N(r.parent)&&r!==e?n=o:i.push(r)}for(let e=i.length-1;e>=0;e--){const t=i[e];oe(n,e=>e(t))}},kA=(e,t,n,i)=>{const o=n.validate,r=t.getNonEmptyElements(),s=t.getWhitespaceElements(),a=_A(bA("script,style,head,html,body,title,meta,param"),t.getBlockElements()),l=Rl(t),c=/[ \t\r\n]+/g,d=/^[ \t\r\n]+/,u=/[ \t\r\n]+$/,h=e=>{let t=e.parent;for(;I(t);){if(t.name in s)return!0;t=t.parent}return!1},p=e=>{let n=e;for(;I(n);){if(n.name in l)return Bx(t,r,s,n);n=n.parent}return!1},f=n=>n.name in a||Pa(t,n)||ha(n.name)&&n.parent===e,m=(t,n)=>{const o=n?t.prev:t.next;return!I(o)&&!N(t.parent)&&(f(t.parent)&&(t.parent!==e||!0===i.isRootContent))},g=e=>{var t;if(3===e.type&&!h(e)){let n=null!==(t=e.value)&&void 0!==t?t:"";n=n.replace(c," "),(Fx(e.prev,f)||m(e,!0))&&(n=n.replace(d,"")),0===n.length?e.remove():e.value=n}},v=e=>{var a;if(1===e.type){const a=t.getElementRule(e.name);if(o&&a){const o=Bx(t,r,s,e);a.paddInEmptyBlock&&o&&p(e)?Ix(n,i,f,e):a.removeEmpty&&o?f(e)?e.remove():e.unwrap():a.paddEmpty&&(o||Px(e))&&Ix(n,i,f,e)}}else if(3===e.type&&!h(e)){let t=null!==(a=e.value)&&void 0!==a?a:"";(e.next&&f(e.next)||m(e,!1))&&(t=t.replace(u,"")),0===t.length?e.remove():e.value=t}};return[g,v]},xA=(e,t)=>{var n;const i=null!==(n=t.forced_root_block)&&void 0!==n?n:e.forced_root_block;return!1===i?"":!0===i?"p":i},SA=(e={},t=Il())=>
31{const n=RD(),i=RD(),o={validate:!0,root_name:"body",sanitize:!0,...e},r=new DOMParser,s=yA(o,t),a=(e,n,i="html")=>{const o="xhtml"===i?"application/xhtml+xml":"text/html",a=Fe(t.getSpecialElements(),n.toLowerCase()),l=a?`<${n}>${e}</${n}>`:e,c="xhtml"===i?`<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>${l}</body></html>`:`<body>${l}</body>`,d=r.parseFromString(c,o).body;return s.sanitizeHtmlElement(d,o),a?d.firstChild:d},l=n.addFilter,c=n.getFilters,d=n.removeFilter,u=i.addFilter,h=i.getFilters,p=i.removeFilter,f=(e,n)=>{qx(t,e)&&n.push(e)},m=(e,n)=>{const i=S(n.attr(aA)),o=1===n.type&&!Fe(e,n.name)&&!Pa(t,n)&&!ha(n.name);return 3===n.type||o&&!i},g=(e,n)=>{const i=_A(bA("script,style,head,html,body,title,meta,param"),t.getBlockElements()),r=/^[ \t\r\n]+/,s=/[ \t\r\n]+$/;let a=e.firstChild,l=null;const c=e=>{var t,n;e&&(a=e.firstChild,a&&3===a.type&&(a.value=null===(t=a.value)||void 0===t?void 0:t.replace(r,"")),a=e.lastChild,a&&3===a.type&&(a.value=null===(n=a.value)||void 0===n?void 0:n.replace(s,"")))};if(t.isValidChild(e.name,n.toLowerCase())){for(;a;){const t=a.next;m(i,a)?(l||(l=new V_(n,1),l.attr(o.forced_root_block_attrs),e.insert(l,a)),l.append(a)):(c(l),l=null),a=t}c(l)}},v=(e,n={})=>{var i;const r=o.validate,l=null!==(i=n.context)&&void 0!==i?i:o.root_name,d=a(e,l,n.format);Ea(t,d);const u=new V_(l,11);wA(u,d,t.getSpecialElements(),s.sanitizeNamespaceElement),d.innerHTML="";const[p,m]=kA(u,t,o,n),v=[],y={nodes:{},attributes:{}},b=e=>Ax(c(),h(),e,y);if(CA(u,[p,b],[m,r?e=>f(e,v):B]),v.reverse(),r&&v.length>
310)if(n.context){const{pass:e,fail:i}=se(v,e=>e.parent===u);zx(i,t,u,b),n.invalid=e.length>0}else zx(v,t,u,b);const _=xA(o,n);return _&&("body"===u.name||n.isRootContent)&&g(u,_),n.invalid||Rx(y,n),u},y={schema:t,addAttributeFilter:u,getAttributeFilters:h,removeAttributeFilter:p,addNodeFilter:l,getNodeFilters:c,removeNodeFilter:d,parse:v};return nT(y,o),LD(y,o,t),y},EA=e=>MS(e)?mw({validate:!1}).serialize(e):e,DA=(e,t,n)=>{const i=EA(e),o=t(i);if(o.isDefaultPrevented())return o;if(MS(e)){if(o.content!==i){const t=SA({validate:!1,forced_root_block:!1,...n}).parse(o.content,{context:e.name});return{...o,content:t}}return{...o,content:e}}return o},TA=(e,t)=>{if(t.no_events)return Lu.value(t);{const n=Fv(e,t);return n.isDefaultPrevented()?Lu.error(Hv(e,{content:"",...n}).content):Lu.value(n)}},AA=(e,t,n)=>{if(n.no_events)return t;{const i=DA(t,t=>Hv(e,{...n,content:t}),{sanitize:$p(e),sandbox_iframes:Qp(e)});return i.content}},MA=(e,t)=>{if(t.no_events)return Lu.value(t);{const n=DA(t.content,n=>Lv(e,{...t,content:n}),{sanitize:$p(e),sandbox_iframes:Qp(e)});return n.isDefaultPrevented()?(Bv(e,n),Lu.error(void 0)):Lu.value(n)}},RA=(e,t,n)=>{n.no_events||Bv(e,{...n,content:t})},NA=(e,t,n)=>({element:e,width:t,rows:n}),IA=(e,t)=>({element:e,cells:t}),PA=(e,t)=>({x:e,y:t}),OA=(e,t)=>Xn(e,t).bind(kt).getOr(1),LA=(e,t,n,i,o)=>{const r=OA(o,"rowspan"),s=OA(o,"colspan"),a=e.rows;for(let e=n;e<n+r;e++){a[e]||(a[e]=IA(ld(i),[]));for(let i=t;i<t+s;i++){a[e].cells[i]=e===n&&i===t?o:ad(o)}}},BA=(e,t,n)=>{const i=e.rows;return!!(i[n]?i[n].cells:[])[t]},FA=(e,t,n)=>{for(;BA(e,t,n);)t++;return t},HA=e=>ce(e,(e,t)=>t.cells.length>e?t.cells.length:e,0),$A=(e,t)=>{const n=e.rows;for(let e=0;e<n.length;e++){const i=n[e].cells;for(let n=0;n<i.length;n++)if(xi(i[n],t))return K.some(PA(n,e))}return K.none()},zA=(e,t,n,i,o)=>{const r=[],s=e.rows;for(let e=n;e<=o;e++){const n=s[e].cells,o=t<i?n.slice(t,i+1):n.slice(i,t+1);r.push(IA(s[e].element,o))}return r},jA=(e,t,n)=>{const i=t.x,o=t.y,r=n.x,s=n.y,a=o<s?zA(e,i,o,r,s):zA(e,i,s,r,o);return NA(e.element,HA(a),a)},qA=(e,t)=>{const n=ad(e.element),i=yi.fromTag("tbody");return No(i,t),Ao(n,i),n},UA=e=>ie(e.rows,e=>{const t=ie(e.cells,e=>{const t=ld(e);return Zn(t,"colspan"),Zn(t,"rowspan"),t}),n=ad(e.element);return No(n,t),n}),WA=e=>{const t=NA(ad(e),0,[]);return oe(ar(e,"tr"),(e,n)=>{oe(ar(e,"td,th"),(i,o)=>{LA(t,FA(t,o,n),n,e,i)})}),NA(t.element,HA(t.rows),t.rows)},VA=e=>qA(e,UA(e)),YA=(e,t,n)=>$A(e,t).bind(t=>$A(e,n).map(n=>jA(e,t,n))),GA=e=>ue(e,e=>"ul"===Ln(e)||"ol"===Ln(e)),KA=(e,t)=>ue(e,e=>"li"===Ln(e)&&ug(e,t)).fold($([]),()=>GA(e).map(e=>{const t=yi.fromTag(Ln(e)),n=Pe(ko(e),(e,t)=>ft(t,"list-style"));return bo(t,n),[yi.fromTag("li"),t]}).getOr([])),XA=(e,t)=>{const n=ce(t,(e,t)=>(Ao(t,e),t),e);return t.length>0?Ay([n]):n},QA=e=>ss(e)?Mi(e).filter(rs).fold($([]),t=>[e,t]):rs(e)?[e]:[],ZA=(e,t,n)=>{const i=yi.fromDom(t.commonAncestorContainer),o=zw(i,e),r=ae(o,e=>n.isWrapper(Ln(e))),s=KA(o,t),a=r.concat(s.length?s:QA(i));return ie(a,ad)},JA=()=>Ay([]),eM=(e,t,n)=>XA(yi.fromDom(t.cloneContents()),ZA(e,t,n)),tM=(t,n)=>lo(n,"table",e(xi,t)),nM=(e,t)=>tM(e,t[0]).bind(e=>{const n=t[0],i=t[t.length-1],o=WA(e);return YA(o,n,i).map(e=>Ay([VA(e)]))}).getOrThunk(JA),iM=(e,t,n)=>t.length>0&&t[0].collapsed?JA():eM(e,t[0],n),oM=(e,t,n)=>{const i=og(t,e);return i.length>0?nM(e,i):iM(e,t,n)},rM=(e,t)=>t>=0&&t<e.length&&Qm(e.charAt(t)),sM=e=>vs(e.innerText),aM=e=>e.map(e=>e.nodeName).getOr("div").toLowerCase(),lM=e=>K.from(e.selection.getRng()).map(t=>{var n;const i=K.from(e.dom.getParent(t.commonAncestorContainer,e.dom.isBlock)),o=e.getBody(),r=aM(i),s=yi.fromDom(t.cloneContents());aw(s),lw(s);const a=e.dom.add(o,r,{"data-mce-bogus":"all",style:"overflow: hidden; opacity: 0;"},s.dom),l=sM(a),c=vs(null!==(n=a.textContent)&&void 0!==n?n:"");if(e.dom.remove(a),rM(c,0)||rM(c,c.length-1)){const e=i.getOr(o),t=sM(e),n=t.indexOf(l);if(-1===n)return l;return(rM(t,n-1)?" ":"")+l+(rM(t,n+l.length)?" ":"")}return l}).getOr(""),cM=(e,t)=>{const n=e.selection.getRng(),i=e.dom.create("body"),o=e.selection.getSel(),r=T_(e,Jm(o)),s=t.contextual?oM(yi.fromDom(e.getBody()),r,e.schema).dom:n.cloneContents();
31return s&&i.appendChild(s),e.selection.serializer.serialize(i,t)},dM=(e,t)=>{if("text"===t.format)return lM(e);{const n=cM(e,t);return"tree"===t.format?n:e.selection.isCollapsed()?"":n}},uM=(e,t)=>({...e,format:t,get:!0,selection:!0,getInner:!0}),hM=(e,t,n={})=>{const i=uM(n,t);return TA(e,i).fold(z,t=>{const n=dM(e,t);return AA(e,n,t)})},pM=0,fM=1,mM=2,gM=(e,t)=>{const n=e.length+t.length+2,i=new Array(n),o=new Array(n),r=(e,t,n)=>({start:e,end:t,diag:n}),s=(n,i,o,r,a)=>{const c=l(n,i,o,r);if(null===c||c.start===i&&c.diag===i-r||c.end===n&&c.diag===n-o){let s=n,l=o;for(;s<i||l<r;)s<i&&l<r&&e[s]===t[l]?(a.push([pM,e[s]]),++s,++l):i-n>r-o?(a.push([mM,e[s]]),++s):(a.push([fM,t[l]]),++l)}else{s(n,c.start,o,c.start-c.diag,a);for(let t=c.start;t<c.end;++t)a.push([pM,e[t]]);s(c.end,i,c.end-c.diag,r,a)}},a=(n,i,o,s)=>{let a=n;for(;a-i<s&&a<o&&e[a]===t[a-i];)++a;return r(n,a,i)},l=(n,r,s,l)=>{const c=r-n,d=l-s;if(0===c||0===d)return null;const u=c-d,h=d+c,p=(h%2==0?h:h+1)/2;let f,m,g,v,y;for(i[1+p]=n,o[1+p]=r+1,f=0;f<=p;++f){for(m=-f;m<=f;m+=2){for(g=m+p,m===-f||m!==f&&i[g-1]<i[g+1]?i[g]=i[g+1]:i[g]=i[g-1]+1,v=i[g],y=v-n+s-m;v<r&&y<l&&e[v]===t[y];)i[g]=++v,++y;if(u%2!=0&&u-f<=m&&m<=u+f&&o[g-u]<=i[g])return a(o[g-u],m+n-s,r,l)}for(m=u-f;m<=u+f;m+=2){for(g=m+p-u,m===u-f||m!==u+f&&o[g+1]<=o[g-1]?o[g]=o[g+1]-1:o[g]=o[g-1],v=o[g]-1,y=v-n+s-m;v>=n&&y>=s&&e[v]===t[y];)o[g]=v--,y--;if(u%2==0&&-f<=m&&m<=f&&o[g]<=i[g+u])return a(o[g],m+n-s,r,l)}}return null},c=[];return s(0,e.length,0,t.length,c),c},vM=e=>hr(e)?e.outerHTML:Sr(e)?fl.encodeRaw(e.data,!1):Tr(e)?"<!--"+e.data+"-->":"",yM=e=>{let t;const n=document.createElement("div"),i=document.createDocumentFragment();for(e&&(n.innerHTML=e);t=n.firstChild;)i.appendChild(t);return i},bM=(e,t,n)=>{const i=yM(t);if(e.hasChildNodes()&&n<e.childNodes.length){const t=e.childNodes[n];e.insertBefore(i,t)}else e.appendChild(i)},_M=(e,t)=>{if(e.hasChildNodes()&&t<e.childNodes.length){const n=e.childNodes[t];e.removeChild(n)}},wM=(e,t)=>{let n=0;oe(e,e=>{e[0]===pM?n++:e[0]===fM?(bM(t,e[1],n),n++):e[0]===mM&&_M(t,n)})},CM=(e,t)=>ae(ie(ke(e.childNodes),t?F(vs,vM):vM),e=>e.length>0),kM=(e,t)=>{const n=ie(ke(t.childNodes),vM);return wM(gM(n,e),t),t},xM=Ze(()=>document.implementation.createHTMLDocument("undo")),SM=e=>null!==e.querySelector("iframe"),EM=e=>({type:"fragmented",fragments:e,content:"",bookmark:null,beforeBookmark:null}),DM=e=>({type:"complete",fragments:null,content:e,bookmark:null,beforeBookmark:null}),TM=e=>{const t=e.serializer.getTempAttrs(),n=sw(e.getBody(),t);return SM(n)?EM(CM(n,!0)):DM(vs(n.innerHTML))},AM=(e,t,n)=>{const i=n?t.beforeBookmark:t.bookmark;"fragmented"===t.type?kM(t.fragments,e.getBody()):e.setContent(t.content,{format:"raw",no_selection:!I(i)||!Nm(i)||!i.isFakeCaret}),i&&(e.selection.moveToBookmark(i),e.selection.scrollIntoView())},MM=e=>"fragmented"===e.type?e.fragments.join(""):e.content,RM=e=>{const t=yi.fromTag("body",xM());return Ho(t,MM(e)),oe(ar(t,"*[data-mce-bogus]"),Oo),Fo(t)},NM=(e,t)=>MM(e)===MM(t),IM=(e,t)=>RM(e)===RM(t),PM=(e,t)=>!(!e||!t)&&(!!NM(e,t)||IM(e,t)),OM=e=>0===e.get(),LM=(e,t,n)=>{OM(n)&&(e.typing=t)},BM=(e,t)=>{e.typing&&(LM(e,!1,t),e.add())},FM=e=>{e.typing&&(e.typing=!1,e.add())},HM=(e,t,n)=>{OM(t)&&n.set(Nu(e.selection))},$M=(e,t,n,i,o,r,s)=>{const a=TM(e),l=gn.extend(r||{},a);if(!OM(i)||e.removed)return null;const c=t.data[n.get()];if(e.dispatch("BeforeAddUndo",{level:l,lastLevel:c,originalEvent:s}).isDefaultPrevented())return null;if(c&&PM(c,l))return null;t.data[n.get()]&&o.get().each(e=>{t.data[n.get()].beforeBookmark=e});const d=ip(e);if(d&&t.data.length>d){for(let e=0;e<t.data.length-1;e++)t.data[e]=t.data[e+1];t.data.length--,n.set(t.data.length)}l.bookmark=Nu(e.selection),n.get()<t.data.length-1&&(t.data.length=n.get()+1),t.data.push(l),n.set(t.data.length-1);const u={level:l,lastLevel:c,originalEvent:s};return n.get()>0?(e.setDirty(!0),e.dispatch("AddUndo",u),e.dispatch("change",u)):e.dispatch("AddUndo",u),l},zM=(e,t,n)=>{t.data=[],n.set(0),t.typing=!1,e.dispatch("ClearUndos")},jM=(e,t,n,i,o)=>{if(t.transact(i)){const i=t.data[n.get()].bookmark,r=t.data[n.get()-1];AM(e,r,!0),t.transact(o)&&(t.data[n.get()-1].beforeBookmark=i)}},qM=(e,t,n)=>{let i;return t.get()<n.length-1&&(t.set(t.get()+1),i=n[t.get()],AM(e,i,!1),e.setDirty(!0),e.dispatch("Redo",{level:i})),i},UM=(e,t,n,i)=>{let o;return t.typing&&(t.add(),t.typing=!1,LM(t,!1,n)),i.get()>0&&(i.set(i.get()-1),o=t.data[i.get()],AM(e,o,!0),e.setDirty(!0),e.dispatch("Undo",{level:o})),o},WM=e=>{e.clear(),e.add()},VM=(e,t,n)=>n.get()>0||t.typing&&t.data[0]&&!PM(TM(e),t.data[0]),YM=(e,t)=>t.get()<e.data.length-1&&!e.typing,GM=(e,t,n)=>(BM(e,t),e.beforeChange(),e.ignore(n),e.add()),KM=(e,t)=>{try{e.set(e.get()+1),t()}
31finally{e.set(e.get()-1)}},XM=(e,t)=>{const n=e.dom,i=I(t)?t:e.getBody();oe(n.select("table,a",i),t=>{switch(t.nodeName){case"TABLE":const i=hp(e),o=n.getAttrib(t,"border");o&&"0"!==o||!e.hasVisual?n.removeClass(t,i):n.addClass(t,i);break;case"A":if(!n.getAttrib(t,"href")){const i=n.getAttrib(t,"name")||t.id,o=pp(e);i&&e.hasVisual?n.addClass(t,o):n.removeClass(t,o)}}}),e.dispatch("VisualAid",{element:t,hasVisual:e.hasVisual})},QM=e=>({init:{bindEvents:B},undoManager:{beforeChange:(t,n)=>HM(e,t,n),add:(t,n,i,o,r,s)=>$M(e,t,n,i,o,r,s),undo:(t,n,i)=>UM(e,t,n,i),redo:(t,n)=>qM(e,t,n),clear:(t,n)=>zM(e,t,n),reset:e=>WM(e),hasUndo:(t,n)=>VM(e,t,n),hasRedo:(e,t)=>YM(e,t),transact:(e,t,n)=>GM(e,t,n),ignore:(e,t)=>KM(e,t),extra:(t,n,i,o)=>jM(e,t,n,i,o)},formatter:{match:(t,n,i,o)=>WS(e,t,n,i,o),matchAll:(t,n)=>VS(e,t,n),matchNode:(t,n,i,o)=>US(e,t,n,i,o),canApply:t=>GS(e,t),closest:t=>YS(e,t),apply:(t,n,i)=>bD(e,t,n,i),remove:(t,n,i,o)=>aD(e,t,n,i,o),toggle:(t,n,i)=>AD(e,t,n,i),formatChanged:(t,n,i,o,r)=>TD(e,t,n,i,o,r)},editor:{getContent:t=>hw(e,t),setContent:(t,n)=>OS(e,t,n),insertContent:(t,n)=>AS(e,t,n),addVisual:t=>XM(e,t)},selection:{getContent:(t,n)=>hM(e,t,n)},autocompleter:{addDecoration:t=>F_(e,t),removeDecoration:()=>z_(e,yi.fromDom(e.getBody()))},raw:{getModel:()=>K.none()}}),ZM=e=>{const t=e=>E(e)?e:{},{init:n,undoManager:i,formatter:o,editor:r,selection:s,autocompleter:a,raw:l}=e;return{init:{bindEvents:n.bindEvents},undoManager:{beforeChange:i.beforeChange,add:i.add,undo:i.undo,redo:i.redo,clear:i.clear,reset:i.reset,hasUndo:i.hasUndo,hasRedo:i.hasRedo,transact:(e,t,n)=>i.transact(n),ignore:(e,t)=>
vendor: 5,073 bytes, lines 31-32
31i.ignore(t),extra:(e,t,n,o)=>i.extra(n,o)},formatter:{match:(e,n,i,r)=>o.match(e,t(n),r),matchAll:o.matchAll,matchNode:o.matchNode,canApply:e=>o.canApply(e),closest:e=>o.closest(e),apply:(e,n)=>o.apply(e,t(n)),remove:(e,n)=>o.remove(e,t(n)),toggle:(e,n)=>o.toggle(e,t(n)),formatChanged:(e,t,n,i,r)=>o.formatChanged(t,n,i,r)},editor:{getContent:e=>r.getContent(e),setContent:(e,t)=>({content:r.setContent(e,t),html:""}),insertContent:e=>(r.insertContent(e),""),addVisual:r.addVisual},selection:{getContent:(e,t)=>s.getContent(t)},autocompleter:{addDecoration:a.addDecoration,removeDecoration:a.removeDecoration},raw:{getModel:()=>K.some(l.getRawModel())}}},JM=()=>{const e=$(null),t=$("");return{init:{bindEvents:B},undoManager:{beforeChange:B,add:e,undo:e,redo:e,clear:B,reset:B,hasUndo:Y,hasRedo:Y,transact:e,ignore:B,extra:B},formatter:{match:Y,matchAll:$([]),matchNode:$(void 0),canApply:Y,closest:t,apply:B,remove:B,toggle:B,formatChanged:$({unbind:B})},editor:{getContent:t,setContent:$({content:"",html:""}),insertContent:$(""),addVisual:B},selection:{getContent:t},autocompleter:{addDecoration:B,removeDecoration:B},raw:{getModel:$(K.none())}}},eR=e=>Fe(e.plugins,"rtc"),tR=e=>Be(e.plugins,"rtc").bind(e=>K.from(e.setup)),nR=e=>{const t=e;return tR(e).fold(()=>(t.rtcInstance=QM(e),K.none()),e=>(t.rtcInstance=JM(),K.some(()=>e().then(e=>(t.rtcInstance=ZM(e),e.rtc.isRemote)))))},iR=e=>e.rtcInstance?e.rtcInstance:QM(e),oR=e=>{const t=e.rtcInstance;if(t)return t;throw new Error("Failed to get RTC instance not yet initialized.")},rR=(e,t,n)=>{oR(e).undoManager.beforeChange(t,n)},sR=(e,t,n,i,o,r,s)=>oR(e).undoManager.add(t,n,i,o,r,s),aR=(e,t,n,i)=>oR(e).undoManager.undo(t,n,i),lR=(e,t,n)=>oR(e).undoManager.redo(t,n),cR=(e,t,n)=>{oR(e).undoManager.clear(t,n)},dR=(e,t)=>{oR(e).undoManager.reset(t)},uR=(e,t,n)=>oR(e).undoManager.hasUndo(t,n),hR=(e,t,n)=>oR(e).undoManager.hasRedo(t,n),pR=(e,t,n,i)=>oR(e).undoManager.transact(t,n,i),fR=(e,t,n)=>{oR(e).undoManager.ignore(t,n)},mR=(e,t,n,i,o)=>{oR(e).undoManager.extra(t,n,i,o)},gR=(e,t,n,i,o)=>oR(e).formatter.match(t,n,i,o),vR=(e,t,n)=>oR(e).formatter.matchAll(t,n),yR=(e,t,n,i,o)=>oR(e).formatter.matchNode(t,n,i,o),bR=(e,t)=>oR(e).formatter.canApply(t),_R=(e,t)=>oR(e).formatter.closest(t),wR=(e,t,n,i)=>{oR(e).formatter.apply(t,n,i)},CR=(e,t,n,i,o)=>{oR(e).formatter.remove(t,n,i,o)},kR=(e,t,n,i)=>{oR(e).formatter.toggle(t,n,i)},xR=(e,t,n,i,o,r)=>oR(e).formatter.formatChanged(t,n,i,o,r),SR=(e,t)=>iR(e).editor.getContent(t),ER=(e,t,n)=>iR(e).editor.setContent(t,n),DR=(e,t,n)=>iR(e).editor.insertContent(t,n),TR=(e,t,n)=>oR(e).selection.getContent(t,n),AR=(e,t)=>oR(e).editor.addVisual(t),MR=e=>oR(e).init.bindEvents(),RR=(e,t)=>oR(e).autocompleter.addDecoration(t),NR=e=>oR(e).autocompleter.removeDecoration(),IR=(e,t={})=>{const n=t.format?t.format:"html";return TR(e,n,t)},PR=e=>0===e.dom.length?(Po(e),K.none()):K.some(e),OR=(e,t)=>e.filter(e=>_v.isBookmarkNode(e.dom)).bind(t?Oi:Pi),LR=(e,t,n,i,o)=>{const r=e.dom,s=t.dom,a=i?r.length:s.length;i?(IC(r,s,o,!1,!i),n.setStart(s,a)):(IC(s,r,o,!1,!i),n.setEnd(s,a))},BR=(e,t,n)=>{Mi(e).each(i=>{const o=e.dom;t&&vC(i,Zd(o,0),n)?RC(o,0,n):!t&&bC(i,Zd(o,o.length),n)&&NC(o,o.length,n)})},FR=(e,t,n,i,o)=>{e.bind(e=>((i?NC:RC)(e.dom,i?e.dom.length:0,o),t.filter(jn).map(t=>LR(e,t,n,i,o)))).orThunk(()=>OR(t,i).or(t).filter(jn).map(e=>BR(e,i,o)))},HR=(e,t,n)=>{const i=K.from(t.firstChild).map(yi.fromDom),o=K.from(t.lastChild).map(yi.fromDom);e.deleteContents(),e.insertNode(t);const r=i.bind(Pi).filter(jn).bind(PR),s=o.bind(Oi).filter(jn).bind(PR);FR(r,i,e,!0,n),FR(s,o,e,!1,n),e.collapse(!1)},$R=(e,t)=>({format:"html",...e,set:!0,selection:!0,content:t}),zR=(e,t)=>{if("raw"!==t.format){
32const n=e.selection.getRng(),i=e.dom.getParent(n.commonAncestorContainer,e.dom.isBlock),o=i?{context:i.nodeName.toLowerCase()}:{},r=e.parser.parse(t.content,{forced_root_block:!1,...o,...t});return mw({validate:!1},e.schema).serialize(r)}return t.content},jR=(e,t,n={})=>{const i=$R(n,t);MA(e,i).each(t=>{const n=zR(e,t),i=e.selection.getRng();HR(i,i.createContextualFragment(n),e.schema),e.selection.setRng(i),xb(e,i),RA(e,n,t)})},qR=(e,t,n)=>{if(Fe(e,t)){const i=ae(e[t],e=>e!==n);0===i.length?delete e[t]:e[t]=i}};var UR=(e,t)=>{let n,i;const o=(t,n)=>ue(n,n=>e.is(n,t)),r=t=>e.getParents(t,void 0,e.getRoot()),s=()=>{n={},i={},t.on("NodeChange",e=>{const t=e.element,s=r(t),a={};Te(n,(e,t)=>{o(t,s).each(n=>{i[t]||(oe(e,e=>{e(!0,{node:n,selector:t,parents:s})}),i[t]=e),a[t]=e})}),Te(i,(e,n)=>{a[n]||(delete i[n],oe(e,e=>{e(!1,{node:t,selector:n,parents:s})}))})})};return{selectorChangedWithUnbind:(e,a)=>(n||s(),n[e]||(n[e]=[]),n[e].push(a),o(e,r(t.selection.getStart())).each(()=>{i[e]=n[e]}),{unbind:()=>{qR(n,e,a),qR(i,e,a)}})}};const WR=e=>!(!e||!e.ownerDocument)&&Si(yi.fromDom(e.ownerDocument),yi.fromDom(e)),VR=e=>!!e&&(WR(e.startContainer)&&WR(e.endContainer)),YR=(e,t,n,i)=>{let o,r;const{selectorChangedWithUnbind:s}=UR(e,i),a=(t,n)=>{const o=e.createRng();I(t)&&I(n)?(o.setStart(t,n),o.setEnd(t,n),y(o),m(!1)):(hg(e,o,i.getBody(),!0),y(o))},l=(e,t)=>
vendor: 6,183 bytes, line 32
32jR(i,e,t),c=e=>C_(i.getBody(),v(),e),d=e=>k_(i.getBody(),v(),e),u=(e,t)=>M.getBookmark(e,t),h=(t,n)=>(D_(e,t,n).each(y),t),p=()=>{const e=v(),t=g();return!(!e||e.item)&&(e.compareEndPoints?0===e.compareEndPoints("StartToEnd",e):!t||e.collapsed)},f=()=>{const t=v(),n=i.getBody().querySelectorAll('[data-mce-selected="1"]');return n.length>0?me(n,t=>e.isEditable(t.parentElement)):__(e,t)},m=e=>{const t=v();t.collapse(!!e),y(t)},g=()=>t.getSelection?t.getSelection():t.document.selection,v=()=>{let n;const s=(e,t,n)=>{try{return t.compareBoundaryPoints(e,n)}catch(e){return-1}},a=t.document;if(I(i.bookmark)&&!m_(i)){const e=$b(i);if(e.isSome())return e.map(e=>T_(i,[e])[0]).getOr(a.createRange())}try{const e=g();e&&!ur(e.anchorNode)&&(n=e.rangeCount>0?e.getRangeAt(0):a.createRange(),n=T_(i,[n])[0])}catch(e){}if(n||(n=a.createRange()),Ar(n.startContainer)&&n.collapsed){const t=e.getRoot();n.setStart(t,0),n.setEnd(t,0)}return o&&r&&(0===s(n.START_TO_START,n,o)&&0===s(n.END_TO_END,n,o)?n=r:(o=null,r=null)),n},y=(e,t)=>{if(!VR(e))return;const n=g();if(e=i.dispatch("SetSelectionRange",{range:e,forward:t}).range,n){r=e;try{n.removeAllRanges(),n.addRange(e)}catch(e){}!1===t&&n.extend&&(n.collapse(e.endContainer,e.endOffset),n.extend(e.startContainer,e.startOffset)),o=n.rangeCount>0?n.getRangeAt(0):null}if(!e.collapsed&&e.startContainer===e.endContainer&&(null==n?void 0:n.setBaseAndExtent)&&e.endOffset-e.startOffset<2&&e.startContainer.hasChildNodes()){const t=e.startContainer.childNodes[e.startOffset];t&&"IMG"===t.nodeName&&(n.setBaseAndExtent(e.startContainer,e.startOffset,e.endContainer,e.endOffset),n.anchorNode===e.startContainer&&n.focusNode===e.endContainer||n.setBaseAndExtent(t,0,t,1))}i.dispatch("AfterSetSelectionRange",{range:e,forward:t})},b=t=>(l(e.getOuterHTML(t)),t),_=()=>S_(i.getBody(),v()),w=(t,n)=>E_(e,v(),t,n),C=()=>{const t=g(),n=null==t?void 0:t.anchorNode,i=null==t?void 0:t.focusNode;if(!t||!n||!i||ur(n)||ur(i))return!0;const o=e.createRng(),r=e.createRng();try{o.setStart(n,t.anchorOffset),o.collapse(!0),r.setStart(i,t.focusOffset),r.collapse(!0)}catch(e){return!0}return o.compareBoundaryPoints(o.START_TO_START,r)<=0},k=()=>{const t=v(),n=g();if(!tg(n)&&pg(i)){const n=qy(e,t);return n.each(e=>{y(e,C())}),n.getOr(t)}return t},x=()=>{let t,n=e.getRoot();for(;n&&"BODY"!==n.nodeName;){if(n.scrollHeight>n.clientHeight){t=n;break}n=n.parentNode}return t},S=(e,t)=>{I(e)?kb(i,e,t):xb(i,v(),t)},E=(e,t)=>y(Ny(e,t,i.getDoc())),D=()=>{const e=v();return e.collapsed?Zd.fromRangeStart(e).getClientRects()[0]:e.getBoundingClientRect()},T=()=>{t=o=r=null,R.destroy()},A={dom:e,win:t,serializer:n,editor:i,expand:(t={type:"word"})=>y(Vy(e).expand(v(),t)),collapse:m,setCursorLocation:a,getContent:e=>IR(i,e),setContent:l,getBookmark:u,moveToBookmark:e=>M.moveToBookmark(e),select:h,isCollapsed:p,isEditable:f,isForward:C,setNode:b,getNode:_,getSel:g,setRng:y,getRng:v,getStart:c,getEnd:d,getSelectedBlocks:w,normalize:k,selectorChanged:(e,t)=>(s(e,t),A),selectorChangedWithUnbind:s,getScrollContainer:x,scrollIntoView:S,placeCaretAt:E,getBoundingClientRect:D,destroy:T},M=_v(A),R=ey(A,i);return A.bookmarkManager=M,A.controlSelection=R,A},GR=(e,t,n)=>{e.addAttributeFilter("data-mce-tabindex",(e,t)=>{let n=e.length;for(;n--;){const i=e[n];i.attr("tabindex",i.attr("data-mce-tabindex")),i.attr(t,null)}}),e.addAttributeFilter("src,href,style",(e,i)=>{const o="data-mce-"+i,r=t.url_converter,s=t.url_converter_scope;let a=e.length;for(;a--;){const t=e[a];let l=t.attr(o);void 0!==l?(t.attr(i,l.length>0?l:null),t.attr(o,null)):(l=t.attr(i),"style"===i?l=n.serializeStyle(n.parseStyle(l),t.name):r&&(l=r.call(s,l,i,t.name)),t.attr(i,l.length>0?l:null))}}),e.addAttributeFilter("class",e=>{let t=e.length;for(;t--;){const n=e[t];let i=n.attr("class");i&&(i=i.replace(/(?:^|\s)mce-item-\w+(?!\S)/g,""),n.attr("class",i.length>0?i:null))}}),e.addAttributeFilter("data-mce-type",(e,t,n)=>{let i=e.length;for(;i--;){const t=e[i];if("bookmark"===t.attr("data-mce-type")&&!n.cleanup){const e=K.from(t.firstChild).exists(e=>{var t;return!gs(null!==(t=e.value)&&void 0!==t?t:"")});e?t.unwrap():t.remove()}}}),e.addNodeFilter("script,style",(e,n)=>{var i;const o=e=>e.replace(/(<!--\[CDATA\[|\]\]-->)/g,"\n").replace(/^[\r\n]*|[\r\n]*$/g,"").replace(/^\s*((<!--)?(\s*\/\/)?\s*<!\[CDATA\[|(<!--\s*)?\/\*\s*<!\[CDATA\[\s*\*\/|(\/\/)?\s*<!--|\/\*\s*<!--\s*\*\/)\s*[\r\n]*/gi,"").replace(/\s*(\/\*\s*\]\]>\s*\*\/(-->)?|\s*\/\/\s*\]\]>(-->)?|\/\/\s*(-->)?|\]\]>|\/\*\s*-->\s*\*\/|\s*-->\s*)\s*$/g,"");let r=e.length;for(;r--;){const s=e[r],a=s.firstChild,l=null!==(i=null==a?void 0:a.value)&&void 0!==i?i:"";if("script"===n){const e=s.attr("type");e&&s.attr("type","mce-no/type"===e?null:e.replace(/^mce\-/,"")),"xhtml"===t.element_format&&a&&l.length>0&&(a.value="// <![CDATA[\n"+o(l)+"\n// ]]>")}else"xhtml"===t.element_format&&a&&l.length>0&&(a.value="<!--\n"+o(l)+"\n-->")}}),e.addNodeFilter("#comment",e=>{let i=e.length;for(;i--;){const o=e[i],r=o.value;t.preserve_cdata&&0===(null==r?void 0:r.indexOf("[CDATA["))?(o.name="#cdata",o.type=4,o.value=n.decode(r.replace(/^\[CDATA\[|\]\]$/g,""))):0===(null==r?void 0:r.indexOf("mce:protected "))&&(o.name="#text",o.type=3,o.raw=!0,o.value=unescape(r).substr(14))}}),e.addNodeFilter("xml:namespace,input",(e,t)=>{let n=e.length;for(;n--;){const i=e[n];7===i.type?i.remove():1===i.type&&("input"!==t||i.attr("type")||i.attr("type","text"))}}),e.addAttributeFilter("data-mce-type",t=>{oe(t,t=>{"format-caret"===t.attr("data-mce-type")&&(t.isEmpty(e.schema.getNonEmptyElements())?t.remove():t.unwrap())})}),e.addAttributeFilter("data-mce-src,data-mce-href,data-mce-style,data-mce-selected,data-mce-expando,data-mce-block,data-mce-type,data-mce-resize,data-mce-placeholder",(e,t)=>{let n=e.length;for(;n--;)e[n].attr(t,null)}),t.remove_trailing_brs&&BD(t,e,e.schema)},KR=e=>{const t=e=>"br"===(null==e?void 0:e.name),n=e.lastChild;if(t(n)){const e=n.prev;t(e)&&(n.remove(),e.remove())}},XR=(e,t,n)=>{let i;const o=e.dom;let r=t.cloneNode(!0);const s=document.implementation;if(s.createHTMLDocument){const e=s.createHTMLDocument("");gn.each("BODY"===r.nodeName?r.childNodes:[r],t=>{e.body.appendChild(e.importNode(t,!0))}
32),r="BODY"!==r.nodeName?e.body.firstChild:e.body,i=o.doc,o.doc=e}return Cv(e,{...n,node:r}),i&&(o.doc=i),r},QR=(e,t)=>I(e)&&e.hasEventListeners("PreProcess")&&!t.no_events,ZR=(e,t,n)=>QR(e,n)?XR(e,t,n):t,JR=(e,t,n)=>{-1===gn.inArray(t,n)&&(e.addAttributeFilter(n,(e,t)=>{let n=e.length;for(;n--;)e[n].attr(t,null)}),t.push(n))},eN=(e,t,n)=>{if(!t.no_events&&e){return kv(e,{...t,content:n}).content}return n},tN=(e,t,n)=>{const i=vs(n.getInner?t.innerHTML:e.getOuterHTML(t));return n.selection||cs(yi.fromDom(t))?i:gn.trim(i)},nN=(e,t,n)=>{const i=n.selection?{forced_root_block:!1,...n}:n,o=e.parse(t,i);return KR(o),o},iN=(e,t,n)=>mw(e,t).serialize(n),oN=(e,t,n,i,o)=>{const r=iN(t,n,i);return eN(e,o,r)},rN=(t,n)=>{const i=["data-mce-selected"],o={entity_encoding:"named",remove_trailing_brs:!0,pad_empty_with_br:!1,...t},r=n&&n.dom?n.dom:vc.DOM,s=n&&n.schema?n.schema:Il(o),a=SA(o,s);GR(a,o,r);const l=(e,t={})=>{const i={format:"html",...t},l=ZR(n,e,i),c=tN(r,l,i),d=nN(a,c,i);return"tree"===i.format?d:oN(n,o,s,d,i)};return{schema:s,addNodeFilter:a.addNodeFilter,addAttributeFilter:a.addAttributeFilter,serialize:l,addRules:s.addValidElements,setRules:s.setValidElements,addTempAttr:e(JR,a,i),getTempAttrs:$(i),getNodeFilters:a.getNodeFilters,getAttributeFilters:a.getAttributeFilters,removeNodeFilter:a.removeNodeFilter,removeAttributeFilter:a.removeAttributeFilter}},sN=(e,t)=>{const n=rN(e,t);return{schema:n.schema,addNodeFilter:n.addNodeFilter,addAttributeFilter:n.addAttributeFilter,serialize:n.serialize,addRules:n.addRules,setRules:n.setRules,addTempAttr:n.addTempAttr,getTempAttrs:n.getTempAttrs,getNodeFilters:n.getNodeFilters,getAttributeFilters:n.getAttributeFilters,removeNodeFilter:n.removeNodeFilter,removeAttributeFilter:n.removeAttributeFilter}},aN="html",lN=(e,t)=>({...e,format:t,get:!0,getInner:!0}),cN=(e,t={})=>{const n=t.format?t.format:aN,i=lN(t,n);return TA(e,i).fold(z,t=>{const n=SR(e,t);return AA(e,n,t)})},dN="html",uN=(e,t)=>({format:dN,...e,set:!0,content:t}),hN=(e,t,n={})=>{const i=uN(n,t);return MA(e,i).map(t=>{const n=ER(e,t.content,t);return RA(e,n.html,t),n.content}).getOr(t)},pN="autoresize_on_init,content_editable_state,padd_empty_with_br,block_elements,boolean_attributes,editor_deselector,editor_selector,elements,file_browser_callback_types,filepicker_validator_handler,force_hex_style_colors,force_p_newlines,gecko_spellcheck,images_dataimg_filter,media_scripts,mode,move_caret_before_on_enter_elements,non_empty_elements,self_closing_elements,short_ended_elements,special,spellchecker_select_languages,spellchecker_whitelist,tab_focus,tabfocus_elements,table_responsive_width,text_block_elements,text_inline_elements,toolbar_drawer,types,validate,whitespace_elements,paste_enable_default_filters,paste_filter_drop,paste_word_valid_elements,paste_retain_style_properties,paste_convert_word_fake_lists".split(","),fN="template_cdate_classes,template_mdate_classes,template_selected_content_classes,template_preview_replace_values,template_replace_values,templates,template_cdate_format,template_mdate_format".split(","),mN="bbcode,colorpicker,contextmenu,fullpage,legacyoutput,spellchecker,textcolor".split(","),gN=[{name:"template",replacedWith:"Advanced Template"},{name:"rtc"}],vN=(e,t)=>{const n=ae(t,t=>Fe(e,t));return be(n)},yN=e=>{const t=vN(e,pN),n=e.forced_root_block;return!1!==n&&""!==n||t.push("forced_root_block (false only)"),be(t)},bN=e=>vN(e,fN),_N=(e,t)=>{const n=gn.makeMap(e.plugins," "),i=ae(t,e=>Fe(n,e));return be(i)},wN=e=>_N(e,mN),CN=e=>_N(e,gN.map(e=>e.name)),kN=(e,t)=>{const n=yN(e),i=wN(t),o=i.length>0,r=n.length>0,s="mobile"===t.theme;if(o||r||s){const e="\n- ",t=s?`\n\nThemes:${e}mobile`:"",a=o?`\n\nPlugins:${e}${i.join(e)}`:"",l=r?`\n\nOptions:${e}${n.join(e)}`:"";console.warn("The following deprecated features are currently enabled and have been removed in TinyMCE 6.0. These features will no longer work and should be removed from the TinyMCE configuration. See https://www.tiny.cloud/docs/tinymce/6/migration-from-5x/ for more information."+t+a+l)}},xN=e=>ue(gN,t=>t.name===e).fold(()=>e,t=>t.replacedWith?`${e}, replaced by ${t.replacedWith}`:e),SN=(e,t)=>{const n=bN(e),i=CN(t),o=i.length>0,r=n.length>0;if(o||r){const e="\n- ",t=o?`\n\nPlugins:${e}${i.map(xN).join(e)}`:"",s=r?`\n\nOptions:${e}${n.join(e)}`:"";console.warn("The following deprecated features are currently enabled but will be removed soon."+t+s)}},EN=(e,t)=>{kN(e,t),SN(e,t)},DN=vc.DOM,TN=e=>{DN.setStyle(e.id,"display",e.orgDisplay)},AN=e=>K.from(e).each(e=>
32e.destroy()),MN=e=>{const t=e;t.contentAreaContainer=t.formElement=t.container=t.editorContainer=null,t.bodyElement=t.contentDocument=t.contentWindow=null,t.iframeElement=t.targetElm=null;const n=e.selection;if(n){const e=n.dom;t.selection=n.win=n.dom=e.doc=null}},RN=e=>{const t=e.formElement;t&&(t._mceOldSubmit&&(t.submit=t._mceOldSubmit,delete t._mceOldSubmit),DN.unbind(t,"submit reset",e.formEventDelegate))},NN=e=>{if(!e.removed){const{_selectionOverrides:t,editorUpload:n}=e,i=e.getBody(),o=e.getElement();i&&e.save({is_removing:!0}),e.removed=!0,e.unbindAllNativeEvents(),e.hasHiddenInput&&I(null==o?void 0:o.nextSibling)&&DN.remove(o.nextSibling),xv(e),e.editorManager.remove(e),!e.inline&&i&&TN(e),Sv(e),DN.remove(e.getContainer()),AN(t),AN(n),e.destroy()}},IN=(e,t)=>{const{selection:n,dom:i}=e;e.destroyed||(t||e.removed?(t||(e.editorManager.off("beforeunload",e._beforeUnload),e.theme&&e.theme.destroy&&e.theme.destroy(),AN(n),AN(i)),RN(e),MN(e),e.destroyed=!0):e.remove())},PN=()=>{const e={};return{add:(t,n)=>{e[t]=n},get:t=>e[t]?e[t]:{icons:{}},has:t=>Fe(e,t)}},ON=PN(),LN=Oc.ModelManager,BN=(e,t)=>t.dom[e],FN=(e,t)=>parseInt(_o(t,e),10),HN=e(BN,"clientWidth"),$N=e(BN,"clientHeight"),zN=e(FN,"margin-top"),jN=e(FN,"margin-left"),qN=e=>e.dom.getBoundingClientRect(),UN=(e,t,n)=>{const i=HN(e),o=$N(e);return t>=0&&n>=0&&t<=i&&n<=o},WN=(e,t,n,i)=>{const o=qN(t);return{x:n-(e?o.left+t.dom.clientLeft+jN(t):0),y:i-(e?o.top+t.dom.clientTop+zN(t):0)}},VN=(e,t,n)=>{const i=yi.fromDom(e.getBody()),o=e.inline?i:Ti(i),r=WN(e.inline,o,t,n);return UN(o,r.x,r.y)},YN=e=>K.from(e).map(yi.fromDom),GN=e=>{const t=e.inline?e.getBody():e.getContentAreaContainer();return YN(t).map(to).getOr(!1)};var KN=()=>{const e=()=>{throw new Error("Theme did not provide a NotificationManager implementation.")};return{open:e,close:e,getArgs:e}};const XN=e=>{const t=[],n=()=>{const t=e.theme;return t&&t.getNotificationManagerImpl?t.getNotificationManagerImpl():KN()},i=()=>K.from(t[0]),o=(e,t)=>!(e.type!==t.type||e.text!==t.text||e.progressBar||e.timeout||t.progressBar||t.timeout),r=()=>{oe(t,e=>{e.reposition()})},s=e=>{t.push(e)},a=e=>{he(t,t=>t===e).each(e=>{t.splice(e,1)})},l=(l,c=!0)=>e.removed||!GN(e)?{}:(c&&e.dispatch("BeforeOpenNotification",{notification:l}),ue(t,e=>o(n().getArgs(e),l)).getOrThunk(()=>{e.editorManager.setActive(e);const t=n().open(l,()=>{a(t),r(),g_(e)&&i().fold(()=>e.focus(),e=>Sb(yi.fromDom(e.getEl())))});return s(t),r(),e.dispatch("OpenNotification",{notification:{...t}}),t})),c=()=>{i().each(e=>{n().close(e),a(e),r()})},d=$(t),u=e=>{e.on("SkinLoaded",()=>{const t=zh(e);t&&l({text:t,type:"warning",timeout:0},!1),r()}),e.on("show ResizeEditor ResizeWindow NodeChange",()=>{requestAnimationFrame(r)}),e.on("remove",()=>{oe(t.slice(),e=>{n().close(e)})})};return u(e),{open:l,close:c,getNotifications:d}},QN=Oc.PluginManager,ZN=Oc.ThemeManager;var JN=()=>{const e=()=>{throw new Error("Theme did not provide a WindowManager implementation.")};return{open:e,openUrl:e,alert:e,confirm:e,close:e}};const eI=e=>{let t=[];const n=()=>{const t=e.theme;return t&&t.getWindowManagerImpl?t.getWindowManagerImpl():JN()},i=(e,t)=>(...n)=>t?t.apply(e,n):void 0,o=t=>{e.dispatch("OpenWindow",{dialog:t})},r=t=>{e.dispatch("CloseWindow",{dialog:t})},s=e=>{t.push(e),o(e)},a=n=>{r(n),t=ae(t,e=>e!==n),0===t.length&&e.focus()},l=()=>K.from(t[t.length-1]),c=t=>{e.editorManager.setActive(e),Hb(e),e.ui.show();const n=t();return s(n),n},d=(e,t)=>c(()=>n().open(e,t,a)),u=e=>c(()=>n().openUrl(e,a)),h=(e,t,o)=>{const r=n();r.alert(e,i(o||r,t))},p=(e,t,o)=>{const r=n();r.confirm(e,i(o||r,t))},f=()=>{l().each(e=>{n().close(e),a(e)})};return e.on("remove",()=>{oe(t,e=>{n().close(e)})}),{open:d,openUrl:u,alert:h,confirm:p,close:f}},tI=(e,t)=>{e.notificationManager.open({type:"error",text:t})},nI=(e,t)=>{e._skinLoaded?tI(e,t):e.on("SkinLoaded",()=>{tI(e,t)})},iI=(e,t)=>{nI(e,Pc.translate(["Failed to upload image: {0}",t]))},oI=(e,t,n)=>{Iv(e,t,{message:n}),console.error(n)},rI=(e,t,n)=>n?`Failed to load ${e}: ${n} from url ${t}`:`Failed to load ${e} url: ${t}`,sI=(e,t,n)=>{oI(e,"PluginLoadError",rI("plugin",t,n))},aI=(e,t,n)=>{oI(e,"IconsLoadError",rI("icons",t,n))},lI=(e,t,n)=>{oI(e,"LanguageLoadError",rI("language",t,n))},cI=(e,t,n)=>{oI(e,"ThemeLoadError",rI("theme",t,n))},dI=(e,t,n)=>{oI(e,"ModelLoadError",rI("model",t,n))},uI=(e,t,n)=>{const i=Pc.translate(["Failed to initialize plugin: {0}",t]);Iv(e,"PluginLoadError",{message:i}),hI(i,n),nI(e,i)},hI=(e,...t)=>{const n=window.console;n&&(n.error?n.error(e,...t):n.log(e,...t))},pI=e=>/^[a-z0-9\-]+$/i.test(e),fI=e=>"content/"+e+"/content.css",mI=e=>tinymce.Resource.has(fI(e)),gI=e=>yI(e,Nh(e)),vI=e=>yI(e,Ph(e)),yI=(e,t)=>{const n=e.editorManager.baseURL+"/skins/content",i=`content${e.editorManager.suffix}.css`;return ie(t,t=>mI(t)?t:pI(t)&&!e.inline?`${n}/${t}/${i}`:e.documentBaseURI.toAbsolute(t))},bI=e=>{e.contentCSS=e.contentCSS.concat(gI(e),vI(e))},_I=e=>e?ke(e.getElementsByTagName("img")):[],wI=(e,t)=>{const n={},i=(i,o=G)=>{const r=ae(_I(i),t=>{const n=t.src;return!t.hasAttribute("data-mce-bogus")&&(!t.hasAttribute("data-mce-placeholder")&&(!(!n||n===an.transparentSrc)&&(ft(n,"blob:")?!e.isUploaded(n)&&o(t):!!ft(n,"data:")&&o(t))))}),s=ie(r,e=>{const i=e.src;if(Fe(n,i))return n[i].then(t=>S(t)?t:{image:e,blobInfo:t.blobInfo});{const o=XD(t,i).then(t=>(delete n[i],{image:e,blobInfo:t})).catch(e=>(delete n[i],e));return n[i]=o,o}});return Promise.all(s)};return{findAll:i}},CI=()=>{const e=1,t=2;let n={};const i=(e,t)=>({status:e,resultUri:t}),o=e=>e in n,r=t=>!!o(t)&&n[t].status===e,s=e=>!!o(e)&&n[e].status===t;return{hasBlobUri:o,getResultUri:e=>{const t=n[e];return t?t.resultUri:null},isPending:r,isUploaded:s,markPending:t=>{n[t]=i(e,null)},markUploaded:(e,o)=>{n[e]=i(t,o)},removeFailed:e=>{delete n[e]},destroy:()=>{n={}}}};let kI=0;const xI=()=>{const e=()=>Math.round(4294967295*Math.random()).toString(36);return"s"+(new Date).getTime().toString(36)+e()+e()+e()},SI=e=>e+kI+++xI(),EI=()=>{let e=[];const t=e=>
32({"image/jpeg":"jpg","image/jpg":"jpg","image/gif":"gif","image/png":"png","image/apng":"apng","image/avif":"avif","image/svg+xml":"svg","image/webp":"webp","image/bmp":"bmp","image/tiff":"tiff"}[e.toLowerCase()]||"dat"),n=(e,t,n,o,r)=>{if(S(e)){return i({id:e,name:o,filename:r,blob:t,base64:n})}if(E(e))return i(e);throw new Error("Unknown input type")},i=e=>{if(!e.blob||!e.base64)throw new Error("blob and base64 representations of the image are required for BlobInfo to be created");const n=e.id||SI("blobid"),i=e.name||n,o=e.blob;return{id:$(n),name:$(i),filename:$(e.filename||i+"."+t(o.type)),blob:$(o),base64:$(e.base64),blobUri:$(e.blobUri||URL.createObjectURL(o)),uri:$(e.uri)}},o=t=>{s(t.id())||e.push(t)},r=t=>ue(e,t).getOrUndefined(),s=e=>r(t=>t.id()===e),a=(e,t)=>r(n=>n.base64()===e&&n.blob().type===t);return{create:n,add:o,get:s,getByUri:e=>r(t=>t.blobUri()===e),getByData:a,findFirst:r,removeByUri:t=>{e=ae(e,e=>e.blobUri()!==t||(URL.revokeObjectURL(e.blobUri()),!1))},destroy:()=>{oe(e,e=>{URL.revokeObjectURL(e.blobUri())}),e=[]}}},DI=(e,t)=>{const n={},i=(e,t)=>e?e.replace(/\/$/,"")+"/"+t.replace(/^\//,""):t,o=(e,n)=>new Promise((o,r)=>{const s=new XMLHttpRequest;s.open("POST",t.url),s.withCredentials=t.credentials,s.upload.onprogress=e=>{n(e.loaded/e.total*100)},s.onerror=()=>{r("Image upload failed due to a XHR Transport error. Code: "+s.status)},s.onload=()=>{if(s.status<200||s.status>=300)return void r("HTTP Error: "+s.status);const e=JSON.parse(s.responseText);e&&S(e.location)?o(i(t.basePath,e.location)):r("Invalid JSON: "+s.responseText)};const a=new FormData;a.append("file",e.blob(),e.filename()),s.send(a)}),r=P(t.handler)?t.handler:o,s=()=>new Promise(e=>{e([])}),a=(e,t)=>({url:t,blobInfo:e,status:!0}),l=(e,t)=>
vendor: 6,375 bytes, line 32
32({url:"",blobInfo:e,status:!1,error:t}),c=(e,t)=>{gn.each(n[e],e=>{e(t)}),delete n[e]},d=(t,n,i)=>(e.markPending(t.blobUri()),new Promise(o=>{let r,s;try{const d=()=>{r&&(r.close(),s=B)},u=n=>{d(),e.markUploaded(t.blobUri(),n),c(t.blobUri(),a(t,n)),o(a(t,n))},h=n=>{d(),e.removeFailed(t.blobUri()),c(t.blobUri(),l(t,n)),o(l(t,n))};s=e=>{e<0||e>100||K.from(r).orThunk(()=>K.from(i).map(W)).each(t=>{r=t,t.progressBar.value(e)})},n(t,s).then(u,e=>{h(S(e)?{message:e}:e)})}catch(e){o(l(t,e))}})),u=e=>e===o,h=e=>{const t=e.blobUri();return new Promise(e=>{n[t]=n[t]||[],n[t].push(e)})},p=(t,n)=>(t=gn.grep(t,t=>!e.isUploaded(t.blobUri())),Promise.all(gn.map(t,t=>e.isPending(t.blobUri())?h(t):d(t,r,n)))),f=(e,n)=>!t.url&&u(r)?s():p(e,n);return{upload:f}},TI=e=>()=>e.notificationManager.open({text:e.translate("Image uploading..."),type:"info",timeout:-1,progressBar:!0}),AI=(e,t)=>DI(t,{url:Ch(e),basePath:kh(e),credentials:xh(e),handler:Sh(e)}),MI=e=>{const t=CI(),n=AI(e,t);return{upload:(t,i=!0)=>n.upload(t,i?TI(e):void 0)}},RI=(e,t)=>e.dom.isEmpty(t.dom)&&I(e.schema.getTextBlockElements()[Ln(t)]),NI=e=>t=>{RI(e,t)&&Ao(t,yi.fromHtml('<br data-mce-bogus="1" />'))},II=e=>{const t=EI();let n,i;const o=CI(),r=[],s=t=>n=>e.selection?t(n):[],a=e=>e+(-1===e.indexOf("?")?"?":"&")+(new Date).getTime(),l=(e,t,n)=>{let i=0;do{i=e.indexOf(t,i),-1!==i&&(e=e.substring(0,i)+n+e.substr(i+t.length),i+=n.length-t.length+1)}while(-1!==i);return e},c=(e,t,n)=>{const i=`src="${n}"${n===an.transparentSrc?' data-mce-placeholder="1"':""}`;return e=l(e,`src="${t}"`,i),e=l(e,'data-mce-src="'+t+'"','data-mce-src="'+n+'"')},d=(t,n)=>{oe(e.undoManager.data,e=>{"fragmented"===e.type?e.fragments=ie(e.fragments,e=>c(e,t,n)):e.content=c(e.content,t,n)})},u=(t,n)=>{const i=e.convertURL(n,"src");d(t.src,n),Gn(yi.fromDom(t),{src:yh(e)?a(n):n,"data-mce-src":i})},h=()=>(n||(n=AI(e,o)),g().then(s(i=>{const o=ie(i,e=>e.blobInfo);return n.upload(o,TI(e)).then(s(n=>{const o=[];let r=!1;const s=ie(n,(n,s)=>{const{blobInfo:a,image:l}=i[s];let c=!1;return n.status&&bh(e)?(n.url&&!pt(l.src,n.url)&&(r=!0),t.removeByUri(l.src),eR(e)||u(l,n.url)):n.error&&(n.error.remove&&(d(l.src,an.transparentSrc),o.push(l),c=!0),iI(e,n.error.message)),{element:l,status:n.status,uploadUri:n.url,blobInfo:a,removed:c}});return o.length>0&&!eR(e)?e.undoManager.transact(()=>{oe(Bo(o),n=>{const i=Mi(n);Po(n),i.each(NI(e)),t.removeByUri(n.dom.src)})}):r&&e.undoManager.dispatchChange(),s}))}))),p=()=>vh(e)?h():Promise.resolve([]),f=e=>me(r,t=>t(e)),m=e=>{r.push(e)},g=()=>(i||(i=wI(o,t)),i.findAll(e.getBody(),f).then(s(t=>{const n=ae(t,t=>S(t)?(nI(e,t),!1):"blob"!==t.uriType);return eR(e)||oe(n,e=>{d(e.image.src,e.blobInfo.blobUri()),e.image.src=e.blobInfo.blobUri(),e.image.removeAttribute("data-mce-src")}),n}))),v=()=>{t.destroy(),o.destroy(),i=n=null},y=n=>n.replace(/src="(blob:[^"]+)"/g,(n,i)=>{const r=o.getResultUri(i);if(r)return'src="'+r+'"';let s=t.getByUri(i);if(s||(s=ce(e.editorManager.get(),(e,t)=>e||t.editorUpload&&t.editorUpload.blobCache.getByUri(i),void 0)),s){return'src="data:'+s.blob().type+";base64,"+s.base64()+'"'}return n});return e.on("SetContent",()=>{vh(e)?p():g()}),e.on("RawSaveContent",e=>{e.content=y(e.content)}),e.on("GetContent",e=>{e.source_view||"raw"===e.format||"tree"===e.format||(e.content=y(e.content))}),e.on("PostRender",()=>{e.parser.addNodeFilter("img",e=>{oe(e,e=>{const n=e.attr("src");if(!n||t.getByUri(n))return;const i=o.getResultUri(n);i&&e.attr("src",i)})})}),{blobCache:t,addFilter:m,uploadImages:h,uploadImagesAuto:p,scanForImages:g,destroy:v}},PI=e=>{const t=e.dom,n=e.schema.type,i={valigntop:[{selector:"td,th",styles:{verticalAlign:"top"}}],valignmiddle:[{selector:"td,th",styles:{verticalAlign:"middle"}}],valignbottom:[{selector:"td,th",styles:{verticalAlign:"bottom"}}],alignleft:[{selector:"figure.image",collapsed:!1,classes:"align-left",ceFalseOverride:!0,preview:"font-family font-size"},{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li,pre",styles:{textAlign:"left"},inherit:!1,preview:!1},{selector:"img,audio,video",collapsed:!1,styles:{float:"left"},preview:"font-family font-size"},{selector:"table",collapsed:!1,styles:{marginLeft:"0px",marginRight:"auto"},onformat:e=>{t.setStyle(e,"float",null)},preview:"font-family font-size"},{selector:".mce-preview-object,[data-ephox-embed-iri]",ceFalseOverride:!0,styles:{float:"left"}}],aligncenter:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li,pre",styles:{textAlign:"center"},inherit:!1,preview:"font-family font-size"},{selector:"figure.image",collapsed:!1,classes:"align-center",ceFalseOverride:!0,preview:"font-family font-size"},{selector:"img,audio,video",collapsed:!1,styles:{display:"block",marginLeft:"auto",marginRight:"auto"},preview:!1},{selector:"table",collapsed:!1,styles:{marginLeft:"auto",marginRight:"auto"},preview:"font-family font-size"},{selector:".mce-preview-object",ceFalseOverride:!0,styles:{display:"table",marginLeft:"auto",marginRight:"auto"},preview:!1},{selector:"[data-ephox-embed-iri]",ceFalseOverride:!0,styles:{marginLeft:"auto",marginRight:"auto"},preview:!1}],alignright:[{selector:"figure.image",collapsed:!1,classes:"align-right",ceFalseOverride:!0,preview:"font-family font-size"},{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li,pre",styles:{textAlign:"right"},inherit:!1,preview:"font-family font-size"},{selector:"img,audio,video",collapsed:!1,styles:{float:"right"},preview:"font-family font-size"},{selector:"table",collapsed:!1,styles:{marginRight:"0px",marginLeft:"auto"},onformat:e=>{t.setStyle(e,"float",null)},preview:"font-family font-size"},{selector:".mce-preview-object,[data-ephox-embed-iri]",ceFalseOverride:!0,styles:{float:"right"},preview:!1}],alignjustify:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li,pre",styles:{textAlign:"justify"},inherit:!1,preview:"font-family font-size"}],bold:[{inline:"strong",remove:"all",preserve_attributes:["class","style"]},{inline:"span",styles:{fontWeight:"bold"}},{inline:"b",remove:"all",preserve_attributes:["class","style"]}],italic:[{inline:"em",remove:"all",preserve_attributes:["class","style"]},{inline:"span",styles:{fontStyle:"italic"}},{inline:"i",remove:"all",preserve_attributes:["class","style"]}],underline:[{inline:"span",styles:{textDecoration:"underline"},exact:!0},{inline:"u",remove:"all",preserve_attributes:["class","style"]}
vendor: 4,921 bytes, line 32
32],strikethrough:(()=>{const e={inline:"span",styles:{textDecoration:"line-through"},exact:!0},t={inline:"strike",remove:"all",preserve_attributes:["class","style"]},i={inline:"s",remove:"all",preserve_attributes:["class","style"]};return"html4"!==n?[i,e,t]:[e,i,t]})(),forecolor:{inline:"span",styles:{color:"%value"},links:!0,remove_similar:!0,clear_child_styles:!0},hilitecolor:{inline:"span",styles:{backgroundColor:"%value"},links:!0,remove_similar:!0,clear_child_styles:!0},fontname:{inline:"span",toggle:!1,styles:{fontFamily:"%value"},clear_child_styles:!0},fontsize:{inline:"span",toggle:!1,styles:{fontSize:"%value"},clear_child_styles:!0},lineheight:{selector:"h1,h2,h3,h4,h5,h6,p,li,td,th,div",styles:{lineHeight:"%value"}},fontsize_class:{inline:"span",attributes:{class:"%value"}},blockquote:{block:"blockquote",wrapper:!0,remove:"all"},subscript:{inline:"sub"},superscript:{inline:"sup"},code:{inline:"code"},link:{inline:"a",selector:"a",remove:"all",split:!0,deep:!0,onmatch:e=>hr(e)&&e.hasAttribute("href"),onformat:(e,n,i)=>{gn.each(i,(n,i)=>{t.setAttrib(e,i,n)})}},lang:{inline:"span",clear_child_styles:!0,remove_similar:!0,attributes:{lang:"%value","data-mce-lang":e=>{var t;return null!==(t=null==e?void 0:e.customValue)&&void 0!==t?t:null}}},removeformat:[{selector:"b,strong,em,i,font,u,strike,s,sub,sup,dfn,code,samp,kbd,var,cite,mark,q,del,ins,small",remove:"all",split:!0,expand:!1,block_expand:!0,deep:!0},{selector:"span",attributes:["style","class"],remove:"empty",split:!0,expand:!1,deep:!0},{selector:"*",attributes:["style","class"],split:!1,expand:!1,deep:!0}]};return gn.each("p h1 h2 h3 h4 h5 h6 div address pre dt dd samp".split(/\s/),e=>{i[e]={block:e,remove:"all"}}),i},OI={remove_similar:!0,inherit:!1},LI={selector:"td,th",...OI},BI={tablecellbackgroundcolor:{styles:{backgroundColor:"%value"},...LI},tablecellverticalalign:{styles:{"vertical-align":"%value"},...LI},tablecellbordercolor:{styles:{borderColor:"%value"},...LI},tablecellclass:{classes:["%value"],...LI},tableclass:{selector:"table",classes:["%value"],...OI},tablecellborderstyle:{styles:{borderStyle:"%value"},...LI},tablecellborderwidth:{styles:{borderWidth:"%value"},...LI}},FI=$(BI),HI=e=>{const t={},n=e=>I(e)?t[e]:t,i=e=>Fe(t,e),o=(e,n)=>{e&&(S(e)?(T(n)||(n=[n]),oe(n,e=>{R(e.deep)&&(e.deep=!$g(e)),R(e.split)&&(e.split=!$g(e)||zg(e)),R(e.remove)&&$g(e)&&!zg(e)&&(e.remove="none"),$g(e)&&zg(e)&&(e.mixed=!0,e.block_expand=!0),S(e.classes)&&(e.classes=e.classes.split(/\s+/))}),t[e]=n):Te(e,(e,t)=>{o(t,e)}))},r=e=>(e&&t[e]&&delete t[e],t);return o(PI(e)),o(FI()),o(Yh(e)),{get:n,has:i,register:o,unregister:r}},$I=gn.each,zI=vc.DOM,jI=e=>I(e)&&E(e),qI=(e,t)=>{const n=t&&t.schema||Il({}),i=(e,t)=>{t.classes.length>0&&zI.addClass(e,t.classes.join(" ")),zI.setAttribs(e,t.attrs)},o=e=>{const t=S(e)?{name:e,classes:[],attrs:{}}:e,n=zI.create(t.name);return i(n,t),n},r=(e,t)=>{const i=n.getElementRule(e.nodeName.toLowerCase()),o=null==i?void 0:i.parentsRequired;return!(!o||!o.length)&&(t&&te(o,t)?t:o[0])},s=(e,t,n)=>{let i;const a=t[0],l=jI(a)?a.name:void 0,c=r(e,l);if(c)l===c?(i=a,t=t.slice(1)):i=c;else if(a)i=a,t=t.slice(1);else if(!n)return e;const d=i?o(i):zI.create("div");d.appendChild(e),n&&gn.each(n,t=>{const n=o(t);d.insertBefore(n,e)});const u=jI(i)?i.siblings:void 0;return s(d,t,u)},a=zI.create("div");if(e.length>0){const t=e[0],n=o(t),i=jI(t)?t.siblings:void 0;a.appendChild(s(n,e.slice(1),i))}return a},UI=e=>{let t="div";const n={name:t,classes:[],attrs:{},selector:e=gn.trim(e)};return"*"!==e&&(t=e.replace(/(?:([#\.]|::?)([\w\-]+)|(\[)([^\]]+)\]?)/g,(e,t,i,o,r)=>{switch(t){case"#":n.attrs.id=i;break;case".":n.classes.push(i);break;case":":-1!==gn.inArray("checked disabled enabled read-only required".split(" "),i)&&(n.attrs[i]=i)}if("["===o){const e=r.match(/([\w\-]+)(?:\=\"([^\"]+))?/);e&&(n.attrs[e[1]]=e[2])}return""})),n.name=t||"div",n},WI=e=>S(e)?(e=(e=e.split(/\s*,\s*/)[0]).replace(/\s*(~\+|~|\+|>)\s*/g,"$1"),gn.map(e.split(/(?:>|\s+(?![^\[\]]+\]))/),e=>{const t=gn.map(e.split(/(?:~\+|~|\+)/),UI),n=t.pop();return t.length&&(n.siblings=t),n}).reverse()):[],VI=(e,t)=>{let n="",i=Gh(e);if(""===i)return"";const o=e=>S(e)?e.replace(/%(\w+)/g,""):"",r=(t,n)=>zI.getStyle(null!=n?n:e.getBody(),t,!0);if(S(t)){const n=e.formatter.get(t);if(!n)return"";t=n[0]}if("preview"in t){const e=t.preview;if(!1===e)return"";i=e||i}let s,a=t.block||t.inline||"span";const l=WI(t.selector);l.length>0?(l[0].name||(l[0].name=a),a=t.selector,s=qI(l,e)):s=qI([a],e);const c=zI.select(a,s)[0]||s.firstChild;$I(t.styles,(e,t)=>{const n=o(e);n&&zI.setStyle(c,t,n)}),$I(t.attributes,(e,t)=>{const n=o(e);n&&zI.setAttrib(c,t,n)}),$I(t.classes,e=>{const t=o(e);zI.hasClass(c,t)||zI.addClass(c,t)}),e.dispatch("PreviewFormats"),zI.setStyles(s,{position:"absolute",left:-65535}),e.getBody().appendChild(s);const d=r("fontSize"),u=/px$/.test(d)?parseInt(d,10):0;return $I(i.split(" "),e=>{let t=r(e,c);
32if(!("background-color"===e&&/transparent|rgba\s*\([^)]+,\s*0\)/.test(t)&&(t=r(e),"#ffffff"===Ul(t).toLowerCase())||"color"===e&&"#000000"===Ul(t).toLowerCase())){if("font-size"===e&&/em|%$/.test(t)){if(0===u)return;t=parseFloat(t)/(/%$/.test(t)?100:1)*u+"px"}"border"===e&&t&&(n+="padding:0 2px;"),n+=e+":"+t+";"}}),e.dispatch("AfterPreviewFormats"),zI.remove(s),n},YI=e=>{e.addShortcut("meta+b","","Bold"),e.addShortcut("meta+i","","Italic"),e.addShortcut("meta+u","","Underline");for(let t=1;t<=6;t++)e.addShortcut("access+"+t,"",["FormatBlock",!1,"h"+t]);e.addShortcut("access+7","",["FormatBlock",!1,"p"]),e.addShortcut("access+8","",["FormatBlock",!1,"div"]),e.addShortcut("access+9","",["FormatBlock",!1,"address"])},GI=t=>{const n=HI(t),i=xc({});return YI(t),uE(t),eR(t)||wD(i,t),{get:n.get,has:n.has,register:n.register,unregister:n.unregister,apply:(e,n,i)=>{wR(t,e,n,i)},remove:(e,n,i,o)=>{CR(t,e,n,i,o)},toggle:(e,n,i)=>{kR(t,e,n,i)},match:(e,n,i,o)=>gR(t,e,n,i,o),closest:e=>_R(t,e),matchAll:(e,n)=>vR(t,e,n),matchNode:(e,n,i,o)=>yR(t,e,n,i,o),canApply:e=>bR(t,e),formatChanged:(e,n,o,r)=>xR(t,i,e,n,o,r),getCssText:e(VI,t)}},KI=e=>{switch(e.toLowerCase()){case"undo":case"redo":case"mcefocus":return!0;default:return!1}},XI=(e,t,n)=>{const i=xc(!1),o=e=>{LM(t,!1,n),t.add({},e)};e.on("init",()=>{t.add()}),e.on("BeforeExecCommand",e=>{const i=e.command;KI(i)||(BM(t,n),t.beforeChange())}),e.on("ExecCommand",e=>{const t=e.command;KI(t)||o(e)}),e.on("ObjectResizeStart cut",()=>{t.beforeChange()}),e.on("SaveContent ObjectResized blur",o),e.on("dragend",o),e.on("keyup",n=>{const r=n.keyCode
33;if(n.isDefaultPrevented())return;const s=an.os.isMacOS()&&"Meta"===n.key;(r>=33&&r<=36||r>=37&&r<=40||45===r||n.ctrlKey||s)&&(o(),e.nodeChanged()),46!==r&&8!==r||e.nodeChanged(),i.get()&&t.typing&&!PM(TM(e),t.data[0])&&(e.isDirty()||e.setDirty(!0),e.dispatch("TypingUndo"),i.set(!1),e.nodeChanged())}),e.on("keydown",e=>{const r=e.keyCode;if(e.isDefaultPrevented())return;if(r>=33&&r<=36||r>=37&&r<=40||45===r)return void(t.typing&&o(e));const s=e.ctrlKey&&!e.altKey||e.metaKey;if((r<16||r>20)&&224!==r&&91!==r&&!t.typing&&!s)return t.beforeChange(),LM(t,!0,n),t.add({},e),void i.set(!0);(an.os.isMacOS()?e.metaKey:e.ctrlKey&&!e.altKey)&&t.beforeChange()}),e.on("mousedown",e=>{t.typing&&o(e)});const r=e=>"insertReplacementText"===e.inputType,s=e=>"insertText"===e.inputType&&null===e.data,a=e=>"insertFromPaste"===e.inputType||"insertFromDrop"===e.inputType;e.on("input",e=>{e.inputType&&(r(e)||s(e)||a(e))&&o(e)}),e.on("AddUndo Undo Redo ClearUndos",t=>{t.isDefaultPrevented()||e.nodeChanged()})},QI=e=>
33{e.addShortcut("meta+z","","Undo"),e.addShortcut("meta+y,meta+shift+z","","Redo")},ZI=e=>{const t=Fc(),n=xc(0),i=xc(0),o={data:[],typing:!1,beforeChange:()=>{rR(e,n,t)},add:(r,s)=>sR(e,o,i,n,t,r,s),dispatchChange:()=>{e.setDirty(!0);const t=TM(e);t.bookmark=Nu(e.selection),e.dispatch("change",{level:t,lastLevel:_e(o.data,i.get()).getOrUndefined()})},undo:()=>aR(e,o,n,i),redo:()=>lR(e,i,o.data),clear:()=>{cR(e,o,i)},reset:()=>{dR(e,o)},hasUndo:()=>uR(e,o,i),hasRedo:()=>hR(e,o,i),transact:t=>pR(e,o,n,t),ignore:t=>{fR(e,n,t)},extra:(t,n)=>{mR(e,o,i,t,n)}};return eR(e)||XI(e,o,n),QI(e),o},JI=[9,27,Yv.HOME,Yv.END,19,20,44,144,145,33,34,45,16,17,18,91,92,93,Yv.DOWN,Yv.UP,Yv.LEFT,Yv.RIGHT].concat(an.browser.isFirefox()?[224]:[]),eP="data-mce-placeholder",tP=e=>"keydown"===e.type||"keyup"===e.type,nP=e=>{const t=e.keyCode;return t===Yv.BACKSPACE||t===Yv.DELETE},iP=e=>{if(tP(e)){const t=e.keyCode;return!nP(e)&&(Yv.metaKeyPressed(e)||e.altKey||t>=112&&t<=123||te(JI,t))}return!1},oP=e=>tP(e)&&!(nP(e)||"keyup"===e.type&&229===e.keyCode),rP=(e,t,n)=>{if(ua(yi.fromDom(t),!1)){const i=t.firstElementChild;return!i||!e.getStyle(t.firstElementChild,"padding-left")&&!e.getStyle(t.firstElementChild,"padding-right")&&n===i.nodeName.toLowerCase()}return!1},sP=e=>{var t;const n=e.dom,i=dh(e),o=null!==(t=Hh(e))&&void 0!==t?t:"",r=(t,s)=>{if(iP(t))return;const a=e.getBody(),l=!oP(t)&&rP(n,a,i);(""!==n.getAttrib(a,eP)!==l||s)&&(n.setAttrib(a,eP,l?o:null),n.setAttrib(a,"aria-placeholder",l?o:null),Nv(e,l),e.on(l?"keydown":"keyup",r),e.off(l?"keyup":"keydown",r))};_t(o)&&e.on("init",t=>{r(t,!0),e.on("change SetContent ExecCommand",r),e.on("paste",t=>Wb.setEditorTimeout(e,()=>r(t)))})},aP=(e,t)=>({block:e,position:t}),lP=(e,t)=>({from:e,to:t}),cP=(e,t)=>{const n=yi.fromDom(e),i=yi.fromDom(t.container());return gk(n,i).map(e=>aP(e,t))},dP=e=>!xi(e.from.block,e.to.block),uP=(e,t)=>oo(t,e=>ls(e)||Ir(e.dom),t=>xi(t,e)).filter(zn).getOr(e),hP=(e,t)=>{const n=yi.fromDom(e);return xi(uP(n,t.from.block),uP(n,t.to.block))},pP=e=>!1===Pr(e.from.block.dom)&&!1===Pr(e.to.block.dom),fP=e=>{const t=e=>os(e)||Aa(e.dom);return t(e.from.block)&&t(e.to.block)},mP=(e,t,n)=>Rr(n.position.getNode())&&!ua(n.block)?_m(!1,n.block.dom).bind(i=>i.isEqual(n.position)?vm(t,e,i).bind(t=>cP(e,t)):K.some(n)).getOr(n):n,gP=(e,t,n)=>{const i=cP(e,Zd.fromRangeStart(n)),o=i.bind(n=>vm(t,e,n.position).bind(n=>cP(e,n).map(n=>mP(e,t,n))));return _n(i,o,lP).filter(t=>dP(t)&&hP(e,t)&&pP(t)&&fP(t))},vP=(e,t,n)=>n.collapsed?gP(e,t,n):K.none(),yP=(e,t)=>{const n=Fi(e);return he(n,e=>t.isBlock(Ln(e))).fold($(n),e=>n.slice(0,e))},bP=(e,t)=>{const n=yP(e,t);return oe(n,Po),n},_P=(e,t)=>{const n=zw(t,e);return ue(n.reverse(),e=>ua(e)).each(Po)},wP=e=>0===ae(Li(e),e=>!ua(e)).length,CP=(e,t,n,i,o)=>{if(ua(n))return ps(n),km(n.dom);wP(o)&&ua(t)&&Eo(o,yi.fromTag("br"));const r=Cm(n.dom,Zd.before(o.dom));return oe(bP(t,i),e=>{Eo(o,e)}),_P(e,t),r},kP=(e,t)=>e.isInline(Ln(t)),xP=(e,t,n,i)=>{if(ua(n)){if(ua(t)){const e=e=>{const t=(e,n)=>$i(e).fold(()=>n,e=>kP(i,e)?t(e,n.concat(ad(e))):n);return t(e,[])},o=le(e(n),(e,t)=>(Mo(e,t),t),hs());Io(t),Ao(t,o)}return Po(n),km(t.dom)}const o=xm(n.dom);return oe(bP(t,i),e=>{Ao(n,e)}),_P(e,t),o},SP=(e,t)=>{const n=zw(t,e);return K.from(n[n.length-1])},EP=(e,t)=>Si(t,e)?SP(t,e):K.none(),DP=(e,t)=>{_m(e,t.dom).bind(e=>K.from(e.getNode())).map(yi.fromDom).filter(is).each(Po)},TP=(t,n,i,o)=>(DP(!0,n),DP(!1,i),EP(n,i).fold(e(xP,t,n,i,o),e(CP,t,n,i,o))),AP=(e,t,n,i,o)=>t?TP(e,i,n,o):TP(e,n,i,o),MP=(e,t)=>{const n=yi.fromDom(e.getBody()),i=vP(n.dom,t,e.selection.getRng()).map(i=>()=>{AP(n,t,i.from.block,i.to.block,e.schema).each(t=>{e.selection.setRng(t.toRange())})});return i},RP=(e,t,n)=>{const i=t.getRng();return _n(gk(e,yi.fromDom(i.startContainer)),gk(e,yi.fromDom(i.endContainer)),(o,r)=>xi(o,r)?K.none():K.some(()=>{i.deleteContents(),AP(e,!0,o,r,n).each(e=>{t.setRng(e.toRange())})})).getOr(K.none())},NP=(t,n)=>{const i=yi.fromDom(n),o=e(xi,t);return io(i,ls,o).isSome()},IP=(e,t)=>NP(e,t.startContainer)||NP(e,t.endContainer),PP=(e,t)=>{const n=Cm(e.dom,Zd.fromRangeStart(t)).isNone(),i=wm(e.dom,Zd.fromRangeEnd(t)).isNone();return!IP(e,t)&&n&&i},OP=e=>K.some(()=>{e.setContent(""),e.selection.setCursorLocation()}),LP=e=>{const t=yi.fromDom(e.getBody()),n=e.selection.getRng();return PP(t,n)?OP(e):RP(t,e.selection,e.schema)},BP=e=>e.selection.isCollapsed()?K.none():LP(e),FP=(e,t,n,i,o)=>K.from(t._selectionOverrides.showCaret(e,n,i,o)),HP=e=>{const t=e.ownerDocument.createRange();return t.selectNode(e),t},$P=(e,t)=>e.dispatch("BeforeObjectSelected",{target:t}
vendor: 1,614 bytes, line 33
33).isDefaultPrevented()?K.none():K.some(HP(t)),zP=(e,t,n)=>{const i=qf(1,e.getBody(),t),o=Zd.fromRangeStart(i),r=o.getNode();if(bf(r))return FP(1,e,r,!o.isAtEnd(),!1);const s=o.getNode(!0);if(bf(s))return FP(1,e,s,!1,!1);const a=Cx(e.dom.getRoot(),o.getNode());return bf(a)?FP(1,e,a,!1,n):K.none()},jP=(e,t,n)=>t.collapsed?zP(e,t,n).getOr(t):t,qP=e=>Lw(e)||Nw(e),UP=e=>Bw(e)||Iw(e),WP=(e,t)=>{Sr(t)&&0===t.data.length&&e.remove(t)},VP=(e,t,n,i,o,r)=>{FP(i,e,r.getNode(!o),o,!0).each(n=>{if(t.collapsed){const e=t.cloneRange();o?e.setEnd(n.startContainer,n.startOffset):e.setStart(n.endContainer,n.endOffset),e.deleteContents()}else t.deleteContents();e.selection.setRng(n)}),WP(e.dom,n)},YP=(t,n)=>{const i=t.selection.getRng();if(!Sr(i.commonAncestorContainer))return K.none();const o=n?Xf.Forwards:Xf.Backwards,r=cm(t.getBody()),s=e(Gf,n?r.next:r.prev),a=n?qP:UP,l=Wf(o,t.getBody(),i),c=s(l),d=c?ak(n,c):c;if(!d||!Kf(l,d))return K.none();if(a(d))return K.some(()=>VP(t,i,l.getNode(),o,n,d));const u=s(d);return u&&a(u)&&Kf(d,u)?K.some(()=>VP(t,i,l.getNode(),o,n,u)):K.none()},GP=(e,t)=>YP(e,t),KP=(e,t)=>{const n=e.getBody();return t?km(n).filter(Lw):xm(n).filter(Bw)},XP=e=>{const t=e.selection.getRng();return!t.collapsed&&(KP(e,!0).exists(e=>e.isEqual(Zd.fromRangeStart(t)))||KP(e,!1).exists(e=>e.isEqual(Zd.fromRangeEnd(t))))},QP=e=>I(e)&&(ls(yi.fromDom(e))||ss(yi.fromDom(e))),ZP=Fu.generate([{remove:["element"]},{moveToElement:["element"]},{moveToPosition:["position"]}]),JP=(e,t)=>{const n=t.getNode(!e),i=e?"after":"before";return hr(n)&&n.getAttribute("data-mce-caret")===i},eO=(e,t,n,i,o)=>{const r=t=>
33o.isInline(t.nodeName.toLowerCase())&&!Lf(n,i,e);return Uf(!t,n).fold(()=>Uf(t,i).fold(Y,r),r)},tO=(e,t,n,i)=>{const o=i.getNode(!t);return gk(yi.fromDom(e),yi.fromDom(n.getNode())).map(e=>ua(e)?ZP.remove(e.dom):ZP.moveToElement(o)).orThunk(()=>K.some(ZP.moveToElement(o)))},nO=(e,t,n,i)=>vm(t,e,n).bind(o=>QP(o.getNode())||eO(e,t,n,o,i)?K.none():t&&Pr(o.getNode())||!t&&Pr(o.getNode(!0))?tO(e,t,n,o):t&&Bw(n)||!t&&Lw(n)?K.some(ZP.moveToPosition(o)):K.none()),iO=(e,t)=>N(t)?K.none():e&&Pr(t.nextSibling)?K.some(ZP.moveToElement(t.nextSibling)):!e&&Pr(t.previousSibling)?K.some(ZP.moveToElement(t.previousSibling)):K.none(),oO=(e,t,n)=>n.fold(e=>K.some(ZP.remove(e)),e=>K.some(ZP.moveToElement(e)),n=>Lf(t,n,e)?K.none():K.some(ZP.moveToPosition(n))),rO=(e,t,n,i)=>JP(t,n)?iO(t,n.getNode(!t)).orThunk(()=>nO(e,t,n,i)):nO(e,t,n,i).bind(t=>oO(e,n,t)),sO=(e,t,n,i)=>{const o=qf(t?1:-1,e,n),r=Zd.fromRangeStart(o),s=yi.fromDom(e);return!t&&Bw(r)?K.some(ZP.remove(r.getNode(!0))):t&&Lw(r)?K.some(ZP.remove(r.getNode())):!t&&Lw(r)&&eC(s,r,i)?tC(s,r,i).map(e=>ZP.remove(e.getNode())):t&&Bw(r)&&Jw(s,r,i)?nC(s,r,i).map(e=>ZP.remove(e.getNode())):rO(e,t,r,i)},aO=(e,t)=>n=>(e._selectionOverrides.hideFakeCaret(),ZC(e,t,yi.fromDom(n)),!0),lO=(e,t)=>n=>{const i=t?Zd.before(n):Zd.after(n);return e.selection.setRng(i.toRange()),!0},cO=e=>t=>(e.selection.setRng(t.toRange()),!0),dO=(e,t)=>K.from(Cx(e.getBody(),t)),uO=(e,t)=>{const n=e.selection.getNode();return dO(e,n).filter(Pr).fold(()=>sO(e.getBody(),t,e.selection.getRng(),e.schema).map(n=>()=>n.fold(aO(e,t),lO(e,t),cO(e))),()=>K.some(B))},hO=e=>{oe(ar(e,".mce-offscreen-selection"),Po)},pO=(e,t)=>{const n=e.selection.getNode();if(Pr(n)&&!Or(n)){return dO(e,n.parentNode).filter(Pr).fold(()=>K.some(()=>{hO(yi.fromDom(e.getBody())),ZC(e,t,yi.fromDom(e.selection.getNode())),vk(e)}),()=>K.some(B))}return XP(e)?K.some(()=>{_k(e,e.selection.getRng(),yi.fromDom(e.getBody()))}):K.none()},fO=e=>{const t=e.dom,n=e.selection,i=Cx(e.getBody(),n.getNode());if(Ir(i)&&t.isBlock(i)&&t.isEmpty(i)){const e=t.create("br",{"data-mce-bogus":"1"});t.setHTML(i,""),i.appendChild(e),n.setRng(Zd.before(e).toRange())}return!0},mO=(e,t)=>e.selection.isCollapsed()?uO(e,t):pO(e,t),gO=(e,t)=>{const n=Zd.fromRangeStart(e.selection.getRng());return vm(t,e.getBody(),n).filter(e=>t?Mw(e):Rw(e)).bind(e=>Bf(t?0:-1,e)).map(t=>()=>e.selection.select(t))},vO=(e,t)=>e.selection.isCollapsed()?gO(e,t):K.none(),yO=Sr,bO=e=>yO(e)&&e.data[0]===ms,_O=e=>yO(e)&&e.data[e.data.length-1]===ms,wO=e=>{var t;return(null!==(t=e.ownerDocument)&&void 0!==t?t:document).createTextNode(ms)},CO=e=>{var t;if(yO(e.previousSibling))return _O(e.previousSibling)||e.previousSibling.appendData(ms),e.previousSibling;if(yO(e))return bO(e)||e.insertData(0,ms),e;{const n=wO(e);return null===(t=e.parentNode)||void 0===t||t.insertBefore(n,e),n}},kO=e=>{var t,n;if(yO(e.nextSibling))return bO(e.nextSibling)||e.nextSibling.insertData(0,ms),e.nextSibling;if(yO(e))return _O(e)||e.appendData(ms),e;{const i=wO(e);return e.nextSibling?null===(t=e.parentNode)||void 0===t||t.insertBefore(i,e.nextSibling):null===(n=e.parentNode)||void 0===n||n.appendChild(i),i}},xO=(e,t)=>e?CO(t):kO(t),SO=e(xO,!0),EO=e(xO,!1),DO=(e,t)=>Sr(e.container())?xO(t,e.container()):xO(t,e.getNode()),TO=(e,t)=>{const n=t.get();return n&&e.container()===n&&Cs(n)},AO=(e,t)=>t.fold(t=>{df(e.get());const n=SO(t);return e.set(n),K.some(Zd(n,n.length-1))},t=>km(t).map(t=>{if(TO(t,e)){const t=e.get();return Zd(t,1)}{df(e.get());const n=DO(t,!0);return e.set(n),Zd(n,1)}}),t=>xm(t).map(t=>{if(TO(t,e)){const t=e.get();return Zd(t,t.length-1)}{df(e.get());const n=DO(t,!1);return e.set(n),Zd(n,n.length-1)}}),t=>{df(e.get());const n=EO(t);return e.set(n),K.some(Zd(n,1))}),MO=(e,t)=>{for(let n=0;n<e.length;n++){const i=e[n].apply(null,t);if(i.isSome())return i}return K.none()},RO=Fu.generate([{before:["element"]},{start:["element"]},{end:["element"]},{after:["element"]}]),NO=(e,t)=>
vendor: 1,110 bytes, line 33
33{const n=Of(t,e);return n||e},IO=(t,n,i)=>{const o=lk(i),r=NO(n,o.container());return ok(t,r,o).fold(()=>wm(r,o).bind(e(ok,t,r)).map(e=>RO.before(e)),K.none)},PO=(e,t)=>null===Dm(e,t),OO=(t,n,i)=>ok(t,n,i).filter(e(PO,n)),LO=(e,t,n)=>{const i=ck(n);return OO(e,t,i).bind(e=>Cm(e,i).isNone()?K.some(RO.start(e)):K.none())},BO=(e,t,n)=>{const i=lk(n);return OO(e,t,i).bind(e=>wm(e,i).isNone()?K.some(RO.end(e)):K.none())},FO=(t,n,i)=>{const o=ck(i),r=NO(n,o.container());return ok(t,r,o).fold(()=>Cm(r,o).bind(e(ok,t,r)).map(e=>RO.after(e)),K.none)},HO=e=>!nk(zO(e)),$O=(e,t,n)=>MO([IO,LO,BO,FO],[e,t,n]).filter(HO),zO=e=>e.fold(z,z,z,z),jO=e=>e.fold($("before"),$("start"),$("end"),$("after")),qO=e=>e.fold(RO.before,RO.before,RO.after,RO.after),UO=e=>e.fold(RO.start,RO.start,RO.end,RO.end),WO=(e,t)=>jO(e)===jO(t)&&zO(e)===zO(t),VO=(e,t,n,i,o,r)=>_n(ok(t,n,i),ok(t,n,o),(t,i)=>t!==i&&rk(n,t,i)?RO.after(e?t:i):r).getOr(r),YO=(e,t)=>e.fold(G,e=>!WO(e,t)),GO=(t,n,i,o,r)=>{const s=ak(t,r);return vm(t,i,s).map(e(ak,t)).fold(()=>o.map(qO),r=>$O(n,i,r).map(e(VO,t,n,i,s,r)).filter(e(YO,o))).filter(HO)},KO=(e,t)=>
vendor: 5,283 bytes, line 33
33e?t.fold(F(K.some,RO.start),K.none,F(K.some,RO.after),K.none):t.fold(K.none,F(K.some,RO.before),K.none,F(K.some,RO.end)),XO=(t,n,i,o)=>{const r=ak(t,o),s=$O(n,i,r);return $O(n,i,r).bind(e(KO,t)).orThunk(()=>GO(t,n,i,s,o))},QO=e=>P(e.selection.getSel().modify),ZO=(e,t,n)=>{const i=e?1:-1;return t.setRng(Zd(n.container(),n.offset()+i).toRange()),t.getSel().modify("move",e?"forward":"backward","word"),!0},JO=(e,t)=>{const n=t.selection.getRng(),i=e?Zd.fromRangeEnd(n):Zd.fromRangeStart(n);return!!QO(t)&&(e&&Es(i)?ZO(!0,t.selection,i):!(e||!Ds(i))&&ZO(!1,t.selection,i))};var eL;!function(e){e[e.Br=0]="Br",e[e.Block=1]="Block",e[e.Wrap=2]="Wrap",e[e.Eol=3]="Eol"}(eL||(eL={}));const tL=(e,t)=>e===Xf.Backwards?ge(t):t,nL=(e,t,n)=>e===Xf.Forwards?t.next(n):t.prev(n),iL=(e,t,n,i)=>Rr(i.getNode(t===Xf.Forwards))?eL.Br:!1===Lf(n,i)?eL.Block:eL.Wrap,oL=(e,t,n,i)=>{const o=cm(n);let r=i;const s=[];for(;r;){const i=nL(t,o,r);if(!i)break;if(Rr(i.getNode(!1)))return t===Xf.Forwards?{positions:tL(t,s).concat([i]),breakType:eL.Br,breakAt:K.some(i)}:{positions:tL(t,s),breakType:eL.Br,breakAt:K.some(i)};if(i.isVisible()){if(e(r,i)){const e=iL(n,t,r,i);return{positions:tL(t,s),breakType:e,breakAt:K.some(i)}}s.push(i),r=i}else r=i}return{positions:tL(t,s),breakType:eL.Eol,breakAt:K.none()}},rL=(e,t,n,i)=>t(n,i).breakAt.map(i=>{const o=t(n,i).positions;return e===Xf.Backwards?o.concat(i):[i].concat(o)}).getOr([]),sL=(e,t)=>ce(e,(e,n)=>e.fold(()=>K.some(n),i=>_n(we(i.getClientRects()),we(n.getClientRects()),(e,o)=>{const r=Math.abs(t-e.left);return Math.abs(t-o.left)<=r?n:i}).or(e)),K.none()),aL=(e,t)=>we(t.getClientRects()).bind(t=>sL(e,t.left)),lL=e(oL,Zd.isAbove,-1),cL=e(oL,Zd.isBelow,1),dL=e(rL,-1,lL),uL=e(rL,1,cL),hL=(e,t)=>lL(e,t).breakAt.isNone(),pL=(e,t)=>cL(e,t).breakAt.isNone(),fL=e=>km(e).map(t=>[t].concat(cL(e,t).positions)).getOr([]),mL=e=>xm(e).map(t=>lL(e,t).positions.concat(t)).getOr([]),gL=(e,t)=>aL(dL(e,t),t),vL=(e,t)=>aL(uL(e,t),t),yL=Pr,bL=(e,t)=>Math.abs(e.left-t),_L=(e,t)=>Math.abs(e.right-t),wL=e=>He(e,"node"),CL=(e,t)=>Ke(e,(e,n)=>{const i=Math.min(bL(e,t),_L(e,t)),o=Math.min(bL(n,t),_L(n,t));return o===i&&wL(n)&&yL(n.node)||o<i?n:e}),kL=e=>{const t=t=>ie(t,t=>{const n=fd(t);return n.node=e,n});if(hr(e))return t(e.getClientRects());if(Sr(e)){const n=e.ownerDocument.createRange();return n.setStart(e,0),n.setEnd(e,e.data.length),t(n.getClientRects())}return[]},xL=e=>fe(e,kL);var SL;!function(e){e[e.Up=-1]="Up",e[e.Down=1]="Down"}(SL||(SL={}));const EL=(e,t,n,i)=>{let o=i;for(;o=If(o,e,Gs,t);)if(n(o))return},DL=(e,t,n,i,o,r)=>{let s=0;const a=[],l=i=>{let r=xL([i]);-1===e&&(r=r.reverse());for(let e=0;e<r.length;e++){const i=r[e];if(!n(i,c)){if(a.length>0&&t(i,Qe(a))&&s++,i.line=s,o(i))return!0;a.push(i)}}return!1},c=Qe(r.getClientRects());if(!c)return a;const d=r.getNode();return d&&(l(d),EL(e,i,l,d)),a},TL=(e,t)=>t.line>e,AL=(e,t)=>t.line===e,ML=e(DL,SL.Up,yd,bd),RL=e(DL,SL.Down,bd,yd),NL=e=>Qe(e.getClientRects()),IL=(e,t,n,i)=>{const o=cm(t);let r,s,a,l;const c=[];let d=0;1===e?(r=o.next,s=bd,a=yd,l=Zd.after(i)):(r=o.prev,s=yd,a=bd,l=Zd.before(i));const u=NL(l);do{if(!l.isVisible())continue;const e=NL(l);if(a(e,u))continue;c.length>0&&s(e,Qe(c))&&d++;const t=fd(e);if(t.position=l,t.line=d,n(t))return c;c.push(t)}while(l=r(l));return c},PL=e=>t=>TL(e,t),OL=e=>t=>AL(e,t),LL=(e,t)=>{e.selection.setRng(t),xb(e,e.selection.getRng())},BL=(e,t,n)=>K.some(jP(e,t,n)),FL=(t,n,i,o,r,s)=>{const a=n===Xf.Forwards,l=cm(t.getBody()),c=e(Gf,a?l.next:l.prev),d=a?o:r;if(!i.collapsed){const e=Sd(i);if(s(e))return FP(n,t,e,n===Xf.Backwards,!1);if(XP(t)){const e=i.cloneRange();return e.collapse(n===Xf.Backwards),K.from(e)}}const u=Wf(n,t.getBody(),i);if(d(u))return $P(t,u.getNode(!a));let h=c(u);const p=Is(i);if(!h)return p?K.some(i):K.none();if(h=ak(a,h),d(h))return FP(n,t,h.getNode(!a),a,!1);const f=c(h);return f&&d(f)&&Kf(h,f)?FP(n,t,f.getNode(!a),a,!1):p?BL(t,h.toRange(),!1):K.none()},HL=(e,t,n,i,o,r)=>{const s=Wf(t,e.getBody(),n),a=Qe(s.getClientRects()),l=t===SL.Down,c=e.getBody();if(!a)return K.none();if(XP(e)){const e=l?Zd.fromRangeEnd(n):Zd.fromRangeStart(n);return(l?vL:gL)(c,e).orThunk(()=>K.from(e)).map(e=>e.toRange())}const d=(l?RL:ML)(c,PL(1),s),u=ae(d,OL(1)),h=a.left,p=CL(u,h);if(p&&r(p.node)){const n=Math.abs(h-p.left),i=Math.abs(h-p.right);return FP(t,e,p.node,n<i,!1)}let f;if(f=i(s)?s.getNode():o(s)?s.getNode(!0):Sd(n),f){const n=IL(t,c,PL(1),f);let i=CL(ae(n,OL(1)),h);if(i)return BL(e,i.position.toRange(),!1);if(i=Qe(ae(n,OL(0))),i)return BL(e,i.position.toRange(),!1)}return 0===u.length?$L(e,l).filter(l?o:i).map(t=>jP(e,t.toRange(),!1)):K.none()},$L=(e,t)=>{const n=e.selection.getRng(),i=t?Zd.fromRangeEnd(n):Zd.fromRangeStart(n),o=Pf(i.container(),e.getBody());if(t){const e=cL(o,i);return Ce(e.positions)}{const e=lL(o,i);return we(e.positions)}},zL=(e,t,n)=>$L(e,t).filter(n).exists(t=>(e.selection.setRng(t.toRange()),!0)),jL=(e,t)=>{const n=e.dom.createRng();n.setStart(t.container(),t.offset()),n.setEnd(t.container(),t.offset()),e.selection.setRng(n)},qL=(e,t)=>{e?t.setAttribute("data-mce-selected","inline-boundary"):t.removeAttribute("data-mce-selected")},UL=(e,t,n)=>AO(t,n).map(t=>(jL(e,t),n)),WL=(e,t,n)=>{const i=Zd.fromRangeStart(e);if(e.collapsed)return i;{const o=Zd.fromRangeEnd(e);
vendor: 2,689 bytes, line 33
33return n?Cm(t,o).getOr(o):wm(t,i).getOr(i)}},VL=(t,n,i)=>{const o=t.getBody(),r=WL(t.selection.getRng(),o,i),s=e(tk,t);return XO(i,s,o,r).bind(e=>UL(t,n,e))},YL=(t,n,i)=>{const o=ie(ar(yi.fromDom(n.getRoot()),'*[data-mce-selected="inline-boundary"]'),e=>e.dom),r=ae(o,t),s=ae(i,t);oe(ve(r,s),e(qL,!1)),oe(ve(s,r),e(qL,!0))},GL=(e,t)=>{const n=t.get();if(e.selection.isCollapsed()&&!e.composing&&n){const i=Zd.fromRangeStart(e.selection.getRng());Zd.isTextPosition(i)&&!sk(i)&&(jL(e,cf(n,i)),t.set(null))}},KL=(e,t,n,i)=>{if(t.selection.isCollapsed()){const o=ae(i,e);oe(o,()=>{const i=Zd.fromRangeStart(t.selection.getRng());$O(e,t.getBody(),i).bind(e=>UL(t,n,e))})}},XL=(e,t,n)=>!!Vh(e)&&VL(e,t,n).isSome(),QL=(e,t)=>!!Vh(t)&&JO(e,t),ZL=t=>{const n=xc(null),i=e(tk,t);return t.on("NodeChange",e=>{Vh(t)&&(YL(i,t.dom,e.parents),GL(t,n),KL(i,t,n,e.parents))}),n},JL=e(QL,!0),eB=e(QL,!1),tB=(t,n,i)=>{if(Vh(t)){const o=$L(t,n).getOrThunk(()=>{const e=t.selection.getRng();return n?Zd.fromRangeEnd(e):Zd.fromRangeStart(e)});return $O(e(tk,t),t.getBody(),o).exists(e=>{const n=qO(e);return AO(i,n).exists(e=>(jL(t,e),!0))})}return!1},nB=(e,t)=>{const n=document.createRange();return n.setStart(e.container(),e.offset()),n.setEnd(t.container(),t.offset()),n},iB=e=>_n(km(e),xm(e),(t,n)=>{const i=ak(!0,t),o=ak(!1,n);return wm(e,i).forall(e=>e.isEqual(o))}).getOr(!0),oB=(e,t)=>n=>AO(t,n).map(t=>()=>jL(e,t)),rB=(t,n,i,o)=>{const r=t.getBody(),s=e(tk,t);t.undoManager.ignore(()=>{t.selection.setRng(nB(i,o)),hk(t),$O(s,r,Zd.fromRangeStart(t.selection.getRng())).map(UO).bind(oB(t,n)).each(V)}),t.nodeChanged()},sB=(e,t)=>{const n=Of(t,e);return n||e},aB=(t,n,i,o)=>{const r=sB(t.getBody(),o.container()),s=e(tk,t),a=$O(s,r,o);return a.bind(e=>i?e.fold($(K.some(UO(e))),K.none,$(K.some(qO(e))),K.none):e.fold(K.none,$(K.some(qO(e))),K.none,$(K.some(UO(e))))).map(oB(t,n)).getOrThunk(()=>{const e=ym(i,r,o),l=e.bind(e=>$O(s,r,e));return _n(a,l,()=>ok(s,r,o).bind(e=>iB(e)?K.some(()=>{ZC(t,i,yi.fromDom(e))}):K.none())).getOrThunk(()=>l.bind(()=>e.map(e=>()=>{i?rB(t,n,o,e):rB(t,n,e,o)})))})},lB=(e,t,n)=>{if(e.selection.isCollapsed()&&Vh(e)){const i=Zd.fromRangeStart(e.selection.getRng());return aB(e,t,n,i)}return K.none()},cB=e=>ji(e)>1,dB=(e,t)=>{const n=yi.fromDom(e.getBody()),i=yi.fromDom(e.selection.getStart()),o=zw(i,n);return he(o,t).fold($(o),e=>o.slice(0,e))},uB=e=>1===ji(e),hB=e=>dB(e,t=>e.schema.isBlock(Ln(t))||cB(t)),pB=e=>dB(e,t=>e.schema.isBlock(Ln(t))),fB=(t,n)=>{const i=e(mE,t);return fe(n,e=>i(e)?[e.dom]:[])},mB=e=>{const t=pB(e);return fB(e,t)},gB=(e,t,n,i)=>{const o=fB(t,i);if(0===o.length)ZC(t,e,n);else{const e=pE(n.dom,o);t.selection.setRng(e.toRange())}},vB=(e,t)=>
33{const n=ae(hB(e),uB);return Ce(n).bind(i=>{const o=Zd.fromRangeStart(e.selection.getRng());return yk(t,o,i.dom)&&!Vg(i)?K.some(()=>gB(t,e,i,n)):K.none()})},yB=(e,t)=>{const n=t.parentElement;return Rr(t)&&!A(n)&&e.dom.isEmpty(n)},bB=e=>Vg(yi.fromDom(e)),_B=(e,t)=>{const n=e.selection.getStart(),i=yB(e,n)||bB(n)?pE(n,t):fE(e.selection.getRng(),t);e.selection.setRng(i.toRange())},wB=(e,t)=>{const n=ve(t,mB(e));n.length>0&&_B(e,n)},CB=e=>Sr(e.startContainer),kB=e=>0===e.startOffset&&CB(e),xB=(e,t)=>{const n=t.startContainer.parentElement;return!A(n)&&mE(e,yi.fromDom(n))},SB=e=>{const t=e.startContainer.parentNode,n=e.endContainer.parentNode;return!A(t)&&!A(n)&&t.isEqualNode(n)},EB=e=>{const t=e.endContainer;return e.endOffset===(Sr(t)?t.length:t.childNodes.length)},DB=e=>SB(e)&&EB(e),TB=e=>!e.endContainer.isEqualNode(e.commonAncestorContainer),AB=e=>DB(e)||TB(e),MB=e=>{const t=e.selection.getRng();return kB(t)&&xB(e,t)&&AB(t)},RB=e=>{if(MB(e)){const t=mB(e);return K.some(()=>{hk(e),wB(e,t)})}return K.none()},NB=(e,t)=>e.selection.isCollapsed()?vB(e,t):RB(e),IB=(e,t)=>wk(e,e=>Em(e.dom),e=>t.isBlock(Ln(e))),PB=e=>IB(yi.fromDom(e.selection.getStart()),e.schema),OB=e=>{const t=e.selection.getRng();return t.collapsed&&(CB(t)||e.dom.isEmpty(t.startContainer))&&!PB(e)},LB=e=>(OB(e)&&_B(e,[]),!0),BB=(e,t,n)=>I(n)?K.some(()=>{e._selectionOverrides.hideFakeCaret(),ZC(e,t,yi.fromDom(n))}):K.none(),FB=(e,t)=>{const n=t?Nw:Iw,i=t?Xf.Forwards:Xf.Backwards,o=Wf(i,e.getBody(),e.selection.getRng());return n(o)?BB(e,t,o.getNode(!t)):K.from(ak(t,o)).filter(e=>n(e)&&Kf(o,e)).bind(n=>BB(e,t,n.getNode(!t)))},HB=(e,t)=>{const n=e.selection.getNode();
vendor: 4,130 bytes, line 33
33return Br(n)?BB(e,t,n):K.none()},$B=(e,t)=>e.selection.isCollapsed()?FB(e,t):HB(e,t),zB=e=>oo(e,e=>Ir(e.dom)||Pr(e.dom)).exists(e=>Ir(e.dom)),jB=e=>kt(null!=e?e:"").getOr(0),qB=(e,t)=>(e||ns(t)?"margin":"padding")+("rtl"===_o(t,"direction")?"-right":"-left"),UB=(e,t,n,i,o,r)=>{const s=qB(n,yi.fromDom(r)),a=jB(e.getStyle(r,s));if("outdent"===t){const t=Math.max(0,a-i);e.setStyle(r,s,t?t+o:"")}else{const t=a+i+o;e.setStyle(r,s,t)}},WB=(e,t)=>me(t,t=>{const n=qB(Mh(e),t),i=Co(t,n).map(jB).getOr(0);return"false"!==e.dom.getContentEditable(t.dom)&&i>0}),VB=e=>{const t=KB(e);return!e.mode.isReadOnly()&&(t.length>1||WB(e,t))},YB=e=>rs(e)||ss(e),GB=e=>Mi(e).exists(YB),KB=e=>ae(Bo(e.selection.getSelectedBlocks()),e=>!YB(e)&&!GB(e)&&zB(e)),XB=(e,t)=>{var n,i;const{dom:o}=e,r=Rh(e),s=null!==(i=null===(n=/[a-z%]+$/i.exec(r))||void 0===n?void 0:n[0])&&void 0!==i?i:"px",a=jB(r),l=Mh(e);oe(KB(e),e=>{UB(o,t,l,a,s,e.dom)})},QB=e=>XB(e,"indent"),ZB=e=>XB(e,"outdent"),JB=e=>{if(e.selection.isCollapsed()&&VB(e)){const t=e.dom,n=e.selection.getRng(),i=Zd.fromRangeStart(n),o=t.getParent(n.startContainer,t.isBlock);if(null!==o&&Yw(yi.fromDom(o),i,e.schema))return K.some(()=>ZB(e))}return K.none()},eF=(e,t,n)=>xe([JB,mO,GP,(e,n)=>lB(e,t,n),MP,wx,vO,$B,BP,NB],t=>t(e,n)).filter(()=>e.selection.isEditable()),tF=(e,t)=>{eF(e,t,!1).fold(()=>{e.selection.isEditable()&&(hk(e),vk(e))},V)},nF=(e,t)=>{eF(e,t,!0).fold(()=>{e.selection.isEditable()&&pk(e)},V)},iF=(e,t)=>{e.addCommand("delete",()=>{tF(e,t)}),e.addCommand("forwardDelete",()=>{nF(e,t)})},oF=5,rF=400,sF=e=>void 0===e.touches||1!==e.touches.length?K.none():K.some(e.touches[0]),aF=(e,t)=>{const n=Math.abs(e.clientX-t.x),i=Math.abs(e.clientY-t.y);return n>oF||i>oF},lF=e=>{const t=Fc(),n=xc(!1),i=$c(t=>{e.dispatch("longpress",{...t,type:"longpress"}),n.set(!0)},rF);e.on("touchstart",e=>{sF(e).each(o=>{i.cancel();const r={x:o.clientX,y:o.clientY,target:e.target};i.throttle(e),n.set(!1),t.set(r)})},!0),e.on("touchmove",o=>{i.cancel(),sF(o).each(i=>{t.on(o=>{aF(i,o)&&(t.clear(),n.set(!1),e.dispatch("longpresscancel"))})})},!0),e.on("touchend touchcancel",o=>{i.cancel(),"touchcancel"!==o.type&&t.get().filter(e=>e.target.isEqualNode(o.target)).each(()=>{n.get()?o.preventDefault():e.dispatch("tap",{...o,type:"tap"})})},!0)},cF=(e,t)=>Fe(e,t.nodeName),dF=(e,t)=>!!Sr(t)||!!hr(t)&&!(cF(e.getBlockElements(),t)||Km(t)||Na(e,t)||pa(t)),uF=(e,t,n)=>ne($w(yi.fromDom(n),yi.fromDom(t)),t=>cF(e,t.dom)),hF=(e,t)=>{if(Sr(t)){if(0===t.data.length)return!0;if(/^\s+$/.test(t.data))return!t.nextSibling||cF(e,t.nextSibling)||pa(t.nextSibling)}return!1},pF=e=>e.dom.create(dh(e),uh(e)),fF=e=>{const t=e.dom,n=e.selection,i=e.schema,o=i.getBlockElements(),r=n.getStart(),s=e.getBody();let a,l,c=!1;const d=dh(e);if(!r||!hr(r))return;const u=s.nodeName.toLowerCase();if(!i.isValidChild(u,d.toLowerCase())||uF(o,s,r))return;const h=n.getRng(),{startContainer:p,startOffset:f,endContainer:m,endOffset:g}=h,v=m_(e);let y=s.firstChild;for(;y;)if(hr(y)&&Da(i,y),dF(i,y)){if(hF(o,y)){l=y,y=y.nextSibling,t.remove(l);continue}a||(a=pF(e),s.insertBefore(a,y),c=!0),l=y,y=y.nextSibling,a.appendChild(l)}else a=null,y=y.nextSibling;c&&v&&(h.setStart(p,f),h.setEnd(m,g),n.setRng(h),e.nodeChanged())},mF=(e,t,n)=>{const i=yi.fromDom(pF(e)),o=hs();Ao(i,o),n(t,i);const r=document.createRange();return r.setStartBefore(o.dom),r.setEndBefore(o.dom),r},gF=t=>{t.on("NodeChange",e(fF,t))},vF=e=>t=>-1!==(" "+t.attr("class")+" ").indexOf(e),yF=(e,t,n)=>function(i){const o=arguments,r=o[o.length-2],s=r>0?t.charAt(r-1):"";if('"'===s)return i;if(">"===s){const e=t.lastIndexOf("<",r);if(-1!==e){if(-1!==t.substring(e,r).indexOf('contenteditable="false"'))return i}}return'<span class="'+n+'" data-mce-content="'+e.dom.encode(o[0])+'">'+e.dom.encode("string"==typeof o[1]?o[1]:o[0])+"</span>"},bF=(e,t,n)=>{let i=t.length,o=n.content;if("raw"!==n.format){for(;i--;)o=o.replace(t[i],yF(e,o,Op(e)));n.content=o}},_F=(e,t)=>me(e,e=>{const n=t.match(e);return null!==n&&n[0].length===t.length}),wF=e=>{const t="contenteditable",n=" "+gn.trim(Lp(e))+" ",i=" "+gn.trim(Op(e))+" ",o=vF(n),r=vF(i),s=Bp(e);s.length>
330&&e.on("BeforeSetContent",t=>{bF(e,s,t)}),e.parser.addAttributeFilter("class",e=>{let n=e.length;for(;n--;){const i=e[n];o(i)?i.attr(t,"true"):r(i)&&i.attr(t,"false")}}),e.serializer.addAttributeFilter(t,e=>{let n=e.length;for(;n--;){const i=e[n];if(!o(i)&&!r(i))continue;const a=i.attr("data-mce-content");s.length>0&&a?_F(s,a)?(i.name="#text",i.type=3,i.raw=!0,i.value=a):i.remove():i.attr(t,null)}})},CF=e=>co(yi.fromDom(e.getBody()),"*[data-mce-caret]").map(e=>e.dom).getOrNull(),kF=(e,t)=>{t.hasAttribute("data-mce-caret")&&(Ns(t),e.selection.setRng(e.selection.getRng()),e.selection.scrollIntoView(t))},xF=(e,t)=>{const n=CF(e);if(n)return"compositionstart"===t.type?(t.preventDefault(),t.stopPropagation(),void kF(e,n)):void(xs(n)&&(kF(e,n),e.undoManager.add()))},SF=t=>{t.on("keyup compositionstart",e(xF,t))},EF=Pr,DF=(e,t,n)=>FL(t,e,n,Lw,Bw,EF),TF=(e,t,n)=>HL(t,e,n,e=>Lw(e)||Pw(e),e=>Bw(e)||Ow(e),EF),AF=e=>{const t=e.dom.create(dh(e));return t.innerHTML='<br data-mce-bogus="1">',t},MF=(t,n,i)=>{const o=cm(t.getBody()),r=e(Gf,1===n?o.next:o.prev);if(i.collapsed){const e=t.dom.getParent(i.startContainer,"PRE");if(!e)return;if(!r(Zd.fromRangeStart(i))){const i=yi.fromDom(AF(t));1===n?Do(yi.fromDom(e),i):Eo(yi.fromDom(e),i),t.selection.select(i.dom,!0),t.selection.collapse()}}},RF=(e,t)=>{const n=t?Xf.Forwards:Xf.Backwards,i=e.selection.getRng();return DF(n,e,i).orThunk(()=>(MF(e,n,i),K.none()))},NF=(e,t)=>{const n=t?1:-1,i=e.selection.getRng();return TF(n,e,i).orThunk(()=>(MF(e,n,i),K.none()))},IF=(e,t)=>{const n=t?e.getEnd(!0):e.getStart(!0);return nk(n)?!t:t},PF=(e,t)=>RF(e,IF(e.selection,t)).exists(t=>(LL(e,t),!0)),OF=(e,t)=>NF(e,t).exists(t=>(LL(e,t),!0)),LF=(e,t)=>zL(e,t,t?Bw:Lw),BF=(e,t)=>KP(e,!t).map(n=>{const i=n.toRange(),o=e.selection.getRng();return t?i.setStart(o.startContainer,o.startOffset):i.setEnd(o.endContainer,o.endOffset),i}).exists(t=>(LL(e,t),!0)),FF=e=>te(["figcaption"],Ln(e)),HF=(t,n,i)=>{const o=e(xi,n);return oo(yi.fromDom(t.container()),e=>i.isBlock(Ln(e)),o).filter(FF)},$F=(e,t,n)=>t?pL(e.dom,n):hL(e.dom,n),zF=(e,t)=>{const n=yi.fromDom(e.getBody()),i=Zd.fromRangeStart(e.selection.getRng());return HF(i,n,e.schema).exists(()=>{if($F(n,t,i)){const i=mF(e,n,t?Ao:To);return e.selection.setRng(i),!0}return!1})},jF=(e,t)=>!!e.selection.isCollapsed()&&zF(e,t),qF=(e,t,n)=>{const i=e.selection.getRng(),o=Zd.fromRangeStart(i);return!(e.getBody().firstChild!==t||!hL(n,o))&&(e.execCommand("InsertNewBlockBefore"),!0)},UF=(e,t)=>{const n=e.selection.getRng(),i=Zd.fromRangeStart(n);return!(e.getBody().lastChild!==t||!pL(t,i))&&(e.execCommand("InsertNewBlockAfter"),!0)},WF=(e,t)=>t?K.from(e.dom.getParent(e.selection.getNode(),"details")).map(t=>UF(e,t)).getOr(!1):K.from(e.dom.getParent(e.selection.getNode(),"summary")).bind(t=>K.from(e.dom.getParent(t,"details")).map(n=>qF(e,n,t))).getOr(!1),VF=(e,t)=>WF(e,t),YF={shiftKey:!1,altKey:!1,ctrlKey:!1,metaKey:!1,keyCode:0},GF=e=>ie(e,e=>({...YF,...e})),KF=e=>ie(e,e=>({...YF,...e})),XF=(e,t)=>t.keyCode===e.keyCode&&t.shiftKey===e.shiftKey&&t.altKey===e.altKey&&t.ctrlKey===e.ctrlKey&&t.metaKey===e.metaKey,QF=(e,t)=>fe(GF(e),e=>XF(e,t)?[e]:[]),ZF=(e,t)=>fe(KF(e),e=>XF(e,t)?[e]:[]),JF=(e,...t)=>()=>e.apply(null,t),eH=(e,t)=>ue(QF(e,t),e=>e.action()),tH=(e,t)=>xe(ZF(e,t),e=>e.action()),nH=(e,t)=>{const n=t?Xf.Forwards:Xf.Backwards,i=e.selection.getRng();return FL(e,n,i,Nw,Iw,Br).exists(t=>(LL(e,t),!0))},iH=(e,t)=>{const n=t?1:-1,i=e.selection.getRng();return HL(e,n,i,Nw,Iw,Br).exists(t=>(LL(e,t),!0))},oH=(e,t)=>zL(e,t,t?Iw:Nw),rH=Fu.generate([{none:["current"]},{first:["current"]},{middle:["current","target"]},{last:["current"]}]),sH=e=>rH.none(e),aH={...rH,none:sH},lH=(e,t)=>cH(e,t,G),cH=(e,t,n)=>fe(Fi(e),e=>_i(e,t)?n(e)?[e]:[]:cH(e,t,n)),dH=(e,t,n=Y)=>{if(n(t))return K.none();if(te(e,Ln(t)))return K.some(t);const i=e=>_i(e,"table")||n(e);return lo(t,e.join(","),i)},uH=(e,t)=>dH(["td","th"],e,t),hH=e=>lH(e,"th,td"),pH=(e,t)=>uo(e,"table",t),fH=(e,t,n,i,o=G)=>{const r=1===i;if(!r&&n<=0)return aH.first(e[0]);if(r&&n>=e.length-1)return aH.last(e[e.length-1]);{const r=n+i,s=e[r];return o(s)?aH.middle(t,s):fH(e,t,r,i,o)}},mH=(e,t)=>pH(e,t).bind(t=>{const n=hH(t);return he(n,t=>xi(e,t)).map(e=>({index:e,all:n}))}),gH=(e,t,n)=>mH(e,n).fold(()=>aH.none(e),n=>fH(n.all,e,n.index,1,t)),vH=(e,t,n)=>mH(e,n).fold(()=>aH.none(),n=>fH(n.all,e,n.index,-1,t)),yH=(e,t)=>({left:e.left-t,top:e.top-t,right:e.right+2*t,bottom:e.bottom+2*t,width:e.width+t,height:e.height+t}),bH=(e,t)=>fe(t,t=>{const n=yH(fd(t.getBoundingClientRect()),-1);return[{x:n.left,y:e(n),cell:t},{x:n.right,y:e(n),cell:t}]}),_H=(e,t,n)=>ce(e,(e,i)=>e.fold(()=>K.some(i),e=>{const o=Math.sqrt(Math.abs(e.x-t)+Math.abs(e.y-n)),r=Math.sqrt(Math.abs(i.x-t)+Math.abs(i.y-n));return K.some(r<o?i:e)}),K.none()),wH=(e,t,n,i,o)=>{const r=ar(yi.fromDom(n),"td,th,caption").map(e=>e.dom),s=ae(bH(e,r),e=>t(e,o));return _H(s,i,o).map(e=>e.cell)},CH=e=>e.top,kH=(e,t)=>e.y>t,xH=e(wH,e=>e.bottom,(e,t)=>e.y<t),SH=e(wH,CH,kH),EH=(e,t)=>we(t.getClientRects()).bind(t=>xH(e,t.left,t.top)).bind(e=>aL(mL(e),t)),DH=(e,t)=>Ce(t.getClientRects()).bind(t=>SH(e,t.left,t.top)).bind(e=>aL(fL(e),t)),TH=(e,t,n)=>n.breakAt.exists(n=>e(t,n).breakAt.isSome()),AH=e=>e.breakType===eL.Wrap&&0===e.positions.length,MH=e=>e.breakType===eL.Br&&1===e.positions.length,RH=(e,t,n)=>{const i=e(t,n);return AH(i)||!Rr(n.getNode())&&MH(i)?!TH(e,t,i):i.breakAt.isNone()},NH=e(RH,lL),IH=e(RH,cL),PH=(e,t,n)=>{const i=Zd.fromRangeStart(t);return _m(!e,n).exists(e=>e.isEqual(i))},OH=(e,t,n)=>{const i=e.selection.getRng(),o=t?1:-1;return!(!yf()||!PH(t,i,n))&&(FP(o,e,n,!t,!1).each(t=>{LL(e,t)}),!0)},LH=(e,t,n)=>EH(t,n).orThunk(()=>we(n.getClientRects()).bind(n=>sL(dL(e,Zd.before(t)),n.left))).getOr(Zd.before(t)),BH=(e,t,n)=>DH(t,n).orThunk(()=>we(n.getClientRects()).bind(n=>sL(uL(e,Zd.after(t)),n.left))).getOr(Zd.after(t)),FH=(e,t)=>{const n=t.getNode(e);return Cr(n)?K.some(n):K.none()},HH=(e,t,n)=>
vendor: 3,394 bytes, lines 33-34
33{t.undoManager.transact(()=>{const i=e?Do:Eo,o=mF(t,yi.fromDom(n),i);LL(t,o)})},$H=(e,t,n)=>{const i=FH(!!t,n),o=!1===t;i.fold(()=>LL(e,n.toRange()),i=>_m(o,e.getBody()).filter(e=>e.isEqual(n)).fold(()=>LL(e,n.toRange()),()=>HH(t,e,i)))},zH=(e,t,n,i)=>{const o=e.selection.getRng(),r=Zd.fromRangeStart(o),s=e.getBody();if(!t&&NH(i,r)){const i=LH(s,n,r);return $H(e,t,i),!0}if(t&&IH(i,r)){const i=BH(s,n,r);return $H(e,t,i),!0}return!1},jH=(e,t,n)=>K.from(e.dom.getParent(e.selection.getNode(),"td,th")).bind(i=>K.from(e.dom.getParent(i,"table")).map(o=>n(e,t,o,i))).getOr(!1),qH=(e,t)=>jH(e,t,OH),UH=(e,t)=>jH(e,t,zH),WH=e=>{const t=xy.exact(e,0,e,0);return My(t)},VH=(e,t,n)=>n.fold(K.none,K.none,(e,t)=>P_(t).map(e=>WH(e)),n=>(e.execCommand("mceTableInsertRowAfter"),
34YH(e,t,n))),YH=(e,t,n)=>VH(e,t,gH(n,po)),GH=(e,t,n)=>VH(e,t,vH(n,po)),KH=(e,t)=>{const n=["table","li","dl"],i=yi.fromDom(e.getBody()),o=e=>{const t=Ln(e);return xi(e,i)||te(n,t)},r=e.selection.getRng(),s=yi.fromDom(t?r.endContainer:r.startContainer);return uH(s,o).map(n=>{pH(n,o).each(t=>{e.model.table.clearSelectedCells(t.dom)}),e.selection.collapse(!t);return(t?YH:GH)(e,o,n).each(t=>{e.selection.setRng(t)}),!0}).getOr(!1)},XH=(e,t,n)=>{const i=an.os.isMacOS()||an.os.isiOS();eH([{keyCode:Yv.RIGHT,action:JF(PF,e,!0)},{keyCode:Yv.LEFT,action:JF(PF,e,!1)},{keyCode:Yv.UP,action:JF(OF,e,!1)},{keyCode:Yv.DOWN,action:JF(OF,e,!0)},...i?[{keyCode:Yv.UP,action:JF(BF,e,!1),metaKey:!0,shiftKey:!0},{keyCode:Yv.DOWN,action:JF(BF,e,!0),metaKey:!0,shiftKey:!0}]:[],{keyCode:Yv.RIGHT,action:JF(qH,e,!0)},{keyCode:Yv.LEFT,action:JF(qH,e,!1)},{keyCode:Yv.UP,action:JF(UH,e,!1)},{keyCode:Yv.DOWN,action:JF(UH,e,!0)},{keyCode:Yv.UP,action:JF(UH,e,!1)},{keyCode:Yv.UP,action:JF(VF,e,!1)},{keyCode:Yv.DOWN,action:JF(VF,e,!0)},{keyCode:Yv.RIGHT,action:JF(nH,e,!0)},{keyCode:Yv.LEFT,action:JF(nH,e,!1)},{keyCode:Yv.UP,action:JF(iH,e,!1)},{keyCode:Yv.DOWN,action:JF(iH,e,!0)},{keyCode:Yv.RIGHT,action:JF(XL,e,t,!0)},{keyCode:Yv.LEFT,action:JF(XL,e,t,!1)},{keyCode:Yv.RIGHT,ctrlKey:!i,altKey:i,action:JF(JL,e,t)},{keyCode:Yv.LEFT,ctrlKey:!i,altKey:i,action:JF(eB,e,t)},{keyCode:Yv.UP,action:JF(jF,e,!1)},{keyCode:Yv.DOWN,action:JF(jF,e,!0)}],n).each(()=>{n.preventDefault()})},QH=(e,t)=>{e.on("keydown",n=>{n.isDefaultPrevented()||XH(e,t,n)})},ZH=(e,t)=>({container:e,offset:t}),JH=vc.DOM,e$=e=>t=>e===t?-1:0,t$=e=>t=>e.isBlock(t)||te(["BR","IMG","HR","INPUT"],t.nodeName)||"false"===e.getContentEditable(t),n$=(e,t,n)=>{if(Sr(e)&&t>=0)return K.some(ZH(e,t));{const i=hd(JH);return K.from(i.backwards(e,t,e$(e),n)).map(e=>ZH(e.container,e.container.data.length))}},i$=(e,t,n)=>{if(Sr(e)&&t>=e.length)return K.some(ZH(e,t));{const i=hd(JH);return K.from(i.forwards(e,t,e$(e),n)).map(e=>ZH(e.container,0))}},o$=(e,t,n)=>{if(!Sr(e))return K.none();const i=e.data;if(t>=0&&t<=i.length)return K.some(ZH(e,t));{const i=hd(JH);return K.from(i.backwards(e,t,e$(e),n)).bind(e=>{const i=e.container.data;return o$(e.container,t+i.length,n)})}},r$=(e,t,n)=>{if(!Sr(e))return K.none();const i=e.data;if(t<=i.length)return K.some(ZH(e,t));{const o=hd(JH);return K.from(o.forwards(e,t,e$(e),n)).bind(e=>r$(e.container,t-i.length,n))}},s$=(e,t,n,i,o)=>{const r=hd(e,t$(e));return K.from(r.backwards(t,n,i,o))},a$=e=>e.collapsed&&Sr(e.startContainer),l$=e=>vs(e.toString().replace(/\u00A0/g," ")),c$=e=>""!==e&&-1!==" \xa0\f\n\r\t\v".indexOf(e),d$=(e,t)=>
34e.substring(t.length),u$=(e,t,n)=>{let i;const o=n.charAt(0);for(i=t-1;i>=0;i--){const r=e.charAt(i);if(c$(r))return K.none();if(o===r&&pt(e,n,i,t))break}return K.some(i)},h$=(e,t,n,i=0)=>{if(!a$(t))return K.none();const o={text:"",offset:0},r=(e,t,i)=>(o.text=i+o.text,o.offset+=t,u$(o.text,o.offset,n).getOr(t)),s=e.getParent(t.startContainer,e.isBlock)||e.getRoot();return s$(e,t.startContainer,t.startOffset,r,s).bind(e=>{const o=t.cloneRange();if(o.setStart(e.container,e.offset),o.setEnd(t.endContainer,t.endOffset),o.collapsed)return K.none();const r=l$(o);return 0!==r.lastIndexOf(n)||d$(r,n).length<i?K.none():K.some({text:d$(r,n),range:o,trigger:n})})},p$=(e,t,n,i=0)=>H_(yi.fromDom(t.startContainer)).fold(()=>h$(e,t,n,i),t=>{const i=e.createRng();i.selectNode(t.dom);const o=l$(i);return K.some({range:i,text:d$(o,n),trigger:n})}),f$=e=>e.nodeType===On,m$=e=>e.nodeType===Pn,g$=e=>{if(f$(e))return ZH(e,e.data.length);{const t=e.childNodes;return t.length>0?g$(t[t.length-1]):ZH(e,t.length)}},v$=(e,t)=>{const n=e.childNodes;return n.length>0&&t<n.length?v$(n[t],0):n.length>0&&m$(e)&&n.length===t?g$(n[n.length-1]):ZH(e,t)},y$=(e,t)=>{var n;const i=null!==(n=e.getParent(t.container,e.isBlock))&&void 0!==n?n:e.getRoot();return s$(e,t.container,t.offset,(e,t)=>0===t?-1:t,i).filter(e=>{const t=e.container.data.charAt(e.offset-1);return!c$(t)}).isSome()},b$=e=>t=>{const n=v$(t.startContainer,t.startOffset);return!y$(e,n)},_$=(e,t,n)=>xe(n.triggers,n=>p$(e,t,n)),w$=(e,t)=>{const n=t(),i=e.selection.getRng();return _$(e.dom,i,n).bind(n=>C$(e,t,n))},C$=(e,t,n,i={})=>{var o;const r=t(),s=null!==(o=e.selection.getRng().startContainer.nodeValue)&&void 0!==o?o:"",a=ae(r.lookupByTrigger(n.trigger),t=>n.text.length>=t.minChars&&t.matches.getOrThunk(()=>b$(e.dom))(n.range,s,n.text));if(0===a.length)return K.none();const l=Promise.all(ie(a,e=>e.fetch(n.text,e.maxResults,i).then(t=>({matchText:n.text,items:t,columns:e.columns,onAction:e.onAction,highlightOn:e.highlightOn}))));return K.some({lookupData:l,context:n})};var k$;!function(e){e[e.Error=0]="Error",e[e.Value=1]="Value"}(k$||(k$={}));const x$=(e,t,n)=>e.stype===k$.Error?t(e.serror):n(e.svalue),S$=e=>{const t=[],n=[];return oe(e,e=>{x$(e,e=>n.push(e),e=>t.push(e))}),{values:t,errors:n}},E$=e=>({stype:k$.Value,svalue:e}),D$=e=>({stype:k$.Error,serror:e}),T$={fromResult:e=>e.fold(D$,E$),toResult:e=>x$(e,Lu.error,Lu.value),svalue:E$,partition:S$,serror:D$,bind:(e,t)=>e.stype===k$.Value?t(e.svalue):e,bindError:(e,t)=>e.stype===k$.Error?t(e.serror):e,map:(e,t)=>e.stype===k$.Value?{stype:k$.Value,svalue:t(e.svalue)}:e,mapError:(e,t)=>e.stype===k$.Error?{stype:k$.Error,serror:t(e.serror)}:e,fold:x$},A$=e=>E(e)&&Ee(e).length>100?" removed due to size":JSON.stringify(e,null,2),M$=e=>{const t=e.length>10?e.slice(0,10).concat([{path:[],getErrorInfo:$("... (only showing first ten failures)")}]):e;return ie(t,e=>"Failed path: ("+e.path.join(" > ")+")\n"+e.getErrorInfo())},R$=(e,t)=>T$.serror([{path:e,getErrorInfo:t}
34]),N$=(e,t,n)=>R$(e,()=>'Could not find valid *required* value for "'+t+'" in '+A$(n)),I$=(e,t)=>R$(e,()=>'Choice schema did not contain choice key: "'+t+'"'),P$=(e,t,n)=>R$(e,()=>'The chosen schema: "'+n+'" did not exist in branches: '+A$(t)),O$=(e,t)=>R$(e,$(t)),L$=(e,t,n,i)=>Be(n,i).fold(()=>P$(e,n,i),n=>n.extract(e.concat(["branch: "+i]),t)),B$=(e,t)=>{const n=(n,i)=>Be(i,e).fold(()=>I$(n,e),e=>L$(n,i,t,e));return{extract:n,toString:()=>"chooseOn("+e+"). Possible values: "+Ee(t)}},F$=(e,t)=>t,H$=(e,t)=>D(e)&&D(t)?z$(e,t):t,$$=e=>(...t)=>{if(0===t.length)throw new Error("Can't merge zero objects");const n={};for(let i=0;i<t.length;i++){const o=t[i];for(const t in o)Fe(o,t)&&(n[t]=e(n[t],o[t]))}return n},z$=$$(H$),j$=$$(F$),q$=()=>({tag:"required",process:{}}),U$=e=>({tag:"defaultedThunk",process:e}),W$=e=>U$($(e)),V$=()=>({tag:"option",process:{}}),Y$=(e,t)=>e.length>0?T$.svalue(z$(t,j$.apply(void 0,e))):T$.svalue(t),G$=e=>F(T$.serror,pe)(e),K$=(e,t)=>{const n=T$.partition(e);return n.errors.length>0?G$(n.errors):Y$(n.values,t)},X$={consolidateObj:K$,consolidateArr:e=>{const t=T$.partition(e);return t.errors.length>0?G$(t.errors):T$.svalue(t.values)}},Q$=(e,t,n,i)=>({tag:"field",key:e,newKey:t,presence:n,prop:i}),Z$=(e,t)=>({tag:"custom",newKey:e,instantiator:t}),J$=(e,t,n)=>{switch(e.tag){case"field":return t(e.key,e.newKey,e.presence,e.prop);case"custom":return n(e.newKey,e.instantiator)}},ez=e=>{const t=(t,n)=>T$.bindError(e(n),e=>O$(t,e));return{extract:t,toString:$("val")}},tz=ez(T$.svalue),nz=(e,t,n,i)=>Be(t,n).fold(()=>N$(e,n,t),i),iz=(e,t,n,i)=>i(Be(e,t).getOrThunk(()=>n(e))),oz=(e,t,n)=>n(Be(e,t)),rz=(e,t,n,i)=>i(Be(e,t).map(t=>!0===t?n(e):t)),sz=(e,t,n,i,o)=>{const r=e=>o.extract(t.concat([i]),e),s=e=>e.fold(()=>T$.svalue(K.none()),e=>{const n=o.extract(t.concat([i]),e);return T$.map(n,K.some)});switch(e.tag){case"required":return nz(t,n,i,r);case"defaultedThunk":return iz(n,i,e.process,r);case"option":return oz(n,i,s);case"defaultedOptionThunk":return rz(n,i,e.process,s);case"mergeWithThunk":return iz(n,i,$({}),t=>{const i=z$(e.process(n),t);return r(i)})}},az=(e,t,n)=>{const i={},o=[];for(const r of n)J$(r,(n,r,s,a)=>{const l=sz(s,e,t,n,a);T$.fold(l,e=>{o.push(...e)},e=>{i[r]=e})},(e,n)=>{i[e]=n(t)});return o.length>0?T$.serror(o):T$.svalue(i)},lz=e=>{const t=(t,n)=>az(t,n,e),n=()=>{const t=ie(e,e=>J$(e,(e,t,n,i)=>e+" -> "+i.toString(),e=>"state("+e+")"));return"obj{\n"+t.join("\n")+"}"};return{extract:t,toString:n}},cz=e=>{const t=(t,n)=>{const i=ie(n,(n,i)=>e.extract(t.concat(["["+i+"]"]),n));return X$.consolidateArr(i)};return{extract:t,toString:()=>"array("+e.toString()+")"}},dz=e=>ez(t=>e(t).fold(T$.serror,T$.svalue)),uz=(e,t,n)=>{const i=t.extract([e],n);return T$.mapError(i,e=>({input:n,errors:e}))},hz=(e,t,n)=>T$.toResult(uz(e,t,n)),pz=e=>"Errors: \n"+M$(e.errors).join("\n")+"\n\nInput object: "+A$(e.input),fz=(e,t)=>B$(e,Ae(t,lz)),mz=$(tz),gz=(e,t)=>ez(n=>{const i=typeof n;return e(n)?T$.svalue(n):T$.serror(`Expected type: ${t} but got: ${i}`)}),vz=gz(O,"number"),yz=gz(S,"string"),bz=gz(M,"boolean"),_z=gz(P,"function"),wz=Q$,Cz=Z$,kz=e=>dz(t=>te(e,t)?Lu.value(t):Lu.error(`Unsupported value: "${t}", choose one of "${e.join(", ")}".`)),xz=(e,t)=>wz(e,e,q$(),t),Sz=e=>xz(e,yz),Ez=e=>xz(e,_z),Dz=(e,t)=>wz(e,e,q$(),cz(t)),Tz=(e,t)=>wz(e,e,V$(),t),Az=e=>Tz(e,yz),Mz=e=>Tz(e,_z),Rz=(e,t)=>wz(e,e,W$(t),mz()),Nz=(e,t,n)=>wz(e,e,W$(t),n),Iz=(e,t)=>Nz(e,t,vz),Pz=(e,t)=>Nz(e,t,yz),Oz=(e,t,n)=>Nz(e,t,kz(n)),Lz=(e,t)=>Nz(e,t,bz),Bz=(e,t)=>Nz(e,t,_z),Fz=(e,t,n)=>Nz(e,t,cz(n)),Hz=Sz("type"),$z=Ez("fetch"),zz=Ez("onAction"),jz=Bz("onSetup",()=>B),qz=Az("text"),Uz=Az("icon"),Wz=Az("tooltip"),Vz=Az("label"),Yz=Lz("active",!1),Gz=Lz("enabled",!0),Kz=Lz("primary",!1),Xz=e=>Rz("columns",e),Qz=e=>Pz("type",e),Zz=lz([Hz,Sz("trigger"),Iz("minChars",1),Xz(1),Iz("maxResults",10),Mz("matches"),$z,zz,Fz("highlightOn",[],yz)]),Jz=e=>hz("Autocompleter",Zz,{trigger:e.ch,...e}),ej=[Gz,Wz,Uz,qz,jz],tj=[Yz].concat(ej),nj=[Bz("predicate",Y),Oz("scope","node",["node","editor"]),Oz("position","selection",["node","selection","line"])],ij=ej.concat([Qz("contextformbutton"),Kz,zz,Cz("original",z)]),oj=tj.concat([Qz("contextformbutton"),Kz,zz,Cz("original",z)]),r
34j=ej.concat([Qz("contextformbutton")]),sj=tj.concat([Qz("contextformtogglebutton")]),aj=fz("type",{contextformbutton:ij,contextformtogglebutton:oj});lz([Qz("contextform"),Bz("initValue",$("")),Vz,Dz("commands",aj),Tz("launch",fz("type",{contextformbutton:rj,contextformtogglebutton:sj}))].concat(nj));const lj=e=>{const t=e.ui.registry.getAll().popups,n=Ae(t,e=>Jz(e).fold(e=>{throw new Error(pz(e))},z)),i=ze(Oe(n,e=>e.trigger)),o=Le(n);return{dataset:n,triggers:i,lookupByTrigger:e=>ae(o,t=>t.trigger===e)}},cj=(e,t)=>{const n=$c(t.load,50);e.on("keypress compositionend",e=>{27!==e.which&&n.throttle()}),e.on("keydown",e=>{const i=e.which;8===i?n.throttle():27===i&&t.cancelIfNecessary()}),e.on("remove",n.cancel)},dj=e=>{const t=Fc(),n=xc(!1),i=t.isSet,o=()=>{i()&&(NR(e),jv(e),n.set(!1),t.clear())},r=n=>{i()||(RR(e,n.range),t.set({trigger:n.trigger,matchLength:n.text.length}))},s=Ze(()=>lj(e)),a=n=>t.get().map(t=>p$(e.dom,e.selection.getRng(),t.trigger).bind(t=>C$(e,s,t,n))).getOrThunk(()=>w$(e,s)),l=i=>{a(i).fold(o,i=>{r(i.context),i.lookupData.then(r=>{t.get().map(s=>{const a=i.context;s.trigger===a.trigger&&(a.text.length-s.matchLength>=10?o():(t.set({...s,matchLength:a.text.length}),n.get()?zv(e,{lookupData:r}):(n.set(!0),$v(e,{lookupData:r}))))})})})};e.addCommand("mceAutocompleterReload",(e,t)=>{const n=E(t)?t.fetchOptions:{};l(n)}),e.addCommand("mceAutocompleterClose",o),cj(e,{cancelIfNecessary:o,load:l})},uj=Jt().browser.isSafari(),hj=e=>ps(yi.fromDom(e)),pj=(e,t)=>{var n;return 0===e.startOffset&&e.endOffset===(null===(n=t.textContent)||void 0===n?void 0:n.length)},fj=(e,t)=>K.from(e.getParent(t.container(),"details")),mj=(e,t)=>fj(e,t).isSome(),gj=(e,t)=>{const n=K.from(e.getParent(t.startContainer,"details")),i=K.from(e.getParent(t.endContainer,"details"));if(n.isSome()||i.isSome()){const t=n.bind(t=>K.from(e.select("summary",t)[0]));return K.some({startSummary:t,startDetails:n,endDetails:i})}return K.none()},vj=(e,t)=>km(t).exists(t=>t.isEqual(e)),yj=(e,t)=>xm(t).exists(n=>Rr(n.getNode())&&Cm(t,n).exists(t=>t.isEqual(e))||n.isEqual(e)),bj=(e,t)=>t.startSummary.exists(t=>vj(e,t)),_j=(e,t)=>t.startSummary.exists(t=>yj(e,t)),wj=(e,t)=>t.startDetails.exists(n=>Cm(n,e).forall(n=>t.startSummary.exists(t=>!t.contains(e.container())&&t.contains(n.container())))),Cj=(e,t,n)=>n.startDetails.exists(n=>wm(e,t).forall(e=>!n.contains(e.container()))),kj=(e,t)=>{const n=t.getNode();R(n)||e.selection.setCursorLocation(n,t.offset())},xj=(e,t,n)=>{const i=e.dom.getParent(t.container(),"details");if(i&&!i.open){const t=e.dom.select("summary",i)[0];if(t){(n?km(t):xm(t)).each(t=>kj(e,t))}}else kj(e,t)},Sj=(e,t)=>{const n=t=>t.contains(e.startContainer),i=t=>t.contains(e.endContainer),o=t.startSummary.exists(n),r=t.startSummary.exists(i),s=t.startDetails.forall(e=>t.endDetails.forall(t=>e!==t));return(o||r)&&!(o&&r)||s},Ej=(e,t,n)=>{const{dom:i,selection:o}=e,r=e.getBody();if("character"===n){const n=Zd.fromRangeStart(o.getRng()),s=i.getParent(n.container(),i.isBlock),a=fj(i,n),l=s&&i.isEmpty(s),c=A(null==s?void 0:s.previousSibling),d=A(null==s?void 0:s.nextSibling);if(l){if(t?d:c){if(ym(!t,r,n).exists(e=>mj(i,e)&&!yn(a,fj(i,e))))return!0}}return ym(t,r,n).fold(Y,n=>{const o=fj(i,n);if(mj(i,n)&&!yn(a,o)){if(t||xj(e,n,!1),s&&l){if(t&&c)return!0;if(!t&&d)return!0;xj(e,n,t),e.dom.remove(s)}return!0}return!1})}return!1},Dj=(e,t,n,i)=>{const o=e.selection.getRng(),r=Zd.fromRangeStart(o),s=e.getBody();return"selection"===i?Sj(o,t):n?_j(r,t)||Cj(s,r,t):bj(r,t)||wj(r,t)},Tj=(e,t,n)=>gj(e.dom,e.selection.getRng()).fold(()=>Ej(e,t,n),i=>Dj(e,i,t,n)||Ej(e,t,n)),Aj=(e,t,n)=>{const i=e.selection,o=i.getNode(),r=i.getRng(),s=Zd.fromRangeStart(r);return!!$r(o)&&("selection"===n&&pj(r,o)||yk(t,s,o)?hj(o):e.undoManager.transact(()=>{const r=i.getSel();let{anchorNode:s,anchorOffset:a,focusNode:l,focusOffset:c}=null!=r?r:{};const d=()=>{I(s)&&I(a)&&I(l)&&I(c)&&(null==r||r.setBaseAndExtent(s,a,l,c))},u=()=>{s=null==r?void 0:r.anchorNode,a=null==r?void 0:r.anchorOffset,l=null==r?void 0:r.focusNode,c=null==r?void 0:r.focusOffset},h=(e,t)=>{oe(e.childNodes,e=>{gg(e)&&t.appendChild(e)})},p=e.dom.create("span",{"data-mce-bogus":"1"});h(o,p),o.appendChild(p),d(),"word"!==n&&"line"!==n||null==r||r.modify("extend",t?"right":"left",n),!i.isCollapsed()&&pj(i.getRng(),p)?hj(o):(e.execCommand(t?"ForwardDelete":"Delete"),u(),h(p,o),d()),e.dom.remove(p)}),!0)},Mj=(e,t,n)=>
vendor: 8,907 bytes, line 34
34Tj(e,t,n)||uj&&Aj(e,t,n)?K.some(B):K.none(),Rj=e=>(t,n,i={})=>{const o=t.getBody(),r={bubbles:!0,composed:!0,data:null,isComposing:!1,detail:0,view:null,target:o,currentTarget:o,eventPhase:Event.AT_TARGET,originalTarget:o,explicitOriginalTarget:o,isTrusted:!1,srcElement:o,cancelable:!1,preventDefault:B,inputType:n},s=Xl(new InputEvent(e));return t.dispatch(e,{...s,...r,...i})},Nj=Rj("input"),Ij=Rj("beforeinput"),Pj=Jt(),Oj=Pj.os,Lj=Oj.isMacOS()||Oj.isiOS(),Bj=Pj.browser.isFirefox(),Fj=(e,t,n)=>{const i=n.keyCode===Yv.BACKSPACE?"deleteContentBackward":"deleteContentForward",o=e.selection.isCollapsed(),r=o?"character":"selection",s=e=>o?e?"word":"line":"selection";tH([{keyCode:Yv.BACKSPACE,action:JF(JB,e)},{keyCode:Yv.BACKSPACE,action:JF(mO,e,!1)},{keyCode:Yv.DELETE,action:JF(mO,e,!0)},{keyCode:Yv.BACKSPACE,action:JF(GP,e,!1)},{keyCode:Yv.DELETE,action:JF(GP,e,!0)},{keyCode:Yv.BACKSPACE,action:JF(lB,e,t,!1)},{keyCode:Yv.DELETE,action:JF(lB,e,t,!0)},{keyCode:Yv.BACKSPACE,action:JF(wx,e,!1)},{keyCode:Yv.DELETE,action:JF(wx,e,!0)},{keyCode:Yv.BACKSPACE,action:JF(Mj,e,!1,r)},{keyCode:Yv.DELETE,action:JF(Mj,e,!0,r)},...Lj?[{keyCode:Yv.BACKSPACE,altKey:!0,action:JF(Mj,e,!1,s(!0))},{keyCode:Yv.DELETE,altKey:!0,action:JF(Mj,e,!0,s(!0))},{keyCode:Yv.BACKSPACE,metaKey:!0,action:JF(Mj,e,!1,s(!1))}]:[{keyCode:Yv.BACKSPACE,ctrlKey:!0,action:JF(Mj,e,!1,s(!0))},{keyCode:Yv.DELETE,ctrlKey:!0,action:JF(Mj,e,!0,s(!0))}],{keyCode:Yv.BACKSPACE,action:JF(vO,e,!1)},{keyCode:Yv.DELETE,action:JF(vO,e,!0)},{keyCode:Yv.BACKSPACE,action:JF($B,e,!1)},{keyCode:Yv.DELETE,action:JF($B,e,!0)},{keyCode:Yv.BACKSPACE,action:JF(BP,e,!1)},{keyCode:Yv.DELETE,action:JF(BP,e,!0)},{keyCode:Yv.BACKSPACE,action:JF(MP,e,!1)},{keyCode:Yv.DELETE,action:JF(MP,e,!0)},{keyCode:Yv.BACKSPACE,action:JF(NB,e,!1)},{keyCode:Yv.DELETE,action:JF(NB,e,!0)}],n).filter(()=>e.selection.isEditable()).each(t=>{n.preventDefault();Ij(e,i).isDefaultPrevented()||(t(),Nj(e,i))})},Hj=(e,t,n)=>eH([{keyCode:Yv.BACKSPACE,action:JF(fO,e)},{keyCode:Yv.DELETE,action:JF(fO,e)},...Lj?[{keyCode:Yv.BACKSPACE,altKey:!0,action:JF(LB,e)},{keyCode:Yv.DELETE,altKey:!0,action:JF(LB,e)},...n?[{keyCode:Bj?224:91,action:JF(LB,e)}]:[]]:[{keyCode:Yv.BACKSPACE,ctrlKey:!0,action:JF(LB,e)},{keyCode:Yv.DELETE,ctrlKey:!0,action:JF(LB,e)}]],t),$j=(e,t)=>{let n=!1;e.on("keydown",i=>{n=i.keyCode===Yv.BACKSPACE,i.isDefaultPrevented()||Fj(e,t,i)}),e.on("keyup",t=>{t.isDefaultPrevented()||Hj(e,t,n),n=!1})},zj=e=>{for(;e;){if(hr(e)||Sr(e)&&e.data&&/[\r\n\s]/.test(e.data))return e;e=e.nextSibling}return null},jj=(e,t)=>{const n=e.dom,i=e.schema.getMoveCaretBeforeOnEnterElements();if(!t)return;if(/^(LI|DT|DD)$/.test(t.nodeName)){const e=zj(t.firstChild);e&&/^(UL|OL|DL)$/.test(e.nodeName)&&t.insertBefore(n.doc.createTextNode(jr),t.firstChild)}const o=n.createRng();if(t.normalize(),t.hasChildNodes()){const e=new cr(t,t);let n,r=t;for(;n=e.current();){if(Sr(n)){o.setStart(n,0),o.setEnd(n,0);break}if(i[n.nodeName.toLowerCase()]){o.setStartBefore(n),o.setEndBefore(n);break}r=n,n=e.next()}n||(o.setStart(r,0),o.setEnd(r,0))}else Rr(t)?t.nextSibling&&n.isBlock(t.nextSibling)?(o.setStartBefore(t),o.setEndBefore(t)):(o.setStartAfter(t),o.setEndAfter(t)):(o.setStart(t,0),o.setEnd(t,0));e.selection.setRng(o),xb(e,o)},qj=(e,t)=>{const n=e.getRoot();let i,o=t;for(;o!==n&&o&&"false"!==e.getContentEditable(o);){if("true"===e.getContentEditable(o)){i=o;break}o=o.parentNode}return o!==n?i:n},Uj=e=>K.from(e.dom.getParent(e.selection.getStart(!0),e.dom.isBlock)),Wj=e=>Uj(e).fold($(""),e=>e.nodeName.toUpperCase()),Vj=e=>Uj(e).filter(e=>ss(yi.fromDom(e))).isSome(),Yj=e=>{e.innerHTML='<br data-mce-bogus="1">'},Gj=(e,t,n)=>{const i=e.dom;K.from(n.style).map(i.parseStyle).each(e=>{const n={...ko(yi.fromDom(t)),...e};i.setStyles(t,n)});const o=K.from(n.class).map(e=>e.split(/\s+/)),r=K.from(t.className).map(e=>ae(e.split(/\s+/),e=>""!==e));_n(o,r,(e,n)=>{const o=ae(n,t=>!te(e,t)),r=[...e,...o];i.setAttrib(t,"class",r.join(" "))});const s=["style","class"],a=Pe(n,(e,t)=>!te(s,t));i.setAttribs(t,a)},Kj=(e,t)=>{if(dh(e).toLowerCase()===t.tagName.toLowerCase()){const n=uh(e);Gj(e,t,n)}},Xj=(e,t,n,i,o=!0,r,s)=>{const a=e.dom,l=e.schema,c=dh(e),d=n?n.nodeName.toUpperCase():"";let u=t;const h=l.getTextInlineElements();let p;p=r||"TABLE"===d||"HR"===d?a.create(r||c,s||{}):n.cloneNode(!1);let f=p;if(o){do{if(h[u.nodeName]){if(Em(u)||Km(u))continue;const e=u.cloneNode(!1);a.setAttrib(e,"id",""),p.hasChildNodes()?(e.appendChild(p.firstChild),p.appendChild(e)):(f=e,p.appendChild(e))}}while((u=u.parentNode)&&u!==i)}else a.setAttrib(p,"style",null),a.setAttrib(p,"class",null);return Kj(e,p),Yj(f),p},Qj=(e,t)=>e.dom.getParent(t,Hr),Zj=(e,t,n)=>{let i=t;for(;i&&i!==e&&A(i.nextSibling);){const e=i.parentElement;if(!e||!n(e))return Hr(e);i=e}return!1},Jj=(e,t,n)=>!t&&n.nodeName.toLowerCase()===dh(e)&&e.dom.isEmpty(n)&&Zj(e.getBody(),n,t=>Fe(e.schema.getTextBlockElements(),t.nodeName.toLowerCase())),eq=(e,t,n)=>{var i,o,r;const s=t(dh(e)),a=Qj(e,n);a&&(e.dom.insertAfter(s,a),jj(e,s),(null!==(r=null===(o=null===(i=n.parentElement)||void 0===i?void 0:i.childNodes)||void 0===o?void 0:o.length)&&void 0!==r?r:0)>1&&e.dom.remove(n))},tq=(e,t)=>e.firstChild&&e.firstChild.nodeName===t,nq=e=>{var t;return(null===(t=e.parentNode)||void 0===t?void 0:t.firstChild)===e},iq=(e,t)=>{const n=null==e?void 0:e.parentNode;return I(n)&&n.nodeName===t},oq=e=>I(e)&&/^(OL|UL|LI)$/.test(e.nodeName),rq=e=>I(e)&&/^(LI|DT|DD)$/.test(e.nodeName),sq=e=>oq(e)&&oq(e.parentNode),aq=e=>{const t=e.parentNode;return rq(t)?t:e},lq=(e,t,n)=>{let i=e[n?"firstChild":"lastChild"];for(;i&&!hr(i);)i=i[n?"nextSibling":"previousSibling"];return i===t},cq=e=>ce(Oe(ko(yi.fromDom(e)),(e,t)=>`${t}: ${e};`),(e,t)=>e+t,""),dq=(e,t,n,i,o)=>{const r=e.dom,s=e.selection.getRng(),a=n.parentNode;if(n===e.getBody()||!a)return;sq(n)&&(o="LI");const l=rq(i)?cq(i):void 0;let c=rq(i)&&l?t(o,{style:cq(i)}):t(o);if(lq(n,i,!0)&&lq(n,i,!1))if(iq(n,"LI")){const e=aq(n);r.insertAfter(c,e),nq(n)?r.remove(e):r.remove(n)}else r.replace(c,n);else if(lq(n,i,!0))iq(n,"LI")?(r.insertAfter(c,aq(n)),c.appendChild(r.doc.createTextNode(" ")),c.appendChild(n)):a.insertBefore(c,n),r.remove(i);else if(lq(n,i,!1))r.insertAfter(c,aq(n)),r.remove(i);else{n=aq(n);const e=s.cloneRange();e.setStartAfter(i),e.setEndAfter(n);const t=e.extractContents();if("LI"===o&&tq(t,"LI")){const e=ae(ie(c.children,yi.fromDom),q(Wn("br")));c=t.firstChild,r.insertAfter(t,n),oe(e,e=>To(yi.fromDom(c),e)),l&&c.setAttribute("style",l)}else r.insertAfter(t,n),r.insertAfter(c,n);r.remove(i)}jj(e,c)},uq=e=>{oe(sr(yi.fromDom(e),jn),e=>{const t=e.dom;t.nodeValue=vs(t.data)})},hq=(e,t)=>{const n=e.dom.getParent(t,"ol,ul,dl");return null!==n&&"false"===e.dom.getContentEditableParent(n)},pq=(e,t)=>t&&"A"===t.nodeName&&e.isEmpty(t),fq=(e,t)=>e.nodeName===t||e.previousSibling&&e.previousSibling.nodeName===t,mq=(e,t)=>I(t)&&e.isBlock(t)&&!/^(TD|TH|CAPTION|FORM)$/.test(t.nodeName)&&!/^(fixed|absolute)/i.test(t.style.position)&&e.isEditable(t.parentNode)&&"false"!==e.getContentEditable(t),gq=(e,t,n)=>{var i;const o=[];if(!n)return;let r=n;for(;r=r.firstChild;){if(e.isBlock(r))return;hr(r)&&!t[r.nodeName.toLowerCase()]&&o.push(r)}let s=o.length;for(;s--;)r=o[s],(!r.hasChildNodes()||r.firstChild===r.lastChild&&""===(null===(i=r.firstChild)||void 0===i?void 0:i.nodeValue)||pq(e,r))&&e.remove(r)},vq=(e,t,n)=>Sr(t)?e?1===n&&t.data.charAt(n-1)===ms?0:n:n===t.data.length-1&&t.data.charAt(n)===ms?t.data.length:n:n,yq=e=>{const t=e.cloneRange();return t.setStart(e.startContainer,vq(!0,e.startContainer,e.startOffset)),t.setEnd(e.endContainer,vq(!1,e.endContainer,e.endOffset)),t},bq=e=>{let t=e;do{Sr(t)&&(t.data=t.data.replace(/^[\r\n]+/,"")),t=t.firstChild}while(t)},_q=(e,t,n,i,o)=>{var r,s;const a=e.dom,l=null!==(r=qj(a,i))&&void 0!==r?r:a.getRoot();let c=a.getParent(i,a.isBlock);if(!c||!mq(a,c)){if(c=c||l,!c.hasChildNodes()){const i=a.create(t);return Kj(e,i),c.appendChild(i),n.setStart(i,0),n.setEnd(i,0),i}let r,d=i;for(;d&&d.parentNode!==c;)d=d.parentNode;for(;d&&!a.isBlock(d);)r=d,d=d.previousSibling;const u=null===(s=null==r?void 0:r.parentElement)||void 0===s?void 0:s.nodeName;if(r&&u&&e.schema.isValidChild(u,t.toLowerCase())){const s=r.parentNode,l=a.create(t);for(Kj(e,l),s.insertBefore(l,r),d=r;d&&!a.isBlock(d);){const e=d.nextSibling;l.appendChild(d),d=e}n.setStart(i,o),n.setEnd(i,o)}}return i},wq=(e,t)=>{t.normalize();const n=t.lastChild;(!n||hr(n)&&/^(left|right)$/gi.test(e.getStyle(n,"float",!0)))&&e.add(t,"br")},Cq=(e,t)=>{const n=gh(e);return!N(t)&&(S(n)?te(gn.explode(n),t.nodeName.toLowerCase()):n)},kq=(e,t)=>{let n,i,o,r,s=!1;const a=e.dom,l=e.schema.getNonEmptyElements(),c=e.selection.getRng(),d=dh(e),u=yi.fromDom(c.startContainer),h=Hi(u,c.startOffset),p=h.exists(e=>$n(e)&&!po(e)),f=c.collapsed&&p,m=(t,i)=>Xj(e,n,w,_,mh(e),t,i),g=e=>{const t=vq(e,n,i);if(Sr(n)&&(e?t>0:t<n.data.length))return!1;
34if(n.parentNode===w&&s&&!e)return!0;if(e&&hr(n)&&n===w.firstChild)return!0;if(fq(n,"TABLE")||fq(n,"HR"))return s&&!e||!s&&e;const o=new cr(n,w);let r;for(Sr(n)&&(e&&0===t?o.prev():e||t!==n.data.length||o.next());r=o.current();){if(hr(r)){if(!r.getAttribute("data-mce-bogus")){const e=r.nodeName.toLowerCase();if(l[e]&&"br"!==e)return!1}}else if(Sr(r)&&!Xs(r.data))return!1;e?o.prev():o.next()}return!0},v=()=>{let t;return t=/^(H[1-6]|PRE|FIGURE)$/.test(o)&&"HGROUP"!==C?m(d):m(),Cq(e,r)&&mq(a,r)&&a.isEmpty(w,void 0,{includeZwsp:!0})?t=a.split(r,w):a.insertAfter(t,w),jj(e,t),t};qy(a,c).each(e=>{c.setStart(e.startContainer,e.startOffset),c.setEnd(e.endContainer,e.endOffset)}),n=c.startContainer,i=c.startOffset;const y=!(!t||!t.shiftKey),b=!(!t||!t.ctrlKey);hr(n)&&n.hasChildNodes()&&!f&&(s=i>n.childNodes.length-1,n=n.childNodes[Math.min(i,n.childNodes.length-1)]||n,i=s&&Sr(n)?n.data.length:0);const _=qj(a,n);if(!_||hq(e,n))return;y||(n=_q(e,d,c,n,i));let w=a.getParent(n,a.isBlock)||a.getRoot();r=I(null==w?void 0:w.parentNode)?a.getParent(w.parentNode,a.isBlock):null,o=w?w.nodeName.toUpperCase():"";const C=r?r.nodeName.toUpperCase():"";if("LI"===C&&!b){w=r,r=r.parentNode,o=C}if(hr(r)&&Jj(e,y,w))return eq(e,m,w);if(/^(LI|DT|DD)$/.test(o)&&hr(r)&&a.isEmpty(w))return void dq(e,m,r,w,d);if(!(f||w!==e.getBody()&&mq(a,w)))return;const k=w.parentNode;let x;if(f)x=m(d),h.fold(()=>{Ao(u,yi.fromDom(x))},e=>{Eo(e,yi.fromDom(x))}),e.selection.setCursorLocation(x,0);else if(ws(w))x=Ns(w),a.isEmpty(w)&&Yj(w),Kj(e,x),jj(e,x);else if(g(!1))x=v();else if(g(!0)&&k){x=k.insertBefore(m(),w);const t=qi(yi.fromDom(c.startContainer))&&c.collapsed;jj(e,fq(w,"HR")||t?x:w)}else{const t=yq(c).cloneRange();t.setEndAfter(w);const n=t.extractContents();uq(n),bq(n),x=n.firstChild,a.insertAfter(n,w),gq(a,l,x),wq(a,w),a.isEmpty(w)&&Yj(w),x.normalize(),a.isEmpty(x)?(a.remove(x),v()):(Kj(e,x),jj(e,x))}a.setAttrib(x,"id",""),e.dispatch("NewBlock",{newBlock:x})},xq={insert:kq,fakeEventName:"insertParagraph"},Sq=(e,t,n)=>{const i=new cr(t,n);let o;const r=e.getNonEmptyElements();for(;o=i.next();)if(r[o.nodeName.toLowerCase()]||Sr(o)&&o.length>0)return!0;return!1},Eq=(e,t,n)=>{const i=e.dom.createRng();n?(i.setStartBefore(t),i.setEndBefore(t)):(i.setStartAfter(t),i.setEndAfter(t)),e.selection.setRng(i),xb(e,i)},Dq=(e,t)=>{const n=e.selection,i=e.dom,o=n.getRng();let r,s=!1;qy(i,o).each(e=>{o.setStart(e.startContainer,e.startOffset),o.setEnd(e.endContainer,e.endOffset)});let a=o.startOffset,l=o.startContainer;if(hr(l)&&l.hasChildNodes()){const e=a>l.childNodes.length-1;l=l.childNodes[Math.min(a,l.childNodes.length-1)]||l,a=e&&Sr(l)?l.data.length:0}let c=i.getParent(l,i.isBlock);const d=c&&c.parentNode?i.getParent(c.parentNode,i.isBlock):null,u=d?d.nodeName.toUpperCase():"",h=!(!t||!t.ctrlKey);"LI"!==u||h||(c=d),Sr(l)&&a>=l.data.length&&(Sq(e.schema,l,c||i.getRoot())||(r=i.create("br"),o.insertNode(r),o.setStartAfter(r),o.setEndAfter(r),s=!0)),r=i.create("br"),nu(i,o,r),Eq(e,r,s),e.undoManager.add()},Tq=(e,t)=>{const n=yi.fromTag("br");Eo(yi.fromDom(t),n),e.undoManager.add()},Aq=(e,t)=>{Rq(e.getBody(),t)||Do(yi.fromDom(t),yi.fromTag("br"));const n=yi.fromTag("br");Do(yi.fromDom(t),n),Eq(e,n.dom,!1),e.undoManager.add()},Mq=e=>Rr(e.getNode()),Rq=(e,t)=>!!Mq(Zd.after(t))||wm(e,Zd.after(t)).map(e=>Rr(e.getNode())).getOr(!1),Nq=e=>e&&"A"===e.nodeName&&"href"in e,Iq=e=>e.fold(Y,Nq,Nq,Y),Pq=t=>{const n=e(tk,t),i=Zd.fromRangeStart(t.selection.getRng());return $O(n,t.getBody(),i).filter(Iq)},Oq=(t,n)=>{n.fold(B,e(Tq,t),e(Aq,t),B)},Lq={insert:(t,n)=>{const i=Pq(t);i.isSome()?i.each(e(Oq,t)):Dq(t,n)},fakeEventName:"insertLineBreak"},Bq=(e,t)=>Uj(e).filter(e=>t.length>0&&_i(yi.fromDom(e),t)).isSome(),Fq=e=>Bq(e,ph(e)),Hq=e=>Bq(e,fh(e)),$q=Fu.generate([{br:[]},{block:[]},{none:[]}]),zq=e=>Hq(e),jq=e=>t=>Vj(t)===e,qq=(e,t)=>n=>Wj(n)===e.toUpperCase()===t,Uq=e=>{const t=qj(e.dom,e.selection.getStart());return N(t)},Wq=e=>qq("pre",e),Vq=()=>qq("summary",!0),Yq=e=>t=>ch(t)===e,Gq=e=>Fq(e),Kq=(e,t)=>t,Xq=e=>{const t=dh(e),n=qj(e.dom,e.selection.getStart());return I(n)&&e.schema.isValidChild(n.nodeName,t)},Qq=e=>{const t=e.selection.getRng(),n=yi.fromDom(t.startContainer),i=Hi(n,t.startOffset).map(e=>$n(e)&&!po(e));return t.collapsed&&i.getOr(!0)},Zq=(e,t)=>(n,i)=>ce(e,(e,t)=>e&&t(n,i),!0)?K.some(t):K.none(),Jq=(e,t)=>
34MO([Zq([zq],$q.none()),Zq([Wq(!0),Uq],$q.none()),Zq([Vq()],$q.br()),Zq([Wq(!0),Yq(!1),Kq],$q.br()),Zq([Wq(!0),Yq(!1)],$q.block()),Zq([Wq(!0),Yq(!0),Kq],$q.block()),Zq([Wq(!0),Yq(!0)],$q.br()),Zq([jq(!0),Kq],$q.br()),Zq([jq(!0)],$q.block()),Zq([Gq],$q.br()),Zq([Kq],$q.br()),Zq([Xq],$q.block()),Zq([Qq],$q.block())],[e,!(!t||!t.shiftKey)]).getOr($q.none()),eU=(e,t,n)=>{if(t.selection.isCollapsed()||uk(t),I(n)){if(Ij(t,e.fakeEventName).isDefaultPrevented())return}e.insert(t,n),I(n)&&Nj(t,e.fakeEventName)},tU=(e,t)=>{const n=()=>eU(Lq,e,t),i=()=>eU(xq,e,t),o=Jq(e,t);switch(hh(e)){case"linebreak":o.fold(n,n,B);break;case"block":o.fold(i,i,B);break;case"invert":o.fold(i,n,B);break;default:o.fold(n,i,B)}},nU=Jt(),iU=nU.os.isiOS()&&nU.browser.isSafari(),oU=(e,t)=>{t.isDefaultPrevented()||(t.preventDefault(),FM(e.undoManager),e.undoManager.transact(()=>{tU(e,t)}))},rU=e=>{if(!e.collapsed)return!1;const t=e.startContainer;if(Sr(t)){const n=/^[\uAC00-\uD7AF\u1100-\u11FF\u3130-\u318F\uA960-\uA97F\uD7B0-\uD7FF]$/,i=t.data.charAt(e.startOffset-1);return n.test(i)}return!1},sU=e=>{let t=K.none();const n=e=>{t=K.some(e.selection.getBookmark()),e.undoManager.add()},i=(e,n)=>{e.undoManager.undo(),t.fold(B,t=>e.selection.moveToBookmark(t)),oU(e,n),t=K.none()};e.on("keydown",t=>{t.keyCode===Yv.ENTER&&(iU&&rU(e.selection.getRng())?n(e):oU(e,t))}),e.on("keyup",n=>{n.keyCode===Yv.ENTER&&t.each(()=>i(e,n))})},aU=(e,t,n)=>{const i=an.os.isMacOS()||an.os.isiOS();eH([{keyCode:Yv.END,action:JF(LF,e,!0)},{keyCode:Yv.HOME,action:JF(LF,e,!1)},...i?[]:[{keyCode:Yv.HOME,action:JF(BF,e,!1),ctrlKey:!0,shiftKey:!0},{keyCode:Yv.END,action:JF(BF,e,!0),ctrlKey:!0,shiftKey:!0}],{keyCode:Yv.END,action:JF(oH,e,!0)},{keyCode:Yv.HOME,action:JF(oH,e,!1)},{keyCode:Yv.END,action:JF(tB,e,!0,t)},{keyCode:Yv.HOME,action:JF(tB,e,!1,t)}],n).each(()=>{n.preventDefault()})},lU=(e,t)=>{e.on("keydown",n=>{n.isDefaultPrevented()||aU(e,t,n)})},cU=e=>{e.on("input",t=>{t.isComposing||AC(e)})},dU=Jt(),uU=(e,t,n)=>{eH([{keyCode:Yv.PAGE_UP,action:JF(tB,e,!1,t)},{keyCode:Yv.PAGE_DOWN,action:JF(tB,e,!0,t)}],n)},hU=e=>e.stopImmediatePropagation(),pU=e=>e.keyCode===Yv.PAGE_UP||e.keyCode===Yv.PAGE_DOWN,fU=(e,t,n)=>
34{n&&!e.get()?t.on("NodeChange",hU,!0):!n&&e.get()&&t.off("NodeChange",hU),e.set(n)},mU=(e,t)=>{if(dU.os.isMacOS())return;const n=xc(!1);e.on("keydown",t=>{pU(t)&&fU(n,e,!0)}),e.on("keyup",i=>{i.isDefaultPrevented()||uU(e,t,i),pU(i)&&n.get()&&(fU(n,e,!1),e.nodeChanged())})},gU=e=>{e.on("beforeinput",t=>{e.selection.isEditable()&&!ne(t.getTargetRanges(),t=>!__(e.dom,t))||t.preventDefault()})},vU=(e,t)=>{const n=t.container(),i=t.offset();return Sr(n)?(n.insertData(i,e),K.some(Zd(n,i+e.length))):Vf(t).map(n=>{const i=yi.fromText(e);return t.isAtEnd()?Do(n,i):Eo(n,i),Zd(i.dom,e.length)})},yU=e(vU,jr),bU=e(vU," "),_U=(e,t,n)=>gC(e,t,n)?yU(t):bU(t),wU=e=>t=>t.fold(t=>Cm(e.dom,Zd.before(t)),e=>km(e),e=>xm(e),t=>wm(e.dom,Zd.after(t))),CU=(e,t,n)=>i=>gC(e,i,n)?yU(t):bU(t),kU=e=>t=>{e.selection.setRng(t.toRange()),e.nodeChanged()},xU=(e,t)=>e.isEditable(e.getParent(t,"summary")),SU=t=>{const n=Zd.fromRangeStart(t.selection.getRng()),i=yi.fromDom(t.getBody());if(t.selection.isCollapsed()){const o=e(tk,t),r=Zd.fromRangeStart(t.selection.getRng());return $O(o,t.getBody(),r).bind(wU(i)).map(e=>()=>CU(i,n,t.schema)(e).each(kU(t)))}return K.none()},EU=e=>{const t=()=>{const t=yi.fromDom(e.getBody());e.selection.isCollapsed()||e.getDoc().execCommand("Delete");const n=Zd.fromRangeStart(e.selection.getRng());_U(t,n,e.schema).each(kU(e))};return Cn(an.browser.isFirefox()&&e.selection.isEditable()&&xU(e.dom,e.selection.getRng().startContainer),t)},DU=(e,t)=>{tH([{keyCode:Yv.SPACEBAR,action:JF(SU,e)},{keyCode:Yv.SPACEBAR,action:JF(EU,e)}],t).each(n=>{t.preventDefault();Ij(e,"insertText",{data:" "}).isDefaultPrevented()||(n(),Nj(e,"insertText",{data:" "}))})},TU=e=>{e.on("keydown",t=>{t.isDefaultPrevented()||DU(e,t)})},AU=e=>Yp(e)?[{keyCode:Yv.TAB,action:JF(KH,e,!0)},{keyCode:Yv.TAB,shiftKey:!0,action:JF(KH,e,!1)}]:[],MU=(e,t)=>{eH([...AU(e)],t).each(()=>{t.preventDefault()})},RU=e=>{e.on("keydown",t=>{t.isDefaultPrevented()||MU(e,t)})},NU=e=>{if(e.addShortcut("Meta+P","","mcePrint"),dj(e),eR(e))return xc(null);{const t=ZL(e);return gU(e),SF(e),QH(e,t),$j(e,t),sU(e),TU(e),cU(e),RU(e),lU(e,t),mU(e,t),t}};class IU{constructor(e){let t;this.lastPath=[],this.editor=e;const n=this;"onselectionchange"in e.getDoc()||e.on("NodeChange click mouseup keyup focus",n=>{const i=e.selection.getRng(),o={startContainer:i.startContainer,startOffset:i.startOffset,endContainer:i.endContainer,endOffset:i.endOffset};"nodechange"!==n.type&&Iy(o,t)||e.dispatch("SelectionChange"),t=o}),e.on("contextmenu",()=>{e.dispatch("SelectionChange")}),e.on("SelectionChange",()=>{const t=e.selection.getStart(!0);t&&pg(e)&&!n.isSameElementPath(t)&&e.dom.isChildOf(t,e.getBody())&&e.nodeChanged({selectionChange:!0})}),e.on("mouseup",t=>{!t.isDefaultPrevented()&&pg(e)&&("IMG"===e.selection.getNode().nodeName?Wb.setEditorTimeout(e,()=>{e.nodeChanged()}):e.nodeChanged())})}nodeChanged(e={}){const t=this.editor.selection;let n;if(this.editor.initialized&&t&&!op(this.editor)&&!this.editor.mode.isReadOnly()){const i=this.editor.getBody();n=t.getStart(!0)||i,
35n.ownerDocument===this.editor.getDoc()&&this.editor.dom.isChildOf(n,i)||(n=i);const o=[];this.editor.dom.getParent(n,e=>e===i||(o.push(e),!1)),this.editor.dispatch("NodeChange",{...e,element:n,parents:o})}}isSameElementPath(e){let t;const n=this.editor,i=ge(n.dom.getParents(e,G,n.getBody()));if(i.length===this.lastPath.length){for(t=i.length;t>=0&&i[t]===this.lastPath[t];t--);if(-1===t)return this.lastPath=i,!0}return this.lastPath=i,!1}}const PU=id("image"),OU=e=>{const t=e;return K.from(t[PU])},LU=(e,t)=>{e[PU]=t},BU=id("event"),FU=e=>{const t=e;return K.from(t[BU])},HU=e=>t=>{t[BU]=e},$U=(e,t)=>HU(t)(e),zU=HU(0),jU=HU(2),qU=HU(1),UU=e=>t=>{const n=t;return K.from(n[BU]).exists(t=>t===e)},WU=UU(0),VU=()=>Object.freeze({length:0,item:()=>null}),YU=id("mode"),GU=e=>{const t=e;return K.from(t[YU])},KU=e=>t=>{t[YU]=e},XU=(e,t)=>KU(t)(e),QU=KU(0),ZU=KU(2),JU=KU(1),eW=e=>t=>{const n=t;return K.from(n[YU]).exists(t=>t===e)},tW=eW(0),nW=eW(1),iW=(e,t)=>({...t,get length(){return t.length},add:(n,i)=>{if(tW(e)){if(!S(n))return t.add(n);if(!R(i))return t.add(n,i)}return null},remove:n=>{tW(e)&&t.remove(n)},clear:()=>{tW(e)&&t.clear()}}),oW=["none","copy","link","move"],rW=["none","copy","copyLink","copyMove","link","linkMove","move","all","uninitialized"],sW=()=>{const e=new window.DataTransfer;let t="move",n="all";const i={get dropEffect(){return t}
35,set dropEffect(e){te(oW,e)&&(t=e)},get effectAllowed(){return n},set effectAllowed(e){WU(i)&&te(rW,e)&&(n=e)},get items(){return iW(i,e.items)},get files(){return nW(i)?VU():e.files},get types(){return e.types},setDragImage:(t,n,o)=>{tW(i)&&(LU(i,{image:t,x:n,y:o}),e.setDragImage(t,n,o))},getData:t=>nW(i)?"":e.getData(t),setData:(t,n)=>{tW(i)&&e.setData(t,n)},clearData:t=>{tW(i)&&e.clearData(t)}};return QU(i),i},aW=e=>{const t=sW(),n=GU(e);return ZU(e),zU(t),t.dropEffect=e.dropEffect,t.effectAllowed=e.effectAllowed,OU(e).each(e=>t.setDragImage(e.image,e.x,e.y)),oe(e.types,n=>{"Files"!==n&&t.setData(n,e.getData(n))}),oe(e.files,e=>t.items.add(e)),FU(e).each(e=>{$U(t,e)}),n.each(n=>{XU(e,n),XU(t,n)}),t},lW=e=>{const t=e.getData("text/html");return""===t?K.none():K.some(t)},cW=(e,t)=>e.setData("text/html",t),dW="x-tinymce/html",uW=$(dW),hW="<!-- "+dW+" -->",pW=e=>hW+e,fW=e=>e.replace(hW,""),mW=e=>-1!==e.indexOf(hW),gW=e=>!/<(?:\/?(?!(?:div|p|br|span)>)\w+|(?:(?!(?:span style="white-space:\s?pre;?">)|br\s?\/>))\w+\s[^>]+)>/i.test(e),vW=(e,t)=>{let n="<"+e;const i=Oe(t,(e,t)=>t+'="'+fl.encodeAllRaw(e)+'"');return i.length&&(n+=" "+i.join(" ")),n+">"},yW=(e,t,n)=>{const i=e.split(/\n\n/),o=vW(t,n),r="</"+t+">",s=ie(i,e=>e.split(/\n/).join("<br />")),a=e=>o+e+r;return 1===s.length?s[0]:ie(s,a).join("")},bW="%MCEPASTEBIN%",_W=(e,t)=>{const{dom:n,selection:i}=e,o=e.getBody();t.set(i.getRng());const r=n.add(e.getBody(),"div",{id:"mcepastebin",class:"mce-pastebin",contentEditable:!0,"data-mce-bogus":"all",style:"position: fixed; top: 50%; width: 10px; height: 10px; overflow: hidden; opacity: 0"},bW);an.browser.isFirefox()&&n.setStyle(r,"left","rtl"===n.getStyle(o,"direction",!0)?65535:-65535),n.bind(r,"beforedeactivate focusin focusout",e=>{e.stopPropagation()}),r.focus(),i.select(r,!0)},wW=(e,t)=>{const n=e.dom;if(CW(e)){let i;const o=t.get();for(;i=CW(e);)n.remove(i),n.unbind(i);o&&e.selection.setRng(o)}t.set(null)},CW=e=>e.dom.get("mcepastebin"),kW=e=>I(e)&&"mcepastebin"===e.id,xW=e=>{const t=e.dom,n=(e,n)=>{e.appendChild(n),t.remove(n,!0)},[i,...o]=ae(e.getBody().childNodes,kW);oe(o,e=>{n(i,e)});const r=t.select("div[id=mcepastebin]",i);for(let e=r.length-1;e>=0;e--){const o=t.create("div");i.insertBefore(o,r[e]),n(o,r[e])}return i?i.innerHTML:""},SW=e=>e===bW,EW=e=>{const t=xc(null);return{create:()=>_W(e,t),remove:()=>wW(e,t),getEl:()=>CW(e),getHtml:()=>xW(e),getLastRng:t.get}},DW=(e,t)=>(gn.each(t,t=>{e=x(t,RegExp)?e.replace(t,""):e.replace(t[0],t[1])}),e),TW=e=>{const t=Il(),n=SA({},t);let i="";const o=t.getVoidElements(),r=gn.makeMap("script noscript style textarea video audio iframe object"," "),s=t.getBlockElements(),a=e=>{const n=e.name,l=e;if("br"!==n){if("wbr"!==n)if(o[n]&&(i+=" "),r[n])i+=" ";else{if(3===e.type&&(i+=e.value),!(e.name in t.getVoidElements())){let t=e.firstChild;if(t)do{a(t)}while(t=t.next)}s[n]&&l.next&&(i+="\n","p"===n&&(i+="\n"))}}else i+="\n"};return e=DW(e,[/<!\[[^\]]+\]>/g]),a(n.parse(e)),i},AW=e=>e=DW(e,[/^[\s\S]*<body[^>]*>\s*|\s*<\/body[^>]*>[\s\S]*$/gi,/<!--StartFragment-->|<!--EndFragment-->/g,[/( ?)<span class="Apple-converted-space">\u00a0<\/span>( ?)/g,(e,t,n)=>t||n?jr:" "],/<br class="Apple-interchange-newline">/g,/<br>$/i]),MW=e=>{let t=0;return()=>e+t++},RW=e=>{const t=e.toLowerCase(),n={jpg:"jpeg",jpe:"jpeg",jfi:"jpeg",jif:"jpeg",jfif:"jpeg",pjpeg:"jpeg",pjp:"jpeg",svg:"svg+xml"};return gn.hasOwn(n,t)?"image/"+n[t]:"image/"+t},NW=(e,t)=>{const n=SA({sanitize:$p(e),sandbox_iframes:Qp(e)},e.schema);n.addNodeFilter("meta",e=>{gn.each(e,e=>{e.remove()})});const i=n.parse(t,{forced_root_block:!1,isRootContent:!0});return mw({validate:!0},e.schema).serialize(i)},IW=(e,t)=>({content:e,cancelled:t}),PW=(e,t,n)=>{const i=e.dom.create("div",{style:"display:none"},t),o=Uv(e,i,n);return IW(o.node.innerHTML,o.isDefaultPrevented())},OW=(e,t,n)=>{const i=qv(e,t,n),o=NW(e,i.content);return e.hasEventListeners("PastePostProcess")&&!i.isDefaultPrevented()?PW(e,o,n):IW(o,i.isDefaultPrevented())},LW=(e,t,n)=>OW(e,t,n),BW=(e,t)=>(e.insertContent(t,{merge:Tp(e),paste:!0}),!0),FW=e=>/^https?:\/\/[\w\-\/+=.,!;:&%@^~(){}?#]+$/i.test(e),HW=(e,t)=>
35FW(t)&&ne(Vp(e),e=>mt(t.toLowerCase(),`.${e.toLowerCase()}`)),$W=(e,t,n)=>(e.undoManager.extra(()=>{n(e,t)},()=>{e.insertContent('<img src="'+t+'">')}),!0),zW=(e,t,n)=>(e.undoManager.extra(()=>{n(e,t)},()=>{e.execCommand("mceInsertLink",!1,t)}),!0),jW=(e,t,n)=>!(e.selection.isCollapsed()||!FW(t))&&zW(e,t,n),qW=(e,t,n)=>!!HW(e,t)&&$W(e,t,n),UW=(e,t)=>{gn.each([jW,qW,BW],n=>!n(e,t,BW))},WW=(e,t,n)=>{n||!Ap(e)?BW(e,t):UW(e,t)},VW=MW("mceclip"),YW=e=>{const t=sW();return cW(t,e),ZU(t),t},GW=(e,t,n,i,o)=>{const r=LW(e,t,n);if(!r.cancelled){const t=r.content,n=()=>WW(e,t,i);if(o){Ij(e,"insertFromPaste",{dataTransfer:YW(t)}).isDefaultPrevented()||(n(),Nj(e,"insertFromPaste"))}else n()}},KW=(e,t,n,i)=>{const o=n||mW(t);GW(e,fW(t),o,!1,i)},XW=(e,t,n)=>{const i=e.dom.encode(t).replace(/\r\n/g,"\n"),o=ta(i,Rp(e)),r=yW(o,dh(e),uh(e));GW(e,r,!1,!0,n)},QW=e=>{const t={};if(e&&e.types)for(let n=0;n<e.types.length;n++){const i=e.types[n];try{t[i]=e.getData(i)}catch(e){t[i]=""}}return t},ZW=(e,t)=>t in e&&e[t].length>0,JW=e=>ZW(e,"text/html")||ZW(e,"text/plain"),eV=(e,t)=>{const n=t.match(/([\s\S]+?)(?:\.[a-z0-9.]+)$/i);return I(n)?e.dom.encode(n[1]):void 0},tV=(e,t,n,i)=>{const o=VW(),r=yh(e)&&I(n.name),s=r?eV(e,n.name):o,a=r?n.name:void 0,l=t.create(o,n,i,s,a);return t.add(l),l},nV=(e,t)=>{$D(t.uri).each(({data:n,type:i,base64Encoded:o})=>{const r=o?n:btoa(n),s=t.file,a=e.editorUpload.blobCache,l=a.getByData(r,i),c=null!=l?l:tV(e,a,s,r);KW(e,`<img src="${c.blobUri()}">`,!1,!0)})},iV=e=>"paste"===e.type,oV=e=>Promise.all(ie(e,e=>UD(e).then(t=>({file:e,uri:t})))),rV=e=>{const t=Vp(e);return e=>ft(e.type,"image/")&&ne(t,t=>RW(t)===e.type)},sV=(e,t)=>{const n=t.items?fe(ke(t.items),e=>"file"===e.kind?[e.getAsFile()]:[]):[],i=t.files?ke(t.files):[];return ae(n.length>0?n:i,rV(e))},aV=(e,t,n)=>{const i=iV(t)?t.clipboardData:t.dataTransfer;if(Cp(e)&&i){const o=sV(e,i);if(o.length>0)return t.preventDefault(),oV(o).then(t=>{n&&e.selection.setRng(n),oe(t,t=>{nV(e,t)})}),!0}return!1},lV=e=>{var t,n;return an.os.isAndroid()&&0===(null===(n=null===(t=e.clipboardData)||void 0===t?void 0:t.items)||void 0===n?void 0:n.length)},cV=e=>Yv.metaKeyPressed(e)&&86===e.keyCode||e.shiftKey&&45===e.keyCode,dV=(e,t,n,i,o)=>{let r=AW(n);const s=ZW(t,uW())||mW(n),a=!s&&gW(r),l=FW(r);(SW(r)||!r.length||a&&!l)&&(i=!0),(i||l)&&(r=ZW(t,"text/plain")&&a?t["text/plain"]:TW(r)),SW(r)||(i?XW(e,r,o):KW(e,r,s,o))},uV=(e,t,n)=>{let i;const o=()=>t.getLastRng()||e.selection.getRng();e.on("keydown",e=>{cV(e)&&!e.isDefaultPrevented()&&(i=e.shiftKey&&86===e.keyCode)}),e.on("paste",r=>{if(r.isDefaultPrevented()||lV(r))return;const s="text"===n.get()||i;i=!1;const a=QW(r.clipboardData);!JW(a)&&aV(e,r,o())||(ZW(a,"text/html")?(r.preventDefault(),dV(e,a,a["text/html"],s,!0)):ZW(a,"text/plain")&&ZW(a,"text/uri-list")?(r.preventDefault(),dV(e,a,a["text/plain"],s,!0)):(t.create(),Wb.setEditorTimeout(e,()=>{const n=t.getHtml();t.remove(),dV(e,a,n,s,!1)},0)))})},hV=e=>{const t=e=>ft(e,"webkit-fake-url"),n=e=>ft(e,"data:"),i=e=>{var t;return!0===(null===(t=e.data)||void 0===t?void 0:t.paste)};e.parser.addNodeFilter("img",(o,r,s)=>{if(!Cp(e)&&i(s))for(const i of o){const o=i.attr("src");S(o)&&!i.attr("data-mce-object")&&o!==an.transparentSrc&&(t(o)||!Np(e)&&n(o))&&i.remove()}})},pV=(e,t,n)=>{uV(e,t,n),hV(e)},fV=(e,t)=>{"text"===t.get()?(t.set("html"),Wv(e,!1)):(t.set("text"),Wv(e,!0)),e.focus()},mV=(e,t)=>{e.addCommand("mceTogglePlainTextPaste",()=>{fV(e,t)}),e.addCommand("mceInsertClipboardContent",(t,n)=>{n.html&&KW(e,n.html,n.internal,!1),n.text&&XW(e,n.text,!1)})},gV=(e,t,n)=>{if(!e)return!1;try{return e.clearData(),e.setData("text/html",t),e.setData("text/plain",n),e.setData(uW(),t),!0}catch(e){return!1}},vV=(e,t,n,i)=>{gV(e.clipboardData,t.html,t.text)?(e.preventDefault(),i()):n(t.html,i)},yV=e=>(t,n)=>{const{dom:i,selection:o}=e,r=i.create("div",{contenteditable:"false","data-mce-bogus":"all"}),s=i.create("div",{contenteditable:"true"},t);i.setStyles(r,{position:"fixed",top:"0",left:"-3000px",width:"1000px",overflow:"hidden"}),r.appendChild(s),i.add(e.getBody(),r);const a=o.getRng();s.focus();const l=i.createRng();
35l.selectNodeContents(s),o.setRng(l),Wb.setEditorTimeout(e,()=>{o.setRng(a),i.remove(r),n()},0)},bV=e=>({html:pW(e.selection.getContent({contextual:!0})),text:e.selection.getContent({format:"text"})}),_V=e=>!!e.dom.getParent(e.selection.getStart(),"td[data-mce-selected],th[data-mce-selected]",e.getBody()),wV=e=>!e.selection.isCollapsed()||_V(e),CV=e=>t=>{!t.isDefaultPrevented()&&wV(e)&&e.selection.isEditable()&&vV(t,bV(e),yV(e),()=>{if(an.browser.isChromium()||an.browser.isFirefox()){const t=e.selection.getRng();Wb.setEditorTimeout(e,()=>{e.selection.setRng(t),e.execCommand("Delete")},0)}else e.execCommand("Delete")})},kV=e=>t=>{!t.isDefaultPrevented()&&wV(e)&&vV(t,bV(e),yV(e),B)},xV=e=>{e.on("cut",CV(e)),e.on("copy",kV(e))},SV=(e,t)=>{var n,i;return Vy.getCaretRangeFromPoint(null!==(n=t.clientX)&&void 0!==n?n:0,null!==(i=t.clientY)&&void 0!==i?i:0,e.getDoc())},EV=e=>{const t=e["text/plain"];return!!t&&0===t.indexOf("file://")},DV=(e,t)=>{e.focus(),t&&e.selection.setRng(t)},TV=e=>ne(e.files,e=>/^image\//.test(e.type)),AV=(e,t,n,i)=>{const o=e.getParent(n,e=>Na(t,e));if(!A(e.getParent(n,"summary")))return!0;if(o&&Fe(i,"text/html")){const e=(new DOMParser).parseFromString(i["text/html"],"text/html").body;return!A(e.querySelector(o.nodeName.toLowerCase()))}return!1},MV=e=>{e.on("input",t=>{const n=e=>A(e.querySelector("summary"));if("deleteByDrag"===t.inputType){const t=ae(e.dom.select("details"),n);oe(t,t=>{Rr(t.firstChild)&&t.firstChild.remove();const n=e.dom.create("summary");n.appendChild(hs().dom),t.prepend(n)})}})},RV=(e,t)=>{wp(e)&&e.on("dragend dragover draggesture dragdrop drop drag",e=>{e.preventDefault(),e.stopPropagation()}),Cp(e)||e.on("drop",e=>{const t=e.dataTransfer;t&&TV(t)&&e.preventDefault()}),e.on("drop",n=>{if(n.isDefaultPrevented())return;const i=SV(e,n);if(N(i))return;const o=QW(n.dataTransfer),r=ZW(o,uW());if((!JW(o)||EV(o))&&aV(e,n,i))return;const s=o[uW()],a=s||o["text/html"]||o["text/plain"],l=AV(e.dom,e.schema,i.startContainer,o),c=t.get();c&&!l||a&&(n.preventDefault(),Wb.setEditorTimeout(e,()=>{e.undoManager.transact(()=>{(s||c&&l)&&e.execCommand("Delete"),DV(e,i);const t=AW(a);o["text/html"]?KW(e,t,r,!0):XW(e,t,!0)})}))}),e.on("dragstart",()=>{t.set(!0)}),e.on("dragover dragend",n=>{Cp(e)&&!t.get()&&(n.preventDefault(),DV(e,SV(e,n))),"dragend"===n.type&&t.set(!1)}),MV(e)},NV=e=>{const t=t=>n=>{t(e,n)},n=kp(e);P(n)&&e.on("PastePreProcess",t(n));const i=xp(e);P(i)&&e.on("PastePostProcess",t(i))},IV=(e,t)=>{e.on("PastePreProcess",n=>{n.content=t(e,n.content,n.internal)})},PV=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi,OV=e=>gn.trim(e).replace(PV,Ul).toLowerCase(),LV=(e,t,n)=>{const i=Ep(e);if(n||"all"===i||!Dp(e))return t;const o=i?i.split(/[, ]/):[];if(o&&"none"!==i){const n=e.dom,i=e.selection.getNode();t=t.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,(e,t,r,s)=>{const a=n.parseStyle(n.decode(r)),l={};for(let e=0;e<o.length;e++){const t=a[o[e]];let r=t,s=n.getStyle(i,o[e],!0);/color/.test(o[e])&&(r=OV(r),s=OV(s)),s!==r&&(l[o[e]]=t)}const c=n.serializeStyle(l,"span");return c?t+' style="'+c+'"'+s:t+s})}else t=t.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,"$1$3");return t=t.replace(/(<[^>]+) data-mce-style="([^"]+)"([^>]*>)/gi,(e,t,n,i)=>t+' style="'+n+'"'+i),t},BV=e=>{(an.browser.isChromium()||an.browser.isSafari())&&IV(e,LV)},FV=e=>{const t=xc(!1),n=xc(Mp(e)?"text":"html"),i=EW(e);BV(e),mV(e,n),NV(e),e.on("PreInit",()=>{xV(e),RV(e,t),pV(e,i,n)})},HV=e=>{e.on("click",t=>{e.dom.getParent(t.target,"details")&&t.preventDefault()})},$V=e=>{e.parser.addNodeFilter("details",t=>{const n=Gp(e);oe(t,e=>{"expanded"===n?e.attr("open","open"):"collapsed"===n&&e.attr("open",null)})}),e.serializer.addNodeFilter("details",t=>{const n=Kp(e);oe(t,e=>{"expanded"===n?e.attr("open","open"):"collapsed"===n&&e.attr("open",null)})})},zV=e=>{HV(e),$V(e)},jV=Rr,qV=Sr,UV=e=>Pr(e.dom),WV=e=>Ir(e.dom),VV=e=>t=>xi(yi.fromDom(e),t),YV=(e,t,n)=>oo(yi.fromDom(e),e=>WV(e)||n.isBlock(Ln(e)),VV(t)).getOr(yi.fromDom(t)).dom,GV=(e,t)=>oo(yi.fromDom(e),UV,VV(t)),KV=(e,t,n)=>{const i=new cr(e,t),o=n?i.next.bind(i):i.prev.bind(i);let r=e;for(let t=n?e:o();t&&!jV(t);t=o())js(t)&&(r=t);return r},XV=(e,t,n)=>{const i=Zd.fromRangeStart(e).getNode(),o=YV(i,t,n),r=KV(i,o,!1),s=KV(i,o,!0),a=document.createRange();return GV(r,o).fold(()=>{qV(r)?a.setStart(r,0):a.setStartBefore(r)},e=>a.setStartBefore(e.dom)),GV(s,o).fold(()=>{qV(s)?a.setEnd(s,s.data.length):a.setEndAfter(s)},e=>a.setEndAfter(e.dom)),a},QV=e=>{const t=XV(e.selection.getRng(),e.getBody(),e.schema);e.selection.setRng(Vx(t))},ZV=e=>{e.on("mousedown",t=>{t.detail>=3&&(t.preventDefault(),QV(e))})};var JV;!function(e){e.Before="before",e.After="after"}(JV||(JV={}));const eY=(e,t)=>
35Math.abs(e.left-t),tY=(e,t)=>Math.abs(e.right-t),nY=(e,t)=>e>=t.top&&e<=t.bottom,iY=(e,t)=>e.top<t.bottom&&e.bottom>t.top,oY=(e,t)=>{const n=kd(e,t)/Math.min(e.height,t.height);return iY(e,t)&&n>.5},rY=(e,t)=>{const n=ae(e,e=>nY(t,e));return wd(n).fold(()=>[[],e],t=>{const{pass:n,fail:i}=se(e,e=>oY(e,t));return[n,i]})},sY=(e,t)=>({node:e.node,position:eY(e,t)<tY(e,t)?JV.Before:JV.After}),aY=(e,t)=>t>e.left&&t<e.right?0:Math.min(Math.abs(e.left-t),Math.abs(e.right-t)),lY=(e,t,n,i)=>{const o=e=>js(e.node)?K.some(e):hr(e.node)?lY(ke(e.node.childNodes),t,n,!1):K.none(),r=(e,i,r)=>o(i).filter(i=>Math.abs(r(e,t,n)-r(i,t,n))<2&&Sr(i.node)),s=(e,s)=>{const a=be(e,(e,i)=>s(e,t,n)-s(i,t,n));return xe(a,o).map(e=>i&&!Sr(e.node)&&a.length>1?r(e,a[1],s).getOr(e):e)},[a,l]=rY(xL(e),n),{pass:c,fail:d}=se(l,e=>e.top<n);return s(a,aY).orThunk(()=>s(d,Cd)).orThunk(()=>s(c,Cd))},cY=(e,t,n,i)=>{const o=(t,r)=>{const s=e=>hr(e)&&e.classList.contains("mce-drag-container"),a=ae(t.dom.childNodes,q(s));return r.fold(()=>lY(a,n,i,!0),e=>{const t=ae(a,t=>t!==e.dom);return lY(t,n,i,!0)}).orThunk(()=>(xi(t,e)?K.none():Ri(t)).bind(e=>o(e,K.some(t))))};return o(t,K.none())},dY=(e,t,n)=>{const i=yi.fromDom(e),o=Di(i),r=yi.fromPoint(o,t,n).filter(e=>Si(i,e)).getOr(i);return cY(i,r,t,n)},uY=(e,t,n)=>dY(e,t,n).filter(e=>_f(e.node)).map(e=>sY(e,t)),hY=e=>{var t,n;const i=e.getBoundingClientRect(),o=e.ownerDocument,r=o.documentElement,s=o.defaultView;return{top:i.top+(null!==(t=null==s?void 0:s.scrollY)&&void 0!==t?t:0)-r.clientTop,left:i.left+(null!==(n=null==s?void 0:s.scrollX)&&void 0!==n?n:0)-r.clientLeft}},pY=e=>e.inline?hY(e.getBody()):{left:0,top:0},fY=e=>{const t=e.getBody();return e.inline?{left:t.scrollLeft,top:t.scrollTop}:{left:0,top:0}},mY=e=>{const t=e.getBody(),n=e.getDoc().documentElement,i={left:t.scrollLeft,top:t.scrollTop},o={left:t.scrollLeft||n.scrollLeft,top:t.scrollTop||n.scrollTop};return e.inline?i:o},gY=(e,t)=>{if(t.target.ownerDocument!==e.getDoc()){const n=hY(e.getContentAreaContainer()),i=mY(e);return{left:t.pageX-n.left+i.left,top:t.pageY-n.top+i.top}}return{left:t.pageX,top:t.pageY}}
35,vY=(e,t,n)=>({pageX:n.left-e.left+t.left,pageY:n.top-e.top+t.top}),yY=(e,t)=>vY(pY(e),fY(e),gY(e,t)),bY=e=>({target:e,srcElement:e}),_Y=(e,t,n,i)=>({...t,dataTransfer:i,type:e,...bY(n)}),wY=(e,t,n)=>{const i=U("Function not supported on simulated event.");return{bubbles:!0,cancelBubble:!1,cancelable:!0,composed:!1,currentTarget:null,defaultPrevented:!1,eventPhase:0,isTrusted:!0,returnValue:!1,timeStamp:0,type:e,composedPath:i,initEvent:i,preventDefault:B,stopImmediatePropagation:B,stopPropagation:B,AT_TARGET:window.Event.AT_TARGET,BUBBLING_PHASE:window.Event.BUBBLING_PHASE,CAPTURING_PHASE:window.Event.CAPTURING_PHASE,NONE:window.Event.NONE,altKey:!1,button:0,buttons:0,clientX:0,clientY:0,ctrlKey:!1,metaKey:!1,movementX:0,movementY:0,offsetX:0,offsetY:0,pageX:0,pageY:0,relatedTarget:null,screenX:0,screenY:0,shiftKey:!1,x:0,y:0,detail:0,view:null,which:0,initUIEvent:i,initMouseEvent:i,getModifierState:i,dataTransfer:n,...bY(t)}},CY=(e,t)=>{const n=aW(e);return"dragstart"===t?(zU(n),QU(n)):"drop"===t?(jU(n),ZU(n)):(qU(n),JU(n)),n},kY=(e,t,n,i)=>{const o=CY(n,e);return R(i)?wY(e,t,o):_Y(e,i,t,o)},xY=32,SY=100,EY=8,DY=16,TY=Pr,AY=Md(TY,Ir),MY=(e,t,n)=>TY(n)&&n!==t&&e.isEditable(n.parentElement),RY=(e,t,n)=>!N(t)&&(t!==n&&!e.dom.isChildOf(t,n)&&e.dom.isEditable(t)),NY=(e,t,n,i)=>{const o=e.dom,r=t.cloneNode(!0);o.setStyles(r,{width:n,height:i}),o.setAttrib(r,"data-mce-selected",null);const s=o.create("div",{class:"mce-drag-container","data-mce-bogus":"all",unselectable:"on",contenteditable:"false"});return o.setStyles(s,{position:"absolute",opacity:.5,overflow:"hidden",border:0,padding:0,margin:0,width:n,height:i}),o.setStyles(r,{margin:0,boxSizing:"border-box"}),s.appendChild(r),s},IY=(e,t)=>{e.parentNode!==t&&t.appendChild(e)},PY=(e,t)=>n=>()=>{const i="left"===e?n.scrollX:n.scrollY;n.scroll({[e]:i+t,behavior:"smooth"})},OY=PY("left",-xY),LY=PY("left",xY),BY=PY("top",-xY),FY=PY("top",xY),HY=(e,t,n,i,o,r,s,a,l,c,d,u)=>{let h=0,p=0;e.style.left=t.pageX+"px",e.style.top=t.pageY+"px",t.pageX+n>o&&(h=t.pageX+n-o),t.pageY+i>r&&(p=t.pageY+i-r),e.style.width=n-h+"px",e.style.height=i-p+"px";const f=l.clientHeight,m=l.clientWidth,g=s+l.getBoundingClientRect().top,v=a+l.getBoundingClientRect().left;d.on(e=>{e.intervalId.clear(),e.dragging&&u&&(s+EY>=f?e.intervalId.set(FY(c)):s-EY<=0?e.intervalId.set(BY(c)):a+EY>=m?e.intervalId.set(LY(c)):a-EY<=0?e.intervalId.set(OY(c)):g+DY>=window.innerHeight?e.intervalId.set(FY(window)):g-DY<=0?e.intervalId.set(BY(window)):v+DY>=window.innerWidth?e.intervalId.set(LY(window)):v-DY<=0&&e.intervalId.set(OY(window)))})},$Y=e=>{e&&e.parentNode&&e.parentNode.removeChild(e)},zY=(e,t)=>
vendor: 4,515 bytes, line 35
35{const n=e.getParent(t.parentNode,e.isBlock);$Y(t),n&&n!==e.getRoot()&&e.isEmpty(n)&&ps(yi.fromDom(n))},jY=e=>0===e.button,qY=(e,t)=>({pageX:t.pageX-e.relX,pageY:t.pageY+5}),UY=(e,t)=>n=>{if(jY(n)){const i=ue(t.dom.getParents(n.target),AY).getOr(null);if(I(i)&&MY(t.dom,t.getBody(),i)){const o=t.dom.getPos(i),r=t.getBody(),s=t.getDoc().documentElement;e.set({element:i,dataTransfer:sW(),dragging:!1,screenX:n.screenX,screenY:n.screenY,maxX:(t.inline?r.scrollWidth:s.offsetWidth)-2,maxY:(t.inline?r.scrollHeight:s.offsetHeight)-2,relX:n.pageX-o.x,relY:n.pageY-o.y,width:i.offsetWidth,height:i.offsetHeight,ghost:NY(t,i,i.offsetWidth,i.offsetHeight),intervalId:Bc(SY)})}}},WY=(e,t,n)=>{e._selectionOverrides.hideFakeCaret(),uY(e.getBody(),t,n).fold(()=>e.selection.placeCaretAt(t,n),i=>{const o=e._selectionOverrides.showCaret(1,i.node,i.position===JV.Before,!1);o?e.selection.setRng(o):e.selection.placeCaretAt(t,n)})},VY=(e,t,n,i,o)=>{"dragstart"===t&&cW(i,e.dom.getOuterHTML(n));const r=kY(t,n,i,o);return e.dispatch(t,r)},YY=(e,t)=>{const n=Hc((e,n)=>WY(t,e,n),0);t.on("remove",n.cancel);const i=e;return o=>e.on(e=>{const r=Math.max(Math.abs(o.screenX-e.screenX),Math.abs(o.screenY-e.screenY));if(!e.dragging&&r>10){const n=VY(t,"dragstart",e.element,e.dataTransfer,o);if(I(n.dataTransfer)&&(e.dataTransfer=n.dataTransfer),n.isDefaultPrevented())return;e.dragging=!0,t.focus()}if(e.dragging){const r=o.currentTarget===t.getDoc().documentElement,s=qY(e,yY(t,o));IY(e.ghost,t.getBody()),HY(e.ghost,s,e.width,e.height,e.maxX,e.maxY,o.clientY,o.clientX,t.getContentAreaContainer(),t.getWin(),i,r),n.throttle(o.clientX,o.clientY)}})},GY=e=>{const t=e.getSel();if(I(t)){const e=t.getRangeAt(0).startContainer;return Sr(e)?e.parentNode:e}return null},KY=(e,t)=>n=>{e.on(e=>{var i;if(e.intervalId.clear(),e.dragging){if(RY(t,GY(t.selection),e.element)){const o=null!==(i=t.getDoc().elementFromPoint(n.clientX,n.clientY))&&void 0!==i?i:t.getBody();VY(t,"drop",o,e.dataTransfer,n).isDefaultPrevented()||t.undoManager.transact(()=>{zY(t.dom,e.element),lW(e.dataTransfer).each(e=>t.insertContent(e)),t._selectionOverrides.hideFakeCaret()})}VY(t,"dragend",t.getBody(),e.dataTransfer,n)}}),ZY(e)},XY=(e,t,n)=>{e.on(e=>{e.intervalId.clear(),e.dragging&&n.fold(()=>VY(t,"dragend",e.element,e.dataTransfer),n=>VY(t,"dragend",e.element,e.dataTransfer,n))}),ZY(e)},QY=(e,t)=>n=>XY(e,t,K.some(n)),ZY=e=>{e.on(e=>{e.intervalId.clear(),$Y(e.ghost)}),e.clear()},JY=e=>{const t=Fc(),n=vc.DOM,i=document,o=UY(t,e),r=YY(t,e),s=KY(t,e),a=QY(t,e);e.on("mousedown",o),e.on("mousemove",r),e.on("mouseup",s),n.bind(i,"mousemove",r),n.bind(i,"mouseup",a),e.on("remove",()=>{n.unbind(i,"mousemove",r),n.unbind(i,"mouseup",a)}),e.on("keydown",n=>{n.keyCode===Yv.ESC&&XY(t,e,K.none())})},eG=e=>{const t=t=>{if(!t.isDefaultPrevented()){const n=t.dataTransfer;n&&(te(n.types,"Files")||n.files.length>0)&&(t.preventDefault(),"drop"===t.type&&nI(e,"Dropped file type is not supported"))}},n=n=>{t_(e,n.target)&&t(n)},i=()=>{const i=vc.DOM,o=e.dom,r=document,s=e.inline?e.getBody():e.getDoc(),a=["drop","dragover"];oe(a,e=>{i.bind(r,e,n),o.bind(s,e,t)}),e.on("remove",()=>{oe(a,e=>{i.unbind(r,e,n),o.unbind(s,e,t)})})};e.on("init",()=>{Wb.setEditorTimeout(e,i,0)})},tG=e=>{JY(e),dp(e)&&eG(e)},nG=e=>{const t=Hc(()=>{if(!e.removed&&e.getBody().contains(document.activeElement)){const t=e.selection.getRng();if(t.collapsed){const n=jP(e,t,!1);e.selection.setRng(n)}}},0);e.on("focus",()=>{t.throttle()}),e.on("blur",()=>{t.cancel()})},iG=e=>{e.on("init",()=>{e.on("focusin",t=>{const n=t.target;if(Br(n)){const t=Cx(e.getBody(),n),i=Pr(t)?t:n;e.selection.getNode()!==i&&$P(e,i).each(t=>e.selection.setRng(t))}})})},oG=Pr,rG=(e,t)=>Cx(e.getBody(),t),sG=e=>{const t=e.selection,n=e.dom,i=e.getBody(),o=vf(e,i,n.isBlock,()=>m_(e)),r="sel-"+n.uniqueId(),s="data-mce-selected";let a;const l=e=>I(e)&&n.hasClass(e,"mce-offscreen-selection"),c=e=>e!==i&&(oG(e)||Br(e))&&n.isChildOf(e,i)&&n.isEditable(e.parentNode),d=e=>{e&&t.setRng(e)},u=(n,i,r,s=!0)=>e.dispatch("ShowCaret",{target:i,direction:n,before:r}).isDefaultPrevented()?null:(s&&t.scrollIntoView(i,-1===n),o.show(r,i)),h=e=>{e.hasAttribute("data-mce-caret")&&(Ns(e),t.scrollIntoView(e))},p=()=>{e.on("click",t=>{n.isEditable(t.target)||(t.preventDefault(),e.focus())}),e.on("blur NewBlock",_),e.on("ResizeWindow FullscreenStateChanged",o.reposition),e.on("tap",t=>{const n=t.target,i=rG(e,n);oG(i)?(t.preventDefault(),$P(e,i).each(b)):c(n)&&$P(e,n).each(b)},!0),e.on("mousedown",t=>{const o=t.target;
vendor: 4,175 bytes, line 35
35if(o!==i&&"HTML"!==o.nodeName&&!n.isChildOf(o,i))return;if(!VN(e,t.clientX,t.clientY))return;_(),C();const r=rG(e,o);oG(r)?(t.preventDefault(),$P(e,r).each(b)):uY(i,t.clientX,t.clientY).each(n=>{t.preventDefault();const i=u(1,n.node,n.position===JV.Before,!1);d(i),pr(r)?r.focus():e.getBody().focus()})}),e.on("keypress",e=>{Yv.modifierPressed(e)||oG(t.getNode())&&e.preventDefault()}),e.on("GetSelectionRange",e=>{let t=e.range;if(a){if(!a.parentNode)return void(a=null);t=t.cloneRange(),t.selectNode(a),e.range=t}}),e.on("SetSelectionRange",e=>{e.range=g(e.range);const t=b(e.range,e.forward);t&&(e.range=t)});const r=e=>hr(e)&&"mcepastebin"===e.id;e.on("AfterSetSelectionRange",e=>{const t=e.range,n=t.startContainer.parentElement;m(t)||r(n)||C(),l(n)||_()}),tG(e),nG(e),iG(e)},f=e=>ks(e)||As(e)||Ms(e),m=e=>f(e.startContainer)||f(e.endContainer),g=t=>{const i=e.schema.getVoidElements(),o=n.createRng(),r=t.startContainer,s=t.startOffset,a=t.endContainer,l=t.endOffset;return Fe(i,r.nodeName.toLowerCase())?0===s?o.setStartBefore(r):o.setStartAfter(r):o.setStart(r,s),Fe(i,a.nodeName.toLowerCase())?0===l?o.setEndBefore(a):o.setEndAfter(a):o.setEnd(a,l),o},v=(i,o)=>{const s=yi.fromDom(e.getBody()),a=e.getDoc(),l=co(s,"#"+r).getOrThunk(()=>{const e=yi.fromHtml('<div data-mce-bogus="all" class="mce-offscreen-selection"></div>',a);return Yn(e,"id",r),Ao(s,e),e}),c=n.createRng();Io(l),No(l,[yi.fromText(jr,a),yi.fromDom(o),yi.fromText(jr,a)]),c.setStart(l.dom.firstChild,1),c.setEnd(l.dom.lastChild,0),bo(l,{top:n.getPos(i,e.getBody()).y+"px"}),Sb(l);const d=t.getSel();return d&&(d.removeAllRanges(),d.addRange(c)),c},y=t=>{const i=t.cloneNode(!0),o=e.dispatch("ObjectSelected",{target:t,targetClone:i});if(o.isDefaultPrevented())return null;const r=v(t,o.targetClone),l=yi.fromDom(t);return oe(ar(yi.fromDom(e.getBody()),`*[${s}]`),e=>{xi(l,e)||Zn(e,s)}),n.getAttrib(t,s)||t.setAttribute(s,"1"),a=t,C(),r},b=(e,t)=>{if(!e)return null;if(e.collapsed){if(!m(e)){const o=t?1:-1,r=Wf(o,i,e),s=r.getNode(!t);if(I(s)){if(_f(s))return u(o,s,!!t&&!r.isAtEnd(),!1);if(Cs(s)&&Pr(s.nextSibling)){const e=n.createRng();return e.setStart(s,0),e.setEnd(s,0),e}}const a=r.getNode(t);if(I(a)){if(_f(a))return u(o,a,!t&&!r.isAtEnd(),!1);if(Cs(a)&&Pr(a.previousSibling)){const e=n.createRng();return e.setStart(a,1),e.setEnd(a,1),e}}}return null}let o=e.startContainer,r=e.startOffset;const s=e.endOffset;if(Sr(o)&&0===r&&oG(o.parentNode)&&(o=o.parentNode,r=n.nodeIndex(o),o=o.parentNode),!hr(o))return null;if(s===r+1&&o===e.endContainer){const e=o.childNodes[r];if(c(e))return y(e)}return null},_=()=>{a&&a.removeAttribute(s),co(yi.fromDom(e.getBody()),"#"+r).each(Po),a=null},w=()=>{o.destroy(),a=null},C=()=>{o.hide()};return eR(e)||p(),{showCaret:u,showBlockCaretContainer:h,hideFakeCaret:C,destroy:w}},aG=(e,t)=>{let n=t;for(let t=e.previousSibling;Sr(t);t=t.previousSibling)n+=t.data.length;return n},lG=(e,t,n,i,o)=>{if(Sr(n)&&(i<0||i>n.data.length))return[];const r=o&&Sr(n)?[aG(n,i)]:[i];let s=n;for(;s!==t&&s.parentNode;)r.push(e.nodeIndex(s,o)),s=s.parentNode;return s===t?r.reverse():[]},cG=(e,t,n,i,o,r,s=!1)=>({start:lG(e,t,n,i,s),end:lG(e,t,o,r,s)}),dG=(e,t)=>{const n=t.slice(),i=n.pop();if(O(i)){return ce(n,(e,t)=>e.bind(e=>K.from(e.childNodes[t])),K.some(e)).bind(e=>Sr(e)&&(i<0||i>e.data.length)?K.none():K.some({node:e,offset:i}))}return K.none()},uG=(e,t)=>dG(e,t.start).bind(({node:n,offset:i})=>dG(e,t.end).map(({node:e,offset:t})=>{const o=document.createRange();return o.setStart(n,i),o.setEnd(e,t),o})),hG=(e,t,n,i=!1)=>cG(e,t,n.startContainer,n.startOffset,n.endContainer,n.endOffset,i),pG=(e,t,n)=>{if(t&&e.isEmpty(t)&&!n(t)){const i=t.parentNode;e.remove(t,Sr(t.firstChild)&&Xs(t.firstChild.data)),pG(e,i,n)}},fG=(e,t,n,i=!0)=>{const o=t.startContainer.parentNode,r=t.endContainer.parentNode;t.deleteContents(),i&&!n(t.startContainer)&&(Sr(t.startContainer)&&0===t.startContainer.data.length&&e.remove(t.startContainer),Sr(t.endContainer)&&0===t.endContainer.data.length&&e.remove(t.endContainer),pG(e,o,n),o!==r&&pG(e,r,n))},mG=(e,t)=>K.from(e.dom.getParent(t.startContainer,e.dom.isBlock)),gG=(e,t,n)=>{const i=e.dynamicPatternsLookup({text:n,block:t});
35return{...e,blockPatterns:qu(i).concat(e.blockPatterns),inlinePatterns:Uu(i).concat(e.inlinePatterns)}},vG=(e,t,n,i)=>{const o=e.createRng();return o.setStart(t,0),o.setEnd(n,i),o.toString()},yG=e=>/^\s[^\s]/.test(e),bG=(e,t,n)=>{i$(t,0,t).each(i=>{const o=i.container;r$(o,n.start.length,t).each(n=>{const i=e.createRng();i.setStart(o,0),i.setEnd(n.container,n.offset),fG(e,i,e=>e===t)});const r=yi.fromDom(o),s=Yr(r);yG(s)&&Kr(r,s.slice(1))})},_G=(e,t)=>{const n=e.dom,i=t.pattern,o=uG(n.getRoot(),t.range).getOrDie("Unable to resolve path range"),r=(e,t)=>{const n=t.get(e);return T(n)&&we(n).exists(e=>Fe(e,"block"))};return mG(e,o).each(t=>{"block-format"===i.type?r(i.format,e.formatter)&&e.undoManager.transact(()=>{bG(e.dom,t,i),e.formatter.apply(i.format)}):"block-command"===i.type&&e.undoManager.transact(()=>{bG(e.dom,t,i),e.execCommand(i.cmd,!1,i.value)})}),!0},wG=e=>be(e,(e,t)=>t.start.length-e.start.length),CG=(e,t)=>{const n=wG(e),i=t.replace(jr," ");return ue(n,e=>0===t.indexOf(e.start)||0===i.indexOf(e.start))},kG=(e,t,n,i)=>{var o;const r=e.dom,s=dh(e);if(!r.is(t,s))return[];const a=null!==(o=t.textContent)&&void 0!==o?o:"";return CG(n.blockPatterns,a).map(e=>gn.trim(a).length===e.start.length?[]:[{pattern:e,range:cG(r,r.getRoot(),t,0,t,0,i)}]).getOr([])},xG=(e,t)=>
vendor: 4,626 bytes, lines 35-36
35{if(0===t.length)return;const n=e.selection.getBookmark();oe(t,t=>_G(e,t)),e.selection.moveToBookmark(n)},SG=(e,t)=>e.create("span",{"data-mce-type":"bookmark",id:t}),EG=(e,t)=>{const n=e.createRng();return n.setStartAfter(t.start),n.setEndBefore(t.end),n},DG=(e,t,n)=>{const i=uG(e.getRoot(),n).getOrDie("Unable to resolve path range"),o=i.startContainer,r=i.endContainer,s=0===i.endOffset?r:r.splitText(i.endOffset),a=0===i.startOffset?o:o.splitText(i.startOffset),l=a.parentNode;return{prefix:t,end:s.parentNode.insertBefore(SG(e,t+"-end"),s),start:l.insertBefore(SG(e,t+"-start"),a)}},TG=(e,t,n)=>{pG(e,e.get(t.prefix+"-end"),n),pG(e,e.get(t.prefix+"-start"),n)},AG=e=>0===e.start.length,MG=e=>(t,n)=>{const i=t.data.substring(0,n),o=i.lastIndexOf(e.charAt(e.length-1)),r=i.lastIndexOf(e);return-1!==r?r+e.length:-1!==o?o+1:-1},RG=(e,t,n,i)=>{const o=t.start;return s$(e,i.container,i.offset,MG(o),n).bind(i=>{var r,s;const a=null!==(s=null===(r=n.textContent)||void 0===r?void 0:r.indexOf(o))&&void 0!==s?s:-1;if(-1!==a&&i.offset>=a+o.length){const t=e.createRng();return t.setStart(i.container,i.offset-o.length),t.setEnd(i.container,i.offset),K.some(t)}{const r=i.offset-o.length;return o$(i.container,r,n).map(t=>{const n=e.createRng();return n.setStart(t.container,t.offset),n.setEnd(i.container,i.offset),n}).filter(e=>e.toString()===o).orThunk(()=>RG(e,t,n,ZH(i.container,0)))}})},NG=(e,t,n,i,o,r=!1)=>{if(0===t.start.length&&!r){const t=e.createRng();return t.setStart(n,i),t.setEnd(n,i),K.some(t)}return n$(n,i,o).bind(n=>RG(e,t,o,n).bind(e=>{var t;if(r){if(e.endContainer===n.container&&e.endOffset===n.offset)return K.none();if(0===n.offset&&(null===(t=e.endContainer.textContent)||void 0===t?void 0:t.length)===e.endOffset)return K.none()}return K.some(e)}))},IG=(e,t,n,i)=>{const o=e.dom,r=o.getRoot(),s=n.pattern,a=n.position.container,l=n.position.offset;return o$(a,l-n.pattern.end.length,t).bind(c=>{const d=cG(o,r,c.container,c.offset,a,l,i);if(AG(s))return K.some({matches:[{pattern:s,startRng:d,endRng:d}],position:c});{const a=PG(e,n.remainingPatterns,c.container,c.offset,t,i),l=a.getOr({matches:[],position:c}),u=l.position;return NG(o,s,u.container,u.offset,t,a.isNone()).map(e=>{const t=hG(o,r,e,i);return{matches:l.matches.concat([{pattern:s,startRng:t,endRng:d}]),position:ZH(e.startContainer,e.startOffset)}})}})},PG=(e,t,n,i,o,r)=>{const s=e.dom;return n$(n,i,s.getRoot()).bind(a=>{const l=vG(s,o,n,i);for(let s=0;s<t.length;s++){const c=t[s];if(!mt(l,c.end))continue;const d=t.slice();d.splice(s,1);const u=IG(e,o,{pattern:c,remainingPatterns:d,position:a},r);if(u.isNone()&&i>0)return PG(e,t,n,i-1,o,r);if(u.isSome())return u}return K.none()})},OG=(e,t,n)=>{e.selection.setRng(n),"inline-format"===t.type?oe(t.format,t=>{e.formatter.apply(t)}):e.execCommand(t.cmd,!1,t.value)},LG=(e,t,n,i)=>{const o=EG(e.dom,n);fG(e.dom,o,i),OG(e,t,o)},BG=(e,t,n,i,o)=>{const r=e.dom,s=EG(r,i),a=EG(r,n);fG(r,a,o),fG(r,s,o);const l={prefix:n.prefix,start:n.end,end:i.start},c=EG(r,l);OG(e,t,c)},FG=(e,t)=>{const n=id("mce_textpattern"),i=le(t,(t,i)=>{const o=DG(e,n+`_end${t.length}`,i.endRng);return t.concat([{...i,endMarker:o}])},[]);return le(i,(t,o)=>{const r=i.length-t.length-1,s=AG(o.pattern)?o.endMarker:DG(e,n+`_start${r}`,o.startRng);return t.concat([{...o,startMarker:s}])},[])},HG=e=>be(e,(e,t)=>t.end.length-e.end.length),$G=(e,t)=>{const n=me(e,e=>ne(t,t=>e.pattern.start===t.pattern.start&&e.pattern.end===t.pattern.end));return e.length===t.length?n?e:t:e.length>t.length?e:t},zG=(e,t,n,i,o,r)=>{const s=PG(e,o.inlinePatterns,n,i,t,r).fold(()=>[],e=>e.matches),a=PG(e,HG(o.inlinePatterns),n,i,t,r).fold(()=>[],e=>e.matches);return $G(s,a)
36},jG=(e,t)=>{if(0===t.length)return;const n=e.dom,i=e.selection.getBookmark(),o=FG(n,t);oe(o,t=>{const i=n.getParent(t.startMarker.start,n.isBlock),o=e=>e===i;AG(t.pattern)?LG(e,t.pattern,t.endMarker,o):BG(e,t.pattern,t.startMarker,t.endMarker,o),TG(n,t.endMarker,o),TG(n,t.startMarker,o)}),e.selection.moveToBookmark(i)},qG=(e,t)=>{const n=e.selection.getRng();return mG(e,n).map(i=>{var o;const r=Math.max(0,n.startOffset),s=gG(t,i,null!==(o=i.textContent)&&void 0!==o?o:""),a=zG(e,i,n.startContainer,r,s,!0),l=kG(e,i,s,!0);return(l.length>0||a.length>0)&&(e.undoManager.add(),e.undoManager.extra(()=>{e.execCommand("mceInsertNewLine")},()=>{ys(e),jG(e,a),xG(e,l);const t=e.selection.getRng(),n=n$(t.startContainer,t.startOffset,e.dom.getRoot());e.execCommand("mceInsertNewLine"),n.each(t=>{const n=t.container;n.data.charAt(t.offset-1)===zr&&(n.deleteData(t.offset-1,1),pG(e.dom,n.parentNode,t=>t===e.dom.getRoot()))})}),!0)}).getOr(!1)},UG=(e,t)=>
36{const n=e.selection.getRng();mG(e,n).map(i=>{const o=Math.max(0,n.startOffset-1),r=vG(e.dom,i,n.startContainer,o),s=gG(t,i,r),a=zG(e,i,n.startContainer,o,s,!1);a.length>0&&e.undoManager.transact(()=>{jG(e,a)})})},WG=(e,t,n)=>{for(let i=0;i<e.length;i++)if(n(e[i],t))return!0;return!1},VG=(e,t)=>WG(e,t,(e,t)=>e===t.keyCode&&!Yv.modifierPressed(t)),YG=(e,t)=>WG(e,t,(e,t)=>e.charCodeAt(0)===t.charCode),GG=e=>{const t=[",",".",";",":","!","?"],n=[32],i=()=>Wu(Ip(e),Pp(e)),o=()=>jp(e);e.on("keydown",t=>{if(13===t.keyCode&&!Yv.modifierPressed(t)&&e.selection.isCollapsed()){const n=i();(n.inlinePatterns.length>0||n.blockPatterns.length>0||o())&&qG(e,n)&&t.preventDefault()}},!0);const r=()=>{if(e.selection.isCollapsed()){const t=i();(t.inlinePatterns.length>0||o())&&UG(e,t)}};e.on("keyup",e=>{VG(n,e)&&r()}),e.on("keypress",n=>{YG(t,n)&&Wb.setEditorTimeout(e,r)})},KG=e=>{GG(e)},XG=e=>{const t=gn.each,n=Yv.BACKSPACE,i=Yv.DELETE,o=e.dom,r=e.selection,s=e.parser,a=an.browser,l=a.isFirefox(),c=a.isChromium()||a.isSafari(),d=an.deviceType.isiPhone()||an.deviceType.isiPad(),u=an.os.isMacOS()||an.os.isiOS(),h=(t,n)=>{try{e.getDoc().execCommand(t,!1,String(n))}catch(e){}},p=e=>e.isDefaultPrevented(),f=()=>{const t=e=>{const t=o.create("body"),n=e.cloneContents();return t.appendChild(n),r.serializer.serialize(t,{format:"html"})},s=n=>{const i=t(n),r=o.createRng();r.selectNode(e.getBody());return i===t(r)};e.on("keydown",t=>{const r=t.keyCode;if(!p(t)&&(r===i||r===n)&&e.selection.isEditable()){const n=e.selection.isCollapsed(),i=e.getBody();if(n&&!ua(yi.fromDom(i)))return;if(!n&&!s(e.selection.getRng()))return;t.preventDefault(),e.setContent(""),i.firstChild&&o.isBlock(i.firstChild)?e.selection.setCursorLocation(i.firstChild,0):e.selection.setCursorLocation(i,0),e.nodeChanged()}})},m=()=>{e.shortcuts.add("meta+a",null,"SelectAll")},g=()=>{e.inline||o.bind(e.getDoc(),"mousedown mouseup",t=>{let n;if(t.target===e.getDoc().documentElement)if(n=r.getRng(),e.getBody().focus(),"mousedown"===t.type){if(ks(n.startContainer))return;r.placeCaretAt(t.clientX,t.clientY)}else r.setRng(n)})},v=()=>{e.on("keydown",t=>{if(!p(t)&&t.keyCode===n){if(!e.getBody().getElementsByTagName("hr").length)return;if(r.isCollapsed()&&0===r.getRng().startOffset){const e=r.getNode(),n=e.previousSibling;if("HR"===e.nodeName)return o.remove(e),void t.preventDefault();n&&n.nodeName&&"hr"===n.nodeName.toLowerCase()&&(o.remove(n),t.preventDefault())}}})},y=()=>{Range.prototype.getClientRects||e.on("mousedown",t=>{if(!p(t)&&"HTML"===t.target.nodeName){const t=e.getBody();t.blur(),Wb.setEditorTimeout(e,()=>{t.focus()})}})},b=()=>{const t=pp(e);e.on("click",n=>{const i=n.target;/^(IMG|HR)$/.test(i.nodeName)&&o.isEditable(i)&&(n.preventDefault(),e.selection.select(i),e.nodeChanged()),"A"===i.nodeName&&o.hasClass(i,t)&&0===i.childNodes.length&&o.isEditable(i.parentNode)&&(n.preventDefault(),r.select(i))})},_=()=>{const n=()=>{const n=o.getAttribs(r.getStart().cloneNode(!1));return()=>{const i=r.getStart();i!==e.getBody()&&(o.setAttrib(i,"style",null),t(n,e=>{i.setAttributeNode(e.cloneNode(!0))}))}},i=()=>!r.isCollapsed()&&o.getParent(r.getStart(),o.isBlock)!==o.getParent(r.getEnd(),o.isBlock);e.on("keypress",t=>{let o;return!(!(p(t)||8!==t.keyCode&&46!==t.keyCode)&&i())||(o=n(),e.getDoc().execCommand("delete",!1),o(),t.preventDefault(),!1)}),o.bind(e.getDoc(),"cut",t=>{if(!p(t)&&i()){const t=n();Wb.setEditorTimeout(e,()=>{t()})}})},w=()=>{e.on("keydown",e=>{if(!p(e)&&e.keyCode===n&&r.isCollapsed()&&0===r.getRng().startOffset){const t=r.getNode().previousSibling;if(t&&t.nodeName&&"table"===t.nodeName.toLowerCase())return e.preventDefault(),!1}return!0})},C=()=>{e.on("keydown",t=>{if(p(t)||t.keyCode!==Yv.BACKSPACE)return;let n=r.getRng();const i=n.startContainer,s=n.startOffset,a=o.getRoot();let l=i;if(n.collapsed&&0===s){for(;l.parentNode&&l.parentNode.firstChild===l&&l.parentNode!==a;)l=l.parentNode;"BLOCKQUOTE"===l.nodeName&&(e.formatter.toggle("blockquote",void 0,l),n=o.createRng(),n.setStart(i,0),n.setEnd(i,0),r.setRng(n))}})},k=()=>{const t=()=>{h("StyleWithCSS",!1),h("enableInlineTableEditing",!1),Bh(e)||h("enableObjectResizing",!1)};rp(e)||e.on("BeforeExecCommand mousedown",t)},x=()=>{const n=()=>{t(o.select("a:not([data-mce-block])"),e=>{var t;let n=e.parentNode;const i=o.getRoot();if((null==n?void 0:n.lastChild)===e){for(;n&&!o.isBlock(n);){if((null===(t=n.parentNode)||void 0===t?void 0:t.lastChild)!==n||n===i)return;n=n.parentNode}o.add(n,"br",{"data-mce-bogus":1})}})};e.on("SetContent ExecCommand",e=>{"setcontent"!==e.type&&"mceInsertLink"!==e.command||n()})},E=()=>{e.on("init",()=>{h("DefaultParagraphSeparator",dh(e))})},D=e=>{const t=e.getBody(),n=e.selection.getRng();return n.startContainer===n.endContainer&&n.startContainer===t&&0===n.startOffset&&n.endOffset===t.childNodes.length},T=()=>{e.on("keyup focusin mouseup",t=>{Yv.modifierPressed(t)||D(e)||r.normalize()},!0)},A=()=>{e.contentStyles.push("img:-moz-broken {-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}")},M=()=>
36{e.inline||e.on("keydown",()=>{document.activeElement===document.body&&e.getWin().focus()})},R=()=>{e.inline||(e.contentStyles.push("body {min-height: 150px}"),e.on("click",t=>{let n;"HTML"===t.target.nodeName&&(n=e.selection.getRng(),e.getBody().focus(),e.selection.setRng(n),e.selection.normalize(),e.nodeChanged())}))},N=()=>{u&&e.on("keydown",t=>{if(Yv.metaKeyPressed(t)&&!t.shiftKey&&(37===t.keyCode||39===t.keyCode)){t.preventDefault();e.selection.getSel().modify("move",37===t.keyCode?"backward":"forward","lineboundary")}})},I=()=>{e.on("click",e=>{let t=e.target;do{if("A"===t.tagName)return void e.preventDefault()}while(t=t.parentNode)}),e.contentStyles.push(".mce-content-body {-webkit-touch-callout: none}")},P=()=>{e.on("init",()=>{e.dom.bind(e.getBody(),"submit",e=>{e.preventDefault()})})},O=()=>{s.addNodeFilter("br",e=>{let t=e.length;for(;t--;)"Apple-interchange-newline"===e[t].attr("class")&&e[t].remove()})},L=B,F=()=>{if(!l||e.removed)return!1;const t=e.selection.getSel();return!t||!t.rangeCount||0===t.rangeCount},H=()=>{c&&(g(),b(),P(),m(),d&&(M(),R(),I())),l&&(y(),k(),A(),N())},$=()=>{e.on("drop",t=>{var n;const i=null===(n=t.dataTransfer)||void 0===n?void 0:n.getData("text/html");S(i)&&/^<img[^>]*>$/.test(i)&&e.dispatch("dragend",new window.DragEvent("dragend",t))})},z=()=>{C(),f(),an.windowsPhone||T(),c&&(g(),b(),E(),P(),w(),O(),d?(M(),R(),I()):m()),l&&(v(),y(),_(),k(),x(),A(),N(),w(),$())};return eR(e)?H():z(),{refreshContentEditable:L,isHidden:F}},QG=vc.DOM,ZG=(e,t)=>{const n=yi.fromDom(e.getBody()),i=Ki(Gi(n)),o=yi.fromTag("style");Yn(o,"type","text/css"),Ao(o,yi.fromText(t)),Ao(i,o),e.on("remove",()=>{Po(o)})},JG=e=>e.inline?e.getElement().nodeName.toLowerCase():void 0,eK=e=>Pe(e,e=>!1===R(e)),tK=e=>{const t=e.options.get,n=e.editorUpload.blobCache;return eK({allow_conditional_comments:t("allow_conditional_comments"),allow_html_data_urls:t("allow_html_data_urls"),allow_svg_data_urls:t("allow_svg_data_urls"),allow_html_in_named_anchor:t("allow_html_in_named_anchor"),allow_script_urls:t("allow_script_urls"),allow_unsafe_link_target:t("allow_unsafe_link_target"),convert_unsafe_embeds:t("convert_unsafe_embeds"),convert_fonts_to_spans:t("convert_fonts_to_spans"),fix_list_elements:t("fix_list_elements"),font_size_legacy_values:t("font_size_legacy_values"),forced_root_block:t("forced_root_block"),forced_root_block_attrs:t("forced_root_block_attrs"),preserve_cdata:t("preserve_cdata"),inline_styles:t("inline_styles"),root_name:JG(e),sandbox_iframes:t("sandbox_iframes"),sanitize:t("xss_sanitization"),validate:!0,blob_cache:n,document:e.getDoc()})},nK=e=>{const t=e.options.get;return eK({custom_elements:t("custom_elements"),extended_valid_elements:t("extended_valid_elements"),invalid_elements:t("invalid_elements"),invalid_styles:t("invalid_styles"),schema:t("schema"),valid_children:t("valid_children"),valid_classes:t("valid_classes"),valid_elements:t("valid_elements"),valid_styles:t("valid_styles"),verify_html:t("verify_html"),padd_empty_block_inline_children:t("format_empty_lines")})},iK=e=>{const t=e.options.get;return{...tK(e),...nK(e),...eK({remove_trailing_brs:t("remove_trailing_brs"),pad_empty_with_br:t("pad_empty_with_br"),url_converter:t("url_converter"),url_converter_scope:t("url_c
36onverter_scope"),element_format:t("element_format"),entities:t("entities"),entity_encoding:t("entity_encoding"),indent:t("indent"),indent_after:t("indent_after"),indent_before:t("indent_before")})}},oK=e=>{const t=SA(tK(e),e.schema);return t.addAttributeFilter("src,href,style,tabindex",(t,n)=>{const i=e.dom,o="data-mce-"+n;let r=t.length;for(;r--;){const s=t[r];let a=s.attr(n);if(a&&!s.attr(o)){if(0===a.indexOf("data:")||0===a.indexOf("blob:"))continue;"style"===n?(a=i.serializeStyle(i.parseStyle(a),s.name),a.length||(a=null),s.attr(o,a),s.attr(n,a)):"tabindex"===n?(s.attr(o,a),s.attr(n,null)):s.attr(o,e.convertURL(a,n,s.name))}}}),t.addNodeFilter("script",e=>{let t=e.length;for(;t--;){const n=e[t],i=n.attr("type")||"no/type";0!==i.indexOf("mce-")&&n.attr("type","mce-"+i)}}),Fp(e)&&t.addNodeFilter("#cdata",t=>{var n;let i=t.length;for(;i--;){const o=t[i];o.type=8,o.name="#comment",o.value="[CDATA["+e.dom.encode(null!==(n=o.value)&&void 0!==n?n:"")+"]]"}}),t.addNodeFilter("p,h1,h2,h3,h4,h5,h6,div",t=>{let n=t.length;const i=e.schema.getNonEmptyElements();for(;n--;){const e=t[n];e.isEmpty(i)&&0===e.getAll("br").length&&e.append(new V_("br",1))}}),t},rK=e=>{const t=yp(e);t&&Wb.setEditorTimeout(e,()=>{let n;n=!0===t?e:e.editorManager.get(t),n&&!n.destroyed&&(n.focus(),n.selection.scrollIntoView())},100)},sK=e=>{const t=e.dom.getRoot();e.inline||pg(e)&&e.selection.getStart(!0)!==t||km(t).each(t=>{const n=t.getNode(),i=Cr(n)?km(n).getOr(t):t;e.selection.setRng(i.toRange())})},aK=e=>{e.bindPendingEventDelegates(),e.initialized=!0,Rv(e),e.focus(!0),sK(e),e.nodeChanged({initial:!0});const t=gp(e);P(t)&&t.call(e,e),rK(e)},lK=e=>e.inline?e.ui.styleSheetLoader:e.dom.styleSheetLoader,cK=(e,t,n)=>{const{pass:i,fail:o}=se(t,e=>tinymce.Resource.has(fI(e))),r=i.map(t=>{const n=tinymce.Resource.get(fI(t));return S(n)?Promise.resolve(lK(e).loadRawCss(t,n)):Promise.resolve()}),s=[...r,lK(e).loadAll(o)];return e.inline?s:s.concat([e.ui.styleSheetLoader.loadAll(n)])},dK=e=>{const t=lK(e),n=Ph(e),i=e.contentCSS,o=()=>{t.unloadAll(i),e.inline||e.ui.styleSheetLoader.unloadAll(n)},r=()=>{e.removed?o():e.on("remove",o)};if(e.contentStyles.length>0){let t="";gn.each(e.contentStyles,e=>{t+=e+"\r\n"}),e.dom.addStyle(t)}const s=Promise.all(cK(e,i,n)).then(r).catch(r),a=Ih(e);return a&&ZG(e,a),s},uK=e=>{const t=e.getDoc(),n=e.getBody();Av(e),bp(e)||(t.body.spellcheck=!1,QG.setAttrib(n,"spellcheck","false")),e.quirks=XG(e),Mv(e);const i=Oh(e);void 0!==i&&(n.dir=i);const o=_p(e);o&&e.on("BeforeSetContent",e=>{gn.each(o,t=>{e.content=e.content.replace(t,e=>"<!--mce:protected "+escape(e)+"-->")})}),e.on("SetContent",()=>{e.addVisual(e.getBody())}),e.on("compositionstart compositionend",t=>{e.composing="compositionstart"===t.type})},hK=e=>{eR(e)||e.load({initial:!0,format:"html"}),e.startContent=e.getContent({format:"raw"})},pK=e=>{!0!==e.removed&&(hK(e),aK(e))},fK=e=>{let t=!1;const n=setTimeout(()=>{t||e.setProgressState(!0)},500);return()=>{clearTimeout(n),t=!0,e.setProgressState(!1)}},mK=e=>{const t=e.getElement();let n=e.getDoc();e.inline&&(QG.addClass(t,"mce-content-body"),e.contentDocument=n=document,e.contentWindow=window,e.bodyElement=t,e.contentAreaContainer=t);const i=e.getBody();i.disabled=!0,e.readonly=rp(e),e._editableRoot=sp(e),!e.readonly&&e.hasEditableRoot()&&(e.inline&&"static"===QG.getStyle(i,"position",!0)&&(i.style.position="relative"),i.contentEditable="true"),i.disabled=!1,e.editorUpload=II(e),e.schema=Il(nK(e)),e.dom=vc(n,{keep_values:!0,url_converter:e.convertURL,url_converter_scope:e,update_styles:!0,root_element:e.inline?e.getBody():null,collect:e.inline,schema:e.schema,contentCssCors:Eh(e),referrerPolicy:Dh(e),onSetAttrib:t=>{e.dispatch("SetAttrib",t)},force_hex_color:Xp(e)}),e.parser=oK(e),e.serializer=sN(iK(e),e),e.selection=YR(e.dom,e.getWin(),e.serializer,e),e.annotator=bv(e),e.formatter=GI(e),e.undoManager=ZI(e),e._nodeChangeDispatcher=new IU(e),e._selectionOverrides=sG(e),lF(e),zV(e),wF(e),eR(e)||(ZV(e),KG(e));const o=NU(e);iF(e,o),gF(e),sP(e),FV(e);const r=nR(e);uK(e),r.fold(()=>{const t=fK(e);dK(e).then(()=>{pK(e),t()})},t=>{e.setProgressState(!0),dK(e).then(()=>{t().then(()=>{e.setProgressState(!1),pK(e),MR(e)},t=>{e.notificationManager.open({type:"error",text:String(t)}),pK(e),MR(e)})})})},gK=G,vK=(e,t,n)=>Wo(e,t,gK,n),yK=vc.DOM,bK=(e,t,n,i)=>{const o=yi.fromTag("iframe");return i.each(e=>Yn(o,"tabindex",e)),Gn(o,n),Gn(o,{id:e+"_ifr",frameBorder:"0",allowTransparency:"true",title:t}),ci(o,"tox-edit-area__iframe"),o},_K=e=>
vendor: 5,777 bytes, line 36
36{let t=oh(e)+"<html><head>";rh(e)!==e.documentBaseUrl&&(t+='<base href="'+e.documentBaseURI.getURI()+'" />'),t+='<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />';const n=sh(e),i=ah(e),o=e.translate(fp(e));return lh(e)&&(t+='<meta http-equiv="Content-Security-Policy" content="'+lh(e)+'" />'),t+=`</head><body id="${n}" class="mce-content-body ${i}" data-id="${e.id}" aria-label="${o}"><br></body></html>`,t},wK=(e,t)=>{const n=e.translate("Rich Text Area"),i=Xn(yi.fromDom(e.getElement()),"tabindex").bind(kt),o=bK(e.id,n,ih(e),i).dom;o.onload=()=>{o.onload=null,e.dispatch("load")},e.contentAreaContainer=t.iframeContainer,e.iframeElement=o,e.iframeHTML=_K(e),yK.add(t.iframeContainer,o)},CK=e=>{const t=e.iframeElement,n=()=>{e.contentDocument=t.contentDocument,mK(e)};if(zp(e)||an.browser.isFirefox()){const t=e.getDoc();t.open(),t.write(e.iframeHTML),t.close(),n()}else{const i=vK(yi.fromDom(t),"load",()=>{i.unbind(),n()});t.srcdoc=e.iframeHTML}},kK=(e,t)=>{wK(e,t),t.editorContainer&&(t.editorContainer.style.display=e.orgDisplay,e.hidden=yK.isHidden(t.editorContainer)),e.getElement().style.display="none",yK.setAttrib(e.id,"aria-hidden","true"),e.getElement().style.visibility=e.orgVisibility,CK(e)},xK=vc.DOM,SK=(e,t,n)=>{const i=QN.get(n),o=QN.urls[n]||e.documentBaseUrl.replace(/\/$/,"");if(n=gn.trim(n),i&&-1===gn.inArray(t,n)){if(e.plugins[n])return;try{const r=i(e,o)||{};e.plugins[n]=r,P(r.init)&&(r.init(e,o),t.push(n))}catch(t){uI(e,n,t)}}},EK=e=>e.replace(/^\-/,""),DK=e=>{const t=[];oe(lp(e),n=>{SK(e,t,EK(n))})},TK=e=>{const t=gn.trim(_h(e)),n=e.ui.registry.getAll().icons,i={...ON.get("default").icons,...ON.get(t).icons};Te(i,(t,i)=>{Fe(n,i)||e.ui.registry.addIcon(i,t)})},AK=e=>{const t=jh(e);if(S(t)){const n=ZN.get(t);e.theme=n(e,ZN.urls[t])||{},P(e.theme.init)&&e.theme.init(e,ZN.urls[t]||e.documentBaseUrl.replace(/\/$/,""))}else e.theme={}},MK=e=>{const t=Uh(e),n=LN.get(t);e.model=n(e,LN.urls[t])},RK=e=>{const t=e.theme.renderUI;return t?t():OK(e)},NK=e=>{const t=e.getElement(),n=jh(e)(e,t);return n.editorContainer.nodeType&&(n.editorContainer.id=n.editorContainer.id||e.id+"_parent"),n.iframeContainer&&n.iframeContainer.nodeType&&(n.iframeContainer.id=n.iframeContainer.id||e.id+"_iframecontainer"),n.height=n.iframeHeight?n.iframeHeight:t.offsetHeight,n},IK=(e,t)=>({editorContainer:e,iframeContainer:t,api:{}}),PK=e=>{const t=xK.create("div");return xK.insertAfter(t,e),IK(t,t)},OK=e=>{const t=e.getElement();return e.inline?IK(null):PK(t)},LK=e=>{const t=e.getElement();return e.orgDisplay=t.style.display,S(jh(e))?RK(e):P(jh(e))?NK(e):OK(e)},BK=(e,t)=>{const n={show:K.from(t.show).getOr(B),hide:K.from(t.hide).getOr(B),isEnabled:K.from(t.isEnabled).getOr(G),setEnabled:n=>{e.mode.isReadOnly()||K.from(t.setEnabled).each(e=>e(n))}};e.ui={...e.ui,...n}},FK=async e=>{e.dispatch("ScriptsLoaded"),TK(e),AK(e),MK(e),DK(e);const t=await LK(e);BK(e,K.from(t.api).getOr({})),e.editorContainer=t.editorContainer,bI(e),e.inline?mK(e):kK(e,{editorContainer:t.editorContainer,iframeContainer:t.iframeContainer})},HK=vc.DOM,$K=e=>"-"===e.charAt(0),zK=(e,t)=>{const n=Th(t),i=Ah(t);if(!Pc.hasCode(n)&&"en"!==n){const o=_t(i)?i:`${t.editorManager.baseURL}/langs/${n}.js`;e.add(o).catch(()=>{lI(t,o,n)})}},jK=(e,t)=>{const n=jh(e);if(S(n)&&!$K(n)&&!Fe(ZN.urls,n)){const i=qh(e),o=i?e.documentBaseURI.toAbsolute(i):`themes/${n}/theme${t}.js`;ZN.load(n,o).catch(()=>{cI(e,o,n)})}},qK=(e,t)=>{const n=Uh(e);if("plugin"!==n&&!Fe(LN.urls,n)){const i=Wh(e),o=S(i)?e.documentBaseURI.toAbsolute(i):`models/${n}/model${t}.js`;LN.load(n,o).catch(()=>{dI(e,o,n)})}},UK=e=>K.from(wh(e)).filter(_t).map(e=>({url:e,name:K.none()})),WK=(e,t,n)=>K.from(t).filter(e=>_t(e)&&!ON.has(e)).map(t=>({url:`${e.editorManager.baseURL}/icons/${t}/icons${n}.js`,name:K.some(t)})),VK=(e,t,n)=>{const i=WK(t,"default",n),o=UK(t).orThunk(()=>WK(t,_h(t),""));oe(bn([i,o]),n=>{e.add(n.url).catch(()=>{aI(t,n.url,n.name.getOrUndefined())})})},YK=(e,t)=>{const n=(t,n)=>{QN.load(t,n).catch(()=>{sI(e,n,t)})};Te(cp(e),(t,i)=>{n(i,t),e.options.set("plugins",lp(e).concat(i))}),oe(lp(e),e=>{!(e=gn.trim(e))||QN.urls[e]||$K(e)||n(e,`plugins/${e}/plugin${t}.js`)})},GK=e=>{const t=jh(e);return!S(t)||I(ZN.get(t))},KK=e=>{const t=Uh(e);return I(LN.get(t))},XK=(e,t)=>{const n=kc.ScriptLoader,i=()=>{!e.removed&&GK(e)&&KK(e)&&FK(e)};jK(e,t),qK(e,t),zK(n,e),VK(n,e,t),YK(e,t),n.loadQueue().then(i,i)},QK=(e,t)=>ja.forElement(e,{contentCssCors:ap(t),referrerPolicy:Dh(t)}),ZK=e=>{const t=e.id;Pc.setCode(Th(e));const n=()=>{HK.unbind(window,"ready",n),e.render()};if(!rc.Event.domLoaded)return void HK.bind(window,"ready",n);if(!e.getElement())return;const i=yi.fromDom(e.getElement()),o=ei(i);e.on("remove",()=>{re(i.dom.attributes,e=>Zn(i,e.name)),Gn(i,o)}),e.ui.styleSheetLoader=QK(i,e),Zh(e)?e.inline=!0:(e.orgVisibility=e.getElement().style.visibility,e.getElement().style.visibility="hidden");const r=e.getElement().form||HK.getParent(t,"form");r&&(e.formElement=r,Jh(e)&&!xr(e.getElement())&&(HK.insertAfter(HK.create("input",{type:"hidden",name:t}),t),e.hasHiddenInput=!0),e.formEventDelegate=t=>{e.dispatch(t.type,t)},HK.bind(r,"submit reset",e.formEventDelegate),e.on("reset",()=>{e.resetContent()}),!ep(e)||r.submit.nodeType||r.submit.length||r._mceOldSubmit||(r._mceOldSubmit=r.submit,r.submit=()=>(e.editorManager.triggerSave(),e.setDirty(!1),r._mceOldSubmit(r)))),e.windowManager=eI(e),e.notificationManager=XN(e),Wp(e)&&e.on("GetContent",e=>{e.save&&(e.content=HK.encode(e.content))}),tp(e)&&e.on("submit",()=>{e.initialized&&e.save()}),np(e)&&(e._beforeUnload=()=>{!e.initialized||e.destroyed||e.isHidden()||e.save({format:"raw",no_events:!0,set_dirty:!1})},e.editorManager.on("BeforeUnload",e._beforeUnload)),e.editorManager.add(e),XK(e,e.suffix)},JK=(e,t)=>
36{e._editableRoot!==t&&(e._editableRoot=t,e.readonly||(e.getBody().contentEditable=String(e.hasEditableRoot()),e.nodeChanged()),Vv(e,t))},eX=e=>e._editableRoot,tX=(e,t)=>({sections:$(e),options:$(t)}),nX=Jt().deviceType,iX=nX.isPhone(),oX=nX.isTablet(),rX=e=>{if(N(e))return[];{const t=T(e)?e:e.split(/[ ,]/),n=ie(t,vt);return ae(n,_t)}},sX=(e,t)=>{const n=Ie(t,(t,n)=>te(e,n));return tX(n.t,n.f)},aX=(e,t,n={})=>{const i=e.sections(),o=Be(i,t).getOr({});return gn.extend({},n,o)},lX=(e,t)=>Fe(e.sections(),t),cX=(e,t)=>lX(e,t)?e.sections()[t]:{},dX=(e,t)=>({...{table_grid:!1,object_resizing:!1,resize:!1,toolbar_mode:Be(e,"toolbar_mode").getOr("scrolling"),toolbar_sticky:!1},...t?{menubar:!1}:{}}),uX=(e,t)=>{var n;const i=null!==(n=t.external_plugins)&&void 0!==n?n:{};return e&&e.external_plugins?gn.extend({},e.external_plugins,i):i},hX=(e,t)=>[...rX(e),...rX(t)],pX=(e,t,n,i)=>e&&lX(t,"mobile")?i:n,fX=(e,t,n,i)=>{const o=rX(n.forced_plugins),r=rX(i.plugins),s=cX(t,"mobile"),a=s.plugins?rX(s.plugins):r,l=pX(e,t,r,a),c=hX(o,l);return gn.extend(i,{forced_plugins:o,plugins:c})},mX=(e,t)=>e&&lX(t,"mobile"),gX=(e,t,n,i,o)=>{var r;const s=e?{mobile:dX(null!==(r=o.mobile)&&void 0!==r?r:{},t)}:{},a=sX(["mobile"],z$(s,o)),l=gn.extend(n,i,a.options(),mX(e,a)?aX(a,"mobile"):{},{external_plugins:uX(i,a.options())});return fX(e,a,i,l)},vX=(e,t)=>gX(iX||oX,iX,t,e,t),yX=(e,t)=>AR(e,t),bX=e=>{const t=(t,n)=>{e.formatter.toggle(t,n),e.nodeChanged()},n=n=>()=>{oe("left,center,right,justify".split(","),t=>{n!==t&&e.formatter.remove("align"+t)}),"none"!==n&&t("align"+n)};e.editorCommands.addCommands({JustifyLeft:n("left"),JustifyCenter:n("center"),JustifyRight:n("right"),JustifyFull:n("justify"),JustifyNone:n("none")})},_X=e=>{const t=t=>()=>{const n=e.selection,i=n.isCollapsed()?[e.dom.getParent(n.getNode(),e.dom.isBlock)]:n.getSelectedBlocks();return ne(i,n=>I(e.formatter.matchNode(n,t)))};e.editorCommands.addCommands({JustifyLeft:t("alignleft"),JustifyCenter:t("aligncenter"),JustifyRight:t("alignright"),JustifyFull:t("alignjustify")},"state")},wX=e=>{bX(e),_X(e)},CX=e=>{e.editorCommands.addCommands({"Cut,Copy,Paste":t=>{const n=e.getDoc();let i;try{n.execCommand(t)}catch(e){i=!0}if("paste"!==t||n.queryCommandEnabled(t)||(i=!0),i||!n.queryCommandSupported(t)){let t=e.translate("Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X/C/V keyboard shortcuts instead.");(an.os.isMacOS()||an.os.isiOS())&&(t=t.replace(/Ctrl\+/g,"\u2318+")),e.notificationManager.open({text:t,type:"error"})}}})},kX=(e,t,n,i)=>{const o=yi.fromDom(e.getRoot());return n=vC(o,Zd.fromRangeStart(t),i)?n.replace(/^ /,"&nbsp;"):n.replace(/^&nbsp;/," "),n=bC(o,Zd.fromRangeEnd(t),i)?n.replace(/(&nbsp;| )(<br( \/)>)?$/,"&nbsp;"):n.replace(/&nbsp;(<br( \/)?>)?$/," ")},xX=e=>{if("string"!=typeof e){const t=gn.extend({paste:e.paste,data:{paste:e.paste}},e);return{content:e.content,details:t}}return{content:e,details:{}}},SX=(e,t)=>{const n=e.selection,i=e.dom;return/^ | $/.test(t)?kX(i,n.getRng(),t,e.schema):t},EX=(e,t)=>{if(e.selection.isEditable()){const{content:n,details:i}=xX(t);MA(e,{...i,content:SX(e,n),format:"html",set:!1,selection:!0}
36).each(t=>{const n=DR(e,t.content,i);RA(e,n,t),e.addVisual()})}},DX=e=>{e.editorCommands.addCommands({mceCleanup:()=>{const t=e.selection.getBookmark();e.setContent(e.getContent()),e.selection.moveToBookmark(t)},insertImage:(t,n,i)=>{EX(e,e.dom.createHTML("img",{src:i}))},insertHorizontalRule:()=>{e.execCommand("mceInsertContent",!1,"<hr>")},insertText:(t,n,i)=>{EX(e,e.dom.encode(i))},insertHTML:(t,n,i)=>{EX(e,i)},mceInsertContent:(t,n,i)=>{EX(e,i)},mceSetContent:(t,n,i)=>{e.setContent(i)},mceReplaceContent:(t,n,i)=>{e.execCommand("mceInsertContent",!1,i.replace(/\{\$selection\}/g,e.selection.getContent({format:"text"})))},mceNewDocument:()=>{e.setContent(Sp(e))}})},TX={"font-size":"size","font-family":"face"},AX=Wn("font"),MX=(e,t,n)=>{const i=t=>Co(t,e).orThunk(()=>AX(t)?Be(TX,e).bind(e=>Xn(t,e)):K.none()),o=e=>xi(yi.fromDom(t),e);return FS(yi.fromDom(n),e=>i(e),o)},RX=e=>e.replace(/[\'\"\\]/g,"").replace(/,\s+/g,","),NX=(e,t)=>K.from(vc.DOM.getStyle(t,e,!0)),IX=e=>(t,n)=>K.from(n).map(yi.fromDom).filter(zn).bind(n=>MX(e,t,n.dom).or(NX(e,n.dom))).getOr(""),PX=IX("font-size"),OX=F(RX,IX("font-family")),LX=e=>km(e.getBody()).bind(e=>{const t=e.container();return K.from(Sr(t)?t.parentNode:t)}),BX=e=>K.from(e.selection.getRng()).bind(t=>{const n=e.getBody();return t.startContainer===n&&0===t.startOffset?K.none():K.from(e.selection.getStart(!0))}),FX=(t,n)=>BX(t).orThunk(e(LX,t)).map(yi.fromDom).filter(zn).bind(n),HX=(e,t)=>FX(e,H(K.some,t)),$X=(e,t)=>{if(/^[0-9.]+$/.test(t)){const n=parseInt(t,10);if(n>=1&&n<=7){const i=qp(e),o=Up(e);return o.length>0?o[n-1]||t:i[n-1]||t}return t}return t},zX=e=>{const t=e.split(/\s*,\s*/);return ie(t,e=>-1===e.indexOf(" ")||ft(e,'"')||ft(e,"'")?e:`'${e}'`).join(",")},jX=(e,t)=>{const n=$X(e,t);e.formatter.toggle("fontname",{value:zX(n)}),e.nodeChanged()},qX=e=>HX(e,t=>OX(e.getBody(),t.dom)).getOr(""),UX=(e,t)=>{e.formatter.toggle("fontsize",{value:$X(e,t)}),e.nodeChanged()},WX=e=>HX(e,t=>PX(e.getBody(),t.dom)).getOr(""),VX=t=>HX(t,n=>{const i=yi.fromDom(t.getBody()),o=FS(n,e=>Co(e,"line-height"),e(xi,i)),r=()=>{const e=parseFloat(_o(n,"line-height")),t=parseFloat(_o(n,"font-size"));return String(e/t)};return o.getOrThunk(r)}).getOr(""),YX=(e,t)=>{e.formatter.toggle("lineheight",{value:String(t)}),e.nodeChanged()},GX=e=>{const t=(t,n)=>{e.formatter.toggle(t,n),e.nodeChanged()};e.editorCommands.addCommands({"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":e=>{t(e)},"ForeColor,HiliteColor":(e,n,i)=>{t(e,{value:i})},BackColor:(e,n,i)=>{t("hilitecolor",{value:i})},FontName:(t,n,i)=>{jX(e,i)},FontSize:(t,n,i)=>{UX(e,i)},LineHeight:(t,n,i)=>{YX(e,i)},Lang:(e,n,i)=>{var o;t(e,{value:i.code,customValue:null!==(o=i.customCode)&&void 0!==o?o:null})},RemoveFormat:t=>{e.formatter.remove(t)},mceBlockQuote:()=>{t("blockquote")},FormatBlock:(e,n,i)=>{t(S(i)?i:"p")},mceToggleFormat:(e,n,i)=>{t(i)}})},KX=e=>{const t=t=>e.formatter.match(t);e.editorCommands.addCommands({"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":e=>t(e),mceBlockQuote:()=>t("blockquote")},"state"),e.editorCommands.addQueryValueHandler("FontName",()=>qX(e)),e.editorCommands.addQueryValueHandler("FontSize",()=>WX(e)),e.editorCommands.addQueryValueHandler("LineHeight",()=>VX(e))},XX=e=>{GX(e),KX(e)},QX=e=>{e.editorCommands.addCommands({mceAddUndoLevel:()=>{e.undoManager.add()},mceEndUndoLevel:()=>{e.undoManager.add()},Undo:()=>{e.undoManager.undo()},Redo:()=>{e.undoManager.redo()}})},ZX=e=>{e.editorCommands.addCommands({Indent:()=>{QB(e)},Outdent:()=>{ZB(e)}}),e.editorCommands.addCommands({Outdent:()=>VB(e)},"state")},JX=e=>{const t=(t,n,i)=>{const o=S(i)?{href:i}:i,r=e.dom.getParent(e.selection.getNode(),"a");E(o)&&S(o.href)&&(o.href=o.href.replace(/ /g,"%20"),r&&o.href||e.formatter.remove("link"),o.href&&e.formatter.apply("link",o,r))};e.editorCommands.addCommands({unlink:()=>{if(e.selection.isEditable()){if(e.selection.isCollapsed()){const t=e.dom.getParent(e.selection.getStart(),"a");return void(t&&e.dom.remove(t,!0))}e.formatter.remove("link")}},mceInsertLink:t,createLink:t})},eQ=e=>{e.editorCommands.addCommands({"InsertUnorderedList,InsertOrderedList":t=>{e.getDoc().execCommand(t);const n=e.dom.getParent(e.selection.getNode(),"ol,ul");if(n){const t=n.parentNode;
36if(t&&/^(H[1-6]|P|ADDRESS|PRE)$/.test(t.nodeName)){const i=e.selection.getBookmark();e.dom.split(t,n),e.selection.moveToBookmark(i)}}}})},tQ=e=>{e.editorCommands.addCommands({"InsertUnorderedList,InsertOrderedList":t=>{const n=e.dom.getParent(e.selection.getNode(),"ul,ol");return n&&("insertunorderedlist"===t&&"UL"===n.tagName||"insertorderedlist"===t&&"OL"===n.tagName)}},"state")},nQ=e=>{eQ(e),tQ(e)},iQ=(e,t,n,i)=>{const o=e.dom,r=e=>o.isBlock(e)&&e.parentElement===n,s=r(t)?t:o.getParent(i,r,n);return K.from(s).map(yi.fromDom)},oQ=(e,t)=>{const n=e.dom,i=e.selection.getRng(),o=t?e.selection.getStart():e.selection.getEnd(),r=t?i.startContainer:i.endContainer,s=qj(n,r);if(!s||!s.isContentEditable)return;const a=t?Eo:Do,l=dh(e);iQ(e,o,s,r).each(t=>{const n=Xj(e,r,t.dom,s,!1,l);a(t,yi.fromDom(n)),e.selection.setCursorLocation(n,0),e.dispatch("NewBlock",{newBlock:n}),Nj(e,"insertParagraph")})},rQ=e=>oQ(e,!0),sQ=e=>oQ(e,!1),aQ=e=>{e.editorCommands.addCommands({InsertNewBlockBefore:()=>{rQ(e)},InsertNewBlockAfter:()=>{sQ(e)}})},lQ=e=>{e.editorCommands.addCommands({insertParagraph:()=>{eU(xq,e)},mceInsertNewLine:(t,n,i)=>{tU(e,i)},InsertLineBreak:()=>{eU(Lq,e)}})},cQ=e=>{e.editorCommands.addCommands({mceSelectNodeDepth:(t,n,i)=>{let o=0;e.dom.getParent(e.selection.getNode(),t=>!hr(t)||o++!==i||(e.selection.select(t),!1),e.getBody())},mceSelectNode:(t,n,i)=>{e.selection.select(i)},selectAll:()=>{const t=e.dom.getParent(e.selection.getStart(),Ir);if(t){const n=e.dom.createRng();n.selectNodeContents(t),e.selection.setRng(n)}}})},dQ=e=>{e.editorCommands.addCommands({mceRemoveNode:(t,n,i)=>{const o=null!=i?i:e.selection.getNode();if(o!==e.getBody()){const t=e.selection.getBookmark();e.dom.remove(o,!0),e.selection.moveToBookmark(t)}},mcePrint:()=>{e.getWin().print()},mceFocus:(t,n,i)=>{b_(e,!0===i)},mceToggleVisualAid:()=>{e.hasVisual=!e.hasVisual,e.addVisual()}})},uQ=e=>{wX(e),CX(e),QX(e),cQ(e),DX(e),JX(e),ZX(e),aQ(e),lQ(e),nQ(e),XX(e),dQ(e)},hQ=["toggleview"],pQ=e=>te(hQ,e.toLowerCase());class fQ{constructor(e){this.commands={state:{},exec:{},value:{}},this.editor=e}execCommand(e,t=!1,n,i){const o=this.editor,r=e.toLowerCase(),s=null==i?void 0:i.skip_focus;if(o.removed)return!1;"mcefocus"!==r&&(/^(mceAddUndoLevel|mceEndUndoLevel)$/i.test(r)||s?zb(o):o.focus());if(o.dispatch("BeforeExecCommand",{command:e,ui:t,value:n}).isDefaultPrevented())return!1;const a=this.commands.exec[r];return!!P(a)&&(a(r,t,n),o.dispatch("ExecCommand",{command:e,ui:t,value:n}),!0)}queryCommandState(e){if(!pQ(e)&&this.editor.quirks.isHidden()||this.editor.removed)return!1;const t=e.toLowerCase(),n=this.commands.state[t];return!!P(n)&&n(t)}queryCommandValue(e){if(!pQ(e)&&this.editor.quirks.isHidden()||this.editor.removed)return"";const t=e.toLowerCase(),n=this.commands.value[t];return P(n)?n(t):""}addCommands(e,t="exec"){const n=this.commands;Te(e,(e,i)=>{oe(i.toLowerCase().split(","),i=>{n[t][i]=e})})}addCommand(e,t,n){const i=e.toLowerCase();this.commands.exec[i]=(e,i,o)=>t.call(null!=n?n:this.editor,i,o)}queryCommandSupported(e){const t=e.toLowerCase();return!!this.commands.exec[t]}addQueryStateHandler(e,t,n){this.commands.state[e.toLowerCase()]=()=>t.call(null!=n?n:this.editor)}addQueryValueHandler(e,t,n){this.commands.value[e.toLowerCase()]=()=>t.call(null!=n?n:this.editor)}}const mQ="data-mce-contenteditable",gQ=(e,t,n)=>{pi(e,t)&&!n?ui(e,t):n&&ci(e,t)},vQ=(e,t,n)=>{try{e.getDoc().execCommand(t,!1,String(n))}catch(e){}},yQ=(e,t)=>{e.dom.contentEditable=t?"true":"false"},bQ=e=>{oe(ar(e,'*[contenteditable="true"]'),e=>{Yn(e,mQ,"true"),yQ(e,!1)})},_Q=e=>{oe(ar(e,`*[${mQ}="true"]`),e=>{Zn(e,mQ),yQ(e,!0)})},wQ=e=>{K.from(e.selection.getNode()).each(e=>{e.removeAttribute("data-mce-selected")})},CQ=e=>{e.selection.setRng(e.selection.getRng())},kQ=(e,t)=>{const n=yi.fromDom(e.getBody());gQ(n,"mce-content-readonly",t),t?(e.selection.controlSelection.hideResizeRect(),e._selectionOverrides.hideFakeCaret(),wQ(e),e.readonly=!0,yQ(n,!1),bQ(n)):(e.readonly=!1,e.hasEditableRoot()&&yQ(n,!0),_Q(n),vQ(e,"StyleWithCSS",!1),vQ(e,"enableInlineTableEditing",!1),vQ(e,"enableObjectResizing",!1),g_(e)&&e.focus(),CQ(e),e.nodeChanged())},xQ=e=>e.readonly,SQ=e=>{e.parser.addAttributeFilter("contenteditable",t=>{xQ(e)&&oe(t,e=>{e.attr(mQ,e.attr("contenteditable")),e.attr("contenteditable","false")})}),e.serializer.addAttributeFilter(mQ,t=>{xQ(e)&&oe(t,e=>{e.attr("contenteditable",e.attr(mQ))})}),e.serializer.addTempAttr(mQ)},EQ=e=>{e.serializer?SQ(e):e.on("PreInit",()=>{SQ(e)})},DQ=e=>"click"===e.type,TQ=["copy"],AQ=e=>te(TQ,e.type),MQ=(e,t)=>{const n=t=>xi(t,yi.fromDom(e.getBody()));return uo(t,"a",n).bind(e=>Xn(e,"href"))},RQ=(e,t)=>{if(DQ(t)&&!Yv.metaKeyPressed(t)){const n=yi.fromDom(t.target);MQ(e,n).each(n=>{if(t.preventDefault(),/^#/.test(n)){const t=e.dom.select(`${n},[name="${ht(n,"#")}"]`);t.length&&e.selection.scrollIntoView(t[0],!0)}else window.open(n,"_blank","rel=noopener noreferrer,menubar=yes,toolbar=yes,location=yes,status=yes,resizable=yes,scrollbars=yes")})}else AQ(t)&&e.dispatch(t.type,t)},NQ=e=>{e.on("ShowCaret",t=>{xQ(e)&&t.preventDefault()}),e.on("ObjectSelected",t=>{xQ(e)&&t.preventDefault()})},IQ=gn.makeMap("focus blur focusin focusout click dblclick mousedown mouseup mousemove mouseover beforepaste paste cut copy selectionchange mouseout mouseenter mouseleave wheel 
vendor: 22,504 bytes, lines 36-37
36keydown keypress keyup input beforeinput contextmenu dragstart dragend dragover draggesture dragdrop drop drag submit compositionstart compositionend compositionupdate touchstart touchmove touchend touchcancel"," ");class PQ{static isNative(e){return!!IQ[e.toLowerCase()]}constructor(e){this.bindings={},this.settings=e||{},this.scope=this.settings.scope||this,this.toggleEvent=this.settings.toggleEvent||Y}fire(e,t){return this.dispatch(e,t)}dispatch(e,t){
37const n=e.toLowerCase(),i=Ql(n,null!=t?t:{},this.scope);this.settings.beforeFire&&this.settings.beforeFire(i);const o=this.bindings[n];if(o)for(let e=0,t=o.length;e<t;e++){const t=o[e];if(!t.removed){if(t.once&&this.off(n,t.func),i.isImmediatePropagationStopped())return i;if(!1===t.func.call(this.scope,i))return i.preventDefault(),i}}return i}on(e,t,n,i){if(!1===t&&(t=Y),t){const o={func:t,removed:!1};i&&gn.extend(o,i);const r=e.toLowerCase().split(" ");let s=r.length;for(;s--;){const e=r[s];let t=this.bindings[e];t||(t=[],this.toggleEvent(e,!0)),t=n?[o,...t]:[...t,o],this.bindings[e]=t}}return this}off(e,t){if(e){const n=e.toLowerCase().split(" ");let i=n.length;for(;i--;){const o=n[i];let r=this.bindings[o];if(!o)return Te(this.bindings,(e,t)=>{this.toggleEvent(t,!1),delete this.bindings[t]}),this;if(r){if(t){const e=se(r,e=>e.func===t);r=e.fail,this.bindings[o]=r,oe(e.pass,e=>{e.removed=!0})}else r.length=0;r.length||(this.toggleEvent(e,!1),delete this.bindings[o])}}}else Te(this.bindings,(e,t)=>{this.toggleEvent(t,!1)}),this.bindings={};return this}once(e,t,n){return this.on(e,t,n,{once:!0})}has(e){e=e.toLowerCase();const t=this.bindings[e];return!(!t||0===t.length)}}const OQ=e=>(e._eventDispatcher||(e._eventDispatcher=new PQ({scope:e,toggleEvent:(t,n)=>{PQ.isNative(t)&&e.toggleNativeEvent&&e.toggleNativeEvent(t,n)}})),e._eventDispatcher),LQ={fire(e,t,n){return this.dispatch(e,t,n)},dispatch(e,t,n){const i=this;if(i.removed&&"remove"!==e&&"detach"!==e)return Ql(e.toLowerCase(),null!=t?t:{},i);const o=OQ(i).dispatch(e,t);if(!1!==n&&i.parent){let t=i.parent();for(;t&&!o.isPropagationStopped();)t.dispatch(e,o,!1),t=t.parent?t.parent():void 0}return o},on(e,t,n){return OQ(this).on(e,t,n)},off(e,t){return OQ(this).off(e,t)},once(e,t){return OQ(this).once(e,t)},hasEventListeners(e){return OQ(this).has(e)}},BQ=vc.DOM;let FQ;const HQ=(e,t)=>{if("selectionchange"===t)return e.getDoc();if(!e.inline&&/^(?:mouse|touch|click|contextmenu|drop|dragover|dragend)/.test(t))return e.getDoc().documentElement;const n=$h(e);return n?(e.eventRoot||(e.eventRoot=BQ.select(n)[0]),e.eventRoot):e.getBody()},$Q=e=>!e.hidden&&!xQ(e),zQ=(e,t,n)=>{$Q(e)?e.dispatch(t,n):xQ(e)&&RQ(e,n)},jQ=(e,t)=>{if(e.delegates||(e.delegates={}),e.delegates[t]||e.removed)return;const n=HQ(e,t);if($h(e)){if(FQ||(FQ={},e.editorManager.on("removeEditor",()=>{e.editorManager.activeEditor||FQ&&(Te(FQ,(t,n)=>{e.dom.unbind(HQ(e,n))}),FQ=null)})),FQ[t])return;const i=n=>{const i=n.target,o=e.editorManager.get();let r=o.length;for(;r--;){const e=o[r].getBody();(e===i||BQ.isChildOf(i,e))&&zQ(o[r],t,n)}};FQ[t]=i,BQ.bind(n,t,i)}else{const i=n=>{zQ(e,t,n)};BQ.bind(n,t,i),e.delegates[t]=i}},qQ={...LQ,bindPendingEventDelegates(){const e=this;gn.each(e._pendingNativeEvents,t=>{jQ(e,t)})},toggleNativeEvent(e,t){const n=this;"focus"!==e&&"blur"!==e&&(n.removed||(t?n.initialized?jQ(n,e):n._pendingNativeEvents?n._pendingNativeEvents.push(e):n._pendingNativeEvents=[e]:n.initialized&&n.delegates&&(n.dom.unbind(HQ(n,e),e,n.delegates[e]),delete n.delegates[e])))},unbindAllNativeEvents(){const e=this,t=e.getBody(),n=e.dom;e.delegates&&(Te(e.delegates,(t,n)=>{e.dom.unbind(HQ(e,n),n,t)}),delete e.delegates),!e.inline&&t&&n&&(t.onload=null,n.unbind(e.getWin()),n.unbind(e.getDoc())),n&&(n.unbind(t),n.unbind(e.getContainer()))}},UQ=e=>S(e)?{value:e.split(/[ ,]/),valid:!0}:L(e,S)?{value:e,valid:!0}:{valid:!1,message:"The value must be a string[] or a comma/space separated string."},WQ=e=>{const t=(()=>{switch(e){case"array":return T;case"boolean":return M;case"function":return P;case"number":return O;case"object":return E;case"string":return S;case"string[]":return UQ;case"object[]":return e=>L(e,E);case"regexp":return e=>x(e,RegExp);default:return G}})();return n=>KQ(n,t,`The value must be a ${e}.`)},VQ=e=>S(e.processor),YQ=(e,t)=>e+(wt(t.message)?"":`. ${t.message}`),GQ=e=>e.valid,KQ=(e,t,n="")=>{const i=t(e);return M(i)?i?{value:e,valid:!0}:{valid:!1,message:n}:i},XQ=(e,t,n)=>{if(!R(t)){const i=KQ(t,n);if(GQ(i))return i.value;console.error(YQ(`Invalid default value passed for the "${e}" option`,i))}},QQ=(e,t)=>{const n={},i={},o=(e,t,n)=>{const o=KQ(t,n);return GQ(o)?(i[e]=o.value,!0):(console.warn(YQ(`Invalid value passed for the ${e} option`,o)),!1)},r=(e,r)=>{const s=VQ(r)?WQ(r.processor):r.processor,a=XQ(e,r.default,s);n[e]={...r,default:a,processor:s};Be(i,e).orThunk(()=>Be(t,e)).each(t=>o(e,t,s))},s=e=>Fe(n,e),a=e=>Be(i,e).orThunk(()=>Be(n,e).map(e=>e.default)).getOrUndefined(),l=(e,t)=>{if(s(e)){const i=n[e];return i.immutable?(console.error(`"${e}" is an immutable option and cannot be updated`),!1):o(e,t,i.processor)}return console.warn(`"${e}" is not a registered option. Ensure the option has been registered before setting a value.`),!1},c=e=>{const t=s(e);return t&&delete i[e],t},d=e=>Fe(i,e);return{register:r,isRegistered:s,get:a,set:l,unset:c,isSet:d}},ZQ=["design","readonly"],JQ=(e,t,n,i)=>{const o=n[t.get()],r=n[i];try{r.activate()}catch(e){return void console.error(`problem while activating editor mode ${i}:`,e)}o.deactivate(),o.editorReadOnly!==r.editorReadOnly&&kQ(e,r.editorReadOnly),t.set(i),Ev(e,i)},eZ=(e,t,n,i)=>{if(i!==n.get()){if(!Fe(t,i))throw new Error(`Editor mode '${i}' is invalid`);e.initialized?JQ(e,n,t,i):e.on("init",()=>JQ(e,n,t,i))}},tZ=(e,t,n)=>{if(te(ZQ,t))throw new Error(`Cannot override default mode ${t}`);return{...e,[t]:{...n,deactivate:()=>{try{n.deactivate()}catch(e){console.error(`problem while deactivating editor mode ${t}:`,e)}}}}},nZ=e=>{const t=xc("design"),n=xc({design:{activate:B,deactivate:B,editorReadOnly:!1},readonly:{activate:B,deactivate:B,editorReadOnly:!0}});return EQ(e),NQ(e),{isReadOnly:()=>xQ(e),set:i=>eZ(e,n.get(),t,i),get:()=>t.get(),register:(e,t)=>{n.set(tZ(n.get(),e,t))}}},iZ=gn.each,oZ=gn.explode,rZ={f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123},sZ=gn.makeMap("alt,ctrl,shift,meta,access"),aZ=e=>e in sZ,lZ=e=>{const t={},n=an.os.isMacOS()||an.os.isiOS();iZ(oZ(e.toLowerCase(),"+"),e=>{aZ(e)?t[e]=!0:/^[0-9]{2,}$/.test(e)?t.keyCode=parseInt(e,10):(t.charCode=e.charCodeAt(0),t.keyCode=rZ[e]||e.toUpperCase().charCodeAt(0))});const i=[t.keyCode];let o;for(o in sZ)t[o]?i.push(o):t[o]=!1;return t.id=i.join(","),t.access&&(t.alt=!0,n?t.ctrl=!0:t.shift=!0),t.meta&&(n?t.meta=!0:(t.ctrl=!0,t.meta=!1)),t};class cZ{constructor(e){this.shortcuts={},this.pendingPatterns=[],this.editor=e;const t=this;e.on("keyup keypress keydown",e=>{!t.hasModifier(e)&&!t.isFunctionKey(e)||e.isDefaultPrevented()||(iZ(t.shortcuts,n=>{t.matchShortcut(e,n)&&(t.pendingPatterns=n.subpatterns.slice(0),"keydown"===e.type&&t.executeShortcutAction(n))}),t.matchShortcut(e,t.pendingPatterns[0])&&(1===t.pendingPatterns.length&&"keydown"===e.type&&t.executeShortcutAction(t.pendingPatterns[0]),t.pendingPatterns.shift()))})}add(e,t,n,i){const o=this,r=o.normalizeCommandFunc(n);return iZ(oZ(gn.trim(e)),e=>{const n=o.createShortcut(e,t,r,i);o.shortcuts[n.id]=n}),!0}remove(e){const t=this.createShortcut(e);return!!this.shortcuts[t.id]&&(delete this.shortcuts[t.id],!0)}normalizeCommandFunc(e){const t=this,n=e;return"string"==typeof n?()=>{t.editor.execCommand(n,!1,null)}:gn.isArray(n)?()=>{t.editor.execCommand(n[0],n[1],n[2])}:n}createShortcut(e,t,n,i){const o=gn.map(oZ(e,">"),lZ);return o[o.length-1]=gn.extend(o[o.length-1],{func:n,scope:i||this.editor}),gn.extend(o[0],{desc:this.editor.translate(t),subpatterns:o.slice(1)})}hasModifier(e){return e.altKey||e.ctrlKey||e.metaKey}isFunctionKey(e){return"keydown"===e.type&&e.keyCode>=112&&e.keyCode<=123}matchShortcut(e,t){return!!t&&(t.ctrl===e.ctrlKey&&t.meta===e.metaKey&&(t.alt===e.altKey&&t.shift===e.shiftKey&&(!!(e.keyCode===t.keyCode||e.charCode&&e.charCode===t.charCode)&&(e.preventDefault(),!0))))}executeShortcutAction(e){return e.func?e.func.call(e.scope):null}}const dZ=()=>{const e={},t={},n={},i={},o={},r={},s={},a={},l=(e,t)=>(n,i)=>{e[n.toLowerCase()]={...i,type:t}},c=(e,t)=>i[e.toLowerCase()]=t;return{addButton:l(e,"button"),addGroupToolbarButton:l(e,"grouptoolbarbutton"),addToggleButton:l(e,"togglebutton"),addMenuButton:l(e,"menubutton"),addSplitButton:l(e,"splitbutton"),addMenuItem:l(t,"menuitem"),addNestedMenuItem:l(t,"nestedmenuitem"),addToggleMenuItem:l(t,"togglemenuitem"),addAutocompleter:l(n,"autocompleter"),addContextMenu:l(o,"contextmenu"),addContextToolbar:l(r,"contexttoolbar"),addContextForm:l(r,"contextform"),addSidebar:l(s,"sidebar"),addView:l(a,"views"),addIcon:c,getAll:()=>({buttons:e,menuItems:t,icons:i,popups:n,contextMenus:o,contextToolbars:r,sidebars:s,views:a})}},uZ=()=>{const e=dZ();return{addAutocompleter:e.addAutocompleter,addButton:e.addButton,addContextForm:e.addContextForm,addContextMenu:e.addContextMenu,addContextToolbar:e.addContextToolbar,addIcon:e.addIcon,addMenuButton:e.addMenuButton,addMenuItem:e.addMenuItem,addNestedMenuItem:e.addNestedMenuItem,addSidebar:e.addSidebar,addSplitButton:e.addSplitButton,addToggleButton:e.addToggleButton,addGroupToolbarButton:e.addGroupToolbarButton,addToggleMenuItem:e.addToggleMenuItem,addView:e.addView,getAll:e.getAll}},hZ=vc.DOM,pZ=gn.extend,fZ=gn.each;class mZ{constructor(e,t,n){this.plugins={},this.contentCSS=[],this.contentStyles=[],this.loadedCSS={},this.isNotDirty=!1,this.composing=!1,this.destroyed=!1,this.hasHiddenInput=!1,this.iframeElement=null,this.initialized=!1,this.readonly=!1,this.removed=!1,this.startContent="",this._pendingNativeEvents=[],this._skinLoaded=!1,this._editableRoot=!0,this.editorManager=n,this.documentBaseUrl=n.documentBaseURL,pZ(this,qQ);const i=this;this.id=e,this.hidden=!1;const o=vX(n.defaultOptions,t);this.options=QQ(i,o),nh(i);const r=this.options.get;r("deprecation_warnings")&&EN(t,o);const s=r("suffix");s&&(n.suffix=s),this.suffix=n.suffix;const a=r("base_url");a&&n._setBaseUrl(a),this.baseUri=n.baseURI;const l=Dh(i);l&&(kc.ScriptLoader._setReferrerPolicy(l),vc.DOM.styleSheetLoader._setReferrerPolicy(l));const c=ap(i);I(c)&&vc.DOM.styleSheetLoader._setContentCssCors(c),Oc.languageLoad=r("language_load"),Oc.baseURL=n.baseURL,this.setDirty(!1),this.documentBaseURI=new rA(rh(i),{base_uri:this.baseUri}),this.baseURI=this.baseUri,this.inline=Zh(i),this.hasVisual=up(i),this.shortcuts=new cZ(this),this.editorCommands=new fQ(this),uQ(this);const d=r("cache_suffix");d&&(an.cacheSuffix=d.replace(/^[\?\&]+/,"")),this.ui={registry:uZ(),styleSheetLoader:void 0,show:B,hide:B,setEnabled:B,isEnabled:G},this.mode=nZ(i),n.dispatch("SetupEditor",{editor:this});const u=mp(i);P(u)&&u.call(i,i)}render(){ZK(this)}focus(e){this.execCommand("mceFocus",!1,e)}hasFocus(){return m_(this)}translate(e){return Pc.translate(e)}getParam(e,t,n){const i=this.options;return i.isRegistered(e)||(I(n)?i.register(e,{processor:n,default:t}):i.register(e,{processor:G,default:t})),i.isSet(e)||R(t)?i.get(e):t}hasPlugin(e,t){return!!te(lp(this),e)&&(!t||void 0!==QN.get(e))}nodeChanged(e){this._nodeChangeDispatcher.nodeChanged(e)}addCommand(e,t,n){this.editorCommands.addCommand(e,t,n)}addQueryStateHandler(e,t,n){this.editorCommands.addQueryStateHandler(e,t,n)}addQueryValueHandler(e,t,n){this.editorCommands.addQueryValueHandler(e,t,n)}addShortcut(e,t,n,i){this.shortcuts.add(e,t,n,i)}execCommand(e,t,n,i){return this.editorCommands.execCommand(e,t,n,i)}queryCommandState(e){return this.editorCommands.queryCommandState(e)}queryCommandValue(e){return this.editorCommands.queryCommandValue(e)}queryCommandSupported(e){return this.editorCommands.queryCommandSupported(e)}show(){const e=this;e.hidden&&(e.hidden=!1,e.inline?e.getBody().contentEditable="true":(hZ.show(e.getContainer()),hZ.hide(e.id)),e.load(),e.dispatch("show"))}hide(){const e=this;e.hidden||(e.save(),e.inline?(e.getBody().contentEditable="false",e===e.editorManager.focusedEditor&&(e.editorManager.focusedEditor=null)):(hZ.hide(e.getContainer()),hZ.setStyle(e.id,"display",e.orgDisplay)),e.hidden=!0,e.dispatch("hide"))}isHidden(){return this.hidden}setProgressState(e,t){this.dispatch("ProgressState",{state:e,time:t})}load(e={}){const t=this,n=t.getElement();if(t.removed)return"";if(n){const i={...e,load:!0},o=xr(n)?n.value:n.innerHTML,r=t.setContent(o,i);return i.no_events||t.dispatch("LoadContent",{...i,element:n}),r}return""}save(e={}){const t=this;let n=t.getElement();if(!n||!t.initialized||t.removed)return"";const i={...e,save:!0,element:n};let o=t.getContent(i);const r={...i,content:o};if(r.no_events||t.dispatch("SaveContent",r),"raw"===r.format&&t.dispatch("RawSaveContent",r),o=r.content,xr(n))n.value=o;else{!e.is_removing&&t.inline||(n.innerHTML=o);const i=hZ.getParent(t.id,"form");i&&fZ(i.elements,e=>e.name!==t.id||(e.value=o,!1))}return r.element=i.element=n=null,!1!==r.set_dirty&&t.setDirty(!1),o}setContent(e,t){return hN(this,e,t)}getContent(e){return cN(this,e)}insertContent(e,t){t&&(e=pZ({content:e},t)),this.execCommand("mceInsertContent",!1,e)}resetContent(e){void 0===e?hN(this,this.startContent,{format:"raw"}):hN(this,e),this.undoManager.reset(),this.setDirty(!1),this.nodeChanged()}isDirty(){return!this.isNotDirty}setDirty(e){const t=!this.isNotDirty;this.isNotDirty=!e,e&&e!==t&&this.dispatch("dirty")}getContainer(){const e=this;return e.container||(e.container=e.editorContainer||hZ.get(e.id+"_parent")),e.container}getContentAreaContainer(){return this.contentAreaContainer}getElement(){return this.targetElm||(this.targetElm=hZ.get(this.id)),this.targetElm}getWin(){const e=this;if(!e.contentWindow){const t=e.iframeElement;t&&(e.contentWindow=t.contentWindow)}return e.contentWindow}getDoc(){const e=this;if(!e.contentDocument){const t=e.getWin();t&&(e.contentDocument=t.document)}return e.contentDocument}getBody(){var e,t;const n=this.getDoc();return null!==(t=null!==(e=this.bodyElement)&&void 0!==e?e:null==n?void 0:n.body)&&void 0!==t?t:null}convertURL(e,t,n){const i=this,o=i.options.get,r=vp(i);if(P(r))return r.call(i,e,n,!0,t);if(!o("convert_urls")||"link"===n||E(n)&&"LINK"===n.nodeName||0===e.indexOf("file:")||0===e.length)return e;const s=new rA(e);return"http"!==s.protocol&&"https"!==s.protocol&&""!==s.protocol?e:o("relative_urls")?i.documentBaseURI.toRelative(e):e=i.documentBaseURI.toAbsolute(e,o("remove_script_host"))}addVisual(e){yX(this,e)}setEditableRoot(e){JK(this,e)}hasEditableRoot(){return eX(this)}remove(){NN(this)}destroy(e){IN(this,e)}uploadImages(){return this.editorUpload.uploadImages()}_scanForImages(){return this.editorUpload.scanForImages()}}const gZ=vc.DOM,vZ=gn.each;let yZ,bZ=!1,_Z=[];const wZ=e=>{const t=e.type;vZ(EZ.get(),n=>{switch(t){case"scroll":n.dispatch("ScrollWindow",e);break;case"resize":n.dispatch("ResizeWindow",e)}})},CZ=e=>{if(e!==bZ){const t=vc.DOM;e?(t.bind(window,"resize",wZ),t.bind(window,"scroll",wZ)):(t.unbind(window,"resize",wZ),t.unbind(window,"scroll",wZ)),bZ=e}},kZ=e=>{const t=_Z;return _Z=ae(_Z,t=>e!==t),EZ.activeEditor===e&&(EZ.activeEditor=_Z.length>0?_Z[0]:null),EZ.focusedEditor===e&&(EZ.focusedEditor=null),t.length!==_Z.length},xZ=e=>{e&&e.initialized&&!(e.getContainer()||e.getBody()).parentNode&&(kZ(e),e.unbindAllNativeEvents(),e.destroy(!0),e.removed=!0)},SZ="CSS1Compat"!==document.compatMode,EZ={...LQ,baseURI:null,baseURL:null,defaultOptions:{},documentBaseURL:null,suffix:null,majorVersion:"6",minorVersion:"8.6",releaseDate:"TBD",i18n:Pc,activeEditor:null,focusedEditor:null,setup(){const e=this;let t="",n="",i=rA.getDocumentBaseUrl(document.location);/^[^:]+:\/\/\/?[^\/]+\//.test(i)&&(i=i.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(i)||(i+="/"));const o=window.tinymce||window.tinyMCEPreInit;if(o)t=o.base||o.baseURL,n=o.suffix;else{const e=document.getElementsByTagName("script");for(let i=0;i<e.length;i++){const o=e[i].src||"";if(""===o)continue;const r=o.substring(o.lastIndexOf("/"));if(/tinymce(\.full|\.jquery|)(\.min|\.dev|)\.js/.test(o)){-1!==r.indexOf(".min")&&(n=".min"),t=o.substring(0,o.lastIndexOf("/"));break}}if(!t&&document.currentScript){const e=document.currentScript.src;-1!==e.indexOf(".min")&&(n=".min"),t=e.substring(0,e.lastIndexOf("/"))}}e.baseURL=new rA(i).toAbsolute(t),e.documentBaseURL=i,e.baseURI=new rA(e.baseURL),e.suffix=n,r_(e)},overrideDefaults(e){const t=e.base_url;t&&this._setBaseUrl(t);const n=e.suffix;n&&(this.suffix=n),this.defaultOptions=e;const i=e.plugin_base_urls;void 0!==i&&Te(i,(e,t)=>{Oc.PluginManager.urls[t]=e})},init(e){const t=this;let n;const i=gn.makeMap("area base basefont br col frame hr img input isindex link meta param embed source wbr track colgroup option table tbody tfoot thead tr th td script noscript style textarea video audio iframe object menu"," "),o=(e,t)=>e.inline&&t.tagName.toLowerCase()in i,r=e=>{let t=e.id;return t||(t=Be(e,"name").filter(e=>!gZ.get(e)).getOrThunk(gZ.uniqueId),e.setAttribute("id",t)),t},s=n=>{const i=e[n];if(i)return i.apply(t,[])},a=e=>an.browser.isIE()||an.browser.isEdge()?(hI("TinyMCE does not support the browser you are using. For a list of supported browsers please see: https://www.tiny.cloud/docs/tinymce/6/support/#supportedwebbrowsers"),[]):SZ?(hI("Failed to initialize the editor as the document is not in standards mode. TinyMCE requires standards mode."),[]):S(e.selector)?gZ.select(e.selector):I(e.target)?[e.target]:[];let l=e=>{n=e};const c=()=>{let n=0;const i=[];let d;const u=(e,o,r)=>{const s=new mZ(e,o,t);i.push(s),s.on("init",()=>{++n===d.length&&l(i)}),s.targetElm=s.targetElm||r,s.render()};gZ.unbind(window,"ready",c),s("onpageload"),d=Se(a(e)),gn.each(d,e=>{xZ(t.get(e.id))}),d=gn.grep(d,e=>!t.get(e.id)),0===d.length?l([]):vZ(d,t=>{o(e,t)?hI("Could not initialize inline editor on invalid inline target element",t):u(r(t),e,t)})};return gZ.bind(window,"ready",c),new Promise(e=>{n?e(n):l=t=>{e(t)}})},get(e){return 0===arguments.length?_Z.slice(0):S(e)?ue(_Z,t=>t.id===e).getOr(null):O(e)&&_Z[e]?_Z[e]:null},add(e){const t=this,n=t.get(e.id);return n===e||(null===n&&_Z.push(e),CZ(!0),t.activeEditor=e,t.dispatch("AddEditor",{editor:e}),yZ||(yZ=e=>{const n=t.dispatch("BeforeUnload");if(n.returnValue)return e.preventDefault(),e.returnValue=n.returnValue,n.returnValue},window.addEventListener("beforeunload",yZ))),e},createEditor(e,t){return this.add(new mZ(e,t,this))},remove(e){const t=this;let n;if(e){if(!S(e))return n=e,A(t.get(n.id))?null:(kZ(n)&&t.dispatch("RemoveEditor",{editor:n}),0===_Z.length&&window.removeEventListener("beforeunload",yZ),n.remove(),CZ(_Z.length>0),n);vZ(gZ.select(e),e=>{n=t.get(e.id),n&&t.remove(n)})}else for(let e=_Z.length-1;e>=0;e--)t.remove(_Z[e])},execCommand(e,t,n){var i;const o=this,r=E(n)?null!==(i=n.id)&&void 0!==i?i:n.index:n;switch(e){case"mceAddEditor":if(!o.get(r)){const e=n.options;new mZ(r,e,o).render()}return!0;case"mceRemoveEditor":{const e=o.get(r);return e&&e.remove(),!0}case"mceToggleEditor":{const e=o.get(r);return e?(e.isHidden()?e.show():e.hide(),!0):(o.execCommand("mceAddEditor",!1,n),!0)}}return!!o.activeEditor&&o.activeEditor.execCommand(e,t,n)},triggerSave:()=>{vZ(_Z,e=>{e.save()})},addI18n:(e,t)=>{Pc.add(e,t)},translate:e=>Pc.translate(e),setActive(e){const t=this.activeEditor;this.activeEditor!==e&&(t&&t.dispatch("deactivate",{relatedTarget:e}),e.dispatch("activate",{relatedTarget:t})),this.activeEditor=e},_setBaseUrl(e){this.baseURL=new rA(this.documentBaseURL).toAbsolute(e.replace(/\/+$/,"")),this.baseURI=new rA(this.baseURL)}};EZ.setup();const DZ=()=>{const e=Fc(),t=e=>({items:e,types:Ee(e),getType:t=>Be(e,t).getOrUndefined()}),n=t=>{e.set(t)};return{FakeClipboardItem:t,write:n,read:()=>e.get().getOrUndefined(),clear:e.clear}},TZ=DZ(),AZ=Math.min,MZ=Math.max,RZ=Math.round,NZ=(e,t,n)=>{let i=t.x,o=t.y;const r=e.w,s=e.h,a=t.w,l=t.h,c=(n||"").split("");return"b"===c[0]&&(o+=l),"r"===c[1]&&(i+=a),"c"===c[0]&&(o+=RZ(l/2)),"c"===c[1]&&(i+=RZ(a/2)),"b"===c[3]&&(o-=s),"r"===c[4]&&(i-=r),"c"===c[3]&&(o-=RZ(s/2)),"c"===c[4]&&(i-=RZ(r/2)),BZ(i,o,r,s)},IZ=(e,t,n,i)=>{for(let o=0;o<i.length;o++){const r=NZ(e,t,i[o]);if(r.x>=n.x&&r.x+r.w<=n.w+n.x&&r.y>=n.y&&r.y+r.h<=n.h+n.y)return i[o]}return null},PZ=(e,t,n)=>BZ(e.x-t,e.y-n,e.w+2*t,e.h+2*n),OZ=(e,t)=>{const n=MZ(e.x,t.x),i=MZ(e.y,t.y),o=AZ(e.x+e.w,t.x+t.w),r=AZ(e.y+e.h,t.y+t.h);return o-n<0||r-i<0?null:BZ(n,i,o-n,r-i)},LZ=(e,t,n)=>{let i=e.x,o=e.y,r=e.x+e.w,s=e.y+e.h;const a=t.x+t.w,l=t.y+t.h,c=MZ(0,t.x-i),d=MZ(0,t.y-o),u=MZ(0,r-a),h=MZ(0,s-l);return i+=c,o+=d,n&&(r+=c,s+=d,i-=u,o-=h),r-=u,s-=h,BZ(i,o,r-i,s-o)},BZ=(e,t,n,i)=>({x:e,y:t,w:n,h:i}),FZ=e=>BZ(e.left,e.top,e.width,e.height),HZ={inflate:PZ,relativePosition:NZ,findBestRelativePosition:IZ,intersect:OZ,clamp:LZ,create:BZ,fromClientRect:FZ},$Z=(e,t,n=1e3)=>{let i=!1,o=null;const r=e=>(...t)=>{i||(i=!0,null!==o&&(clearTimeout(o),o=null),e.apply(null,t))},s=r(e),a=r(t);return{start:(...e)=>{i||null!==o||(o=setTimeout(()=>a.apply(null,e),n))},resolve:s,reject:a}},zZ=()=>{const e={},t={},n={},i=(n,i)=>{const o=`Script at URL "${i}" failed to load`,r=`Script at URL "${i}" did not call \`tinymce.Resource.add('${n}', data)\` within 1 second`;if(void 0!==e[n])return e[n];{const s=new Promise((e,s)=>{const a=$Z(e,s);t[n]=a.resolve,kc.ScriptLoader.loadScript(i).then(()=>a.start(r),()=>a.reject(o))});return e[n]=s,s}},o=(i,o)=>{void 0!==t[i]&&(t[i](o),delete t[i]),e[i]=Promise.resolve(o),n[i]=o};return{load:i,add:o,has:e=>e in n,get:e=>n[e],unload:t=>{delete e[t]}}},jZ=zZ(),qZ=()=>(()=>{let e={},t=[];const n={getItem:t=>{const n=e[t];return n||null},setItem:(n,i)=>{t.push(n),e[n]=String(i)},key:e=>t[e],removeItem:n=>{t=t.filter(e=>e===n),delete e[n]},clear:()=>{t=[],e={}},length:0};return Object.defineProperty(n,"length",{get:()=>t.length,configurable:!1,enumerable:!1}),n})();let UZ;try{const e="__storage_test__";UZ=window.localStorage,UZ.setItem(e,e),UZ.removeItem(e)}catch(e){UZ=qZ()}const WZ={geom:{Rect:HZ},util:{Delay:Wb,Tools:gn,VK:Yv,URI:rA,EventDispatcher:PQ,Observable:LQ,I18n:Pc,LocalStorage:UZ,ImageUploader:MI},dom:{EventUtils:rc,TreeWalker:cr,TextSeeker:hd,DOMUtils:vc,ScriptLoader:kc,RangeUtils:Vy,Serializer:sN,StyleSheetLoader:$a,ControlSelection:ey,BookmarkManager:_v,Selection:YR,Event:rc.Event},html:{Styles:Wl,Entities:fl,Node:V_,Schema:Il,DomParser:SA,Writer:fw,Seri
vendor: 14,955 bytes, lines 37-38
37alizer:mw},Env:an,AddOnManager:Oc,Annotator:bv,Formatter:GI,UndoManager:ZI,EditorCommands:fQ,WindowManager:eI,NotificationManager:XN,EditorObservable:qQ,Shortcuts:cZ,Editor:mZ,FocusManager:jb,EditorManager:EZ,DOM:vc.DOM,ScriptLoader:kc.ScriptLoader,PluginManager:QN,ThemeManager:ZN,ModelManager:LN,IconManager:ON,Resource:jZ,FakeClipboard:TZ,trim:gn.trim,isArray:gn.isArray,is:gn.is,toArray:gn.toArray,makeMap:gn.makeMap,each:gn.each,map:gn.map,grep:gn.grep,inArray:gn.inArray,extend:gn.extend,walk:gn.walk,resolve:gn.resolve,explode:gn.explode,_addCacheSuffix:gn._addCacheSuffix},VZ=gn.extend(EZ,WZ),YZ=e=>{if("object"==typeof module)try{module.exports=e}catch(e){}};(e=>{window.tinymce=e,window.tinyMCE=e})(VZ),YZ(VZ)}(),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).Chartkick=t()}(this,function(){"use strict";function e(e){return"[object Array]"===Object.prototype.toString.call(e)}function t(e){return e instanceof Function}function n(e){return"[object Object]"===Object.prototype.toString.call(e)&&!t(e)&&e instanceof Object}function i(t,o){for(var r in o)"__proto__"!==r&&(n(o[r])||e(o[r])?(n(o[r])&&!n(t[r])&&(t[r]={}),e(o[r])&&!e(t[r])&&(t[r]=[]),i(t[r],o[r])):void 0!==o[r]&&(t[r]=o[r]))}function o(e,t){var n={};return i(n,e),i(n,t),n}function r(e){for(var t=0;t<e.length;t++)for(var n=e[t].data,i=0;i<n.length;i++)if(n[i][1]<0)return!0;return!1}function s(e){return""+e}function a(e){return parseFloat(e)}function l(e){if(e instanceof Date)return e;if("number"==typeof e)return new Date(1e3*e);var t=s(e),n=t.match(Ae);if(n){var i=parseInt(n[1],10),o=parseInt(n[2],10)-1,r=parseInt(n[3],10);return new Date(i,o,r)}var a=t.replace(/ /,"T").replace(" ","").replace("UTC","Z");return new Date(Date.parse(a)||t)}function c(t){if(e(t))return t;var n=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&n.push([i,t[i]]);return n}function d(e,t,n,i,s,a,l,c){return function(d,u,h){var p=d.data,f=o({},e);return f=o(f,h||{}),(d.singleSeriesFormat||"legend"in u)&&t(f,u.legend,d.singleSeriesFormat),u.title&&n(f,u.title),"min"in u?i(f,u.min):r(p)||i(f,0),u.max&&s(f,u.max),"stacked"in u&&a(f,u.stacked),u.colors&&(f.colors=u.colors),u.xtitle&&l(f,u.xtitle),u.ytitle&&c(f,u.ytitle),f=o(f,u.library||{})}}function u(e,t){return e[0].getTime()-t[0].getTime()}function h(e,t){return e[0]-t[0]}function p(e,t){return e-t}function f(e,t){for(var n=0;n<e.length;n++)if(!t(e[n]))return!1;return!0}function m(e){return"day"===e||"week"===e||"month"===e||"year"===e}function g(e,t){if(void 0===t&&(t=!1),0===e.length)return null;if(!f(e,function(e){return 0===e.getMilliseconds()&&0===e.getSeconds()}))return null;if(!f(e,function(e){return 0===e.getMinutes()}))return"minute";if(!f(e,function(e){return 0===e.getHours()}))return"hour";if(t)return"day";if(!f(e,function(e){return 1===e.getDate()})){var n=e[0].getDay();return f(e,function(e){return e.getDay()===n})?"week":"day"}return f(e,function(e){return 0===e.getMonth()})?"year":"month"}function v(e){return!isNaN(l(e))&&s(e).length>=6}function y(e){return"number"==typeof e}function b(e,t,n,i){e=e||"",n.prefix&&(t<0&&(t*=-1,e+="-"),e+=n.prefix);var o=n.suffix||"",r=n.precision,a=n.round;if(n.byteScale){var l=t>=0;l||(t*=-1);var c,d=i?n.byteScale:t;d>=0x1000000000000000?(t/=0x1000000000000000,c=6):d>=0x4000000000000?(t/=0x4000000000000,c=5):d>=1099511627776?(t/=1099511627776,c=4):d>=1073741824?(t/=1073741824,c=3):d>=1048576?(t/=1048576,c=2):d>=1024?(t/=1024,c=1):c=0,void 0===r&&void 0===a&&(t>=1023.5&&c<Me.length-1&&(t=1,c+=1),r=t>=1e3?4:3),o=" "+Me[c],l||(t*=-1)}if(void 0!==r&&void 0!==a)throw Error("Use either round or precision, not both");if(!i&&(void 0!==r&&(t=t.toPrecision(r),n.zeros||(t=parseFloat(t))),void 0!==a))if(a<0){var u=Math.pow(10,-1*a);t=parseInt((1*t/u).toFixed(0))*u}else t=t.toFixed(a),n.zeros||(t=parseFloat(t));if(n.thousands||n.decimal){var h=(t=s(t)).split(".");t=h[0],n.thousands&&(t=t.replace(/\B(?=(\d{3})+(?!\d))/g,n.thousands)),h.length>1&&(t+=(n.decimal||".")+h[1])}return e+t+o}function _(e,t,n){return n in t?t[n]:n in e.options?e.options[n]:null}function w(e,t,n){void 0!==t?(e.plugins.legend.display=!!t,t&&!0!==t&&(e.plugins.legend.position=t)):n&&(e.plugins.legend.display=!1)}function C(e,t){e.plugins.title.display=!0,e.plugins.title.text=t}function k(e,t){null!==t&&(e.scales.y.min=a(t))}function x(e,t){e.scales.y.max=a(t)}function S(e,t){null!==t&&(e.scales.x.min=a(t))}function E(e,t){e.scales.x.max=a(t)}function D(e,t){e.scales.x.stacked=!!t,e.scales.y.stacked=!!t}function T(e,t){e.scales.x.title.display=!0,e.scales.x.title.text=t}function A(e,t){e.scales.y.title.display=!0,e.scales.y.title.text=t}function M(e,t){var n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return n?"rgba("+parseInt(n[1],16)+", "+parseInt(n[2],16)+", "+parseInt(n[3],16)+", "+t+")":e}function R(e){return null!=e}function N(e,t,n){var i=Math.ceil(e.element.offsetWidth/4/t.labels.length);i>25?i=25:i<10&&(i=10),n.scales.x.ticks.callback||(n.scales.x.ticks.callback=function(e){return(e=s(this.getLabelForValue(e))).length>i?e.substring(0,i-2)+"...":e})}function I(e){for(var t=1,n=O(e);n>=1024;)t*=1024,n/=1024;return t}function P(e,t,n){var i={thousands:e.options.thousands,decimal:e.options.decimal},r=o({prefix:e.options.prefix,suffix:e.options.suffix,precision:e.options.precision,round:e.options.round,zeros:e.options.zeros},i);if(e.options.bytes){var a=e.data;"pie"===n&&(a=[{data:a}]),r.byteScale=I(a)}if("pie"!==n){var l=t.scales.y;"bar"===n&&(l=t.scales.x),r.byteScale&&(l.ticks.stepSize||(l.ticks.stepSize=r.byteScale/2),l.ticks.maxTicksLimit||(l.ticks.maxTicksLimit=4)),l.ticks.callback||(l.ticks.callback=function(e){return b("",e,r,!0)}),"scatter"!==n&&"bubble"!==n||t.scales.x.ticks.callback||(t.scales.x.ticks.callback=function(e){return b("",e,i,!0)})}if(!t.plugins.tooltip.callbacks.label)if("scatter"===n)t.plugins.tooltip.callbacks.label=function(e){var t=e.dataset.label||"";t&&(t+=": ");var n=e.parsed;return t+"("+b("",n.x,i)+", "+b("",n.y,r)+")"};else if("bubble"===n)t.plugins.tooltip.callbacks.label=function(e){var t=e.dataset.label||"";t&&(t+=": ");var n=e.raw;return t+"("+b("",n.x,i)+", "+b("",n.y,r)+", "+b("",n.v,i)+")"};else if("pie"===n)t.plugins.tooltip.callbacks.label=function(e){return b("",e.parsed,r)};else{var c="bar"===n?"x":"y";t.plugins.tooltip.callbacks.label=function(e){if(null!==e.parsed[c]){var t=e.dataset.label||"";return t&&(t+=": "),b(t,e.parsed[c],r)}}}"line"!==n&&"area"!==n||"number"!==e.xtype||(t.scales.x.ticks.callback||(t.scales.x.ticks.callback=function(e){return s(e)}),t.plugins.tooltip.callbacks.title||(t.plugins.tooltip.callbacks.title=function(e){return s(e[0].parsed.x)}))}function O(e){for(var t=0,n=0;n<e.length;n++)for(var i=e[n].data,o=0;o<i.length;o++){var r=Math.abs(i[o][1]);r>t&&(t=r)}return t}function L(e){for(var t=0,n=0;n<e.length;n++)for(var i=e[n].data,o=0;o<i.length;o++){var r=i[o][2];r>t&&(t=r)}return t}function B(e){for(var t=e.data,n={},i=[],o=[],r=[],s=0;s<t.length;s++)for(var a=t[s].data,l=0;l<a.length;l++){var c=a[l],d="datetime"===e.xtype?c[0].getTime():c[0];n[d]||(n[d]=new Array(t.length),i.push(d)),n[d][s]=c[1]}"datetime"!==e.xtype&&"number"!==e.xtype||i.sort(p);for(var u=0;u<t.length;u++)r.push([]);for(var h=0;h<i.length;h++){var f=i[h],m="datetime"===e.xtype?new Date(f):f;o.push(m);for(var g=n[f],v=0;v<t.length;v++){var y=g[v];r[v].push(void 0===y?null:y)}}return{labels:o,values:r}}function F(e){for(var t=e.data,n=[],i=L(t),o=0;o<t.length;o++){for(var r=t[o].data,s=[],a=0;a<r.length;a++){var l=r[a];s.push({x:l[0],y:l[1],r:20*l[2]/i,v:l[2]})}n.push(s)}return{labels:[],values:n}}function H(e){for(var t=e.data,n=[],i=0;i<t.length;i++){var o=t[i].data;o.sort(h);for(var r=[],s=0;s<o.length;s++){var a=o[s];r.push({x:a[0],y:a[1]})}n.push(r)}return{labels:[],values:n}}function $(e,t){return"bubble"===t?F(e):"number"===e.xtype&&"bar"!==t&&"column"!==t?H(e):B(e)}function z(t,n,i){for(var r=$(t,i),s=r.labels,a=r.values,c=t.data,d=[],u=t.options.colors||Ie,h=0;h<c.length;h++){var p=c[h],f=void 0,m=void 0;if(!t.options.colors||!t.singleSeriesFormat||"bar"!==i&&"column"!==i||p.color||!e(t.options.colors)||e(t.options.colors[0]))f=p.color||u[h],m="line"!==i?M(f,.5):f;else{f=u,m=[];for(var v=0;v<u.length;v++)m[v]=M(f[v],.5)}var y={label:p.name||"",data:a[h],fill:"area"===i,borderColor:f,backgroundColor:m,borderWidth:2},b="line"===i||"area"===i||"scatter"===i||"bubble"===i;b&&(y.pointBackgroundColor=f,y.pointHoverBackgroundColor=f,y.pointHitRadius=50),"bubble"===i&&(y.pointBackgroundColor=m,y.pointHoverBackgroundColor=m,y.pointHoverBorderWidth=2),p.stack&&(y.stack=p.stack),!1===_(t,p,"curve")?y.tension=0:b&&(y.tension=.4),!1===_(t,p,"points")&&(y.pointRadius=0,y.pointHoverRadius=0),y=o(y,t.options.dataset||{}),y=o(y,p.library||{}),y=o(y,p.dataset||{}),d.push(y)}var w=t.options.xmin,C=t.options.xmax;if("datetime"===t.xtype?(R(w)&&(n.scales.x.min=l(w).getTime()),R(C)&&(n.scales.x.max=l(C).getTime())):"number"===t.xtype&&(R(w)&&(n.scales.x.min=w),R(C)&&(n.scales.x.max=C)),"datetime"===t.xtype){var k=g(s);if(0===s.length&&(R(w)&&s.push(l(w)),R(C)&&s.push(l(C))),s.length>0){for(var x=(R(w)?l(w):s[0]).getTime(),S=(R(C)?l(C):s[0]).getTime(),E=1;E<s.length;E++){var D=s[E].getTime();D<x&&(x=D),D>S&&(S=D)}var T,A=(S-x)/864e5;if(!n.scales.x.time.unit)if("year"===k||A>3650?(n.scales.x.time.unit="year",T=365):"month"===k||A>300?(n.scales.x.time.unit="month",T=30):"week"===k||"day"===k||A>10?(n.scales.x.time.unit="day",T=1):"hour"===k||A>.5?(n.scales.x.time.displayFormats={hour:"MMM d, h a"},n.scales.x.time.unit="hour",T=1/24):"minute"===k&&(n.scales.x.time.displayFormats={minute:"h:mm a"},n.scales.x.time.unit="minute",T=1/24/60),T&&A>0){var N=t.element.offsetWidth;if(N>0){var I=Math.ceil(A/T/(N/100));"week"===k&&1===T&&(I=7*Math.ceil(I/7)),n.scales.x.ticks.stepSize=I}}n.scales.x.time.tooltipFormat||("year"===k?n.scales.x.time.tooltipFormat="yyyy":"month"===k?n.scales.x.time.tooltipFormat="MMM yyyy":"week"===k||"day"===k?n.scales.x.time.tooltipFormat="PP":"hour"===k?n.scales.x.time.tooltipFormat="MMM d, h a":"minute"===k&&(n.scales.x.time.tooltipFormat="h:mm a"))}}return{labels:s,datasets:d}}function j(e,t,n){void 0!==t?(e.legend.enabled=!!t,t&&!0!==t&&("top"===t||"bottom"===t?e.legend.verticalAlign=t:(e.legend.layout="vertical",e.legend.verticalAlign="middle",e.legend.align=t))):n&&(e.legend.enabled=!1)}function q(e,t){e.title.text=t}function U(e,t){e.yAxis.min=t}function W(e,t){e.yAxis.max=t}function V(e,t){var n=t?!0===t?"normal":t:null;e.plotOptions.series.stacking=n,e.plotOptions.area.stacking=n,e.plotOptions.areaspline.stacking=n}
38function Y(e,t){e.xAxis.title.text=t}function G(e,t){e.yAxis.title.text=t}function K(t,n,i){var o={prefix:t.options.prefix,suffix:t.options.suffix,thousands:t.options.thousands,decimal:t.options.decimal,precision:t.options.precision,round:t.options.round,zeros:t.options.zeros};"pie"===i||e(n.yAxis)||n.yAxis.labels.formatter||(n.yAxis.labels.formatter=function(){return b("",this.value,o)}),n.tooltip.pointFormatter||n.tooltip.pointFormat||(n.tooltip.pointFormatter=function(){return'<span style="color:'+this.color+'">\u25cf</span> '+b(this.series.name+": <b>",this.y,o)+"</b><br/>"})}function X(e,t,n){var i;void 0!==t?(i=t?!0===t?"right":t:"none",e.legend.position=i):n&&(e.legend.position="none")}function Q(e,t){e.title=t,e.titleTextStyle={color:"#333",fontSize:"20px"}}function Z(e,t){e.vAxis.viewWindow.min=t}function J(e,t){e.vAxis.viewWindow.max=t}function ee(e,t){e.hAxis.viewWindow.min=t}function te(e,t){e.hAxis.viewWindow.max=t}function ne(e,t){e.isStacked=t||!1}function ie(e,t){e.hAxis.title=t,e.hAxis.titleTextStyle.italic=!1}function oe(e,t){e.vAxis.title=t,e.vAxis.titleTextStyle.italic=!1}function re(e){window.attachEvent?window.attachEvent("onresize",e):window.addEventListener&&window.addEventListener("resize",e,!0),e()}function se(e){if(e){if("Highcharts"===e.product)return Fe;if(e.charts)return qe;if(t(e))return Oe}throw new Error("Unknown adapter")}function ae(e){for(var t=se(e),n=0;n<Ue.length;n++)if(Ue[n].library===e)return;Ue.push(new t(e))}function le(){"Chart"in window&&ae(window.Chart),"Highcharts"in window&&ae(window.Highcharts),window.google&&window.google.charts&&ae(window.google)}function ce(e,n){var i="render"+e,o=n.options.adapter;le();for(var r=0;r<Ue.length;r++){var s=Ue[r];if((!o||o===s.name)&&t(s[i]))return n.adapter=s.name,n.__adapterObject=s,s[i](n)}throw Ue.length>0?new Error("No charting library found for "+e):new Error("No charting libraries found - be sure to include one before your charts")}function de(e){for(var t=[],n=0;n<e.length;n++)t.push([a(e[n][0]),a(e[n][1]),a(e[n][2])]);return t}function ue(e,t){if("bubble"===t)return de(e);var n;n="number"===t?a:"datetime"===t?l:s;for(var i=[],o=0;o<e.length;o++)i.push([n(e[o][0]),a(e[o][1])]);return i}function he(e,t,n){return ve(e)?!n.xmin&&!n.xmax||n.xmin&&!v(n.xmin)||n.xmax&&!v(n.xmax)?"number":"datetime":pe(e,y)?"number":!t&&pe(e,v)?"datetime":"string"}function pe(e,t){for(var n=0;n<e.length;n++)for(var i=c(e[n].data),o=0;o<i.length;o++)if(!t(i[o][0]))return!1;return!0}function fe(e){for(var t=[],n=0;n<e.length;n++){var i={};for(var o in e[n])Object.prototype.hasOwnProperty.call(e[n],o)&&(i[o]=e[n][o]);t.push(i)}return t}function me(t,i,o){var r=t.options,s=t.rawData;t.singleSeriesFormat=!e(s)||!n(s[0]),t.singleSeriesFormat&&(s=[{name:r.label,data:s}]),s=fe(s);for(var a=0;a<s.length;a++)s[a].data=c(s[a].data);t.xtype=i||(r.discrete?"string":he(s,o,r));for(var l=0;l<s.length;l++)s[l].data=ue(s[l].data,t.xtype);return s}function ge(e){for(var t=c(e.rawData),n=0;n<t.length;n++)t[n]=[s(t[n][0]),a(t[n][1])];return t}function ve(e,t){if("PieChart"===t||"GeoChart"===t||"Timeline"===t)return 0===e.length;for(var n=0;n<e.length;n++)if(e[n].data.length>0)return!1;return!0}function ye(e){var t=e.options.download;!0===t?t={}:"string"==typeof t&&(t={filename:t});var n=document.createElement("a");n.download=t.filename||"chart.png",n.style.position="absolute",n.style.top="20px",n.style.right="20px",n.style.zIndex=1e3,n.style.lineHeight="20px",n.target="_blank";var i=document.createElement("img"),o='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Free 6.2.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2022 Fonticons, Inc. --><path fill="#CCCCCC" d="M344 240h-56L287.1 152c0-13.25-10.75-24-24-24h-16C234.7 128 223.1 138.8 223.1 152L224 240h-56c-9.531 0-18.16 5.656-22 14.38C142.2 263.1 143.9 273.3 150.4 280.3l88.75 96C243.7 381.2 250.1 384 256.8 384c7.781-.3125 13.25-2.875 17.75-7.844l87.25-96c6.406-7.031 8.031-17.19 4.188-25.88S353.5 240 344 240zM256 0C114.6 0 0 114.6 0 256s114.6 256 256 256s256-114.6 256-256S397.4 0 256 0zM256 464c-114.7 0-208-93.31-208-208S14
381.3 48 256 48s208 93.31 208 208S370.7 464 256 464z"/></svg>';i.src="data:image/svg+xml;utf8,"+encodeURIComponent(o),i.alt="Download",i.style.width="20px",i.style.height="20px",i.style.border="none",n.appendChild(i);var r=e.element;r.style.position="relative",e.__downloadAttached=!0,e.__enterEvent=r.addEventListener("mouseover",function(i){var o=i.relatedTarget;o&&(o===this||this.contains(o))||!e.options.download||(n.href=e.toImage(t),r.appendChild(n))}),e.__leaveEvent=r.addEventListener("mouseout",function(e){var t=e.relatedTarget;t&&(t===this||this.contains(t))||n.parentNode&&n.parentNode.removeChild(n)})}function be(e,t,n){Ve.push([e,t,n]),_e()}function _e(){if(Ye<Ge){var e=Ve.shift();e&&(Ye++,Ce(e[0],e[1],e[2]),_e())}}function we(){Ye--,_e()}function Ce(e,t,n){var i=new XMLHttpRequest;i.open("GET",e,!0),i.setRequestHeader("Content-Type","application/json"),i.onload=function(){we(),200===i.status?t(JSON.parse(i.responseText)):n(i.statusText)},i.send()}function ke(e,t){e.textContent=t}function xe(e,t,n){n||(t="Error Loading Chart: "+t),ke(e,t),e.style.color="#ff0000"}function Se(e){try{e.__render()}catch(t){throw xe(e.element,t.message),t}}function Ee(e,t,n){if(n&&e.options.loading&&("string"==typeof t||"function"==typeof t)&&ke(e.element,e.options.loading),"string"==typeof t)be(t,function(t){e.rawData=t,Se(e)},function(t){xe(e.element,t)});else if("function"==typeof t)try{t(function(t){e.rawData=t,Se(e)},function(t){xe(e.element,t,!0)})}catch(t){xe(e.element,t,!0)}else e.rawData=t,Se(e)}function De(e,t){if(ve(t.data,e)){var n=t.options.empty||t.options.messages&&t.options.messages.empty||"No data";ke(t.element,n)}else ce(e,t),t.options.download&&!t.__downloadAttached&&"chartjs"===t.adapter&&ye(t)}function Te(e){if("string"==typeof e){var t=e;if(!(e=document.getElementById(e)))throw new Error("No element with id "+t)}return e}var Ae=/^(\d\d\d\d)(?:-)?(\d\d)(?:-)?(\d\d)$/i,Me=["bytes","KB","MB","GB","TB","PB","EB"],Re={maintainAspectRatio:!1,animation:!1,plugins:{legend:{},tooltip:{displayColors:!1,callbacks:{}},title:{font:{size:20},color:"#333"}},interaction:{}},Ne={scales:{y:{ticks:{maxTicksLimit:4},title:{font:{size:16},color:"#333"},grid:{}},x:{grid:{drawOnChartArea:!1},title:{font:{size:16},color:"#333"},time:{},ticks:{}}}},Ie=["#3366CC","#DC3912","#FF9900","#109618","#990099","#3B3EAC","#0099C6","#DD4477","#66AA00","#B82E2E","#316395","#994499","#22AA99","#AAAA11","#6633CC","#E67300","#8B0707","#329262","#5574A6","#651067"],Pe=d(o(Re,Ne),w,C,k,x,D,T,A),Oe=function(e){this.name="chartjs",this.library=e};Oe.prototype.renderLineChart=function(e,t){t||(t="line");var n=Pe(e,o({},e.options));P(e,n,t);var i=z(e,n,t);"number"===e.xtype?(n.scales.x.type=n.scales.x.type||"linear",n.scales.x.position=n.scales.x.position||"bottom"):n.scales.x.type="string"===e.xtype?"category":"time",this.drawChart(e,"line",i,n)},Oe.prototype.renderPieChart=function(e){var t=o({},Re);e.options.donut&&(t.cutout="50%"),"legend"in e.options&&w(t,e.options.legend),e.options.title&&C(t,e.options.title),P(e,t=o(t,e.options.library||{}),"pie");for(var n=[],i=[],r=0;r<e.data.length;r++){var s=e.data[r];n.push(s[0]),i.push(s[1])}var a={data:i,backgroundColor:e.options.colors||Ie},l={labels:n,datasets:[a=o(a,e.options.dataset||{})]};this.drawChart(e,"pie",l,t)},Oe.prototype.renderColumnChart=function(e,t){var n;if("bar"===t){var i=o(Re,Ne);i.indexAxis="y",i.scales.x.grid.drawOnChartArea=!0,i.scales.y.grid.drawOnChartArea=!1,delete i.scales.y.ticks.maxTicksLimit,n=d(i,w,C,S,E,D,T,A)(e,e.options)}else n=Pe(e,e.options);P(e,n,t);var r=z(e,n,"column");"bar"!==t&&N(e,r,n),"mode"in n.interaction||(n.interaction.mode="index"),this.drawChart(e,"bar",r,n)},Oe.prototype.renderAreaChart=function(e){this.renderLineChart(e,"area")},Oe.prototype.renderBarChart=function(e){this.renderColumnChart(e,"bar")},Oe.prototype.renderScatterChart=function(e,t){t=t||"scatter";var n=Pe(e,e.options);P(e,n,t),"showLine"in n||(n.showLine=!1);var i=z(e,n,t);n.scales.x.type=n.scales.x.type||"linear",n.scales.x.position=n.scales.x.position||"bottom","mode"in n.interaction||(n.interaction.mode="nearest"),this.drawChart(e,t,i,n)},Oe.prototype.renderBubbleChart=function(e){this.renderScatterChart(e,"bubble")},Oe.prototype.destroy=function(e){e.chart&&e.chart.destroy()},Oe.prototype.drawChart=function(e,t,n,i){if(this.destroy(e),!e.destroyed){var o={type:t,data:n,options:i};e.options.code&&window.console.log("new Chart(ctx, "+JSON.stringify(o)+");"),e.element.innerHTML="<canvas></canvas>";var r=e.element.getElementsByTagName("CANVAS")[0];e.chart=new this.library(r,o)}};var Le={chart:{},xAxis:{title:{text:null},labels:{style:{fontSize:"12px"}}},yAxis:{title:{text:null},labels:{style:{fontSize:"12px"}}},title:{text:null},credits:{enabled:!1},legend:{borderWidth:0},tooltip:{style:{fontSize:"12px"}},plotOptions:{areaspline:{},area:{},series:{marker:{}}},time:{useUTC:!1}},Be=d(Le,j,q,U,W,V,Y,G),Fe=function(e){this.name="highcharts",this.library=e};Fe.prototype.renderLineChart=function(e,t){var n={};
vendor: 7,784 bytes, line 38
38"areaspline"===(t=t||"spline")&&(n={plotOptions:{areaspline:{stacking:"normal"},area:{stacking:"normal"},series:{marker:{enabled:!1}}}}),!1===e.options.curve&&("areaspline"===t?t="area":"spline"===t&&(t="line"));var i=Be(e,e.options,n);"number"===e.xtype?i.xAxis.type=i.xAxis.type||"linear":i.xAxis.type="string"===e.xtype?"category":"datetime",i.chart.type||(i.chart.type=t),K(e,i,t);for(var o=e.data,r=0;r<o.length;r++){o[r].name=o[r].name||"Value";var s=o[r].data;if("datetime"===e.xtype)for(var a=0;a<s.length;a++)s[a][0]=s[a][0].getTime();else"number"===e.xtype&&s.sort(h);o[r].marker={symbol:"circle"},!1===e.options.points&&(o[r].marker.enabled=!1)}this.drawChart(e,o,i)},Fe.prototype.renderScatterChart=function(e){var t=Be(e,e.options,{});t.chart.type="scatter",this.drawChart(e,e.data,t)},Fe.prototype.renderPieChart=function(e){var t=o(Le,{});e.options.colors&&(t.colors=e.options.colors),e.options.donut&&(t.plotOptions={pie:{innerSize:"50%"}}),"legend"in e.options&&j(t,e.options.legend),e.options.title&&q(t,e.options.title);var n=o(t,e.options.library||{});K(e,n,"pie");var i=[{type:"pie",name:e.options.label||"Value",data:e.data}];this.drawChart(e,i,n)},Fe.prototype.renderColumnChart=function(e,t){t=t||"column";var n=e.data,i=Be(e,e.options),o=[],r=[];i.chart.type=t,K(e,i,t);for(var s=0;s<n.length;s++)for(var a=n[s],l=0;l<a.data.length;l++){var c=a.data[l];o[c[0]]||(o[c[0]]=new Array(n.length),r.push(c[0])),o[c[0]][s]=c[1]}"number"===e.xtype&&r.sort(p),i.xAxis.categories=r;for(var d=[],u=0;u<n.length;u++){for(var h=[],f=0;f<r.length;f++)h.push(o[r[f]][u]||0);var m={name:n[u].name||"Value",data:h};n[u].stack&&(m.stack=n[u].stack),d.push(m)}this.drawChart(e,d,i)},Fe.prototype.renderBarChart=function(e){this.renderColumnChart(e,"bar")},Fe.prototype.renderAreaChart=function(e){this.renderLineChart(e,"areaspline")},Fe.prototype.destroy=function(e){e.chart&&e.chart.destroy()},Fe.prototype.drawChart=function(e,t,n){this.destroy(e),e.destroyed||(n.chart.renderTo=e.element.id,n.series=t,e.options.code&&window.console.log("new Highcharts.Chart("+JSON.stringify(n)+");"),e.chart=new this.library.Chart(n))};var He={},$e=[],ze={chartArea:{},fontName:"'Lucida Grande', 'Lucida Sans Unicode', Verdana, Arial, Helvetica, sans-serif",pointSize:6,legend:{textStyle:{fontSize:12,color:"#444"},alignment:"center",position:"right"},curveType:"function",hAxis:{textStyle:{color:"#666",fontSize:12},titleTextStyle:{},gridlines:{color:"transparent"},baselineColor:"#ccc",viewWindow:{}},vAxis:{textStyle:{color:"#666",fontSize:12},titleTextStyle:{},baselineColor:"#ccc",viewWindow:{}},tooltip:{textStyle:{color:"#666",fontSize:12}}},je=d(ze,X,Q,Z,J,ne,ie,oe),qe=function(e){this.name="google",this.library=e};qe.prototype.renderLineChart=function(e){var t=this;this.waitForLoaded(e,function(){var n={};!1===e.options.curve&&(n.curveType="none"),!1===e.options.points&&(n.pointSize=0);var i=je(e,e.options,n),o=t.createDataTable(e.data,e.xtype);t.drawChart(e,"LineChart",o,i)})},qe.prototype.renderPieChart=function(e){var t=this;this.waitForLoaded(e,function(){var n={chartArea:{top:"10%",height:"80%"},legend:{}};e.options.colors&&(n.colors=e.options.colors),e.options.donut&&(n.pieHole=.5),"legend"in e.options&&X(n,e.options.legend),e.options.title&&Q(n,e.options.title);var i=o(o(ze,n),e.options.library||{}),r=new t.library.visualization.DataTable;r.addColumn("string",""),r.addColumn("number","Value"),r.addRows(e.data),t.drawChart(e,"PieChart",r,i)})},qe.prototype.renderColumnChart=function(e){var t=this;this.waitForLoaded(e,function(){var n=je(e,e.options),i=t.createDataTable(e.data,e.xtype);t.drawChart(e,"ColumnChart",i,n)})},qe.prototype.renderBarChart=function(e){var t=this;this.waitForLoaded(e,function(){var n={hAxis:{gridlines:{color:"#ccc"}}},i=d(ze,X,Q,ee,te,ne,ie,oe)(e,e.options,n),o=t.createDataTable(e.data,e.xtype);t.drawChart(e,"BarChart",o,i)})},qe.prototype.renderAreaChart=function(e){var t=this;this.waitForLoaded(e,function(){var n={isStacked:!0,pointSize:0,areaOpacity:.5},i=je(e,e.options,n),o=t.createDataTable(e.data,e.xtype);t.drawChart(e,"AreaChart",o,i)})},qe.prototype.renderGeoChart=function(e){var t=this;this.waitForLoaded(e,"geochart",function(){var n={legend:"none",colorAxis:{colors:e.options.colors||["#f6c7b6","#ce502d"]}},i=o(o(ze,n),e.options.library||{}),r=new t.library.visualization.DataTable;r.addColumn("string",""),r.addColumn("number",e.options.label||"Value"),r.addRows(e.data),t.drawChart(e,"GeoChart",r,i)})},qe.prototype.renderScatterChart=function(e){var t=this;this.waitForLoaded(e,function(){for(var n={},i=je(e,e.options,n),o=e.data,r=[],s=0;s<o.length;s++){o[s].name=o[s].name||"Value";for(var a=o[s].data,l=0;l<a.length;l++){var c=new Array(o.length+1);c[0]=a[l][0],c[s+1]=a[l][1],r.push(c)}}var d=new t.library.visualization.DataTable;d.addColumn("number","");for(var u=0;u<o.length;u++)d.addColumn("number",o[u].name);d.addRows(r),t.drawChart(e,"ScatterChart",d,i)})},qe.prototype.renderTimeline=function(e){var t=this;this.waitForLoaded(e,"timeline",function(){var n={legend:"none"};e.options.colors&&(n.colors=e.options.colors);var i=o(o(ze,n),e.options.library||{}),r=new t.library.visualization.DataTable;r.addColumn({type:"string",id:"Name"}),r.addColumn({type:"date",id:"Start"}),r.addColumn({type:"date",id:"End"}),r.addRows(e.data),e.element.style.lineHeight="normal",t.drawChart(e,"Timeline",r,i)})},qe.prototype.destroy=function(e){e.chart&&e.chart.clearChart()},qe.prototype.drawChart=function(e,t,n,i){this.destroy(e),e.destroyed||(e.options.code&&window.console.log("var data = new google.visualization.DataTable("+n.toJSON()+");\nvar chart = new google.visualization."+t+"(element);\nchart.draw(data, "+JSON.stringify(i)+");"),e.chart=new this.library.visualization[t](e.element),re(function(){e.chart.draw(n,i)}))},qe.prototype.waitForLoaded=function(e,t,n){var i=this;if(n||(n=t,t="corechart"),$e.push({pack:t,callback:n}),He[t])this.runCallbacks();else{He[t]=!0;var o={packages:[t],callback:function(){i.runCallbacks()}},r=e.__config();r.language&&(o.language=r.language),"geochart"===t&&r.mapsApiKey&&(o.mapsApiKey=r.mapsApiKey),this.library.charts.load("current",o)}},qe.prototype.runCallbacks=function(){for(var e=0;e<$e.length;e++){var t=$e[e];this.library.visualization&&("corechart"===t.pack&&this.library.visualization.LineChart||"timeline"===t.pack&&this.library.visualization.Timeline||"geochart"===t.pack&&this.library.visualization.GeoChart)&&(t.callback(),$e.splice(e,1),e--)}},qe.prototype.createDataTable=function(e,t){for(var n=[],i=[],o=0;o<e.length;o++){var r=e[o];e[o].name=e[o].name||"Value";for(var a=0;a<r.data.length;a++){var l=r.data[a],c="datetime"===t?l[0].getTime():l[0];n[c]||(n[c]=new Array(e.length),i.push(c)),n[c][o]=l[1]}}for(var d=[],p=[],f=0;f<i.length;f++){var v=i[f],y=void 0;"datetime"===t?(y=new Date(v),p.push(y)):y=v,d.push([y].concat(n[v]))}var b=!0;if("datetime"===t)d.sort(u),b=m(g(p,!0));else if("number"===t){d.sort(h);for(var _=0;_<d.length;_++)d[_][0]=s(d[_][0]);t="string"}var w=new this.library.visualization.DataTable;t="datetime"===t&&b?"date":t,w.addColumn(t,"");for(var C=0;C<e.length;C++)w.addColumn("number",e[C].name);return w.addRows(d),w};var Ue=[],We={charts:{},configure:function(e){for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(We.config[t]=e[t])},setDefaultOptions:function(e){We.options=e},eachChart:function(e){for(var t in We.charts)Object.prototype.hasOwnProperty.call(We.charts,t)&&e(We.charts[t])},destroyAll:function(){for(var e in We.charts)Object.prototype.hasOwnProperty.call(We.charts,e)&&(We.charts[e].destroy(),delete We.charts[e])},config:{},options:{},adapters:Ue,addAdapter:ae,use:function(e){return ae(e),We}},Ve=[],Ye=0,Ge=4,Ke=function(e,t,n){this.element=Te(e),this.options=o(We.options,n||{}
38),this.dataSource=t,this.element.id&&(We.charts[this.element.id]=this),Ee(this,t,!0),this.options.refresh&&this.startRefresh()};Ke.prototype.getElement=function(){return this.element},Ke.prototype.getDataSource=function(){return this.dataSource},Ke.prototype.getData=function(){return this.data},Ke.prototype.getOptions=function(){return this.options},Ke.prototype.getChartObject=function(){return this.chart},Ke.prototype.getAdapter=function(){return this.adapter},Ke.prototype.updateData=function(e,t){this.dataSource=e,t&&this.__updateOptions(t),Ee(this,e,!0)},Ke.prototype.setOptions=function(e){this.__updateOptions(e),this.redraw()},Ke.prototype.redraw=function(){Ee(this,this.rawData)},Ke.prototype.refreshData=function(){if("string"==typeof this.dataSource){var e=-1===this.dataSource.indexOf("?")?"?":"&";Ee(this,this.dataSource+e+"_="+(new Date).getTime())}else"function"==typeof this.dataSource&&Ee(this,this.dataSource)},Ke.prototype.startRefresh=function(){var e=this,t=this.options.refresh;if(t&&"string"!=typeof this.dataSource&&"function"!=typeof this.dataSource)throw new Error("Data source must be a URL or callback for refresh");if(!this.intervalId){if(!t)throw new Error("No refresh interval");this.intervalId=setInterval(function(){e.refreshData()},1e3*t)}},Ke.prototype.stopRefresh=function(){this.intervalId&&(clearInterval(this.intervalId),this.intervalId=null)},Ke.prototype.toImage=function(e){if("chartjs"===this.adapter){if(e&&e.background&&"transparent"!==e.background){var t=this.chart.canvas,n=this.chart.ctx,i=document.createElement("canvas"),o=i.getContext("2d");return i.width=n.canvas.width,i.height=n.canvas.height,o.fillStyle=e.background,o.fillRect(0,0,i.width,i.height),o.drawImage(t,0,0),i.toDataURL("image/png")}return this.chart.toBase64Image()}throw new Error("Feature only available for Chart.js")},Ke.prototype.destroy=function(){this.destroyed=!0,this.stopRefresh(),this.__adapterObject&&this.__adapterObject.destroy(this),this.__enterEvent&&this.element.removeEventListener("mouseover",this.__enterEvent),this.__leaveEvent&&this.element.removeEventListener("mouseout",this.__leaveEvent)},Ke.prototype.__updateOptions=function(e){var t=e.refresh&&e.refresh!==this.options.refresh;this.options=o(We.options,e),t&&(this.stopRefresh(),this.startRefresh())},Ke.prototype.__render=function(){this.data=this.__processData(),De(this.__chartName(),this)},Ke.prototype.__config=function(){return We.config};var Xe=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.__processData=function(){return me(this)},t.prototype.__chartName=function(){return"LineChart"},t}(Ke),Qe=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.__processData=function(){return ge(this)},t.prototype.__chartName=function(){return"PieChart"},t}(Ke),Ze=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.__processData=function(){return me(this,null,!0)},t.prototype.__chartName=function(){return"ColumnChart"},t}(Ke),Je=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.__processData=function(){return me(this,null,!0)},t.prototype.__chartName=function(){return"BarChart"},t}(Ke),et=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.__processData=function(){return me(this)},t.prototype.__chartName=function(){return"AreaChart"},t}(Ke),tt=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.__processData=function(){return ge(this)},t.prototype.__chartName=function(){return"GeoChart"},t}(Ke),nt=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.__processData=function(){return me(this,"number")},t.prototype.__chartName=function(){return"ScatterChart"},t}(Ke),it=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.__processData=function(){return me(this,"bubble")},t.prototype.__chartName=function(){return"BubbleChart"},t}(Ke),ot=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.__processData=function(){for(var e=this.rawData,t=0;t<e.length;t++)e[t][1]=l(e[t][1]),e[t][2]=l(e[t][2]);return e},t.prototype.__chartName=function(){return"Timeline"},t}(Ke);return We.LineChart=Xe,We.PieChart=Qe,We.ColumnChart=Ze,We.BarChart=Je,We.AreaChart=et,We.GeoChart=tt,We.ScatterChart=nt,We.BubbleChart=it,We.Timeline=ot,"undefined"==typeof window||window.Chartkick||(window.Chartkick=We,document.addEventListener("turbolinks:before-render",function(){!1!==We.config.autoDestroy&&We.destroyAll()}),document.addEventListener("turbo:before-render",function(){!1!==We.config.autoDestroy&&We.destroyAll()}),setTimeout(function(){window.dispatchEvent(new Event("chartkick:load"))},0)),We.default=We,We}),function(e){if(!e.hasInitialised){var t={escapeRegExp:function(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},hasClass:function(e,t){var n=" ";return 1===e.nodeType&&(n+e.className+n).replace(/[\n\t]/g,n).indexOf(n+t+n)>=0},addClass:function(e,t){e.className+=" "+t},removeClass:function(e,t){var n=new RegExp("\\b"+this.escapeRegExp(t)+"\\b");e.className=e.className.replace(n,"")},interpolateString:function(e,t){var n=/{{([a-z][a-z0-9\-_]*)}}/gi;return e.replace(n,function(e){return t(arguments[1])||""})},getCookie:function(e){var t=("; "+document.cookie).split("; "+e+"=");return 2!=t.length?void 0:t.pop().split(";").shift()}
vendor: 1,307 bytes, line 38
38,setCookie:function(e,t,n,i,o){var r=new Date;r.setDate(r.getDate()+(n||365));var s=[e+"="+t,"expires="+r.toUTCString(),"path="+(o||"/")];i&&s.push("domain="+i),document.cookie=s.join(";")},deepExtend:function(e,t){for(var n in t)t.hasOwnProperty(n)&&(n in e&&this.isPlainObject(e[n])&&this.isPlainObject(t[n])?this.deepExtend(e[n],t[n]):e[n]=t[n]);return e},throttle:function(e,t){var n=!1;return function(){n||(e.apply(this,arguments),n=!0,setTimeout(function(){n=!1},t))}},hash:function(e){var t,n,i=0;if(0===e.length)return i;for(t=0,n=e.length;t<n;++t)i=(i<<5)-i+e.charCodeAt(t),i|=0;return i},normaliseHex:function(e){return"#"==e[0]&&(e=e.substr(1)),3==e.length&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]),e},getContrast:function(e){return e=this.normaliseHex(e),(299*parseInt(e.substr(0,2),16)+587*parseInt(e.substr(2,2),16)+114*parseInt(e.substr(4,2),16))/1e3>=128?"#000":"#fff"},getLuminance:function(e){var t=parseInt(this.normaliseHex(e),16),n=38,i=(t>>16)+n,o=(t>>8&255)+n,r=(255&t)+n;return"#"+(16777216+65536*(i<255?i<1?0:i:255)+256*(o<255?o<1?0:o:255)+(r<255?r<1?0:r:255)).toString(16).slice(1)},isMobile:function(){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)},isPlainObject:function(e){return"object"==typeof e&&null!==e&&e.constructor==Object}};
38e.status={deny:"deny",allow:"allow",dismiss:"dismiss"},e.transitionEnd=function(){var e=document.createElement("div"),t={t:"transitionend",OT:"oTransitionEnd",msT:"MSTransitionEnd",MozT:"transitionend",WebkitT:"webkitTransitionEnd"};for(var n in t)if(t.hasOwnProperty(n)&&void 0!==e.style[n+"ransition"])return t[n];return""}(),e.hasTransition=!!e.transitionEnd;var n=Object.keys(e.status).map(t.escapeRegExp);e.customStyles={},e.Popup=function(){function i(){this.initialise.apply(this,arguments)}function o(e){this.openingTimeout=null,t.removeClass(e,"cc-invisible")}function r(t){t.style.display="none",t.removeEventListener(e.transitionEnd,this.afterTransition),this.afterTransition=null}function s(){var t=this.options.onInitialise.bind(this);if(!window.navigator.cookieEnabled)return t(e.status.deny),!0;if(window.CookiesOK||window.navigator.CookiesOK)return t(e.status.allow),!0;var n=Object.keys(e.status),i=this.getStatus(),o=n.indexOf(i)>=0;return o&&t(i),o}function a(){var e=this.options.position.split("-"),t=[];return e.forEach(function(e){t.push("cc-"+e)}),t}function l(){var e=this.options,n="top"==e.position||"bottom"==e.position?"banner":"floating";t.isMobile()&&(n="floating");var i=["cc-"+n,"cc-type-"+e.type,"cc-theme-"+e.theme];return e.static&&i.push("cc-static"),i.push.apply(i,a.call(this)),h.call(this,this.options.palette),this.customStyleSelector&&i.push(this.customStyleSelector),i}function c(){var e={},n=this.options;n.showLink||(n.elements.link="",n.elements.messagelink=n.elements.message),Object.keys(n.elements).forEach(function(i){e[i]=t.interpolateString(n.elements[i],function(e){var t=n.content[e];return e&&"string"==typeof t&&t.length?t:""})});var i=n.compliance[n.type];i||(i=n.compliance.info),e.compliance=t.interpolateString(i,function(t){return e[t]});var o=n.layouts[n.layout];return o||(o=n.layouts.basic),t.interpolateString(o,function(t){return e[t]})}function d(n){var i=this.options,o=document.createElement("div"),r=i.container&&1===i.container.nodeType?i.container:document.body;o.innerHTML=n;var s=o.children[0];return s.style.display="none",t.hasClass(s,"cc-window")&&e.hasTransition&&t.addClass(s,"cc-invisible"),this.onButtonClick=u.bind(this),s.addEventListener("click",this.onButtonClick),i.autoAttach&&(r.firstChild?r.insertBefore(s,r.firstChild):r.appendChild(s)),s}function u(i){var o=i.target;if(t.hasClass(o,"cc-btn")){var r=o.className.match(new RegExp("\\bcc-("+n.join("|")+")\\b")),s=r&&r[1]||!1;s&&(this.setStatus(s),this.close(!0))}t.hasClass(o,"cc-close")&&(this.setStatus(e.status.dismiss),this.close(!0)),t.hasClass(o,"cc-revoke")&&this.revokeChoice()}function h(e){var n=t.hash(JSON.stringify(e)),i="cc-color-override-"+n,o=t.isPlainObject(e);return this.customStyleSelector=o?i:null,o&&p(n,e,"."+i),o}function p(n,i,o){if(e.customStyles[n])++e.customStyles[n].references;else{var r={},s=i.popup,a=i.button,l=i.highlight;s&&(s.text=s.text?s.text:t.getContrast(s.background),s.link=s.link?s.link:s.text,r[o+".cc-window"]=["color: "+s.text,"background-color: "+s.background],r[o+".cc-revoke"]=["color: "+s.text,"background-color: "+s.background],r[o+" .cc-link,"+o+" .cc-link:active,"+o+" .cc-link:visited"]=["color: "+s.link],a&&(a.text=a.text?a.text:t.getContrast(a.background),a.border=a.border?a.border:"transparent",r[o+" .cc-btn"]=["color: "+a.text,"border-color: "+a.border,"background-color: "+a.background],"transparent"!=a.background&&(r[o+" .cc-btn:hover, "+o+" .cc-btn:focus"]=["background-color: "+f(a.background)]),l?(l.text=l.text?l.text:t.getContrast(l.background),l.border=l.border?l.border:"transparent",r[o+" .cc-highlight .cc-btn:first-child"]=["color: "+l.text,"border-color: "+l.border,"background-color: "+l.background]):r[o+" .cc-highlight .cc-btn:first-child"]=["color: "+s.text]));var c=document.createElement("style");document.head.appendChild(c),e.customStyles[n]={references:1,element:c.sheet};var d=-1;for(var u in r)r.hasOwnProperty(u)&&c.sheet.insertRule(u+"{"+r[u].join(";")+"}",++d)}}function f(e){return"000000"==(e=t.normaliseHex(e))?"#222":t.getLuminance(e)}function m(n){if(t.isPlainObject(n)){var i=t.hash(JSON.stringify(n)),o=e.customStyles[i];if(o&&! --o.references){var r=o.element.ownerNode;r&&r.parentNode&&r.parentNode.removeChild(r),e.customStyles[i]=null}}}function g(e,t){for(var n=0,i=e.length;n<i;++n){var o=e[n];if(o instanceof RegExp&&o.test(t)||"string"==typeof o&&o.length&&o===t)return!0}return!1}function v(){var t=this.setStatus.bind(this),n=this.options.dismissOnTimeout;"number"==typeof n&&n>
38=0&&(this.dismissTimeout=window.setTimeout(function(){t(e.status.dismiss)},Math.floor(n)));var i=this.options.dismissOnScroll;if("number"==typeof i&&i>=0){var o=function(){window.pageYOffset>Math.floor(i)&&(t(e.status.dismiss),window.removeEventListener("scroll",o),this.onWindowScroll=null)};this.onWindowScroll=o,window.addEventListener("scroll",o)}}function y(){if("info"!=this.options.type&&(this.options.revokable=!0),t.isMobile()&&(this.options.animateRevokable=!1),this.options.revokable){var e=a.call(this);this.options.animateRevokable&&e.push("cc-animate"),this.customStyleSelector&&e.push(this.customStyleSelector);var n=this.options.revokeBtn.replace("{{classes}}",e.join(" "));this.revokeBtn=d.call(this,n);var i=this.revokeBtn;if(this.options.animateRevokable){var o=t.throttle(function(e){var n=!1,o=20,r=window.innerHeight-20;t.hasClass(i,"cc-top")&&e.clientY<o&&(n=!0),t.hasClass(i,"cc-bottom")&&e.clientY>r&&(n=!0),n?t.hasClass(i,"cc-active")||t.addClass(i,"cc-active"):t.hasClass(i,"cc-active")&&t.removeClass(i,"cc-active")},200);this.onMouseMove=o,window.addEventListener("mousemove",o)}}}var b={enabled:!0,container:null,cookie:{name:"cookieconsent_status",path:"/",domain:"",expiryDays:365},onPopupOpen:function(){},onPopupClose:function(){},onInitialise:function(){},onStatusChange:function(){},onRevokeChoice:function(){},content:{header:"Cookies used on the website!",message:"This website uses cookies to ensure you get the best experience on our website.",dismiss:"Got it!",allow:"Allow cookies",deny:"Decline",link:"Learn more",href:"http://cookie
38sandyou.com",close:"&#x274c;"},elements:{header:'<span class="cc-header">{{header}}</span>&nbsp;',message:'<span id="cookieconsent:desc" class="cc-message">{{message}}</span>',messagelink:'<span id="cookieconsent:desc" class="cc-message">{{message}} <a aria-label="learn more about cookies" role=button tabindex="0" class="cc-link" href="{{href}}" target="_blank">{{link}}</a></span>',dismiss:'<a aria-label="dismiss cookie message" role=button tabindex="0" class="cc-btn cc-dismiss">{{dismiss}}</a>',allow:'<a aria-label="allow cookies" role=button tabindex="0"  class="cc-btn cc-allow">{{allow}}</a>',deny:'<a aria-label="deny cookies" role=button tabindex="0" class="cc-btn cc-deny">{{deny}}</a>',link:'<a aria-label="learn more about cookies" role=button tabindex="0" class="cc-link" href="{{href}}" target="_blank">{{link}}</a>',close:'<span aria-label="dismiss cookie message" role=button tabindex="0" class="cc-close">{{close}}</span>'},window:'<div role="dialog" aria-live="polite" aria-label="cookieconsent" aria-describedby="cookieconsent:desc" class="cc-window {{classes}}"><!--googleoff: all-->{{children}}<!--googleon: all--></div>',revokeBtn:'<div class="cc-revoke {{classes}}">Cookie Policy</div>',compliance:{info:'<div class="cc-compliance">{{dismiss}}</div>',"opt-in":'<div class="cc-compliance cc-highlight">{{dismiss}}{{allow}}</div>',"opt-out":'<div class="cc-compliance cc-highlight">{{deny}}{{dismiss}}</div>'},type:"info",layouts:{basic:"{{messagelink}}{{compliance}}","basic-close":"{{messagelink}}{{compliance}}{{close}}","basic-header":"{{header}}{{message}}{{link}}{{compliance}}"},layout:"basic",position:"bottom",theme:"block",static:!1,palette:null,revokable:!1,animateRevokable:!0,showLink:!0,dismissOnScroll:!1,dismissOnTimeout:!1,autoOpen:!0,autoAttach:!0,whitelistPage:[],blacklistPage:[],overrideHTML:null};return i.prototype.initialise=function(e){this.options&&this.destroy(),t.deepExtend(this.options={},b),t.isPlainObject(e)&&t.deepExtend(this.options,e),s.call(this)&&(this.options.enabled=!1),g(this.options.blacklistPage,location.pathname)&&(this.options.enabled=!1),g(this.options.whitelistPage,location.pathname)&&(this.options.enabled=!0)
39;var n=this.options.window.replace("{{classes}}",l.call(this).join(" ")).replace("{{children}}",c.call(this)),i=this.options.overrideHTML;if("string"==typeof i&&i.length&&(n=i),this.options.static){var o=d.call(this,'<div class="cc-grower">'+n+"</div>");o.style.display="",this.element=o.firstChild,this.element.style.display="none",t.addClass(this.element,"cc-invisible")}else this.element=d.call(this,n);v.call(this),y.call(this),this.options.autoOpen&&this.autoOpen()},i.prototype.destroy=function(){this.onButtonClick&&this.element&&(this.element.removeEventListener("click",this.onButtonClick),this.onButtonClick=null),this.dismissTimeout&&(clearTimeout(this.dismissTimeout),this.dismissTimeout=null),this.onWindowScroll&&(window.removeEventListener("scroll",this.onWindowScroll),this.onWindowScroll=null),this.onMouseMove&&(window.removeEventListener("mousemove",this.onMouseMove),this.onMouseMove=null),this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.element=null,this.revokeBtn&&this.revokeBtn.parentNode&&this.revokeBtn.parentNode.removeChild(this.revokeBtn),this.revokeBtn=null,m(this.options.palette),this.options=null},i.prototype.open=function(){if(this.element)return this.isOpen()||(e.hasTransition?this.fadeIn():this.element.style.display="",this.options.revokable&&this.toggleRevokeButton(),this.options.onPopupOpen.call(this)),this},i.prototype.close=function(t){if(this.element)return this.isOpen()&&(e.hasTransition?this.fadeOut():this.element.style.display="none",t&&this.options.revokable&&this.toggleRevokeButton(!0),this.options.onPopupClose.call(this)),this},i.prototype.fadeIn=function(){var n=this.element;if(e.hasTransition&&n&&(this.afterTransition&&r.call(this,n),t.hasClass(n,"cc-invisible"))){if(n.style.display="",this.options.static){var i=this.element.clientHeight;this.element.parentNode.style.maxHeight=i+"px"}var s=20;this.openingTimeout=setTimeout(o.bind(this,n),s)}},i.prototype.fadeOut=function(){var n=this.element;e.hasTransition&&n&&(this.openingTimeout&&(clearTimeout(this.openingTimeout),o.bind(this,n)),t.hasClass(n,"cc-invisible")||(this.options.static&&(this.element.parentNode.style.maxHeight=""),this.afterTransition=r.bind(this,n),n.addEventListener(e.transitionEnd,this.afterTransition),t.addClass(n,"cc-invisible")))},i.prototype.isOpen=function(){return this.element&&""==this.element.style.display&&(!e.hasTransition||!t.hasClass(this.element,"cc-invisible"))},i.prototype.toggleRevokeButton=function(e){this.revokeBtn&&(this.revokeBtn.style.display=e?"":"none")},i.prototype.revokeChoice=function(e){this.options.enabled=!0,this.clearStatus(),this.options.onRevokeChoice.call(this),e||this.autoOpen()},i.prototype.hasAnswered=function(){return Object.keys(e.status).indexOf(this.getStatus())>=0}
vendor: 4,962 bytes, line 39
39,i.prototype.hasConsented=function(){var t=this.getStatus();return t==e.status.allow||t==e.status.dismiss},i.prototype.autoOpen=function(){!this.hasAnswered()&&this.options.enabled&&this.open()},i.prototype.setStatus=function(n){var i=this.options.cookie,o=t.getCookie(i.name),r=Object.keys(e.status).indexOf(o)>=0;Object.keys(e.status).indexOf(n)>=0?(t.setCookie(i.name,n,i.expiryDays,i.domain,i.path),this.options.onStatusChange.call(this,n,r)):this.clearStatus()},i.prototype.getStatus=function(){return t.getCookie(this.options.cookie.name)},i.prototype.clearStatus=function(){var e=this.options.cookie;t.setCookie(e.name,"",-1,e.domain,e.path)},i}(),e.Location=function(){function e(e){t.deepExtend(this.options={},r),t.isPlainObject(e)&&t.deepExtend(this.options,e),this.currentServiceIndex=-1}function n(e,t,n){var i,o=document.createElement("script");o.type="text/"+(e.type||"javascript"),o.src=e.src||e,o.async=!1,o.onreadystatechange=o.onload=function(){var e=o.readyState;clearTimeout(i),t.done||e&&!/loaded|complete/.test(e)||(t.done=!0,t(),o.onreadystatechange=o.onload=null)},document.body.appendChild(o),i=setTimeout(function(){t.done=!0,t(),o.onreadystatechange=o.onload=null},n)}function i(e,t,n,i,o){var r=new(window.XMLHttpRequest||window.ActiveXObject)("MSXML2.XMLHTTP.3.0");if(r.open(i?"POST":"GET",e,1),r.setRequestHeader("X-Requested-With","XMLHttpRequest"),r.setRequestHeader("Content-type","application/x-www-form-urlencoded"),Array.isArray(o))for(var s=0,a=o.length;s<a;++s){var l=o[s].split(":",2);r.setRequestHeader(l[0].replace(/^\s+|\s+$/g,""),l[1].replace(/^\s+|\s+$/g,""))}"function"==typeof t&&(r.onreadystatechange=function(){r.readyState>3&&t(r)}),r.send(i)}function o(e){return new Error("Error ["+(e.code||"UNKNOWN")+"]: "+e.error)}var r={timeout:5e3,services:["freegeoip","ipinfo","maxmind"],serviceDefinitions:{freegeoip:function(){return{url:"//freegeoip.net/json/?callback={callback}",isScript:!0,callback:function(e,t){try{var n=JSON.parse(t);return n.error?o(n):{code:n.country_code}}catch(e){return o({error:"Invalid response ("+e+")"})}}}},ipinfo:function(){return{url:"//ipinfo.io",headers:["Accept: application/json"],callback:function(e,t){try{var n=JSON.parse(t);return n.error?o(n):{code:n.country}}catch(e){return o({error:"Invalid response ("+e+")"})}}}},ipinfodb:function(){return{url:"//api.ipinfodb.com/v3/ip-country/?key={api_key}&format=json&callback={callback}",isScript:!0,callback:function(e,t){try{var n=JSON.parse(t);return"ERROR"==n.statusCode?o({error:n.statusMessage}):{code:n.countryCode}}catch(e){return o({error:"Invalid response ("+e+")"})}}}},maxmind:function(){return{url:"//js.maxmind.com/js/apis/geoip2/v2.1/geoip2.js",isScript:!0,callback:function(e){return window.geoip2?void geoip2.country(function(t){try{e({code:t.country.iso_code})}catch(t){e(o(t))}},function(t){e(o(t))}):void e(new Error("Unexpected response format. The downloaded script should have exported `geoip2` to the global scope"))}}}}};return e.prototype.getNextService=function(){var e;do{e=this.getServiceByIdx(++this.currentServiceIndex)}while(this.currentServiceIndex<this.options.services.length&&!e);return e},e.prototype.getServiceByIdx=function(e){var n=this.options.services[e];if("function"==typeof n){var i=n();return i.name&&t.deepExtend(i,this.options.serviceDefinitions[i.name](i)),i}return"string"==typeof n?this.options.serviceDefinitions[n]():t.isPlainObject(n)?this.options.serviceDefinitions[n.name](n):null},e.prototype.locate=function(e,t){var n=this.getNextService();return n?(this.callbackComplete=e,this.callbackError=t,void this.runService(n,this.runNextServiceOnError.bind(this))):void t(new Error("No services to run"))},e.prototype.setupUrl=function(e){var t=this.getCurrentServiceOpts();return e.url.replace(/\{(.*?)\}/g,function(n,i){if("callback"===i){var o="callback"+Date.now();return window[o]=function(t){e.__JSONP_DATA=JSON.stringify(t)},o}if(i in t.interpolateUrl)return t.interpolateUrl[i]})},e.prototype.runService=function(e,t){var o=this;e&&e.url&&e.callback&&(e.isScript?n:i)(this.setupUrl(e),function(n){var i=n?n.responseText:"";e.__JSONP_DATA&&(i=e.__JSONP_DATA,delete e.__JSONP_DATA),o.runServiceCallback.call(o,t,e,i)},this.options.timeout,e.data,e.headers)},e.prototype.runServiceCallback=function(e,t,n){var i=this,o=function(t){r||i.onServiceResult.call(i,e,t)},r=t.callback(o,n);r&&this.onServiceResult.call(this,e,r)},e.prototype.onServiceResult=function(e,t){t instanceof Error||t&&t.error?e.call(this,t,null):e.call(this,null,t)},e.prototype.runNextServiceOnError=function(e,t){if(e){this.logError(e);var n=this.getNextService();n?this.runService(n,this.runNextServiceOnError.bind(this)):this.completeService.call(this,this.callbackError,new Error("All services failed"))}else this.completeService.call(this,this.callbackComplete,t)},e.prototype.getCurrentServiceOpts=function(){var e=this.options.services[this.currentServiceIndex];return"string"==typeof e?{name:e}
39:"function"==typeof e?e():t.isPlainObject(e)?e:{}},e.prototype.completeService=function(e,t){this.currentServiceIndex=-1,e&&e(t)},e.prototype.logError=function(e){var t=this.currentServiceIndex,n=this.getServiceByIdx(t);console.error("The service["+t+"] ("+n.url+") responded with the following error",e)},e}(),e.Law=function(){function e(e){this.initialise.apply(this,arguments)}var n={regionalLaw:!0,hasLaw:["AT","BE","BG","HR","CZ","CY","DK","EE","FI","FR","DE","EL","HU","IE","IT","LV","LT","LU","MT","NL","PL","PT","SK","SI","ES","SE","GB","UK"],revokable:["HR","CY","DK","EE","FR","DE","LV","LT","NL","PT","ES"],explicitAction:["HR","IT","ES"]};return e.prototype.initialise=function(e){t.deepExtend(this.options={},n),t.isPlainObject(e)&&t.deepExtend(this.options,e)},e.prototype.get=function(e){var t=this.options;return{hasLaw:t.hasLaw.indexOf(e)>=0,revokable:t.revokable.indexOf(e)>=0,explicitAction:t.explicitAction.indexOf(e)>=0}},e.prototype.applyLaw=function(e,t){var n=this.get(t);return n.hasLaw||(e.enabled=!1),this.options.regionalLaw&&(n.revokable&&(e.revokable=!0),n.explicitAction&&(e.dismissOnScroll=!1,e.dismissOnTimeout=!1)),e},e}(),e.initialise=function(t,n,i){var o=new e.Law(t.law);n||(n=function(){}),i||(i=function(){}),e.getCountryCode(t,function(i){delete t.law,delete t.location,i.code&&(t=o.applyLaw(t,i.code)),n(new e.Popup(t))},function(n){delete t.law,delete t.location,i(n,new e.Popup(t))})},e.getCountryCode=function(t,n,i){t.law&&t.law.countryCode?n({code:t.law.countryCode}):t.location?new e.Location(t.location).locate(function(e){n(e||{})},i):n({})},e.utils=t,e.hasInitialised=!0,window.cookieconsent=e}}(window.cookieconsent||{}),$(document).on("turbo:click",function(e){if("#"===e.target.getAttribute("href").charAt(0))return e.preventDefault()}),window.App=window.App||{},function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).ActiveStorage={})}(this,function(e){"use strict";function t(e){const t=i(document.head,`meta[name="${e}"]`);if(t)return t.getAttribute("content")}function n(e,t){"string"==typeof e&&(t=e,e=document);return r(e.querySelectorAll(t))}function i(e,t){return"string"==typeof e&&(t=e,e=document),e.querySelector(t)}function o(e,t,n={}){const{disabled:i}=e,{bubbles:o,cancelable:r,detail:s}=n,a=document.createEvent("Event");a.initEvent(t,o||!0,r||!0),a.detail=s||{};try{e.disabled=!1,e.dispatchEvent(a)}finally{e.disabled=i}return a}function r(e){return Array.isArray(e)?e:Array.from?Array.from(e):[].slice.call(e)}function s(e,t,...n){if(e&&"function"==typeof e[t])return e[t](...n)}function a(){A||(A=!0,document.addEventListener("click",l,!0),document.addEventListener("submit",c,!0),document.addEventListener("ajax:before",d))}function l(e){const t=e.target.closest("button, input");t&&"submit"===t.type&&t.form&&T.set(t.form,t)}function c(e){u(e)}function d(e){"FORM"==e.target.tagName&&u(e)}function u(e){const t=e.target;if(t.hasAttribute(D))return void e.preventDefault();const n=new E(t),{inputs:i}=n;i.length&&(e.preventDefault(),t.setAttribute(D,""),i.forEach(p),n.start(e=>{t.removeAttribute(D),e?i.forEach(f):h(t)}))}function h(e){let t=T.get(e)||i(e,"input[type=submit], button[type=submit]");if(t){const{disabled:e}=t;t.disabled=!1,t.focus(),t.click(),t.disabled=e}else t=document.createElement("input"),t.type="submit",t.style.display="none",e.appendChild(t),t.click(),e.removeChild(t);T.delete(e)}function p(e){e.disabled=!0}function f(e){e.disabled=!1}function m(){window.ActiveStorage&&a()}var g={exports:{}};!function(e){var t;t=function(e){function t(e,t){var n=e[0],i=e[1],o=e[2],r=e[3];i=((i+=((o=((o+=((r=((r+=((n=((n+=(i&o|~i&r)+t[0]-680876936|0)<<7|n>>>25)+i|0)&i|~n&o)+t[1]-389564586|0)<<12|r>>>20)+n|0)&n|~r&i)+t[2]+606105819|0)<<17|o>>>15)+r|0)&r|~o&n)+t[3]-1044525330|0)<<22|i>>>10)+o|0,i=((i+=((o=((o+=((r=((r+=((n=((n+=(i&o|~i&r)+t[4]-176418897|0)<<7|n>>>25)+i|0)&i|~n&o)+t[5]+1200080426|0)<<12|r>>>20)+n|0)&n|~r&i)+t[6]-1473231341|0)<<17|o>>>15)+r|0)&r|~o&n)+t[7]-45705983|0)<<22|i>>>10)+o|0,i=((i+=((o=((o+=((r=((r+=((n=((n+=(i&o|~i&r)+t[8]+1770035416|0)<<7|n>>>25)+i|0)&i|~n&o)+t[9]-1958414417|0)<<12|r>>>20)+n|0)&n|~r&i)+t[10]-42063|0)<<17|o>>>
vendor: 4,163 bytes, line 39
3915)+r|0)&r|~o&n)+t[11]-1990404162|0)<<22|i>>>10)+o|0,i=((i+=((o=((o+=((r=((r+=((n=((n+=(i&o|~i&r)+t[12]+1804603682|0)<<7|n>>>25)+i|0)&i|~n&o)+t[13]-40341101|0)<<12|r>>>20)+n|0)&n|~r&i)+t[14]-1502002290|0)<<17|o>>>15)+r|0)&r|~o&n)+t[15]+1236535329|0)<<22|i>>>10)+o|0,i=((i+=((o=((o+=((r=((r+=((n=((n+=(i&r|o&~r)+t[1]-165796510|0)<<5|n>>>27)+i|0)&o|i&~o)+t[6]-1069501632|0)<<9|r>>>23)+n|0)&i|n&~i)+t[11]+643717713|0)<<14|o>>>18)+r|0)&n|r&~n)+t[0]-373897302|0)<<20|i>>>12)+o|0,i=((i+=((o=((o+=((r=((r+=((n=((n+=(i&r|o&~r)+t[5]-701558691|0)<<5|n>>>27)+i|0)&o|i&~o)+t[10]+38016083|0)<<9|r>>>23)+n|0)&i|n&~i)+t[15]-660478335|0)<<14|o>>>18)+r|0)&n|r&~n)+t[4]-405537848|0)<<20|i>>>12)+o|0,i=((i+=((o=((o+=((r=((r+=((n=((n+=(i&r|o&~r)+t[9]+568446438|0)<<5|n>>>27)+i|0)&o|i&~o)+t[14]-1019803690|0)<<9|r>>>23)+n|0)&i|n&~i)+t[3]-187363961|0)<<14|o>>>18)+r|0)&n|r&~n)+t[8]+1163531501|0)<<20|i>>>12)+o|0,i=((i+=((o=((o+=((r=((r+=((n=((n+=(i&r|o&~r)+t[13]-1444681467|0)<<5|n>>>27)+i|0)&o|i&~o)+t[2]-51403784|0)<<9|r>>>23)+n|0)&i|n&~i)+t[7]+1735328473|0)<<14|o>>>18)+r|0)&n|r&~n)+t[12]-1926607734|0)<<20|i>>>12)+o|0,i=((i+=((o=((o+=((r=((r+=((n=((n+=(i^o^r)+t[5]-378558|0)<<4|n>>>28)+i|0)^i^o)+t[8]-2022574463|0)<<11|r>>>21)+n|0)^n^i)+t[11]+1839030562|0)<<16|o>>>16)+r|0)^r^n)+t[14]-35309556|0)<<23|i>>>9)+o|0,i=((i+=((o=((o+=((r=((r+=((n=((n+=(i^o^r)+t[1]-1530992060|0)<<4|n>>>28)+i|0)^i^o)+t[4]+1272893353|0)<<11|r>>>21)+n|0)^n^i)+t[7]-155497632|0)<<16|o>>>16)+r|0)^r^n)+t[10]-1094730640|0)<<23|i>>>9)+o|0,i=((i+=((o=((o+=((r=((r+=((n=((n+=(i^o^r)+t[13]+681279174|0)<<4|n>>>28)+i|0)^i^o)+t[0]-358537222|0)<<11|r>>>21)+n|0)^n^i)+t[3]-722521979|0)<<16|o>>>16)+r|0)^r^n)+t[6]+76029189|0)<<23|i>>>9)+o|0,i=((i+=((o=((o+=((r=((r+=((n=((n+=(i^o^r)+t[9]-640364487|0)<<4|n>>>28)+i|0)^i^o)+t[12]-421815835|0)<<11|r>>>21)+n|0)^n^i)+t[15]+530742520|0)<<16|o>>>16)+r|0)^r^n)+t[2]-995338651|0)<<23|i>>>9)+o|0,i=((i+=((r=((r+=(i^((n=((n+=(o^(i|~r))+t[0]-198630844|0)<<6|n>>>26)+i|0)|~o))+t[7]+1126891415|0)<<10|r>>>22)+n|0)^((o=((o+=(n^(r|~i))+t[14]-1416354905|0)<<15|o>>>17)+r|0)|~n))+t[5]-57434055|0)<<21|i>>>11)+o|0,i=((i+=((r=((r+=(i^((n=((n+=(o^(i|~r))+t[12]+1700485571|0)<<6|n>>>26)+i|0)|~o))+t[3]-1894986606|0)<<10|r>>>22)+n|0)^((o=((o+=(n^(r|~i))+t[10]-1051523|0)<<15|o>>>17)+r|0)|~n))+t[1]-2054922799|0)<<21|i>>>11)+o|0,i=((i+=((r=((r+=(i^((n=((n+=(o^(i|~r))+t[8]+1873313359|0)<<6|n>>>26)+i|0)|~o))+t[15]-30611744|0)<<10|r>>>22)+n|0)^((o=((o+=(n^(r|~i))+t[6]-1560198380|0)<<15|o>>>17)+r|0)|~n))+t[13]+1309151649|0)<<21|i>>>11)+o|0,i=((i+=((r=((r+=(i^((n=((n+=(o^(i|~r))+t[4]-145523070|0)<<6|n>>>26)+i|0)|~o))+t[11]-1120210379|0)<<10|r>>>22)+n|0)^((o=((o+=(n^(r|~i))+t[2]+718787259|0)<<15|o>>>17)+r|0)|~n))+t[9]-343485551|0)<<21|i>>>11)+o|0,e[0]=n+e[0]|0,e[1]=i+e[1]|0,e[2]=o+e[2]|0,e[3]=r+e[3]|0}function n(e){var t,n=[];for(t=0;t<64;t+=4)n[t>>2]=e.charCodeAt(t)+(e.charCodeAt(t+1)<<8)+(e.charCodeAt(t+2)<<16)+(e.charCodeAt(t+3)<<24);return n}function i(e){var t,n=[];for(t=0;t<64;t+=4)n[t>>2]=e[t]+(e[t+1]<<8)+(e[t+2]<<16)+(e[t+3]<<24);return n}function o(e){var i,o,r,s,a,l,c=e.length,d=[1732584193,-271733879,-1732584194,271733878];for(i=64;i<=c;i+=64)t(d,n(e.substring(i-64,i)));for(o=(e=e.substring(i-64)).length,r=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],i=0;i<o;i+=1)r[i>>2]|=e.charCodeAt(i)<<(i%4<<3);if(r[i>>2]|=128<<(i%4<<3),i>55)for(t(d,r),i=0;i<16;i+=1)r[i]=0;return s=(s=8*c).toString(16).match(/(.*?)(.{0,8})$/),a=parseInt(s[2],16),l=parseInt(s[1],16)||0,r[14]=a,r[15]=l,t(d,r),d}function r(e){var n,o,r,s,a,l,c=e.length,d=[1732584193,-271733879,-1732584194,271733878];for(n=64;n<=c;n+=64)t(d,i(e.subarray(n-64,n)));for(o=(e=n-64<c?e.subarray(n-64):new Uint8Array(0)).length,r=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],n=0;n<o;n+=1)r[n>>2]|=e[n]<<(n%4<<3);if(r[n>>2]|=128<<(n%4<<3),n>55)for(t(d,r),n=0;n<16;n+=1)r[n]=0;return s=(s=8*c).toString(16).match(/(.*?)(.{0,8})$/),a=parseInt(s[2],16),l=parseInt(s[1],16)||0,r[14]=a,r[15]=l,t(d,r),d}function s(e){var t,n="";for(t=0;t<4;t+=1)n+=f[e>>8*t+4&15]+f[e>>8*t&15];return n}function a(e){var t;for(t=0;t<e.length;t+=1)e[t]=s(e[t]);return e.join("")}function l(e){return/[\u0080-\uFFFF]/.test(e)&&(e=unescape(encodeURIComponent(e))),e}
39function c(e,t){var n,i=e.length,o=new ArrayBuffer(i),r=new Uint8Array(o);for(n=0;n<i;n+=1)r[n]=e.charCodeAt(n);return t?r:o}function d(e){return String.fromCharCode.apply(null,new Uint8Array(e))}function u(e,t,n){var i=new Uint8Array(e.byteLength+t.byteLength);return i.set(new Uint8Array(e)),i.set(new Uint8Array(t),e.byteLength),n?i:i.buffer}function h(e){var t,n=[],i=e.length;for(t=0;t<i-1;t+=2)n.push(parseInt(e.substr(t,2),16));return String.fromCharCode.apply(String,n)}function p(){this.reset()}var f=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];return a(o("hello")),"undefined"==typeof ArrayBuffer||ArrayBuffer.prototype.slice||function(){function t(e,t){return(e=0|e||0)<0?Math.max(e+t,0):Math.min(e,t)}ArrayBuffer.prototype.slice=function(n,i){var o,r,s,a,l=this.byteLength,c=t(n,l),d=l;return i!==e&&(d=t(i,l)),c>d?new ArrayBuffer(0):(o=d-c,r=new ArrayBuffer(o),s=new Uint8Array(r),a=new Uint8Array(this,c,o),s.set(a),r)}}(),p.prototype.append=function(e){return this.appendBinary(l(e)),this},p.prototype.appendBinary=function(e){this._buff+=e,this._length+=e.length;var i,o=this._buff.length;for(i=64;i<=o;i+=64)t(this._hash,n(this._buff.substring(i-64,i)));return this._buff=this._buff.substring(i-64),this},p.prototype.end=function(e){var t,n,i=this._buff,o=i.length,r=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<o;t+=1)r[t>>2]|=i.charCodeAt(t)<<(t%4<<3);return this._finish(r,o),n=a(this._hash),e&&(n=h(n)),this.reset(),n},p.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},p.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},p.prototype.setState=function(e){return this._buff=e.buff,this._length=e.length,this._hash=e.hash,this},p.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},p.prototype._finish=function(e,n){var i,o,r,s=n;if(e[s>>2]|=128<<(s%4<<3),s>55)for(t(this._hash,e),s=0;s<16;s+=1)e[s]=0;i=(i=8*this._length).toString(16).match(/(.*?)(.{0,8})$/),o=parseInt(i[2],16),r=parseInt(i[1],16)||0,e[14]=o,e[15]=r,t(this._hash,e)},p.hash=function(e,t){return p.hashBinary(l(e),t)},p.hashBinary=function(e,t){var n=a(o(e));return t?h(n):n},p.ArrayBuffer=function(){this.reset()},p.ArrayBuffer.prototype.append=function(e){var n,o=u(this._buff.buffer,e,!0),r=o.length;for(this._length+=e.byteLength,n=64;n<=r;n+=64)t(this._hash,i(o.subarray(n-64,n)));return this._buff=n-64<r?new Uint8Array(o.buffer.slice(n-64)):new Uint8Array(0),this},p.ArrayBuffer.prototype.end=function(e){var t,n,i=this._buff,o=i.length,r=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<o;t+=1)r[t>>2]|=i[t]<<(t%4<<3);return this._finish(r,o),n=a(this._hash),e&&(n=h(n)),this.reset(),n},p.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},p.ArrayBuffer.prototype.getState=function(){var e=p.prototype.getState.call(this);return e.buff=d(e.buff),e},p.ArrayBuffer.prototype.setState=function(e){return e.buff=c(e.buff,!0),p.prototype.setState.call(this,e)},p.ArrayBuffer.prototype.destroy=p.prototype.destroy,p.ArrayBuffer.prototype._finish=p.prototype._finish,p.ArrayBuffer.hash=function(e,t){var n=a(r(new Uint8Array(e)));return t?h(n):n},p},e.exports=t()}(g);var v=g.exports;const y=File.prototype.slice||File.prototype.mozSlice||File.prototype.webkitSlice;class b{static create(e,t){new b(e).create(t)}constructor(e){this.file=e,this.chunkSize=2097152,this.chunkCount=Math.ceil(this.file.size/this.chunkSize),this.chunkIndex=0}create(e){this.callback=e,this.md5Buffer=new v.ArrayBuffer,this.fileReader=new FileReader,this.fileReader.addEventListener("load",e=>this.fileReaderDidLoad(e)),this.fileReader.addEventListener("error",e=>this.fileReaderDidError(e)),this.readNextChunk()}fileReaderDidLoad(e){if(this.md5Buffer.append(e.target.result),!this.readNextChunk()){const e=this.md5Buffer.end(!0),t=btoa(e);this.callback(null,t)}}fileReaderDidError(e){this.callback(`Error reading ${this.file.name}`)}readNextChunk(){if(this.chunkIndex<this.chunkCount||0==this.chunkIndex&&0==this.chunkCount){const e=this.chunkIndex*this.chunkSize,t=Math.min(e+this.chunkSize,this.file.size),n=y.call(this.file,e,t);return this.fileReader.readAsArrayBuffer(n),this.chunkIndex++,!0}return!1}}class _{constructor(e,n,i,o={}){this.file=e,this.attributes={filename:e.name,content_type:e.type||"application/octet-stream",byte_size:e.size,checksum:n},this.xhr=new XMLHttpRequest,this.xhr.open("POST",i,!0),this.xhr.responseType="json",this.xhr.setRequestHeader("Content-Type","application/json"),this.xhr.setRequestHeader("Accept","application/json"),this.xhr.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(o).forEac
39h(e=>{this.xhr.setRequestHeader(e,o[e])});const r=t("csrf-token");null!=r&&this.xhr.setRequestHeader("X-CSRF-Token",r),this.xhr.addEventListener("load",e=>this.requestDidLoad(e)),this.xhr.addEventListener("error",e=>this.requestDidError(e))}get status(){return this.xhr.status}get response(){const{responseType:e,response:t}=this.xhr;return"json"==e?t:JSON.parse(t)}create(e){this.callback=e,this.xhr.send(JSON.stringify({blob:this.attributes}))}requestDidLoad(e){if(this.status>=200&&this.status<300){const{response:e}=this,{direct_upload:t}=e;delete e.direct_upload,this.attributes=e,this.directUploadData=t,this.callback(null,this.toJSON())}else this.requestDidError(e)}requestDidError(e){this.callback(`Error creating Blob for "${this.file.name}". Status: ${this.status}`)}toJSON(){const e={};for(const t in this.attributes)e[t]=this.attributes[t];return e}}class w{constructor(e){this.blob=e,this.file=e.file;const{url:t,headers:n}=e.directUploadData;this.xhr=new XMLHttpRequest,this.xhr.open("PUT",t,!0),this.xhr.responseType="text";for(const e in n)this.xhr.setRequestHeader(e,n[e]);this.xhr.addEventListener("load",e=>this.requestDidLoad(e)),this.xhr.addEventListener("error",e=>this.requestDidError(e))}create(e){this.callback=e,this.xhr.send(this.file.slice())}requestDidLoad(e){const{status:t,response:n}=this.xhr;t>=200&&t<300?this.callback(null,n):this.requestDidError(e)}requestDidError(e){this.callback(`Error storing "${this.file.name}". Status: ${this.xhr.status}`)}}let C=0;class k{constructor(e,t,n,i={}){this.id=++C,this.file=e,this.url=t,this.delegate=n,this.customHeaders=i}create(e){b.create(this.file,(t,n)=>{if(t)return void e(t);const i=new _(this.file,n,this.url,this.customHeaders);s(this.delegate,"directUploadWillCreateBlobWithXHR",i.xhr),i.create(t=>{if(t)e(t);else{const t=new w(i);s(this.delegate,"directUploadWillStoreFileWithXHR",t.xhr),t.create(t=>{t?e(t):e(null,i.toJSON())})}})})}}class x{constructor(e,t){this.input=e,this.file=t,this.directUpload=new k(this.file,this.url,this),this.dispatch("initialize")}start(e){const t=document.createElement("input");t.type="hidden",t.name=this.input.name,this.input.insertAdjacentElement("beforebegin",t),this.dispatch("start"),this.directUpload.create((n,i)=>{n?(t.parentNode.removeChild(t),this.dispatchError(n)):t.value=i.signed_id,this.dispatch("end"),e(n)})}uploadRequestDidProgress(e){const t=e.loaded/e.total*90;t&&this.dispatch("progress",{progress:t})}get url(){return this.input.getAttribute("data-direct-upload-url")}dispatch(e,t={}){return t.file=this.file,t.id=this.directUpload.id,o(this.input,`direct-upload:${e}`,{detail:t})}dispatchError(e){this.dispatch("error",{error:e}).defaultPrevented||alert(e)}directUploadWillCreateBlobWithXHR(e){this.dispatch("before-blob-request",{xhr:e})}directUploadWillStoreFileWithXHR(e){this.dispatch("before-storage-request",{xhr:e}),e.upload.addEventListener("progress",e=>this.uploadRequestDidProgress(e)),e.upload.addEventListener("loadend",()=>{this.simulateResponseProgress(e)})}simulateResponseProgress(e){let t=90;const n=Date.now(),i=()=>{const o=Date.now()-n,r=this.estimateResponseTime(),s=Math.min(o/r,1);t=90+9*s,this.dispatch("progress",{progress:t}),e.readyState!==XMLHttpRequest.DONE&&t<99&&requestAnimationFrame(i)};e.addEventListener("loadend",()=>{this.dispatch("progress",{progress:100})}),requestAnimationFrame(i)}estimateResponseTime(){const e=this.file.size,t=1048576;return e<t?1e3:e<10*t?2e3:3e3+e/t*50}}const S="input[type=file][data-direct-upload-url]:not([disabled])";class E{constructor(e){this.form=e,this.inputs=n(e,S).filter(e=>e.files.length)}start(e){const t=this.createDirectUploadControllers(),n=()=>{const i=t.shift();i?i.start(t=>{t?(e(t),this.dispatch("end")):n()}):(e(),this.dispatch("end"))};this.dispatch("start"),n()}createDirectUploadControllers(){const e=[];return this.inputs.forEach(t=>{r(t.files).forEach(n=>{const i=new x(t,n);e.push(i)})}),e}dispatch(e,t={}){return o(this.form,`direct-uploads:${e}`,{detail:t})}}const D="data-direct-uploads-processing",T=new WeakMap;let A=!1;setTimeout(m,1),e.DirectUpload=k,e.DirectUploadController=x,e.DirectUploadsController=E,e.dispatchEvent=o,e.start=a,Object.defineProperty(e,"__esMo
39dule",{value:!0})}),function(){function e(){return{btn:document.getElementById("hv-profile-btn"),menu:document.getElementById("hv-profile-dropdown")}}function t(e){return Array.prototype.slice.call(e.querySelectorAll("a[href], button:not([disabled])")).filter(function(e){return null!==e.offsetParent})}function n(e){return"true"===e.getAttribute("aria-expanded")}function i(e,n,i){if(n.style.display="block",e.setAttribute("aria-expanded","true"),i){var o=t(n);o.length&&o[0].focus()}}function o(e,t,n){t.style.display="none",e.setAttribute("aria-expanded","false"),n&&e&&e.focus()}function r(e){return/^(input|select|textarea|button|a)$/i.test(e.tagName)||e.hasAttribute("tabindex")}function s(){var e=Array.prototype.slice.call(document.querySelectorAll('[aria-invalid="true"]')).filter(function(e){return null!==e.offsetParent})[0];if(e){var t=e;if(!r(t)){var n=t.querySelector('input:not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex]:not([tabindex="-1"])');n&&(t=n)}try{t.focus({preventScroll:!0}),t.scrollIntoView&&t.scrollIntoView({block:"center"})}catch(e){}}}document.addEventListener("click",function(t){var r=e();r.btn&&r.menu&&(t.target.closest("#hv-profile-btn")?n(r.btn)?o(r.btn,r.menu,!1):i(r.btn,r.menu,0===t.detail):n(r.btn)&&!t.target.closest("#hv-profile-dropdown")&&o(r.btn,r.menu,!1))}),document.addEventListener("keydown",function(r){var s=e();if(s.btn&&s.menu){var a=r.target.closest("#hv-profile-btn"),l=r.target.closest("#hv-profile-dropdown");if(a||l){var c=t(s.menu);if(a)"ArrowDown"===r.key?(r.preventDefault(),n(s.btn)||i(s.btn,s.menu,!1),c.length&&c[0].focus()):"ArrowUp"===r.key?(r.preventDefault(),n(s.btn)||i(s.btn,s.menu,!1),c.length&&c[c.length-1].focus()):"Escape"===r.key&&n(s.btn)&&o(s.btn,s.menu,!0);else if("Escape"===r.key)r.preventDefault(),o(s.btn,s.menu,!0);else if("ArrowDown"===r.key||"ArrowUp"===r.key||"Home"===r.key||"End"===r.key){if(r.preventDefault(),!c.length)return;var d=c.indexOf(r.target);c["Home"===r.key?0:"End"===r.key?c.length-1:"ArrowDown"===r.key?(d+1)%c.length:(d-1+c.length)%c.length].focus()}}}}),document.addEventListener("focusout",function(t){var i=e();if(i.btn&&i.menu&&n(i.btn)){var r=t.relatedTarget;!r||i.btn.contains(r)||i.menu.contains(r)||o(i.btn,i.menu,!1)}}),document.addEventListener("turbo:before-cache",function(){var t=e();t.btn&&t.menu&&o(t.btn,t.menu,!1)}),document.addEventListener("turbo:load",s),document.addEventListener("DOMContentLoaded",s)}(),$(document).on("turbo:load",function(){if($(".galleria").length<1)return;const e={responsive:!0,height:.643};Galleria.loadTheme("https://cdnjs.cloudflare.com/ajax/libs/galleria/1.6.1/themes/folio/galleria.folio.min.js"),Galleria.loadTheme("https://cdnjs.cloudflare.com/ajax/libs/galleria/1.6.1/themes/classic/galleria.classic.min.js");let t=!1;$(".galleria.folio").length>0&&(Galleria.run(".galleria.folio",Object.assign({theme:"folio"},e)),t=!0),$(".galleria.classic").length>0&&(Galleria.run(".galleria.classic",Object.assign({theme:"classic"},e)),t=!0),t||Galleria.run(".galleria",Object.assign({debug:!0,wait:!0},e)),Galleria.ready(function(){"classic"===this.theme.name&&this.play(5e3)})}),$(document).on("turbo:load",initAlbumEdit),$(document).on("turbo:load",function(){let e=$(".background-check-submit-button"),t=$("#background_check_package_slug"),n=$("#background_check_package_slug_hidden"),i=function(){this.checked?e.each((e,t)=>{$(t).prop("disabled",!1),$(t).css("background-color","#AA1A26")}):e.each((e,t)=>{$(t).prop("disabled",!0),$(t).css("background-color","#939393")})};$("#terms-accept-checkbox").change(i),i();let o=function(){$(".background_package_description").hide(),$("#"+t.val()).show(),n.val(t.val())};o(),t.change(o),"A"===e.prop("nodeName")&&e.each((e,t)=>{$(t).click(e=>{$("#terms-accept-checkbox").prop("checked")||e.preventDefault()})})}),document.addEventListener("turbo:load",initOnLoadBlogPosts2),document.addEventListener("DOMContentLoaded",initOnLoadBlogPosts2),$(document).ready(function(){let e="/service_requests/calendar.json?"+$("#service_requests_calendar").data("attr");$("#service_requests_calendar").fullCalendar({header:{left:"",center:"title",right:" today prev,next"},defaultView:"agendaWeek",minTime:"8:00:00",maxTime:"22:00:00",allDaySlot:!1,defaultDate:new Date($.now()),eventSources:[{url:e,color:"yellow",textColor:"black"}]})}),document.addEventListener("turbo:load",initOnLoadCheckinCampaigns2),document.addEventListener("DOMContentLoaded",initOnLoadCheckinCampaigns2),document.addEventListener("turbo:load",initOnLoadCheckins2),document.addEventListener("DOMContentLoaded",initOnLoadCheckins2),document.addEventListener("turbo:load",initConfigsFileInputs),document.addEventListener("DOMContentLoaded",initConfigsFileInputs),document.addEventListener("turbo:load",initConfigsEditTabs),document.addEventListener("DOMContentLoaded",initConfigsEditTabs),$(document).on("turbo:load",function(){$("#replace_link").click(function(){return $("#update_file_field").show(),!1})}),App.Donation=class{constructor(e){this.el=e}
39initForm(){var e=$("#more_optional_donation_link"),t=$("#more_optional_donation_div"),n=$("#donation_is_employer_matching_donation"),i=$("#employer_matching_div"),o=$("#is_organization_donor"),r=$("#organization_name_div"),s=$("#50_donation_button"),a=$("#100_donation_button"),l=$("#200_donation_button"),c=$("#250_donation_button"),d=$("#300_donation_button"),u=$("#500_donation_button"),h=$("#1000_donation_button"),p=$("#2000_donation_button"),f=$("#other_amount_donation_button"),m=$("#donor_email_div"),g=$("#i_dont_have_email");g.change(function(){g.is(":checked")?m.hide():m.show()}),e.click(function(){return t.show(),e.hide(),!1}),n.change(function(){n.is(":checked")?i.show():i.hide()}),o.change(function(){o.is(":checked")?r.show():r.hide(),$("#donation_organization_name").focus()}),$("#lamorinda_sip_payment_type_one-time").click(function(){$("#amount_temp").val("200.00"),$("#amount_temp_val").val("200.00"),$("#donation_payment_attributes_amount").val("200.00")}),$("#lamorinda_sip_payment_type_monthly").click(function(){$("#amount_temp").val("25.00"),$("#amount_temp_val").val("25.00"),$("#donation_payment_attributes_amount").val("25.00")}),s.click(function(){return $("#amount_temp").val("50.00"),$("#amount_temp_val").val("50.00"),$("#donation_payment_attributes_amount").val($("#amount_temp_val").val()),$("#amount_temp").focus(),!1}),a.click(function(){return $("#amount_temp").val("100.00"),$("#amount_temp_val").val("100.00"),$("#donation_payment_attributes_amount").val($("#amount_temp_val").val()),$("#amount_temp").focus(),!1}),l.click(function(){return $("#amount_temp").val("200.00"),$("#amount_temp_val").val("200.00"),$("#donation_payment_attributes_amount").val($("#amount_temp_val").val()),$("#amount_temp").focus(),!1}),c.click(function(){return $("#amount_temp").val("250.00"),$("#amount_temp_val").val("250.00"),$("#donation_payment_attributes_amount").val($("#amount_temp_val").val()),$("#amount_temp").focus(),!1}),d.click(function(){return $("#amount_temp").val("300.00"),$("#amount_temp_val").val("300.00"),$("#donation_payment_attributes_amount").val($("#amount_temp_val").val()),$("#amount_temp").focus(),!1}),u.click(function(){return $("#amount_temp").val("500.00"),$("#amount_temp_val").val("500.00"),$("#donation_payment_attributes_amount").val($("#amount_temp_val").val()),$("#amount_temp").focus(),!1}),h.click(function(){return $("#amount_temp").val("1000.00"),$("#amount_temp_val").val("1000.00"),
40$("#donation_payment_attributes_amount").val($("#amount_temp_val").val()),$("#amount_temp").focus(),!1}),p.click(function(){return $("#amount_temp").val("2000.00"),$("#amount_temp_val").val("2000.00"),$("#donation_payment_attributes_amount").val($("#amount_temp_val").val()),$("#amount_temp").focus(),!1}),f.click(function(){return $("#amount_temp").val("0.00"),$("#amount_temp").focus(),!1}),$(".donation_form").submit(function(){$("#donation_payment_attributes_amount").val($("#amount_temp_val").val())})}initChooseTemplate(){var e=$("#emailTemplateForm"),t=$("select#email_template_id");t.change(function(){t.val();e.submit()})}};var verifyRecaptchav2Callback=function(e){$("#g-recaptcha-response").val(e)},recaptchav2CallBack=function(){};$(document).on("turbo:load",function(){if($(".fundraising_campaigns.show").length<1&&$(".donations.new").length<1&&$(".donations.edit").length<1||$("#thank-you-title").length>0)return;$("#donations_prepare_receipt_when_no_email_button").click(function(){alert("Add email address to this organization and then try again!")}),$(".fundraising_campaigns.show").length>0&&document.querySelectorAll(".hv-search-section").forEach(function(e){var t=e.querySelector('input[name="search"]'),n=e.querySelector("button.hv-search-btn");if(t&&n){e.dataset.hvSearchWired="1";var i=null!==e.querySelector(".organizations_list"),o=i?"/organizations/search":"/users/search",r=function(){if(i){var e=new URLSearchParams({search:t.value||""});fetch(o+"?"+e.toString(),{headers:{Accept:"text/vnd.turbo-stream.html","X-Requested-With":"XMLHttpRequest"},credentials:"same-origin"}).then(function(e){if(!e.ok)throw new Error("organizations/search failed: "+e.status);return e.text()}).then(function(e){"undefined"!=typeof Turbo&&e&&Turbo.renderStreamMessage(e)}).catch(function(e){window.console&&console.warn&&console.warn("organizations/search error:",e)})}else $.ajax({url:o,method:"GET",dataType:"script",data:{search:t.value}})};n.addEventListener("click",r),t.addEventListener("keydown",function(e){"Enter"===e.key&&(e.preventDefault(),r())})}}
40),new App.Donation($("#container")).initForm(),initBackgroundCheckDonation();let e,t=$("#stripe_publishable_key").val();"undefined"!=typeof Stripe?e=new App.StripePayment(t,"#amount_temp_val"):(e=new App.StripePayment(null,"#amount_temp_val"),window.addEventListener("load",()=>{"undefined"!=typeof Stripe&&(e.pk=t,e.stripe=Stripe(t))},{once:!0})),e.notReady("#customButton");let n=$("#monthly-checkbox"),i=n.is(":checked"),o=$("#donation_donor_id"),r=!0,s=o.val(),a=function(){s=o.val();let t=$("#donation_user_first_name").val(),r=$("#donation_user_last_name").val(),a=$("#donation_fundraising_campaign_id");i=n.is(":checked");let l=$("#donation_donor_type").val(),c=e.amount,d=$("#donation_user_email").val(),u=$("#i_dont_have_email").is(":checked");return new Promise(function(e){return""!==s||""!==t&&""!==r?""!==s||u||""!==d?a.length>0&&!a.val()?e({error:"Please select a fundraising campaign for your donation"}):i&&"User"!==l?e({error:"Sorry, monthly donations are not available for organizations"}):c<100?e({error:"You must set the donation amount above a dollar."}):void e({valid:!0}):e({error:"Please enter your email address."}):e({error:"You must provide your first name AND last name."})})},l=function(t){return new Promise(r=>$("#accept_terms_of_service").is(":checked")?i&&!n.is(":checked")?r({error:"Please reload the page if you do not want to make a monthly donation anymore"}):!i&&n.is(":checked")?r({error:"You cannot change to a monthly donation once it has been validated. Please reload the page"}):s!==o.val()?r({error:"You cannot change the user once the donation has been validated. Please reload the page"}):t.amount!==e.amount&&i?r({error:"You cannot change the amount of the monthly donation after is has been validated. Please reload the page"}):void r({valid:!0}):r({error:"Please accept the village terms and privacy policy"}))},c=function(t,n){e.notReady("#proceed-button"),e.validate(a,t,n).then(t=>{t.success?($("#proceed-button").hide(),$("#processing_fee_element").hide(),$("#payment-confirmation").show(),disableFields(),e.ready("#customButton")):e.ready()})},d=function(t){let n=$("#donation_user_email").val(),i=$("#i_dont_have_email").is(":checked"),r={first_name:$("#donation_user_first_name").val(),last_name:$("#donation_user_last_name").val(),email:n,no_email:i};App.StripePayment.contactServer("/donations/create_anonymous_donor",r).then(n=>{n?n.error?(console.log("Error while creating a new user: "+n.error),e.showMessage(n.error,!1)):(s=o.val(n.user_id).val(),t.user_id=s,c("subscription",t)):e.showMessage("Could not contact the server to validate your payment. Please try again later",!1)})};$("#amount_temp").focusout(()=>{let t=(e.amount+30)/.963-e.amount;$("#processing_fee_calculation_method").length&&"3%"==$("#processing_fee_calculation_method").val()&&(t=Math.round(.03*e.amount)),$("#proc_fee_amount").html((t/100).toFixed(2))}),$("#add_processing_fee").change(function(){if($("#add_processing_fee").length)if($("#add_processing_fee").is(":checked")){var e=parseFloat($("#amount_temp_val").val()),t=parseFloat($("#proc_fee_amount").html()),n=e+t;$("#processing_fee_amount").val(t),$("#amount_temp_val").val(n),$("#amount_temp").val(n),$("#amount").val(n/100)}else{n=(e=parseFloat($("#amount_temp_val").val()))-$("#processing_fee_amount").val();$("#amount_temp_val").val(n),$("#amount_temp").val(n),$("#processing_fee_amount").val(0),$("#amount").val(n/100)}}),$("#proceed-button").on("click",t=>{if(t.preventDefault(),e.state!==e.waiting)return;s=o.val();let a={user_id:o.val(),is_donation:r};i=n.is(":checked"),i?(a.subscription_name="Donation_"+e.amount,""===s?d(a):c("subscription",a)):c("payment-intent",a)}),$("#proceed-button").prop("disabled",!1),$("#customButton").on("click",t=>{t.preventDefault(),e.state===e.validated&&(e.notReady("#customButton"),e.confirm(l).then(t=>{t.success?(e.notReady("#customButton",!0),$("#monthly-checkbox").prop("disabled",!1),$(".donation_form").first().submit()):e.ready()}))})}),document.addEventListener("turbo:load",initHvDurationManualEntry),document.addEventListener("DOMContentLoaded",initHvDurationManualEntry),App.EditablePage=class{constructor(e){this.el=e}onChangeTemplateKey(){function e(){var e=n.val();if(-1!==t.indexOf(e)){i.show();var r=o[e];r?($("#renew_notice_days").val(r.days),$("#renew_notice_direction").val(r.direction)):($("#renew_notice_days").val(""),$("#renew_notice_direction").val("before"))}else i.hide()}
40var t=["Renew Notice","Renew Notice 2","Renew Notice 3"],n=$("#editable_page_template_key"),i=$("#renew_notice_settings_div"),o=$("#data_renew_notice_timing").data("timing")||{};n.on("change",e)}onChangeEmailTemplateType(){var e=$("#editable_page_template_type"),t=$("#template_key_div"),n=$("#editable_page_template_key"),i=$("#data_template_key_options").data("auto-tasks");e.change(function(){var o=i[e.val()];null==o?t.hide():(t.show(),n.find("option").remove().end(),n.append('<option value="">None</option>'),$.each(o,function(e,t){n.append('<option value="'+t[0]+'">'+t[1]+"</option>")}))})}},$(document).on("turbo:load",function(){var e=$("#data_hv_tiny_templates").data("web-templates");if($(".editable_pages.new").length>0||$(".editable_pages.edit").length>0||$(".editable_pages.clone").length>0||$(".email_messages.new").length>0||$(".email_messages.edit").length>0||$(".email_messages.create").length>0||$(".events.new").length>0||$(".events.edit").length>0||$(".fundraising_campaigns.edit").length>0||$(".fundraising_campaigns.new").length>0||$(".memberships.edit_application_form").length>0||$(".volunteer_infos.edit_application_form").length>0||$(".news_articles.new").length>0||$(".news_articles.edit").length>0||$(".blog_posts.new").length>0||$(".blog_posts.edit").length>0){tinymce.remove();var t=!0;($("body.nwnv").length>0||$("body.glenrock").length>0)&&(t=!1);var n=["eastside","coppell"],i=null;if($("body.editable_pages").length>0)for(var o=0;o<n.length;o++)if($("body."+n[o]).length>0){i="/assets/villages/"+n[o]+".css";break}var r=null!==i;TinyMCERails.configuration.default={selector:"textarea.tinymce",body_class:r?"editable_page":"",toolbar:["styleselect | fontselect | fontsizeselect | bold italic | forecolor backcolor | bullist numlist outdent indent | alignleft aligncenter alignright al
40ignjustify | undo redo","image | media | link | visualblocks | code | upcommingEventsButton newsletterButton birthdayButton footerButton"],toolbar_sticky:!0,height:600,font_formats:"Andale Mono=andale mono,times;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Impact=impact,chicago;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings,zapf dingbats;Open Sans=open sans, sans-serif",fontsize_formats:"8pt 10pt 11pt 12pt 14pt 16pt 18pt 24pt 30pt 36pt",paste_data_images:!1,paste_as_text:t,browser_spellcheck:!0,plugins:["advlist","autolink","lists","link","image","charmap","preview","anchor","pagebreak","searchreplace","wordcount","visualblocks","code","fullscreen","insertdatetime","media","nonbreaking","table","directionality","emoticons","template"],convert_urls:!1,image_advtab:!0,images_upload_url:"/tinymce_assets",images_upload_credentials:!0,file_picker_types:"image",file_picker_callback:function(e,t,n){"image"===n.filetype&&openMediaLibrary(e)},automatic_uploads:!0,setup:function(e){($(".editable_pages.new").length>0||$(".editable_pages.edit").length>0)&&(e.ui.registry.addButton("upcommingEventsButton",{text:"HV Events",onAction:function(){e.insertContent('<div id="events_plugin_for_style" style="min-height: 100px; background-color: #f4f4f4; padding: 5px;"> <h3 style="padding: 0; margin: 0;"><a href="/events/"><span style="font-size: 14pt;">Upcoming events</span></a></h3><hr /><div id="events_plugin_in_editable_page">&nbsp;</div></div>')}}),e.ui.registry.addButton("newsletterButton",{text:"HV Newsletter",onAction:function(){e.insertContent('<div id="newsletter_plugin_for_style" style="min-height: 100px; background-color: #f4f4f4; padding: 5px;"> <h3 style="padding: 0; margin: 0;"><a href="/newsletters/"><span style="font-size: 14pt;">Newsletter</span></a></h3><hr /><div id="newsletters_plugin_with_images_in_editable_page">&nbsp;</div></div>')}}),e.ui.registry.addButton("birthdayButton",{text:"HV Birthdays",onAction:function(){e.insertContent('<div id="birthdays_plugin_for_style" style="min-height: 100px; background-color: #f4f4f4; padding: 5px;"> <h3 style="padding: 0; margin: 0;"><a href="/birthdays/"><span style="font-size: 14pt;">Birthdays</span></a></h3><hr /><div id="birthdays_plugin_in_editable_page">&nbsp;</div></div>')}}),e.ui.registry.addButton("footerButton",{text:"HV Footer",onAction:function(){e.insertContent('<div id="include_hv_web_template_footer">&nbsp;</div>')}}))},valid_children:"+body[style]"},TinyMCERails.initialize("default",{content_css:"/css/tinymce.css"+(r?","+i:""),apply_source_formatting:!0,templates:e}),f=new App.EditablePage($("#container")),f.onChangeEmailTemplateType(),f.onChangeTemplateKey()}if($(".editable_pages.edit").length>0)var s=setInterval(function(){if("-1"!=$("#is_autosave").val()){$("#is_autosave").val("1"),tinyMCE.triggerSave();var e=document.getElementById("ep_form");e&&"function"==typeof e.requestSubmit?e.requestSubmit():e&&e.submit(),$("#is_autosave").length||clearInterval(s)}else clearInterval(s)},3e5);if($(".events.new").length>0||$(".events.edit").length>0){t=!0;$("body.nwnv").length>0&&(t=!1),TinyMCERails.configuration.alternate={selector:"textarea.tinymce_alternate",toolbar:["link | fontselect | fontsizeselect | bold italic underline | forecolor backcolor | bullist numlist outdent indent | undo redo"],toolbar_sticky:!0,height:300,font_formats:"Andale Mono=andale mono,times;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Impact=impact,chicago;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings,zapf dingbats",fontsize_formats:"8pt 10pt 11pt 12pt 14pt 16pt 18pt 24pt 30pt 36pt",paste_data_images:!1,paste_as_text:t,browser_spellcheck:!0,plugins:["advlist","autolink","lists","link","charmap","preview","anchor","searchreplace","wordcount","visualblocks","fullscreen","insertdatetime","nonbreaking","table","directionality"],convert_urls:!1,valid_children:"+body[style]"},TinyMCERails.initialize("alternate",{content_css:"/css/tinymce.css",apply_source_formatting:!0})}});var currentTinyCallback=null;window.openMediaLibrary=function(e){currentTinyCallback=e,$("#media_library_modal").dialog({title:"Media Library",width:820,modal:!0,resizable:!1,open:function(){$(this).closest(".ui-dialog").css("z-index",10001),$(".ui-widget-overlay").last().css("z-index",1e4)}}),Turbo.visit("/pictures/library",{frame:"media_library"})},document.addEventListener("click",function(e){const t=e.target.closest(".media-select");if(t){const e=t.dataset.url,n="undefined"!=typeof tinymce&&tinymce.activeEditor;n&&(n.windowManager.close(),n.insertContent('<img src="'+e+'" />')),document.getElementById("media_library").innerHTML="",$("#media_library_modal").dialog("close")}}),document.addEventListener("turbo:load",initEmailMessages2),document.addEventListener("DOMContentLoaded",initEmailMessages2),$(document).on("turbo:load",function(){$(".group_checkbox").click(function(){var e=$
40(this).data("group-id");$(this).is(":checked")?$("#group_freq_"+e).show():$("#group_freq_"+e).hide()})}),document.addEventListener("turbo:load",initOnLoadEventCategories),document.addEventListener("DOMContentLoaded",initOnLoadEventCategories),$(document).on("turbo:load",function(){$("#create_new_person_link").on("click",function(){$("#new_person_admin").show()}),["new","create","index"].forEach(function(e){var t=document.querySelector(".event_participations."+e+" .hv-search-section");if(t){var n=t.querySelector('input[name="search"]'),i=t.querySelector("button.hv-search-btn");if(n&&i){var o=function(e){e.preventDefault(),e.stopPropagation(),$.ajax({url:"/users/search",method:"GET",dataType:"script",data:{search:n.value}})};i.addEventListener("click",o),n.addEventListener("keydown",function(e){"Enter"===e.key&&o(e)})}}}),$("#select_all_is_present").on("click",function(){$(".event_participation_checkbox").prop("checked",!0),$(document).scrollTop($("#save_presence_checkboxes").offset().top)});var e=$("#event_participation_assoc_member_checkbox_position_1"),t=$("#event_participation_assoc_member_full_name_position_1"),n=$("#ticket_order_event_participation_attributes_guest_1");e.change(function(){e.is(":checked")?(n.val(t.html()),n.prop("disabled","disabled")):n.prop("disabled",!1)})}),App.Event=class{constructor(e){this.el=e}displayFullCalendar(e,t){var n="/events.json?";$(".events.carss_calendar").length>0&&(n="/events/carss_calendar.json?");var i={displayEventTime:!1,height:"auto",eventSources:[{url:n+t,color:"yellow",textColor:"black"}]};($(".events.index").length>0||$(".events.carss_calendar").length>0)&&window.innerWidth<640&&(i.defaultView="listMonth",i.header={left:"prev,next today",center:"title",right:"listMonth,month"}),null!==e&&(i.defaultDate=e);let o=$("#calendar");o.children().length<2&&o.fullCalendar(i),$(".printCalendarBtn").on("click",function(){window.print()})}};var hvTicketOrderPayment=null;document.addEventListener("click",function(e){if(!e.target||!e.target.closest)return;e.target.closest("#confirmFreeOrder, #confirm_purchase_button")&&(e.preventDefault(),hvTicketOrderTermsRejected()||hvTicketOrderConfirmSubmit())}),$(document).on("turbo:load",function(){if($("#replace_price_link").click(function(){return $("#price_desc").show(),$("#replace_price_link").hide(),!1}),$("#purchase_tickets_button").click(function(){return $("#purchase_tickets_button").hide(),$("#purchase_tickets_choose").show(),!1}),$("#clone_options_link").click(function(){return $("#clone_options_hidden").show(),$("#clone_options_link").hide(),!1}),$("#use_less_secure_online_meetings").click(function(){return $("#zoom_v1_free").show(),$("#zoom_v2").hide(),!1}),$(".events.index").length>0||$(".events.carss_calendar").length>0){var e=$("#data").data("startDate"),t=$("#data").data("textParams");new App.Event($("#calendar")).displayFullCalendar(e,t)}else if(show_hide_registration_deadline($("#event_rsvp_required").val()),$("#event_rsvp_required").on("change",function(){show_hide_registration_deadline($(this).val())}),$(".events.show").length>0&&(tinymce.remove(),TinyMCERails.configuration.default={selector:"textarea.tinymce",toolbar:["bold italic | bullist numlist outdent indent | link | image | emoticons |"],toolbar_sticky:!0,menubar:!1,statusbar:!1,paste_data_images:!1,paste_as_text:!0,browser_spellcheck:!0,plugins:["link","image","media","emoticons","preview","lists"],convert_urls:!1,image_advtab:!0,images_upload_url:"/tinymce_assets",images_upload_credentials:!0,file_picker_types:"image",automatic_uploads:!0},TinyMCERails.initialize("default",{content_css:"/css/tinymce.css",apply_source_formatting:!0})),$(".ticket_orders.buy_tickets").length>0||$(".ticket_orders.update").length>0&&$(".ticket_order_form").length>0){let e=$("#stripe_publishable_key").val(),t=new App.StripePayment(e,"#amount_temp_val");hvTicketOrderPayment=t,window.hvWireUserSearchSections&&window.hvWireUserSearchSections(".hv-search-section"),t.notReady("#customButton");$("#amount_temp_val");let n=$(".ticket_order_form"),i=function(){return new Promise(e=>{e({valid:!0})})},o=function(){return new Promise(e=>{console.log("Confirming params");
40let t=$("#ticket_order_user_attributes_first_name").val(),n=$("#ticket_order_user_attributes_last_name").val(),i=$("#ticket_order_user_attributes_email").val(),o=$("#accept_terms_of_service").is(":checked");return $("#is_fhwo_event_terms").length>0&&!$("#is_fhwo_event_terms").is(":checked")?(err_msg="Please accept our FHWO terms of service.",e({error:err_msg})):""===t||""===n||""===i?(err_msg="You must provide you first name, last name AND email.",e({error:err_msg})):i.includes("@")&&i.includes(".")?o?(console.log("Confirmed!"),void e({valid:!0})):(err_msg="Please accept our terms of service.",e({error:err_msg})):(err_msg="Please enter a valid email address. The registration confirmation will be sent to you by email.",e({error:err_msg}))})};$("#proceed-button").on("click",e=>{if(e.preventDefault(),t.state===t.waiting){if($("#is_fhwo_event_terms").length>0&&!$("#is_fhwo_event_terms").is(":checked"))return err_msg="Please accept our FHWO terms of service.",void alert(err_msg);if($("#accept_terms_of_service").length>0&&!$("#accept_terms_of_service").is(":checked"))return err_msg="Please accept our terms of service.",void alert(err_msg);t.notReady("#proceed-button"),t.validate(i,"payment-intent",{}).then(e=>{e.success?($("#proceed-button").hide(),$("#payment-confirmation").show(),$("#hv_captcha_area").hide(),disableFields(),t.ready("#customButton")):t.ready()})}}),$("#proceed-button").prop("disabled",!1),$("#customButton").on("click",e=>{e.preventDefault(),t.state===t.validated&&(t.notReady("#customButton"),t.confirm(o).then(e=>{e.success?(t.notReady("#customButton",!0),console.log("Submitting form"),n.first().submit()):(console.log("confirmation failed"),alert(e.error||"An unknown error occurred during payment confirmation."),t.ready())}))})}}),document.addEventListener("turbo:before-cache",function(){var e=document.getElementById("calendar");e&&"undefined"!=typeof $&&$(e).data("fullCalendar")&&$(e).fullCalendar("destroy")}),document.addEventListener("turbo:load",evShow2Boot),"loading"!==document.readyState?evShow2Boot():document.addEventListener("DOMContentLoaded",evShow2Boot),document.addEventListener("turbo:before-stream-render",function(e){"events-list"===e.target.getAttribute("target")&&requestAnimationFrame(function(){requestAnimationFrame(function(){var e=window.jQuery;if(e){var t=e("#events-list .ev-month-group").toArray();if(t.length>0)for(var n=1;n<t.length;n++){var i=e(t[n-1]),o=e(t[n]),r=i.find(".ev-month-label").text().trim(),s=o.find(".ev-month-label").text().trim();r&&r===s&&(i.find(".ev-event-cards").append(o.find(".ev-event-card")),o.remove(),t.splice(n,1),n--)}else{var a=e(".last_month").eq(-2).attr("id"),l=e(".first_month").last();l.attr("id")===a&&l.remove()}}})})}),document.addEventListener("click",function(e){var t=e.target.closest(".hv-flash-dismiss");if(t){var n=t.closest("#flash_notice");if(n)n.remove();else{var i=t.closest(".hv-flash");i&&i.remove()}}}),App.FreeDonations=class{constructor(e){this.el=e}initDonateForm(){var e=this;$(".donate-freq-btn").on("click",function(){$(".donate-freq-btn").removeClass("active"),$(this).addClass("active"),e.updateContinueUrl()}),$(".donate-amount-btn").on("click",function(){$(".donate-amount-btn").removeClass("active"),$(this).addClass("active"),$("#donate-custom-amount").val($(this).data("amount")),e.updateContinueUrl()}),$("#donate-custom-amount").on("input",function(){$(".donate-amount-btn").removeClass("active"),e.updateContinueUrl()})}updateContinueUrl(){var e=$("#donate-custom-amount").val()||"0",t="monthly"===$(".donate-freq-btn.active").text().trim().toLowerCase()?"monthly":"one-time",n=$("#donate-continue-btn");if(n.length){var i=new URL(n.attr("href"),window.location.origin);i.searchParams.set("amount",e),i.searchParams.set("frequency",t),n.attr("href",i.toString())}}},App.CompleteDonation=class{constructor(e){this.el=e,this.baseAmount=parseFloat(e.dataset.amount)||0,this.tipPct=.17,this.tipFixed=null}initForm(){var e=this;$('input[name="cd_in_honor"]').on("change",function(){$(".cd-honor-row").toggleClass("cd-visible",this.checked)}),$('input[name="cd_notify_email"]').on("change",function(){$(".cd-notify-email-row").toggleClass("cd-visible",this.checked)}),$('input[name="cd_is_corporate"]').on("change",function(){$(".cd-corp-name-row").toggleClass("cd-visible",this.checked)}),$("#cd-tip-select").on("change",function(){var t=$(this).val();"other"===t?(e.tipPct=0,e.tipFixed=parseFloat($("#cd-tip-other-amount").val())||0,$(".cd-tip-other-row").addClass("cd-visible")):(e.tipPct=parseFloat(t)||0,e.tipFixed=null,$(".cd-tip-other-row").removeClass("cd-visible")),e.updateTotal()}),$("#cd-tip-other-amount").on("input",function(){e.tipFixed=parseFloat($(this).val())||0,e.updateTotal()}),$('input[name="cd-pay"]').on("change",function(){e.onPaymentMethodChange($(this).val())}),e.onPaymentMethodChange("card"),e.updateTotal(),e.initStripe()}updateTotal(){var e=null!=this.tipFixed?this.tipFixed:this.baseAmount*this.tipPct,t=this.baseAmount+e;$("#cd-tip-amount-display").text("$"+e.toFixed(2)),$("#cd-total-display").text("$"+t.toFixed(2))}onPaymentMethodChange(e){"card"===e?$("#cd-card-section").show():$("#cd-card-section").hide()}
40initStripe(){var e=$("#stripe_publishable_key").val();if(e){var t=new App.StripePayment(e,"#amount_temp_val");t.notReady("#customButton"),$("#proceed-button").on("click",function(e){e.preventDefault(),t.validate(function(){return Promise.resolve({valid:!0})},"payment-intent").then(function(e){e.success&&($("#proceed-button").hide(),$("#payment-confirmation").show(),t.ready("#customButton"))})}),$("#customButton").on("click",function(e){e.preventDefault(),t.notReady("#customButton"),t.confirm(function(){return Promise.resolve({valid:!0})}).then(function(e){e.success?window.location="/donations/thank_you":t.ready("#customButton")})})}}},$(document).on("turbo:load",function(){$(".fundraising_campaigns.donate").length>0&&new App.FreeDonations($(".fundraising_campaigns.donate")[0]).initDonateForm();$(".fundraising_campaigns.complete_donation").length>0&&new App.CompleteDonation($(".step-wrap")[0]).initForm()}),document.addEventListener("turbo:load",initFundraisingCampaignsArchivedToggle),document.addEventListener("DOMContentLoaded",initFundraisingCampaignsArchivedToggle),$(document).on("turbo:load",function(){if($input=$("#search_user"),$input.length&&"function"==typeof $input.easyAutocomplete){var e={getValue:"name",url:function(e){return"/groups/search_user.json?q="+e},categories:[{listLocation:"users"}],list:{onChooseEvent:function(){var e=$input.getSelectedItemData();$input.val(""),define_ambassador(e)}}};$input.easyAutocomplete(e)}}),$(document).on("change",".hv-file-input",function(){var e=this.files&&this.files[0]?this.files[0].name:"No file chosen";$(this).closest(".hv-file-upload").find(".hv-file-name").text(e)}),document.addEventListener("turbo:load",maybeInitHoursEfforts2),document.addEventListener("DOMContentLoaded",maybeInitHoursEfforts2),App.Invoice=class{constructor(e){this.el=e}initShow(){$(".multiple_selection input[type=checkbox]").click(function(){multiple_selection_ious_action("recalculate_total")})}},$(document).on("turbo:load",function(){$(".invoices.show").length>0&&new App.Invoice($("#container")).initShow()}),App.LocalVillagesMap=class{constructor(e){this.el=e}initForm(){}},$(document).on("turbo:load",function(){if($(".users_by_admins.members_directory").length>0)return m=new App.LocalVillagesMap($("#container")),void m.initForm()});var EasyAutocomplete=function(e){return e.main=function(t,n){function i(){0!==b.length?f.checkDataUrlProperties()?f.checkRequiredProperties()?(o(),s()):m.error("Will not work without mentioned properties."):m.error("One of options variables 'data' or 'url' must be defined."):m.error("Input field doesn't exist.")}function o(){function e(){var e=$("<div>"),n=p.getValue("WRAPPER_CSS_CLASS");f.get("theme")&&""!==f.get("theme")&&(n+=" eac-"+f.get("theme")),f.get("cssClasses")&&""!==f.get("cssClasses")&&(n+=" "+f.get("cssClasses")),""!==g.getTemplateClass()&&(n+=" "+g.getTemplateClass()),e.addClass(n),b.wrap(e),!0===f.get("adjustWidth")&&t()}function t(){var e=b.outerWidth();b.parent().css("width",e)}function n(){b.unwrap()}function i(){var e=$("<div>").addClass(p.getValue("CONTAINER_CLASS"));e.attr("id",r()).prepend($("<ul>")),e.on("show.eac",function(){switch(f.get("list").showAnimation.type){case"slide":var t=f.get("list").showAnimation.time,n=f.get("list").showAnimation.callback;e.find("ul").slideDown(t,n);break;case"fade":t=f.get("list").showAnimation.time,n=f.get("list").showAnimation.callback,e.find("ul").fadeIn(t);break;default:e.find("ul").show()}f.get("list").onShowListEvent()}).on("hide.eac",function(){switch(f.get("list").hideAnimation.type){case"slide":var t=f.get("list").hideAnimation.time,n=f.get("list").hideAnimation.callback;e.find("ul").slideUp(t,n);break;case"fade":t=f.get("list").hideAnimation.time,n=f.get("list").hideAnimation.callback,e.find("ul").fadeOut(t,n);break;default:e.find("ul").hide()}f.get("list").onHideListEvent()}).on("selectElement.eac",function(){e.find("ul li").removeClass("selected"),e.find("ul li").eq(C).addClass("selected"),f.get("list").onSelectItemEvent()}).on("loadElements.eac",function(t,n,i){var o="",r=e.find("ul");r.empty().detach(),w=[];for(var a=0,l=0,d=n.length;l<d;l+=1){var u=n[l].data;if(0!==u.length){void 0!==n[l].header&&n[l].header.length>0&&r.append("<div class='eac-category' >"+n[l].header+"</div>");for(var h=0,p=u.length;h<p&&a<n[l].maxListSize;h+=1)o=$("<li><div class='eac-item'></div></li>"),function(){var e=h,t=a,r=n[l].getValue(u[e]);o.find(" > div").on("click",function(){b.val(r).trigger("change"),C=t,c(t),f.get("list").onClickEvent(),f.get("list").onChooseEvent()}).mouseover(function(){C=t,c(t),f.get("list").onMouseOverEvent()}).mouseout(function(){f.get("list").onMouseOutEvent()}).html(g.build(s(r,i),u[e]))}(),r.append(o),w.push(u[h]),a+=1}}e.append(r),f.get("list").onLoadEvent()}),b.after(e)}function o(){b.next("."+p.getValue("CONTAINER_CLASS")).remove()}function s(e,t){return f.get("highlightPhrase")&&""!==t?l(e,t):e}function a(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}function l(e,t){var n=a(t);return(e+"").replace(new RegExp("("+n+")","gi"),"<b>$1</b>")}b.parent().hasClass(p.getValue("WRAPPER_CSS_CLASS"))&&(o(),n()),e(),i(),_=$("#"+r()),f.get("placeholder")&&b.attr("placeholder",f.get("placeholder"))}function r(){var e=b.attr("id");return e=p.getValue("CONTAINER_ID")+e}function s(){function e(){y("autocompleteOff",!0)&&p(),t(),n(),i(),o(),r(),s()}function t(){b.focusout(function(){var e,t=b.val();f.get("list").match.caseSensitive||(t=t.toLowerCase());for(var n=0,i=w.length;n<i;n+=1)if(e=f.get("getValue")(w[n]),f.get("list").match.caseSensitive||(e=e.toLowerCase()),e===t)return void c(C=n)})}function n(){b.off("keyup").keyup(function(e){function t(e){function t(){var e={},t=f.get("ajaxSettings")||{};for(var n in t)e[n]=t[n];return e}function n(e,t){return!1===f.get("matchResponseProperty")||("string"==typeof f.get("matchResponseProperty")?t[f.get("matchResponseProperty")]===e:"function"!=typeof f.get("matchResponseProperty")||f.get("matchResponseProperty")(t)===e)}if(!(e.length<f.get("minCharNumber"))){if("list-required"!==f.get("data")){var i=f.get("data"),o=v.init(i);o=v.updateCategories(o,i),d(o=v.processData(o,e),e),b.parent().find("li").length>0?a():l()}var r=t();void 0!==r.url&&""!==r.url||(r.url=f.get("url")),void 0!==r.dataType&&""!==r.dataType||(r.dataType=f.get("dataType")),void 0!==r.url&&"list-required"!==r.url&&(r.url=r.url(e),r.data=f.get("preparePostData")(r.data,e),$.ajax(r).done(function(t){var i=v.init(t);i=v.updateCategories(i,t),i=v.convertXml(i),n(e,t)&&d(i=v.processData(i,e),e),v.checkIfDataExists(i)&&b.parent().find("li").length>0?a():l(),f.get("ajaxCallback")()}).fail(function(){m.warning("Fail to load response data")}).always(function(){}))}}switch(e.keyCode){case 27:l(),u();break;case 38:e.preventDefault(),w.length>0&&C>0&&(C-=1,b.val(f.get("getValue")(w[C])),c(C));break;case 40:e.preventDefault(),w.length>0&&C<w.length-1&&(C+=1,b.val(f.get("getValue")(w[C])),c(C));break;default:if(e.keyCode>40||8===e.keyCode){var n=b.val();!0!==f.get("list").hideOnEmptyPhrase||8!==e.keyCode||""!==n?f.get("requestDelay")>0?(void 0!==h&&clearTimeout(h),h=setTimeout(function(){t(n)},f.get("requestDelay"))):t(n):l()}}})}
vendor: 5,562 bytes, lines 40-41
40function i(){b.on("keydown",function(e){if(38===(e=e||window.event).keyCode)return suppressKeypress=!0,!1}).keydown(function(e){13===e.keyCode&&C>-1&&(b.val(f.get("getValue")(w[C])),f.get("list").onKeyEnterEvent(),f.get("list").onChooseEvent(),C=-1,l(),e.preventDefault())})}function o(){b.off("keypress")}function r(){b.focus(function(){""!==b.val()&&w.length>0&&(C=-1,a())})}function s(){b.blur(function(){setTimeout(function(){C=-1,l()},250)})}function p(){b.attr("autocomplete","off")}e()}function a(){_.trigger("show.eac")}function l(){_.trigger("hide.eac")}function c(e){_.trigger("selectElement.eac",e)}function d(e,t){_.trigger("loadElements.eac",[e,t])}function u(){b.trigger("blur")}var h,p=new e.Constans,f=new e.Configuration(n),m=new e.Logger,g=new e.Template(n.template),v=new e.ListBuilderService(f,e.proccess),y=f.equals,b=t,_="",w=[],C=-1;e.consts=p,this.getConstants=function(){return p},this.getConfiguration=function(){return f},this.getContainer=function(){return _},this.getSelectedItemIndex=function(){return C},this.getItems=function(){return w},this.getItemData=function(e){return w.length<e||void 0===w[e]?-1:w[e]},this.getSelectedItemData=function(){return this.getItemData(C)},this.build=function(){o()},this.init=function(){i()}},e.eacHandles=[],e.getHandle=function(t){return e.eacHandles[t]},e.inputHasId=function(e){return void 0!==$(e).attr("id")&&$(e).attr("id").length>0},e.assignRandomId=function(t){var n="";do{n="eac-"+Math.floor(1e4*Math.random())}while(0!==$("#"+n).length);elementId=e.consts.getValue("CONTAINER_ID")+n,$(t).attr("id",n)},e.setHandle=function(t,n){e.eacHandles[n]=t},e}((EasyAutocomplete=function(e){return e.Template=function(e){var t={basic:{type:"basic",method:function(e){return e},cssClass:""},description:{type:"description",fields:{description:"description"},method:function(e){return e+" - description"},cssClass:"eac-description"},iconLeft:{type:"iconLeft",fields:{icon:""},method:function(e){return e},cssClass:"eac-icon-left"},iconRight:{type:"iconRight",fields:{iconSrc:""},method:function(e){return e},cssClass:"eac-icon-right"},links:{type:"links",fields:{link:""},method:function(e){return e},cssClass:""},custom:{type:"custom",method:function(){},cssClass:""}},n=function(e){var n,i=e.fields;return"description"===e.type?(n=t.description.method,"string"==typeof i.description?n=function(e,t){
41return e+" - <span>"+t[i.description]+"</span>"}:"function"==typeof i.description&&(n=function(e,t){return e+" - <span>"+i.description(t)+"</span>"}),n):"iconRight"===e.type?("string"==typeof i.iconSrc?n=function(e,t){return e+"<img class='eac-icon' src='"+t[i.iconSrc]+"' />"}:"function"==typeof i.iconSrc&&(n=function(e,t){return e+"<img class='eac-icon' src='"+i.iconSrc(t)+"' />"}),n):"iconLeft"===e.type?("string"==typeof i.iconSrc?n=function(e,t){return"<img class='eac-icon' src='"+t[i.iconSrc]+"' />"+e}:"function"==typeof i.iconSrc&&(n=function(e,t){return"<img class='eac-icon' src='"+i.iconSrc(t)+"' />"+e}),n):"links"===e.type?("string"==typeof i.link?n=function(e,t){return"<a href='"+t[i.link]+"' >"+e+"</a>"}:"function"==typeof i.link&&(n=function(e,t){return"<a href='"+i.link(t)+"' >"+e+"</a>"}),n):"custom"===e.type?e.method:t.basic.method},i=function(e){return e&&e.type&&e.type&&t[e.type]?n(e):t.basic.method},o=function(e){var n,i=function(){return""};return e&&e.type&&e.type&&t[e.type]?(n=t[e.type].cssClass,function(){return n}):i};this.getTemplateClass=o(e),this.build=i(e)},e}((EasyAutocomplete=function(e){return e.proccess=function(t,n,i){function o(e,n){var i=[];if(t.get("list").match.enabled)for(var o=0,s=e.length;o<s;o+=1)r(t.get("getValue")(e[o]),n)&&i.push(e[o]);else i=e;return i}function r(e,n){return t.get("list").match.caseSensitive||("string"==typeof e&&(e=e.toLowerCase()),n=n.toLowerCase()),!!t.get("list").match.method(e,n)}function s(e){return void 0!==n.maxNumberOfElements&&e.length>n.maxNumberOfElements&&(e=e.slice(0,n.maxNumberOfElements)),e}function a(e){return t.get("list").sort.enabled&&e.sort(t.get("list").sort.method),e}e.proccess.match=r;var l=n.data;return l=a(l=s(l=o(l,i)))},e}((EasyAutocomplete=function(e){return e.ListBuilderService=function(e,t){function n(t,n){function i(){var i,o={};return void 0!==t.xmlElementName&&(o.xmlElementName=t.xmlElementName),void 0!==t.listLocation?i=t.listLocation:void 0!==e.get("listLocation")&&(i=e.get("listLocation")),void 0!==i?"string"==typeof i?o.data=$(n).find(i):"function"==typeof i&&(o.data=i(n)):o.data=n,o}function o(){var e={};return void 0!==t.listLocation?"string"==typeof t.listLocation?e.data=n[t.listLocation]:"function"==typeof t.listLocation&&(e.data=t.listLocation(n)):e.data=n,e}var r={};if(r="XML"===e.get("dataType").toUpperCase()?i():o(),void 0!==t.header&&(r.header=t.header),void 0!==t.maxNumberOfElements&&(r.maxNumberOfElements=t.maxNumberOfElements),void 0!==e.get("list").maxNumberOfElements&&(r.maxListSize=e.get("list").maxNumberOfElements),void 0!==t.getValue)if("string"==typeof t.getValue){var s=t.getValue;r.getValue=function(e){return e[s]}}else"function"==typeof t.getValue&&(r.getValue=t.getValue);else r.getValue=e.get("getValue");return r}function i(t){var n=[];return void 0===t.xmlElementName&&(t.xmlElementName=e.get("xmlElementName")),$(t.data).find(t.xmlElementName).each(function(){n.push(this)}),n}this.init=function(t){var n=[],i={};return i.data=e.get("listLocation")(t),i.getValue=e.get("getValue"),i.maxListSize=e.get("list").maxNumberOfElements,n.push(i),n},this.updateCategories=function(t,i){if(e.get("categoriesAssigned")){t=[];for(var o=0;
41o<e.get("categories").length;o+=1){var r=n(e.get("categories")[o],i);t.push(r)}}return t},this.convertXml=function(t){if("XML"===e.get("dataType").toUpperCase())for(var n=0;n<t.length;n+=1)t[n].data=i(t[n]);return t},this.processData=function(n,i){for(var o=0,r=n.length;o<r;o+=1)n[o].data=t(e,n[o],i);return n},this.checkIfDataExists=function(e){for(var t=0,n=e.length;t<n;t+=1)if(void 0!==e[t].data&&e[t].data instanceof Array&&e[t].data.length>0)return!0;return!1}},e}((EasyAutocomplete=function(e){return e.Constans=function(){var e={CONTAINER_CLASS:"easy-autocomplete-container",CONTAINER_ID:"eac-container-",WRAPPER_CSS_CLASS:"easy-autocomplete"};this.getValue=function(t){return e[t]}},e}((EasyAutocomplete=function(e){return e.Logger=function(){this.error=function(e){console.log("ERROR: "+e)},this.warning=function(e){console.log("WARNING: "+e)}},e}((EasyAutocomplete=function(e){return e.Configuration=function(e){function t(){if("xml"===e.dataType&&(e.getValue||(e.getValue=function(e){return $(e).text()}),e.list||(e.list={}),e.list.sort||(e.list.sort={}),e.list.sort.method=function(t,n){return(t=e.getValue(t))<(n=e.getValue(n))?-1:t>n?1:0},e.list.match||(e.list.match={}),e.list.match.method=function(e,t){return e.search(t)>-1}),void 0!==e.categories&&e.categories instanceof Array){for(var t=[],n=0,i=e.categories.length;n<i;n+=1){var o=e.categories[n];for(var r in a.categories[0])void 0===o[r]&&(o[r]=a.categories[0][r]);t.push(o)}e.categories=t}}function n(){function t(e,n){var i=e||{};for(var o in e)void 0!==n[o]&&null!==n[o]&&("object"!=typeof n[o]||n[o]instanceof Array?i[o]=n[o]:t(e[o],n[o]));return void 0!==n.data&&null!==n.data&&"object"==typeof n.data&&(i.data=n.data),i}a=t(a,e)}function i(){if("list-required"!==a.url&&"function"!=typeof a.url){var t=a.url;a.url=function(){return t}}if(void 0!==a.ajaxSettings.url&&"function"!=typeof a.ajaxSettings.url){t=a.ajaxSettings.url;a.ajaxSettings.url=function(){return t}}if("string"==typeof a.listLocation){var n=a.listLocation;"XML"===a.dataType.toUpperCase()?a.listLocation=function(e){return $(e).find(n)}:a.listLocation=function(e){return e[n]}}if("string"==typeof a.getValue){var i=a.getValue;a.getValue=function(e){return e[i]}}void 0!==e.categories&&(a.categoriesAssigned=!0)}function o(){void 0!==e.ajaxSettings&&"object"==typeof e.ajaxSettings?a.ajaxSettings=e.ajaxSettings:a.ajaxSettings={}}function r(e){return void 0!==a[e]&&null!==a[e]}function s(e,t){function n(t,i){for(var o in i)void 0===t[o]&&e.log("Property '"+o+"' does not exist in EasyAutocomplete options API."),"object"==typeof t[o]&&-1===$.inArray(o,l)&&n(t[o],i[o])}n(a,t)}var a={data:"list-required",url:"list-required",dataType:"json",listLocation:function(e){return e},xmlElementName:"",getValue:function(e){return e},autocompleteOff:!0,placeholder:!1,ajaxCallback:function(){},matchResponseProperty:!1,list:{sort:{enabled:!1,method:function(e,t){return(e=a.getValue(e))<(t=a.getValue(t))?-1:e>t?1:0}},maxNumberOfElements:6,hideOnEmptyPhrase:!0,match:{enabled:!1,caseSensitive:!1,method:function(e,t){return e.search(t)>-1}},showAnimation:{type:"normal",time:400,callback:function(){}},hideAnimation:{type:"normal",time:400,callback:function(){}},onClickEvent:function(){},onSelectItemEvent:function(){},onLoadEvent:function(){},onChooseEvent:function(){},onKeyEnterEvent:function(){},onMouseOverEvent:function(){},onMouseOutEvent:function(){},onShowListEvent:function(){},onHideListEvent:function(){}},highlightPhrase:!0,theme:"",cssClasses:"",minCharNumber:0,requestDelay:0,adjustWidth:!0,ajaxSettings:{},preparePostData:function(e){return e},loggerEnabled:!0,template:"",categoriesAssigned:!1,categories:[{maxNumberOfElements:4}]},l=["ajaxSettings","template"];this.get=function(e){return a[e]},this.equals=function(e,t){return!(!r(e)||a[e]!==t)},this.checkDataUrlProperties=function(){return"list-required"!==a.url||"list-required"!==a.data},this.checkRequiredProperties=function(){for(var e in a)if("required"===a[e])return logger.error("Option "+e+" must be defined"),!1;return!0},this.printPropertiesThatDoesntExist=function(e,t){s(e,t)},t(),n(),!0===a.loggerEnabled&&s(console,e),o(),i()},e}(EasyAutocomplete||{}))||{}))||{}))||{}))||{}))||{}))||{});!function(e){e.fn.easyAutocomplete=function(t){return this.each(function(){var n=e(this),i=new EasyAutocomplete.main(n,t);EasyAutocomplete.inputHasId(n)||EasyAutocomplete.assignRandomId(n),i.init(),EasyAutocomplete.setHandle(i,n.attr("id"))})},e.fn.getSelectedItemIndex=function(){var t=e(this).attr("id");return void 0!==t?EasyAutocomplete.getHandle(t).getSelectedItemIndex():-1},e.fn.getItems=function(){var t=e(this).attr("id");return void 0!==t?EasyAutocomplete.getHandle(t).getItems():-1},e.fn.getItemData=function(t){var n=e(this).attr("id");return void 0!==n&&t>-1?EasyAutocomplete.getHandle(n).getItemData(t):-1},e.fn.getSelectedItemData=function(){var t=e(this).attr("id");return void 0!==t?EasyAutocomplete.getHandle(t).getSelectedItemData():-1}}(jQuery),document.addEventListener("turbo:load",initMembershipTypes2OnLoad),document.addEventListener("DOMContentLoaded",initMembershipTypes2OnLoad),App.Membership=class{constructor(e){this.el=e}},$(document).on("turbo:load",function(){if($(".memberships.pay_for_new").length<1)return;new App.Donation($("#container")).initForm();let e=$("#stripe_publishable_key").val(),t=new App.StripePayment(e,"#amount_temp_val");t.notReady("#customButton");let n=$("#user_id"),i=n.val(),o=function(){i=n.val();let e=t.amount;return new Promise(function(t){if(e<100)return t({error:"You must set the donation amount above a dollar."});t({valid:!0})})},r=function(){return new Promise(e=>{let t=$("#accept_terms_of_service").is(":checked");if(i=n.val(),!t)return e({error:"Please accept the village terms and privacy policy"});e({valid:!0})})},s=function(e,n){t.notReady("#proceed-button"),t.validate(o,e,n).then(e=>{e.success?($("#proceed-button").hide(),$("#processing_fee_element").hide(),$("#payment-confirmation").show(),disableFields(),t.ready("#customButton")):t.ready()})};$("#proceed-button").on("click",e=>{if(e.preventDefault(),t.state!==t.waiting)return;i=n.val();let o={user_id:n.val()};s("payment-intent",o)}),$("#customButton").on("click",e=>{e.preventDefault(),t.state===t.validated&&(t.notReady("#customButton"),t.confirm(r).then(e=>
41{e.success?(t.notReady("#customButton",!0),$("#pay_for_new").first().submit()):t.ready()}))})});var hvNavSubIdSeq=0;document.addEventListener("keydown",function(e){if(e.target.closest&&e.target.closest(".hv-nav")){var t=e.key,n=e.target.closest(".hv-nav-dropdown > .hv-nav-item"),i=e.target.closest(".hv-nav-sub-item--has-children"),o=e.target.closest(".hv-nav-sub-item");if(!n||i){if(i){var r=i.closest(".hv-nav-sub-group");if(r&&hvNavSubmenuOf(r)&&("ArrowRight"===t||"Enter"===t||" "===t||"Spacebar"===t)){e.preventDefault(),hvNavCloseSiblings(r),hvNavOpen(r);var s=hvNavLevelItems(hvNavSubmenuOf(r));return void(s.length&&s[0].focus())}if(("ArrowLeft"===t||"Escape"===t)&&r&&r.classList.contains("is-open"))return e.preventDefault(),void hvNavClose(r)}if(o){var a=hvNavClosestSubmenu(o);if("ArrowDown"===t||"ArrowUp"===t||"Home"===t||"End"===t){e.preventDefault();var l=hvNavLevelItems(a);if(!l.length)return;var c=l.indexOf(o);return void l["Home"===t?0:"End"===t?l.length-1:"ArrowDown"===t?c<0?0:(c+1)%l.length:c<0?l.length-1:(c-1+l.length)%l.length].focus()}if("ArrowLeft"===t){var d=o.closest(".hv-nav-sub-group.is-open");if(d){e.preventDefault();var u=hvNavTriggerOf(d);hvNavClose(d),u&&u.focus()}return}if("Escape"===t){var h=o.closest(".is-open");if(h){e.preventDefault();var p=hvNavTriggerOf(h);hvNavClose(h),p&&p.focus()}return}}}else{var f=n.closest(".hv-nav-dropdown");if(!hvNavSubmenuOf(f))return;if("ArrowDown"===t||"ArrowUp"===t){e.preventDefault(),hvNavCloseSiblings(f),hvNavOpen(f);var m=hvNavLevelItems(hvNavSubmenuOf(f));m.length&&("ArrowDown"===t?m[0]:m[m.length-1]).focus()}else if("Enter"===t||" "===t||"Spacebar"===t){var g=n.getAttribute("href");"Enter"===t&&"#"!==g&&null!==g&&""!==g||(e.preventDefault(),f.classList.contains("is-open")?hvNavClose(f):(hvNavCloseSiblings(f),hvNavOpen(f)))}else"Escape"===t&&f.classList.contains("is-open")&&hvNavClose(f)}}}),document.addEventListener("focusin",function(e){var t=document.querySelector(".hv-nav");t&&Array.prototype.forEach.call(t.querySelectorAll(".is-open"),function(t){t.contains(e.target)||hvNavClose(t)})}),document.addEventListener("click",function(e){if(window.matchMedia("(hover: none)").matches){var t=e.target.closest(".hv-nav-dropdown > .hv-nav-item");if(t){var n=t.closest(".hv-nav-dropdown");n.classList.contains("is-open")?"#"===t.getAttribute("href")&&(e.preventDefault(),hvNavCloseAll()):(e.preventDefault(),hvNavCloseAll(),hvNavOpen(n))}else{var i=e.target.closest(".hv-nav-sub-group > .hv-nav-sub-item--has-children");if(i){var o=i.closest(".hv-nav-sub-group");o.classList.contains("is-open")?"#"===i.getAttribute("href")&&(e.preventDefault(),hvNavClose(o)):(e.preventDefault(),hvNavCloseSiblings(o),hvNavOpen(o))}else e.target.closest(".hv-nav")||hvNavCloseAll()}}}),document.addEventListener("turbo:before-cache",hvNavCloseAll),document.addEventListener("turbo:load",initOnLoadMenu2),document.addEventListener("DOMContentLoaded",initOnLoadMenu2);var HV_MENU_ITEM_BUILTIN_TARGETS={membership_application_form:"/memberships/application_form",volunteer_application_form:"/volunteer_infos/application_form",new_donation:"/donations/new"};document.addEventListener("change",function(e){var t=e.target;t&&"is_target_editable_page_or_url"===t.name&&t.checked&&hvApplyMenuItemTargetRadio(t)}),document.addEventListener("click",function(e){if(e.target.closest){var t=e.target.closest("#show_move_to_folder_button");if(t){e.preventDefault();var n=document.getElementById("subfolders_and_button");return n&&(n.style.display=""),void(t.style.display="none")}var i=e.target.closest(".menu-folder-link");i&&(e.preventDefault(),fetch(i.href,{headers:{Accept:"text/vnd.turbo-stream.html","X-Requested-With":"XMLHttpRequest"},credentials:"same-origin"}).then(function(e){if(!e.ok)throw new Error("Folder fetch failed: "+e.status);return e.text()}).then(function(e){"undefined"!=typeof Turbo&&e&&Turbo.renderStreamMessage(e)}).catch(function(e){window.console&&console.warn&&console.warn("Folder fetch failed:",e)}))}}),function(){function e(){return{btn:document.getElementById("hv-hamburger"),panel:document.getElementById("hv-mobile-panel")}}function t(e){if(!document.body.classList.contains("mobile")){var t=document.querySelector(".hv-header");t&&(e.style.top=t.getBoundingClientRect().bottom+"px")}}function n(){return!document.body.classList.contains("mobile")}function i(e){return Array.prototype.slice.call(e.querySelectorAll('a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), summary, [tabindex]:not
41([tabindex="-1"])')).filter(function(e){return null!==e.offsetParent})}function o(e,t,n){t.classList.remove("is-open"),t.style.top="",e&&e.setAttribute("aria-expanded","false"),n&&e&&t.contains(document.activeElement)&&e.focus()}document.addEventListener("click",function(r){var s=e();if(s.btn&&s.panel)if(r.target.closest("#hv-hamburger")){var a=s.panel.classList.toggle("is-open");if(s.btn.setAttribute("aria-expanded",String(a)),a){if(t(s.panel),n()){var l=i(s.panel);l.length&&l[0].focus()}}else s.panel.style.top=""}else(r.target.classList.contains("hv-mob-sub-link")||r.target.classList.contains("hv-mob-plain-link"))&&o(s.btn,s.panel)}),document.addEventListener("keydown",function(t){var r=e();if(r.panel&&r.panel.classList.contains("is-open")&&n()){if("Escape"===t.key)return t.preventDefault(),void o(r.btn,r.panel,!0);if("Tab"===t.key){var s=i(r.panel);if(r.btn&&s.unshift(r.btn),!s.length)return;var a=s[0],l=s[s.length-1];t.shiftKey&&document.activeElement===a?(t.preventDefault(),l.focus()):t.shiftKey||document.activeElement!==l||(t.preventDefault(),a.focus())}}}),window.addEventListener("resize",function(){var n=e();n.panel&&n.panel.classList.contains("is-open")&&(document.body.classList.contains("mobile")||(window.innerWidth>900?o(n.btn,n.panel):t(n.panel)))}),document.addEventListener("turbo:before-cache",function(){var t=e();t.panel&&(o(t.btn,t.panel),t.panel.querySelectorAll("details[open]").forEach(function(e){e.removeAttribute("open")}))})}(),$(document).on("turbo:load",function(){$("tr[data-link]").click(function(){window.location=$(this).data("link")})}),document._hvNestedFieldsReady||(document._hvNestedFieldsReady=!0,document.addEventListener("click",function(e){var t=e.target.closest("form .remove_fields");
41if(t){e.preventDefault();var n=t.previousElementSibling;n&&n.matches("input[type=hidden]")&&(n.value="1");var i=t.closest("fieldset");i&&(i.style.display="none")}else{var o=e.target.closest("form .add_fields");if(o){e.preventDefault();var r=(new Date).getTime(),s=new RegExp(o.dataset.id,"g");o.insertAdjacentHTML("beforebegin",o.dataset.fields.replace(s,r))}}})),document.addEventListener("turbo:load",initNewsArticles2NewsletterToggle),document.addEventListener("DOMContentLoaded",initNewsArticles2NewsletterToggle),function(){function e(){if(window.jQuery){var e=window.jQuery;e(document).on("click.hvNotif",".notification_wrapper",function(){var t=e(".notification_wrapper");t.hasClass("open")&&!t.hasClass("opened")?t.addClass("opened"):t.hasClass("opened")&&t.removeClass("open").removeClass("opened")}),e(document).on("click.hvNotif",".dropdown_notification",function(){e(this).parent().toggleClass("open")})}}function t(){fetch("/refresh_notifications",{headers:{Accept:"text/vnd.turbo-stream.html","X-Requested-With":"XMLHttpRequest"},credentials:"same-origin"}).then(function(e){return e.ok?e.text():null}).then(function(e){e&&e.trim().length>0&&"undefined"!=typeof Turbo&&Turbo.renderStreamMessage(e)}).catch(function(e){window.console&&console.warn&&console.warn("Notification refresh failed:",e)})}function n(){var e=document.getElementById("is_refresh_notifications");e&&"true"===e.value&&setInterval(t,3e4)}function i(){window.__hvNotifInit||(window.__hvNotifInit=!0,e(),n())}document.addEventListener("DOMContentLoaded",i),document.addEventListener("turbo:load",i)}(),function(){function e(){var e=document.getElementById("hv-notif-wrap"),t=document.getElementById("hv-notif-btn"),n=document.getElementById("hv-notif-panel");e&&t&&n&&(t.onclick=function(n){n.stopPropagation();var i=e.classList.toggle("open");t.setAttribute("aria-expanded",i)},document._hvNotifOutsideListener||(document._hvNotifOutsideListener=!0,document.addEventListener("click",function(e){var t=document.getElementById("hv-notif-wrap"),n=document.getElementById("hv-notif-btn");t&&!t.contains(e.target)&&(t.classList.remove("open"),n&&n.setAttribute("aria-expanded","false"))})))}document.addEventListener("turbo:load",e),"loading"!==document.readyState?e():document.addEventListener("DOMContentLoaded",e)}(),document.addEventListener("turbo:load",function(){var e=document.querySelector(".affiliation_form");e&&(e.addEventListener("keydown",function(e){"Enter"===e.key&&"search"===e.target.type&&e.preventDefault()}),document.querySelectorAll(".hv-search-section").forEach(function(e){function t(e){e.preventDefault(),e.stopPropagation(),$.ajax({url:"/users/search",method:"GET",dataType:"script",data:{search:i.value,form_id:r}})}var n=e.querySelector("input[name='form_id']"),i=e.querySelector("input[name='search']"),o=e.querySelector("button.hv-search-btn");if(i&&o){var r=n?n.value:"";o.addEventListener("click",t),i.addEventListener("keydown",function(e){"Enter"===e.key&&t(e)})}}))}),document.addEventListener("submit",function(e){var t=e.target;if(t&&t.classList&&t.classList.contains("org_search_form")){e.preventDefault();var n=new FormData(t),i=new URLSearchParams;n.forEach(function(e,t){i.append(t,e)});var o=t.getAttribute("action")||t.action||"/organizations/search",r=o+(-1===o.indexOf("?")?"?":"&")+i.toString();fetch(r,{headers:{Accept:"text/vnd.turbo-stream.html","X-Requested-With":"XMLHttpRequest"},credentials:"same-origin"}).then(function(e){if(!e.ok)throw new Error("organizations/search failed: "+e.status);return e.text()}).then(function(e){"undefined"!=typeof Turbo&&e&&Turbo.renderStreamMessage(e)}).catch(function(e){window.console&&console.warn&&console.warn("organizations/search error:",e)})}}),document.addEventListener("click",function(e){if(e.target.closest){var t=e.target.closest(".select_organization_link");if(t){e.preventDefault();var n=window.jQuery;if(n){n(".organizations_list").hide();var i=t.id.replace("select_organization_link_","");if(0!==n("#selected_organization_id").length){n("#selected_organization_id").val(i);var o=n("#span_org_id_"+i)[0].innerText;n("#organization_name_placeholder").html(o),n("#add_new_affiliation_in_user_profile").show(),n("#affiliation_notice").hide(),n("#organizations_list").hide(),n("#organization_name").hide()}else if(0!==n("#donation_donor_id").length){n("#donation_donor_id").val(i),n("#donation_donor_type").val("Organization"),n("#donation_donor_id").trigger("change");var r=document.getElementById("span_org_id_"+i),s=r?(r.childNodes[0]?r.childNodes[0].textContent:r.innerText).trim():"";if(document.querySelector(".hv-card")){var a=s.split(/\s+/).filter(
41Boolean).slice(0,2).map(function(e){return e.charAt(0)}).join("").toUpperCase();n("#searched_organization").html('<div class="hv-member-row" style="margin-bottom:16px;"><div class="hv-member-avatar">'+a+'</div><div style="min-width:0;"><div class="hv-member-name">'+s+'</div><div class="hv-member-addr">Organization</div></div></div>')}else n("#searched_organization").html("<label>Donation by</label>Organization: "+s);n("#searched_user").hide(),n("#searched_organization").show()}else alert("Tech log: Please check the select action exists in views/organizations/_orgs_list.js.erb")}}}}),document.addEventListener("turbo:before-stream-render",function(e){var t=e.target.getAttribute("target")||"";0===t.indexOf("organizations_list")&&requestAnimationFrame(function(){requestAnimationFrame(function(){var e=document.getElementById(t);e&&(e.style.display="block")})})}),jQuery(function(){if(0!==jQuery("#infinite-scrolling").length){var e=jQuery("#infinite-scrolling-image").data("loader");jQuery(window).on("scroll",function(){var t=jQuery(".pagination .next_page").attr("href");t&&(jQuery(window).scrollTop()<jQuery(document).height()-jQuery(window).height()-500||(jQuery(".pagination").html("<img src='"+e+"' alt='Loading...' title='Loading...' />"),fetch(t,{headers:{Accept:"text/vnd.turbo-stream.html","X-Requested-With":"XMLHttpRequest"},credentials:"same-origin"}).then(function(e){if(!e.ok)throw new Error("Pagination fetch failed: "+e.status);return e.text()}).then(function(e){"undefined"!=typeof Turbo&&e&&Turbo.renderStreamMessage(e)}).catch(function(e){window.console&&console.warn&&console.warn("Pagination fetch failed:",e)})))})}}),$(document).on("turbo:load",function(){if(initUiChange(),$(".payments.new").length>0||$(".payments.create").length>0){console.log("init stripe payment");let e=$("#stripe_publishable_key").val(),t=new App.StripePayment(e,"#amount_temp_val");t.ready("#customButton");let n=$("#amount_temp_val"),i=$("#payment-concept"),o=$("#user_id").val(),r=function(){return new Promise(e=>{let n=i.val(),o=t.amount;return""===n||n.length<2?e({error:"Please enter a purpose for your donation"}):o<1?e({error:"Please enter an amount of at least $1"}):void e({valid:!0})})},s=function(e){return new Promise(n=>{r(e).then(e=>{if(e.error)n({error:e.error});else{let e=t.amount,r={user_id:o,concept:i.val(),amount:e};App.StripePayment.contactServer("/payments/validate_card_payment",r).then(e=>{e.error?n({error:e.error}):n({valid:!0})})}})})};$("#customButton").on("click",e=>{if(e.preventDefault(),t.state===t.waiting){let e="";t.validate(r,"payment-intent",{user_id:e}).then(e=>{e.success?(console.log("Validation successful"),i.prop("disabled",!0),n.prop("disabled",!0),t.ready()):console.log("Validation unsuccessful")})}else t.notReady("#customButton"),t.confirm(s).then(e=>{console.log("Confirmation result: "+e.success),e.success?(console.log("Confirmation successful on button"),t.notReady("#customButton",!0),a.first().submit()):(n.prop("disabled",!1),t.ready("#customButton"),console.log("Confirmation unsuccessful on button"))})});let a=$(".payment_form");a.submit(()=>t.state===t.confirmed?($(":disabled").each(function(){$(this).removeAttr("disabled")}),!0):"Credit Card"!==$("payment_method").val())}if($(".payments.update_card").length>0){let e=$("#stripe_publishable_key").val(),t=new App.StripePayment(e,"#amount_temp");t.notReady("#customButton");let n=$("#payment_user_id").val(),i=function(){return new Promise(e=>{e({valid:!0})})};t.validate(i,"setup-intent",{user_id:n}).then(e=>{e.success&&t.ready()}),$("#customButton").on("click",e=>{e.preventDefault(),t.state===t.validated&&(t.notReady("#customButton",!0),t.confirm(i).then(e=>{e.success?$(".payment_form").first().submit():t.ready()}))})}$(".donation_form").submit(function(){""==$("#stripeToken").val()&&"Credit Card"==$(".payment_method").val()&&$("#customButton").trigger("click")})});var bounds,PT2_ICON_NONE='<svg width="9" height="13" viewBox="0 0 9 13" style="vertical-align:middle;margin-left:4px;" fill="currentColor"><path d="M4.5 1 L8 5.5 H1 Z" opacity=".3"/><path d="M4.5 12 L1 7.5 H8 Z" opacity=".3"/></svg>',PT2_ICON_ASC='<svg width="9" height="13" viewBox="0 0 9 13" style="vertical-align:middle;margin-left:4px;" fill="currentColor"><path d="M4.5 1 L8 5.5 H1 Z"/><path d="M4.5 12 L1 7.5 H8 Z" opacity=".15"/></svg>',PT2_ICON_DESC='<svg width="9" height="13" viewBox="0 0 9 13" style="vertical-align:middle;margin-left:4px;" fill="currentColor"><path d="M4.5 1 L8 5.5 H1 Z" opacity=".15"/><path d="M4.5 12 L1 7.5 H8 Z"/></svg>';document.addEventListener("turbo:load",initPhoneTree2Sort),document.addEventListener("DOMContentLoaded",initPhoneTree2Sort),$(document).on("turbo:load",function(){$("#expand_form_message_button").click(function(){$("#expanded_form_message").slideDown(),$("#expand_form_message_button").slide
41Up()}),$("#filter_posts_div").hide(),$("#filter_posts_button").click(function(){$("#filter_posts_div").dialog()});var e=".filter_".concat($("#active_filter").data("filter"));$(e).css("color","red");let t="Other Interest Groups";var n=$("#other_categories_button"),i=$("#other_categories_list");i.hide(),n.html($("<i/>",{class:"fa fa-caret-down"})).append(t),n.click(function(){i.is(":hidden")?(i.slideDown(),n.html($("<i/>",{class:"fa fa-caret-up"})).append(t)):(i.slideUp(),n.html($("<i/>",{class:"fa fa-caret-down"})).append(t))}),$participants_condence=$("#participants_condence"),$participants_condence.hide(),$participants_condence.click(function(){$("#participants_list").slideUp(),$participants_condence.hide(),$("#participants_expand").show()}),$(".post_menu_button").click(function(e){e.stopPropagation(),e.stopImmediatePropagation();let t=e.target.getAttribute("data-post"),n=$("#post_"+t+"_menu_dropdown");n.is(":hidden")?(n.slideDown(),e.stopPropagation()):(n.slideUp(),e.stopPropagation())});let o="&nbsp;About",r=$("#about_button"),s=$("#about_interest_group");if(s.hide(),r.html($("<i/>",{class:"fa fa-caret-down"})).append(o),r.click(function(){s.is(":hidden")?(s.slideDown(),r.html($("<i/>",{class:"fa fa-caret-up"})).append(o)):(s.slideUp(),r.html($("<i/>",{class:"fa fa-caret-down"})).append(o))}),$("#notif_slider").click(function(){let e=$(this).data("isNotifChecked");$(this).data("isNotifChecked",!e),$(this).find("input").prop("checked",!e);let t=$("#subscribing_to_email"),n=$("#email_notif_slider");e?(t.slideUp(),n.find("input").prop("checked",!1),n.data("isEmailNotifChecked",!0)):(t.slideDown(),n.find("input").prop("checked",!0),n.data("isEmailNotifChecked",!0))}),$("#email_notif_slider").click(function(){let e=$(this).data("isEmailNotifChecked");$(this).find("input").prop("checked",!e),$(this).data("isEmailNotifChecked",!e)}),$("#notification_settings_button").click(function(){let e=$("#notification_settings");e.is(":hidden")?(e.slideDown(),$(this).removeClass("fa-caret-down"),$(this).addClass("fa-caret-up")):(e.slideUp(),$(this).removeClass("fa-caret-up"),$(this).addClass("fa-caret-down"))}),$(".posts.index").length>0||$(".posts._posts").length>0||$(".posts.show").length>0||$(".posts.edit").length>0||$(".posts.edit_comment").length>0)try{showTinyMCE()}catch(e){window.console&&console.warn&&console.warn("showTinyMCE failed:",e)}}),document.addEventListener("click",function(e){var t=window.jQuery;t&&(e.target.closest&&e.target.closest('input[name="post[title]"]')&&("true"===t("#can_post").val()?t("#expanded_form").is(":hidden")&&t("#expanded_form").slideDown():t("#expand_form_message_no_groups").is(":hidden")&&t("#expand_form_message_no_groups").slideDown()))}),document.addEventListener("click",function(e){var t=e.target.closest&&e.target.closest("[data-show-participants-url]");if(t){e.preventDefault();var n=t.getAttribute("data-show-participants-url");n&&fetch(n,{headers:{Accept:"text/vnd.turbo-stream.html","X-Requested-With":"XMLHttpRequest"},credentials:"same-origin"}).then(function(e){if(!e.ok)throw new Error("show_participants failed: "+e.status);return e.text()}).then(function(e){"undefined"!=typeof Turbo&&e&&Turbo.renderStreamMessage(e)}).catch(function(e){window.console&&console.warn&&console.warn("Show participants fetch failed:",e)})}}),document.addEventListener("turbo:before-stream-render",function(e){var t=e.target.getAttribute("target");t&&("participants_list"===t?requestAnimationFrame(function(){requestAnimationFrame(function(){var e=window.jQuery;e&&(e("#participants_expand").hide(),e("#participants_condence").show(),e("#participants_list").slideDown())})}):"invite_people_popup"===t&&requestAnimationFrame(function(){requestAnimationFrame(function(){var e=window.jQuery;if(e){var t=e("#invite_people_popup");if(t.length){var n=t.find("[data-invite-dialog-title]").first().attr("data-invite-dialog-title")||"";e("body").append('<div class="modalOverlay">'),t.dialog(),e("span.ui-dialog-title").text(n.toUpperCase()),t.off("dialogclose.hvInvite").on("dialogclose.hvInvite",function(){e(".modalOverlay").hide()}),e("#invite_people_form").off("submit.hvInvite").on("submit.hvInvite",function(){t.dialog("close")});var i=e("#search_member");if(i.length&&e.fn.easyAutocomplete){var o={getValue:"name",url:function(e){return"/posts/search_member.json?q="+e},categories:[{listLocation:"members"}],list:{onChooseEvent:function(){var e=i.getSelectedItemData();i.val(""),"function"==typeof add_user_to_list&&add_user_to_list(e)}}};i.easyAutocomplete(o)}}}})}))}),document.addEventListener("click",function(e){var t=e.target.closest&&e.target.closest(".invite_people_trigger");if(t){e.preventDefault();var n=t.getAttribute("href");n&&fetch(n,{headers:{Accept:"text/vnd.turbo-stream.html","X-Requested-With":"XMLHttpRequest"},credentials:"same-origin"}).then(function(e){if(!e.ok)throw new Error("invite_people fetch failed: "+e.status);return e.text()}).then(function(e){"undefined"!=typeof Turbo&&e&&Turbo.renderStreamMessage(e)}).catch(function(e){window.console&&console.warn&&console.warn("Invite people fetch failed:",e)})}}),document.addEventListener("turbo:load",initOnLoadPosts),document.addEventListener("DOMContentLoaded",initOnLoadPosts),document.addEventListener("turbo:load",initOnLoadProspectTasks2),document.addEventListener("DOMContentLoaded",initOnLoadProspectTasks2),function(){function e(){var e=document.getElementById("hv-captcha-fallback");e&&(e.dataset.hvPulsed||(e.dataset.hvPulsed="true",e.scrollIntoView({behavior:"smooth",block:"center"}),e.classList.add("hv-captcha-pulse")))}document.addEventListener("turbo:load",e),document.addEventListener("DOMContentLoaded",e)}(),function(){function e(e){return e.replace("g-recaptcha-response-data-","").split("-").map(function(e){return e.charAt(0).toUpperCase()+e.slice(1)}).join("")}document.addEventListener("submit",function(t){var n=t.target;if(n&&n.querySelector&&!n._hvCaptchaMinted){var i=n.querySelector('input[id^="g-recaptcha-response-data-"]');
41if(i&&"g-recaptcha-response-data-hvstripesecret"!==i.id){var o=window["executeRecaptchaFor"+e(i.id)+"Async"];if("function"==typeof o){t.preventDefault();var r,s=function(){n._hvCaptchaMinted=!0,n.submit()};try{r=o()}catch(e){return void s()}var a=!1,l=function(e){a||(a=!0,"string"==typeof e&&e.length>0&&(i.value=e),s())};r.then(l).catch(function(){l(null)}),setTimeout(function(){l(null)},4e3)}}}},!0)}(),document.addEventListener("turbo:load",initRegistrations2),document.addEventListener("DOMContentLoaded",initRegistrations2),$(document).on("turbo:load",function(){$("#help_membership_tooltip_link").click(function(){return $("#help_memberships").show(),$("#help_membership_tooltip_link").hide(),!1})}),function(){function e(){var e=document.getElementById("hv-filter-overlay");e&&(e.style.display="flex")}function t(){var e=document.getElementById("hv-filter-overlay");e&&(e.style.display="none")}function n(){document.querySelectorAll('[data-behaviour="open_filter"]').forEach(function(t){t.addEventListener("click",function(n){n.preventDefault();var i=t.getAttribute("href");if(i){var o=document.getElementById("hv-filter-body");o&&(o.innerHTML='<div style="text-align:center;padding:40px;color:var(--hv-text-light);">Loading\u2026</div>'),e(),fetch(i,{headers:{Accept:"text/vnd.turbo-stream.html","X-Requested-With":"XMLHttpRequest"},credentials:"same-origin"}).then(function(e){if(!e.ok)throw new Error("Filter load failed: "+e.status);return e.text()}).then(function(e){
42Turbo.renderStreamMessage(e)}).catch(function(e){o&&(o.innerHTML='<div style="padding:20px;color:var(--hv-error);">Could not load filters. Please reload the page and try again.</div>'),console.error(e)})}})}),document.querySelectorAll('[data-behaviour="close_filter"]').forEach(function(e){e.addEventListener("click",t)});var n=document.getElementById("hv-filter-overlay");n&&!n._hvBackdropBound&&(n._hvBackdropBound=!0,n.addEventListener("click",function(e){e.target===n&&t()}))}function i(){function e(){return r.length&&r.is(":checked")||a}function n(){e()?o.removeAttr("target"):o.attr("target","_blank")}function i(){var e=window.jQuery("#search-start-date"),t=window.jQuery("#search-end-date");if(e.length&&t.length){var n=Date.parse(e.datepicker("getDate")),i=Date.parse(t.datepicker("getDate")),o=window.jQuery("#filter_submit"),r=window.jQuery("#notice");n>=i?(o.prop("disabled",!0),r.text("Start date must be before end date").show()):(o.prop("disabled",!1),r.hide())}}var o=window.jQuery?window.jQuery("form.filter_parameters"):null;if(o&&o.length){var r=window.jQuery("#async_checkbox"),s=window.jQuery("#format");s.length&&void 0===s.data("original-format")&&s.data("original-format",s.val());var a="js"===(s.length?s.data("original-format")||s.val():null);r.length&&r.off("change.hvAch").on("change.hvAch",n),n(),o.off("submit.hvAch").on("submit.hvAch",function(t){if(e()){t.preventDefault();var n=o.get(0),i=new FormData(n);i.delete("format");var r=n.getAttribute("action")||n.action||"",s=(r=r.replace(/\.(html|json|js|turbo_stream)$/,""))+".turbo_stream",a=new URLSearchParams;i.forEach(function(e,t){a.append(t,e)}),a.toString().length>0&&(s=s+"?"+a.toString());var l=n.querySelector("#filter_submit");l&&(l.disabled=!0),fetch(s,{method:"GET",headers:{Accept:"text/vnd.turbo-stream.html","X-Requested-With":"XMLHttpRequest"},credentials:"same-origin"}).then(function(e){if(!e.ok)throw new Error("Report request failed: "+e.status);return e.text()}).then(function(e){Turbo.renderStreamMessage(e)}).catch(function(e){console.error(e);var t=window.jQuery("#notice");t.length&&t.text("Could not submit the report. Please try again.").show(),l&&(l.disabled=!1)})}}),window.jQuery(".datepicker").datepicker({dateFormat:"mm/dd/yy",onClose:i}),window.jQuery("#filter_submit").off("click.hvAch").on("click.hvAch",function(){e()||t()})}}document.addEventListener("turbo:before-stream-render",function(e){var t=e.target.getAttribute("target");"hv-filter-body"===t?requestAnimationFrame(function(){requestAnimationFrame(i)}):"flash_notice"===t&&requestAnimationFrame(function(){requestAnimationFrame(function(){var e=document.getElementById("flash_notice");e&&e.scrollIntoView({behavior:"smooth",block:"start"})})})}),document.addEventListener("turbo:load",n),"loading"!==document.readyState?n():document.addEventListener("DOMContentLoaded",n)}(),document.addEventListener("turbo:load",initOnLoadSdoh),document.addEventListener("DOMContentLoaded",initOnLoadSdoh),App.ServiceEvaluation=class{constructor(e){this.el=e}
42initEdit(){var e=$(".edit_service_evaluation"),t=$("#service_evaluation_rating"),n=$("#service_evaluation_description");e.on("submit",function(){switch($("input[name=rate]:checked",".edit_service_evaluation").val()){case"well":t.val("5");break;case"ok":if(t.val("3"),""==n.val())return alert("A description of the problem is required"),!1;break;case"not_well":if(t.val("1"),""==n.val())return alert("A description of the problem is required"),!1;break;case"canceled":if(t.val("-1"),""==n.val())return alert("A description of the problem is required"),!1;break;default:return alert("You need to choose one of the 3 options"),!1}})}},$(document).on("turbo:load",function(){($(".service_evaluations.edit").length>0||$(".service_evaluations.update").length>0||$(".service_evaluations.edit_with_secret_key").length>0)&&new App.ServiceEvaluation($("#container")).initEdit(),$(".star-rating").each(function(){let e=$(this),t=e.attr("id")+"_raty";e.data("score-name")&&(t=e.data("score-name")),e.raty({starOff:e.data("star-off"),starOn:e.data("star-on"),starHalf:e.data("star-half"),scoreName:t,hints:["unsatisfactory","poor","ok","good","excellent"],score:e.data("rating"),readOnly:e.data("read-only")})}),$(".star-rating").raty("reload")}),document.addEventListener("turbo:load",initServiceEvaluationsIndex),document.addEventListener("DOMContentLoaded",initServiceEvaluationsIndex),document.addEventListener("click",function(e){if(e.target.closest){var t=e.target.closest(".suggest_providers_trigger");if(t){e.preventDefault();var n=t.getAttribute("href");if(!n)return;fetch(n,{headers:{Accept:"text/vnd.turbo-stream.html","X-Requested-With":"XMLHttpRequest"},credentials:"same-origin"}).then(function(e){if(!e.ok)throw new Error("suggest_providers fetch failed: "+e.status);return e.text()}).then(function(e){"undefined"!=typeof Turbo&&e&&Turbo.renderStreamMessage(e)}).catch(function(e){window.console&&console.warn&&console.warn("suggest_providers error:",e)})}else{var i=e.target.closest(".select_pro_link");if(i){e.preventDefault();var o=window.jQuery;if(!o)return;o(".providers_list").hide();var r=i.id.replace("select_provider_link_","");o("#provider_id").val(r),o("#new_service_response").submit()}}}}),App.ServiceRequest=class{constructor(e){this.el=e}initForm(){function e(t,n){return(t=t.toString()).length<n?e("0"+t,n):t}var t=$("#service_request_service_type");t.change(function(){var e=t.val();e<-20?($("#destination_address").show(),$("#is_return").show(),$("#appointment_time_optional").show(),$("#medpal_options").show()):e<0?($("#destination_address").show(),$("#is_return").show(),$("#appointment_time_optional").show(),$("#medpal_options").hide()):($("#destination_address").hide(),$("#is_return").hide(),$("#appointment_time_optional").hide(),$("#medpal_options").hide())});var n=$("#service_request_is_appointment"),i=$("#service_request_start_time_field_5i"),o=$("#service_request_appointment_time_5i"),r=$("#service_request_duration");n.change(function(){if(n.is(":checked")){$("#appointment_time").show();var t=i.val().match(/^([0-5]\d):([0-5]\d):([0-5]\d)$/),r=(parseInt(t[1])+1).toString()+":"+e(parseInt(t[2]).toString(),2)+":00";o.val(r)}else $("#appointment_time").hide()}),r.change(function(){if(!isNaN(parseInt(r.val(),10))){var e=t.val(),s=0;n.is(":checked")&&e<0&&(s=Math.abs(toMinutes(o.val())-toMinutes(i.val())));var a=s;a=$("#service_request_is_return").is(":checked")&&e<0?parseInt(r.val())+2*s:parseInt(r.val())+s;var l=toTimeString(toMinutes(i.val())+a);$("#service_request_end_date_5i").val(l)}}),$("#search_address_name").bind("railsAutocomplete.select",function(e,t){$("#service_request_destination_address_attributes_name").val(t.item.name),$("#service_request_destination_address_attributes_street").val(t.item.street),$("#service_request_destination_address_attributes_number").val(t.item.number),$("#service_request_destination_address_attributes_city").val(t.item.city),$("#service_request_destination_address_id").val(t.item.id)}),$("#search_address_name").blur(function(){$("#service_request_destination_address_attributes_name").val($("#search_address_name").val())})}initNew2(){var e=document.querySelector(".hv-search-section");if(e){var t=e.querySelector('input[name="search"]'),n=e.querySelector("button.hv-search-btn");if(t&&n){e.dataset.hvSearchWired="1";var i=function(e){e.preventDefault(),e.stopPropagation(),$.ajax({url:"/users/search",method:"GET",dataType:"script",data:{search:t.value,user_type:"active_members"}})};n.addEventListener("click",i),t.addEventListener("keydown",function(e){"Enter"===e.key&&i(e)})}}
42var o=document.getElementById("hv_dur_grid"),r=document.getElementById("hv_duration_hidden");if(o&&r){var s=r.value;if(s){var a=o.querySelector('[data-minutes="'+s+'"]');a&&a.classList.add("hv-selected")}o.addEventListener("click",function(e){var t=e.target.closest(".hv-dur-btn");t&&(o.querySelectorAll(".hv-dur-btn").forEach(function(e){e.classList.remove("hv-selected")}),t.classList.add("hv-selected"),r.value=t.dataset.minutes)})}}initFilters(){var e=$("#search-form"),t=$("select#status"),n=$("select#local_village"),i=$("select#service_type");t.change(function(){var n=t.val();$("#search_status").val(n),e.submit()}),n.change(function(){var t=n.val();$("#search_local_village").val(t),e.submit()}),i.change(function(){var t=i.val();$("#search_service_type").val(t),e.submit()}),$("#remove_search_user_id").click(function(){return $("input#search_user_id").val(""),$("div#search_user_display").hide(),e.submit(),!1})}},$(document).on("turbo:load",function(){var e;$("#service_req_tooltip").click(function(){return $("#help_service_request_text").show(),$("#service_req_tooltip").hide(),!1}),$("#multiple_selection_link").click(function(){return $(".multiple_selection").show(),$("#multiple_selection_link").hide(),!1}),$("#show_add_memb").click(function(){return $("#additional_beneficiaries_hidden").show(),$("#show_add_memb").hide(),!1}),$("#is_village_builder").change(function(){$("#service_request_service_type").find("option").remove().end(),$("#is_village_builder").is(":checked")?($(".search_users_div").hide(),$(".searched_user").hide(),$("#service_request_beneficiary_user_id").val("0"),$.each($("#data_service_types").data("office-corps-services"),function(e,t){$("#service_request_service_type").append('<option value="'+t[0]+'">'+t[1]+"</option>")})):($(".search_users_div").show(),$("#service_request_beneficiary_user_id").val(""),$.each($("#data_service_types").data("volunteer-services"),function(e,t){$("#service_request_service_type").append('<option value"'+t[0]+'">'+t[1]+"</option>")}))}),$("#trips_form_more_link").click(function(){return $("div#service_type").show(),$("#trips_form_more_link").hide(),!1}),$("body").is(".service_requests.new, .service_requests.create, .service_requests.edit, .service_requests.update")&&((e=new App.ServiceRequest($("#container"))).initForm(),e.initNew2()),$(".service_requests.calendar").length>0&&(e=new App.ServiceRequest($("#calendar"))).initFilters()}),document.addEventListener("turbo:load",initOnLoadServiceRequests2),document.addEventListener("DOMContentLoaded",initOnLoadServiceRequests2),document.addEventListener("turbo:load",initOnLoadServiceTypes2),document.addEventListener("DOMContentLoaded",initOnLoadServiceTypes2),document.addEventListener("turbo:load",initSessions2),document.addEventListener("DOMContentLoaded",initSessions2),document.addEventListener("turbo:load",initOnLoadSetAch2),document.addEventListener("DOMContentLoaded",initOnLoadSetAch2),App.StripePayment=class{constructor(e,t){if(this.paymentElement=$("#payment-element"),this.paymentMessage=$("#payment-message"),this.amountElement=$(t),this.tokenElement=$("#stripeToken"),!(this.paymentElement.length<0||this.paymentMessage.length<0||this.amountElement.length<0||this.tokenElement.length<0)&&(this.STATES=["WAITING","VALIDATED","CONFIRMED"],this.stripe_types=["payment-intent","subscription","setup-intent"],this.buttonElement=null,this.stateParams={state:this.waiting,stripe_type:null,stripe_element:null,token:null,amount:null},this.stripeAppearance={theme:"stripe"},this.elementOptions={},this.confirmOptions={},"undefined"!=typeof Stripe))if(e){this.pk=e;try{this.stripe=Stripe(this.pk)}catch(e){console.error("StripePayment: Stripe.js could not be initialized: "+e)}}else console.warn("StripePayment: no publishable key on this page; card payments are unavailable.")}validate(e,t=this.stripe_types[0],n={}){return new Promise(i=>this.state!==this.waiting?i({success:!1}):this.stripe_types.includes(t)?(this.stateParams.stripe_type=t,void this.constructor.refreshCaptchaToken().then(()=>{$("#g-recaptcha-response").length>0&&(n["g-recaptcha-response"]=$("#g-recaptcha-response").val()),$("#g-recaptcha-response-data-
42hvstripesecret").length>0&&(n["g-recaptcha-response-data"]={hvstripesecret:$("#g-recaptcha-response-data-hvstripesecret").val()}),$("#hv_was_signed_in").length>0&&(n.was_signed_in=$("#hv_was_signed_in").val()),n.local_village_id_for_stripe=$("#local_village_id_for_stripe").val();var t=$("#donation_donor_type").val();t&&t.length>0&&(n.payer_type=$("#donation_donor_type").val()),e(this.stateParams).then(e=>{e.error?(this.showMessage(e.error),i({success:!1})):this.getClientSecret(n).then(e=>{if(!e)return this.showMessage("Could not contact the payment server. Please try again."),void i({success:!1});if(this.handleResponse(e,!1)){"seti"===e.client_secret.slice(0,4)&&(this.stateParams.stripe_type=this.stripe_types[2]);let t=e.client_secret,n=e.token;this.renderCheckout(t,n),this.transition(this.validated),"Almost there! Just check the box below to confirm you're not a robot, then submit your payment again."==$("#payment-message").html()&&($("#hvrecatpchav2").hide(),$("#payment-message").html("")),i({success:!0})}else i({success:!1}),"captcha_required"===e.error_code&&this.renderRecaptchaV2Fallback()}).catch(e=>{this.showMessage("Payment setup error: "+e.message),i({success:!1})})})})):i({success:!1}))}confirm(e){return new Promise(t=>{if(this.state!==this.validated)return t({success:!1});e(this.stateParams).then(e=>{e.error?(this.showMessage(e.error),t({success:!1})):this.stateParams.amount!==this.amount?this.updatePaymentAmount().then(e=>{!0===e?this.chargeCard().then(e=>{t({success:e})}):(this.showMessage("Could not update the payment amount. Please reload the page and try again."),t({success:!1}))}):this.chargeCard().then(e=>{t({success:e})})})})}transition(e){switch(this.state){case this.waiting:if(e!==this.validated)return console.log("Illegal transition from "+this.state+" to "+e),!1;this.stateParams.state=this.validated;break;case this.validated:switch(e){case this.waiting:return!1;case this.confirmed:let e=this.stateParams;if(!(e.stripe_type&&e.stripe_element&&e.token&&e.amount))return!1;this.stateParams.state=this.confirmed;break;default:return console.log("Staying in the same state: "+this.state),!0}break;case this.confirmed:return e===this.waiting||console.log("Illegal transition form "+this.state+" to "+e),!1;default:return console.log("Illegal state: "+this.state),!1}return!0}chargeCard(){return new Promise(e=>{this.state!==this.validated&&e(!1);let t=this.stateParams.stripe_element,n=null,i=Object.assign({return_url:""},this.confirmOptions||{});switch(this.stateParams.stripe_type){case this.stripe_types[0]:case this.stripe_types[1]:n=this.stripe.confirmPayment({elements:t,confirmParams:i,redirect:"if_required"});break;case this.stripe_types[2]:n=this.stripe.confirmSetup({elements:t,confirmParams:i,redirect:"if_required"});break;default:console.log("Invalid payment state"),e(!1)}n.then(t=>{t.error?(this.showMessage(t.error.message),e(!1)):(this.stateParams.setupIntent=t.setupIntent||null,this.stateParams.paymentIntent=t.paymentIntent||null,console.log("Payment successful"),this.transition(this.confirmed),e(!0))})})}renderCheckout(e,t){if(!this.stripe)return void this.showMessage("Payment system unavailable \u2014 please reload the page and try again.");let n=this.stripeAppearance,i=this.stripe.elements({clientSecret:e,appearance:n}),o=i.create("payment",this.elementOptions||{});o.mount("#payment-element"),this.stateParams.stripe_element=i,this.stateParams.token=t,this.stateParams.amount=this.amount,this.tokenElement.val(t),o.on("change",e=>{e.error&&this.showMessage(e.error.message)})}get amount(){let e=100*parseFloat(this.amountElement.val(),10);return e=Math.round(e),e}get state(){return this.stateParams.state}get waiting(){return this.STATES[0]}get validated(){return this.STATES[1]}get confirmed(){return this.STATES[2]}showMessage(e,t=!0,n=!0){let i=this.paymentMessage;n?i.css("color","red"):i.removeProp("color"),i.text(e),i.slideDown(),t&&setTimeout(function(){i.slideUp()},1e4)}ready(e=null){if(e)this.buttonElement=e;else{if(!this.buttonElement)return;e=this.buttonElement}let t=$(e);t.prop("disabled",!1),t.hasClass("hv-btn")?t.css("background",""):t.css("background","#AA1A26")}notReady(e=null,t=!1){if(e)this.buttonElement=e;else{if(!this.buttonElement)return;e=this.buttonElement}let n=$(e);n.prop("disabled",!0),t&&n.html("<i class='fa fa-spinner fa-spin'></i> Processing..."),n.hasClass("hv-btn")?n.css("background",""):n.css("background","grey")}handleResponse(e,t=!0,n=!0){return!e.error||(this.showMessage(e.error,t,n),!1)}renderRecaptchaV2Fallback(){let e=$("#hvrecatpchav2");if(0===e.length){if($("#g-recaptcha-response").length>0&&"undefined"!=typeof grecaptcha&&"function"==typeof grecaptcha.reset)try{grecaptcha.reset()}catch(e){}return}if(e.show(),e.data("hvRendered"))return void("undefined"!=typeof grecaptcha&&"function"==typeof grecaptcha.reset&&grecaptcha.reset(e.data("hvWi
42dgetId")));let t="We couldn't verify that you are human. Please disable content blockers for this page, reload and try again.";if("undefined"==typeof grecaptcha||"function"!=typeof grecaptcha.ready)return void this.showMessage(t,!1);"function"!=typeof grecaptcha.render&&this.showMessage(t,!1),e.data("hvRendered",!0);let n=e.data("sitekey")||$(".g-recaptcha[data-sitekey]").data("sitekey")||"6LcI89kZAAAAAOryfKA7iAO4tk8Auib1eUg_OcxY";grecaptcha.ready(function(){let t=grecaptcha.render("hvrecatpchav2",{sitekey:n,callback:"verifyRecaptchav2Callback"});e.data("hvWidgetId",t)})}async getClientSecret(e={}){let t=this.tokenElement.val(),n={...{amount:this.amount,old_token:t,type:this.stateParams.stripe_type},...e},i=await this.constructor.contactServer("/stripe_payments/stripe_client_secret",n);return i?i.error?{error:i.error,error_code:i.error_code}:{client_secret:i.client_secret,token:i.token}:null}async updatePaymentAmount(){let e=this.amount,t=await this.constructor.contactServer("/stripe_payments/update_payment_intent",{payment_intent:this.stateParams.token,amount:e});return!!t&&t.complete}static refreshCaptchaToken(){let e=$("#g-recaptcha-response-data-
42hvstripesecret");return 0===e.length||"function"!=typeof executeRecaptchaForHvstripesecretAsync?Promise.resolve(null):executeRecaptchaForHvstripesecretAsync().then(t=>(e.val(t),t)).catch(()=>null)}static async contactServer(e,t){const n=document.querySelector("[name='csrf-token']")?.content||"";try{let i=await fetch(e,{method:"POST",headers:{"Content-Type":"application/json","X-CSRF-Token":n},body:JSON.stringify(t)}),o=null;try{o=await i.json()}catch(e){return console.error("outer",e.message),{error:"You are not authorized to perform this action"}}return o||null}catch(e){return console.log("An error occured while contacting the server: "+e),null}}},$(document).on("turbo:load",function(){loadSubscription(),loadSliders()}),$(document).on("turbo:load",function(){$("body").is(".trips.new, .trips.create, .trips.edit, .trips.update")&&($("#search_origin_address_name").bind("railsAutocomplete.select",function(e,t){$("#trip_origin_address_attributes_id").val(t.item.id),$("#trip_origin_address_attributes_name").val(t.item.name),$("#trip_origin_address_attributes_number").val(t.item.number),$("#trip_origin_address_attributes_street").val(t.item.street),$("#trip_origin_address_attributes_city").val(t.item.city),$("#trip_origin_address_attributes_state").val(t.item.state),$("#trip_origin_address_attributes_zip_code").val(t.item.zip_code)}),$("#search_origin_address_name").on("blur",function(){$("#trip_origin_address_attributes_name").val($(this).val())}),$("#search_destination_address_name").bind("railsAutocomplete.select",function(e,t){$("#trip_destination_address_attributes_id").val(t.item.id),$("#trip_destination_address_attributes_name").val(t.item.name),$("#trip_destination_address_attributes_number").val(t.item.number),$("#trip_destination_address_attributes_street").val(t.item.street),$("#trip_destination_address_attributes_city").val(t.item.city),$("#trip_destination_address_attributes_state").val(t.item.state),$("#trip_destination_address_attributes_zip_code").val(t.item.zip_code)}),$("#search_destination_address_name").on("blur",function(){$("#trip_destination_address_attributes_name").val($(this).val())}))}),function(){function e(){"undefined"!=typeof Turbo&&Turbo.session&&(Turbo.session.drive=!1)}document.addEventListener("DOMContentLoaded",e),document.addEventListener("turbo:load",e),document.addEventListener("turbo:before-stream-render",function(e){var t=e.target,n=t.getAttribute("action"),i=t.getAttribute("target"),o=i?document.getElementById(i):null;switch(n){case"open_modal":o&&(o.style.display="flex"),e.preventDefault();break;case"close_modal":o&&(o.style.display="none"),e.preventDefault();break;case"close_dialog":if(window.jQuery&&i){var r=window.jQuery("#"+i);r.length&&r.hasClass("ui-dialog-content")&&r.dialog("close")}e.preventDefault()}})}(),document.addEventListener("turbo:load",function(){var e=document.querySelector(".relationship_form");e&&(e.addEventListener("keydown",function(e){"Enter"===e.key&&"search"===e.target.type&&e.preventDefault()}),document.querySelectorAll(".hv-search-section").forEach(function(e){function t(e){e.preventDefault(),e.stopPropagation(),$.ajax({url:"/users/search",method:"GET",dataType:"script",data:{search:i.value,form_id:r}})}var n=e.querySelector("input[name='form_id']"),i=e.querySelector("input[name='search']"),o=e.querySelector("button.hv-search-btn");if(i&&o){var r=n?n.value:"";o.addEventListener("click",t),i.addEventListener("keydown",function(e){"Enter"===e.key&&t(e)})}}))}),$(document).on("turbo:load",function(){$("tr[data-link]").mouseover(function(){$(this).css("color","orange")}),$("tr[data-link]").mouseout(function(){$(this).css("color","black")}),$("tr[data-link]").click(function(){window.location=$(this).data("link")}),$(".profiles.show").length>0&&(tinymce.remove(),TinyMCERails.configuration.default={selector:"textarea.tinymce",toolbar:["styleselect | fontselect | fontsizeselect | bold italic | forecolor backcolor | bullist numlist outdent indent | alignleft aligncenter alignright al
42ignjustify | undo redo","image | media | link "],toolbar_sticky:!0,height:600,font_formats:"Andale Mono=andale mono,times;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Impact=impact,chicago;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings,zapf dingbats",fontsize_formats:"8pt 10pt 11pt 12pt 14pt 16pt 18pt 24pt 30pt 36pt",paste_data_images:!1,paste_as_text:!0,browser_spellcheck:!0,plugins:["advlist","autolink","lists","link","image","charmap","preview","anchor","pagebreak","searchreplace","wordcount","visualblocks","code","fullscreen","insertdatetime","media","nonbreaking","table","directionality","emoticons","template"],convert_urls:!1,image_advtab:!0,images_upload_url:"/tinymce_assets",images_upload_credentials:!0,file_picker_types:"image",automatic_uploads:!0},TinyMCERails.initialize("default",{content_css:"/css/tinymce.css",apply_source_formatting:!0}))}),function(){function e(e,t){var n=document.getElementById(e);n&&(n.value=t)}function t(){var e=document.querySelector('input[name="param1"]');return e&&e.value?e.value:"-1"}function n(e){e&&fetch(e,{headers:{Accept:"text/vnd.turbo-stream.html","X-Requested-With":"XMLHttpRequest"},credentials:"same-origin"}).then(function(e){if(!e.ok)throw new Error("Downstream fetch failed: "+e.status);return e.text()}).then(function(e){"undefined"!=typeof Turbo&&e&&Turbo.renderStreamMessage(e)}).catch(function(e){window.console&&console.warn&&console.warn("Downstream fetch failed:",e)})}function i(e){e&&fetch(e,{headers:{Accept:"application/json","X-Requested-With":"XMLHttpRequest"},credentials:"same-origin"}).then(function(e){return e.json()}).then(function(e){e&&e.redirect_to&&(window.location.href=e.redirect_to)}).catch(function(e){window.console&&console.warn&&console.warn("Downstream redirect fetch failed:",e)})}function o(e){return e&&null!==e.offsetParent}function r(e){e&&fetch("/users/"+e+"/user_with_addr.json",{headers:{Accept:"application/json","X-Requested-With":"XMLHttpRequest"},credentials:"same-origin"}).then(function(e){if(!e.ok)throw new Error("user_with_addr fetch failed: "+e.status);return e.json()}).then(function(e){s(e)}).catch(function(e){window.console&&console.warn&&console.warn("user_with_addr fetch failed:",e)})}function s(t){if(t){var n=document.getElementById("ticket_order_user_attributes_f
42irst_name");if(n){var i=t.user||{};n.value=i.first_name||"",e("ticket_order_user_attributes_last_name",i.last_name||""),e("ticket_order_user_attributes_email",i.email||"");var r=t.address;r&&(e("ticket_order_address_attributes_number",r.number||""),e("ticket_order_address_attributes_street",r.street||""),e("ticket_order_address_attributes_street_additional",r.street_additional||""),e("ticket_order_address_attributes_city",r.city||""),e("ticket_order_address_attributes_zip_code",r.zip_code||""),e("ticket_order_address_attributes_state",r.state||""))}else{var s="searched_user",a=document.getElementById("search_performed_by");if(o(a)){s="second_searched_user";var l=document.getElementById("more_search_checkin_volunteer");l&&(l.style.display="");var c=document.getElementById("add_performed_by");c&&(c.style.display="none")}var d=(document.getElementById("event_searching_for")||{}).value||"";"speaker"===d&&(s="speaker_searched_user"),document.getElementById("event_organizer_user")&&"speaker"!==d&&(s="event_organizer_user");var u=document.getElementById(s);if(u){u.style.display="";var h=document.querySelector(".hv-card")?t.html:t.html_v1;u.innerHTML=h||"";var p=document.getElementById("message_area");p&&t.can_add_needs&&t.member_needs&&(p.value=p.value+t.member_needs);var f=document.getElementById("donation_name_in_contribution_records");if(f){var m=t.user||{};f.value=m.full_name||"";var g=document.getElementById("email_temp");g&&(g.value=m.email||"");var v=t.address;v&&(e("donation_address_attributes_number",v.number||""),e("donation_address_attributes_street",v.street||""),e("donation_address_attributes_city",v.city||""),e("donation_address_attributes_state",v.state||""),e("donation_address_attributes_zip_code",v.zip_code||""))}if(document.querySelector(".event_participations.new")){var y=document.getElementById("register_associated_member");y&&(y.style.display="",y.innerHTML=t.associated_members_html||"")}if(document.querySelector(".checkins.new, .checkins.create")&&!o(a)){var b=document.getElementById("checkin-member-prefs");b&&(b.innerHTML=t.checkin_prefs_html||"")}}else{var _=document.getElementById("member_or_volunteer");if(_){var w="volunteer"===_.value?"searched_usersearch_volunteer":"searched_usersearch_benef",C=document.getElementById(w);if(C){C.style.display="";var k=document.querySelector(".hv-card")?t.html:t.html_v1;C.innerHTML=k||""}}}}}}function a(o){var s=(o.id||"").replace("select_user_link_","");if(s){document.querySelectorAll(".users_list").forEach(function(e){e.style.display="none"});var a="",l=!1,c=!1,d=!1;if(document.getElementById("service_request_beneficiary_user_id")){e("service_request_beneficiary_user_id",s);var u=document.getElementById("is_village_builder");u&&(u.checked=!1),l=!0}else if(document.getElementById("event_participation_user_id"))e("event_participation_user_id",s),l=!0;else if(document.getElementById("u_relationship_related_user_id"))e("u_relationship_related_user_id",s),l=!0;else if(document.getElementById("blog_post_user_id"))e("blog_post_user_id",s),l=!0;else if(document.getElementById("donation_donor_id")){e("donation_donor_id",s),e("donation_donor_type","User"),window.jQuery&&window.jQuery("#donation_donor_id").trigger("change");var h=document.getElementById("new_person");h&&(h.style.display="none");var p=document.getElementById("searched_organization");p&&(p.style.display="none"),l=!0}else if(document.getElementById("service_response_volunteer_user_id")||document.getElementById("additional_beneficiary_user_id")){var f=o.closest(".hv-search-section"),m=f&&f.querySelector('input[name="target_field_id"]'),g=m&&m.value?m.value:document.getElementById("service_response_volunteer_user_id")?"service_response_volunteer_user_id":"additional_beneficiary_user_id";e(g,s);var v="service_response_volunteer_user_id"===g?document.getElementById("searched_user_action_form"):document.getElementById("searched_user_action_form2");v&&(v.style.display=""),l=!0}else if(document.getElementById("member_or_volunteer")){e("member"===document.getElementById("member_or_volunteer").value?"hours_effort_beneficiary_user_id":"hours_effort_user_id",s),l=!0}else if(document.getElementById("checkin_feeling_how")){var y=document.getElementById("search_performed_by");y&&null!==y.offsetParent?e("checkin_performed_by_user_id",s):e("checkin_user_id",s),l=!0}else if(document.getElementById("summary_replies")){a="/events/"+((document.getElementById("event_id")||{}).value||"")+"/event_participations/add_attendee?user_id="+s,d=!0}else if(document.getElementById("select_duplicate_users_to_merge")){a="/users_by_admins/add_duplicate?user_id="+s+"&table_id="+t(),c=!0}else if(document.getElementById("select_duplicate_users_to_merge2")){a="/users_by_admins/add_duplicate?user_id="+s+"&table_id="+t(),c=!0}else if(document.getElementById("delete_fake_users"))a="/users_by_admins/add_fake_user?user_id="+s,c=!0;else if(document.getElementById("delete_fake_users2"))a="/users_by_admins/add_fake_user?user_id="+s,c=!0;else{if(document.getElementById("compare_duplicate_users")){var b=t();return void window.location.replace("/users_by_admins/merge_users_compare?user["+b+"]=1&user["+s+"]=1")}if(document.getElementById("compare_duplicate_users2")){var _=t();return void window.location.replace("/users_by_admins/merge_users_compare?user["+_+"]=1&user["+s+"]=1")}if(document.getElementById("event_name"))e("speaker"===((document.getElementById("event_searching_for")||{}).value||"")?"event_speaker_user_id":"event_organizer_user_id",s),l=!0;
42else if(document.getElementById("ticket_order_user_attributes_first_name"))l=!0;else if(document.getElementById("organization_affiliation_title"))e("organization_affiliation_user_id",s),l=!0;else if(document.getElementById("edit_setting_1"))e("setting_privacy_data_protection_officer_user_id",s),l=!0;else if(document.getElementById("prospect_task_name"))e("prospect_task_attributed_to_user_id",s),l=!0;else if(document.querySelector(".service_requests.edit_flex_by_matched_volunteer")||document.querySelector(".service_requests.edit_flex_by_matched_volunteer"))l=!0;else{e("add_volunteer_to_service_type_user_id",s),a="/service_types/"+((document.getElementById("service_type_id")||{}).value||"")+"/add_volunteer?user_id="+s,d=!0}}l?r(s):c?n(a):d&&i(a)}}function l(){if(!!document.getElementById("event_participation_user_id")||!!document.getElementById("summary_replies")){var e=document.getElementById("new_person_item_box");e&&(e.style.display="")}}function c(e){var t=e.querySelector('input[name="search"]');if(t){var n=e.querySelector('input[name="user_type"]'),i=e.querySelector('input[name="form_id"]'),o=e.querySelector('input[name="target_field_id"]'),r=e.querySelector(".users_list"),s=new URLSearchParams;
42s.append("search",t.value),n&&n.value&&s.append("user_type",n.value),i&&i.value&&s.append("form_id",i.value),o&&o.value&&s.append("target_field_id",o.value),fetch("/users/search?"+s.toString(),{headers:{Accept:"text/html","X-Requested-With":"XMLHttpRequest"},credentials:"same-origin"}).then(function(e){if(!e.ok)throw new Error("User search failed: "+e.status);return e.text()}).then(function(e){r&&(r.innerHTML=e,r.style.display="block",document.dispatchEvent(new CustomEvent("hv:users-list-rendered")))}).catch(function(e){window.console&&console.warn&&console.warn("User search failed:",e)})}}function d(e){return!!e&&(!e.dataset.hvSearchWired&&(!document.getElementById("event_name")&&!!e.querySelector(".users_list")))}document.addEventListener("click",function(e){var t=e.target.closest&&e.target.closest(".select_user_link");if(t)return e.preventDefault(),void a(t);if(e.target.closest&&e.target.closest("#create_new_person_link")){if(!(!!document.getElementById("event_participation_user_id")||!!document.getElementById("summary_replies")))return;e.preventDefault();var n=document.getElementById("new_person_admin");n&&(n.style.display=""),document.querySelectorAll(".users_list").forEach(function(e){e.style.display="none"})}}),document.addEventListener("click",function(e){var t=e.target.closest&&e.target.closest(".hv-search-btn");if(t){var n=t.closest(".hv-search-section");d(n)&&(e.preventDefault(),e.stopPropagation(),c(n))}}),document.addEventListener("keydown",function(e){if("Enter"===e.key){var t=e.target;if(t&&"search"===t.name){
43var n=t.closest&&t.closest(".hv-search-section");d(n)&&(e.preventDefault(),e.stopPropagation(),c(n))}}}),window.hvWireUserSearchSections=function(){},document.addEventListener("hv:users-list-rendered",l),document.addEventListener("turbo:before-stream-render",function(e){0===(e.target.getAttribute("target")||"").indexOf("users_list")&&requestAnimationFrame(function(){requestAnimationFrame(l)})})}(),$(document).on("turbo:load",function(){$("#agenda_user_id").length>0&&displayFullCalendar()}),$(document).on("turbo:load",function(){function e(){try{document.cookie="testCookie=true; path=/; max-age=1";
43const e=document.cookie.includes("testCookie=true");return document.cookie="testCookie=; path=/; max-age=0",e}catch(e){return!1}}if(e()||($("#notice_alert").html('<p class="notice">Cookies are blocked in your browser. Please enable them for full functionality. If the problem persists, we also recommend trying a different browser, such as Google Chrome, as it often provides a smoother experience across many websites.</p>'),$("#notice_alert").show(),scrollToAnchor("notice_alert")),$("#remember_me_tooltip_link").click(function(){return $("#help_remember_me").show(),$("#help_membership_tooltip_link").hide(),!1}),$("#more_gen_fields_link").click(function(){return $("#general_more_fields").show(),$("#more_gen_fields_link").hide(),!1}),$("#add_affiliation_button").click(function(){return $("#search_organization_div").show(),$("#add_affiliation_button").hide(),!1}),$("#create_membership_when_indev_village_button").click(function(){return alert("Please contact HelpfulVillage.com to activate this module"),!1}),$("#create_membership_when_indev_village_button").click(function(){return $("#create_membership_when_indev_village_button").hide(),$("#more_pay").show(),!1}),$("#volunteer_info_is_vacation_period_active").click(function(){$("#vacation_dates").show()}),$("#is_show_username_field").change(function(){this.checked?($("#username_and_shared_email").show(),$("#edit_users_email_field").hide()):($("#user_username").val(""),$("#username_and_shared_email").hide(),$("#edit_users_email_field").show())}),1===$("#data-alert").data("noticeAlert")&&$("#notice_alert").show(),$(document).on("click",".alert__close",function(){$(this).closest(".alert").fadeOut()}),$("#tabs").tabs(),$("#membership_tabs").tabs(),$(".profiles.show").length>0){var t=document.getElementById("profile-tabs");if(t&&window.jQuery&&jQuery.fn.tabs){var n=parseInt(t.getAttribute("data-initial-tab"),10)||0;jQuery("#profile-tabs").tabs({active:n})}}if($(".users_by_admins.edit").length>0){var i=$("select#user_sexual_orientation");i.change(function(){$("#sexual_orientation_custom_value").toggle("Not listed. Please specify..."===i.val())});var o=document.getElementById("uba-edit-tabs");if(o&&window.jQuery&&jQuery.fn.tabs){var r=parseInt(o.getAttribute("data-initial-tab"),10)||0;jQuery("#uba-edit-tabs").tabs({active:r})}var s=$("#memb-tabs");s.length&&(s.find(".hv-tab").first().addClass("hv-tab-active"),s.on("click",".hv-tab",function(e){e.preventDefault();var t=$(this).data("subtab");s.find(".hv-tab").removeClass("hv-tab-active"),$(this).addClass("hv-tab-active"),$("#memb-individual, #memb-household").hide(),$("#memb-"+t).show(),$("#memb-individual-extras").toggle("individual"===t)})),$("#volunteer_info_is_vacation_period_active").on("change",function(){$("#vacation_dates").toggle(this.checked)}),$("#profile_pic_file").on("change",function(){$(this).closest("form").submit()}),$("#checkin_vulnerability_select").on("change",function(){var e=$
43("#additional_member_info_checkin_frequency");if(""===e.val()){var t=$(this).val().charAt(0),n=$(this).data("vulnDays")[t];n&&e.val(n)}}),$("#background-card-toggle").on("click",function(){var e=$("#background-card-body"),t=$(this).find(".background-chevron");e.toggle(),t.css("transform",e.is(":visible")?"":"rotate(-90deg)")}),$("#references-card-toggle").on("click",function(){var e=$("#references-card-body"),t=$(this).find(".references-chevron");e.toggle(),t.css("transform",e.is(":visible")?"":"rotate(-90deg)")}),$("#primary-doc-card-toggle").on("click",function(){var e=$("#primary-doc-card-body"),t=$(this).find(".primary-doc-chevron");e.toggle(),t.css("transform",e.is(":visible")?"":"rotate(-90deg)")}),$("#pets-card-toggle").on("click",function(){var e=$("#pets-card-body"),t=$(this).find(".pets-chevron");e.toggle(),t.css("transform",e.is(":visible")?"":"rotate(-90deg)")})}if($(".users_by_admins.members_directory").length>0||$(".users_by_admins.edit").length>0||$(".villages.our_service_area").length>0){let e="initMap";$(".villages.our_service_area").length>0&&(e="initVillageMap"),($("#map").length>0||$("#village_map").length>0)&&$.ajax("https://maps.googleapis.com/maps/api/js?key=AIzaSyBuUJ5n1WTi98pxFjlQcLFrmg-72JLi_Kg&callback="+e,{crossDomain:!0,dataType:"script"})}$("#search_person_event").bind("keypress keydown keyup",function(e){if(13==e.keyCode)return e.preventDefault(),$("#search_person_event_button").click(),!1}
43),$("#search_person_event_button").click(function(){var e=$("#search_person_event").val();return $.ajax({type:"GET",url:"/users/search.js",data:{search:e},success:function(){return!1},error:function(){return!1}}),!1}),$("#search_organization_name").bind("keypress keydown keyup",function(e){13==e.keyCode&&(e.preventDefault(),$("#search_organization_button").click())}),$("#search_organization_button").click(function(){var e=$("#search_organization_name").val(),t=$("#user_occupation").val(),n=new URLSearchParams({target_field_id:"selected_organization_id",occupation:t||"",search:e||""});return $("#general_more_fields").show(),$("#more_gen_fields_link").hide(),fetch("/organizations/search?"+n.toString(),{headers:{Accept:"text/vnd.turbo-stream.html","X-Requested-With":"XMLHttpRequest"},credentials:"same-origin"}).then(function(e){if(!e.ok)throw new Error("organizations/search failed: "+e.status);return e.text()}).then(function(n){"undefined"!=typeof Turbo&&n&&Turbo.renderStreamMessage(n),requestAnimationFrame(function(){requestAnimationFrame(function(){var n=$('#organizations_list, [id^="organizations_list"]').first();n.find(".select_organization_link").length>0||0===$("#add_new_affiliation_in_user_profile").length||($("#organization_name").val(e),$("#affiliation_title").val(t),$("#affiliation_notice").html("No Organization Found."),$("#add_new_affiliation_in_user_profile").show(),$("#affiliation_notice").show(),$("#organization_name").show(),n.hide(),$("#organization_name_placeholder").hide())})})}).catch(function(e){window.console&&console.warn&&console.warn("organizations/search error:",e)}),!1}
43),$("#add_new_org_button").click(function(){var e=$("#organization_name").val(),t=$("#selected_organization_id").val(),n=$("#affiliation_title").val(),i=$("#user_id").val(),o=$('meta[name="csrf-token"]').attr("content"),r=new FormData;return r.append("organization_name",e||""),r.append("affiliation_title",n||""),r.append("user_id",i||""),r.append("selected_organization_id",t||""),fetch("/organization_affiliations/create_from_user",{method:"POST",headers:{Accept:"text/vnd.turbo-stream.html","X-CSRF-Token":o||"","X-Requested-With":"XMLHttpRequest"},credentials:"same-origin",body:r}).then(function(e){return 406===e.status?(alert("Affiliation title cannot be empty"),null):e.ok?e.text():(alert("Error creating affiliation"),null)}).then(function(e){e&&("undefined"!=typeof Turbo&&Turbo.renderStreamMessage(e),-1!==e.indexOf("list_of_affiliations")&&($("#add_new_affiliation_in_user_profile").hide(),$("#search_organization_div").hide(),$("#add_affiliation_button").show()))}).catch(function(){alert("Error creating affiliation")}),!1}),$("#users_by_admins_edit_more_pay_link").click(function(){return $("#more_pay").show(),!1}),$(".datepicker").datepicker(),$(document).trigger("refresh_autonumeric"),$("#accordion").accordion({heightStyle:"content"}),($(".service_type_categories.edit").length>0||$(".providers.edit").length>0)&&$(".ui-accordion-content").show(),$("#contact_infos_button").on("click",function(){return contact_infos_to_clipboard(),!1}),$("#show_filter").click(function(){return $("#show_filter").hide(),$("#hide_filter").show(),$("#filter_checkboxes").show(),!1}),$("#hide_filter").click(function(){return $("#hide_filter").hide(),$("#show_filter").show(),$("#filter_checkboxes").hide(),!1}),$("#check_all").click(function(){return $(".filter_check_box").prop("checked",!0),!1}),$("#uncheck_all").click(function(){return $(".filter_check_box").prop("checked",!1),!1}),$("#add_guests_link").click(function(){return $("#add_guests_link").hide(),$("#additional_guests").show(),!1}),$("#proceed_without_login").click(function(e){e.preventDefault(),$("#unknown_user_registration_info").show(),$("#event_participation_additional_info").show(),$("#proceed_without_login").hide()});var a=$("#emailTemplateForm"),l=$("select#email_template_id");l.change(function(){l.val();a.submit()}),$("img").parent("a").css("border-bottom","none"),$("#select_all_checkboxes").on("click",function(){$(":checkbox").prop("checked",!0)}),$(".select_attribute").on("click",function(){let e=$(this).attr("id");console.log("THIS ID IS "+e),$("#"+e).prop("checked")?($("#"+e+"1").css("background-color","#F8CAC6"),$("#"+e+"2").css("background-color","#bfedd2"),$("#"+e+"3").css("background-color","#bfedd2")):($("#"+e+"1").css("background-color","#bfedd2"),$("#"+e+"2").css("background-color","#F8CAC6"),$("#"+e+"3").css("background-color","#F8CAC6"))}),$("#report_volunteer_profile_button").click(function(e){e.preventDefault(),$("#report_volunteer_profile_dates").slideDown();let t=$("#report_volunteer_profile_generating");t.click(function(){setTimeout(function(){$.rails.enableElement(t),t.removeAttr("disabled")},3e3)})}),$("#report_tax_deductible_button").click(function(e){e.preventDefault(),$("#report_tax_deductible_dates").slideDown();let t=$("#report_tax_deductible_generating");t.click(function(){setTimeout(function(){$.rails.enableElement(t),t.removeAttr("disabled")},3e3)})})}),$("body").on("click",".toggle-password",function(){$(this).toggleClass("fa-eye fa-eye-slash");
43var e=$("#user_password");"password"===e.attr("type")?(e.attr("type","text"),$("#show_hide_button").html("Hide")):(e.attr("type","password"),$("#show_hide_button").html("Show"))}),$(".admin_features_header").click(function(){$header=$(this),$content=$header.next(),$content.slideToggle(500,function(){$header.text(function(){return $content.is(":visible"),"Admin Features"})})}),document.addEventListener("turbo:before-stream-render",function(e){"similar_users_popup"===e.target.getAttribute("target")&&requestAnimationFrame(function(){requestAnimationFrame(function(){var e=window.jQuery&&window.jQuery("#similar_users_popup");e&&e.length&&(e.dialog({modal:!0,width:1e3}),e.css({width:"auto"}),window.jQuery("span.ui-dialog-title").text("Select User".toUpperCase()))})})}),document.addEventListener("turbo:load",initUsersByAdminsVanillaOnLoad),document.addEventListener("DOMContentLoaded",initUsersByAdminsVanillaOnLoad),document.addEventListener("turbo:load",initUsersUnsubscribe),document.addEventListener("DOMContentLoaded",initUsersUnsubscribe);var map_search_people,map,last_selected,last_selected_marker,members_markers={},volunteers_markers={},members_volunteers_markers={},localcoordinators_markers={},checkin_markers={},neighborhoods_polygons={},image_url_prefix="/images/";window.initVillageMap=async function(){await google.maps.importLibrary("marker"),map=new google.maps.Map(document.getElementById("village_map"),{zoom:4,center:{lat:39.7634295,lng:-96.3845439},mapId:"DEMO_MAP_ID"}),bounds=new google.maps.LatLngBounds;var e=$("#village_infos").data("members"),t=$("#village_infos").data("volunteers"),n=$("#village_infos").data("membersvolunteers"),i=$("#village_infos").data("localcoordinators"),o=$("#village_infos").data("neighborhoods");members_markers=drawMarkers(map,e,"Member","home-2-red.png"),volunteers_markers=drawMarkers(map,t,"Volunteer","home-2-grn.png"),members_volunteers_markers=drawMarkers(map,n,"Member & Volunteer","home-2-ylw.png"),localcoordinators_markers=drawMarkers(map,i,"Local Coordinator","cserkesz_ikon-white.png"),neighborhoods_polygons=drawPolygons(map,o),map.fitBounds(bounds),map.addListener("mousemove",function(){$("[role='tooltip']").remove()})}
43,$(document).on("turbo:load",function(){var e=$("#members_checkbox"),t=$("#volunteers_checkbox"),n=$("#localcoordinators_checkbox"),i=$("#neighborhoods_checkbox");map_search_people=$("#map_search_people"),e.click(function(){e.is(":checked")?(set_markers_visibility(members_markers,!0),set_markers_visibility(members_volunteers_markers,!0),hideCheckins()):(set_markers_visibility(members_markers,!1),t.is(":checked")||set_markers_visibility(members_volunteers_markers,!1))}),t.click(function(){t.is(":checked")?(set_markers_visibility(volunteers_markers,!0),set_markers_visibility(members_volunteers_markers,!0)):(set_markers_visibility(volunteers_markers,!1),e.is(":checked")||set_markers_visibility(members_volunteers_markers,!1))}),n.click(function(){set_markers_visibility(localcoordinators_markers,n.is(":checked"))}),i.click(function(){set_markers_visibility(neighborhoods_polygons,i.is(":checked"))});let o="Local Villages Legend";var r=$("#village_map_neighborhoods_legend_button"),s=$("#village_map_neighborhoods_legend_list");s.hide(),r.html($("<i/>",{class:"fa fa-caret-down"})).append(o),r.click(function(){s.is(":hidden")?(s.slideDown(),r.html($("<i/>",{class:"fa fa-caret-up"})).append(o)):(s.slideUp(),r.html($("<i/>",{class:"fa fa-caret-down"})).append(o))}),document.querySelectorAll('[role="presentation"]').forEach(function(e){e.classList.remove("active")}),$("#select_emergency_form").on("submit",function(e){e.preventDefault();var t=this,n=t.getAttribute("action")||t.action,i=new URLSearchParams(new FormData(t)).toString(),o=n+(n.indexOf("?")>=0?"&":"?")+i;fetch(o,{headers:{Accept:"text/vnd.turbo-stream.html","X-Requested-With":"XMLHttpRequest"},credentials:"same-origin"}).then(function(e){if(!e.ok)throw new Error("Emergency fetch failed: "+e.status);return e.text()}).then(function(e){"undefined"!=typeof Turbo&&e&&Turbo.renderStreamMessage(e),showCheckins()}).catch(function(e){window.console&&console.warn&&console.warn("Emergency fetch failed:",e)})});var a=$("#selected_emergency").data("emergency");""!=a&&($("#select_emergency").val(a),$("#select_emergency_form").submit()),$("#select_emergency").change(function(){$(this.form).submit()}),map_search_people.change(function(){search_people()})});var markers={};image="/assets/male.png",image_selected="/assets/male-2.png",window.initVolunteersMap=async function(){await google.maps.importLibrary("marker");var e=new google.maps.Map(document.getElementById("volunteers_map"),{zoom:4,center:{lat:39.7634295,lng:-96.3845439},mapId:"DEMO_MAP_ID"}),t=$(".volunteers_infos").data("addresses"),n=$(".volunteers_infos").data("trips");new google.maps.Geocoder;markers=setVolunteersMarkers(e,t),n.length>0&&addTrips(e,n)},$(document).on("turbo:load",function(){$(".suggested_volunteers_row").click(function(){handlerTableClick($(this),markers[$(this).data("user-id")])})});

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.