(function($) { "use strict"; if ($(".listing-details__contact-info-phone").length) { $(".listing-details__contact-info-phone").on("click", function(e) { e.preventDefault(); var textElement = $(this).find(".text h5"); var mainText = textElement.data("number"); var toggleText = textElement.data("toggle-number"); if (textElement.text() == mainText) { textElement.text(toggleText); } else { textElement.text(mainText); } }); } if ($(".listing-top__map-show-hide").length) { $(".listing-top__map-show-hide").on("click", function() { $(this).toggleClass("hidden"); var textElement = $(this).find(".listing-top__map-show-hide-text span"); if (textElement.text() == textElement.data("text")) { textElement.text(textElement.data("toggle-text")); } else { textElement.text(textElement.data("text")); } $(".listing__map").toggleClass("hidden"); $(".listing__content").toggleClass("hidden"); }); } if ($("#datepicker").length) { $("#datepicker").datepicker(); } if ($("#datepicker2").length) { $("#datepicker2").datepicker(); } if ($("#datepicker-inline").length) { $("#datepicker-inline").datepicker(); } $('input[name="time"]').ptTimeSelect(); if ($(".banner-bg-slide").length) { $(".banner-bg-slide").each(function() { var Self = $(this); var bgSlideOptions = Self.data("options"); var bannerTwoSlides = Self.vegas(bgSlideOptions); }); } //Pricing Tabs if ($(".pricing-tabs").length) { $(".pricing-tabs .tab-btns .tab-btn").on("click", function(e) { e.preventDefault(); var target = $($(this).attr("data-tab")); if ($(target).hasClass("actve-tab")) { return false; } else { $(".pricing-tabs .tab-btns .tab-btn").removeClass("active-btn"); $(this).addClass("active-btn"); $(".pricing-tabs .pr-content .pr-tab").removeClass("active-tab"); $(target).addClass("active-tab"); } }); } // Type Effect if ($(".typed-effect").length) { $(".typed-effect").each(function() { var typedStrings = $(this).data("strings"); var typedTag = $(this).attr("id"); var typed = new Typed("#" + typedTag, { typeSpeed: 100, backSpeed: 100, fadeOut: true, loop: true, strings: typedStrings.split(",") }); }); } // Popular Causes Progress Bar if ($(".count-bar").length) { $(".count-bar").appear( function() { var el = $(this); var percent = el.data("percent"); $(el).css("width", percent).addClass("counted"); }, { accY: -50 } ); } //Progress Bar / Levels if ($(".progress-levels .progress-box .bar-fill").length) { $(".progress-box .bar-fill").each( function() { $(".progress-box .bar-fill").appear(function() { var progressWidth = $(this).attr("data-percent"); $(this).css("width", progressWidth + "%"); }); }, { accY: 0 } ); } //Fact Counter + Text Count if ($(".count-box").length) { $(".count-box").appear( function() { var $t = $(this), n = $t.find(".count-text").attr("data-stop"), r = parseInt($t.find(".count-text").attr("data-speed"), 10); if (!$t.hasClass("counted")) { $t.addClass("counted"); $({ countNum: $t.find(".count-text").text() }).animate({ countNum: n }, { duration: r, easing: "linear", step: function() { $t.find(".count-text").text(Math.floor(this.countNum)); }, complete: function() { $t.find(".count-text").text(this.countNum); } }); } }, { accY: 0 } ); } // accordion if ($(".accordion-grp").length) { var accordionGrp = $(".accordion-grp"); accordionGrp.each(function() { var accordionName = $(this).data("grp-name"); var Self = $(this); var accordion = Self.find(".accordion"); Self.addClass(accordionName); Self.find(".accordion .accordion-content").hide(); Self.find(".accordion.active").find(".accordion-content").show(); accordion.each(function() { $(this) .find(".accordion-title") .on("click", function() { if ($(this).parent().hasClass("active") === false) { $(".accordion-grp." + accordionName) .find(".accordion") .removeClass("active"); $(".accordion-grp." + accordionName) .find(".accordion") .find(".accordion-content") .slideUp(); $(this).parent().addClass("active"); $(this).parent().find(".accordion-content").slideDown(); } }); }); }); } // Causes One Carousel if ($(".causes-one__carousel").length) { $(".causes-one__carousel").owlCarousel({ loop: true, margin: 30, nav: true, smartSpeed: 500, autoHeight: false, autoplay: false, dots: false, autoplayTimeout: 10000, navText: [ '', '' ], responsive: { 0: { items: 1 }, 600: { items: 1 }, 800: { items: 2 }, 1024: { items: 3 }, 1200: { items: 3 } } }); } // Testimonial Two Carousel if ($(".testimonial-two__carousel").length) { $(".testimonial-two__carousel").owlCarousel({ loop: true, margin: 30, nav: true, smartSpeed: 500, autoHeight: false, autoplay: false, dots: false, autoplayTimeout: 10000, navText: [ '', '' ], responsive: { 0: { items: 1 }, 600: { items: 1 }, 800: { items: 2 }, 1024: { items: 2 }, 1200: { items: 2 } } }); } // Causes One Carousel if ($(".featured-campaigns__carousel").length) { $(".featured-campaigns__carousel").owlCarousel({ loop: true, margin: 30, nav: true, smartSpeed: 500, autoHeight: false, autoplay: false, dots: false, autoplayTimeout: 10000, navText: [ '', '' ], responsive: { 0: { items: 1 }, 600: { items: 1 }, 800: { items: 1 }, 1024: { items: 1 }, 1200: { items: 1 } } }); } if ($(".scroll-to-target").length) { $(".scroll-to-target").on("click", function() { var target = $(this).attr("data-target"); // animate $("html, body").animate({ scrollTop: $(target).offset().top }, 1000 ); return false; }); } if ($(".contact-form-validated").length) { $(".contact-form-validated").validate({ // initialize the plugin rules: { name: { required: true }, email: { required: true, email: true }, message: { required: true }, subject: { required: true } }, submitHandler: function(form) { // sending value with ajax request $.post( $(form).attr("action"), $(form).serialize(), function(response) { $(form).parent().find(".result").append(response); $(form).find('input[type="text"]').val(""); $(form).find('input[type="email"]').val(""); $(form).find("textarea").val(""); } ); return false; } }); } // mailchimp form if ($(".mc-form").length) { $(".mc-form").each(function() { var Self = $(this); var mcURL = Self.data("url"); var mcResp = Self.parent().find(".mc-form__response"); Self.ajaxChimp({ url: mcURL, callback: function(resp) { // appending response mcResp.append(function() { return '
"; }); // making things based on response if (resp.result === "success") { // Do stuff Self.removeClass("errored").addClass("successed"); mcResp.removeClass("errored").addClass("successed"); Self.find("input").val(""); mcResp.find("p").fadeOut(10000); } if (resp.result === "error") { Self.removeClass("successed").addClass("errored"); mcResp.removeClass("successed").addClass("errored"); Self.find("input").val(""); mcResp.find("p").fadeOut(10000); } } }); }); } if ($(".video-popup").length) { $(".video-popup").magnificPopup({ type: "iframe", mainClass: "mfp-fade", removalDelay: 160, preloader: true, fixedContentPos: false }); } if ($(".img-popup").length) { var groups = {}; $(".img-popup").each(function() { var id = parseInt($(this).attr("data-group"), 10); if (!groups[id]) { groups[id] = []; } groups[id].push(this); }); $.each(groups, function() { $(this).magnificPopup({ type: "image", closeOnContentClick: true, closeBtnInside: false, gallery: { enabled: true } }); }); } function dynamicCurrentMenuClass(selector) { let FileName = window.location.href.split("/").reverse()[0]; selector.find("li").each(function() { let anchor = $(this).find("a"); if ($(anchor).attr("href") == FileName) { $(this).addClass("current"); } }); // if any li has .current elmnt add class selector.children("li").each(function() { if ($(this).find(".current").length) { $(this).addClass("current"); } }); // if no file name return if ("" == FileName) { selector.find("li").eq(0).addClass("current"); } } if ($(".main-menu__list").length) { // dynamic current class let mainNavUL = $(".main-menu__list"); dynamicCurrentMenuClass(mainNavUL); } if ($(".service-details__sidebar-service-list").length) { // dynamic current class let mainNavUL = $(".service-details__sidebar-service-list"); dynamicCurrentMenuClass(mainNavUL); } if ($(".main-menu__list").length && $(".mobile-nav__container").length) { let navContent = document.querySelector(".main-menu__list").outerHTML; let mobileNavContainer = document.querySelector(".mobile-nav__container"); mobileNavContainer.innerHTML = navContent; } if ($(".sticky-header__content").length) { let navContent = document.querySelector(".main-menu").innerHTML; let mobileNavContainer = document.querySelector(".sticky-header__content"); mobileNavContainer.innerHTML = navContent; } if ($(".mobile-nav__container .main-menu__list").length) { let dropdownAnchor = $( ".mobile-nav__container .main-menu__list .dropdown > a" ); dropdownAnchor.each(function() { let self = $(this); let toggleBtn = document.createElement("BUTTON"); toggleBtn.setAttribute("aria-label", "dropdown toggler"); toggleBtn.innerHTML = ""; self.append(function() { return toggleBtn; }); self.find("button").on("click", function(e) { e.preventDefault(); let self = $(this); self.toggleClass("expanded"); self.parent().toggleClass("expanded"); self.parent().parent().children("ul").slideToggle(); }); }); } if ($(".mobile-nav__toggler").length) { $(".mobile-nav__toggler").on("click", function(e) { e.preventDefault(); $(".mobile-nav__wrapper").toggleClass("expanded"); $("body").toggleClass("locked"); }); } if ($(".search-toggler").length) { $(".search-toggler").on("click", function(e) { e.preventDefault(); $(".search-popup").toggleClass("active"); $(".mobile-nav__wrapper").removeClass("expanded"); $("body").toggleClass("locked"); }); } if ($(".odometer").length) { var odo = $(".odometer"); odo.each(function() { $(this).appear(function() { var countNumber = $(this).attr("data-count"); $(this).html(countNumber); }); }); } if ($(".dynamic-year").length) { let date = new Date(); $(".dynamic-year").html(date.getFullYear()); } if ($(".wow").length) { var wow = new WOW({ boxClass: "wow", // animated element css class (default is wow) animateClass: "animated", // animation css class (default is animated) mobile: true, // trigger animations on mobile devices (default is true) live: true // act on asynchronously loaded content (default is true) }); wow.init(); } if ($("#donate-amount__predefined").length) { let donateInput = $("#donate-amount"); $("#donate-amount__predefined") .find("li") .on("click", function(e) { e.preventDefault(); let amount = $(this).find("a").text(); donateInput.val(amount); $("#donate-amount__predefined").find("li").removeClass("active"); $(this).addClass("active"); }); } if ($(".thm-accordion").length) { let accordionWrapper = $(".thm-accordion"); accordionWrapper.each(function() { let $this = $(this); let accordionID = $this.attr("id"); let accordionTitle = $this.find(".thm-accordion__title"); $this.addClass(accordionID); // default hide let mainAccordionContent = $this.find(".thm-accordion__content").hide(); $this.find(".active-item .thm-accordion__content").show(); // on title click accordionTitle.on("click", function(e) { e.preventDefault(); let $this = $(this); let accordionItem = $(this).parent(); if (false === accordionItem.hasClass("active-item")) { $("#" + accordionID) .find(".thm-accordion__item") .removeClass("active-item"); accordionItem.addClass("active-item"); mainAccordionContent.slideUp(); accordionItem.find(".thm-accordion__content").slideDown(); } }); }); } $(".add").on("click", function() { if ($(this).prev().val() < 999) { $(this) .prev() .val(+$(this).prev().val() + 1); } }); $(".sub").on("click", function() { if ($(this).next().val() > 1) { if ($(this).next().val() > 1) $(this) .next() .val(+$(this).next().val() - 1); } }); if ($(".tabs-box").length) { $(".tabs-box .tab-buttons .tab-btn").on("click", function(e) { e.preventDefault(); var target = $($(this).attr("data-tab")); if ($(target).is(":visible")) { return false; } else { target .parents(".tabs-box") .find(".tab-buttons") .find(".tab-btn") .removeClass("active-btn"); $(this).addClass("active-btn"); target .parents(".tabs-box") .find(".tabs-content") .find(".tab") .fadeOut(0); target .parents(".tabs-box") .find(".tabs-content") .find(".tab") .removeClass("active-tab"); $(target).fadeIn(300); $(target).addClass("active-tab"); } }); } if ($(".range-slider-price").length) { var priceRange = document.getElementById("range-slider-price"); noUiSlider.create(priceRange, { start: [30, 150], limit: 200, behaviour: "drag", connect: true, range: { min: 10, max: 200 } }); var limitFieldMin = document.getElementById("min-value-rangeslider"); var limitFieldMax = document.getElementById("max-value-rangeslider"); priceRange.noUiSlider.on("update", function(values, handle) { (handle ? $(limitFieldMax) : $(limitFieldMin)).text(values[handle]); }); } function thmSwiperInit() { // swiper slider const swiperElm = document.querySelectorAll(".thm-swiper__slider"); swiperElm.forEach(function(swiperelm) { const swiperOptions = JSON.parse(swiperelm.dataset.swiperOptions); let thmSwiperSlider = new Swiper(swiperelm, swiperOptions); }); } function thmOwlInit() { // swiper slider const owlElm = document.querySelectorAll(".thm-owl__carousel"); owlElm.forEach(function(owlelm) { const owlOptions = JSON.parse(owlelm.dataset.owlOptions); let thmOwlCarousel = $(owlelm).owlCarousel(owlOptions); }); const owlCustomNavElm = document.querySelectorAll(".thm-owl__carousel--custom-nav"); owlCustomNavElm.forEach(function(owlelm) { const owlNavPrev = owlelm.dataset.owlNavPrev; const owlNavNext = owlelm.dataset.owlNavNext; const owl = $(owlelm); $(owlNavPrev).on("click", function(e) { owl.trigger('prev.owl.carousel'); e.preventDefault(); }) $(owlNavNext).on("click", function(e) { owl.trigger('next.owl.carousel'); e.preventDefault(); }) }); } if ($("#testimonials-one__thumb").length) { let testimonialsThumb = new Swiper("#testimonials-one__thumb", { slidesPerView: 3, spaceBetween: 10, speed: 1400, watchSlidesVisibility: true, watchSlidesProgress: true, loop: true, autoplay: { delay: 5000 } }); let testimonialsCarousel = new Swiper("#testimonials-one__carousel", { observer: true, observeParents: true, speed: 1400, slidesPerView: 1, autoplay: { delay: 5000 }, thumbs: { swiper: testimonialsThumb }, pagination: { el: '#testimonials-one__carousel-pagination', type: 'bullets', clickable: true }, }); } // ===Portfolio=== function projectMasonaryLayout() { if ($(".masonary-layout").length) { $(".masonary-layout").isotope({ layoutMode: "masonry" }); } if ($(".post-filter").length) { $(".post-filter li") .children(".filter-text") .on("click", function() { var Self = $(this); var selector = Self.parent().attr("data-filter"); $(".post-filter li").removeClass("active"); Self.parent().addClass("active"); $(".filter-layout").isotope({ filter: selector, animationOptions: { duration: 500, easing: "linear", queue: false } }); return false; }); } if ($(".post-filter.has-dynamic-filters-counter").length) { // var allItem = $('.single-filter-item').length; var activeFilterItem = $(".post-filter.has-dynamic-filters-counter").find( "li" ); activeFilterItem.each(function() { var filterElement = $(this).data("filter"); var count = $(".filter-layout").find(filterElement).length; $(this) .children(".filter-text") .append('(' + count + ")"); }); } } if ($(".circle-progress").length) { $(".circle-progress").appear(function() { let circleProgress = $(".circle-progress"); circleProgress.each(function() { let progress = $(this); let progressOptions = progress.data("options"); progress.circleProgress(progressOptions); }); }); } function SmoothMenuScroll() { var anchor = $(".scrollToLink"); if (anchor.length) { anchor.children("a").bind("click", function(event) { var target = $(this); var headerH = undefined === target.parent().data("scroll-offset") ? "90" : target.parent().data("scroll-offset"); $("html, body") .stop() .animate({ scrollTop: $(target.attr("href")).offset().top - headerH + "px" }, 1200, "easeInOutExpo" ); anchor.removeClass("current"); target.parent().addClass("current"); if ($(window).width() <= 1199) { $(".mobile-nav__wrapper").toggleClass("expanded"); $("body").toggleClass("locked"); } event.preventDefault(); }); } } SmoothMenuScroll(); function OnePageMenuScroll() { var windscroll = $(window).scrollTop(); if (windscroll >= 90) { var menuAnchor = $(".one-page-scroll-menu .scrollToLink").children("a"); menuAnchor.each(function() { // grabing section id dynamically var sections = $(this).attr("href"); $(sections).each(function() { // checking is scroll bar are in section if ($(this).offset().top <= windscroll + 106) { // grabing the dynamic id of section var Sectionid = $(sections).attr("id"); // removing current class from others $(".one-page-scroll-menu").find("li").removeClass("current"); // adding current class to related navigation $(".one-page-scroll-menu") .find("a[href*=\\#" + Sectionid + "]") .parent() .addClass("current"); } }); }); } else { $(".one-page-scroll-menu li.current").removeClass("current"); $(".one-page-scroll-menu li:first").addClass("current"); } } // window load event $(window).on("load", function() { if ($(".preloader").length) { $(".preloader").fadeOut(); } thmSwiperInit(); thmOwlInit(); projectMasonaryLayout(); if ($(".post-filter").length) { var postFilterList = $(".post-filter li"); // for first init $(".filter-layout").isotope({ filter: ".filter-item", animationOptions: { duration: 500, easing: "linear", queue: false } }); // on click filter links postFilterList.on("click", function() { var Self = $(this); var selector = Self.attr("data-filter"); postFilterList.removeClass("active"); Self.addClass("active"); $(".filter-layout").isotope({ filter: selector, animationOptions: { duration: 500, easing: "linear", queue: false } }); return false; }); } if ($(".post-filter.has-dynamic-filter-counter").length) { // var allItem = $('.single-filter-item').length; var activeFilterItem = $(".post-filter.has-dynamic-filter-counter").find( "li" ); activeFilterItem.each(function() { var filterElement = $(this).data("filter"); var count = $(".filter-layout").find(filterElement).length; $(this).append("[" + count + "]"); }); } }); // window scroll event $(window).on("scroll", function() { if ($(".stricked-menu").length) { var headerScrollPos = 130; var stricky = $(".stricked-menu"); if ($(window).scrollTop() > headerScrollPos) { stricky.addClass("stricky-fixed"); } else if ($(this).scrollTop() <= headerScrollPos) { stricky.removeClass("stricky-fixed"); } } if ($(".scroll-to-top").length) { var strickyScrollPos = 100; if ($(window).scrollTop() > strickyScrollPos) { $(".scroll-to-top").fadeIn(500); } else if ($(this).scrollTop() <= strickyScrollPos) { $(".scroll-to-top").fadeOut(500); } } OnePageMenuScroll(); }); })(jQuery); if ((jump = getUrlParameter("leap")) != "") { if (jump == "register") Swal.fire({ html: "We wish to inform you that the registrations for this event are closed, we are redirecting you to the Upcoming Events Page.", icon: "info", timer: 10000 }).then(rtnValue => { location.replace("upcoming"); }); else location.replace("#" + jump); } function getPathName() { pathName = ""; path = window.location.href; if (path.search("localhost") > 0) pathName = "../datta/"; else if (path.search("beta") > 0) pathName = "https://beta.maitribodh.org/datta/"; else pathName = "https://maitribodh.org/datta/"; return pathName; } function getUrlParameter(name) { name = name.replace(/[\[]/, '\\[').replace(/[\]]/, '\\]'); var regex = new RegExp('[\\?&]' + name + '=([^]*)'); var results = regex.exec(location.search); return results === null ? '' : decodeURIComponent(results[1].replace(/\+/g, ' ')); } async function fileGetContents(uri, callback) { uri = uri + "?v=" + parseInt(Math.random() * 27121975); let result = await fetch(uri), returnValue = await result.text(); return callback ? callback(returnValue) : returnValue; } function validatePhoneNumber(phoneNumber) { returnValue = true; if (phoneNumber != "" && (phoneNumber < 1000000 || phoneNumber > 9999999999999999)) returnValue = false; return returnValue; } function showLoader() { $('body').append(""); } function removeLoader() { $('#preloader').remove(); } function refreshSelectPicker(object) { object.selectpicker('destroy'); object.selectpicker(); } function setError(inputObject) { iObject = document.getElementById(inputObject); if (iObject) { iObject.classList.add("field-error"); if (iObject.type.includes("select")) refreshSelectPicker($('#' + inputObject)); } } function clearError(inputObject) { iObject = document.getElementById(inputObject); if (iObject) { iObject.classList.remove("field-error"); if (iObject.type.includes("select")) refreshSelectPicker($('#' + inputObject)); } } function localeDateTime(sourceDate, sourceTimeZoneOffset = "+05:30") { lDate = new Date(sourceDate + sourceTimeZoneOffset); if (lDate == "Invalid Date") { sourceDate = sourceDate.replace(/\-/g, "/"); lDate = new Date(sourceDate + sourceTimeZoneOffset); } options = { dateStyle: 'medium', timeStyle: 'full', hour12: false, hourCycle: 'h24', }; return (lDate.toLocaleString([], options)); } function setMapObjects({addressObject = null, cityObject = null, stateObject = null, zipCodeObject = null, countryCodeObject = null, countryNameObject = null} = {}) { const componentForm = { street_number: 'short_name', route: 'long_name', locality: 'long_name', administrative_area_level_1: 'long_name', administrative_area_level_2: 'long_name', administrative_area_level_3: 'long_name', country: 'long_name', postal_code: 'short_name' }; const getComponent = (components, type) => { for (const component of components) { if (component.types.includes(type)) { return component; } } return null; }; const fillInAddress = (place, objects, passedFlags) => { const components = place.address_components; if (!components) return; if (passedFlags.cityPassed) objects.cityObject.value = ""; if (passedFlags.statePassed) objects.stateObject.value = ""; if (passedFlags.zipCodePassed) objects.zipCodeObject.value = ""; if (passedFlags.countryCodePassed) objects.countryCodeObject.value = ""; if (passedFlags.countryNamePassed) objects.countryNameObject.value = ""; for (const component of components) { const componentType = component.types[0]; if (passedFlags.cityPassed && (componentType === 'locality' || componentType === 'administrative_area_level_2' || componentType === 'administrative_area_level_3')) { if (objects.cityObject.value == "") objects.cityObject.value = component.long_name; clearError(objects.cityObject.id); } if (passedFlags.statePassed && componentType === 'administrative_area_level_1') { if (objects.stateObject.value == "") objects.stateObject.value = component.long_name; clearError(objects.stateObject.id); } if (passedFlags.zipCodePassed && componentType === 'postal_code') { if (objects.zipCodeObject.value == "") objects.zipCodeObject.value = component.long_name; clearError(objects.zipCodeObject.id); } if (passedFlags.countryNamePassed && componentType === 'country') { if (objects.countryNameObject.value == "")objects.countryNameObject.value = component.long_name; clearError(objects.countryNameObject.id); } if (passedFlags.countryCodePassed && componentType === 'country') { if (objects.countryCodeObject.value == "")objects.countryCodeObject.value = component.short_name; clearError(objects.countryCodeObject.id); } } }; const objects = { addressObject, cityObject, stateObject, zipCodeObject, countryCodeObject, countryNameObject }; const passedFlags = { addressPassed: (addressObject !== null), cityPassed: (cityObject !== null), statePassed: (stateObject !== null), zipCodePassed: (zipCodeObject !== null), countryCodePassed: (countryCodeObject !== null), countryNamePassed: (countryNameObject !== null) }; if (passedFlags.addressPassed) { const autocomplete_address = new google.maps.places.Autocomplete(addressObject); autocomplete_address.addListener("place_changed", () => { const place = autocomplete_address.getPlace(); if (place.geometry) { fillInAddress(place, objects, passedFlags); } }); } if (passedFlags.cityPassed) { const autocomplete_city = new google.maps.places.Autocomplete(cityObject, { types: ["(cities)"] }); autocomplete_city.addListener("place_changed", () => { const place = autocomplete_city.getPlace(); if (place.geometry) { fillInAddress(place, objects, passedFlags); } }); } if (passedFlags.statePassed) { const autocomplete_state = new google.maps.places.Autocomplete(stateObject, { types: ["(regions)"] }); autocomplete_state.addListener("place_changed", () => { const place = autocomplete_state.getPlace(); if (place.geometry) { fillInAddress(place, objects, passedFlags); } }); } if (passedFlags.countryNamePassed) { const autocomplete_country = new google.maps.places.Autocomplete(countryNameObject, { types: ["(regions)"] }); autocomplete_country.addListener("place_changed", () => { const place = autocomplete_country.getPlace(); if (place.geometry) { fillInAddress(place, objects, passedFlags); } }); } }