// source --> https://philippines.journey-with-talk.com/wp-content/plugins/inline-google-spreadsheet-viewer/igsv-gvizcharts.js?ver=7.0 
/**
 * Inline Google Spreadsheet Viewer's Google Chart API integrations.
 *
 * @file Loads and draws Google Chart API visualizations.
 * @license GPL-3.0
 * @author Meitar Moscovitz <meitarm+wordpress@gmail.com>
 * @copyright Copyright 2017 by Meitar "maymay" Moscovitz
 */

(function () { // start immediately-invoked function expresion (IIFE)

google.load('visualization', '1.0', {
    'packages' : [
        'corechart',
        'annotatedtimeline',
        'annotationchart',
        'gauge',
        'geochart',
        'timeline'
    ]
});

jQuery(document).ready(function () {
    jQuery('.igsv-chart').each(function () {
        var chart_id = jQuery(this).attr('id'),
            query = new google.visualization.Query(jQuery(this).data('datasource-href')),
            options = lowerFirstCharInKeys(stripPrefixInKeys('chart', jQuery(this).data()));

        // Special-case chart options.
        options.title = jQuery(this).attr('title');
        delete options.type; // handled elsewhere
        for (x in options) {
            switch (x) {
                case 'colors':
                    options.colors = jQuery(this).data('chart-colors').split(' ');
                break;
                case 'dimensions':
                    options.is3D = (3) ? true : false;
                    delete options.dimensions;
                break;
            }
        }

        query.send(function (response) {
            if (response.isError()) {
                return; // bail, let Google handle displaying errors
            }
            var data = response.getDataTable(),
                chart_el = document.getElementById(chart_id),
                chart;
            switch (jQuery('#' + chart_id).data('chart-type').toLowerCase()) {
                case 'annotatedtimeline':
                    chart = new google.visualization.AnnotatedTimeLine(chart_el)
                    break;
                case 'annotation':
                    chart = new google.visualization.AnnotationChart(chart_el)
                    break;
                case 'area':
                    chart = new google.visualization.AreaChart(chart_el);
                    break;
                case 'bar':
                    chart = new google.visualization.BarChart(chart_el);
                    break;
                case 'bubble':
                    chart = new google.visualization.BubbleChart(chart_el);
                    break;
                case 'candlestick':
                    chart = new google.visualization.CandlestickChart(chart_el);
                    break;
                case 'column':
                default:
                    chart = new google.visualization.ColumnChart(chart_el);
                    break;
                case 'combo':
                    chart = new google.visualization.ComboChart(chart_el);
                    break;
                case 'gauge':
                    chart = new google.visualization.Gauge(chart_el);
                    break;
                case 'geo':
                    chart = new google.visualization.GeoChart(chart_el);
                    break;
                case 'histogram':
                    chart = new google.visualization.Histogram(chart_el);
                    break;
                case 'line':
                    chart = new google.visualization.LineChart(chart_el);
                    break;
                case 'pie':
                    chart = new google.visualization.PieChart(chart_el);
                    break;
                case 'scatter':
                    chart = new google.visualization.ScatterChart(chart_el);
                    break;
                case 'stepped':
                case 'steppedarea':
                    chart = new google.visualization.SteppedAreaChart(chart_el);
                    break;
                case 'timeline':
                    chart = new google.visualization.Timeline(chart_el);
                    break;
            }
            chart.draw(data, options);
        });

        // Chart helpers.
        function stripPrefixInKeys (prefix, obj) {
            var new_obj = {};
            for (x in obj) {
                if (0 === x.indexOf(prefix)) {
                    new_obj[x.slice(prefix.length)] = obj[x];
                } else {
                    new_obj[x] = obj[x];
                }
            }
            return new_obj;
        }
        function lowerFirstCharInKeys (obj) {
            var new_obj = {};
            for (x in obj) {
                new_obj[x.charAt(0).toLowerCase() + x.slice(1)] = obj[x];
            }
            return new_obj;
        }
    });
});

})(); // end IIFE;
// source --> https://philippines.journey-with-talk.com/wp-content/plugins/snow-monkey-editor/dist/js/app.js?ver=1779378866 
(()=>{"use strict";const n=function(n,e){0<n.length&&Array.prototype.slice.call(n,0).forEach((function(n,t){e(n,t)}))},e=["sme-animation-bounce-in","sme-animation-bounce-down","sme-animation-fade-in","sme-animation-fade-in-up","sme-animation-fade-in-down","sme-animation-fade-in-left","sme-animation-fade-in-right"];document.addEventListener("DOMContentLoaded",(()=>{const t=document.querySelectorAll('[class*="sme-animation-"]');if("undefined"==typeof IntersectionObserver)return void n(t,(n=>{e.forEach((e=>{n.classList.remove(e)}))}));const i=(n,t)=>{n.forEach((n=>{if(!n.isIntersecting)return;const i=n.target;e.forEach((n=>{if(!i.classList.contains(n))return;i.classList.replace(n,`${n}-fired`);const e=i.getAttribute("data-sme-animation-delay");0<e&&(i.style.animationDelay=`${e}s`);const t=i.getAttribute("data-sme-animation-duration");0<t&&(i.style.animationDuration=`${t}s`)})),t&&t.unobserve(i)}))},a=new IntersectionObserver(i,{root:null,rootMargin:"-25% 0px",threshold:[0,.25,.5,.75,1]});n(t,(n=>{const t=n.getBoundingClientRect(),o=window.innerHeight;0<=t.top&&t.top<=o&&i([{target:n,isIntersecting:!0,intersectionRatio:1}]),a.observe(n),n.addEventListener("animationend",(()=>{e.forEach((e=>{n.classList.remove(`${e}-fired`)}))}),!1)}))}),!1)})();