silverstripe-webpack/app/client/dist/js/sample.js

1 line
64 KiB
JavaScript
Raw Normal View History

2021-09-13 00:24:40 +02:00
!function(){var e={779:function(e,t,n){var r={"./bg.png":347,"./logo.png":529,"./logo.svg":206,"./original.png":932,"./original2.png":939,"./photo1.png":290,"./photo2.jpg":781,"./photo3.svg":926,"app/client/src/img/bg.png":347,"app/client/src/img/logo.png":529,"app/client/src/img/logo.svg":206,"app/client/src/img/original.png":932,"app/client/src/img/original2.png":939,"app/client/src/img/photo1.png":290,"app/client/src/img/photo2.jpg":781,"app/client/src/img/photo3.svg":926,"bg.png":347,"img/bg.png":347,"img/logo.png":529,"img/logo.svg":206,"img/original.png":932,"img/original2.png":939,"img/photo1.png":290,"img/photo2.jpg":781,"img/photo3.svg":926,"logo.png":529,"logo.svg":206,"original.png":932,"original2.png":939,"photo1.png":290,"photo2.jpg":781,"photo3.svg":926};function webpackContext(e){var t=webpackContextResolve(e);return n(t)}function webpackContextResolve(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}webpackContext.keys=function webpackContextKeys(){return Object.keys(r)},webpackContext.resolve=webpackContextResolve,e.exports=webpackContext,webpackContext.id=779},37:function(e,t,n){"use strict";var r="ajax-load",o="load";function _toConsumableArray(e){return function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}(e)||function _iterableToArray(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function _unsupportedIterableToArray(e,t){if(!e)return;if("string"===typeof e)return _arrayLikeToArray(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(e,t)}(e)||function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _defineProperty(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var a=window,i=n(916),s=function(){function MetaWindow(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{shown:!1},r=arguments.length>1?arguments[1]:void 0;_classCallCheck(this,MetaWindow),_defineProperty(this,"state",{content:"",type:["empty"],shown:!1,loading:!1,error:!1,embed:!1,collections:[],current:null,target:null}),_defineProperty(this,"show",(function(){var t=e;console.log("".concat(t.name,": show")),t.setState({shown:!0}),a.dispatchEvent(new Event("{ui.name}.show"))})),_defineProperty(this,"hide",(function(){var t=e;console.log("".concat(t.name,": hide")),t.setState({shown:!1}),a.dispatchEvent(new Event("{ui.name}.hide"))})),_defineProperty(this,"next",(function(){var t=e,n=t.state.current.getAttribute("data-gallery"),r=t._currIndex();r<t.state.collections[n].length-1?r++:r=0,t.state.collections[n][r].click(),console.log("".concat(t.name,": next")),a.dispatchEvent(new Event("{ui.name}.next"))})),_defineProperty(this,"prev",(function(){var t=e,n=t.state.current.getAttribute("data-gallery"),r=t._currIndex();r>0?r--:r=t.state.collections[n].length-1,t.state.collections[n][r].click(),console.log("".concat(t.name,": prev")),a.dispatchEvent(new Event("{ui.name}.prev"))})),_defineProperty(this,"reset",(function(){e.setState({content:"",type:["empty"],shown:!1,loading:!1,error:!1,embed:!1})})),_defineProperty(this,"load",(function(t){var n=e,r=n.axios;n.reset(),n.setState({loading:!0}),n.show(),r.get(t,{responseType:"arraybuffer"}).then((function(e){console.log("".concat(n.name,