<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta property="og:image" prefix="og: http://ogp.me/ns#" id="meta-og-image" content="" />
<title>Obituaries</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Great+Vibes&family=Roboto:wght@100;300;400;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Great+Vibes&display=swap">
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
  <style>
    /** Color Palette **/
    :root {
      --gray-color: #bdbdbd;
      --primary-color: var(--gray-color);
      --primary-color-opacity: #bdbdbd00;
      --secondary-color: #FFFFFF;
      --background-color: #FFFFFF;
    }

    /** flex css **/
  .fflex{display: flex;}
  .fflex-just-center{justify-content: center;}
  .fflex-just-bet{justify-content: space-between;}
  .fflex-align-center{align-items: center;}

  /** Random Css **/
  .m-0{margin: 0;}
  a{text-decoration: none}
  html, body {margin:0; padding:0; height:100%;}
  #body-wraper{ min-height:100%; position:relative;}
  body{font-family: 'Roboto', sans-serif;}
  h1, h2, h3, h4, h5, h6, p, a, span, div {-webkit-font-smoothing: antialiased; }
  .full-width{width: 100%}
  .text-center{text-align: center;}
  .text-white{color: #ffffff;}
  .mr-auto{margin: 0 auto}
  .mtb-10{margin: 10px 0}
  .border-btn{
    color: var(--primary-color, --gray-color);
    border: 1px solid var(--primary-color, --gray-color);
    border-radius: 5px;
    padding: 12px 10px;
    font-size: 16px;
    font-weight: bold;
    display: block;
    text-align: center;
    max-width: 200px;
    margin: 20px auto 0;
 }
  .border-btn:hover{background-color: var(--primary-color, --gray-color);
    color: #ffffff;
 }

  /** Typography **/
  h1, h2, h3, h4, h5, h6{
    margin: 0;
    padding: 0;
  }

  /** Top Header Link **/
  .top-header{
    position: fixed;
    width: 100%;
    top: 0;
    background: #fff;
    z-index: 99;
  }
  .top-header.fixed{
    box-shadow:
      rgba(0, 0, 0, 0.2) 0px 2px 4px -1px,
      rgba(0, 0, 0, 0.14) 0px 4px 5px 0px,
      rgba(0, 0, 0, 0.12) 0px 1px 10px 0px;
    }

  .top-left-link {
    min-height:64px;
  }
  .top-left-link a, .top-right-link a{
    font-size: 18px;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    outline: 0;
  }
  .top-left-link img {
    margin-left: 8px;
  }

  .top-right-link a>span{
    width: 48px;
    height: 48px;
    line-height: 48px;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    font-size:32px;
    line-height: 1;
  }
  .top-right-link a>span:hover{
    background: rgba(0, 0, 0, 0.08);
  }
  .top-left-link img {
    max-width: 140px;
    max-height: 40px;
  }
  .top-left-link .logo-container {
    min-height:64px;
    display:flex;
    align-items:center;
    justify-content:center;
  }

  /** schdule btn **/
  .appoint-section{
    margin: 12px auto 0;
    width:100%;
    text-align:center;
    display: inline-block;
    padding: 15px 12px;
    box-sizing: border-box;
    min-width: 200px;
    flex-wrap: nowrap;
    /* min-height: 90px; */
    overflow-y: visible;
    overflow-x:auto;
    list-style: none;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
  }
  .appoint-section li{
    margin: 0 13px;
    height:100%;
    display:inline-block;
  }
  .appoint-section-inside{
    width: auto;
    margin: 0 auto;
    display: inline-flex;
  }
  button.sch-btn {
    color: var(--primary-color, --gray-color);
    border: 1px solid;
    padding: 0;
    position: relative;
    min-width: 350px;
    background: var(--background-color, #fff);
    box-shadow: none;
    border-color: var(--primary-color, --gray-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    cursor: pointer;
    box-shadow:
      0px 3px 5px -1px rgb(0 0 0 / 20%),
      0px 5px 8px 0px rgb(0 0 0 / 14%),
      0px 1px 14px 0px rgb(0 0 0 / 12%) !important;
    border-radius: 8px;
    overflow: hidden ;
  }
  button.sch-btn:hover{
    opacity: 0.8;
  }
  .sch-btn-left{
    background: var(--primary-color, --gray-color);
    color: #fff;
    margin: 0;
    font-size: 14px;
    font-weight: 300;
    font-family: 'Roboto', sans-serif;
    line-height: 1;
    min-height: 76px;
    min-width: 84px;
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
  .sch-btn-left span{color: #fff;
     display: block;
     font-size: 40px;
     margin-top: 2px;
     line-height: 40px;
    }
  .sch-btn-right{width: 100%;
     padding:0 10px}
  .vid-icon{border-left: 1px solid rgba(117, 117, 117, 0.4);
     padding: 0 10px;
     margin-left: 10px;
    }
  .vid-icon img{display: block;
     width: 24px;
     margin: 0 auto;
    }
  .vid-icon span{font-size: 12px;
     white-space: nowrap;
    }
  .evnt-time{font-size: 36px;
     line-height: 1;
     font-weight: 300;
     font-family: 'Roboto', sans-serif;
    }
  .evnt-time >span{font-size: 14px}
  .evnt-det {padding: 8px 2px 0;
    }
  .ev-title{font-size: 18px;
     line-height: 1.2;
     white-space: nowrap;
    }
  .f24{font-size: 20px!important;
    }


  /** info block **/
  .info-block{position: relative;
     background: var(--primary-color);
     max-width: 730px;
     margin: 80px auto 80px;
     border-radius: 50px;
     position: relative;
    box-shadow: -20px 20px 118px rgb(0 0 0 / 35%);
    }
  .fade-shadow{display:none;
     height: 135px;
     margin-top: -135px;
     position: relative;
     background: -webkit-linear-gradient(90deg, var(--theme-color) 0%, var(--theme-color)00 100%);
     background-image:
      linear-gradient(
        0deg,
        var(--primary-color, --gray-color),
        var(--primary-color-opacity)
      )
  }
  .center-content{position: relative;
     margin-top:135px;
    }
  .content-bio{padding: 0 50px;
     color: #fff;
    min-height:540px;
    }
  .content-bio h1{font-family: 'Great Vibes', cursive;
     font-size: 80px;
     text-transform: capitalize;
     line-height: 1;
     font-weight: 400;
     text-shadow: 0px 2px 4px rgb(0 0 0 / 15%);
    }
  .content-bio .content-des{font-size: 18px;
     margin-top: 10px;
     line-height: 1.5;
     text-align: justify;
     font-weight: 300;
    }
  .content-bio .link-more-bio{font-size: 18px;
     margin-top: 10px;
     margin-bottom: 10px;
     line-height: 1.5;
     text-align: center;
     font-weight: 300;
    }
  .content-des:first-letter{ font-size: 36px;
     line-height: 0.8;
     font-family: 'Great Vibes', cursive !important;
    }
  .ga-avtar{position: relative;
     top: -70px;
     border-radius: 50%;
     border-radius: 50%;
     -moz-border-radius: 50%;
     -webkit-border-radius: 50%;
     pointer-events: auto;
     transform: translateY(0px);
     margin: 0;
     filter: drop-shadow(0px 4px 4px rgba(0, 0, 0, 0.15));
     z-index: 1;
     background: var(--background-color, #fff);
     transition: inherit;
     color: inherit;
     border: 0;

    cursor: pointer;
     display: inline-flex;
     outline: none;
     padding: 0;
     align-items: center;
     user-select: none;
     vertical-align: middle;
     justify-content: center;
     -moz-appearance: none;
     text-decoration: none;
     -webkit-appearance: none;
     -webkit-tap-highlight-color: transparent;

    min-height: 152px;
     min-width: 152px;
    }
  .ga-avtar>span{font-family: 'Roboto', sans-serif;font-size:64px;
    font-weight:300;
    text-transform: uppercase;
     line-height: 1;
     color:#fff;
    }
  .ga-avtar img{border-radius: 50%;
     border-radius: 50%;
     -moz-border-radius: 50%;
     -webkit-border-radius: 50%;
     width: 100%;
     height: 100%;
     object-fit: cover;
     box-sizing: border-box;
     min-height: 152px;
     width:152px;
     height:152px;
     min-width: 152px;
    }
  .ga-avtar{border: 4px solid #fff;
    }
  .av-img{text-align: center;
    }
  .av-below{position: relative;
     top: -50px;
    }
  .link-more-bio{display:none;
     text-align: center!important;
    }
  .link-more-bio a{color: #fff;
     font-size: 16px;
     line-height: 1;
     display: flex;
     align-items: center;
     justify-content: center;
    }
  .theme-btn{background: var(--secondary-color, #fff);
     font-size: 24px;
     line-height: 1.1;
     color: var(--primary-color, --gray-color);
     width: 90%;
     filter: drop-shadow(0px 4px 4px rgba(0, 0, 0, 0.15));
     display: block;
     text-align: center;
     padding: 15px 20px;
     border: 2px solid var(--secondary-color, --gray-color);
     border-radius: 50px;
    }
  .theme-btn:hover{background-color: var(--primary-color, --gray-color);
     color: #ffffff;
     border: 2px solid var(--primary-color, --gray-color);
    }
  .theme-btn.mystyle{color:#fff}
  #birth-date{text-align:right}
  #birth-date span, #death-date span{display: block;
     font-size:20px;
     text-transform: uppercase;
     line-height: 1.1;
    }
  .make-btn-center{
    position: absolute;
     bottom:-16px;
     width: calc(100% - 100px);
     margin: 0 auto;
     justify-content: center;
    }
  .top-live {position: absolute;
     right: 20px;
     top: 12px;
    }

  /** tooltip  **/
  .obit-tooltip .material-icons{font-size: 40px;}
  .obit-tooltip {position: relative; display: inline-block;cursor: pointer;}
  .obit-tooltip a {color: inherit; pointer-events:none;}
  .obit-tooltip:hover a,
  .obit-tooltip:focus a{pointer-events: auto;}
  .obit-tooltip .tooltiptext {font-size: 13px;
     line-height: 1.4;
     visibility: hidden;
     width: 220px;
     background-color: var(--primary-color, --gray-color);
     color: #fff;
     text-align: center;
     border-radius: 6px;
     padding: 15px 7px;
     position: absolute;
     z-index: 99;
     bottom: 100%;
     left: 50%;
     margin-left: -148px;

  opacity: 0; transition: opacity 0.2s, background-color 0.2s;
     box-shadow: -1px 1px 6px rgb(0 0 0 / 22%);
     cursor: auto;
    }
  .obit-tooltip:hover .tooltiptext {visibility: visible; opacity: 1;}
  .arrow-btn { background: var(--website-theme-color, var(--website-theme-color-default, #757575)) !important;}
  .bet-date{padding:4px 4px 0; font-size:40px;}
  /*  Ripple */
  .ripple {width: 0; height: 0; border-radius: 50%;
     background: rgba(0, 0, 0, 0.4);
     transform: scale(0);
     position: absolute;
     opacity: 1;
    }
  .rippleEffect { animation: rippleDrop .6s linear;}
  @keyframes rippleDrop {
      100% { transform: scale(2); opacity: 0;}
  }

  /** flowers section **/
  .flowers{width: 100%; box-sizing: border-box; align-items: flex-end;}
  .flower-left img, .flower-right img{max-width: 450px; width: 100%; display: block;}
  .view-deatils{color:var(--primary-color, --gray-color);
     text-align: center;
     display: flex;
     justify-content: center;
     font-size: 18px;
     pointer-events: auto;
    }
  .view-deatils a{color:var(--primary-color, --gray-color);}
  .view-deatils a:hover{text-decoration: underline;}
  .sec-flower{text-align:center; margin-top:28px;
     flex-direction: column;
     display: flex;
     justify-content: flex-end;
     align-items: flex-end;
     min-height: 400px;
    }
  .pop-evnt-info{min-width: 310px;
    max-width: 310px;
    box-sizing: border-box;
    display: none;
    position: absolute;
    z-index:10;
    bottom:113px;
    border-radius: 4px;
    background: var(--background-color, #fff);
    margin:0;
    padding:20px 8px;
    box-shadow:
     0px 3px 5px -1px rgb(0 0 0 / 20%),
     0px 5px 8px 0px rgb(0 0 0 / 14%),
     0px 1px 14px 0px rgb(0 0 0 / 12%) !important
  }
  .jouney-date{display: flex; justify-content: center;}
  .theme-slogon-img{text-align:center}
  .theme-slogon-img img{width: auto; margin: 0 20px; max-width: 92px; max-height: 60px; width:100%;}
  .jouney-date p{font-size: 40px;
    text-shadow: 0px 2px 4px rgb(0 0 0 / 15%);
    font-weight: 300;
    margin: 0 0 20px 0;
    width:100%
  }
  .pop-top{text-align: center;
    border-bottom: 1px solid var(--primary-color, --gray-color);
  }
  .pop-top h3{
    font-size: 20px;
    line-height: 1.3;
    color: var(--primary-color, --gray-color);
    font-weight: 400 ;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .pop-top h3>span{margin-right: 10px; font-size: 24px;}
  .g-date{display: block; color: var(--primary-color, --gray-color);
    font-weight: 300;
    font-size: 16px;
    line-height: 18px;
  }
  .g-time{display: block;
    color: var(--primary-color, --gray-color);
    font-weight: 300;
    font-size: 16px;
    line-height: 18px;
  }
  .wstream a{display: flex;
    justify-content: center;
    align-items: center;
    color: var(--primary-color, --gray-color);
    font-size: 20px;
    line-height: 1.3;
    margin-top: 0;
  }
  .wstream .material-icons{font-size: 24px;
    margin-right: 10px;
    color: var(--primary-color, --gray-color);
  }
  .pop-middle{display: flex;
    justify-content: center;
    color: #757575;
    font-size: 16px;
    line-height: 18px;
    text-align: center;
    width: calc(100% - 8px);
    padding: 12px 4px 8px;
  }
  .pop-middle .material-icons{font-size: 60px;
    color: var(--primary-color, --gray-color);
    margin:0 5px;
  }
  .pop-middle p{margin: 0}
  .pop-midd-below a{color: var(--primary-color, --gray-color);
    border: 1px solid var(--primary-color, --gray-color);
    font-size: 12px;
    padding: 8px 10px;
    text-align: center;
    margin: 2px 3px;
    font-weight: bold;
    display: flex;
    align-items: center;
    border-radius: 5px;
  }
  .pop-midd-below a:hover{background-color: var(--primary-color, --gray-color);
    color: #ffffff;
  }
  .pop-midd-below a span{
    padding-left: 5px;
  }
  .pop-midd-below{ display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--primary-color, --gray-color);
    padding-bottom: 12px;
  }
  .pop-evnt-info::after {content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -20px;
    border-width: 20px;
    border-style: solid;
    border-color: #fff transparent transparent transparent;
  }
  .f-loactions{
    text-transform: uppercase;
    pointer-events: auto;
    border-bottom: 1px solid --gray-color;
    color:var(--primary-color, --gray-color);
    padding-bottom: 20px;
    margin-top: 10px;
  }
  .fimg{display: none;}
  /** footer **/
  .Remember-footer { width: 100%;
     box-sizing: border-box;
     display: flex;
     padding: 10px 16px;
     background: var(--primary-color, --gray-color);
     align-items: center;
     flex-direction: column;
     justify-content: space-between;
     pointer-events:auto;
    }
  .Remember-footer img {width: 160px; height: auto;}
  .Remember-footer p { color: #fff; font-size: 14px; line-height: 1; margin:0}
  .footer-center-logo{ min-width: 400px; margin:0 auto}
  #fh-logo{max-height: 88px; margin-top: 50px;}
  #fh-logo-url{pointer-events: auto;}
  /** Media Css **/
  @media (min-width: 720px) {
    .Remember-footer{padding: 10px 16px 8px; align-items: center; flex-direction: row;}
    .content-des:first-letter{font-size: 42px;}
  }

  @media (min-width: 960px) {
      .top-left-link img {max-width: 175px;max-height: 50px;}
  }

  @media (min-width: 1080px) {
  .center-content{padding-bottom:250px;}
  .sec-flower{position: absolute; bottom: 0; right: 0; left: 0;  pointer-events: none;}
  .flower-left, .flower-right{ bottom: 0; position: relative; z-index: -1;}
  .pop-evnt-info{bottom:360px}
 }

  @media (min-width: 1081px) {
    .mobile-flower{display: none;}
  }
  @media (max-width: 1080px) {
    .flower-left, .flower-right{ display: none;}
    .flowers{align-items: center; flex-direction: column;}
    .mobile-flower img{display: block; max-width: 320px; margin-top: 6px;}
    .appoint-section li{margin: 0 7px;}
  }
  @media (max-width: 820px) {
    #livestream-tooltip-text {left: -25px;}
  }
  @media (max-width: 767px) {
    .info-block{max-width: 95%;}
    .content-bio{padding:0 15px;}
    .content-bio h1{font-size: 44px;}
    .theme-btn{font-size:17px; width:85%}
    .pop-middle,.border-btn{font-size: 16px;}
    .top-left-link a{padding-right: 20px; text-align: left;}
    .top-right-link a{padding-left: 20px; text-align: right;}
    #birth-date span, #death-date span{font-size:14px;}
    .jouney-date p{font-size: 32px;}
    .bet-date { font-size:28px; }
    .pop-evnt-info::after{display: none;}
    .pop-evnt-info{position: unset; margin:20px auto 10px; padding:0 8px 20px}
    .pop-evnt-info::before {
      content: ""; position: relative;
      top: -39px;
      border-width: 20px;
      border-style: solid;
      border-color: transparent transparent #fff;
    }
    #fh-logo {
      margin-top: 20px;
    }
  }
  @media (max-width: 480px) {
   .footer-center-logo{min-width: 85%;
    }
   .link-more-bio a{font-size:14px; line-height: 1.2;}
   .livestream-icon .material-icons {font-size: 32px;}
  }
  @media (max-width: 420px) {
    .ga-avtar {min-height: 122px; min-width: 122px; }
    .ga-avtar img{min-height: 122px; width:122px; height:122px; min-width: 122px; }
    .ga-avtar>span{font-size: 56px;}
  }
  @media (max-width: 340px) {
    .pop-evnt-info{width:320px;}
  }

  .ld_icon {
    width: 150px;
    height: 150px;
  }

  .ld_text {
    margin-top: 30px;
  }

  .ld_text_container h2 {
    font-family: 'Roboto', sans-serif;
    font-style: normal;
    font-weight: 700;
    font-size: 40px;
    margin: 10px;
    margin-top: 80px;
  }

  .ld_text_container h4 {
    font-family: 'Roboto', sans-serif;
    font-style: normal;
    font-weight: 700;
    font-size: 24px;
    margin: 14px;
  }

  .ld_text_container p {
    font-family: 'Roboto', sans-serif;
    font-style: normal;
    font-weight: 700;
    font-size: 16px;
    margin: 14px;
  }

  .ld_text_container {
    width: 300px;
    margin-left: auto;
    margin-right: auto;
  }

  .ld_container {
    width: 100%;
  }

  @media (min-width: 960px) {
    .ld_icon {
      position: relative;
      top: 50px;
    }

    .ld_text {
      display: inline;
      height: 250px;
      line-height: 250px;
      margin-left: 50px;
    }

    .ld_text_container {
      width: 960px;
    }
  }
    </style>
</head>
<body>
<base href="https://my.gather.app/remember/" target="_self"/>

<div id="body-wraper"></div>

</body>

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.29.1/moment.min.js"
  integrity="sha512-qTXRIMyZIFb8iQcfjXWCO8+M5Tbc38Qi5WzdPOYZHIlZpzBHG3L3by84BBBOiRGiEb7KKtAOAs5qYdUiZiQNNQ=="
  crossorigin="anonymous"
  referrerpolicy="no-referrer">
</script>
<script>
    /*! JsRender v1.0.11: http://jsviews.com/#jsrender */
/*! **VERSION FOR WEB** (For NODE.JS see http://jsviews.com/download/jsrender-node.js) */
!function(t,e){var n=e.jQuery;"object"==typeof exports?module.exports=n?t(e,n):function(n){if(n&&!n.fn)throw"Provide jQuery or null";return t(e,n)}:"function"==typeof define&&define.amd?define(function(){return t(e)}):t(e,!1)}(function(t,e){"use strict";function n(t,e){return function(){var n,r=this,i=r.base;return r.base=t,n=e.apply(r,arguments),r.base=i,n}}function r(t,e){return st(e)&&(e=n(t?t._d?t:n(a,t):a,e),e._d=(t&&t._d||0)+1),e}function i(t,e){var n,i=e.props;for(n in i)!Vt.test(n)||t[n]&&t[n].fix||(t[n]="convert"!==n?r(t.constructor.prototype[n],i[n]):i[n])}function o(t){return t}function a(){return""}function s(t){try{throw console.log("JsRender dbg breakpoint: "+t),"dbg breakpoint"}catch(e){}return this.base?this.baseApply(arguments):t}function l(t){this.name=(e.link?"JsViews":"JsRender")+" Error",this.message=t||this.name}function d(t,e){if(t){for(var n in e)t[n]=e[n];return t}}function c(t,e,n){return t?lt(t)?c.apply(ot,t):(wt=n?n[0]:wt,/^(\W|_){5}$/.test(t+e+wt)||S("Invalid delimiters"),mt=t[0],_t=t[1],xt=e[0],bt=e[1],gt.delimiters=[mt+_t,xt+bt,wt],t="\\"+mt+"(\\"+wt+")?\\"+_t,e="\\"+xt+"\\"+bt,rt="(?:(\\w+(?=[\\/\\s\\"+xt+"]))|(\\w+)?(:)|(>)|(\\*))\\s*((?:[^\\"+xt+"]|\\"+xt+"(?!\\"+bt+"))*?)",ft.rTag="(?:"+rt+")",rt=new RegExp("(?:"+t+rt+"(\\/)?|\\"+mt+"(\\"+wt+")?\\"+_t+"(?:(?:\\/(\\w+))\\s*|!--[\\s\\S]*?--))"+e,"g"),ft.rTmpl=new RegExp("^\\s|\\s$|<.*>|([^\\\\]|^)[{}]|"+t+".*"+e),ht):gt.delimiters}function p(t,e){e||t===!0||(e=t,t=void 0);var n,r,i,o,a=this,s="root"===e;if(t){if(o=e&&a.type===e&&a,!o)if(n=a.views,a._.useKey){for(r in n)if(o=e?n[r].get(t,e):n[r])break}else for(r=0,i=n.length;!o&&r<i;r++)o=e?n[r].get(t,e):n[r]}else if(s)o=a.root;else if(e)for(;a&&!o;)o=a.type===e?a:void 0,a=a.parent;else o=a.parent;return o||void 0}function u(){var t=this.get("item");return t?t.index:void 0}function f(){return this.index}function g(t,e,n,r){var i,o,s,l=0;if(1===n&&(r=1,n=void 0),e)for(o=e.split("."),s=o.length;t&&l<s;l++)i=t,t=o[l]?t[o[l]]:t;return n&&(n.lt=n.lt||l<s),void 0===t?r?a:"":r?function(){return t.apply(i,arguments)}:t}function v(n,r,i){var o,a,s,l,c,p,u,f=this,g=!Ct&&arguments.length>1,v=f.ctx;if(n){if(f._||(c=f.index,f=f.tag),p=f,v&&v.hasOwnProperty(n)||(v=pt).hasOwnProperty(n)){if(s=v[n],"tag"===n||"tagCtx"===n||"root"===n||"parentTags"===n)return s}else v=void 0;if((!Ct&&f.tagCtx||f.linked)&&(s&&s._cxp||(f=f.tagCtx||st(s)?f:(f=f.scope||f,!f.isTop&&f.ctx.tag||f),void 0!==s&&f.tagCtx&&(f=f.tagCtx.view.scope),v=f._ocps,s=v&&v.hasOwnProperty(n)&&v[n]||s,s&&s._cxp||!i&&!g||((v||(f._ocps=f._ocps||{}))[n]=s=[{_ocp:s,_vw:p,_key:n}],s._cxp={path:jt,ind:0,updateValue:function(t,n){return e.observable(s[0]).setProperty(jt,t),this}})),l=s&&s._cxp)){if(arguments.length>2)return a=s[1]?ft._ceo(s[1].deps):[jt],a.unshift(s[0]),a._cxp=l,a;if(c=l.tagElse,u=s[1]?l.tag&&l.tag.cvtArgs?l.tag.cvtArgs(c,1)[l.ind]:s[1](s[0].data,s[0],ft):s[0]._ocp,g)return ft._ucp(n,r,f,l),f;s=u}return s&&st(s)&&(o=function(){return s.apply(this&&this!==t?this:p,arguments)},d(o,s)),o||s}}function h(t){return t&&(t.fn?t:this.getRsc("templates",t)||dt(t))}function m(t,e,n,r){var o,a,s,l,c,p="number"==typeof n&&e.tmpl.bnds[n-1];if(void 0===r&&p&&p._lr&&(r=""),void 0!==r?n=r={props:{},args:[r]}:p&&(n=p(e.data,e,ft)),p=p._bd&&p,t||p){if(a=e._lc,o=a&&a.tag,n.view=e,!o){if(o=d(new ft._tg,{_:{bnd:p,unlinked:!0,lt:n.lt},inline:!a,tagName:":",convert:t,onArrayChange:!0,flow:!0,tagCtx:n,tagCtxs:[n],_is:"tag"}),l=n.args.length,l>1)for(c=o.bindTo=[];l--;)c.unshift(l);a&&(a.tag=o,o.linkCtx=a),n.ctx=Q(n.ctx,(a?a.view:e).ctx),i(o,n)}o._er=r&&s,o.ctx=n.ctx||o.ctx||{},n.ctx=void 0,s=o.cvtArgs()[0],o._er=r&&s}else s=n.args[0];return s=p&&e._.onRender?e._.onRender(s,e,o):s,void 0!=s?s:""}function _(t,e){var n,r,i,o,a,s,l,d=this;if(d.tagName){if(s=d,d=(s.tagCtxs||[d])[t||0],!d)return}else s=d.tag;if(a=s.bindFrom,o=d.args,(l=s.convert)&&""+l===l&&(l="true"===l?void 0:d.view.getRsc("converters",l)||S("Unknown converter: '"+l+"'")),l&&!e&&(o=o.slice()),a){for(i=[],n=a.length;n--;)r=a[n],i.unshift(x(d,r));e&&(o=i)}if(l){if(l=l.apply(s,i||o),void 0===l)return o;if(a=a||[0],n=a.length,lt(l)&&(l.arg0===!1||1!==n&&l.length===n&&!l.arg0)||(l=[l],a=[0],n=1),e)o=l;else for(;n--;)r=a[n],+r===r&&(o[r]=l[n])}return o}function x(t,e){return t=t[+e===e?"args":"props"],t&&t[e]}function b(t){return this.cvtArgs(t,1)}function w(t,e){var n,r,i=this;if(""+e===e){for(;void 0===n&&i;)r=i.tmpl&&i.tmpl[t],n=r&&r[e],i=i.parent;return n||ot[t][e]}}function y(t,e,n,r,o,a){function s(t){var e=l[t];if(void 0!==e)for(e=lt(e)?e:[e],h=e.length;h--;)q=e[h],isNaN(parseInt(q))||(e[h]=parseInt(q));return e||[0]}e=e||it;var l,d,c,p,u,f,g,h,m,w,y,C,k,j,T,A,P,F,N,R,M,$,V,I,D,q,U,K,J,B,L=0,H="",W=e._lc||!1,Z=e.ctx,z=n||e.tmpl,G="number"==typeof r&&e.tmpl.bnds[r-1];for("tag"===t._is?(l=t,t=l.tagName,r=l.tagCtxs,c=l.template):(d=e.getRsc("tags",t)||S("Unknown tag: {{"+t+"}} "),c=d.template),void 0===a&&G&&(G._lr=d.lateRender&&G._lr!==!1||G._lr)&&(a=""),void 0!==a?(H+=a,r=a=[{props:{},args:[],params:{props:{}}}]):G&&(r=G(e.data,e,ft)),g=r.length;L<g;L++)y=r[L],P=y.tmpl,(!W||!W.tag||L&&!W.tag.inline||l._er||P&&+P===P)&&(P&&z.tmpls&&(y.tmpl=y.content=z.tmpls[P-1]),y.index=L,y.ctxPrm=v,y.render=E,y.cvtArgs=_,y.bndArgs=b,y.view=e,y.ctx=Q(Q(y.ctx,d&&d.ctx),Z)),(n=y.props.tmpl)&&(y.tmpl=e._getTmpl(n),y.content=y.content||y.tmpl),l?W&&W.fn._lr&&(F=!!l.init):(l=new d._ctr,F=!!l.init,l.parent=f=Z&&Z.tag,l.tagCtxs=r,W&&(l.inline=!1,W.tag=l),l.linkCtx=W,(l._.bnd=G||W.fn)?(l._.ths=y.params.props["this"],l._.lt=r.lt,l._.arrVws={}):l.dataBoundOnly&&S(t+" must be data-bound:\n{^{"+t+"}}")),I=l.dataMap,y.tag=l,I&&r&&(y.map=r[L].map),l.flow||(C=y.ctx=y.ctx||{},p=l.parents=C.parentTags=Z&&Q(C.parentTags,Z.parentTags)||{},f&&(p[f.tagName]=f),p[l.tagName]=C.tag=l,C.tagCtx=y);if(!(l._er=a)){for(i(l,r[0]),l.rendering={rndr:l.rendering},L=0;L<g;L++){if(y=l.tagCtx=r[L],V=y.props,l.ctx=y.ctx,!L){if(F&&(l.init(y,W,l.ctx),F=void 0),y.args.length||y.argDefault===!1||l.argDefault===!1||(y.args=M=[y.view.data],y.params.args=["#data"]),j=s("bindTo"),void 0!==l.bindTo&&(l.bindTo=j),void 0!==l.bindFrom?l.bindFrom=s("bindFrom"):l.bindTo&&(l.bindFrom=l.bindTo=j),T=l.bindFrom||j,K=j.length,U=T.length,l._.bnd&&(J=l.linkedElement)&&(l.linkedElement=J=lt(J)?J:[J],K!==J.length&&S("linkedElement not same length as bindTo")),(J=l.linkedCtxParam)&&(l.linkedCtxParam=J=lt(J)?J:[J],U!==J.length&&S("linkedCtxParam not same length as bindFrom/bindTo")),T)for(l._.fromIndex={},l._.toIndex={},m=U;m--;)for(q=T[m],h=K;h--;)q===j[h]&&(l._.fromIndex[h]=m,l._.toIndex[m]=h);W&&(W.attr=l.attr=W.attr||l.attr||W._dfAt),u=l.attr,l._.noVws=u&&u!==Jt}if(M=l.cvtArgs(L),l.linkedCtxParam)for($=l.cvtArgs(L,1),h=U,B=l.constructor.prototype.ctx;h--;)(k=l.linkedCtxParam[h])&&(q=T[h],A=$[h],y.ctx[k]=ft._cp(B&&void 0===A?B[k]:A,void 0!==A&&x(y.params,q),y.view,l._.bnd&&{tag:l,cvt:l.convert,ind:h,tagElse:L}));(N=V.dataMap||I)&&(M.length||V.dataMap)&&(R=y.map,R&&R.src===M[0]&&!o||(R&&R.src&&R.unmap(),N.map(M[0],y,R,!l._.bnd),R=y.map),M=[R.tgt]),w=void 0,l.render&&(w=l.render.apply(l,M),e.linked&&w&&!Et.test(w)&&(n={links:[]},n.render=n.fn=function(){return w},w=O(n,e.data,void 0,!0,e,void 0,void 0,l))),M.length||(M=[e]),void 0===w&&(D=M[0],l.contentCtx&&(D=l.contentCtx===!0?e:l.contentCtx(D)),w=y.render(D,!0)||(o?void 0:"")),H=H?H+(w||""):void 0!==w?""+w:void 0}l.rendering=l.rendering.rndr}return l.tagCtx=r[0],l.ctx=l.tagCtx.ctx,l._.noVws&&l.inline&&(H="text"===u?ct.html(H):""),G&&e._.onRender?e._.onRender(H,e,l):H}function C(t,e,n,r,i,o,a,s){var l,d,c,p=this,f="array"===e;p.content=s,p.views=f?[]:{},p.data=r,p.tmpl=i,c=p._={key:0,useKey:f?0:1,id:""+qt++,onRender:a,bnds:{}},p.linked=!!a,p.type=e||"top",e&&(p.cache={_ct:gt._cchCt}),n&&"top"!==n.type||((p.ctx=t||{}).root=p.data),(p.parent=n)?(p.root=n.root||p,l=n.views,d=n._,p.isTop=d.scp,p.scope=(!t.tag||t.tag===n.ctx.tag)&&!p.isTop&&n.scope||p,d.useKey?(l[c.key="_"+d.useKey++]=p,p.index=Ht,p.getIndex=u):l.length===(c.key=p.index=o)?l.push(p):l.splice(o,0,p),p.ctx=t||n.ctx):e&&(p.root=p)}function k(t){var e,n,r;for(e in Xt)n=e+"s",t[n]&&(r=t[n],t[n]={},ot[n](r,t))}function j(t,e,n){function i(){var e=this;e._={unlinked:!0},e.inline=!0,e.tagName=t}var o,a,s,l=new ft._tg;if(st(e)?e={depends:e.depends,render:e}:""+e===e&&(e={template:e}),a=e.baseTag){e.flow=!!e.flow,a=""+a===a?n&&n.tags[a]||ut[a]:a,a||S('baseTag: "'+e.baseTag+'" not found'),l=d(l,a);for(s in e)l[s]=r(a[s],e[s])}else l=d(l,e);return void 0!==(o=l.template)&&(l.template=""+o===o?dt[o]||dt(o):o),(i.prototype=l).constructor=l._ctr=i,n&&(l._parentTmpl=n),l}function T(t){return this.base.apply(this,t)}function A(t,n,r,i){function o(n){var o,s;if(""+n===n||n.nodeType>0&&(a=n)){if(!a)if(/^\.?\/[^\\:*?"<>]*$/.test(n))(s=dt[t=t||n])?n=s:a=document.getElementById(n);else if("#"===n.charAt(0))a=document.getElementById(n.slice(1));else if(e.fn&&!ft.rTmpl.test(n))try{a=e(n,document)[0]}catch(l){}a&&("SCRIPT"!==a.tagName&&S(n+": Use script block, not "+a.tagName),i?n=a.innerHTML:(o=a.getAttribute(Lt),o&&(o!==Qt?(n=dt[o],delete dt[o]):e.fn&&(n=e.data(a)[Qt])),o&&n||(t=t||(e.fn?Qt:n),n=A(t,a.innerHTML,r,i)),n.tmplName=t=t||o,t!==Qt&&(dt[t]=n),a.setAttribute(Lt,t),e.fn&&e.data(a,Qt,n))),a=void 0}else n.fn||(n=void 0);return n}var a,s,l=n=n||"";if(ft._html=ct.html,0===i&&(i=void 0,l=o(l)),i=i||(n.markup?n.bnds?d({},n):n:{}),i.tmplName=i.tmplName||t||"unnamed",r&&(i._parentTmpl=r),!l&&n.markup&&(l=o(n.markup))&&l.fn&&(l=l.markup),void 0!==l)return l.render||n.render?l.tmpls&&(s=l):(n=R(l,i),q(l.replace(Pt,"\\$&"),n)),s||(s=d(function(){return s.render.apply(s,arguments)},n),k(s)),s}function P(t,e){return st(t)?t.call(e):t}function F(t,e,n){Object.defineProperty(t,e,{value:n,configurable:!0})}function N(t,n){function r(t){c.apply(this,t)}function i(){return new r(arguments)}function o(t,e){for(var n,r,i,o,a,s=0;s<x;s++)i=f[s],n=void 0,i+""!==i&&(n=i,i=n.getter,a=n.parentRef),void 0===(o=t[i])&&n&&void 0!==(r=n.defaultVal)&&(o=P(r,t)),e(o,n&&u[n.type],i,a)}function a(e){e=e+""===e?JSON.parse(e):e;var n,r,i,a,d=0,c=e,p=[];if(lt(e)){for(e=e||[],n=e.length;d<n;d++)p.push(this.map(e[d]));return p._is=t,p.unmap=l,p.merge=s,p}if(e){for(o(e,function(t,e){e&&(t=e.map(t)),p.push(t)}),c=this.apply(this,p),d=x;d--;)if(i=p[d],a=f[d].parentRef,a&&i&&i.unmap)if(lt(i))for(n=i.length;n--;)F(i[n],a,c);else F(i,a,c);for(r in e)r===at||w[r]||(c[r]=e[r])}return c}function s(t,e,n){t=t+""===t?JSON.parse(t):t;var r,a,s,l,d,c,p,u,f,g,h=0,m=this;if(lt(m)){for(p={},f=[],a=t.length,s=m.length;h<a;h++){for(u=t[h],c=!1,r=0;r<s&&!c;r++)p[r]||(d=m[r],v&&(p[r]=c=v+""===v?u[v]&&(w[v]?d[v]():d[v])===u[v]:v(d,u)));c?(d.merge(u),f.push(d)):(f.push(g=i.map(u)),n&&F(g,n,e))}return void(b?b(m).refresh(f,!0):m.splice.apply(m,[0,m.length].concat(f)))}o(t,function(t,e,n,r){e?m[n]().merge(t,m,r):m[n]()!==t&&m[n](t)});for(l in t)l===at||w[l]||(m[l]=t[l])}function l(){function t(t){for(var e=[],n=0,r=t.length;n<r;n++)e.push(t[n].unmap());return e}var e,n,r,i,o=0,a=this;if(lt(a))return t(a);for(e={};o<x;o++)n=f[o],r=void 0,n+""!==n&&(r=n,n=r.getter),i=a[n](),e[n]=r&&i&&u[r.type]?lt(i)?t(i):i.unmap():i;for(n in a)!a.hasOwnProperty(n)||"_"===n.charAt(0)&&w[n.slice(1)]||n===at||st(a[n])||(e[n]=a[n]);return e}var d,c,p,u=this,f=n.getters,g=n.extend,v=n.id,h=e.extend({_is:t||"unnamed",unmap:l,merge:s},g),m="",_="",x=f?f.length:0,b=e.observable,w={};for(r.prototype=h,d=0;d<x;d++)!function(t){t=t.getter||t,w[t]=d+1;var e="_"+t;m+=(m?",":"")+t,_+="this."+e+" = "+t+";\n",h[t]=h[t]||function(n){return arguments.length?void(b?b(this).setProperty(t,n):this[e]=n):this[e]},b&&(h[t].set=h[t].set||function(t){this[e]=t})}(f[d]);return _=new Function(m,_),c=function(){_.apply(this,arguments),(p=arguments[x+1])&&F(this,arguments[x],p)},c.prototype=h,h.constructor=c,i.map=a,i.getters=f,i.extend=g,i.id=v,i}function R(t,n){var r,i=vt._wm||{},o={tmpls:[],links:{},bnds:[],_is:"template",render:E};return n&&(o=d(o,n)),o.markup=t,o.htmlTag||(r=Rt.exec(t),o.htmlTag=r?r[1].toLowerCase():""),r=i[o.htmlTag],r&&r!==i.div&&(o.markup=e.trim(o.markup)),o}function M(t,e){function n(i,o,a){var s,l,d,c=ft.onStore[t];if(i&&typeof i===Bt&&!i.nodeType&&!i.markup&&!i.getTgt&&!("viewModel"===t&&i.getters||i.extend)){for(l in i)n(l,i[l],o);return o||ot}return i&&""+i!==i&&(a=o,o=i,i=void 0),d=a?"viewModel"===t?a:a[r]=a[r]||{}:n,s=e.compile,void 0===o&&(o=s?i:d[i],i=void 0),null===o?i&&delete d[i]:(s&&(o=s.call(d,i,o,a,0)||{},o._is=t),i&&(d[i]=o)),c&&c(i,o,a,s),o}var r=t+"s";ot[r]=n}function $(t){ht[t]=ht[t]||function(e){return arguments.length?(gt[t]=e,ht):gt[t]}}function V(t){function e(e,n){this.tgt=t.getTgt(e,n),n.map=this}return st(t)&&(t={getTgt:t}),t.baseMap&&(t=d(d({},t.baseMap),t)),t.map=function(t,n){return new e(t,n)},t}function E(t,e,n,r,i,o){var a,s,l,d,c,p,u,f,g=r,v="";if(e===!0?(n=e,e=void 0):typeof e!==Bt&&(e=void 0),(l=this.tag)?(c=this,g=g||c.view,d=g._getTmpl(l.template||c.tmpl),arguments.length||(t=l.contentCtx&&st(l.contentCtx)?t=l.contentCtx(t):g)):d=this,d){if(!r&&t&&"view"===t._is&&(g=t),g&&t===g&&(t=g.data),p=!g,Ct=Ct||p,p&&((e=e||{}).root=t),!Ct||vt.useViews||d.useViews||g&&g!==it)v=O(d,t,e,n,g,i,o,l);else{if(g?(u=g.data,f=g.index,g.index=Ht):(g=it,u=g.data,g.data=t,g.ctx=e),lt(t)&&!n)for(a=0,s=t.length;a<s;a++)g.index=a,g.data=t[a],v+=d.fn(t[a],g,ft);else g.data=t,v+=d.fn(t,g,ft);g.data=u,g.index=f}p&&(Ct=void 0)}return v}function O(t,e,n,r,i,o,a,s){var l,c,p,u,f,g,v,h,m,_,x,b,w,y="";if(s&&(m=s.tagName,b=s.tagCtx,n=n?Q(n,s.ctx):s.ctx,t===i.content?v=t!==i.ctx._wrp?i.ctx._wrp:void 0:t!==b.content?t===s.template?(v=b.tmpl,n._wrp=b.content):v=b.content||i.content:v=i.content,b.props.link===!1&&(n=n||{},n.link=!1)),i&&(a=a||i._.onRender,w=n&&n.link===!1,w&&i._.nl&&(a=void 0),n=Q(n,i.ctx),b=!s&&i.tag?i.tag.tagCtxs[i.tagElse]:b),(_=b&&b.props.itemVar)&&("~"!==_[0]&&D("Use itemVar='~myItem'"),_=_.slice(1)),o===!0&&(g=!0,o=0),a&&s&&s._.noVws&&(a=void 0),h=a,a===!0&&(h=void 0,a=i._.onRender),n=t.helpers?Q(t.helpers,n):n,x=n,lt(e)&&!r)for(p=g?i:void 0!==o&&i||new C(n,"array",i,e,t,o,a,v),p._.nl=w,i&&i._.useKey&&(p._.bnd=!s||s._.bnd&&s,p.tag=s),l=0,c=e.length;l<c;l++)u=new C(x,"item",p,e[l],t,(o||0)+l,a,p.content),_&&((u.ctx=d({},x))[_]=ft._cp(e[l],"#data",u)),f=t.fn(e[l],u,ft),y+=p._.onRender?p._.onRender(f,u):f;else p=g?i:new C(x,m||"data",i,e,t,o,a,v),_&&((p.ctx=d({},x))[_]=ft._cp(e,"#data",p)),p.tag=s,p._.nl=w,y+=t.fn(e,p,ft);return s&&(p.tagElse=b.index,b.contentView=p),h?h(y,p):y}function I(t,e,n){var r=void 0!==n?st(n)?n.call(e.data,t,e):n||"":"{Error: "+(t.message||t)+"}";return gt.onError&&void 0!==(n=gt.onError.call(e.data,t,n&&r,e))&&(r=n),e&&!e._lc?ct.html(r):r}function S(t){throw new ft.Err(t)}function D(t){S("Syntax error\n"+t)}function q(t,e,n,r,i){function o(e){e-=v,e&&m.push(t.substr(v,e).replace(Tt,"\\n"))}function a(e,n){e&&(e+="}}",D((n?"{{"+n+"}} block has {{/"+e+" without {{"+e:"Unmatched or missing {{/"+e)+", in template:\n"+t))}function s(s,l,d,u,g,x,b,w,y,C,k,j){(b&&l||y&&!d||w&&":"===w.slice(-1)||C)&&D(s),x&&(g=":",u=Jt),y=y||n&&!i;var T,A,P,F=(l||n)&&[[]],N="",R="",M="",$="",V="",E="",O="",I="",S=!y&&!g;d=d||(w=w||"#data",g),o(j),v=j+s.length,b?f&&m.push(["*","\n"+w.replace(/^:/,"ret+= ").replace(At,"$1")+";\n"]):d?("else"===d&&(Nt.test(w)&&D('For "{{else if expr}}" use "{{else expr}}"'),F=_[9]&&[[]],_[10]=t.substring(_[10],j),A=_[11]||_[0]||D("Mismatched: "+s),_=h.pop(),m=_[2],S=!0),w&&B(w.replace(Tt," "),F,e,n).replace(Ft,function(t,e,n,r,i,o,a,s){return"this:"===r&&(o="undefined"),s&&(P=P||"@"===s[0]),r="'"+i+"':",a?(R+=n+o+",",$+="'"+s+"',"):n?(M+=r+"j._cp("+o+',"'+s+'",view),',E+=r+"'"+s+"',"):e?O+=o:("trigger"===i&&(I+=o),"lateRender"===i&&(T="false"!==s),N+=r+o+",",V+=r+"'"+s+"',",p=p||Vt.test(i)),""}).slice(0,-1),F&&F[0]&&F.pop(),c=[d,u||!!r||p||"",S&&[],K($||(":"===d?"'#data',":""),V,E),K(R||(":"===d?"data,":""),N,M),O,I,T,P,F||0],m.push(c),S&&(h.push(_),_=c,_[10]=v,_[11]=A)):k&&(a(k!==_[0]&&k!==_[11]&&k,_[0]),_[10]=t.substring(_[10],j),_=h.pop()),a(!_&&k),m=_[2]}var l,d,c,p,u,f=gt.allowCode||e&&e.allowCode||ht.allowCode===!0,g=[],v=0,h=[],m=g,_=[,,g];if(f&&e._is&&(e.allowCode=f),n&&(void 0!==r&&(t=t.slice(0,-r.length-2)+xt),t=mt+t+bt),a(h[0]&&h[0][2].pop()[0]),t.replace(rt,s),o(t.length),(v=g[g.length-1])&&a(""+v!==v&&+v[10]===v[10]&&v[0]),n){for(d=L(g,t,n),u=[],l=g.length;l--;)u.unshift(g[l][9]);U(d,u)}else d=L(g,e);return d}function U(t,e){var n,r,i=0,o=e.length;for(t.deps=[],t.paths=[];i<o;i++){t.paths.push(r=e[i]);for(n in r)"_jsvto"!==n&&r.hasOwnProperty(n)&&r[n].length&&!r[n].skp&&(t.deps=t.deps.concat(r[n]))}}function K(t,e,n){return[t.slice(0,-1),e.slice(0,-1),n.slice(0,-1)]}function J(t,e){return"\n\tparams:{args:["+t[0]+"],\n\tprops:{"+t[1]+"}"+(t[2]?",\n\tctx:{"+t[2]+"}":"")+"},\n\targs:["+e[0]+"],\n\tprops:{"+e[1]+"}"+(e[2]?",\n\tctx:{"+e[2]+"}":"")}function B(t,n,r,i){function o(r,o,d,T,A,P,F,N,R,M,$,V,E,O,I,S,q,U,K,J,B){function L(t,e,r,o,l,d,c,p){if(z="."===r,r&&(A=A.slice(e.length),/^\.?constructor$/.test(p||A)&&D(t),z||(t=(M?(i?"":"(ltOb.lt=ltOb.lt||")+"(ob=":"")+(o?'view.ctxPrm("'+o+'")':l?"view":"data")+(M?")===undefined"+(i?"":")")+'?"":view._getOb(ob,"':"")+(p?(d?"."+d:o?"":l?"":"."+r)+(c||""):(p=o?"":l?d||"":r,"")),t+=p?"."+p:"",t=e+("view.data"===t.slice(0,9)?t.slice(5):t)+(M?(i?'"':'",ltOb')+($?",1)":")"):"")),u)){if(H="_linkTo"===a?s=n._jsvto=n._jsvto||[]:f.bd,W=z&&H[H.length-1]){if(W._cpfn){for(;W.sb;)W=W.sb;W.prm&&(W.bnd&&(A="^"+A.slice(1)),W.sb=A,W.bnd=W.bnd||"^"===A[0])}}else H.push(A);$&&!z&&(y[m]=Y,C[m]=k[m].length)}return t}T&&!N&&(A=T+A),P=P||"",E=E||"",d=d||o||E,A=A||R,M&&(M=!/\)|]/.test(B[J-1]))&&(A=A.slice(1).split(".").join("^")),$=$||U||"";var Q,H,W,Z,z,G,X,Y=J;if(!p&&!c){if(F&&D(t),q&&u){if(Q=y[m-1],B.length-1>Y-(Q||0)){if(Q=e.trim(B.slice(Q,Y+r.length)),H=s||g[m-1].bd,W=H[H.length-1],W&&W.prm){for(;W.sb&&W.sb.prm;)W=W.sb;Z=W.sb={path:W.sb,bnd:W.bnd}}else H.push(Z={path:H.pop()});W&&W.sb===Z&&(k[m]=k[m-1].slice(W._cpPthSt)+k[m],k[m-1]=k[m-1].slice(0,W._cpPthSt)),Z._cpPthSt=C[m-1],Z._cpKey=Q,k[m]+=B.slice(j,J),j=J,Z._cpfn=Wt[Q]=Wt[Q]||new Function("data,view,j","//"+Q+"\nvar v;\nreturn ((v="+k[m]+("]"===S?")]":S)+")!=null?v:null);"),k[m-1]+=w[h]&&vt.cache?'view.getCache("'+Q.replace(Pt,"\\$&")+'"':k[m],Z.prm=f.bd,Z.bnd=Z.bnd||Z.path&&Z.path.indexOf("^")>=0}k[m]=""}"["===$&&($="[j._sq("),"["===d&&(d="[j._sq(")}return X=p?(p=!O,p?r:E+'"'):c?(c=!I,c?r:E+'"'):(d?(b[++h]=!0,_[h]=0,u&&(y[m++]=Y++,f=g[m]={bd:[]},k[m]="",C[m]=1),d):"")+(K?h?"":(v=B.slice(v,Y),(a?(a=l=s=!1,"\b"):"\b,")+v+(v=Y+r.length,u&&n.push(f.bd=[]),"\b")):N?(m&&D(t),u&&n.pop(),a="_"+A,l=T,v=Y+r.length,u&&(u=f.bd=n[a]=[],u.skp=!T),A+":"):A?A.split("^").join(".").replace(ft.rPath,L)+($||P):P?P:S?"]"===S?")]":")":V?(w[h]||D(t),","):o?"":(p=O,c=I,'"')),p||c||S&&(w[h]=!1,h--),u&&(p||c||(S&&(b[h+1]&&(f=g[--m],b[h+1]=!1),x=_[h+1]),$&&(_[h+1]=k[m].length+(d?1:0),(A||S)&&(f=g[++m]={bd:[]},b[h+1]=!0))),k[m]=(k[m]||"")+B.slice(j,J),j=J+r.length,p||c||((G=d&&b[h+1])&&(k[m-1]+=d,C[m-1]++),"("===$&&z&&!Z&&(k[m]=k[m-1].slice(x)+k[m],k[m-1]=k[m-1].slice(0,x))),k[m]+=G?X.slice(1):X),p||c||!$||(h++,A&&"("===$&&(w[h]=!0)),p||c||!U||(u&&(k[m]+=$),X+=$),X}var a,s,l,d,c,p,u=n&&n[0],f={bd:u},g={0:f},v=0,h=0,m=0,_={},x=0,b={},w={},y={},C={0:0},k={0:""},j=0;return"@"===t[0]&&(t=t.replace(Dt,".")),d=(t+(r?" ":"")).replace(ft.rPrm,o),u&&(d=k[0]),!h&&d||D(t)}function L(t,e,n){var r,i,o,a,s,l,d,c,p,u,f,g,v,h,m,_,x,b,w,y,C,k,j,T,A,P,F,N,M,$,V,E,O,I=0,S=vt.useViews||e.useViews||e.tags||e.templates||e.helpers||e.converters,q="",K={},B=t.length;for(""+e===e?(b=n?'data-link="'+e.replace(Tt," ").slice(1,-1)+'"':e,e=0):(b=e.tmplName||"unnamed",e.allowCode&&(K.allowCode=!0),e.debug&&(K.debug=!0),f=e.bnds,x=e.tmpls),r=0;r<B;r++)if(i=t[r],""+i===i)q+='+"'+i+'"';else if(o=i[0],"*"===o)q+=";\n"+i[1]+"\nret=ret";else{if(a=i[1],C=!n&&i[2],s=J(i[3],v=i[4]),$=i[6],V=i[7],i[8]?(E="\nvar ob,ltOb={},ctxs=",O=";\nctxs.lt=ltOb.lt;\nreturn ctxs;"):(E="\nreturn ",O=""),k=i[10]&&i[10].replace(At,"$1"),(A="else"===o)?g&&g.push(i[9]):(N=i[5]||gt.debugMode!==!1&&"undefined",f&&(g=i[9])&&(g=[g],I=f.push(1))),S=S||v[1]||v[2]||g||/view.(?!index)/.test(v[0]),(P=":"===o)?a&&(o=a===Jt?">":a+o):(C&&(w=R(k,K),w.tmplName=b+"/"+o,w.useViews=w.useViews||S,L(C,w),S=w.useViews,x.push(w)),A||(y=o,S=S||o&&(!ut[o]||!ut[o].flow),T=q,q=""),j=t[r+1],j=j&&"else"===j[0]),M=N?";\ntry{\nret+=":"\n+",h="",m="",P&&(g||$||a&&a!==Jt||V)){if(F=new Function("data,view,j","// "+b+" "+ ++I+" "+o+E+"{"+s+"};"+O),F._er=N,F._tag=o,F._bd=!!g,F._lr=V,n)return F;U(F,g),_='c("'+a+'",view,',u=!0,h=_+I+",",m=")"}if(q+=P?(n?(N?"try{\n":"")+"return ":M)+(u?(u=void 0,S=p=!0,_+(F?(f[I-1]=F,I):"{"+s+"}")+")"):">"===o?(d=!0,"h("+v[0]+")"):(c=!0,"((v="+v[0]+")!=null?v:"+(n?"null)":'"")'))):(l=!0,"\n{view:view,content:false,tmpl:"+(C?x.length:"false")+","+s+"},"),y&&!j){if(q="["+q.slice(0,-1)+"]",_='t("'+y+'",view,this,',n||g){if(q=new Function("data,view,j"," // "+b+" "+I+" "+y+E+q+O),q._er=N,q._tag=y,g&&U(f[I-1]=q,g),q._lr=V,n)return q;h=_+I+",undefined,",m=")"}q=T+M+_+(g&&I||q)+")",g=0,y=0}N&&!j&&(S=!0,q+=";\n}catch(e){ret"+(n?"urn ":"+=")+h+"j._err(e,view,"+N+")"+m+";}"+(n?"":"\nret=ret"))}q="// "+b+(K.debug?"\ndebugger;":"")+"\nvar v"+(l?",t=j._tag":"")+(p?",c=j._cnvt":"")+(d?",h=j._html":"")+(n?(i[8]?", ob":"")+";\n":',ret=""')+q+(n?"\n":";\nreturn ret;");try{q=new Function("data,view,j",q)}catch(Q){D("Compiled template code:\n\n"+q+'\n: "'+(Q.message||Q)+'"')}return e&&(e.fn=q,e.useViews=!!S),q}function Q(t,e){return t&&t!==e?e?d(d({},e),t):t:e&&d({},e)}function H(t,n){var r,i,o=n.map,a=o&&o.propsArr;if(!a){if(a=[],typeof t===Bt||st(t))for(r in t)i=t[r],r===at||!t.hasOwnProperty(r)||n.props.noFunctions&&e.isFunction(i)||a.push({key:r,prop:i});o&&(o.propsArr=o.options&&a)}return W(a,n)}function W(t,n){var r,i,o,a=n.tag,s=n.props,l=n.params.props,d=s.filter,c=s.sort,p=c===!0,u=parseInt(s.step),f=s.reverse?-1:1;if(!lt(t))return t;if(p||c&&""+c===c?(r=t.map(function(t,e){return t=p?t:g(t,c),{i:e,v:""+t===t?t.toLowerCase():t}}),r.sort(function(t,e){return t.v>e.v?f:t.v<e.v?-f:0}),t=r.map(function(e){return t[e.i]})):(c||f<0)&&!a.dataMap&&(t=t.slice()),st(c)&&(t=t.sort(function(){return c.apply(n,arguments)})),f<0&&(!c||st(c))&&(t=t.reverse()),t.filter&&d&&(t=t.filter(d,n),n.tag.onFilter&&n.tag.onFilter(n)),l.sorted&&(r=c||f<0?t:t.slice(),a.sorted?e.observable(a.sorted).refresh(r):n.map.sorted=r),i=s.start,o=s.end,(l.start&&void 0===i||l.end&&void 0===o)&&(i=o=0),isNaN(i)&&isNaN(o)||(i=+i||0,o=void 0===o||o>t.length?t.length:+o,t=t.slice(i,o)),u>1){for(i=0,o=t.length,r=[];i<o;i+=u)r.push(t[i]);t=r}return l.paged&&a.paged&&$observable(a.paged).refresh(t),t}function Z(t,n,r){var i=this.jquery&&(this[0]||S("Unknown template")),o=i.getAttribute(Lt);return E.call(o&&e.data(i)[Qt]||dt(i),t,n,r)}function z(t){return Ut[t]||(Ut[t]="&#"+t.charCodeAt(0)+";")}function G(t,e){return Kt[e]||""}function X(t){return void 0!=t?$t.test(t)&&(""+t).replace(Ot,z)||t:""}function Y(t){return""+t===t?t.replace(It,z):t}function tt(t){return""+t===t?t.replace(St,G):t}var et=e===!1;e=e&&e.fn?e:t.jQuery;var nt,rt,it,ot,at,st,lt,dt,ct,pt,ut,ft,gt,vt,ht,mt,_t,xt,bt,wt,yt,Ct,kt="v1.0.11",jt="_ocp",Tt=/[ \t]*(\r\n|\n|\r)/g,At=/\\(['"\\])/g,Pt=/['"\\]/g,Ft=/(?:\x08|^)(onerror:)?(?:(~?)(([\w$.]+):)?([^\x08]+))\x08(,)?([^\x08]+)/gi,Nt=/^if\s/,Rt=/<(\w+)[>\s]/,Mt=/[\x00`><"'&=]/g,$t=/[\x00`><\"'&=]/,Vt=/^on[A-Z]|^convert(Back)?$/,Et=/^\#\d+_`[\s\S]*\/\d+_`$/,Ot=Mt,It=/[&<>]/g,St=/&(amp|gt|lt);/g,Dt=/\[['"]?|['"]?\]/g,qt=0,Ut={"&":"&amp;","<":"&lt;",">":"&gt;","\0":"&#0;","'":"&#39;",'"':"&#34;","`":"&#96;","=":"&#61;"},Kt={amp:"&",gt:">",lt:"<"},Jt="html",Bt="object",Lt="data-jsv-tmpl",Qt="jsvTmpl",Ht="For #index in nested block use #getIndex().",Wt={},Zt={},zt=t.jsrender,Gt=zt&&e&&!e.render,Xt={template:{compile:A},tag:{compile:j},viewModel:{compile:N},helper:{},converter:{}};if(ot={jsviews:kt,sub:{rPath:/^(!*?)(?:null|true|false|\d[\d.]*|([\w$]+|\.|~([\w$]+)|#(view|([\w$]+))?)([\w$.^]*?)(?:[.[^]([\w$]+)\]?)?)$/g,rPrm:/(\()(?=\s*\()|(?:([([])\s*)?(?:(\^?)(~?[\w$.^]+)?\s*((\+\+|--)|\+|-|~(?![\w$])|&&|\|\||===|!==|==|!=|<=|>=|[<>%*:?\/]|(=))\s*|(!*?(@)?[#~]?[\w$.^]+)([([])?)|(,\s*)|(?:(\()\s*)?\\?(?:(')|("))|(?:\s*(([)\]])(?=[.^]|\s*$|[^([])|[)\]])([([]?))|(\s+)/g,View:C,Err:l,tmplFn:q,parse:B,extend:d,extendCtx:Q,syntaxErr:D,onStore:{template:function(t,e){null===e?delete Zt[t]:t&&(Zt[t]=e)}},addSetting:$,settings:{allowCode:!1},advSet:a,_thp:i,_gm:r,_tg:function(){},_cnvt:m,_tag:y,_er:S,_err:I,_cp:o,_sq:function(t){return"constructor"===t&&D(""),t}},settings:{delimiters:c,advanced:function(t){return t?(d(vt,t),ft.advSet(),ht):vt}},map:V},(l.prototype=new Error).constructor=l,u.depends=function(){return[this.get("item"),"index"]},f.depends="index",C.prototype={get:p,getIndex:f,ctxPrm:v,getRsc:w,_getTmpl:h,_getOb:g,getCache:function(t){return gt._cchCt>this.cache._ct&&(this.cache={_ct:gt._cchCt}),void 0!==this.cache[t]?this.cache[t]:this.cache[t]=Wt[t](this.data,this,ft)},_is:"view"},ft=ot.sub,ht=ot.settings,!(zt||e&&e.render)){for(nt in Xt)M(nt,Xt[nt]);if(ct=ot.converters,pt=ot.helpers,ut=ot.tags,ft._tg.prototype={baseApply:T,cvtArgs:_,bndArgs:b,ctxPrm:v},it=ft.topView=new C,e){if(e.fn.render=Z,at=e.expando,e.observable){if(kt!==(kt=e.views.jsviews))throw"jquery.observable.js requires jsrender.js "+kt;d(ft,e.views.sub),ot.map=e.views.map}}else e={},et&&(t.jsrender=e),e.renderFile=e.__express=e.compile=function(){throw"Node.js: use npm jsrender, or jsrender-node.js"},e.isFunction=function(t){return"function"==typeof t},e.isArray=Array.isArray||function(t){return"[object Array]"==={}.toString.call(t)},ft._jq=function(t){t!==e&&(d(t,e),e=t,e.fn.render=Z,delete e.jsrender,at=e.expando)},e.jsrender=kt;gt=ft.settings,gt.allowCode=!1,st=e.isFunction,e.render=Zt,e.views=ot,e.templates=dt=ot.templates;for(yt in gt)$(yt);(ht.debugMode=function(t){return void 0===t?gt.debugMode:(gt._clFns&&gt._clFns(),gt.debugMode=t,gt.onError=t+""===t?function(){return t}:st(t)?t:void 0,ht)})(!1),vt=gt.advanced={cache:!0,useViews:!1,_jsv:!1},ut({"if":{render:function(t){var e=this,n=e.tagCtx,r=e.rendering.done||!t&&(n.args.length||!n.index)?"":(e.rendering.done=!0,void(e.selected=n.index));return r},contentCtx:!0,flow:!0},"for":{sortDataMap:V(W),init:function(t,e){this.setDataMap(this.tagCtxs)},render:function(t){var e,n,r,i,o,a=this,s=a.tagCtx,l=s.argDefault===!1,d=s.props,c=l||s.args.length,p="",u=0;if(!a.rendering.done){if(e=c?t:s.view.data,l)for(l=d.reverse?"unshift":"push",i=+d.end,o=+d.step||1,e=[],r=+d.start||0;(i-r)*o>0;r+=o)e[l](r);void 0!==e&&(n=lt(e),p+=s.render(e,!c||d.noIteration),u+=n?e.length:1),(a.rendering.done=u)&&(a.selected=s.index)}return p},setDataMap:function(t){for(var e,n,r,i=this,o=t.length;o--;)e=t[o],n=e.props,r=e.params.props,e.argDefault=void 0===n.end||e.args.length>0,n.dataMap=e.argDefault!==!1&&lt(e.args[0])&&(r.sort||r.start||r.end||r.step||r.filter||r.reverse||n.sort||n.start||n.end||n.step||n.filter||n.reverse)&&i.sortDataMap},flow:!0},props:{baseTag:"for",dataMap:V(H),init:a,flow:!0},include:{flow:!0},"*":{render:o,flow:!0},":*":{render:o,flow:!0},dbg:pt.dbg=ct.dbg=s}),ct({html:X,attr:X,encode:Y,unencode:tt,url:function(t){return void 0!=t?encodeURI(""+t):null===t?t:""}})}return gt=ft.settings,lt=(e||zt).isArray,ht.delimiters("{{","}}","^"),Gt&&zt.views.sub._jq(e),e||zt},window);    'use strict';

const getYearFromDateStr = dateStr => {
	if (dateStr) {
		// Parse YYYY-MM-DD as local date to avoid timezone issues
		const [year, month, day] = dateStr.split('-').map(Number);
		if (!year || !month || !day) {
			return '';
		}
		
		// Create date in local timezone (month is 0-indexed in Date constructor)
		const date = new Date(year, month - 1, day);
		if (isNaN(date)) {
			return '';
		} else {
			return `${date.getFullYear()}`;
		}
	} else {
		return '';
	}
}

const nthNumber = (number) => {
  if (number > 3 && number < 21) return "th"; // Handles 4th to 20th
  switch (number % 10) {
    case 1:
      return "st"; // Handles 1st, 21st, 31st
    case 2:
      return "nd"; // Handles 2nd, 22nd
    case 3:
      return "rd"; // Handles 3rd, 23rd
    default:
      return "th"; // Handles all other cases
  }
};

const formatDate = (dateStr, format) => {
	if (!dateStr || !format) {
		return '';
	}
	
	// Parse YYYY-MM-DD as local date to avoid timezone issues
	const [year, month, day] = dateStr.split('-').map(Number);
	if (!year || !month || !day) {
		return '';
	}
	
	// Create date in local timezone (month is 0-indexed in Date constructor)
	const date = new Date(year, month - 1, day);
	if (isNaN(date)) {
		return '';
	}
	
	// Simple date formatting - can be extended for more complex formats
	switch (format.toLowerCase()) {
		case 'month day, year with ordinal':
		case 'month_day_year_with_ordinal':
			const monthLong = date.toLocaleDateString('en-US', { month: 'long' });
			return `${monthLong} ${day}${nthNumber(day)}, ${year}`;
		case 'month day year':
		case 'month_day_year':
			// Long month, no ordinal
			const month = date.toLocaleDateString('en-US', { month: 'long' });
			return `${month} ${day}, ${year}`;
		case 'month day year short':
		case 'month_day_year_short':
			// Short month, no ordinal
			const shortMonth = date.toLocaleDateString('en-US', { month: 'short' });
			return `${shortMonth} ${day}, ${year}`;
		case 'day month year':
		case 'day_month_year':
			return date.toLocaleDateString('en-GB', { 
				year: 'numeric', 
				month: 'long', 
				day: 'numeric' 
			});
		case 'mm/dd/yyyy':
			return date.toLocaleDateString('en-US');
		case 'dd/mm/yyyy':
			return date.toLocaleDateString('en-GB');
		case 'yyyy-mm-dd':
		default:
			return dateStr; // Return original format
	}
}

const generateNameInitials = (displayName) => {
	const matches = (displayName || '').toUpperCase().match(/\b(\w)/g);
	let initials = '';
	if (matches && matches.length) {
		initials += matches.length > 0 ? matches[0] : '';
		initials += matches.length > 1 ? matches[matches.length - 1] : '';
	}
	return initials;
};

function meta_noIndex() {
	const meta = document.createElement('meta');
	meta.name = 'robots';
	meta.content = 'noindex';
	document.head.appendChild(meta);
}

function meta_redirect(toPage, timeout) {
	const meta = document.createElement('meta');
	meta.httpEquiv = 'refresh';
	meta.content = `${timeout || '0'}; ${toPage}`;
	document.head.appendChild(meta);
}

(function ($) {

	function configDomains(config) {
		switch (config.environment) {
			case 'prod':
				config.apiDomain = 'https://api.gather.app';
				config.appDomain = 'https://my.gather.app';
				break;
			case 'qa':
				config.apiDomain = 'https://api.gatherqa.app';
				config.appDomain = 'https://my.gatherqa.app';
				break;
			case 'local':
			default:
				config.apiDomain = 'https://dwbfh.com:3002';
				config.appDomain = 'https://dwbfh.com:3000';
				break;
		}
	}


	function loadObit(config, caseName, render) {
		configDomains(config);
		const result = fetch(`${config.apiDomain}/app/embed/${config.funeralHome}/obituary/${caseName}`);
		return render ? result.then(render) : result;
	}

	// Use this function to add data field that the JSRender will need to render oibt templates (search, carousel)
	function obitDataMapper(options, d, extra) {
		// Turn the theme relative image paths into absolute urls
		for (const k in d.theme) {
			const v = d.theme[k];
			if (v && typeof v === 'string' && v.startsWith('/themes/')) {
				d.theme[k] = `${options.appDomain}${v}`;
			}
		}
		if (!options.skipDefaultPhoto) {
			// Add the default photo if there isn't one
			d.photo = d.photo || d.theme.top_accent_image_reversed || options.defaultPhoto;
		}

		// Format dates if dateFormat is specified, otherwise keep original format
		if (options.dateFormat) {
			d.dob_date = formatDate(d.dob_date, options.dateFormat);
			d.dod_start_date = formatDate(d.dod_start_date, options.dateFormat);
		}

		const [yob, yod] = [getYearFromDateStr(d.dob_date), getYearFromDateStr(d.dod_start_date)];
		if (yob && yod && yob !== yod) {
			d.dates = `${yob} - ${yod}`;
			d.has_both_dates = true;
		} else if (yod) {
			d.dates = `${yod}`;
			d.has_both_dates = false;
		} else {
			d.dates = '';
			d.has_both_dates = false;
		}
		d.yob = yob;
		d.yod = yod;
		
		d.obitLink = d.host_remember
			? `/obituaries/${encodeURIComponent(d.name)}`
			: `${options.appDomain}/remember/${encodeURIComponent(d.name)}`;
		d.eventSectionLink = `${d.obitLink}#remember-events`;

		if (extra) {
			return $.extend({}, d, extra);
		} else {
			return d;
		}
	}

	function loadObits(config, render) {
		if (!config.pageSize || isNaN(parseInt(`${config.pageSize}`))) {
			config.pageSize = 9;
		}
		if (!config.offset || isNaN(parseInt(`${config.offset}`))) {
			config.offset = 0;
		}
		if (!config.search) {
			config.search = '';
		}
		if (!config.nameSearch) {
			config.nameSearch = '';
		}
		if (!config.yearSearch) {
			config.yearSearch = '';
		}
		if (!config.caseName) {
			config.caseName = '';
		}
		configDomains(config);
		const result = fetch(`${config.apiDomain}/app/embed/${config.funeralHome}/obituary` +
			`?pageSize=${config.pageSize}` +
			`&offset=${config.offset}` +
			`&nameSearch=${encodeURIComponent(config.nameSearch)}` +
			`&caseName=${encodeURIComponent(config.caseName)}` +
			`&yearSearch=${encodeURIComponent(config.yearSearch)}` +
			`&funeralHome=${encodeURIComponent(config.fhkey)}` +
			`&search=${encodeURIComponent(config.search)}`, {
			"headers": {
				"accept": "application/json",
				"content-type": "text/plain",
				"sec-fetch-dest": "empty",
				"sec-fetch-mode": "cors",
				"sec-fetch-site": "same-site"
			},
			"body": null,
			"method": "GET",
			"mode": "cors",
			"credentials": "omit"
		});
		return render ? result.then(render) : result;
	}

	$.fn.extend({
		// Extend Jquery with the gatherCarousel injector function
		gatherCarousel: function (options, templateRef, readyFunction) {
			options = $.extend({}, $.GatherCarousel.defaults, options);
			this.each(function () {
				new $.GatherCarousel(this, options, templateRef, readyFunction);
			});
			return this;
		},
		gatherSearch: function (options, templateRef) {
			options = $.extend({}, $.GatherSearch.defaults, options);
			this.each(function () {
				new $.GatherSearch(this, options, templateRef);
			});
			return this;
		},
		gatherLite: function (options, urlPattern, dataHandler, errorHandler) {
			options = $.extend({}, $.GatherLite.defaults, options);
			this.each(function () {
				new $.GatherLite(this, options, urlPattern, dataHandler, errorHandler);
			});
			return this;
		},
		gatherSubscriberPopup: function (options) {
			options = $.extend({}, $.GatherSubscriberPopup.defaults, options);
			this.each(function () {
				new $.GatherSubscriberPopup(this, options);
			});
			return this;
		},
	});

	$.GatherCarousel = function (ctl, options, templateRef, readyFunction) {
		loadObits(options, (v) => {
			v.json().then(result => {
				var tmpl = $.templates(templateRef);
				var html = tmpl.render(result.data.map(d => obitDataMapper(options, d)));
				$(ctl).prepend($(html));
				if (readyFunction && typeof (readyFunction) === 'function') {
					readyFunction(options);
				}
			}).catch(r => {
				console.error('Failed to parse JSON', r);
			});
		}).catch(r => {
			console.error('Failed to load obit data', r);
		});
	}

	$.GatherCarousel.defaults = {
		version: 1,
		environment: 'local',
		pageSize: 100,
		inject: 'gather_carousel',
		defaultPhoto: 'https://res.cloudinary.com/gather-app-prod/image/upload/v1610730555/system_assets/images/default_avatar.jpg',
		funeralHome: '',
		fhkey: '',
		arrows: [' ', ' '],
		dateFormat: '', // Optional date format for dob_date_formatted and dod_start_date_formatted
	};

	$.GatherSearch = function (ctl, options, handler) {
		loadObits(options, (v) => {
			v.json().then(result => {
				if (result.message === 'ok') {
					if (handler && typeof (handler) === 'function') {
						let params = new URLSearchParams(document.location.search.substring(1));
						let cta = '';
						switch (params.get("cta")) {
							case 'flowers': cta = 'BUY FLOWERS'; break;
							case 'payments': cta = 'MAKE PAYMENT'; break;
							case 'trees': cta = 'PLANT TREES'; break;
							default: cta = 'READ MORE'; break;
						}
						const mappedData = result.data.map(
							d => obitDataMapper(options, d, { cta })
						);
						handler(mappedData, options, ctl);
					}
				} else {
					console.log(result.message);
				}

			}).catch(r => {
				console.error('Failed to parse JSON', r);
			});
		}).catch(r => {
			console.error('Failed to load obit data', r);
		});
	}

	$.GatherSearch.defaults = {
		version: 1,
		environment: 'local',
		pageSize: 9,
		inject: 'gather_list',
		defaultPhoto: 'https://res.cloudinary.com/gather-app-prod/image/upload/v1610730555/system_assets/images/default_avatar.jpg',
		funeralHome: '',
		fhkey: '',
		arrows: [' ', ' '],
		dateFormat: '', // Optional date format for dob_date_formatted and dod_start_date_formatted
	};

	$.GatherLite = function (ctl, options, urlPattern, dataHandler, errorHandler) {
		const pathName = document.location.href.match(/^https?:\/\/[^\/]+\/?(.*)/)[1];

		// The urlPattern may have multiple lines, check each one independently
		let urlParts = null;
		const patterns = (urlPattern || '').split(/\r\n|\n|\r/);
		while (patterns.length > 0 && urlParts === null) {
			urlParts = pathName.match(patterns.shift());
		}

		if (urlParts === null) {
			// Not a valid URL for obit pages
			errorHandler(`This is not an obituary page: ${pathName}`, 4404);
			return;
		}

		// look through all the matched groups and use the first non-empty
		var obitName = '';
		for (var idx = 1; idx < urlParts.length && obitName === ''; idx++) {
			obitName = urlParts[idx];
		}
		if (obitName === '') {
			errorHandler(`Unable to find obit name on page: ${pathName}`, 4404);
			return;
		}

		const urlParams = new URLSearchParams(window.location.search);
		const obId = urlParams.get('obId');
		if (obId) {
			obitName = obId;
		}

		loadObit(options, obitName, (v) => {
			v.json().then(obit => {
				if (obit.message === 'ok') {
					if (dataHandler && typeof (dataHandler) === 'function') {
						const data = obitDataMapper(options, obit.data);
						dataHandler($.extend({}, obit.data, { appDomain: options.appDomain })
							, obit.events
							, ctl);
					}
				} else {
					errorHandler(obit.message, 404);
				}
			}).catch(r => {
				errorHandler(`Failed to render obit: ${r.message || ''}`);
			});
		}).catch(r => {
			errorHandler(`Failed to load obit data ${r.message || ''}`,);
		});
	}

	$.GatherLite.defaults = {
		environment: 'local',
		defaultPhoto: 'https://res.cloudinary.com/gather-app-prod/image/upload/v1610730555/system_assets/images/default_avatar.jpg',
		funeralHome: '',
		skipDefaultPhoto: true
	};

	$.GatherSubscriberPopup = function (ctl, options) {
		const modal = $(ctl);
		const openButton = $(options.openButton);
		if (openButton.length === 0) {
			if (options.environment !== 'prod') {
				console.warn(`Unable to attach obit subscription. Button not found using querySelector '${options.openButton}'`)
			}
			return;
		}
		const closeButton = $('.subscribe-dialog-close');
		const form = $('#obit-notif-form');
		function clickAway(e) {
			// Only close if we click the modal gray area or no event was passed in (x button or submit)
			if (e === undefined || modal[0] === e.target) {
				modal.css('display', 'none');
				$('body').off('click', clickAway);
				form.trigger('reset');
			}
		}

		openButton.click(() => {
			modal.css('display', 'block')
			$('body').click(clickAway);
			form.find('input').first().focus();
		});
		closeButton.click(() => clickAway());

		form.submit((e) => {
			e.preventDefault();
			const formData = form.serializeArray();
			const inputElements = form.children('input,button');
			inputElements.prop('disabled', true);
			const postBody = {
				websiteToken: options.websiteToken,
				email: (formData.find(v => v.name === 'email') || {}).value,
				name: (formData.find(v => v.name === 'name') || {}).value,
			};
			configDomains(options);

			const subscribeFailure = () => {
				inputElements.prop('disabled', false);
				alert(`Something went wrong when trying to sign you up. Please try again later.`);
				clickAway();
			}

			const result = fetch(
				`${options.apiDomain}/app/subscription/obit`,
				{
					"headers": {
						"accept": "application/json",
						"content-type": "application/json",
						"sec-fetch-dest": "empty",
						"sec-fetch-mode": "cors",
						"sec-fetch-site": "same-site"
					},
					"body": JSON.stringify(postBody),
					"method": "POST",
					"mode": "cors",
					"credentials": "omit"
				});
			result.then(dt => {
				if (dt.status >= 300) {
					subscribeFailure();
				} else {
					clickAway();
					options.afterSubmit(options);
				}
			}).catch(ex => {
				subscribeFailure();
			});
		});
	}

	$.GatherSubscriberPopup.defaults = {
		environment: 'local',
		openButton: '.obit-sub-button',
		websiteToken: '',
		afterSubmit: (options) => {
			if (options.environment !== 'prod') {
				console.warn(`No 'afterSubmit' handler option was supplied to GatherSubscriberPopup.`);
			}
		},
	};

})(jQuery);

    const gather_redirects = [{"u":"https:\/\/dwbfh.com\/obituaries\/?cta=flowers","s":"301","i":"","p":"169\/Local-Florists.html","c":"exact"},{"u":"https:\/\/dwbfh.com\/resources\/","s":"301","i":"","p":"168\/Helpful-Info.html","c":"exact"},{"u":"https:\/\/dwbfh.com\/resources\/legal-advice\/","s":"301","i":"","p":"95\/Wills.html","c":"exact"},{"u":"https:\/\/dwbfh.com\/resources\/legal-advice\/","s":"301","i":"","p":"97\/Probate.html","c":"exact"},{"u":"https:\/\/dwbfh.com\/resources\/legal-advice\/","s":"301","i":"","p":"96\/Executors.html","c":"exact"},{"u":"https:\/\/dwbfh.com\/resources\/legal-advice\/","s":"301","i":"","p":"94\/Death-Certificates.html","c":"exact"},{"u":"https:\/\/dwbfh.com\/resources\/legal-advice\/","s":"301","i":"","p":"98\/Bank-Accounts.html","c":"exact"},{"u":"https:\/\/dwbfh.com\/resources\/legal-advice\/","s":"301","i":"","p":"93\/Legal-Advice.html","c":"exact"},{"u":"https:\/\/dwbfh.com\/resources\/grief-library\/grief-in-the-workplace\/","s":"301","i":"","p":"167\/Grief-in-the-Workplace.html","c":"exact"},{"u":"https:\/\/dwbfh.com\/resources\/grief-library\/grief-after-suicide\/","s":"301","i":"","p":"166\/Grief-After-Suicide.html","c":"exact"},{"u":"https:\/\/dwbfh.com\/resources\/grief-library\/dealing-with-special-days-and-holidays","s":"301","i":"","p":"164\/Dealing-With-Special-Days-and-Holidays.html","c":"exact"},{"u":"https:\/\/dwbfh.com\/resources\/grief-library\/how-to-help-someone-who-is-grieving\/","s":"301","i":"","p":"163\/How-to-Help-Someone-who-is-Grieving.html","c":"exact"},{"u":"https:\/\/dwbfh.com\/resources\/grief-library\/helping-children-cope-with-grief\/","s":"301","i":"","p":"162\/Helping-Children-Cope-with-Grief.html","c":"exact"},{"u":"https:\/\/dwbfh.com\/resources\/grief-library\/loss-from-a-childs-perspective\/","s":"301","i":"","p":"161\/Loss-from-a-Child-s-Perspective.html","c":"exact"},{"u":"https:\/\/dwbfh.com\/resources\/grief-library\/pet-loss-one-of-the-family\/","s":"301","i":"","p":"160\/The-Loss-of-a-Pet.html","c":"exact"},{"u":"https:\/\/dwbfh.com\/resources\/grief-library\/the-loss-of-a-spouse\/","s":"301","i":"","p":"159\/The-Loss-of-a-Spouse.html","c":"exact"},{"u":"https:\/\/dwbfh.com\/resources\/grief-library\/understanding-bereavement\/","s":"301","i":"","p":"158\/Understanding-Bereavement.html","c":"exact"},{"u":"https:\/\/dwbfh.com\/resources\/grief-library\/10-facts-about-grief-and-grieving\/","s":"301","i":"","p":"157\/10-Facts-about-Grief-and-Grieving.html","c":"exact"},{"u":"https:\/\/dwbfh.com\/resources\/grief-library\/","s":"301","i":"","p":"156\/Grief-resources.html","c":"exact"},{"u":"https:\/\/dwbfh.com\/pre-plan\/","s":"301","i":"","p":"107\/Pre-Planning.html","c":"exact"},{"u":"https:\/\/dwbfh.com\/resources\/frequently-asked-questions\/","s":"301","i":"","p":"90\/FAQ.html","c":"exact"},{"u":"https:\/\/dwbfh.com\/resources\/funeral-etiquette\/","s":"301","i":"","p":"89\/Funeral-Etiquette.html","c":"exact"},{"u":"https:\/\/dwbfh.com\/obituaries\/","s":"301","i":"","p":"tribute\/past-services\/index.html","c":"exact"},{"u":"https:\/\/dwbfh.com\/obituaries\/","s":"301","i":"","p":"tribute\/current-services\/index.html","c":"exact"},{"u":"https:\/\/dwbfh.com\/obituaries\/","s":"301","i":"","p":"tribute\/all-services\/index.html","c":"exact"},{"u":"https:\/\/dwbfh.com\/obituaries\/","s":"301","i":"","p":"91\/Eulogies-and-Obituaries.html","c":"exact"},{"u":"https:\/\/my.gather.app\/gpl\/david-w-barnes-funeral-home","s":"301","i":"","p":"104\/Cremation-Services.html","c":"exact"},{"u":"https:\/\/my.gather.app\/gpl\/david-w-barnes-funeral-home","s":"301","i":"","p":"101\/Burial-Services.html","c":"exact"},{"u":"https:\/\/dwbfh.com\/funeral-planning\/when-death-occurs\/","s":"301","i":"","p":"99\/When-Death-Occurs.html","c":"exact"},{"u":"https:\/\/dwbfh.com\/funeral-planning\/","s":"301","i":"","p":"118\/Funeral-Planning.html","c":"exact"},{"u":"https:\/\/dwbfh.com\/","s":"301","i":"","p":"1\/Home.html","c":"exact"},{"u":"https:\/\/dwbfh.com\/contact\/","s":"301","i":"","p":"111\/Contact-Us.html","c":"exact"},{"u":"https:\/\/dwbfh.com\/contact\/","s":"301","i":"","p":"115\/Map---Directions.html","c":"exact"},{"u":"https:\/\/dwbfh.com\/contact\/","s":"301","i":"","p":"112\/About-Us.html","c":"exact"}];
    function getRedirect(sourcePathOrig) {
      if (sourcePathOrig.startsWith('/')) {
        sourcePathOrig = sourcePathOrig.substring(1);
      }
      if (sourcePathOrig.endsWith('/')) {
        sourcePathOrig = sourcePathOrig.substring(0, sourcePathOrig.length - 1);
      }
      for(redirect of gather_redirects) {
        const targetPath = redirect.i === 'case' ? redirect.p.toLowerCase() : redirect.p;
        const sourcePath = redirect.i === 'case' ? sourcePathOrig.toLowerCase() : sourcePathOrig;
        switch(redirect.c) {
          case 'exact':
            if (sourcePath === targetPath) {
              return redirect;
            }
            break;
          case 'contains':
            if (sourcePath.includes(targetPath)) {
              return redirect;
            }
            break;
          case 'start':
            if (sourcePath.startsWith(targetPath)) {
              return redirect;
            }
            break;
          case 'end':
            if (sourcePath.endsWith(targetPath)) {
              return redirect;
            }
            break;
          case 'regex':
            const reg = new RegExp(redirect.p, redirect.i === 'case' ? 'i' : undefined);
            if (reg.test(sourcePathOrig)) {
              return redirect;
            }
            break;
          default:
              console.warn(`Unknown redirect comparison "${redirect.c}"`);
        }
      }
      return null;
    }
</script>

<script id="not_found_template" type="text/x-jsrender">
<!--Traffic Cone SVG-->
  <div class="ld_container">
    <div class="ld_text_container">
    <svg class="ld_icon" version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
        x="0px" y="0px" width="978px" height="952px" viewBox="0 0 978 952" enable-background="new 0 0 978 952"
        xml:space="preserve">
        <path d="M520.289,1.967c-1.615,4.413-14.747,7.465-31.096,7.465c-16.88,0-30.314-4.884-31.217-8.822l-76.571,214.588h-0.018
  c0.037,17,48.295,30.526,107.535,30.526c59.236,0,107.535-13.084,107.535-29.72v-0.005L520.289,1.967z" />
        <path
            d="M897.207,691.268l-148.072-45.49l34.283,96.421h-0.003c-0.099,46-131.985,82.708-294.66,82.708
  c-162.679,0-294.562-36.708-294.663-82.708h0.055l34.278-96.406L80.652,691.284C-6.557,718.129-27.55,764.646,41.001,795.37
  l282.491,126.619c89.181,39.971,241.994,40.025,331.121,0.096l282.621-126.606C1005.879,764.728,984.701,718.146,897.207,691.268z" />
        <g>
            <path fill="#FFFFFF" d="M596.449,216.188c-0.355,16.547-48.509,29.536-107.526,29.536c-58.484,0-106.26-13.184-107.505-29.877
    L249.672,586.135c-0.006-0.015-0.015-0.028-0.021-0.042l-55.505,156.105h-0.055c0.101,46,131.984,82.708,294.663,82.708
    c162.675,0,294.562-36.708,294.66-82.708h0.003h0.04L596.449,216.188z" />
            <path fill="#FFFFFF"
                d="M457.995,0.666l0.002-0.056l-0.011,0.03C457.988,0.649,457.992,0.658,457.995,0.666z" />
        </g>
        <g>
            <path d="M655.997,381.461c-4.879,11.841-21.986,22.058-50.218,29.847c-31.25,8.622-72.838,13.37-117.103,13.37
    c-44.28,0-85.87-4.857-117.109-13.678c-27.324-7.715-44.232-17.743-49.711-29.335l-69.411,194.533h-0.043
    c0.08,35,106.409,66.121,236.528,66.121c130.117,0,236.528-29.668,236.528-66.207v-0.012L655.997,381.461z" />
        </g>
    </svg>
    <!--End Traffic Cone SVG-->

    <!--Obituary Not Found text-->
    <h2>
      {{>title}}
    </h2>
    <h4>
      {{>message}}
    </h4>
    <p>
      {{>action}}
    </p>
    <!--End Obituary Not Found text-->
  </div>
  </div>
</script>

<script id="loading_template" type="text/x-jsrender">
<div class="ld_container">
  <div class="ld_text_container">
  <!--Arrow SVG-->
  <svg class="ld_icon" version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px"
      y="0px" width="374.846px" height="374.846px" viewBox="0 0 374.846 374.846"
      style="enable-background:new 0 0 374.846 374.846;" xml:space="preserve">
      <g>
          <g>
              <g>
                  <path d="M326.147,267.326c4.168-6.754,12.875-9.094,19.869-5.336l5.83,3.135c3.635,1.955,6.305,5.32,7.379,9.305
              c1.076,3.984,0.461,8.236-1.695,11.754c-8.301,13.519-18.295,25.941-29.709,36.923c-2.805,2.692-6.531,4.188-10.397,4.188
              c-0.242,0-0.482-0.006-0.726-0.018c-4.123-0.199-7.981-2.09-10.668-5.227l-4.309-5.025c-5.164-6.025-4.74-15.031,0.967-20.547
              C311.678,287.793,319.573,277.984,326.147,267.326z" />
                  <path d="M208.809,338.262c12.505-0.903,24.873-3.344,36.77-7.252c7.529-2.475,15.685,1.334,18.617,8.695l2.451,6.153
              c1.529,3.839,1.408,8.138-0.334,11.884c-1.74,3.746-4.953,6.604-8.873,7.907c-8.094,2.687-16.451,4.843-24.848,6.407
              c-7.112,1.328-14.377,2.254-21.592,2.754c-0.349,0.023-0.693,0.035-1.037,0.035c-3.759,0-7.396-1.412-10.175-3.979
              c-3.034-2.802-4.78-6.73-4.823-10.859l-0.071-6.625C194.809,345.459,200.906,338.834,208.809,338.262z" />
                  <path d="M89.693,312.596c5.039-6.135,13.984-7.276,20.404-2.612c10.135,7.36,21.16,13.435,32.773,18.053
              c7.373,2.933,11.188,11.101,8.701,18.636l-2.072,6.287c-1.293,3.92-4.145,7.135-7.883,8.887
              c-2.012,0.941-4.186,1.416-6.361,1.416c-1.867,0-3.738-0.35-5.512-1.049c-14.73-5.818-28.695-13.51-41.508-22.863
              c-3.332-2.434-5.516-6.133-6.037-10.227c-0.52-4.097,0.672-8.224,3.291-11.41L89.693,312.596z" />
                  <path d="M28.699,214.609l6.508-1.216c7.82-1.454,15.414,3.438,17.314,11.156c3.029,12.289,7.592,24.129,13.561,35.191
              c3.766,6.979,1.449,15.686-5.289,19.867l-5.625,3.491c-2.398,1.487-5.141,2.257-7.912,2.257c-1.285,0-2.576-0.164-3.842-0.5
              c-3.992-1.061-7.371-3.716-9.342-7.348c-7.602-14.012-13.387-29.016-17.193-44.598c-0.979-4.005-0.266-8.234,1.971-11.697
              C21.087,217.753,24.648,215.365,28.699,214.609z" />
                  <path d="M36.849,170.858h-6.727c-0.006,0-0.014,0-0.02,0c-8.287,0-15-6.715-15-15c0-1.219,0.143-2.404,0.418-3.539
              c5.584-29.84,18.643-58.24,37.801-82.188C82.325,33.873,123.52,9.826,169.319,2.416C179.227,0.814,189.325,0,199.333,0
              c25.752,0,51.313,5.385,74.813,15.67l11.687-11.688c2.413-2.412,5.909-3.389,9.225-2.574c3.313,0.812,5.961,3.299,6.981,6.555
              l24.191,77.16c1.086,3.465,0.158,7.248-2.41,9.816c-2.567,2.568-6.35,3.496-9.815,2.41l-77.16-24.191
              c-3.256-1.02-5.739-3.668-6.556-6.982c-0.813-3.312,0.162-6.811,2.576-9.223l13.013-13.014
              c-15.021-4.963-30.656-7.473-46.685-7.473c-45.797,0-88.547,20.604-117.287,56.531c-15.309,19.135-25.793,41.84-30.322,65.662
              C50.24,165.737,44.052,170.858,36.849,170.858z" />
              </g>
          </g>
  </svg>
  <!--End Arrow SVG-->

  <!--Loading text-->
  <div class="ld_text">
      Loading...
  </div>
  <!--End Loading text-->
  </div>
</div>
</script>

<script id="obit_template" type="text/x-jsrender">
<!-- Section top -->
<div class="full-width">
    <div class="fflex fflex-just-bet fflex-align-center top-header">
        <div class="top-left-link" id="top-left-logo">
          <a href="{{>origin}}">
            {{if logo}}<span class="logo-container"><img src="{{>logo}}" /></span>{{/if}}
          </a>
        </div>
        <div class="top-right-link"><a href="">
          <span class="material-icons">arrow_forward</span>
        </a></div>
    </div>
</div>

<!------ Section Middle ------>

<section class="center-content">

<!-- Center Content  -->
<div class="full-width">
<div class="info-block" id="themed-bg">
    <div class="content-bio">

    {{if has_stream}}
    <div class="top-live">
      <div class="obit-tooltip">
        <a href="">
          <span class="material-icons livestream-icon">live_tv</span>
        </a>
        <span id="livestream-tooltip-text" class="tooltiptext">
          {{>fname}}'s services will be LiveStreamed &amp; Recorded by {{>fh_name}}
        </span>
      </div> <!-- obit-tooltip -->
    </div> <!-- top-live -->
    {{/if}}

       <div class="av-img">
           <a href="">
              <button class="ga-avtar" tabindex="0"
                {{if !photo}}style="background: {{>theme.secondary_color || 'var(--gray-color)'}}"{{/if}}
              >
                  {{if photo}}
                    <img src="{{>photo}}" class="MuiAvatar-img-57086" alt="{{>display_name}}">
                  {{else}}
                    <span>{{>initials}}</span>
                  {{/if}}
              </button>
           </a>
       </div>
       <div class="av-below">
          <h1 class="text-center">{{>display_name}}</h1>
          <div class="theme-slogon-img"><img id="top-accent-image" src="{{>theme.top_accent_image_reversed}}"></div>

          <div class="jouney-date">
              <p id="birth-date">{{>birthDate}}
                {{if birthPlace}}<span>{{>birthPlace}}</span>{{/if}}
              </p>
              {{if birthDate}}<span class="bet-date">—</span>{{/if}}
              <p id="death-date">{{>deathDate}}
                {{if deathPlace}}<span>{{>deathPlace}}</span>{{/if}}
              </p>
          </div>

          <div class="obit-history">
             <p id="obit-text" class="content-des">{{>obituary_text}}</p>
             <div class="fade-shadow"></div>
          </div>
            <p class="link-more-bio">
              <a href="">
                <span class="material-icons">keyboard_arrow_down</span>
                <span>Read More on {{>fname}}'s Memorial Page </span>
                <span class="material-icons">keyboard_arrow_down</span></a></p>
      </div>

      <div class="fflex fflex-just-center">
        {{if fname}}
        <div class="make-btn-center" id="view-memorial-page-button">
          <a href="" class="theme-btn mr-auto av-btn {{if theme.secondary_color}}mystyle{{/if}}" id="secbtn">
            View {{>fname}}'s Memorial Page
          </a>
        </div>
        {{/if}}
      </div>
    </div>
</div>

</div>

<ul class="appoint-section">
    <div id="gather-events" class="appoint-section-inside"> </div>
</ul>


</section>

  <!-- Flowers Area-->
  <div class="full-width sec-flower">
    <div class="fflex fflex-just-bet flowers" id="theme-gradient">
        <div class="flower-left"><img src="{{>theme.bottom_left_graphic}}" /></div>
        <div class="footer-center-logo">
            <a href="{{>origin}}" id="fh-logo-url"><img id="fh-logo" src="{{>logo}}" /> </a>
            <p class="f-loactions">{{>fh_city}}{{if fh_city}}, {{/if}}{{>fh_state}}</p>
            <p class="view-deatils">
              <a href="">
                <span>View {{>fname}}'s Memorial Page</span>
                </a>
                <span class="material-icons">arrow_forward </span></p>
        </div>
          <div class="flower-right"><img src="{{>theme.bottom_right_graphic}}" /></div>
          <div class="mobile-flower"><img src="{{>theme.bottom_mobile_graphic}}" /></div>
    </div>

    <div class="Remember-footer">
      <div><a href="https://www.gather.app" target="_blank">
      <img src="https://my.gather.app/images/Logo_poweredBy.png"></a></div>
      <div class="gather-innovations-text">
        <a href="https://www.gather.app" target="_blank"><p>©&nbsp;2021 Gather Innovations</p></a>
      </div>
    </div>

  </div>
</script>

<script id="event_template" type="text/x-jsrender">
    <li>
        <button class="sch-btn ripp-effect action01">
            <p class="sch-btn-left">{{:startDay}}<span class="">{{:startDate}}</span></p>
            <div class="sch-btn-right">
                <span class="ev-title">{{:name}}</span>
                <div class="fflex fflex-just-center fflex-align-center evnt-det">
                    <p class="m-0">
                      <span class="evnt-time">{{:startTime}}<span>{{:startPeriod}}</span></span></p>
                    {{if is_streamable}}
                      <p class="vid-icon m-0">
                        <span class="material-icons f24">live_tv</span>
                        <br /> <span>Live Stream</span>
                      </p>
                    {{/if}}
                </div>

            </div>
        </button>

        <div class="pop-evnt-info dialog-box01">
            <div class="pop-top">
                {{if !isEnded}}
                  <h3><span class="material-icons">schedule</span>
                    {{if !isStarted}}Begins {{:startFromNow}}
                    {{else}}In Progress
                    {{/if}}
                  </h3>
                {{/if}}

                <p class="mtb-10"><span class="g-date">{{:startDateFull}}</span>
                   <span class="g-time">{{:timeFrame}}</span>
                </p>
                {{if is_streamable}}
                <p class="wstream">
                  <a href=""><span class="material-icons">live_tv</span> Watch LiveStream</a></p>
                {{/if}}
            </div>
             <div class="pop-middle">
                 <span class="material-icons">location_on</span>
                  <p>
                    {{if location && location.name
                        && (
                          !location.address || !location.address.address1
                          || !location.address.address1.startsWith(location.name))}}
                      {{>location.name}}
                    {{/if}}
                    {{if location && location.address.address1}}
                      {{>location.address.address1}}
                      {{>location.address.address2}}
                      {{>location.address.city}}, {{>location.address.state}}
                    {{/if}}
                  </p>
             </div>
             <div class="pop-midd-below">

              <a href="/remember/{{>caseName}}/store" id="flowers">
                 SEND FLOWERS
                 <span class="material-icons">local_florist</span>
              </a>


              {{if location
                && location.address.long_address
                && location.address.long_address.coords}}
                              <a href="https://www.google.com/maps/search/?api=1&query={{url:location.address.long_address.coords[0]}},{{url:location.address.long_address.coords[1]}}"
                target="_blank">
                     VIEW ON MAP
                     <span class="material-icons">location_on</span>
              </a>
              {{else location
                && location.address.long_address
                && location.address.long_address.description}}
                              <a href="https://www.google.com/maps/search/?api=1&query={{url:location.address.long_address.description}}"
                target="_blank">
                     VIEW ON MAP
                     <span class="material-icons">location_on</span>
              </a>
              {{else location
                && location.address.address1
                && location.address.city
                && location.address.state}}
                              <a href="https://www.google.com/maps/search/?api=1&query={{url:location.address.address1}},{{url:location.address.city}},{{url:location.address.state}}"
                target="_blank">
                     VIEW ON MAP
                     <span class="material-icons">location_on</span>
              </a>
              {{/if}}

            </div>

             <div>
                 <a href="" class="border-btn"> VIEW EVENT DETAILS</a>
             </div>
        </div>


    </li>
</script>

<script>
    function renderObit(obit) {
        let templateName = obit.templateName ? obit.templateName : '#obit_template';
        const obitTemplate = $.templates(templateName);
        const bodyHtml = obitTemplate.render(obit);
        $('#body-wraper').html(bodyHtml);
    }

    (function($) {
      renderObit({ templateName: '#loading_template' });
      $('#body-wraper').gatherLite({
          environment: "prod",
          funeralHome: "aa730011-7365-4d67-811c-42a816aa852b",
      }, "^obituaries\/([^\/]+)\/?\n^tribute\/details\/([^\/]+)\/?", (obit, events, ctl) => {
        // If this obit is hosted on a legacy URL, redirect it
        const obitsPage = "\/obituaries\/";
        if (obit.host_remember && !location.pathname.startsWith(obitsPage)) {
          meta_redirect(`${location.origin}${obitsPage}${obit.name}`, 0);
          return;
        }

        obit.themeColor = obit.theme && obit.theme.primary_color || obit.fh_color;
        obit.origin = window.location.origin;
        obit.initials = generateNameInitials(obit.display_name);
        obit.birthPlace = (obit.birth_city ? obit.birth_city : '')
          + (obit.birth_city && obit.birth_state ? ', ' : '')
          + (obit.birth_state ? obit.birth_state : '');
        obit.deathPlace = (obit.death_city ? obit.death_city : '')
          + (obit.death_city && obit.death_state ? ', ' : '')
          + (obit.death_state ? obit.death_state : '');
        obit.birthDate = getYearFromDateStr(obit.dob_date);
        obit.deathDate = getYearFromDateStr(obit.dod_start_date);

        obit.templateName = '#obit_template';
        renderObit(obit);
        // Set the base of all links to the appropriate remember page
        $('body base').attr('href', obit.appDomain + '/remember/' + obit.name);

        const metaPhoto = obit.mobile_cover || obit.photo || obit.logo;
        $('#meta-og-image').attr('content', metaPhoto);

        // Size dependent formatting
        const obittext = document.querySelector('.content-des') ;
        if (obittext && obittext.scrollHeight > 70) {
          document.querySelector(".fade-shadow").style.display="block";
          document.querySelector(".link-more-bio").style.display="block";
        }

        document.title = `${obit.display_name} Obituary`;

        if (obit.theme) {
          const theme = obit.theme;
          if(theme.secondary_color) {
            document.documentElement.style.setProperty('--secondary-color', theme.secondary_color);
          }
          if (theme.primary_color) {
            document.documentElement.style.setProperty('--primary-color', theme.primary_color);
          } else {
            document.documentElement.style.setProperty('--primary-color', obit.fh_color);
          }
        } else if(obit.fh_color) {
          document.documentElement.style.setProperty('--primary-color', obit.fh_color);
          // '33' at the end will set the opacity of color to be 20%
          $('div#theme-gradient').css({
            background: `linear-gradient(
                180deg,
                rgba(255, 255, 255, 0) 40%,
                ${theme.primary_color || obit.fh_color}33 100%)`
          });
        }
        document.documentElement.style.setProperty('--theme-color', obit.themeColor);
        const primaryColor = obit.theme && obit.theme.primary_color || obit.fh_color;
        document.documentElement.style.setProperty('--primary-color-opacity', `${primaryColor}00`);

        var tmpl = $.templates('#event_template');
        const now = new Date();
        try {
          var html = tmpl.render(events.map(e => {
            const startTime = moment(e.start_time);
            const endTime = moment(e.end_time);
            return $.extend({}, e, {
              caseName: obit.name,
              startDate: startTime.format('D'),
              startDay: startTime.format('dddd'),
              startTime: startTime.format('h:mm'),
              startPeriod: startTime.format('a'),
              startFromNow: startTime.fromNow(),
              startDateFull: startTime.format('dddd, D MMM YYYY'),
              timeFrame: startTime.format('h:mm') + ' - ' + endTime.format('h:mma zz'),
              isStarted: startTime.diff(now, 'minutes') <= 0,
              isEnded: endTime.diff(now, 'minutes') <= 0,
            });
          }));
        } catch (ex) {
          console.log('Unable to display events: ', ex);
        }
        $('#gather-events').html(html);

        /** Open Send Flowers Button to store page **/
        const closeAllPoppers = () => {
          const popperElements = $('.pop-evnt-info.dialog-box01');
          popperElements.css({ display: 'none' });
        }

        $(this).click(evt => {
          const clickedTarget = evt.target ? evt.target.offsetParent : null;

          if(clickedTarget){
            const clickedOnPopper = clickedTarget.className === 'pop-evnt-info dialog-box01';

            if(!clickedOnPopper) {
              closeAllPoppers();
            }
          }
        });

        $('.sch-btn').click( evt => {
          evt.stopPropagation();
          const closest = $(evt.target).closest('.sch-btn');
          const rect = closest[0] ? closest[0].getBoundingClientRect() : null;
          const closestPopper = closest.siblings('.pop-evnt-info');

          closeAllPoppers();

          if(rect) {
            const popperWidth = $('.pop-evnt-info.dialog-box01').width();
            const windowWidth = window.innerWidth;
            const rectLeft = rect.left;
            const left = rectLeft + popperWidth > windowWidth
                || rectLeft < 0
              ? 0
              : rectLeft;
            closestPopper.css({ left });
          }

          closestPopper.toggle();
        });

      }, (msg, code) => {


        let redirectPath = window.location.origin;
        if (code === 4404) {
          const redirect = getRedirect(window.location.pathname);
          if (redirect && redirect.u) {
            meta_redirect(redirect.u, redirect.s === '301' ? 0 : 2);
          } else {
            renderObit({
              templateName: '#not_found_template',
              title: 'Whoops...Error 404',
              message: 'We are sorry, but the page you are looking for does not exist.',
              action: 'We are redirecting you now...',
            });
            meta_noIndex();
            meta_redirect(redirectPath, 2);
          }
        } else if (code === 404) {
          renderObit({
            templateName: '#not_found_template',
            title: 'Whoops...Obituary Not Found',
            message: 'We are sorry, but the obituary you are looking for could not be found.',
            action: 'We are redirecting you now...',
          });
          meta_noIndex();
          meta_redirect(redirectPath, 2);
        } else {
          console.log(`Got error '${msg}' with code ${code}`);
        }
      });
  })(jQuery);
</script>

<script>
/** Adding Fixed Header **/
$(window).scroll(function(){
  var sticky = $('.top-header'),
      scroll = $(window).scrollTop();

  if (scroll >= 100) sticky.addClass('fixed');
  else sticky.removeClass('fixed');
});

$(".ripp-effect").click(function (e) {
  $(".ripple").remove();
  var posX = $(this).offset().left,
      posY = $(this).offset().top,
      buttonWidth = $(this).width(),
      buttonHeight =  $(this).height();

  $(this).prepend("<span class='ripple'></span>");

  if (buttonWidth >= buttonHeight) {
    buttonHeight = buttonWidth;
  } else {
    buttonWidth = buttonHeight;
  }

  var x = e.pageX - posX - buttonWidth / 2;
  var y = e.pageY - posY - buttonHeight / 2;

  $(".ripple").css({
    width: buttonWidth,
    height: buttonHeight,
    top: y + 'px',
    left: x + 'px'
  }).addClass("rippleEffect");
});

</script>
</html>

