/******/ (() => { // webpackBootstrap
/******/ var __webpack_modules__ = ({
/***/ "./resources/js/parts/instructor-finder.js":
/*!*************************************************!*\
!*** ./resources/js/parts/instructor-finder.js ***!
\*************************************************/
/***/ (() => {
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
(function ($) {
var instructorFinderMap;
function handleMap() {
var mapContainer = $('#instructorFinderMap');
var mapOption = {
dragging: true,
zoomControl: true,
scrollWheelZoom: false
};
var lat = mapContainer.attr('data-latitude');
var lng = mapContainer.attr('data-longitude');
var zoom = mapContainer.attr('data-zoom');
instructorFinderMap = L.map('instructorFinderMap', mapOption).setView([lat, lng], zoom);
L.tileLayer(leafletApiPath, {
maxZoom: 18,
minZoom: 3,
tileSize: 512,
zoomOffset: -1,
attribution: '© OpenStreetMap'
}).addTo(instructorFinderMap);
var countryMarkers = [];
var provinceMarkers = [];
var cityMarkers = [];
if (mapUsers && Array.isArray(mapUsers)) {
var myMarkersGroup = L.markerClusterGroup({
showCoverageOnHover: false
});
var _iterator = _createForOfIteratorHelper(mapUsers),
_step;
try {
for (_iterator.s(); !(_step = _iterator.n()).done;) {
var mapUser = _step.value;
var marker = makeUserMarker(mapUser);
myMarkersGroup.addLayer(marker);
}
} catch (err) {
_iterator.e(err);
} finally {
_iterator.f();
}
instructorFinderMap.addLayer(myMarkersGroup);
}
feather.replace();
}
handleMap();
function makeUserMarker(user) {
var userMarker = L.divIcon({
html: "

",
iconAnchor: [25, 50],
iconSize: [50, 50],
className: 'rounded-circle bg-white border-0'
});
var marker = L.marker([user.location[0], user.location[1]], {
icon: userMarker
});
marker.bindPopup(handleUserMapCardHtml(user), {
className: 'map-instructor-card-popup'
});
return marker;
}
function getStarIconHtml() {
return "";
}
function handleUserRateHtml(rate) {
var i = 5;
var html = "";
while (--i >= 5 - rate) {
html += "".concat(getStarIconHtml(), "");
}
while (i-- >= 0) {
html += "".concat(getStarIconHtml(), "");
}
html += "
";
return html;
}
function handleUserMapCardHtml(user) {
var _user$avatar, _user$full_name, _user$full_name2, _user$bio, _user$price;
return "\n
\n
\n

\n
\n\n
").concat((_user$full_name2 = user.full_name) !== null && _user$full_name2 !== void 0 ? _user$full_name2 : '', "
\n
").concat((_user$bio = user.bio) !== null && _user$bio !== void 0 ? _user$bio : '', "\n\n ").concat(handleUserRateHtml(user.rate), "\n\n ").concat(user.price ? "
\n ".concat(currency).concat((_user$price = user.price) !== null && _user$price !== void 0 ? _user$price : '', "\n /").concat(hourLang, "\n
") : "
\n ".concat(freeLang, "\n
"), "\n\n
\n\n
").concat(profileLang, "\n
");
}
$(document).ready(function () {
var rangeTimeOut = undefined;
function handleDoubleRange($el, item) {
if ($el && $el.length) {
var minLimit = $el.attr('data-minLimit');
var maxLimit = $el.attr('data-maxLimit');
var minTimeEl = $el.find('input[name="min_' + item + '"]');
var maxTimeEl = $el.find('input[name="max_' + item + '"]');
var minValue = minTimeEl.val();
var maxValue = maxTimeEl.val();
var range = $el.wRunner({
type: 'range',
limits: {
minLimit: minLimit,
maxLimit: maxLimit
},
rangeValue: {
minValue: minValue,
maxValue: maxValue
},
step: 1
});
range.onValueUpdate(function (values) {
minTimeEl.val(values.minValue);
maxTimeEl.val(values.maxValue);
if (rangeTimeOut !== undefined) {
clearTimeout(rangeTimeOut);
}
rangeTimeOut = setTimeout(function () {
$('#filtersForm').trigger('submit');
}, 1500);
});
}
}
handleDoubleRange($('#priceRange'), 'price');
handleDoubleRange($('#instructorAgeRange'), 'age');
handleDoubleRange($('#timeRangeInstructorPage'), 'time');
});
$('body').on('change', '#topFilters input,#topFilters select', function (e) {
e.preventDefault();
$('#filtersForm').trigger('submit');
});
})(jQuery);
/***/ }),
/***/ "./resources/sass/app.scss":
/*!*********************************!*\
!*** ./resources/sass/app.scss ***!
\*********************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
// extracted by mini-css-extract-plugin
/***/ })
/******/ });
/************************************************************************/
/******/ // The module cache
/******/ var __webpack_module_cache__ = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ var cachedModule = __webpack_module_cache__[moduleId];
/******/ if (cachedModule !== undefined) {
/******/ return cachedModule.exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = __webpack_module_cache__[moduleId] = {
/******/ // no module.id needed
/******/ // no module.loaded needed
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = __webpack_modules__;
/******/
/************************************************************************/
/******/ /* webpack/runtime/chunk loaded */
/******/ (() => {
/******/ var deferred = [];
/******/ __webpack_require__.O = (result, chunkIds, fn, priority) => {
/******/ if(chunkIds) {
/******/ priority = priority || 0;
/******/ for(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];
/******/ deferred[i] = [chunkIds, fn, priority];
/******/ return;
/******/ }
/******/ var notFulfilled = Infinity;
/******/ for (var i = 0; i < deferred.length; i++) {
/******/ var [chunkIds, fn, priority] = deferred[i];
/******/ var fulfilled = true;
/******/ for (var j = 0; j < chunkIds.length; j++) {
/******/ if ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {
/******/ chunkIds.splice(j--, 1);
/******/ } else {
/******/ fulfilled = false;
/******/ if(priority < notFulfilled) notFulfilled = priority;
/******/ }
/******/ }
/******/ if(fulfilled) {
/******/ deferred.splice(i--, 1)
/******/ var r = fn();
/******/ if (r !== undefined) result = r;
/******/ }
/******/ }
/******/ return result;
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/
/******/ /* webpack/runtime/make namespace object */
/******/ (() => {
/******/ // define __esModule on exports
/******/ __webpack_require__.r = (exports) => {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/jsonp chunk loading */
/******/ (() => {
/******/ // no baseURI
/******/
/******/ // object to store loaded and loading chunks
/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
/******/ var installedChunks = {
/******/ "/assets/default/js/parts/instructor-finder.min": 0,
/******/ "assets/default/css/app": 0
/******/ };
/******/
/******/ // no chunk on demand loading
/******/
/******/ // no prefetching
/******/
/******/ // no preloaded
/******/
/******/ // no HMR
/******/
/******/ // no HMR manifest
/******/
/******/ __webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);
/******/
/******/ // install a JSONP callback for chunk loading
/******/ var webpackJsonpCallback = (parentChunkLoadingFunction, data) => {
/******/ var [chunkIds, moreModules, runtime] = data;
/******/ // add "moreModules" to the modules object,
/******/ // then flag all "chunkIds" as loaded and fire callback
/******/ var moduleId, chunkId, i = 0;
/******/ if(chunkIds.some((id) => (installedChunks[id] !== 0))) {
/******/ for(moduleId in moreModules) {
/******/ if(__webpack_require__.o(moreModules, moduleId)) {
/******/ __webpack_require__.m[moduleId] = moreModules[moduleId];
/******/ }
/******/ }
/******/ if(runtime) var result = runtime(__webpack_require__);
/******/ }
/******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data);
/******/ for(;i < chunkIds.length; i++) {
/******/ chunkId = chunkIds[i];
/******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {
/******/ installedChunks[chunkId][0]();
/******/ }
/******/ installedChunks[chunkId] = 0;
/******/ }
/******/ return __webpack_require__.O(result);
/******/ }
/******/
/******/ var chunkLoadingGlobal = self["webpackChunk"] = self["webpackChunk"] || [];
/******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));
/******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));
/******/ })();
/******/
/************************************************************************/
/******/
/******/ // startup
/******/ // Load entry module and return exports
/******/ // This entry module depends on other loaded chunks and execution need to be delayed
/******/ __webpack_require__.O(undefined, ["assets/default/css/app"], () => (__webpack_require__("./resources/js/parts/instructor-finder.js")))
/******/ var __webpack_exports__ = __webpack_require__.O(undefined, ["assets/default/css/app"], () => (__webpack_require__("./resources/sass/app.scss")))
/******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__);
/******/
/******/ })()
;