You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Fipamo/themes/default-light/assets/js/start.min.js

2188 lines
85 KiB
JavaScript

// modules are defined as an array
// [ module function, map of requires ]
//
// map of requires is short require name -> numeric require
//
// anything defined in a previous bundle is accessed via the
// orig method which is the require for previous bundles
// eslint-disable-next-line no-global-assign
parcelRequire = (function (modules, cache, entry, globalName) {
// Save the require from previous bundle to this closure if any
var previousRequire = typeof parcelRequire === 'function' && parcelRequire;
var nodeRequire = typeof require === 'function' && require;
function newRequire(name, jumped) {
if (!cache[name]) {
if (!modules[name]) {
// if we cannot find the module within our internal map or
// cache jump to the current global require ie. the last bundle
// that was added to the page.
var currentRequire = typeof parcelRequire === 'function' && parcelRequire;
if (!jumped && currentRequire) {
return currentRequire(name, true);
}
// If there are other bundles on this page the require from the
// previous one is saved to 'previousRequire'. Repeat this as
// many times as there are bundles until the module is found or
// we exhaust the require chain.
if (previousRequire) {
return previousRequire(name, true);
}
// Try the node require function if it exists.
if (nodeRequire && typeof name === 'string') {
return nodeRequire(name);
}
var err = new Error('Cannot find module \'' + name + '\'');
err.code = 'MODULE_NOT_FOUND';
throw err;
}
localRequire.resolve = resolve;
localRequire.cache = {};
var module = cache[name] = new newRequire.Module(name);
modules[name][0].call(module.exports, localRequire, module, module.exports, this);
}
return cache[name].exports;
function localRequire(x){
return newRequire(localRequire.resolve(x));
}
function resolve(x){
return modules[name][1][x] || x;
}
}
function Module(moduleName) {
this.id = moduleName;
this.bundle = newRequire;
this.exports = {};
}
newRequire.isParcelRequire = true;
newRequire.Module = Module;
newRequire.modules = modules;
newRequire.cache = cache;
newRequire.parent = previousRequire;
newRequire.register = function (id, exports) {
modules[id] = [function (require, module) {
module.exports = exports;
}, {}];
};
for (var i = 0; i < entry.length; i++) {
newRequire(entry[i]);
}
if (entry.length) {
// Expose entry point to Node, AMD or browser globals
// Based on https://github.com/ForbesLindesay/umd/blob/master/template.js
var mainExports = newRequire(entry[entry.length - 1]);
// CommonJS
if (typeof exports === "object" && typeof module !== "undefined") {
module.exports = mainExports;
// RequireJS
} else if (typeof define === "function" && define.amd) {
define(function () {
return mainExports;
});
// <script>
} else if (globalName) {
this[globalName] = mainExports;
}
}
// Override the current require with this new one
return newRequire;
})({"tools/events/EventEmitter.jsx":[function(require,module,exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
var EventEmitter =
/*#__PURE__*/
function () {
//--------------------------
// constructor
//--------------------------
function EventEmitter() {
_classCallCheck(this, EventEmitter);
this.listeners = new Map();
} //--------------------------
// methods
//--------------------------
_createClass(EventEmitter, [{
key: "addListener",
value: function addListener(label, callback) {
this.listeners.has(label) || this.listeners.set(label, []);
this.listeners.get(label).push(callback);
}
}, {
key: "removeListener",
value: function removeListener(label, callback) {
var isFunction = function isFunction(obj) {
return typeof obj == 'function' || false;
};
var listeners = this.listeners.get(label),
index;
if (listeners && listeners.length) {
index = listeners.reduce(function (i, listener, index) {
return isFunction(listener) && listener === callback ? i = index : i;
}, -1);
if (index > -1) {
listeners.splice(index, 1);
this.listeners.set(label, listeners);
return true;
}
}
return false;
}
}, {
key: "emitEvent",
value: function emitEvent(label) {
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
args[_key - 1] = arguments[_key];
}
var listeners = this.listeners.get(label);
if (listeners && listeners.length) {
listeners.forEach(function (listener) {
listener.apply(void 0, args);
});
return true;
}
return false;
} //--------------------------
// event handlers
//--------------------------
}]);
return EventEmitter;
}();
var _default = EventEmitter;
exports.default = _default;
},{}],"tools/events/DataEvent.jsx":[function(require,module,exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = exports.PROJECTS_SORTED = exports.PROJECT_ADDED = exports.PROJECT_UPDATED = exports.ARCHIVES_ENTRY_LOADED = exports.ARCHIVES_PAGE_LOADED = exports.ARCHIVES_JSON_LOADED = exports.HTML_LOADED = exports.SETTINGS_LOADED = exports.IMG_REQUEST_LAME = exports.IMG_REQUEST_GOOD = exports.REQUEST_LAME = exports.REQUEST_GOOD = void 0;
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
var REQUEST_GOOD = 'requestGood';
exports.REQUEST_GOOD = REQUEST_GOOD;
var REQUEST_LAME = 'requestLame';
exports.REQUEST_LAME = REQUEST_LAME;
var IMG_REQUEST_GOOD = 'imgRequestGood';
exports.IMG_REQUEST_GOOD = IMG_REQUEST_GOOD;
var IMG_REQUEST_LAME = 'imgRequestLame';
exports.IMG_REQUEST_LAME = IMG_REQUEST_LAME;
var SETTINGS_LOADED = 'dataLoaded';
exports.SETTINGS_LOADED = SETTINGS_LOADED;
var HTML_LOADED = 'htmlLoaded';
exports.HTML_LOADED = HTML_LOADED;
var ARCHIVES_JSON_LOADED = 'archivesJSONLoaded';
exports.ARCHIVES_JSON_LOADED = ARCHIVES_JSON_LOADED;
var ARCHIVES_PAGE_LOADED = 'archivesPAGELoaded';
exports.ARCHIVES_PAGE_LOADED = ARCHIVES_PAGE_LOADED;
var ARCHIVES_ENTRY_LOADED = 'archivesEntryLoaded';
exports.ARCHIVES_ENTRY_LOADED = ARCHIVES_ENTRY_LOADED;
var PROJECT_UPDATED = 'projectUpdated';
exports.PROJECT_UPDATED = PROJECT_UPDATED;
var PROJECT_ADDED = 'projectAdded';
exports.PROJECT_ADDED = PROJECT_ADDED;
var PROJECTS_SORTED = 'projectsSorted';
exports.PROJECTS_SORTED = PROJECTS_SORTED;
var DataEvent = function DataEvent() {
_classCallCheck(this, DataEvent);
};
var _default = new DataEvent();
exports.default = _default;
},{}],"tools/utilities/DataUtils.jsx":[function(require,module,exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = exports.CONTENT_TYPE_FORM = exports.CONTENT_TYPE_JSON = exports.REQUEST_TYPE_DELETE = exports.REQUEST_TYPE_PUT = exports.REQUEST_TYPE_GET = exports.REQUEST_TYPE_POST = void 0;
var _EventEmitter2 = _interopRequireDefault(require("../events/EventEmitter.jsx"));
var DataEvent = _interopRequireWildcard(require("../events/DataEvent.jsx"));
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
var REQUEST_TYPE_POST = "POST";
exports.REQUEST_TYPE_POST = REQUEST_TYPE_POST;
var REQUEST_TYPE_GET = "GET";
exports.REQUEST_TYPE_GET = REQUEST_TYPE_GET;
var REQUEST_TYPE_PUT = "PUT";
exports.REQUEST_TYPE_PUT = REQUEST_TYPE_PUT;
var REQUEST_TYPE_DELETE = "DELETE";
exports.REQUEST_TYPE_DELETE = REQUEST_TYPE_DELETE;
var CONTENT_TYPE_JSON = 'json';
exports.CONTENT_TYPE_JSON = CONTENT_TYPE_JSON;
var CONTENT_TYPE_FORM = 'x-www-form-urlencoded';
exports.CONTENT_TYPE_FORM = CONTENT_TYPE_FORM;
var DataUtils =
/*#__PURE__*/
function (_EventEmitter) {
_inherits(DataUtils, _EventEmitter);
//--------------------------
// constructor
//--------------------------
function DataUtils() {
var _this;
_classCallCheck(this, DataUtils);
_this = _possibleConstructorReturn(this, _getPrototypeOf(DataUtils).call(this));
var self = _assertThisInitialized(_assertThisInitialized(_this));
return _this;
} //--------------------------
// methods
//--------------------------
_createClass(DataUtils, [{
key: "request",
value: function request(requestURL, eventType) {
var requestType = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : REQUEST_TYPE_GET;
var contentType = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : CONTENT_TYPE_JSON;
var requestData = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null;
var self = this;
return new Promise(function (resolve, reject) {
var request = new XMLHttpRequest();
request.upload.onprogress = self.handleLoadProgress;
request.open(requestType, requestURL, true);
request.onload = function (e) {
if (request.status == 200) {
resolve({
request: request,
eventType: eventType
});
} else {
reject({
request: request,
eventType: eventType
});
}
;
};
if (requestType == REQUEST_TYPE_PUT || requestType == REQUEST_TYPE_POST) {
switch (contentType) {
case CONTENT_TYPE_JSON:
request.setRequestHeader("Content-type", "application/" + contentType);
request.send(JSON.stringify(requestData));
break;
case CONTENT_TYPE_FORM:
request.send(requestData);
break;
}
} else {
request.send();
}
});
}
}, {
key: "imgLoad",
value: function imgLoad(url) {
'use strict'; // Create new promise with the Promise() constructor;
// This has as its argument a function with two parameters, resolve and reject
return new Promise(function (resolve, reject) {
// Standard XHR to load an image
var request = new XMLHttpRequest();
request.open('GET', url);
request.responseType = 'blob'; // When the request loads, check whether it was successful
request.onload = function () {
if (request.status === 200) {
// If successful, resolve the promise by passing back the request response
resolve(request.response);
} else {
// If it fails, reject the promise with a error message
reject(new Error('Image didn\'t load successfully; error code:' + request.statusText));
}
};
request.onerror = function () {
// Also deal with the case when the entire request fails to begin with
// This is probably a network error, so reject the promise with an appropriate message
reject(new Error('There was a network error.'));
}; // Send the request
request.send();
});
}
}, {
key: "loadImage",
value: function loadImage(src) {
'use strict';
var self = this;
return new Promise(function (resolve, reject) {
// Get a reference to the body element, and create a new image object
var body = document.querySelector('body'),
myImage = new Image();
myImage.crossOrigin = ""; // or "anonymous"
// Call the function with the URL we want to load, but then chain the
// promise then() method on to the end of it. This contains two callbacks
self.imgLoad(src).then(function (response) {
// The first runs when the promise resolves, with the request.reponse specified within the resolve() method.
var imageURL = window.URL.createObjectURL(response);
resolve(imageURL); //$('background-content').setStyle('background-image', 'url('+imageURL+')') //myImage.src = imageURL;
//console.log(imageURL);
//body.appendChild(myImage);
// The second runs when the promise is rejected, and logs the Error specified with the reject() method.
}, function (Error) {
reject(Error);
});
});
} //--------------------------
// event handlers
//--------------------------
}, {
key: "handleLoadProgress",
value: function handleLoadProgress(e) {
var percentComplete = Math.ceil(e.loaded / e.total * 100); //console.log(percentComplete);
}
}]);
return DataUtils;
}(_EventEmitter2.default);
var _default = DataUtils;
exports.default = _default;
},{"../events/EventEmitter.jsx":"tools/events/EventEmitter.jsx","../events/DataEvent.jsx":"tools/events/DataEvent.jsx"}],"tools/utilities/StringUtils.jsx":[function(require,module,exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
var StringUtils =
/*#__PURE__*/
function () {
//--------------------------
// constructor
//--------------------------
function StringUtils() {
_classCallCheck(this, StringUtils);
} //--------------------------
// methods
//--------------------------
_createClass(StringUtils, [{
key: "cleanString",
value: function cleanString(string) {
var clean = string.replace(/(^\-+|[^a-zA-Z0-9\/_| -]+|\-+$)/g, '').toLowerCase().replace(/[\/_| -]+/g, '-');
return clean;
}
}, {
key: "decodeHTML",
value: function decodeHTML(string, quote_style) {
var optTemp = 0,
i = 0,
noquotes = false;
if (typeof quote_style === 'undefined') {
quote_style = 2;
}
string = string.toString().replace(/&lt;/g, '<').replace(/&gt;/g, '>');
var OPTS = {
'ENT_NOQUOTES': 0,
'ENT_HTML_QUOTE_SINGLE': 1,
'ENT_HTML_QUOTE_DOUBLE': 2,
'ENT_COMPAT': 2,
'ENT_QUOTES': 3,
'ENT_IGNORE': 4
};
if (quote_style === 0) {
noquotes = true;
}
if (typeof quote_style !== 'number') {
// Allow for a single string or an array of string flags
quote_style = [].concat(quote_style);
for (i = 0; i < quote_style.length; i++) {
// Resolve string input to bitwise e.g. 'PATHINFO_EXTENSION' becomes 4
if (OPTS[quote_style[i]] === 0) {
noquotes = true;
} else if (OPTS[quote_style[i]]) {
optTemp = optTemp | OPTS[quote_style[i]];
}
}
quote_style = optTemp;
}
if (quote_style & OPTS.ENT_HTML_QUOTE_SINGLE) {
string = string.replace(/&#0*39;/g, "'"); // PHP doesn't currently escape if more than one 0, but it should
// string = string.replace(/&apos;|&#x0*27;/g, "'"); // This would also be useful here, but not a part of PHP
}
if (!noquotes) {
string = string.replace(/&quot;/g, '"');
} // Put this in last place to avoid escape being double-decoded
string = string.replace(/&amp;/g, '&');
return string;
} //--------------------------
// event handlers
//--------------------------
}]);
return StringUtils;
}();
var _default = StringUtils;
exports.default = _default;
},{}],"tasks/ProjectFolio.jsx":[function(require,module,exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _DataUtils = _interopRequireWildcard(require("../tools/utilities/DataUtils.jsx"));
var DataEvent = _interopRequireWildcard(require("../tools/events/DataEvent.jsx"));
var _StringUtils = _interopRequireDefault(require("../tools/utilities/StringUtils.jsx"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
var ProjectFolio =
/*#__PURE__*/
function () {
//--------------------------
// constructor
//--------------------------
function ProjectFolio() {
_classCallCheck(this, ProjectFolio);
var folio = [];
this.dataUtils = new _DataUtils.default();
} //--------------------------
// methods
//--------------------------
_createClass(ProjectFolio, [{
key: "start",
value: function start() {}
}, {
key: "submitProject",
value: function submitProject(edit, uploadFiles) {
var self = this;
return new Promise(function (resolve, reject) {
//collect form data
//if(!this.validateForm())
var projectData = new FormData(); //let projectImages = document.getElementById('projectImages');
//var fileSelect = projectImages;
var files = uploadFiles;
for (var i = 0; i < files.length; i++) {
var file = files[i]; // Check the file type.
if (!file.type.match('image.*')) {
continue;
} // Add the file to the request.
projectData.append('folioImages', file, file.name);
}
var category = document.getElementById("content_category");
var project_form = document.forms.namedItem("folio-project");
projectData.append("title", project_form.title.value);
projectData.append('slug', new _StringUtils.default().cleanString(project_form.title.value));
projectData.append("tools", project_form.tools.value);
projectData.append("url", project_form.url.value);
projectData.append("description", project_form.description.value);
projectData.append("type", type.options[type.selectedIndex].text);
var postURL;
var postEventType;
if (edit) {
var postID = document.getElementById('btn-submit').getAttribute('data-id');
postURL = "/api/folio/update/" + postID;
postEventType = DataEvent.PROJECT_UPDATED;
} else {
postURL = "/api/folio/add";
postEventType = DataEvent.PROJECT_ADDED;
}
self.dataUtils.request(postURL, postEventType, _DataUtils.REQUEST_TYPE_POST, _DataUtils.CONTENT_TYPE_FORM, projectData).then(function (response) {
resolve({
response: response
});
}).catch(function (err) {
reject({
err: err
});
});
});
}
}, {
key: "addNewProject",
value: function addNewProject(uploadFiles) {
var request = new XMLHttpRequest();
request.open("POST", "/folio", true);
request.onload = function (oEvent) {
if (request.status == 200) {
var response = JSON.parse(request.response);
if (response.message == "New Content Entered") {
console.log("SET");
project_form.reset();
} else {
console.log(response.message);
}
} else {//console.log(request);
}
};
request.send(projectData);
}
}, {
key: "validateForm",
value: function validateForm() {
var valid = false;
if (this.entry_form.title.value == "" || this.entry_form.price.value == "" || this.entry_form.description == "") {
return valid;
} else {
valid = true;
return valid;
}
} //--------------------------
// event handlers
//--------------------------
}]);
return ProjectFolio;
}();
exports.default = ProjectFolio;
},{"../tools/utilities/DataUtils.jsx":"tools/utilities/DataUtils.jsx","../tools/events/DataEvent.jsx":"tools/events/DataEvent.jsx","../tools/utilities/StringUtils.jsx":"tools/utilities/StringUtils.jsx"}],"tools/effects/TextEffects.jsx":[function(require,module,exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
var TexEffects =
/*#__PURE__*/
function () {
//--------------------------
// constructor
//--------------------------
function TexEffects() {
_classCallCheck(this, TexEffects);
} //--------------------------
// methods
//--------------------------
_createClass(TexEffects, [{
key: "scramble",
value: function scramble(obj, offset, complete) {
var scrambleText = new ScrambleText(obj, {
timeOffset: offset,
chars: ['安', '以', '宇', '衣', '於', '加', '幾', '久', '計', '己', '左', '之', '寸', '世', '曽', '太', '知', '川', '天', '止', '奈', '仁', '奴', '称', '乃', '波', '比', '不', '部', '保', '末', '美', '武', '女', '毛', '也', '為', '由', '恵', '与', '良', '利', '留', '礼', '呂', '和', '遠', '无'],
callback: complete
}).start();
} //--------------------------
// event handlers
//--------------------------
}]);
return TexEffects;
}();
var _default = TexEffects;
exports.default = _default;
},{}],"tools/effects/Animate.jsx":[function(require,module,exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _EventEmitter2 = _interopRequireDefault(require("../events/EventEmitter.jsx"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
;
var Animate =
/*#__PURE__*/
function (_EventEmitter) {
_inherits(Animate, _EventEmitter);
//--------------------------
// constructor
//--------------------------
function Animate() {
_classCallCheck(this, Animate);
return _possibleConstructorReturn(this, _getPrototypeOf(Animate).call(this));
} //--------------------------
// methods
//--------------------------
_createClass(Animate, [{
key: "object",
value: function object(properties) {
var animation = anime(properties); //animation.start(properties);
} //--------------------------
// event handlers
//--------------------------
}]);
return Animate;
}(_EventEmitter2.default);
var _default = Animate;
exports.default = _default;
},{"../events/EventEmitter.jsx":"tools/events/EventEmitter.jsx"}],"tasks/BlogPost.jsx":[function(require,module,exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _DataUtils = _interopRequireWildcard(require("../tools/utilities/DataUtils.jsx"));
var DataEvent = _interopRequireWildcard(require("../tools/events/DataEvent.jsx"));
var _StringUtils = _interopRequireDefault(require("../tools/utilities/StringUtils.jsx"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
var BlogPost =
/*#__PURE__*/
function () {
//--------------------------
// constructor
//--------------------------
function BlogPost() {
_classCallCheck(this, BlogPost);
var folio = [];
this.dataUtils = new _DataUtils.default();
} //--------------------------
// methods
//--------------------------
_createClass(BlogPost, [{
key: "start",
value: function start() {}
}, {
key: "submitPost",
value: function submitPost(edit, uploadFiles) {
var self = this;
return new Promise(function (resolve, reject) {
//collect form data
//if(!this.validateForm())
var postData = new FormData(); //let projectImages = document.getElementById('projectImages');
//var fileSelect = projectImages;
var files = uploadFiles;
for (var i = 0; i < files.length; i++) {
var file = files[i]; // Check the file type.
if (!file.type.match('image.*')) {
continue;
} // Add the file to the request.
postData.append('feature_image', file, file.name);
} //var category = document.getElementById("content_category");
//let project_form = document.forms.namedItem("folio-project");
var txt = document.createElement("textarea");
txt.innerHTML = document.getElementById('entry_text').innerHTML;
console.log(txt);
postData.append("title", document.getElementById('entry_title').value);
postData.append('slug', new _StringUtils.default().cleanString(document.getElementById('entry_title').value));
postData.append("entry_plaintext", txt.value);
postData.append("tags", document.getElementById('entry_tags').value);
var postURL;
var postEventType;
if (edit) {
var postID = document.getElementById('post-sumbit-btn').getAttribute('data-id');
console.log("POST ID: " + postID);
postURL = "/api/blog/update/" + postID;
postEventType = DataEvent.POST_UPDATED;
} else {
postURL = "/api/blog/add";
postEventType = DataEvent.POST_ADDED;
}
self.dataUtils.request(postURL, postEventType, _DataUtils.REQUEST_TYPE_POST, _DataUtils.CONTENT_TYPE_FORM, postData).then(function (response) {
resolve({
response: response
});
}).catch(function (err) {
reject({
err: err
});
});
});
}
}, {
key: "validateForm",
value: function validateForm() {
var valid = false;
if (this.entry_form.title.value == "" || this.entry_form.price.value == "" || this.entry_form.description == "") {
return valid;
} else {
valid = true;
return valid;
}
} //--------------------------
// event handlers
//--------------------------
}]);
return BlogPost;
}();
exports.default = BlogPost;
},{"../tools/utilities/DataUtils.jsx":"tools/utilities/DataUtils.jsx","../tools/events/DataEvent.jsx":"tools/events/DataEvent.jsx","../tools/utilities/StringUtils.jsx":"tools/utilities/StringUtils.jsx"}],"controllers/DisplayAdminBlog.jsx":[function(require,module,exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _DataUtils = _interopRequireWildcard(require("../tools/utilities/DataUtils.jsx"));
var DataEvent = _interopRequireWildcard(require("../tools/events/DataEvent.jsx"));
var Ease = _interopRequireWildcard(require("../tools/effects/Animate.jsx"));
var _TextEffects = _interopRequireDefault(require("../tools/effects/TextEffects.jsx"));
var _BlogPost = _interopRequireDefault(require("../tasks/BlogPost.jsx"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
var DisplayAdminBlog =
/*#__PURE__*/
function () {
//--------------------------
// constructor
//--------------------------
function DisplayAdminBlog() {
_classCallCheck(this, DisplayAdminBlog);
reframe('iframe');
this.uploadFiles;
this.start();
} //--------------------------
// methods
//--------------------------
_createClass(DisplayAdminBlog, [{
key: "start",
value: function start() {
new Ease.default().object({
targets: document.getElementById('loader'),
duration: 300,
opacity: 0,
easing: 'easeInOutQuad',
complete: function complete() {
document.getElementById('loader').style.display = 'none';
document.getElementById('loader').style.visibility = 'hidden';
new Ease.default().object({
targets: document.getElementById('header'),
duration: 10,
opacity: 1,
easing: 'easeInOutQuad',
complete: function complete() {
new _TextEffects.default().scramble(document.getElementById('the-title'), 50, function () {
if (document.getElementById('the-intro')) document.getElementById('the-intro').style.opacity = 1;
if (document.getElementById('blog-entry')) document.getElementById('blog-entry').style.opacity = 1; //START SEcTION
});
}
});
}
});
if (document.getElementById('featured-image-drop')) {
console.log("HERE");
document.getElementById('featured-image-drop').addEventListener('dragover', this.handleDragOver, false);
document.getElementById('featured-image-drop').addEventListener('drop', this.handleDrop, false);
document.getElementById('featured-click').addEventListener('change', this.handleClicked, false);
document.getElementById("post-sumbit-btn").addEventListener('click', function (f) {
f.preventDefault();
var edit = false;
if (f.target.getAttribute('data-action') == 'blog-update') edit = true;
console.log('clicked');
new _BlogPost.default().submitPost(edit, DisplayAdminBlog.uploadFiles).then(function (response) {
var note = JSON.parse(response['response']['request'].response);
console.log(note.message);
}).catch(function (err) {
console.log(err);
});
});
}
} //--------------------------
// event handlers
//--------------------------
}, {
key: "handleDragOver",
value: function handleDragOver(e) {
e.stopPropagation();
e.preventDefault();
e.dataTransfer.dropEffect = 'copy'; // Explicitly show this is a copy.
}
}, {
key: "handleClicked",
value: function handleClicked(e) {
e.stopPropagation();
e.preventDefault();
console.log("IMAGES " + e.target.files);
DisplayAdminBlog.uploadFiles = e.target.files;
for (var i = 0, f; f = DisplayAdminBlog.uploadFiles[i]; i++) {
// Only process image files.
if (!f.type.match('image.*')) {
continue;
}
var reader = new FileReader(); // Closure to capture the file information.
reader.onload = function (theFile) {
return function (f) {
// Render thumbnail.
var span = document.createElement('span');
span.innerHTML = ['<img src="', f.target.result, '" title="', escape(theFile.name), '"/>'].join(''); //document.getElementById('featured-image-drop').insertBefore(span, null);
document.getElementById('featured-image-drop').innerHTML = '';
document.getElementById('featured-image-drop').appendChild(span);
};
}(f); // Read in the image file as a data URL.
reader.readAsDataURL(f);
}
}
}, {
key: "handleDrop",
value: function handleDrop(e) {
e.stopPropagation();
e.preventDefault();
DisplayBlog.uploadFiles = e.dataTransfer.files; //console.log(MemberArea.uploadFiles.length);
for (var i = 0, f; f = DisplayBlog.uploadFiles[i]; i++) {
// Only process image files.
if (!f.type.match('image.*')) {
continue;
}
var reader = new FileReader(); // Closure to capture the file information.
reader.onload = function (theFile) {
return function (f) {
// Render thumbnail.
var span = document.createElement('span');
span.innerHTML = ['<img src="', f.target.result, '" title="', escape(theFile.name), '"/>'].join(''); //document.getElementById('featured-image-drop').insertBefore(span, null);
document.getElementById('featured-image-drop').innerHTML = '';
document.getElementById('featured-image-drop').appendChild(span);
};
}(f); // Read in the image file as a data URL.
reader.readAsDataURL(f);
}
}
}]);
return DisplayAdminBlog;
}();
exports.default = DisplayAdminBlog;
DisplayAdminBlog.uploadFiles = [];
},{"../tools/utilities/DataUtils.jsx":"tools/utilities/DataUtils.jsx","../tools/events/DataEvent.jsx":"tools/events/DataEvent.jsx","../tools/effects/Animate.jsx":"tools/effects/Animate.jsx","../tools/effects/TextEffects.jsx":"tools/effects/TextEffects.jsx","../tasks/BlogPost.jsx":"tasks/BlogPost.jsx"}],"tasks/TaskFipamo.jsx":[function(require,module,exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _DataUtils = _interopRequireWildcard(require("../tools/utilities/DataUtils.jsx"));
var DataEvent = _interopRequireWildcard(require("../tools/events/DataEvent.jsx"));
var _StringUtils = _interopRequireDefault(require("../tools/utilities/StringUtils.jsx"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
var TaskFipamo =
/*#__PURE__*/
function () {
//--------------------------
// constructor
//--------------------------
function TaskFipamo() {
_classCallCheck(this, TaskFipamo);
var folio = [];
this.dataUtils = new _DataUtils.default();
} //--------------------------
// methods
//--------------------------
_createClass(TaskFipamo, [{
key: "start",
value: function start() {}
}, {
key: "submitLink",
value: function submitLink(edit) {
var self = this;
return new Promise(function (resolve, reject) {
var link_data = '';
var postURL;
var postEventType;
console.log('EDIT: ' + edit);
if (edit) {
//TODO: FIX TAGS,NEEDS TO BE SUBMITTED AS AN ARRAY
link_data = {
"title": document.getElementById('saved_title').value,
"tags": document.getElementById('saved_tags').value,
"image": document.getElementById('saved_image').value
};
var savedID = document.getElementById('saved-sumbit-btn').getAttribute('data-id');
postURL = "/api/bookmarks/update/" + savedID;
postEventType = DataEvent.LINK_UPDATED;
console.log('url' + postURL);
} else {
link_data = {
"url": document.getElementById('saved_text').value
};
postURL = "/api/bookmarks/add";
postEventType = DataEvent.LINK_ADDED;
}
console.log('POSTING');
self.dataUtils.request(postURL, postEventType, _DataUtils.REQUEST_TYPE_POST, _DataUtils.CONTENT_TYPE_JSON, link_data).then(function (response) {
resolve({
response: response
});
}).catch(function (err) {
reject({
err: err
});
});
});
} //--------------------------
// event handlers
//--------------------------
}]);
return TaskFipamo;
}();
exports.default = TaskFipamo;
},{"../tools/utilities/DataUtils.jsx":"tools/utilities/DataUtils.jsx","../tools/events/DataEvent.jsx":"tools/events/DataEvent.jsx","../tools/utilities/StringUtils.jsx":"tools/utilities/StringUtils.jsx"}],"controllers/DisplayAdminFipamo.jsx":[function(require,module,exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var DataEvent = _interopRequireWildcard(require("../tools/events/DataEvent.jsx"));
var Ease = _interopRequireWildcard(require("../tools/effects/Animate.jsx"));
var _TextEffects = _interopRequireDefault(require("../tools/effects/TextEffects.jsx"));
var _TaskFipamo = _interopRequireDefault(require("../tasks/TaskFipamo.jsx"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
var DisplayAdminFipamo =
/*#__PURE__*/
function () {
//--------------------------
// constructor
//--------------------------
function DisplayAdminFipamo() {
_classCallCheck(this, DisplayAdminFipamo);
this.start();
} //--------------------------
// methods
//--------------------------
_createClass(DisplayAdminFipamo, [{
key: "start",
value: function start() {
document.getElementById("saved-sumbit-btn").addEventListener('click', function (f) {
console.log('CLICKED');
var edit = false;
if (f.target.getAttribute('data-action') == 'saved-edit') edit = true;
new _TaskFipamo.default().submitLink(edit).then(function (response) {
var note = JSON.parse(response['response']['request'].response);
if (note.message == 'link added' || note.message == 'bookmark updated') {
switch (note.message) {
case 'link added':
document.getElementById('saved_text').value = '';
break;
case 'bookmark updated':
document.getElementById('saved_text').value = 'updated';
break;
}
} else {
console.log(note);
}
}).catch(function (err) {//console.log(err)
});
});
} //--------------------------
// event handlers
//--------------------------
}]);
return DisplayAdminFipamo;
}();
exports.default = DisplayAdminFipamo;
},{"../tools/events/DataEvent.jsx":"tools/events/DataEvent.jsx","../tools/effects/Animate.jsx":"tools/effects/Animate.jsx","../tools/effects/TextEffects.jsx":"tools/effects/TextEffects.jsx","../tasks/TaskFipamo.jsx":"tasks/TaskFipamo.jsx"}],"controllers/DisplayAdmin.jsx":[function(require,module,exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _DataUtils = _interopRequireWildcard(require("../tools/utilities/DataUtils.jsx"));
var DataEvent = _interopRequireWildcard(require("../tools/events/DataEvent.jsx"));
var _ProjectFolio = _interopRequireDefault(require("../tasks/ProjectFolio.jsx"));
var _TextEffects = _interopRequireDefault(require("../tools/effects/TextEffects.jsx"));
var Ease = _interopRequireWildcard(require("../tools/effects/Animate.jsx"));
var _DisplayAdminBlog = _interopRequireDefault(require("./DisplayAdminBlog.jsx"));
var _DisplayAdminFipamo = _interopRequireDefault(require("./DisplayAdminFipamo.jsx"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
var DisplayAdmin =
/*#__PURE__*/
function () {
//--------------------------
// constructor
//--------------------------
function DisplayAdmin(section, page) {
_classCallCheck(this, DisplayAdmin);
this.section = section;
this.page = page;
this.current = null;
this.start();
} //--------------------------
// methods
//--------------------------
_createClass(DisplayAdmin, [{
key: "start",
value: function start() {
var self = this;
new Ease.default().object({
targets: document.getElementById('loader'),
duration: 300,
opacity: 0,
easing: 'easeInOutQuad',
complete: function complete() {
document.getElementById('loader').style.display = 'none';
document.getElementById('loader').style.visibility = 'hidden';
new Ease.default().object({
targets: document.getElementById('header'),
duration: 10,
opacity: 1,
easing: 'easeInOutQuad',
complete: function complete() {
new _TextEffects.default().scramble(document.getElementById('the-title'), 50, function () {
document.getElementById('loader').style.display = 'none';
document.getElementById('loader').style.visibility = 'hidden';
console.log(self.page);
switch (self.page) {
case "fipamo":
self.current = new _DisplayAdminFipamo.default();
break;
case "blog":
self.current = new _DisplayAdminBlog.default();
break;
default:
console.log("ADMIN INDEX");
break;
}
});
}
});
}
});
} //--------------------------
// event handlers
//--------------------------
}]);
return DisplayAdmin;
}();
exports.default = DisplayAdmin;
DisplayAdmin.uploadFiles = [];
},{"../tools/utilities/DataUtils.jsx":"tools/utilities/DataUtils.jsx","../tools/events/DataEvent.jsx":"tools/events/DataEvent.jsx","../tasks/ProjectFolio.jsx":"tasks/ProjectFolio.jsx","../tools/effects/TextEffects.jsx":"tools/effects/TextEffects.jsx","../tools/effects/Animate.jsx":"tools/effects/Animate.jsx","./DisplayAdminBlog.jsx":"controllers/DisplayAdminBlog.jsx","./DisplayAdminFipamo.jsx":"controllers/DisplayAdminFipamo.jsx"}],"controllers/DisplayIndex.jsx":[function(require,module,exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _DataUtils = _interopRequireWildcard(require("../tools/utilities/DataUtils.jsx"));
var DataEvent = _interopRequireWildcard(require("../tools/events/DataEvent.jsx"));
var Ease = _interopRequireWildcard(require("../tools/effects/Animate.jsx"));
var _TextEffects = _interopRequireDefault(require("../tools/effects/TextEffects.jsx"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
var DisplayIndex =
/*#__PURE__*/
function () {
//--------------------------
// constructor
//--------------------------
function DisplayIndex() {
_classCallCheck(this, DisplayIndex);
this.start();
} //--------------------------
// methods
//--------------------------
_createClass(DisplayIndex, [{
key: "start",
value: function start() {
document.getElementById('the-intro').style.opacity = 1;
new Ease.default().object({
targets: document.getElementById('recent-work'),
duration: 200,
opacity: 1,
easing: 'easeInOutQuad',
complete: function complete() {}
});
new Ease.default().object({
targets: document.getElementById('recent-blog'),
duration: 500,
opacity: 1,
easing: 'easeInOutQuad',
complete: function complete() {}
});
new Ease.default().object({
targets: document.getElementById('float-bg'),
duration: 2000,
opacity: 1,
easing: 'easeInQuad',
complete: function complete() {}
});
} //--------------------------
// event handlers
//--------------------------
}]);
return DisplayIndex;
}();
exports.default = DisplayIndex;
},{"../tools/utilities/DataUtils.jsx":"tools/utilities/DataUtils.jsx","../tools/events/DataEvent.jsx":"tools/events/DataEvent.jsx","../tools/effects/Animate.jsx":"tools/effects/Animate.jsx","../tools/effects/TextEffects.jsx":"tools/effects/TextEffects.jsx"}],"tasks/Mailer.jsx":[function(require,module,exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _Animate = _interopRequireDefault(require("../tools/effects/Animate.jsx"));
var _TextEffects = _interopRequireDefault(require("../tools/effects/TextEffects.jsx"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
var Mailer =
/*#__PURE__*/
function () {
//--------------------------
// constructor
//--------------------------
function Mailer(element) {
var _this = this;
_classCallCheck(this, Mailer);
this.response = element;
if (document.getElementById('request-btn')) {
document.getElementById('request-btn').addEventListener("click", function (f) {
f.preventDefault();
_this.sendMail();
});
}
} //--------------------------
// methods
//--------------------------
_createClass(Mailer, [{
key: "sendMail",
value: function sendMail() {
var self = this; //if(!this.validateForm())
var mailData = [];
var requestForm = document.forms.namedItem("request-form");
var serviceType = document.getElementById('service_type'); //console.log(serviceType.options[serviceType.selectedIndex].text);
mailData = {
"email": requestForm.email.value,
"client": requestForm.client.value,
"description": requestForm.description.value,
"type": serviceType.options[serviceType.selectedIndex].text
};
var request = new XMLHttpRequest();
request.open("POST", "/mailer", true);
request.setRequestHeader("Content-type", "application/json");
request.onload = function (oEvent) {
if (request.status == 200) {
var response = JSON.parse(request.response);
if (response.message == "message sent") {
requestForm.reset();
self.response.innerHTML = "HEY. THANKS FOR REACHING OUT. YOU'RE AWESOME";
new _TextEffects.default().scramble(self.response, 50, function () {});
} else {//console.log(response.detail);
}
} else {//console.log(request);
}
};
request.send(JSON.stringify(mailData));
} //--------------------------
// event handlers
//--------------------------
}]);
return Mailer;
}();
exports.default = Mailer;
},{"../tools/effects/Animate.jsx":"tools/effects/Animate.jsx","../tools/effects/TextEffects.jsx":"tools/effects/TextEffects.jsx"}],"controllers/DisplayWork.jsx":[function(require,module,exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = exports.DisplayID = void 0;
var _DataUtils = _interopRequireWildcard(require("../tools/utilities/DataUtils.jsx"));
var DataEvent = _interopRequireWildcard(require("../tools/events/DataEvent.jsx"));
var Ease = _interopRequireWildcard(require("../tools/effects/Animate.jsx"));
var _TextEffects = _interopRequireDefault(require("../tools/effects/TextEffects.jsx"));
var _Mailer = _interopRequireDefault(require("../tasks/Mailer.jsx"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
var DisplayID = "Display-Work";
exports.DisplayID = DisplayID;
var DisplayWork =
/*#__PURE__*/
function () {
//--------------------------
// constructor
//--------------------------
function DisplayWork() {
_classCallCheck(this, DisplayWork);
this.dataUtils = new _DataUtils.default();
this.mailer = new _Mailer.default();
this.start();
} //--------------------------
// methods
//--------------------------
_createClass(DisplayWork, [{
key: "start",
value: function start() {
var self = this;
if (document.getElementById('work-display')) {
new Ease.default().object({
targets: document.getElementById('work-display'),
duration: 500,
opacity: 1,
easing: 'easeInOutQuad',
complete: function complete() {
self.sortItemList();
new Ease.default().object({
targets: document.getElementById('float-bg'),
duration: 2000,
opacity: 1,
easing: 'easeInQuad',
complete: function complete() {}
});
}
});
new Ease.default().object({
targets: document.getElementById('work-header'),
duration: 500,
opacity: 1,
easing: 'easeInOutQuad',
complete: function complete() {}
});
} else {
new Ease.default().object({
targets: document.getElementById('folio-header'),
duration: 500,
opacity: 1,
easing: 'easeInOutQuad',
complete: function complete() {
self.showFolioImages();
}
});
}
}
}, {
key: "sortItemList",
value: function sortItemList() {
var workItems = document.getElementById('work-list').children;
var trans = 300;
var self = this;
for (var i = 0; i < workItems.length; i++) {
//item.addEventListener('click', f => this.handleWorkList(f))
new Ease.default().object({
targets: workItems[i],
duration: trans,
opacity: 1,
easing: 'easeInOutQuad',
complete: function complete() {//self.showFolioImages();
}
});
trans = trans + 200;
if (i == workItems.length - 1) {
new Ease.default().object({
targets: document.getElementById('contact'),
duration: 300,
opacity: 1,
easing: 'easeInOutQuad',
complete: function complete() {//self.showFolioImages();
}
});
}
}
}
}, {
key: "showFolioImages",
value: function showFolioImages() {
var images = document.getElementById('project-images').children;
var trans = 300;
var self = this;
for (var i = 0; i < images.length; i++) {
//item.addEventListener('click', f => this.handleWorkList(f))
new Ease.default().object({
targets: images[i],
duration: trans,
opacity: 1,
easing: 'easeInOutQuad',
complete: function complete() {//self.showFolioImages();
}
});
trans = trans + 200;
}
} //--------------------------
// event handlers
//--------------------------
}]);
return DisplayWork;
}();
exports.default = DisplayWork;
},{"../tools/utilities/DataUtils.jsx":"tools/utilities/DataUtils.jsx","../tools/events/DataEvent.jsx":"tools/events/DataEvent.jsx","../tools/effects/Animate.jsx":"tools/effects/Animate.jsx","../tools/effects/TextEffects.jsx":"tools/effects/TextEffects.jsx","../tasks/Mailer.jsx":"tasks/Mailer.jsx"}],"controllers/DisplayBlog.jsx":[function(require,module,exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _DataUtils = _interopRequireWildcard(require("../tools/utilities/DataUtils.jsx"));
var DataEvent = _interopRequireWildcard(require("../tools/events/DataEvent.jsx"));
var Ease = _interopRequireWildcard(require("../tools/effects/Animate.jsx"));
var _TextEffects = _interopRequireDefault(require("../tools/effects/TextEffects.jsx"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
var DisplayBlog =
/*#__PURE__*/
function () {
//--------------------------
// constructor
//--------------------------
function DisplayBlog() {
_classCallCheck(this, DisplayBlog);
reframe('iframe');
this.start();
} //--------------------------
// methods
//--------------------------
_createClass(DisplayBlog, [{
key: "start",
value: function start() {
console.log("START BLOG");
} //--------------------------
// event handlers
//--------------------------
}]);
return DisplayBlog;
}();
exports.default = DisplayBlog;
},{"../tools/utilities/DataUtils.jsx":"tools/utilities/DataUtils.jsx","../tools/events/DataEvent.jsx":"tools/events/DataEvent.jsx","../tools/effects/Animate.jsx":"tools/effects/Animate.jsx","../tools/effects/TextEffects.jsx":"tools/effects/TextEffects.jsx"}],"controllers/DisplayFi.jsx":[function(require,module,exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = exports.DisplayID = void 0;
var _DataUtils = _interopRequireWildcard(require("../tools/utilities/DataUtils.jsx"));
var DataEvent = _interopRequireWildcard(require("../tools/events/DataEvent.jsx"));
var Ease = _interopRequireWildcard(require("../tools/effects/Animate.jsx"));
var _TextEffects = _interopRequireDefault(require("../tools/effects/TextEffects.jsx"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
var DisplayID = "Display-Fi";
exports.DisplayID = DisplayID;
var DisplayFi =
/*#__PURE__*/
function () {
//--------------------------
// constructor
//--------------------------
function DisplayFi() {
_classCallCheck(this, DisplayFi);
this.dataUtils = new _DataUtils.default(); //this.mailer = new Mailer();
this.start();
} //--------------------------
// methods
//--------------------------
_createClass(DisplayFi, [{
key: "start",
value: function start() {
var self = this;
console.log("START BOOKMARKS");
} //--------------------------
// event handlers
//--------------------------
}]);
return DisplayFi;
}();
exports.default = DisplayFi;
},{"../tools/utilities/DataUtils.jsx":"tools/utilities/DataUtils.jsx","../tools/events/DataEvent.jsx":"tools/events/DataEvent.jsx","../tools/effects/Animate.jsx":"tools/effects/Animate.jsx","../tools/effects/TextEffects.jsx":"tools/effects/TextEffects.jsx"}],"controllers/DisplayClient.jsx":[function(require,module,exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _DataUtils = _interopRequireWildcard(require("../tools/utilities/DataUtils.jsx"));
var DataEvent = _interopRequireWildcard(require("../tools/events/DataEvent.jsx"));
var Ease = _interopRequireWildcard(require("../tools/effects/Animate.jsx"));
var _TextEffects = _interopRequireDefault(require("../tools/effects/TextEffects.jsx"));
var _DisplayIndex = _interopRequireDefault(require("./DisplayIndex.jsx"));
var _DisplayWork = _interopRequireDefault(require("./DisplayWork.jsx"));
var _DisplayBlog = _interopRequireDefault(require("./DisplayBlog.jsx"));
var _DisplayFi = _interopRequireDefault(require("./DisplayFi.jsx"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
var DisplayClient =
/*#__PURE__*/
function () {
//--------------------------
// constructor
//--------------------------
function DisplayClient(section, page) {
_classCallCheck(this, DisplayClient);
this.section = section;
this.page = page;
this.current = null;
this.start();
} //--------------------------
// methods
//--------------------------
_createClass(DisplayClient, [{
key: "start",
value: function start() {
var self = this;
new Ease.default().object({
targets: document.getElementById('loader'),
duration: 300,
opacity: 0,
easing: 'easeInOutQuad',
complete: function complete() {
document.getElementById('loader').style.display = 'none';
document.getElementById('loader').style.visibility = 'hidden';
new Ease.default().object({
targets: document.getElementById('header'),
duration: 10,
opacity: 1,
easing: 'easeInOutQuad',
complete: function complete() {
new _TextEffects.default().scramble(document.getElementById('the-title'), 50, function () {
switch (self.section) {
case "blog":
self.current = new _DisplayBlog.default();
break;
case "work":
self.current = new _DisplayWork.default();
break;
case "fipamo":
self.current = new _DisplayFi.default();
break;
default:
self.current = new _DisplayIndex.default();
break;
}
});
}
});
}
});
} //--------------------------
// event handlers
//--------------------------
}]);
return DisplayClient;
}();
exports.default = DisplayClient;
},{"../tools/utilities/DataUtils.jsx":"tools/utilities/DataUtils.jsx","../tools/events/DataEvent.jsx":"tools/events/DataEvent.jsx","../tools/effects/Animate.jsx":"tools/effects/Animate.jsx","../tools/effects/TextEffects.jsx":"tools/effects/TextEffects.jsx","./DisplayIndex.jsx":"controllers/DisplayIndex.jsx","./DisplayWork.jsx":"controllers/DisplayWork.jsx","./DisplayBlog.jsx":"controllers/DisplayBlog.jsx","./DisplayFi.jsx":"controllers/DisplayFi.jsx"}],"controllers/DisplayManager.jsx":[function(require,module,exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _DataUtils = _interopRequireWildcard(require("../tools/utilities/DataUtils.jsx"));
var _DisplayAdmin = _interopRequireDefault(require("./DisplayAdmin.jsx"));
var _DisplayClient = _interopRequireDefault(require("./DisplayClient.jsx"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
var DisplayManager =
/*#__PURE__*/
function () {
//--------------------------
// constructor
//--------------------------
function DisplayManager() {
_classCallCheck(this, DisplayManager);
this.dataUtils = new _DataUtils.default();
this.currentDisplay = '';
this.urlPieces = document.URL.split("/"); //grab url so system knows what to display
this.chooseDisplay(this.urlPieces[3], this.urlPieces[4]);
} //--------------------------
// methods
//--------------------------
_createClass(DisplayManager, [{
key: "start",
value: function start() {}
}, {
key: "chooseDisplay",
value: function chooseDisplay(section, page) {
this.currentDisplay = '';
switch (section) {
case 'admin':
this.currentDisplay = new _DisplayAdmin.default(section, page);
break;
default:
this.currentDisplay = new _DisplayClient.default(section, page);
break;
}
} //--------------------------
// event handlers
//--------------------------
}]);
return DisplayManager;
}();
exports.default = DisplayManager;
},{"../tools/utilities/DataUtils.jsx":"tools/utilities/DataUtils.jsx","./DisplayAdmin.jsx":"controllers/DisplayAdmin.jsx","./DisplayClient.jsx":"controllers/DisplayClient.jsx"}],"Base.jsx":[function(require,module,exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _DataUtils = _interopRequireWildcard(require("./tools/utilities/DataUtils.jsx"));
var DataEvent = _interopRequireWildcard(require("./tools/events/DataEvent.jsx"));
var _DisplayManager = _interopRequireDefault(require("./controllers/DisplayManager.jsx"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
var Base =
/*#__PURE__*/
function () {
//--------------------------
// constructor
//--------------------------
//TODO: Flip to unified structure defined in BMG, brah
function Base() {
_classCallCheck(this, Base);
var self = this;
var admin = [];
var folio = [];
var displayManager = [];
this.dataUtils = new _DataUtils.default();
this.settings = [];
this.start();
}
_createClass(Base, [{
key: "start",
value: function start() {
this.displayManager = new _DisplayManager.default();
} //--------------------------
// methods
//--------------------------
}, {
key: "loadSettings",
value: function loadSettings() {
var _this = this;
var self = this;
this.dataUtils.request('/base-assets/data/settings.json', DataEvent.SETTINGS_LOADED).then(function (response) {
_this.settings = JSON.parse(response['request'].response);
_this.start(); //transfer
}).catch(function (err) {//console.log(err);
});
} //--------------------------
// event handlers
//--------------------------
}]);
return Base;
}();
exports.default = Base;
},{"./tools/utilities/DataUtils.jsx":"tools/utilities/DataUtils.jsx","./tools/events/DataEvent.jsx":"tools/events/DataEvent.jsx","./controllers/DisplayManager.jsx":"controllers/DisplayManager.jsx"}],"Start.jsx":[function(require,module,exports) {
"use strict";
var _Base = _interopRequireDefault(require("./Base.jsx"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
document.addEventListener('DOMContentLoaded', function () {
var base = new _Base.default();
}, false);
},{"./Base.jsx":"Base.jsx"}],"../../../../../../../.nvm/versions/node/v8.12.0/lib/node_modules/parcel-bundler/src/builtins/hmr-runtime.js":[function(require,module,exports) {
var global = arguments[3];
var OVERLAY_ID = '__parcel__error__overlay__';
var OldModule = module.bundle.Module;
function Module(moduleName) {
OldModule.call(this, moduleName);
this.hot = {
data: module.bundle.hotData,
_acceptCallbacks: [],
_disposeCallbacks: [],
accept: function (fn) {
this._acceptCallbacks.push(fn || function () {});
},
dispose: function (fn) {
this._disposeCallbacks.push(fn);
}
};
module.bundle.hotData = null;
}
module.bundle.Module = Module;
var parent = module.bundle.parent;
if ((!parent || !parent.isParcelRequire) && typeof WebSocket !== 'undefined') {
var hostname = "" || location.hostname;
var protocol = location.protocol === 'https:' ? 'wss' : 'ws';
var ws = new WebSocket(protocol + '://' + hostname + ':' + "59221" + '/');
ws.onmessage = function (event) {
var data = JSON.parse(event.data);
if (data.type === 'update') {
console.clear();
data.assets.forEach(function (asset) {
hmrApply(global.parcelRequire, asset);
});
data.assets.forEach(function (asset) {
if (!asset.isNew) {
hmrAccept(global.parcelRequire, asset.id);
}
});
}
if (data.type === 'reload') {
ws.close();
ws.onclose = function () {
location.reload();
};
}
if (data.type === 'error-resolved') {
console.log('[parcel] ✨ Error resolved');
removeErrorOverlay();
}
if (data.type === 'error') {
console.error('[parcel] 🚨 ' + data.error.message + '\n' + data.error.stack);
removeErrorOverlay();
var overlay = createErrorOverlay(data);
document.body.appendChild(overlay);
}
};
}
function removeErrorOverlay() {
var overlay = document.getElementById(OVERLAY_ID);
if (overlay) {
overlay.remove();
}
}
function createErrorOverlay(data) {
var overlay = document.createElement('div');
overlay.id = OVERLAY_ID; // html encode message and stack trace
var message = document.createElement('div');
var stackTrace = document.createElement('pre');
message.innerText = data.error.message;
stackTrace.innerText = data.error.stack;
overlay.innerHTML = '<div style="background: black; font-size: 16px; color: white; position: fixed; height: 100%; width: 100%; top: 0px; left: 0px; padding: 30px; opacity: 0.85; font-family: Menlo, Consolas, monospace; z-index: 9999;">' + '<span style="background: red; padding: 2px 4px; border-radius: 2px;">ERROR</span>' + '<span style="top: 2px; margin-left: 5px; position: relative;">🚨</span>' + '<div style="font-size: 18px; font-weight: bold; margin-top: 20px;">' + message.innerHTML + '</div>' + '<pre>' + stackTrace.innerHTML + '</pre>' + '</div>';
return overlay;
}
function getParents(bundle, id) {
var modules = bundle.modules;
if (!modules) {
return [];
}
var parents = [];
var k, d, dep;
for (k in modules) {
for (d in modules[k][1]) {
dep = modules[k][1][d];
if (dep === id || Array.isArray(dep) && dep[dep.length - 1] === id) {
parents.push(k);
}
}
}
if (bundle.parent) {
parents = parents.concat(getParents(bundle.parent, id));
}
return parents;
}
function hmrApply(bundle, asset) {
var modules = bundle.modules;
if (!modules) {
return;
}
if (modules[asset.id] || !bundle.parent) {
var fn = new Function('require', 'module', 'exports', asset.generated.js);
asset.isNew = !modules[asset.id];
modules[asset.id] = [fn, asset.deps];
} else if (bundle.parent) {
hmrApply(bundle.parent, asset);
}
}
function hmrAccept(bundle, id) {
var modules = bundle.modules;
if (!modules) {
return;
}
if (!modules[id] && bundle.parent) {
return hmrAccept(bundle.parent, id);
}
var cached = bundle.cache[id];
bundle.hotData = {};
if (cached) {
cached.hot.data = bundle.hotData;
}
if (cached && cached.hot && cached.hot._disposeCallbacks.length) {
cached.hot._disposeCallbacks.forEach(function (cb) {
cb(bundle.hotData);
});
}
delete bundle.cache[id];
bundle(id);
cached = bundle.cache[id];
if (cached && cached.hot && cached.hot._acceptCallbacks.length) {
cached.hot._acceptCallbacks.forEach(function (cb) {
cb();
});
return true;
}
return getParents(global.parcelRequire, id).some(function (id) {
return hmrAccept(global.parcelRequire, id);
});
}
},{}]},{},["../../../../../../../.nvm/versions/node/v8.12.0/lib/node_modules/parcel-bundler/src/builtins/hmr-runtime.js","Start.jsx"], null)
//# sourceMappingURL=/default/assets/js/start.min.map