1(()=>{function b(r){for(var e=1;e<arguments.length;e++){var a=arguments[e];for(var n in a)n!=="__proto__"&&(r[n]=a[n])}return r}var W={read:function(r){return r[0]==='"'&&(r=r.slice(1,-1)),r.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(r){return encodeURIComponent(r).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function y(r,e){function a(t,o,i){if(!(typeof document>"u")){i=b({},e,i),typeof i.expires=="number"&&(i.expires=new Date(Date.now()+i.expires*864e5)),i.expires&&(i.expires=i.expires.toUTCString()),t=encodeURIComponent(t).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var s="";for(var l in i)i[l]&&(s+="; "+l,i[l]!==!0&&(s+="="+i[l].split(";")[0]));return document.cookie=t+"="+r.write(o,t)+s}}function n(t){if(!(typeof document>"u"||arguments.length&&!t)){for(var o=document.cookie?document.cookie.split("; "):[],i={},s=0;s<o.length;s++){var l=o[s].split("="),c=l.slice(1).join("=");try{var d=decodeURIComponent(l[0]);if(d in i||(i[d]=r.read(c,d)),t===d)break}catch{}}return t?i[t]:i}}return Object.create({set:a,get:n,remove:function(t,o){a(t,"",b({},o,{expires:-1}))},withAttributes:function(t){return y(this.converter,b({},this.attributes,t))},withConverter:function(t){return y(b({},this.converter,t),this.attributes)}},{attributes:{value:Object.freeze(e)},converter:{value:Object.freeze(r)}})}var u=y(W,{path:"/"});function x(r,e){for(var a=0;a<e.length;a++){var n=e[a];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(r,n.key,n)}}function p(r){return(function(e){if(Array.isArray(e))return w(e)})(r)||(function(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)})(r)||(function(e,a){if(e){if(typeof e=="string")return w(e,a);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return w(e,a)}})(r)||(function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 2In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function w(r,e){(e==null||e>r.length)&&(e=r.length);for(var a=0,n=new Array(e);a<e;a++)n[a]=r[a];return n}var O,k,g,M,F,U=(O=["a[href]","area[href]",'input:not([disabled]):not([type="hidden"]):not([aria-hidden])',"select:not([disabled]):not([aria-hidden])","textarea:not([disabled]):not([aria-hidden])","button:not([disabled]):not([aria-hidden])","iframe","object","embed","[contenteditable]",'[tabindex]:not([tabindex^="-"])'],k=(function(){function r(t){var o=t.targetModal,i=t.triggers,s=i===void 0?[]:i,l=t.onShow,c=l===void 0?function(){}:l,d=t.onClose,h=d===void 0?function(){}:d,f=t.openTrigger,m=f===void 0?"data-micromodal-trigger":f,v=t.closeTrigger,P=v===void 0?"data-micromodal-close":v,I=t.openClass,R=I===void 0?"is-open":I,C=t.disableScroll,N=C!==void 0&&C,T=t.disableFocus,H=T!==void 0&&T,S=t.awaitCloseAnimation,j=S!==void 0&&S,L=t.awaitOpenAnimation,B=L!==void 0&&L,D=t.debugMode,V=D!==void 0&&D;(function(q,$){if(!(q instanceof $))throw new TypeError("Cannot call a class as a function")})(this,r),this.modal=document.getElementById(o),this.config={debugMode:V,disableScroll:N,openTrigger:m,closeTrigger:P,openClass:R,onShow:c,onClose:h,awaitCloseAnimation:j,awaitOpenAnimation:B,disableFocus:H},s.length>0&&this.registerTriggers.apply(this,p(s)),this.onClick=this.onClick.bind(this),this.onKeydown=this.onKeydown.bind(this)}var e,a,n;return e=r,(a=[{key:"registerTriggers",value:function(){for(var t=this,o=arguments.length,i=new Array(o),s=0;s<o;s++)i[s]=arguments[s];i.filter(Boolean).forEach((function(l){l.addEventListener("click",(function(c){return t.showModal(c)}))}))}},{key:"showModal",value:function(){var t=this,o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;if(this.activeElement=document.activeElement,this.modal.setAttribute("aria-hidden","false"),this.modal.classList.add(this.config.openClass),this.scrollBehaviour("disable"),this.addEventListeners(),this.config.awaitOpenAnimation){var i=function s(){t.modal.removeEventListener("animationend",s,!1),t.setFocusToFirstNode()};this.modal.addEventListener("animationend",i,!1)}else this.setFocusToFirstNode();this.config.onShow(this.modal,this.activeElement,o)}},{key:"closeModal",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,o=this.modal;if(this.modal.setAttribute("aria-hidden","true"),this.removeEventListeners(),this.scrollBehaviour("enable"),this.activeElement&&this.activeElement.focus&&this.activeElement.focus(),this.config.onClose(this.modal,this.activeElement,t),this.config.awaitCloseAnimation){var i=this.config.openClass;this.modal.addEventListener("animationend",(function s(){o.classList.remove(i),o.removeEventListener("animationend",s,!1)}),!1)}else o.classList.remove(this.config.openClass)}},{key:"closeModalById",value:function(t){this.modal=document.getElementById(t),this.modal&&this.closeModal()}},{key:"scrollBehaviour",value:function(t){if(this.config.disableScroll){var o=document.querySelector("body");switch(t){case"enable":Object.assign(o.style,{overflow:""});break;case"disable":Object.assign(o.style,{overflow:"hidden"})}}}},{key:"addEventListeners",value:function(){this.modal.addEventListener("touchstart",this.onClick),this.modal.addEventListener("click",this.onClick),document.addEventListener("keydown",this.onKeydown)}},{key:"removeEventListeners",value:function(){this.modal.removeEventListener("touchstart",this.onClick),this.modal.removeEventListener("click",this.onClick),document.removeEventListener("keydown",this.onKeydown)}},{key:"onClick",value:function(t){(t.target.hasAttribute(this.config.closeTrigger)||t.target.parentNode.hasAttribute(this.config.closeTrigger))&&(t.preventDefault(),t.stopPropagation(),this.closeModal(t))}},{key:"onKeydown",value:function(t){t.keyCode===27&&this.closeModal(t),t.keyCode===9&&this.retainFocus(t)}},{key:"getFocusableNodes",value:function(){var t=this.modal.querySelectorAll(O);return Array.apply(void 0,p(t))}},{key:"setFocusToFirstNode",value:function(){var t=this;if(!this.config.disableFocus){var o=this.getFocusableNodes();if(o.length!==0){var i=o.filter((function(s){return!s.hasAttribute(t.config.closeTrigger)}));i.length>0&&i[0].focus(),i.length===0&&o[0].focus()}}}},{key:"retainFocus",value:function(t){var o=this.getFocusableNodes();if(o.length!==0)if(o=o.filter((function(s){return s.offsetParent!==null})),this.modal.contains(document.activeElement)){var i=o.indexOf(document.activeElement);t.shiftKey&&i===0&&(o[o.length-1].focus(),t.preventDefault()),!t.shiftKey&&o.length>0&&i===o.length-1&&(o[0].focus(),t.preventDefault())}else o[0].focus()}}])&&x(e.prototype,a),n&&x(e,n),r})(),g=null,M=function(r){if(!document.getElementById(r))return console.warn("MicroModal: \u2757Seems like you have missed %c'".concat(r,"'"),"background-color: #f8f9fa;color: #50596c;font-weight: bold;","ID somewhere in your code. Refer example below to resolve it."),console.warn("%cExample:","background-color: #f8f9fa;color: #50596c;font-weight: bold;",'<div class="modal" id="'.concat(r,'"></div>')),!1},F=function(r,e){if((function(n){n.length<=0&&(console.warn("MicroModal: \u2757Please specify at least one %c'micromodal-trigger'","background-color: #f8f9fa;color: #50596c;font-weight: bold;","data attribute."),console.warn("%cExample:","background-color: #f8f9fa;color: #50596c;font-weight: bold;",'<a href="#" data-micromodal-trigger="my-modal"></a>'))})(r),!e)return!0;for(var a in e)M(a);return!0},{init:function(r){var e=Object.assign({},{openTrigger:"data-micromodal-trigger"},r),a=p(document.querySelectorAll("[".concat(e.openTrigger,"]"))),n=(function(i,s){var l=[];
2return i.forEach((function(c){var d=c.attributes[s].value;l[d]===void 0&&(l[d]=[]),l[d].push(c)})),l})(a,e.openTrigger);if(e.debugMode!==!0||F(a,n)!==!1)for(var t in n){var o=n[t];e.targetModal=t,e.triggers=p(o),g=new k(e)}},show:function(r,e){var a=e||{};a.targetModal=r,a.debugMode===!0&&M(r)===!1||(g&&g.removeEventListeners(),(g=new k(a)).showModal())},close:function(r){r?g.closeModalById(r):g.closeModal()}});typeof window<"u"&&(window.MicroModal=U);var E=U;var{registerModule:_}=window,A=class r{constructor(e){this.element=e,this.initialize(),this.modalIsReady=!0,this.dispatchModalReady()}dispatchModalReady(){document.dispatchEvent(new CustomEvent("everlaw-modal-ready",{detail:{modal:this}}))}bindUI(){this.ui={},this.ui.$modal=this.element.querySelector(".modal")}isModalOpen(){return this.ui.$modal.classList.contains(this.openClassName)}setUrlHashVisible(e){return e?history.replaceState(null,"",this.modalIdWithLeadingHash):history.replaceState(null,"",location.pathname+location.search)}showModal(){"mountedModules"in window&&Array.isArray(window.mountedModules)&&window.mountedModules.forEach(e=>{e instanceof r&&e!==this&&e.microModalTargetId!==this.microModalTargetId&&e.closeModal()}),!(this.gateModal&&u.get("gatec-"+this.modalId)==="off")&&!this.isModalOpen()&&!this.modalHasExistingCookie()&&E.show(this.microModalTargetId,{awaitCloseAnimation:!0,disableScroll:!0,disableFocus:!0,openClass:this.openClassName,onShow:e=>{this.enableUrlTrigger&&this.setUrlHashVisible(!0),this.areCookiesEnabled()&&this.setModalCookieIfUnset(),this.onModalOpen&&this.onModalOpen(e)},onClose:e=>{this.enableUrlTrigger&&this.setUrlHashVisible(!1),this.onModalClose&&this.onModalClose(e);let a=e.querySelector(".lite-video--vimeo iframe"),n={method:"pause",value:"true"};a&&a.contentWindow.postMessage(JSON.stringify(n),"*")}})}closeModal(){this.isModalOpen()&&E.close(this.microModalTargetId)}hasModalUrlHash(){return window.location.hash===this.modalIdWithLeadingHash}modalHasExistingCookie(){return this.areCookiesEnabled()&&u.get(this.modalId)==="disabled"}setModalCookieIfUnset(){let e=u.get(this.modalId),a={path:""};this.cookieDelayDays&&(a.expires=this.cookieDelayDays),e!=="disabled"&&u.set(this.modalId,"disabled",a)}enableGate(e){let a=e.replace("#","");if(document.querySelector(`[data-modal-id="${a}"]`)&&"mountedModules"in window&&Array.isArray(window.mountedModules)){let t=window.mountedModules.find(o=>o instanceof r&&o.modalId===a);t&&t.modalIsReady&&(t.showModal(),t.onModalFormSubmit(()=>{this.element.hasAttribute("data-gated-by")&&(t.closeModal(),this.updateMarketo(this.element.getAttribute("data-marketo-identifier")),this.showModal())}))}}hijackLinksToShowModal(){if(this.modalIdWithLeadingHash.length<=1)return;let e=i=>typeof CSS<"u"&&typeof CSS.escape=="function"?CSS.escape(i):i.replace(/\\/g,"\\\\").replace(/"/g,'\\"'),a=this.modalIdWithLeadingHash,n=a,t=new Set,o=i=>{t.has(i)||i.closest(".searchModal")||(t.add(i),i.addEventListener("click",s=>{let l=this.element.getAttribute("data-gated-by");l?(s.preventDefault(),this.enableGate(l)):(this.showModal(),s.preventDefault())}))};document.querySelectorAll(`a[href="${e(a)}"]`).forEach(o),document.querySelectorAll(`a[href$="${e(n)}"]`).forEach(o)}listenForExitIntent(){this.modalHasExistingCookie()||document.addEventListener("mouseout",e=>{!e.relatedTarget&&!this.exitIntentTriggerFired&&(this.showModal(),this.exitIntentTriggerFired=!0,this.setModalCookieIfUnset())})}listenForPercentOfPageViewedTrigger(){document.addEventListener("scroll",()=>{(document.documentElement.scrollTop||document.body.scrollTop)/((document.documentElement.scrollHeight||document.body.scrollHeight)-document.documentElement.clientHeight)*100>=this.triggerAfterPercentOfPageViewed&&!this.percentOfPageViewTriggerHasFired&&(this.showModal(),this.percentOfPageViewTriggerHasFired=!0,this.setModalCookieIfUnset())})}disableGating(){this.trackUngatedLinks(),document.querySelectorAll("[data-gated-by]").forEach(e=>{e.removeAttribute("data-gated-by")})}initialize(){if(this.bindUI(),this.setVars(),"evModalsRegistered"in window||(window.evModalsRegistered={}),window.evModalsRegistered)if(this.microModalTargetId in window.evModalsRegistered){let t=this;window.addEventListener("load",function(){console.error(`Duplicate Modal Error: Modal with ID ${t.microModalTargetId} is already registered. Please ensure that each modal has a unique ID.`)})}else window.evModalsRegistered[this.microModalTargetId]=!0;let e=this.hasModalUrlHash.bind(this),a=this.showModal.bind(this);if(this.hijackLinksToShowModal.bind(this)(),this.triggerOnExitIntent&&setTimeout(()=>
2this.listenForExitIntent(),this.exitIntentActivationDelay),this.triggerAfterPercentOfPageViewed&&this.listenForPercentOfPageViewedTrigger(),this.enableUrlTrigger&&(window.addEventListener("load",()=>{if(e()){let t=this.element.getAttribute("data-gated-by");t?this.enableGate(t):(this.updateMarketo(this.mktoIdentifier),a())}}),window.addEventListener("hashchange",()=>{if(e()){let t=this.element.getAttribute("data-gated-by");t?this.enableGate(t):(this.updateMarketo(this.mktoIdentifier),a())}})),this.gateModal){this.callbackQueue=[],u.get("gatec-"+this.modalId)==="off"&&this.disableGating(),this.gateLinks();let t=document.querySelectorAll(".searchModal__results-list");if(t[0]){let o={childList:!0},i=this,s=function(c){for(let d of c)d.type==="childList"&&d.addedNodes.length>0&&(u.get("gatec-"+i.modalId)==="off"?d.addedNodes.forEach(h=>{h.nodeType===Node.ELEMENT_NODE&&i.trackUngatedLinks(h)}):(d.addedNodes.forEach(h=>{if(h.nodeType!==Node.ELEMENT_NODE)return;let f=h.matches("a")?h:h.querySelector("a"),m=f?.getAttribute("href"),v=f?.getAttribute("data-search-hit-type");f&&m&&!m.startsWith("#")&&v!=="trainingWorkflow"&&f.setAttribute("data-gated-by",i.modalIdWithLeadingHash)}),i.gateLinks(d.target)))};new MutationObserver(s).observe(t[0],o)}document.addEventListener("marketoFormSubmitEvent",o=>{if(o.detail.formInstance.formId===this.element.querySelector("[data-form-id]").getAttribute("data-form-id")){let i=this.callbackQueue.length===0;for(let s=this.callbackQueue.length-1;s>=0;s--)typeof this.callbackQueue[s]=="function"&&this.callbackQueue[s](),s===this.callbackQueue.length-1&&this.disableGating();this.callbackQueue=[],u.set("gatec-"+this.modalId,"off",{expires:180}),i&&(this.disableGating(),this.closeModal())}},{once:!0}),this.onModalFormSubmit=o=>{this.callbackQueue.push(o)}}}areCookiesEnabled(){return this.enableCookieSessionMode||this.enableCookieDelayRetriggerMode}getCookieDelayDays(){let e=parseInt(this.element.dataset.enableCookieDelayRetriggerDays);if(!isNaN(e)&&e>0)return e}getExitIntentActivationDelay(){let e=parseFloat(this.element.dataset.exitIntentActivationDelay);return isNaN(e)?this.defaultExitIntentActivationDelay:e*1e3}getTriggerAfterPercentOfPageViewed(){let e=parseInt(this.element.dataset.triggerAfterPercentOfPageViewed);if(!isNaN(e))return e}updateMarketo(e){if(e)if(window.Munchkin){let a=location.protocol+"//"+location.host,n={url:`${location.href.substring(a.length)}`,params:`training-resource-event-track=${encodeURIComponent(e)}&url=${encodeURIComponent(location.href)}`};window.Munchkin.munchkinFunction("visitWebPage",n),window.DD_LOGS&&window.DD_LOGS.onReady(()=>window.DD_LOGS.logger.info("marketo.visitWebPage",n))}else this.waitForMunchkin({interval:100,maxTries:50},()=>{this.updateMarketo(e)},()=>{console.error("Munchkin not available.")})}waitForMunchkin(e,a,n){window.Munchkin?a():e.maxTries-1<=0?n():setTimeout(()=>{this.waitForMunchkin({interval:e.interval,maxTries:e.maxTries-1},a,n)},e.interval)}setVars(){this.modalId=this.element.dataset.modalId,this.enableUrlTrigger=this.element.hasAttribute("data-enable-url-trigger"),this.enableCookieSessionMode=this.element.hasAttribute("data-enable-cookie-session"),this.enableCookieDelayRetriggerMode=this.element.hasAttribute("data-enable-cookie-delay-retrigger-days"),this.onModalOpen=null,this.onModalClose=null,this.microModalTargetId=`${this.modalId}-id`,this.cookieDelayDays=this.getCookieDelayDays(),this.modalIdWithLeadingHash=`#${this.modalId}`,this.openClassName="is-open",this.triggerOnExitIntent=this.element.hasAttribute("data-trigger-on-exit-intent"),this.triggerAfterPercentOfPageViewed=this.getTriggerAfterPercentOfPageViewed(),this.defaultExitIntentActivationDelay=3e3,this.exitIntentActivationDelay=this.getExitIntentActivationDelay(),this.gateModal=this.element.hasAttribute("data-gate-modal"),this.mktoIdentifier=this.element.dataset.marketoIdentifier||null}gateLinks(e=document){e.querySelectorAll("a[data-gated-by]").forEach(n=>{let t=o=>{let i=o.target.closest("a");i.getAttribute("data-gated-by")&&(o.preventDefault(),this.showModal(),this.onModalFormSubmit(()=>{if(i.getAttribute("data-gated-by")){this.closeModal();let s=i.getAttribute("href"),l=i.getAttribute("target");this.updateMarketo(i.getAttribute("data-marketo-identifier")),l==="_blank"?window.open(s,"_blank"):window.location.href=s}n.removeEventListener("click",t)}))};n.addEventListener("click",t)})}trackUngatedLinks(e=document){e.querySelectorAll("a[data-marketo-identifier]").forEach(n=>
2{n.classList.contains("searchResult")&&n.getAttribute("href")&&n.getAttribute("href").startsWith("#")||n.addEventListener("click",t=>{let o=t.target.closest("a");if(o.getAttribute("data-marketo-identifier")){let i=o.getAttribute("data-marketo-identifier");this.updateMarketo(i)}o||t.target.querySelectorAll("a").forEach(s=>{if(s.getAttribute("data-marketo-identifier")){let l=s.getAttribute("data-marketo-identifier");this.updateMarketo(l)}})})})}};_("Modal",A);})(); 3/*! Bundled license information: 4 5js-cookie/dist/js.cookie.mjs: 6 (*! js-cookie v3.0.8 | MIT *) 7*/ 8//# sourceMappingURL=modal.js.map
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.