mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-08 23:46:24 -06:00
Add the full source of BambuStudio
using version 1.0.10
This commit is contained in:
parent
30bcadab3e
commit
1555904bef
3771 changed files with 1251328 additions and 0 deletions
163
resources/web/guide/swiper/node_modules/ssr-window/ssr-window.umd.js
generated
vendored
Normal file
163
resources/web/guide/swiper/node_modules/ssr-window/ssr-window.umd.js
generated
vendored
Normal file
|
@ -0,0 +1,163 @@
|
|||
/**
|
||||
* SSR Window 4.0.1
|
||||
* Better handling for window object in SSR environment
|
||||
* https://github.com/nolimits4web/ssr-window
|
||||
*
|
||||
* Copyright 2021, Vladimir Kharlampidi
|
||||
*
|
||||
* Licensed under MIT
|
||||
*
|
||||
* Released on: October 27, 2021
|
||||
*/
|
||||
(function (global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
||||
typeof define === 'function' && define.amd ? define(['exports'], factory) :
|
||||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.ssrWindow = {}));
|
||||
}(this, (function (exports) { 'use strict';
|
||||
|
||||
/* eslint-disable no-param-reassign */
|
||||
function isObject(obj) {
|
||||
return (obj !== null &&
|
||||
typeof obj === 'object' &&
|
||||
'constructor' in obj &&
|
||||
obj.constructor === Object);
|
||||
}
|
||||
function extend(target = {}, src = {}) {
|
||||
Object.keys(src).forEach((key) => {
|
||||
if (typeof target[key] === 'undefined')
|
||||
target[key] = src[key];
|
||||
else if (isObject(src[key]) &&
|
||||
isObject(target[key]) &&
|
||||
Object.keys(src[key]).length > 0) {
|
||||
extend(target[key], src[key]);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
const ssrDocument = {
|
||||
body: {},
|
||||
addEventListener() { },
|
||||
removeEventListener() { },
|
||||
activeElement: {
|
||||
blur() { },
|
||||
nodeName: '',
|
||||
},
|
||||
querySelector() {
|
||||
return null;
|
||||
},
|
||||
querySelectorAll() {
|
||||
return [];
|
||||
},
|
||||
getElementById() {
|
||||
return null;
|
||||
},
|
||||
createEvent() {
|
||||
return {
|
||||
initEvent() { },
|
||||
};
|
||||
},
|
||||
createElement() {
|
||||
return {
|
||||
children: [],
|
||||
childNodes: [],
|
||||
style: {},
|
||||
setAttribute() { },
|
||||
getElementsByTagName() {
|
||||
return [];
|
||||
},
|
||||
};
|
||||
},
|
||||
createElementNS() {
|
||||
return {};
|
||||
},
|
||||
importNode() {
|
||||
return null;
|
||||
},
|
||||
location: {
|
||||
hash: '',
|
||||
host: '',
|
||||
hostname: '',
|
||||
href: '',
|
||||
origin: '',
|
||||
pathname: '',
|
||||
protocol: '',
|
||||
search: '',
|
||||
},
|
||||
};
|
||||
function getDocument() {
|
||||
const doc = typeof document !== 'undefined' ? document : {};
|
||||
extend(doc, ssrDocument);
|
||||
return doc;
|
||||
}
|
||||
|
||||
const ssrWindow = {
|
||||
document: ssrDocument,
|
||||
navigator: {
|
||||
userAgent: '',
|
||||
},
|
||||
location: {
|
||||
hash: '',
|
||||
host: '',
|
||||
hostname: '',
|
||||
href: '',
|
||||
origin: '',
|
||||
pathname: '',
|
||||
protocol: '',
|
||||
search: '',
|
||||
},
|
||||
history: {
|
||||
replaceState() { },
|
||||
pushState() { },
|
||||
go() { },
|
||||
back() { },
|
||||
},
|
||||
CustomEvent: function CustomEvent() {
|
||||
return this;
|
||||
},
|
||||
addEventListener() { },
|
||||
removeEventListener() { },
|
||||
getComputedStyle() {
|
||||
return {
|
||||
getPropertyValue() {
|
||||
return '';
|
||||
},
|
||||
};
|
||||
},
|
||||
Image() { },
|
||||
Date() { },
|
||||
screen: {},
|
||||
setTimeout() { },
|
||||
clearTimeout() { },
|
||||
matchMedia() {
|
||||
return {};
|
||||
},
|
||||
requestAnimationFrame(callback) {
|
||||
if (typeof setTimeout === 'undefined') {
|
||||
callback();
|
||||
return null;
|
||||
}
|
||||
return setTimeout(callback, 0);
|
||||
},
|
||||
cancelAnimationFrame(id) {
|
||||
if (typeof setTimeout === 'undefined') {
|
||||
return;
|
||||
}
|
||||
clearTimeout(id);
|
||||
},
|
||||
};
|
||||
function getWindow() {
|
||||
const win = typeof window !== 'undefined' ? window : {};
|
||||
extend(win, ssrWindow);
|
||||
return win;
|
||||
}
|
||||
|
||||
exports.extend = extend;
|
||||
exports.getDocument = getDocument;
|
||||
exports.getWindow = getWindow;
|
||||
exports.ssrDocument = ssrDocument;
|
||||
exports.ssrWindow = ssrWindow;
|
||||
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
||||
})));
|
||||
//# sourceMappingURL=ssr-window.umd.js.map
|
Loading…
Add table
Add a link
Reference in a new issue