$29 GRAYBYTE WORDPRESS FILE MANAGER $20

SERVER : premium134.web-hosting.com #1 SMP Thu Mar 13 14:29:12 UTC 2025
SERVER IP : 162.0.232.104 | ADMIN IP 216.73.216.173
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/home/raydofqv/raydget.vip/wp-content/plugins/3d-viewer/build/

HOME
Current File : /home/raydofqv/raydget.vip/wp-content/plugins/3d-viewer/build//frontend.js
(()=>{var e={143:e=>{e.exports=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then}},508:(e,t,r)=>{const n=r(4839),o=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],i=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];t.getBlocksCount=function(e,t){switch(t){case n.L:return o[4*(e-1)+0];case n.M:return o[4*(e-1)+1];case n.Q:return o[4*(e-1)+2];case n.H:return o[4*(e-1)+3];default:return}},t.getTotalCodewordsCount=function(e,t){switch(t){case n.L:return i[4*(e-1)+0];case n.M:return i[4*(e-1)+1];case n.Q:return i[4*(e-1)+2];case n.H:return i[4*(e-1)+3];default:return}}},1137:(e,t)=>{const r=new Uint8Array(512),n=new Uint8Array(256);!function(){let e=1;for(let t=0;t<255;t++)r[t]=e,n[e]=t,e<<=1,256&e&&(e^=285);for(let e=255;e<512;e++)r[e]=r[e-255]}(),t.log=function(e){if(e<1)throw new Error("log("+e+")");return n[e]},t.exp=function(e){return r[e]},t.mul=function(e,t){return 0===e||0===t?0:r[n[e]+n[t]]}},1617:(e,t,r)=>{const n=r(6860),o=r(508),i=r(4839),a=r(2914),s=r(6248),l=n.getBCHDigit(7973);function c(e,t){return a.getCharCountIndicator(e,t)+4}function u(e,t){let r=0;return e.forEach(function(e){const n=c(e.mode,t);r+=n+e.getBitsLength()}),r}t.from=function(e,t){return s.isValid(e)?parseInt(e,10):t},t.getCapacity=function(e,t,r){if(!s.isValid(e))throw new Error("Invalid QR Code version");void 0===r&&(r=a.BYTE);const i=8*(n.getSymbolTotalCodewords(e)-o.getTotalCodewordsCount(e,t));if(r===a.MIXED)return i;const l=i-c(r,e);switch(r){case a.NUMERIC:return Math.floor(l/10*3);case a.ALPHANUMERIC:return Math.floor(l/11*2);case a.KANJI:return Math.floor(l/13);case a.BYTE:default:return Math.floor(l/8)}},t.getBestVersionForData=function(e,r){let n;const o=i.from(r,i.M);if(Array.isArray(e)){if(e.length>1)return function(e,r){for(let n=1;n<=40;n++)if(u(e,n)<=t.getCapacity(n,r,a.MIXED))return n}(e,o);if(0===e.length)return 1;n=e[0]}else n=e;return function(e,r,n){for(let o=1;o<=40;o++)if(r<=t.getCapacity(o,n,e))return o}(n.mode,n.getLength(),o)},t.getEncodedBits=function(e){if(!s.isValid(e)||e<7)throw new Error("Invalid QR Code version");let t=e<<12;for(;n.getBCHDigit(t)-l>=0;)t^=7973<<n.getBCHDigit(t)-l;return e<<12|t}},2914:(e,t,r)=>{const n=r(6248),o=r(3038);t.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function(e,t){if(!e.ccBits)throw new Error("Invalid mode: "+e);if(!n.isValid(t))throw new Error("Invalid version: "+t);return t>=1&&t<10?e.ccBits[0]:t<27?e.ccBits[1]:e.ccBits[2]},t.getBestModeForData=function(e){return o.testNumeric(e)?t.NUMERIC:o.testAlphanumeric(e)?t.ALPHANUMERIC:o.testKanji(e)?t.KANJI:t.BYTE},t.toString=function(e){if(e&&e.id)return e.id;throw new Error("Invalid mode")},t.isValid=function(e){return e&&e.bit&&e.ccBits},t.from=function(e,r){if(t.isValid(e))return e;try{return function(e){if("string"!=typeof e)throw new Error("Param is not a string");switch(e.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw new Error("Unknown mode: "+e)}}(e)}catch(e){return r}}},3038:(e,t)=>{const r="[0-9]+";let n="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";n=n.replace(/u/g,"\\u");const o="(?:(?![A-Z0-9 $%*+\\-./:]|"+n+")(?:.|[\r\n]))+";t.KANJI=new RegExp(n,"g"),t.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),t.BYTE=new RegExp(o,"g"),t.NUMERIC=new RegExp(r,"g"),t.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");const i=new RegExp("^"+n+"$"),a=new RegExp("^"+r+"$"),s=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");t.testKanji=function(e){return i.test(e)},t.testNumeric=function(e){return a.test(e)},t.testAlphanumeric=function(e){return s.test(e)}},3359:(e,t,r)=>{const n=r(6860),o=r(4839),i=r(3645),a=r(9762),s=r(3947),l=r(9478),c=r(7874),u=r(508),d=r(8706),m=r(1617),h=r(8015),f=r(2914),p=r(4991);function g(e,t,r){const n=e.size,o=h.getEncodedBits(t,r);let i,a;for(i=0;i<15;i++)a=1==(o>>i&1),i<6?e.set(i,8,a,!0):i<8?e.set(i+1,8,a,!0):e.set(n-15+i,8,a,!0),i<8?e.set(8,n-i-1,a,!0):i<9?e.set(8,15-i-1+1,a,!0):e.set(8,15-i-1,a,!0);e.set(n-8,8,1,!0)}function w(e,t,r,o){let h;if(Array.isArray(e))h=p.fromArray(e);else{if("string"!=typeof e)throw new Error("Invalid data");{let n=t;if(!n){const t=p.rawSplit(e);n=m.getBestVersionForData(t,r)}h=p.fromString(e,n||40)}}const w=m.getBestVersionForData(h,r);if(!w)throw new Error("The amount of data is too big to be stored in a QR Code");if(t){if(t<w)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+w+".\n")}else t=w;const b=function(e,t,r){const o=new i;r.forEach(function(t){o.put(t.mode.bit,4),o.put(t.getLength(),f.getCharCountIndicator(t.mode,e)),t.write(o)});const a=8*(n.getSymbolTotalCodewords(e)-u.getTotalCodewordsCount(e,t));for(o.getLengthInBits()+4<=a&&o.put(0,4);o.getLengthInBits()%8!=0;)o.putBit(0);const s=(a-o.getLengthInBits())/8;for(let e=0;e<s;e++)o.put(e%2?17:236,8);return function(e,t,r){const o=n.getSymbolTotalCodewords(t),i=o-u.getTotalCodewordsCount(t,r),a=u.getBlocksCount(t,r),s=a-o%a,l=Math.floor(o/a),c=Math.floor(i/a),m=c+1,h=l-c,f=new d(h);let p=0;const g=new Array(a),w=new Array(a);let b=0;const y=new Uint8Array(e.buffer);for(let e=0;e<a;e++){const t=e<s?c:m;g[e]=y.slice(p,p+t),w[e]=f.encode(g[e]),p+=t,b=Math.max(b,t)}const v=new Uint8Array(o);let E,x,C=0;for(E=0;E<b;E++)for(x=0;x<a;x++)E<g[x].length&&(v[C++]=g[x][E]);for(E=0;E<h;E++)for(x=0;x<a;x++)v[C++]=w[x][E];return v}(o,e,t)}(t,r,h),y=n.getSymbolSize(t),v=new a(y);return function(e,t){const r=e.size,n=l.getPositions(t);for(let t=0;t<n.length;t++){const o=n[t][0],i=n[t][1];for(let t=-1;t<=7;t++)if(!(o+t<=-1||r<=o+t))for(let n=-1;n<=7;n++)i+n<=-1||r<=i+n||(t>=0&&t<=6&&(0===n||6===n)||n>=0&&n<=6&&(0===t||6===t)||t>=2&&t<=4&&n>=2&&n<=4?e.set(o+t,i+n,!0,!0):e.set(o+t,i+n,!1,!0))}}(v,t),function(e){const t=e.size;for(let r=8;r<t-8;r++){const t=r%2==0;e.set(r,6,t,!0),e.set(6,r,t,!0)}}(v),function(e,t){const r=s.getPositions(t);for(let t=0;t<r.length;t++){const n=r[t][0],o=r[t][1];for(let t=-2;t<=2;t++)for(let r=-2;r<=2;r++)-2===t||2===t||-2===r||2===r||0===t&&0===r?e.set(n+t,o+r,!0,!0):e.set(n+t,o+r,!1,!0)}}(v,t),g(v,r,0),t>=7&&function(e,t){const r=e.size,n=m.getEncodedBits(t);let o,i,a;for(let t=0;t<18;t++)o=Math.floor(t/3),i=t%3+r-8-3,a=1==(n>>t&1),e.set(o,i,a,!0),e.set(i,o,a,!0)}(v,t),function(e,t){const r=e.size;let n=-1,o=r-1,i=7,a=0;for(let s=r-1;s>0;s-=2)for(6===s&&s--;;){for(let r=0;r<2;r++)if(!e.isReserved(o,s-r)){let n=!1;a<t.length&&(n=1==(t[a]>>>i&1)),e.set(o,s-r,n),i--,-1===i&&(a++,i=7)}if(o+=n,o<0||r<=o){o-=n,n=-n;break}}}(v,b),isNaN(o)&&(o=c.getBestMask(v,g.bind(null,v,r))),c.applyMask(o,v),g(v,r,o),{modules:v,version:t,errorCorrectionLevel:r,maskPattern:o,segments:h}}t.create=function(e,t){if(void 0===e||""===e)throw new Error("No input text");let r,i,a=o.M;return void 0!==t&&(a=o.from(t.errorCorrectionLevel,o.M),r=m.from(t.version),i=c.from(t.maskPattern),t.toSJISFunc&&n.setToSJISFunction(t.toSJISFunc)),w(e,r,a,i)}},3645:e=>{function t(){this.buffer=[],this.length=0}t.prototype={get:function(e){const t=Math.floor(e/8);return 1==(this.buffer[t]>>>7-e%8&1)},put:function(e,t){for(let r=0;r<t;r++)this.putBit(1==(e>>>t-r-1&1))},getLengthInBits:function(){return this.length},putBit:function(e){const t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},e.exports=t},3781:(e,t,r)=>{const n=r(5968);t.render=function(e,t,r){let o=r,i=t;void 0!==o||t&&t.getContext||(o=t,t=void 0),t||(i=function(){try{return document.createElement("canvas")}catch(e){throw new Error("You need to specify a canvas element")}}()),o=n.getOptions(o);const a=n.getImageWidth(e.modules.size,o),s=i.getContext("2d"),l=s.createImageData(a,a);return n.qrToImageData(l.data,e,o),function(e,t,r){e.clearRect(0,0,t.width,t.height),t.style||(t.style={}),t.height=r,t.width=r,t.style.height=r+"px",t.style.width=r+"px"}(s,i,a),s.putImageData(l,0,0),i},t.renderToDataURL=function(e,r,n){let o=n;void 0!==o||r&&r.getContext||(o=r,r=void 0),o||(o={});const i=t.render(e,r,o),a=o.type||"image/png",s=o.rendererOpts||{};return i.toDataURL(a,s.quality)}},3947:(e,t,r)=>{const n=r(6860).getSymbolSize;t.getRowColCoords=function(e){if(1===e)return[];const t=Math.floor(e/7)+2,r=n(e),o=145===r?26:2*Math.ceil((r-13)/(2*t-2)),i=[r-7];for(let e=1;e<t-1;e++)i[e]=i[e-1]-o;return i.push(6),i.reverse()},t.getPositions=function(e){const r=[],n=t.getRowColCoords(e),o=n.length;for(let e=0;e<o;e++)for(let t=0;t<o;t++)0===e&&0===t||0===e&&t===o-1||e===o-1&&0===t||r.push([n[e],n[t]]);return r}},4207:(e,t,r)=>{const n=r(2914);function o(e){this.mode=n.NUMERIC,this.data=e.toString()}o.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(e){let t,r,n;for(t=0;t+3<=this.data.length;t+=3)r=this.data.substr(t,3),n=parseInt(r,10),e.put(n,10);const o=this.data.length-t;o>0&&(r=this.data.substr(t),n=parseInt(r,10),e.put(n,3*o+1))},e.exports=o},4839:(e,t)=>{t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2},t.isValid=function(e){return e&&void 0!==e.bit&&e.bit>=0&&e.bit<4},t.from=function(e,r){if(t.isValid(e))return e;try{return function(e){if("string"!=typeof e)throw new Error("Param is not a string");switch(e.toLowerCase()){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw new Error("Unknown EC Level: "+e)}}(e)}catch(e){return r}}},4991:(e,t,r)=>{const n=r(2914),o=r(4207),i=r(6775),a=r(7924),s=r(9759),l=r(3038),c=r(6860),u=r(5549);function d(e){return unescape(encodeURIComponent(e)).length}function m(e,t,r){const n=[];let o;for(;null!==(o=e.exec(r));)n.push({data:o[0],index:o.index,mode:t,length:o[0].length});return n}function h(e){const t=m(l.NUMERIC,n.NUMERIC,e),r=m(l.ALPHANUMERIC,n.ALPHANUMERIC,e);let o,i;return c.isKanjiModeEnabled()?(o=m(l.BYTE,n.BYTE,e),i=m(l.KANJI,n.KANJI,e)):(o=m(l.BYTE_KANJI,n.BYTE,e),i=[]),t.concat(r,o,i).sort(function(e,t){return e.index-t.index}).map(function(e){return{data:e.data,mode:e.mode,length:e.length}})}function f(e,t){switch(t){case n.NUMERIC:return o.getBitsLength(e);case n.ALPHANUMERIC:return i.getBitsLength(e);case n.KANJI:return s.getBitsLength(e);case n.BYTE:return a.getBitsLength(e)}}function p(e,t){let r;const l=n.getBestModeForData(e);if(r=n.from(t,l),r!==n.BYTE&&r.bit<l.bit)throw new Error('"'+e+'" cannot be encoded with mode '+n.toString(r)+".\n Suggested mode is: "+n.toString(l));switch(r!==n.KANJI||c.isKanjiModeEnabled()||(r=n.BYTE),r){case n.NUMERIC:return new o(e);case n.ALPHANUMERIC:return new i(e);case n.KANJI:return new s(e);case n.BYTE:return new a(e)}}t.fromArray=function(e){return e.reduce(function(e,t){return"string"==typeof t?e.push(p(t,null)):t.data&&e.push(p(t.data,t.mode)),e},[])},t.fromString=function(e,r){const o=function(e){const t=[];for(let r=0;r<e.length;r++){const o=e[r];switch(o.mode){case n.NUMERIC:t.push([o,{data:o.data,mode:n.ALPHANUMERIC,length:o.length},{data:o.data,mode:n.BYTE,length:o.length}]);break;case n.ALPHANUMERIC:t.push([o,{data:o.data,mode:n.BYTE,length:o.length}]);break;case n.KANJI:t.push([o,{data:o.data,mode:n.BYTE,length:d(o.data)}]);break;case n.BYTE:t.push([{data:o.data,mode:n.BYTE,length:d(o.data)}])}}return t}(h(e,c.isKanjiModeEnabled())),i=function(e,t){const r={},o={start:{}};let i=["start"];for(let a=0;a<e.length;a++){const s=e[a],l=[];for(let e=0;e<s.length;e++){const c=s[e],u=""+a+e;l.push(u),r[u]={node:c,lastCount:0},o[u]={};for(let e=0;e<i.length;e++){const a=i[e];r[a]&&r[a].node.mode===c.mode?(o[a][u]=f(r[a].lastCount+c.length,c.mode)-f(r[a].lastCount,c.mode),r[a].lastCount+=c.length):(r[a]&&(r[a].lastCount=c.length),o[a][u]=f(c.length,c.mode)+4+n.getCharCountIndicator(c.mode,t))}}i=l}for(let e=0;e<i.length;e++)o[i[e]].end=0;return{map:o,table:r}}(o,r),a=u.find_path(i.map,"start","end"),s=[];for(let e=1;e<a.length-1;e++)s.push(i.table[a[e]].node);return t.fromArray(s.reduce(function(e,t){const r=e.length-1>=0?e[e.length-1]:null;return r&&r.mode===t.mode?(e[e.length-1].data+=t.data,e):(e.push(t),e)},[]))},t.rawSplit=function(e){return t.fromArray(h(e,c.isKanjiModeEnabled()))}},5267:(e,t,r)=>{const n=r(1137);t.mul=function(e,t){const r=new Uint8Array(e.length+t.length-1);for(let o=0;o<e.length;o++)for(let i=0;i<t.length;i++)r[o+i]^=n.mul(e[o],t[i]);return r},t.mod=function(e,t){let r=new Uint8Array(e);for(;r.length-t.length>=0;){const e=r[0];for(let o=0;o<t.length;o++)r[o]^=n.mul(t[o],e);let o=0;for(;o<r.length&&0===r[o];)o++;r=r.slice(o)}return r},t.generateECPolynomial=function(e){let r=new Uint8Array([1]);for(let o=0;o<e;o++)r=t.mul(r,new Uint8Array([1,n.exp(o)]));return r}},5549:e=>{"use strict";var t={single_source_shortest_paths:function(e,r,n){var o={},i={};i[r]=0;var a,s,l,c,u,d,m,h=t.PriorityQueue.make();for(h.push(r,0);!h.empty();)for(l in s=(a=h.pop()).value,c=a.cost,u=e[s]||{})u.hasOwnProperty(l)&&(d=c+u[l],m=i[l],(void 0===i[l]||m>d)&&(i[l]=d,h.push(l,d),o[l]=s));if(void 0!==n&&void 0===i[n]){var f=["Could not find a path from ",r," to ",n,"."].join("");throw new Error(f)}return o},extract_shortest_path_from_predecessor_list:function(e,t){for(var r=[],n=t;n;)r.push(n),e[n],n=e[n];return r.reverse(),r},find_path:function(e,r,n){var o=t.single_source_shortest_paths(e,r,n);return t.extract_shortest_path_from_predecessor_list(o,n)},PriorityQueue:{make:function(e){var r,n=t.PriorityQueue,o={};for(r in e=e||{},n)n.hasOwnProperty(r)&&(o[r]=n[r]);return o.queue=[],o.sorter=e.sorter||n.default_sorter,o},default_sorter:function(e,t){return e.cost-t.cost},push:function(e,t){var r={value:e,cost:t};this.queue.push(r),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};e.exports=t},5968:(e,t)=>{function r(e){if("number"==typeof e&&(e=e.toString()),"string"!=typeof e)throw new Error("Color should be defined as hex string");let t=e.slice().replace("#","").split("");if(t.length<3||5===t.length||t.length>8)throw new Error("Invalid hex color: "+e);3!==t.length&&4!==t.length||(t=Array.prototype.concat.apply([],t.map(function(e){return[e,e]}))),6===t.length&&t.push("F","F");const r=parseInt(t.join(""),16);return{r:r>>24&255,g:r>>16&255,b:r>>8&255,a:255&r,hex:"#"+t.slice(0,6).join("")}}t.getOptions=function(e){e||(e={}),e.color||(e.color={});const t=void 0===e.margin||null===e.margin||e.margin<0?4:e.margin,n=e.width&&e.width>=21?e.width:void 0,o=e.scale||4;return{width:n,scale:n?4:o,margin:t,color:{dark:r(e.color.dark||"#000000ff"),light:r(e.color.light||"#ffffffff")},type:e.type,rendererOpts:e.rendererOpts||{}}},t.getScale=function(e,t){return t.width&&t.width>=e+2*t.margin?t.width/(e+2*t.margin):t.scale},t.getImageWidth=function(e,r){const n=t.getScale(e,r);return Math.floor((e+2*r.margin)*n)},t.qrToImageData=function(e,r,n){const o=r.modules.size,i=r.modules.data,a=t.getScale(o,n),s=Math.floor((o+2*n.margin)*a),l=n.margin*a,c=[n.color.light,n.color.dark];for(let t=0;t<s;t++)for(let r=0;r<s;r++){let u=4*(t*s+r),d=n.color.light;t>=l&&r>=l&&t<s-l&&r<s-l&&(d=c[i[Math.floor((t-l)/a)*o+Math.floor((r-l)/a)]?1:0]),e[u++]=d.r,e[u++]=d.g,e[u++]=d.b,e[u]=d.a}}},6248:(e,t)=>{t.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}},6775:(e,t,r)=>{const n=r(2914),o=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function i(e){this.mode=n.ALPHANUMERIC,this.data=e}i.getBitsLength=function(e){return 11*Math.floor(e/2)+e%2*6},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(e){let t;for(t=0;t+2<=this.data.length;t+=2){let r=45*o.indexOf(this.data[t]);r+=o.indexOf(this.data[t+1]),e.put(r,11)}this.data.length%2&&e.put(o.indexOf(this.data[t]),6)},e.exports=i},6860:(e,t)=>{let r;const n=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];t.getSymbolSize=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return 4*e+17},t.getSymbolTotalCodewords=function(e){return n[e]},t.getBCHDigit=function(e){let t=0;for(;0!==e;)t++,e>>>=1;return t},t.setToSJISFunction=function(e){if("function"!=typeof e)throw new Error('"toSJISFunc" is not a valid function.');r=e},t.isKanjiModeEnabled=function(){return void 0!==r},t.toSJIS=function(e){return r(e)}},7874:(e,t)=>{t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};function r(e,r,n){switch(e){case t.Patterns.PATTERN000:return(r+n)%2==0;case t.Patterns.PATTERN001:return r%2==0;case t.Patterns.PATTERN010:return n%3==0;case t.Patterns.PATTERN011:return(r+n)%3==0;case t.Patterns.PATTERN100:return(Math.floor(r/2)+Math.floor(n/3))%2==0;case t.Patterns.PATTERN101:return r*n%2+r*n%3==0;case t.Patterns.PATTERN110:return(r*n%2+r*n%3)%2==0;case t.Patterns.PATTERN111:return(r*n%3+(r+n)%2)%2==0;default:throw new Error("bad maskPattern:"+e)}}t.isValid=function(e){return null!=e&&""!==e&&!isNaN(e)&&e>=0&&e<=7},t.from=function(e){return t.isValid(e)?parseInt(e,10):void 0},t.getPenaltyN1=function(e){const t=e.size;let r=0,n=0,o=0,i=null,a=null;for(let s=0;s<t;s++){n=o=0,i=a=null;for(let l=0;l<t;l++){let t=e.get(s,l);t===i?n++:(n>=5&&(r+=n-5+3),i=t,n=1),t=e.get(l,s),t===a?o++:(o>=5&&(r+=o-5+3),a=t,o=1)}n>=5&&(r+=n-5+3),o>=5&&(r+=o-5+3)}return r},t.getPenaltyN2=function(e){const t=e.size;let r=0;for(let n=0;n<t-1;n++)for(let o=0;o<t-1;o++){const t=e.get(n,o)+e.get(n,o+1)+e.get(n+1,o)+e.get(n+1,o+1);4!==t&&0!==t||r++}return 3*r},t.getPenaltyN3=function(e){const t=e.size;let r=0,n=0,o=0;for(let i=0;i<t;i++){n=o=0;for(let a=0;a<t;a++)n=n<<1&2047|e.get(i,a),a>=10&&(1488===n||93===n)&&r++,o=o<<1&2047|e.get(a,i),a>=10&&(1488===o||93===o)&&r++}return 40*r},t.getPenaltyN4=function(e){let t=0;const r=e.data.length;for(let n=0;n<r;n++)t+=e.data[n];return 10*Math.abs(Math.ceil(100*t/r/5)-10)},t.applyMask=function(e,t){const n=t.size;for(let o=0;o<n;o++)for(let i=0;i<n;i++)t.isReserved(i,o)||t.xor(i,o,r(e,i,o))},t.getBestMask=function(e,r){const n=Object.keys(t.Patterns).length;let o=0,i=1/0;for(let a=0;a<n;a++){r(a),t.applyMask(a,e);const n=t.getPenaltyN1(e)+t.getPenaltyN2(e)+t.getPenaltyN3(e)+t.getPenaltyN4(e);t.applyMask(a,e),n<i&&(i=n,o=a)}return o}},7924:(e,t,r)=>{const n=r(2914);function o(e){this.mode=n.BYTE,this.data="string"==typeof e?(new TextEncoder).encode(e):new Uint8Array(e)}o.getBitsLength=function(e){return 8*e},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(e){for(let t=0,r=this.data.length;t<r;t++)e.put(this.data[t],8)},e.exports=o},8015:(e,t,r)=>{const n=r(6860),o=n.getBCHDigit(1335);t.getEncodedBits=function(e,t){const r=e.bit<<3|t;let i=r<<10;for(;n.getBCHDigit(i)-o>=0;)i^=1335<<n.getBCHDigit(i)-o;return 21522^(r<<10|i)}},8605:(e,t,r)=>{const n=r(143),o=r(3359),i=r(3781),a=r(9274);function s(e,t,r,i,a){const s=[].slice.call(arguments,1),l=s.length,c="function"==typeof s[l-1];if(!c&&!n())throw new Error("Callback required as last argument");if(!c){if(l<1)throw new Error("Too few arguments provided");return 1===l?(r=t,t=i=void 0):2!==l||t.getContext||(i=r,r=t,t=void 0),new Promise(function(n,a){try{const a=o.create(r,i);n(e(a,t,i))}catch(e){a(e)}})}if(l<2)throw new Error("Too few arguments provided");2===l?(a=r,r=t,t=i=void 0):3===l&&(t.getContext&&void 0===a?(a=i,i=void 0):(a=i,i=r,r=t,t=void 0));try{const n=o.create(r,i);a(null,e(n,t,i))}catch(e){a(e)}}t.create=o.create,t.toCanvas=s.bind(null,i.render),t.toDataURL=s.bind(null,i.renderToDataURL),t.toString=s.bind(null,function(e,t,r){return a.render(e,r)})},8706:(e,t,r)=>{const n=r(5267);function o(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}o.prototype.initialize=function(e){this.degree=e,this.genPoly=n.generateECPolynomial(this.degree)},o.prototype.encode=function(e){if(!this.genPoly)throw new Error("Encoder not initialized");const t=new Uint8Array(e.length+this.degree);t.set(e);const r=n.mod(t,this.genPoly),o=this.degree-r.length;if(o>0){const e=new Uint8Array(this.degree);return e.set(r,o),e}return r},e.exports=o},9274:(e,t,r)=>{const n=r(5968);function o(e,t){const r=e.a/255,n=t+'="'+e.hex+'"';return r<1?n+" "+t+'-opacity="'+r.toFixed(2).slice(1)+'"':n}function i(e,t,r){let n=e+t;return void 0!==r&&(n+=" "+r),n}t.render=function(e,t,r){const a=n.getOptions(t),s=e.modules.size,l=e.modules.data,c=s+2*a.margin,u=a.color.light.a?"<path "+o(a.color.light,"fill")+' d="M0 0h'+c+"v"+c+'H0z"/>':"",d="<path "+o(a.color.dark,"stroke")+' d="'+function(e,t,r){let n="",o=0,a=!1,s=0;for(let l=0;l<e.length;l++){const c=Math.floor(l%t),u=Math.floor(l/t);c||a||(a=!0),e[l]?(s++,l>0&&c>0&&e[l-1]||(n+=a?i("M",c+r,.5+u+r):i("m",o,0),o=0,a=!1),c+1<t&&e[l+1]||(n+=i("h",s),s=0)):o++}return n}(l,s,a.margin)+'"/>',m='viewBox="0 0 '+c+" "+c+'"',h='<svg xmlns="http://www.w3.org/2000/svg" '+(a.width?'width="'+a.width+'" height="'+a.width+'" ':"")+m+' shape-rendering="crispEdges">'+u+d+"</svg>\n";return"function"==typeof r&&r(null,h),h}},9478:(e,t,r)=>{const n=r(6860).getSymbolSize;t.getPositions=function(e){const t=n(e);return[[0,0],[t-7,0],[0,t-7]]}},9759:(e,t,r)=>{const n=r(2914),o=r(6860);function i(e){this.mode=n.KANJI,this.data=e}i.getBitsLength=function(e){return 13*e},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(e){let t;for(t=0;t<this.data.length;t++){let r=o.toSJIS(this.data[t]);if(r>=33088&&r<=40956)r-=33088;else{if(!(r>=57408&&r<=60351))throw new Error("Invalid SJIS character: "+this.data[t]+"\nMake sure your charset is UTF-8");r-=49472}r=192*(r>>>8&255)+(255&r),e.put(r,13)}},e.exports=i},9762:e=>{function t(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}t.prototype.set=function(e,t,r,n){const o=e*this.size+t;this.data[o]=r,n&&(this.reservedBit[o]=!0)},t.prototype.get=function(e,t){return this.data[e*this.size+t]},t.prototype.xor=function(e,t,r){this.data[e*this.size+t]^=r},t.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]},e.exports=t}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),(()=>{var e;r.g.importScripts&&(e=r.g.location+"");var t=r.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var o=n.length-1;o>-1&&(!e||!/^http(s?):/.test(e));)e=n[o--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e})(),(()=>{"use strict";const e=window.React;window.ReactDOM;const t=function(e,t="string"){if(e){if("transparent"===e)return{r:255,g:255,b:255,a:0};if(e.includes("rgba")){const t=e.match(/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*([\d.]+)\s*)?\)$/i);if(t){const[,e,r,n,o]=t.map(Number);return{r:e,g:r,b:n,a:o<=1?255*o:o}}return null}var r=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i.exec(e.replace("#",""));return r?{r:parseInt(r[1],16),g:parseInt(r[2],16),b:parseInt(r[3],16),a:parseInt(r[4],16)?parseInt(r[4],16):0===parseInt(r[4],16)?0:255}:null}};var n=class{constructor(){this.callbacks={}}addEventListener(e,t){"function"==typeof t&&(void 0===this.callbacks[e]&&(this.callbacks[e]=[void 0]),this.callbacks[e].push(t))}on(e,t){this.addEventListener(e,t)}dispatchEvent(e,t){if(void 0===this.callbacks[e])return;let r=new n.Event;r.type=e,r.target=this,r.data=t,this.callbacks[e].forEach(e=>{"function"==typeof e&&e(r)})}},o=n;o.Event=class{constructor(){this.type="",this.target={},this.data={}}};const i=class extends o{constructor(e){super(),window.model=e,this.model=e,this.copy=null,this.thumbnailsById=new Map,this.thumbnail_size=256,this.textures={},this.texturesArray=[],this.textureChannels=[],this.defaultMaterialData=null,this.initialized=!1,this.sizes={},this.readyCallbacks=[],this.isReady=!1,this.modelUrl="",this.model.loaded?this.onLoad():this.model.addEventListener("load",this.onLoad.bind(this))}initialize(){this.isReady=!0,this.readyCallbacks.forEach(e=>e()),this.readyCallbacks=[]}onReady(e){this.isReady?e():this.readyCallbacks.push(e)}async onLoad(){if(this.modelUrl=this.model.src,this.getDefaultMaterialData(),this.thumbnailsById=await this.createThumbnails(),window.pagenow){const e=await this.loadModelWithoutAppending(this.model.src+"?"+Date.now());this.copy=e;const t=await this.createThumbnails(new Map,this.copy.model?.materials);this.copy.thumbnailsById=t,this.dispatchEvent("ready")}this.initialize()}getTextureId(e){var t,r;return null!==(t=null!==(r=e.uri)&&void 0!==r?r:e.bufferView?.toString())&&void 0!==t?t:""}async getTextures(){return 0===Object.keys(this.textures).length&&this.model&&await this.createThumbnails(),this.textures}async getBlobFileSize(e){try{const t=await fetch(e);if(!t.ok)throw new Error("Failed to fetch the Blob URL");return(await t.blob()).size}catch(e){return console.error("Error getting Blob file size:",e),null}}async pushThumbnail(e,t){const{texture:r}=t||{};if(!r||!r.source)return null;const n=this.getTextureId(r.source);if(!e.has(n)){const t=await r.source.createThumbnail(this.thumbnail_size,this.thumbnail_size),o=await this.getBlobFileSize(t);e.set(n,{objectUrl:t,texture:r,size:null!=o?o:0,id:n}),this.textures[n]||(this.texturesArray.push(n),this.textures[n]=t,this.sizes[n+"_"+o]=t)}return n}async createThumbnails(e,t=this.model.model?.materials){e||(e=new Map);for(const r of t||[]){await r.ensureLoaded();const{pbrMetallicRoughness:t,normalTexture:n,emissiveTexture:o,occlusionTexture:i}=r,{baseColorTexture:a,metallicRoughnessTexture:s}=t;await this.pushThumbnail(e,n),await this.pushThumbnail(e,o),await this.pushThumbnail(e,i),await this.pushThumbnail(e,a),await this.pushThumbnail(e,s)}return e}getAllMaterialData(){if(!this.model.model)return console.warn("Model not loaded yet."),{};const e={};return this.model.model.materials.forEach(async t=>{await t.ensureLoaded();const r=t.name||`Material_${Math.random().toString(36).substr(2,5)}`;e[r]={baseColor:{texture:{name:t.pbrMetallicRoughness.baseColorTexture?.texture?.source.name||null,uri:t.pbrMetallicRoughness.baseColorTexture?.texture?.source.uri||null},factor:t.pbrMetallicRoughness.baseColorFactor||[1,1,1,1]},metallicRoughness:{texture:{name:t.pbrMetallicRoughness.metallicRoughnessTexture?.texture?.source.name||null,uri:t.pbrMetallicRoughness.metallicRoughnessTexture?.texture?.source.uri||null},factor:[t.pbrMetallicRoughness.metallicFactor||1,t.pbrMetallicRoughness.roughnessFactor||1]},normal:{texture:{uri:t.normalTexture?.texture?.source.uri||null,name:t.normalTexture?.texture?.source.name||null}},emissive:{texture:{name:t.emissiveTexture?.texture?.source.name||null,uri:t.emissiveTexture?.texture?.source.uri||null},factor:t.emissiveFactor||[0,0,0]},occlusion:{texture:{name:t.occlusionTexture?.texture?.source.name||null,uri:t.occlusionTexture?.texture?.source.uri||null}}}}),e}getDefaultMaterialData(){return this.defaultMaterialData||(this.defaultMaterialData=this.getAllMaterialData()),this.defaultMaterialData}async updateMaterialTextureAndFactor(e,t,r,n=null,o=`texture_${Date.now()}`){if(this.model?.model&&e){if(r){if("baseColor"===t&&e.pbrMetallicRoughness.setBaseColorFactor(c(r)),"metallicRoughness"===t){const t=r;e.pbrMetallicRoughness.setMetallicFactor(t[0]),e.pbrMetallicRoughness.setRoughnessFactor(t[1])}"emissive"===t&&e.setEmissiveFactor(c(r))}if("default"!==n){if(!n)return t.includes("base")||t.includes("metallic")?e.pbrMetallicRoughness[t+"Texture"].setTexture(null):e[t+"Texture"].setTexture(null),void console.log(`Removed texture from '${t}' of material '${e.name}'.`);try{"string"==typeof n&&((n=await this.model.createTexture(n)).name=o),t.includes("base")||t.includes("metallic")?e.pbrMetallicRoughness[t+"Texture"].setTexture(n):e[t+"Texture"].setTexture(n),console.log(`Applied new texture ${o} to '${t}' of material '${e.name}'.`)}catch(e){console.error("Error creating texture:",e)}}else{if(t.includes("base")||t.includes("metallic")){const r=this.copy.model?.getMaterialByName(e.name),n=r.pbrMetallicRoughness[t+"Texture"].texture;e.pbrMetallicRoughness[t+"Texture"].setTexture(n)}else{const r=this.copy.model?.getMaterialByName(e.name),n=r[t+"Texture"].texture;e[t+"Texture"].setTexture(n)}console.log(`Removed texture from '${t}' of material '${e.name}'.`)}}else console.warn("Model or Material not found.")}async applyTexture(e,t=null,r=null){if(window.modelReader=this,e){if(t&&r){const{name:n,url:o}=e[t]?.[r]?.texture||{},i=this.model?.model?.getMaterialByName(t);let a=o||this.getTextureByName(n);e[t]?.[r]?.texture||(a="default");const s=e[t]?.[r]?.factor||null;return void this.updateMaterialTextureAndFactor(i,r,s,a,n)}Object.entries(e).forEach(([e,t])=>{const r=this.model?.model?.getMaterialByName(e);r?Object.keys(t).forEach(e=>{const{name:n,url:o}=t[e]?.texture||{};let i=o||this.getTextureByName(n);t[e]?.texture||(i="default");const a=t[e]?.factor||null;this.updateMaterialTextureAndFactor(r,e,a,i,n)}):console.warn(`Material '${e}' not found.`)})}}async shakeMaterialFactor(e,t=500){if(!e)return;"string"==typeof e&&(e=this.getMaterialByName(e));const r=e.pbrMetallicRoughness.baseColorFactor.slice();e.pbrMetallicRoughness.setBaseColorFactor([1,0,0,1]),setTimeout(()=>{e.pbrMetallicRoughness.setBaseColorFactor(r)},t)}getTextureURIByName(e){return e.includes("blob")?e:this.textures[e]||null}getMaterialByName(e){return this.model.model.getMaterialByName(e)}getTexturesArray(){return this.texturesArray}getTextureChannels(){return[{label:"Base Color",value:"baseColor"},{label:"Metallic Roughness",value:"metallicRoughness"},{label:"Normal Map",value:"normal"},{label:"Emissive",value:"emissive"},{label:"Occlusion",value:"occlusion"}]}getMaterialsNameForSelectControl(){return this.model.loaded?Array.isArray(this.model.model.materials)?[{label:"None",value:""},...this.model.model.materials.map(e=>({label:e.name.replace("_mtl","").replaceAll("_"," "),value:e.name}))]:[]:(console.warn("Model not loaded yet"),[])}getFirstMaterialName(){return this.model.loaded&&this.model.model?Array.isArray(this.model.model.materials)?this.model.model.materials[0].name:null:(console.warn("Model not loaded yet"),null)}getTextureById(e){return this.thumbnailsById.get(e)}async downloadTexture(e,t=512){var r;const n=this.getTextureById(e),o=null!==(r=n?.texture)&&void 0!==r?r:null;if(!o)return void console.error("Texture not found!");const i=await o.source.createThumbnail(t,t),a=document.createElement("canvas");a.width=t,a.height=t;const s=a.getContext("2d"),l=new Image;l.crossOrigin="anonymous",l.src=i,l.onload=()=>{s.drawImage(l,0,0,t,t);const r=document.createElement("a");r.href=a.toDataURL("image/png"),r.download=`texture_${e}.png`,r.click()},l.onerror=()=>{console.error("Failed to load texture image.")}}deepCloneModel(){const e=this.model.originalModel.clone(!0);return e.traverse(e=>{e.isMesh&&(e.material&&(e.material=e.material.clone()),e.geometry&&(e.geometry=e.geometry.clone()),e.material?.map&&(e.material.map=e.material.map.clone(),e.material.map&&(e.material.map.needsUpdate=!0)))}),e}async loadModelWithoutAppending(e){return new Promise((t,r)=>{const n=document.createElement("model-viewer");n.src=e,n.setAttribute("loading","eager"),n.style.display="none",n.style.height="0",document.body.appendChild(n),n.addEventListener("load",()=>{t(n)}),n.addEventListener("error",e=>{r(new Error(`Model failed to load: ${e.message}`))})})}getTextureByName(e){if(!e)return null;try{var t,r;if(this.copy?.thumbnailsById)return null!==(t=this.copy.thumbnailsById.get(e)?.texture)&&void 0!==t?t:null;if(this.thumbnailsById)return null!==(r=this.thumbnailsById.get(e)?.texture)&&void 0!==r?r:null}catch(t){console.error(t.message,e)}return null}createCopy(){}};function a(e){return e.replace(/-\d{2,4}x\d{2,4}/g,"")}function s(e){return/\.(jpg|jpeg|png|gif|bmp|svg|webp)$/i.test(e)}function l(e){return(e/=255)<=.04045?e/12.92:((e+.055)/1.055)**2.4}function c(e){if(!["rgba","rgb"].includes((t=e,/^rgba\(\s*\d{1,3}\s*,\s*\d{1,3}\s*,\s*\d{1,3}\s*,\s*(0|1|0?\.\d+)\s*\)$/i.test(t)?"rgba":!!/^rgb\(\s*\d{1,3}\s*,\s*\d{1,3}\s*,\s*\d{1,3}\s*\)$/i.test(t)&&"rgb")))return e;var t;const r=e.match(/rgba?\((\d+),\s*(\d+),\s*(\d+),\s*([\d.]+)\)/);if(!r)return null;const[n,o,i,a,s]=r.map(Number);return[l(o),l(i),l(a),s]}document.addEventListener("DOMContentLoaded",function(){document.querySelectorAll(".bp3dv-model-main")?.forEach(e=>{let t=e.dataset.selector;if(!t||""===t)return!1;let r=function(e){if(!e)return null;let t=document.querySelector(s(e)?`img[src="${e}"]`:e.includes("#")||e.includes(".")?e:`.${e}`);return s(e)&&(t||(t=document.querySelector(`img[data-src="${e}"]`)),t||(t=document.querySelector(`img[data-src="${a(e)}"]`)),t||(t=document.querySelector(`img[src="${a(e)}"]`)),t||(t=document.querySelector(`a[href="${a(e)}"]`))),t&&(t=function(e){let t=e.parentElement;for(;t&&1===t.children.length;)e=t,t=t.parentElement;return e}(t),setTimeout(()=>{t?.innerHTML?.includes("<a")&&t.classList.add("bp3dv_a_popup_opener")},500),t?.innerHTML?.includes("<img")&&"reintest.be"===window.location.host&&t.classList.add("bp3dv_play_icon")),t}(t);r?(r?.addEventListener("click",t=>{t.preventDefault(),window.type="product",e.classList.add("model-open"),setTimeout(()=>{window.dispatchEvent(new Event("resize"))},1e3)}),r.style.cursor="pointer",e.querySelector(".close-btn").addEventListener("click",()=>e.classList.remove("model-open")),e.querySelector(".bg-overlay").addEventListener("click",()=>e.classList.remove("model-open"))):console.warn("clickable item is not found",t)})});const u=({attributes:t})=>{const{styles:r,uniqueId:n,woo:o,progressBar:i,additional:a}=t,{progressBarColor:s,thumbSize:l="70px"}=r,[c,u]=(0,e.useState)(null);return(0,e.useEffect)(()=>{const e=`\n        #${n} {\n            width: 100%;\n        }\n        .pop-up-content-wrap #${n} {\n            height: ${r?.height?.desktop||r.height};\n        }\n        #${n} .select {display: none}\n        \n        #${n} model-viewer {\n            background-color: ${r?.bgColor};\n            ${r?.bgImage?`background:url(${r?.bgImage}) no-repeat center center;background-size: cover;`:" "} \n        }\n        #${n} model-viewer::part(default-progress-bar) {\n             display: ${i?"block":"none"}\n        }\n        #${n} .online_3d_viewer,\n        #${n} .b3dviewer-wrapper {\n            width: ${o?"100%":`${r?.width.desktop||r.width}`};\n            height: ${o?"100%":r?.height.desktop||r.height};\n        }\n        @media screen and (max-width: 1024px){\n            #${n} .online_3d_viewer,\n            #${n} .b3dviewer-wrapper {\n                width: ${o?"100%":`${r?.width.tablet||r.width}`};\n                height: ${o?"100%":r?.height.tablet||r.height};\n            }\n        }\n        @media screen and (max-width: 640px){\n            #${n} .online_3d_viewer,\n            #${n} .b3dviewer-wrapper {\n                width: ${o?"100%":`${r?.width.mobile||r.width}`};\n                height: ${r?.height.mobile||r.height};\n            }\n        }\n        #${n} model-viewer::part(default-progress-bar){\n            background: ${s};\n        }\n        #${n} .slides .slide{\n            width: ${l};\n            height: ${l};\n            padding: calc(${l} * 0.04);\n            }\n            #${n} .thumbsItem{\n                width: ${l};\n            height: ${l};\n        }\n        #${n} .slide-number span{\n            font-size: calc(${l} * 0.8);\n        }\n        ${a?.CSS}\n    `.replaceAll(/\n?\s\s/g,"");u(e)},[n,r,a,i]),(0,e.createElement)("style",null,c)},d=({currentItem:t,setCurrentItem:r,models:n})=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"slideController"},(0,e.createElement)("svg",{fill:"#000000",onClick:()=>r(t>0?t-1:t),className:"arrow-left "+(t>0?"":"disabled"),width:"24px",height:"24px",viewBox:"-78.5 0 512 512",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)("title",null,"left"),(0,e.createElement)("path",{d:"M257 64L291 98 128 262 291 426 257 460 61 262 257 64Z"})),(0,e.createElement)("svg",{onClick:()=>r(t<n.length-1?t+1:t),fill:"#000000",className:"arrow-right "+(t<n.length-1?"":"disabled"),width:"24px",height:"24px",viewBox:"-77 0 512 512",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)("title",null,"right"),(0,e.createElement)("path",{d:"M98 460L64 426 227 262 64 98 98 64 294 262 98 460Z"})))),m=r.p+"images/posx.636c229f.jpg",h=r.p+"images/posy.0722c73e.jpg",f=r.p+"images/posz.829f9244.jpg",p=r.p+"images/negx.dad27d20.jpg",g=r.p+"images/negy.ef9d1d19.jpg",w=r.p+"images/negz.a6842016.jpg",b=({attributes:t,currentItem:r,setCurrentItem:n,isPagination:o})=>{const{multiple:i,woo:a,models:s}=t;return(0,e.createElement)(e.Fragment,null,i&&!a&&o&&(0,e.createElement)("div",{className:"slider"},(0,e.createElement)("div",{className:"slides"},s.map((t,o)=>(0,e.createElement)("button",{key:o,className:`slide ${o===r?"selected":""} ${t.poster?"":"slide-number"}`,"data-source":t?.modelUrl,"data-poster":t?.poster,onClick:()=>n(o)},t.poster?(0,e.createElement)("img",{src:t?.poster}):(0,e.createElement)("span",null,o+1))))))},y=t=>(0,e.createElement)("button",{...t}),v=r=>{const{attributes:n,currentItem:o,setCurrentItem:i,modelSrc:a,setAttributes:s,__:l}=r,{styles:u,models:v,multiple:E,O3DVSettings:x={},isBackend:C=!1,environmentImage:_,model:k}=n,{isNavigation:A,isPagination:M,camera:S,mouseControl:L,zoom:T=!0,showEdge:R=!1,edgeColor:N}=x,I=(0,e.useMemo)(()=>E?v[o]:k,[v[o],k,E,o]),B=I?.useEnvironmentAsSkybox||n?.useEnvironmentAsSkybox,[P,F]=(0,e.useState)(!1),D=(0,e.useRef)(null),z=(0,e.useRef)(null),$=(0,e.useRef)(null);return(0,e.useEffect)(()=>{if(a)if(z.current?.Destroy(),z.current?.canvas?.remove(),z.current=null,null===z.current){const e=S&&!E?{camera:new window.OV.Camera(new window.OV.Coord3D(...Object.values(S.eye)),new window.OV.Coord3D(...Object.values(S.center)),new window.OV.Coord3D(...Object.values(S.up)),45)}:{};$.current=new window.OV.EmbeddedViewer(D.current,{...e,backgroundColor:new window.OV.RGBAColor(255,255,255,255),edgeSettings:new window.OV.EdgeSettings(R,new window.OV.RGBColor(0,0,0),1),environmentSettings:new window.OV.EnvironmentSettings([m,p,h,g,f,w],!1)});const t=[a?.replace(/https?:/,window.location.protocol)];$.current.LoadModelFromUrlList(t),z.current=$.current,window.VR=$.current,$.current.viewer.navigation.SetZoomStatus(T)}else{z.current.LoadModelFromUrlList([a?.replace(/https?:/,window.location.protocol)]);const e=new window.OV.Coord3D(0,0,0);z.current.viewer.SetCamera(new window.OV.Camera(new window.OV.Coord3D(0,0,1),e,new window.OV.Coord3D(0,1,0),45)),setTimeout(()=>{window.dispatchEvent(new Event("resize"))},1e3)}return()=>{if(null!==z.current&&null!==D.current&&P){delete z.current.model,z.current.viewer.renderer.resetState(),z.current.viewer.Clear(),z.current.viewer&&delete z.current.viewer,z.current.canvas.getContext("webgl2").getExtension("WEBGL_lose_context").loseContext();const e=z.current.canvas.cloneNode(!0);z.current.canvas.parentNode.replaceChild(e,z.current.canvas),D.current?.removeChild(D.current.children[0]),z.current.canvas?.parentNode?.removeChild(z.current.canvas),z.current.canvas.remove(),z.current=null,F(!1)}}},[a,I,_,B]),(0,e.useEffect)(()=>{t(u.bgColor)&&z.current?.viewer?.SetBackgroundColor(t(u.bgColor)),setTimeout(()=>{z.current?.viewer?.Resize(D.current?.offsetWidth,D.current?.offsetHeight)},10),z.current.viewer.Render(),window.viewer=z.current},[u,a]),(0,e.useEffect)(()=>{window.addEventListener("resize",()=>{z.current?.viewer?.Resize(D.current?.offsetWidth,D.current?.offsetHeight)})},[]),(0,e.useEffect)(()=>{if($.current){$.current.viewer.navigation.SetZoomStatus(T);const[e=0,t=0,r=0]=c(N)||[];$.current.viewer.SetEdgeSettings(new window.OV.EdgeSettings(R,new window.OV.RGBColor(255*e,255*t,255*r),0))}},[T,R,N]),(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{ref:D,role:"img","aria-label":"Canvas showing the model in the 3D Viewer",className:`${L?"":"DMC"} ${z.current?.modelLoader?.inProgress} relative flex  flex-col items-center justify-center p-2 h-72 w-72 border-2 border-black rounded-sm online_3d_viewer`},(0,e.createElement)(b,{attributes:n,setCurrentItem:i,currentItem:o,isPagination:M}),E&&A&&v.length>1&&(0,e.createElement)(d,{currentItem:o,setCurrentItem:i,models:v}),C&&!E&&(0,e.createElement)("div",{className:"setDefaultViewContainer"},(0,e.createElement)(y,{variant:"primary",className:"setDefaultView button button-primary",onClick:()=>{if(z.current){const t=(e=z.current?.viewer?.GetCamera(),JSON.parse(JSON.stringify(e)));s({O3DVSettings:{...x,camera:t}})}var e}},l("Set Initial View","model-viewer")),S&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)(y,{variant:"primary",className:"setDefaultView button button-primary",onClick:()=>{z.current?.viewer.SetCamera(new window.OV.Camera(new window.OV.Coord3D(...Object.values(S.eye)),new window.OV.Coord3D(...Object.values(S.center)),new window.OV.Coord3D(...Object.values(S.up)),45))}},l("See Default View","model-viewer")),(0,e.createElement)(y,{variant:"primary",className:"setDefaultView button button-primary",onClick:()=>s({O3DVSettings:{...x,camera:null}})},l("Remove Default View","model-viewer"))))))},E=({container:t})=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("svg",{onClick:()=>{const e=t.current?.parentElement;e&&e.classList.add("active")},className:"view_3d control-btn",enableBackground:"new 0 0 512 512",viewBox:"0 0 512 512",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)("g",null,(0,e.createElement)("path",{d:"m430.928 233.886v33.008c32.309 16.144 51.082 36.127 51.082 55.951 0 45.434-91.41 81.126-181.847 88.649-8.257.68-14.395 7.927-13.705 16.174.648 7.932 7.487 14.336 16.174 13.715 78.723-6.481 209.368-40.451 209.368-118.538 0-42.648-41.729-71.987-81.072-88.959z"}),(0,e.createElement)("path",{d:"m165.821 360.564c-8.329-8.475-22.804-4.333-25.346 7.31l-6.627 30.346c-99.272-26.719-146.934-84.187-52.598-131.326v-33.008c-123.786 53.4-104.361 153.699 46.19 193.674l-5.959 27.284c-2.555 11.698 9.038 21.593 20.219 17.121l74.974-29.99c9.918-3.966 12.636-16.788 5.128-24.431z"}),(0,e.createElement)("path",{d:"m262.671 40.888c-4.624-2.621-10.288-2.597-14.89.06l-121.551 70.177c20.586 11.885 118.654 68.505 129.841 74.964l129.885-75.34z"}),(0,e.createElement)("path",{d:"m111.236 277.451c0 5.358 2.858 10.307 7.497 12.986l122.361 70.645v-149.012l-129.859-74.974v140.355z"}),(0,e.createElement)("path",{d:"m400.942 277.451v-140.726l-129.858 75.325v149.032l122.361-70.645c4.64-2.679 7.497-7.628 7.497-12.986z"}))),(0,e.createElement)("svg",{className:"view_img control-btn",style:{padding:"3px"},onClick:()=>{const e=t.current?.parentElement;e&&e.classList.remove("active")},viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)("path",{d:"M15.5 10a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3z",fill:"#0D0D0D"}),(0,e.createElement)("path",{d:"M3 5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5zm16 0H5v7.92l3.375-2.7a1 1 0 0 1 1.25 0l4.3 3.44 1.368-1.367a1 1 0 0 1 1.414 0L19 14.586V5zM5 19h14v-1.586l-3-3-1.293 1.293a1 1 0 0 1-1.332.074L9 12.28l-4 3.2V19z",fill:"#0D0D0D"})));var x=r(8605);const C=({size:t=35,...r})=>(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",id:"Capa_1",x:"0px",y:"0px",viewBox:"0 0 512 512",style:{enableBackground:"new 0 0 512 512"},xmlSpace:"preserve",className:"ar-qr-opener",width:t,height:t,...r},(0,e.createElement)("g",{id:"XMLID_100_"},(0,e.createElement)("line",{id:"XMLID_108_",style:{fill:"none",stroke:"#000000",strokeWidth:20,strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:10},x1:223.158,y1:461.837,x2:253.281,y2:461.837}),(0,e.createElement)("path",{id:"XMLID_107_",style:{fill:"none",stroke:"#000000",strokeWidth:20,strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:10},d:" M97.65,199.11V44.14c0-18.86,15.28-34.14,34.14-34.14h212.86c18.86,0,34.14,15.28,34.14,34.14v36.15"}),(0,e.createElement)("path",{id:"XMLID_109_",style:{fill:"none",stroke:"#000000",strokeWidth:20,strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:10},d:" M97.65,312.89v154.97c0,18.86,15.28,34.14,34.14,34.14h212.86c18.86,0,34.14-15.28,34.14-34.14c0-16.94,0-117.03,0-154.97 c0-0.25,0-0.5,0-0.75"}),(0,e.createElement)("polyline",{id:"XMLID_110_",style:{fill:"none",stroke:"#000000",strokeWidth:20,strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:10},points:" 318.715,10 298.633,50.163 178.143,50.163 157.726,10 \t"}),(0,e.createElement)("circle",{style:{fill:"none",stroke:"#000000",strokeWidth:20,strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:10},cx:378.791,cy:190.734,r:110.449}),(0,e.createElement)("line",{style:{fill:"none",stroke:"#000000",strokeWidth:20,strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:10},x1:413.528,y1:187.311,x2:443.052,y2:220.857}),(0,e.createElement)("line",{style:{fill:"none",stroke:"#000000",strokeWidth:20,strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:10},x1:405.052,y1:150.571,x2:405.052,y2:220.857}),(0,e.createElement)("path",{style:{fill:"none",stroke:"#000000",strokeWidth:20,strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:10},d:" M443.052,168.838c0,10.088-8.846,18.267-19.3,18.267c-5.186,0-18.548,0.081-18.548,0.081c-0.178-50.176-0.117-32.87-0.13-36.614 c0,0,12.551,0,18.678,0C434.206,150.571,443.052,158.75,443.052,168.838z"}),(0,e.createElement)("path",{id:"XMLID_112_",style:{fill:"none",stroke:"#000000",strokeWidth:20,strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:10},d:" M313.258,220.857l26.392-69.296c0.54-1.318,2.406-1.32,2.948-0.003l26.152,69.299"}),(0,e.createElement)("line",{id:"XMLID_113_",style:{fill:"none",stroke:"#000000",strokeWidth:20,strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:10},x1:321.488,y1:203.599,x2:360.652,y2:203.599}),(0,e.createElement)("polyline",{id:"XMLID_111_",style:{fill:"none",stroke:"#000000",strokeWidth:20,strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:10},points:" 395.951,299.85 378.79,312.89 238.221,419.67 97.65,312.89 22.76,256 238.221,92.33 286.961,129.35 \t"}),(0,e.createElement)("polyline",{id:"XMLID_114_",style:{fill:"none",stroke:"#000000",strokeWidth:20,strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:10},points:" 293.451,260.85 293.451,287.88 238.221,319.77 183.001,287.88 183.001,224.12 238.221,192.23 270.13,210.66 \t"}),(0,e.createElement)("polyline",{id:"XMLID_115_",style:{fill:"none",stroke:"#000000",strokeWidth:20,strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:10},points:" 183.001,224.12 238.221,256 276.98,233.63 \t"}),(0,e.createElement)("line",{id:"XMLID_116_",style:{fill:"none",stroke:"#000000",strokeWidth:20,strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:10},x1:238.221,y1:256,x2:238.221,y2:319.768}))),_=({size:t=35,className:r,onClick:n,...o})=>(0,e.createElement)("svg",{viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,className:r,onClick:n,...o},(0,e.createElement)("path",{fill:"#000000",fillRule:"evenodd",d:"M11.2929,3.29289 C11.6834,2.90237 12.3166,2.90237 12.7071,3.29289 C13.0976,3.68342 13.0976,4.31658 12.7071,4.70711 L9.41421,8 L12.7071,11.2929 C13.0976,11.6834 13.0976,12.3166 12.7071,12.7071 C12.3166,13.0976 11.6834,13.0976 11.2929,12.7071 L8,9.41421 L4.70711,12.7071 C4.31658,13.0976 3.68342,13.0976 3.29289,12.7071 C2.90237,12.3166 2.90237,11.6834 3.29289,11.2929 L6.58579,8 L3.29289,4.70711 C2.90237,4.31658 2.90237,3.68342 3.29289,3.29289 C3.68342,2.90237 4.31658,2.90237 4.70711,3.29289 L8,6.58579 L11.2929,3.29289 Z"})),k=({size:t=35,className:r,onClick:n,...o})=>(0,e.createElement)("svg",{fill:"#000000",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,onClick:n,className:r,...o},(0,e.createElement)("path",{d:"M19,6.5H17.72l-.32-1a3,3,0,0,0-2.84-2H9.44A3,3,0,0,0,6.6,5.55l-.32,1H5a3,3,0,0,0-3,3v8a3,3,0,0,0,3,3H19a3,3,0,0,0,3-3v-8A3,3,0,0,0,19,6.5Zm1,11a1,1,0,0,1-1,1H5a1,1,0,0,1-1-1v-8a1,1,0,0,1,1-1H7a1,1,0,0,0,1-.68l.54-1.64a1,1,0,0,1,.95-.68h5.12a1,1,0,0,1,.95.68l.54,1.64A1,1,0,0,0,17,8.5h2a1,1,0,0,1,1,1Zm-8-9a4,4,0,1,0,4,4A4,4,0,0,0,12,8.5Zm0,6a2,2,0,1,1,2-2A2,2,0,0,1,12,14.5Z"})),A=({size:t=35,className:r,onClick:n,...o})=>(0,e.createElement)("svg",{viewBox:"0 0 512 512",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,className:r,onClick:n,...o},(0,e.createElement)("g",{id:"Solid"},(0,e.createElement)("path",{d:"m104 72h48a24 24 0 0 0 24-24 24 24 0 0 0 -24-24h-104a24 24 0 0 0 -24 24v104a24 24 0 0 0 48 0v-48l116 116a22.627 22.627 0 0 0 32 0 22.627 22.627 0 0 0 0-32z"}),(0,e.createElement)("path",{d:"m220 292a22.627 22.627 0 0 0 -32 0l-116 116v-48a24 24 0 0 0 -48 0v104a24 24 0 0 0 24 24h104a24 24 0 0 0 24-24 24 24 0 0 0 -24-24h-48l116-116a22.627 22.627 0 0 0 0-32z"}),(0,e.createElement)("path",{d:"m464 24h-104a24 24 0 0 0 -24 24 24 24 0 0 0 24 24h48l-116 116a22.627 22.627 0 0 0 0 32 22.627 22.627 0 0 0 32 0l116-116v48a24 24 0 0 0 48 0v-104a24 24 0 0 0 -24-24z"}),(0,e.createElement)("path",{d:"m464 336a24 24 0 0 0 -24 24v48l-116-116a22.627 22.627 0 0 0 -32 0 22.627 22.627 0 0 0 0 32l116 116h-48a24 24 0 0 0 -24 24 24 24 0 0 0 24 24h104a24 24 0 0 0 24-24v-104a24 24 0 0 0 -24-24z"}))),M=({size:t=35,className:r,onClick:n,...o})=>(0,e.createElement)("svg",{width:t,height:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 640 640",className:r,onClick:n,...o},(0,e.createElement)("path",{d:"M352 128C352 110.3 337.7 96 320 96C302.3 96 288 110.3 288 128L288 288L128 288C110.3 288 96 302.3 96 320C96 337.7 110.3 352 128 352L288 352L288 512C288 529.7 302.3 544 320 544C337.7 544 352 529.7 352 512L352 352L512 352C529.7 352 544 337.7 544 320C544 302.3 529.7 288 512 288L352 288L352 128z"})),S=({size:t=35,className:r,onClick:n,...o})=>(0,e.createElement)("svg",{width:t,height:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 640 640",onClick:n,...o},(0,e.createElement)("path",{d:"M96 320C96 302.3 110.3 288 128 288L512 288C529.7 288 544 302.3 544 320C544 337.7 529.7 352 512 352L128 352C110.3 352 96 337.7 96 320z"})),L=({viewerRef:t,arLink:r,placement:n})=>{const[o,i]=(0,e.useState)(""),[a,s]=(0,e.useState)(!1),l=function(e=window.location.href){try{const t=new URL(e),r={};return t.searchParams.forEach((e,t)=>{r[t]=e}),r}catch(e){return console.error("Invalid URL:",e),{}}}();return(0,e.useEffect)(()=>{(async e=>{try{i(await x.toDataURL(function(e,t={}){const{add:r={},remove:n=[],update:o={}}=t;try{const t=new URL(e);return Object.entries(r).forEach(([e,r])=>{t.searchParams.set(e,r)}),Object.entries(o).forEach(([e,r])=>{t.searchParams.set(e,r)}),n.forEach(e=>{t.searchParams.delete(e)}),t?.toString()}catch(t){return console.error("Invalid URL:",t),e}}(e,{add:{"bp3d-action":"view-ar"}})),{width:100})}catch(e){console.error(e)}})(r||window.location.href)},[]),(0,e.useEffect)(()=>{t.current?.loaded&&"view-ar"===l["bp3d-action"]&&t.current?.canActivateAR&&t.current?.activateAR()},[t.current]),(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"ar-qrcode "+(a?"active":"")},(0,e.createElement)("div",{className:"qr-content"},(0,e.createElement)("strong",null,"QR Code"),"shop-loop-item"!==n&&(0,e.createElement)("p",null,"Scan QR code to view in AR on mobile"),(0,e.createElement)("img",{src:o,width:"100%"})),(0,e.createElement)(C,{className:"control-btn ar-qr-opener",onClick:()=>{t.current?.canActivateAR?t.current?.activateAR():s(!0)}}),(0,e.createElement)(_,{className:"control-btn close",onClick:()=>s(!1)})))},T=function(){if(document.exitFullscreen)document.exitFullscreen();else if(document.webkitExitFullscreen)document.webkitExitFullscreen();else if(document.msExitFullscreen)document.msExitFullscreen();else{const e=document.querySelector(".b3dviewer-wrapper.fullscreen");e&&e.classList.remove("fullscreen")}},R=r.p+"images/loading.0178ea4a.webp";var N=Symbol.for("immer-nothing"),I=Symbol.for("immer-draftable"),B=Symbol.for("immer-state");function P(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var F=Object.getPrototypeOf;function D(e){return!!e&&!!e[B]}function z(e){return!!e&&(O(e)||Array.isArray(e)||!!e[I]||!!e.constructor?.[I]||H(e)||W(e))}var $=Object.prototype.constructor.toString();function O(e){if(!e||"object"!=typeof e)return!1;const t=F(e);if(null===t)return!0;const r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return r===Object||"function"==typeof r&&Function.toString.call(r)===$}function V(e,t){0===j(e)?Reflect.ownKeys(e).forEach(r=>{t(r,e[r],e)}):e.forEach((r,n)=>t(n,r,e))}function j(e){const t=e[B];return t?t.type_:Array.isArray(e)?1:H(e)?2:W(e)?3:0}function q(e,t){return 2===j(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function U(e,t,r){const n=j(e);2===n?e.set(t,r):3===n?e.add(r):e[t]=r}function H(e){return e instanceof Map}function W(e){return e instanceof Set}function J(e){return e.copy_||e.base_}function K(e,t){if(H(e))return new Map(e);if(W(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const r=O(e);if(!0===t||"class_only"===t&&!r){const t=Object.getOwnPropertyDescriptors(e);delete t[B];let r=Reflect.ownKeys(t);for(let n=0;n<r.length;n++){const o=r[n],i=t[o];!1===i.writable&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(t[o]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[o]})}return Object.create(F(e),t)}{const t=F(e);if(null!==t&&r)return{...e};const n=Object.create(t);return Object.assign(n,e)}}function Y(e,t=!1){return Q(e)||D(e)||!z(e)||(j(e)>1&&(e.set=e.add=e.clear=e.delete=X),Object.freeze(e),t&&Object.entries(e).forEach(([e,t])=>Y(t,!0))),e}function X(){P(2)}function Q(e){return Object.isFrozen(e)}var Z,G={};function ee(e){const t=G[e];return t||P(0),t}function te(){return Z}function re(e,t){t&&(ee("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function ne(e){oe(e),e.drafts_.forEach(ae),e.drafts_=null}function oe(e){e===Z&&(Z=e.parent_)}function ie(e){return Z={drafts_:[],parent_:Z,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function ae(e){const t=e[B];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function se(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];return void 0!==e&&e!==r?(r[B].modified_&&(ne(t),P(4)),z(e)&&(e=le(t,e),t.parent_||ue(t,e)),t.patches_&&ee("Patches").generateReplacementPatches_(r[B].base_,e,t.patches_,t.inversePatches_)):e=le(t,r,[]),ne(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==N?e:void 0}function le(e,t,r){if(Q(t))return t;const n=t[B];if(!n)return V(t,(o,i)=>ce(e,n,t,o,i,r)),t;if(n.scope_!==e)return t;if(!n.modified_)return ue(e,n.base_,!0),n.base_;if(!n.finalized_){n.finalized_=!0,n.scope_.unfinalizedDrafts_--;const t=n.copy_;let o=t,i=!1;3===n.type_&&(o=new Set(t),t.clear(),i=!0),V(o,(o,a)=>ce(e,n,t,o,a,r,i)),ue(e,t,!1),r&&e.patches_&&ee("Patches").generatePatches_(n,r,e.patches_,e.inversePatches_)}return n.copy_}function ce(e,t,r,n,o,i,a){if(D(o)){const a=le(e,o,i&&t&&3!==t.type_&&!q(t.assigned_,n)?i.concat(n):void 0);if(U(r,n,a),!D(a))return;e.canAutoFreeze_=!1}else a&&r.add(o);if(z(o)&&!Q(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;le(e,o),t&&t.scope_.parent_||"symbol"==typeof n||!Object.prototype.propertyIsEnumerable.call(r,n)||ue(e,o)}}function ue(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Y(t,r)}var de={get(e,t){if(t===B)return e;const r=J(e);if(!q(r,t))return function(e,t,r){const n=fe(t,r);return n?"value"in n?n.value:n.get?.call(e.draft_):void 0}(e,r,t);const n=r[t];return e.finalized_||!z(n)?n:n===he(e.base_,t)?(ge(e),e.copy_[t]=we(n,e)):n},has:(e,t)=>t in J(e),ownKeys:e=>Reflect.ownKeys(J(e)),set(e,t,r){const n=fe(J(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const n=he(J(e),t),a=n?.[B];if(a&&a.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(((o=r)===(i=n)?0!==o||1/o==1/i:o!=o&&i!=i)&&(void 0!==r||q(e.base_,t)))return!0;ge(e),pe(e)}var o,i;return e.copy_[t]===r&&(void 0!==r||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_[t]=!0),!0},deleteProperty:(e,t)=>(void 0!==he(e.base_,t)||t in e.base_?(e.assigned_[t]=!1,ge(e),pe(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const r=J(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n?{writable:!0,configurable:1!==e.type_||"length"!==t,enumerable:n.enumerable,value:r[t]}:n},defineProperty(){P(11)},getPrototypeOf:e=>F(e.base_),setPrototypeOf(){P(12)}},me={};function he(e,t){const r=e[B];return(r?J(r):e)[t]}function fe(e,t){if(!(t in e))return;let r=F(e);for(;r;){const e=Object.getOwnPropertyDescriptor(r,t);if(e)return e;r=F(r)}}function pe(e){e.modified_||(e.modified_=!0,e.parent_&&pe(e.parent_))}function ge(e){e.copy_||(e.copy_=K(e.base_,e.scope_.immer_.useStrictShallowCopy_))}function we(e,t){const r=H(e)?ee("MapSet").proxyMap_(e,t):W(e)?ee("MapSet").proxySet_(e,t):function(e,t){const r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:te(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=n,i=de;r&&(o=[n],i=me);const{revoke:a,proxy:s}=Proxy.revocable(o,i);return n.draft_=s,n.revoke_=a,s}(e,t);return(t?t.scope_:te()).drafts_.push(r),r}function be(e){if(!z(e)||Q(e))return e;const t=e[B];let r;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=K(e,t.scope_.immer_.useStrictShallowCopy_)}else r=K(e,!0);return V(r,(e,t)=>{U(r,e,be(t))}),t&&(t.finalized_=!1),r}V(de,(e,t)=>{me[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),me.deleteProperty=function(e,t){return me.set.call(this,e,t,void 0)},me.set=function(e,t,r){return de.set.call(this,e[0],t,r,e[0])};var ye=new class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,t,r)=>{if("function"==typeof e&&"function"!=typeof t){const r=t;t=e;const n=this;return function(e=r,...o){return n.produce(e,e=>t.call(this,e,...o))}}let n;if("function"!=typeof t&&P(6),void 0!==r&&"function"!=typeof r&&P(7),z(e)){const o=ie(this),i=we(e,void 0);let a=!0;try{n=t(i),a=!1}finally{a?ne(o):oe(o)}return re(o,r),se(n,o)}if(!e||"object"!=typeof e){if(n=t(e),void 0===n&&(n=e),n===N&&(n=void 0),this.autoFreeze_&&Y(n,!0),r){const t=[],o=[];ee("Patches").generateReplacementPatches_(e,n,t,o),r(t,o)}return n}P(1)},this.produceWithPatches=(e,t)=>{if("function"==typeof e)return(t,...r)=>this.produceWithPatches(t,t=>e(t,...r));let r,n;return[this.produce(e,t,(e,t)=>{r=e,n=t}),r,n]},"boolean"==typeof e?.autoFreeze&&this.setAutoFreeze(e.autoFreeze),"boolean"==typeof e?.useStrictShallowCopy&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){var t;z(e)||P(8),D(e)&&(D(t=e)||P(10),e=be(t));const r=ie(this),n=we(e,void 0);return n[B].isManual_=!0,oe(r),n}finishDraft(e,t){const r=e&&e[B];r&&r.isManual_||P(9);const{scope_:n}=r;return re(n,t),se(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){const n=t[r];if(0===n.path.length&&"replace"===n.op){e=n.value;break}}r>-1&&(t=t.slice(r+1));const n=ee("Patches").applyPatches_;return D(e)?n(e,t):this.produce(e,e=>n(e,t))}},ve=ye.produce;ye.produceWithPatches.bind(ye),ye.setAutoFreeze.bind(ye),ye.setUseStrictShallowCopy.bind(ye),ye.applyPatches.bind(ye),ye.createDraft.bind(ye),ye.finishDraft.bind(ye);const Ee=({attributes:t,viewerRef:r,setAttributes:n})=>{const{mode:o,models:i,model:a,multiple:s,activeIndex:l=0,hotspotStyle:c="style-2"}=t,[u,d]=(0,e.useState)([]);return(0,e.useEffect)(()=>{d([]),setTimeout(()=>{d(s?i[l]?.hotspots:a.hotspots||[])},100)},[l,s,a.hotspots,i[l]?.hotspots]),(0,e.useEffect)(()=>{if(r.current){const e=e=>{if("new-hotspot"===o){const t=r.current.positionAndNormalFromPoint(e.clientX,e.clientY);if(t?.normal){const e={title:"Title",orbit:r.current.getCameraOrbit()?.toString(),normal:t.normal?.toString(),target:r.current.getCameraTarget()?.toString(),position:t.position?.toString(),fov:r.current.getFieldOfView()};if(s){const t=ve(i,t=>{t[l]={...i[l],hotspots:[...i[l]?.hotspots||[],e]}});n({mode:"default",models:t})}else{const t=ve(a,t=>{t.hotspots=[...a?.hotspots||[],e]});n({mode:"default",model:t})}}}};return r.current.addEventListener("click",e),()=>{r.current?.removeEventListener("click",e)}}},[r.current,o]),(0,e.useEffect)(()=>{if(r.current?.loaded){const e=e=>{let t=e.dataset;r.current.cameraTarget=t.target,r.current.cameraOrbit=t.orbit,r.current.fieldOfView=(t.fov||45)+"deg"};r.current.querySelectorAll(".view-button").forEach(t=>{t.addEventListener("click",()=>e(t))})}},[r.current?.loaded]),(0,e.createElement)(e.Fragment,null,Array.isArray(u)&&u.map((t,r)=>{const{title:n,desc:o,position:i,normal:a,orbit:s,target:l,fov:u}=t;if(i)return(0,e.createElement)("button",{key:r,className:`view-button ${c}`,"data-target":l,"data-orbit":s,"data-normal":a,"data-position":i,"data-fov":u,slot:`hotspot-${r}`},"style-4"===c&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)("svg",{className:"hotspot-icon",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"#000000",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},(0,e.createElement)("circle",{cx:"12",cy:"12",r:"10"}),(0,e.createElement)("line",{x1:"12",y1:"16",x2:"12",y2:"12"}),(0,e.createElement)("line",{x1:"12",y1:"8",x2:"12.01",y2:"8"}))),"style-1"===c&&(0,e.createElement)(e.Fragment,null,n),["style-2","style-3"].includes(c)&&(0,e.createElement)(e.Fragment,null,n,o&&(0,e.createElement)("div",{className:"annotation"},o)),["style-4"].includes(c)&&(0,e.createElement)(e.Fragment,null,o&&(0,e.createElement)("div",{className:"annotation"},o)))}))},xe=e=>{if(!e?.getCameraOrbit)return;const t=e.getCameraOrbit()?.toString(),r=e.getCameraTarget()?.toString();return{orbit:t,target:r,fov:e.getFieldOfView()?.toString()+"deg"}},Ce=(e,t)=>{e&&(e.cameraTarget=t.target,e.cameraOrbit=t.orbit,t.fov&&e.setAttribute("field-of-view",t.fov))},_e=(e,t,r)=>{e&&(r&&!r.includes("null")?e.setAttribute(t,r):e.removeAttribute(t))},ke=({title:t="",disabled:r=!1,text:n="",onCopy:o=()=>{},onFinishCopy:i=()=>{},className:a="",children:s})=>{const[l,c]=(0,e.useState)(!1),u=(0,e.useRef)(null);return(0,e.useEffect)(()=>()=>{u.current&&clearTimeout(u.current)},[]),(0,e.createElement)("button",{type:"button",onClick:()=>(async e=>{r||await(async e=>{try{if(navigator.clipboard)return await navigator.clipboard.writeText(e),!0;const t=document.createElement("textarea");t.value=e,t.style.position="fixed",document.body.appendChild(t),t.focus(),t.select();const r=document.execCommand("copy");return document.body.removeChild(t),r}catch(e){return console.error("Copy failed:",e),!1}})("function"==typeof e?e():e)&&(c(!0),o(),u.current=setTimeout(()=>{c(!1),i()},2e3))})(n),disabled:r||l,title:t||(l?"Copied!":""),className:a},s)},Ae=({attributes:t,setAttributes:r,modelSrc:n,viewerRef:o,setModelReader:a,__:s})=>{const{loadingPercentage:l=!1,uniqueId:c,model:u,models:m,exposure:h,variant:f,multiple:p,selectedAnimation:g,animation:w,autoplay:b,woo:y,isPagination:v,isNavigation:E,currentViewer:x="modelViewer",loading:C,texture:_={},appliedTextures:k,activeIndex:A=0,isBackend:M,isPremium:S,placement:L}=t,T=p?m[A]:u,{availableAnimations:N,availableVariants:I,loaded:B}=o.current||{},P=(0,e.useRef)(null),F=(0,e.useRef)(null),D=T?.poster?.replace(/https?:/,window.location.protocol),z=T?.skyboxImage,[$,O]=(0,e.useState)(!1);(0,e.useEffect)(()=>{F.current&&(F.current.style.display=w&&B?"inline-block":"none")},[w,F,B]),(0,e.useEffect)(()=>{setTimeout(()=>{if(o.current&&B&&F.current){o.current.animationName=g;const e=F.current?.querySelector("select");e&&(e.value=g)}},100)},[g,B]),(0,e.useEffect)(()=>{P.current&&f&&B&&(P.current.style.display="inline-block")},[f,P,B]),(0,e.useEffect)(()=>{const e=e=>{o.current.variantName=e.target.value},t=e=>{o.current.animationName=e.target.value};if(B&&P.current){const t=P.current?.querySelector("select");return t&&t.addEventListener("change",e),()=>{t&&t.removeEventListener("change",e)}}if(B&&F.current){const e=F.current?.querySelector("select");return e&&e.addEventListener("change",t),()=>{e&&e.removeEventListener("change",t)}}},[B]),(0,e.useEffect)(()=>{((e,t={},r)=>{if(!e)return;const{exposure:n,selectedAnimation:o,autoRotate:i,rotateDelay:a,rotationPerSecond:s,preload:l,zoom:c,environmentImage:u,zoomLevel:d=1,lockXAxisRotation:m,lockYAxisRotation:h,toneMapping:f,multiple:p,useEnvironmentAsSkybox:g}=r,w=t?.environmentImage||u,b=t?.skyboxImage;setTimeout(()=>{const{mouseControl:u,autoplay:y,shadow:v,rotate:E,rotateAlongX:x,rotateAlongY:C,loading:_}=r;let k=null;k=p?t?.useEnvironmentAsSkybox?t?.environmentImage:t?.skyboxImage||null:g?w:b||null,u?e.setAttribute("camera-controls",""):e.removeAttribute("camera-controls"),y?e.setAttribute("autoplay",""):e.removeAttribute("autoplay"),v?e.setAttribute("shadow-intensity",v?"1":"0"):e.removeAttribute("shadow-intensity"),v?e.setAttribute("shadow-softness","1"):e.removeAttribute("shadow-softness"),_?e.setAttribute("loading",_):e.removeAttribute("loading"),m&&(e.setAttribute("min-camera-orbit","0deg auto auto"),e.setAttribute("max-camera-orbit","0deg auto auto")),h&&(e.setAttribute("min-camera-orbit","auto 90deg auto"),e.setAttribute("max-camera-orbit","auto 90deg auto")),m||h||(e.removeAttribute("min-camera-orbit"),e.removeAttribute("max-camera-orbit")),_e(e,"skybox-image",k),k&&e.setAttribute("skybox-height",t.skyboxHeight||"0m"),i?(e.setAttribute("auto-rotate",""),e.setAttribute("auto-rotate-delay",a||3e3),e.setAttribute("rotation-per-second",s+"deg")):e.removeAttribute("auto-rotate"),_e(e,"environment-image",w),E?e.setAttribute("camera-orbit",`${x}deg ${C}deg 105%`):e.removeAttribute("camera-orbit"),e.setAttribute("reveal",l),e.dataset.animation=o,e.setAttribute("exposure",t?.exposure||n),_e(e,"tone-mapping",t?.toneMapping||f),c?e.removeAttribute("disable-zoom"):e.setAttribute("disable-zoom",""),e?.addEventListener("load",function(){_e(e,"scale",`${d} ${d} ${d}`)}),e?.loaded&&e.setAttribute("scale",`${d} ${d} ${d}`),setTimeout(()=>{E?e?.setAttribute("camera-orbit",`${x}deg ${C}deg 105%`):e?.removeAttribute("camera-orbit")},500)},10)})(o.current,T,t)},[c,t,A]),(0,e.useEffect)(()=>{T&&o.current&&setTimeout(()=>{const{arEnabled:e,arPlacement:t="floor",arMode:r="quick-look",modelISOSrc:n}=T||{};e?(o.current.setAttribute("ar",""),o.current.setAttribute("ar-placement",t),o.current.setAttribute("ar-modes",r+" "+"webxr scene-viewer quick-look".replace(r,"")?.replace("  "," ")),n&&o.current.setAttribute("ios-src",n),o.current.removeAttribute("ar-status")):(o.current.removeAttribute("ar"),o.current.removeAttribute("ar-placement"),o.current.removeAttribute("ar-mode"))},100)},[T,o.current]),(0,e.useEffect)(()=>{const e=async()=>{const e=new i(o.current);a(e),e.onReady(()=>{e.applyTexture(k)})};return setTimeout(()=>{o?.current?.loaded?e():o?.current?.addEventListener("load",e)},20),()=>{o.current?.removeEventListener("load",e)}},[n,x]),(0,e.useEffect)(()=>{!b&&B&&o.current?.pause()},[b,B]),(0,e.useEffect)(()=>{P.current&&(P.current.style.display=f?"inline-block":"none")},[f]);const V=(e=!1)=>{if(o.current)if(p){const t=ve(m,t=>{t[A].initialView=e?null:xe(o.current)});r({models:t})}else{const t=ve(u,t=>{t.initialView=e?null:xe(o.current)});r({model:t})}};return(0,e.useEffect)(()=>{if(o?.current&&T?.initialView)setTimeout(()=>{Ce(o.current,T?.initialView)},100);else{const e={cameraOrbit:"45deg 65deg 2.5m",cameraTarget:"0m 1m 0m",orientation:"0deg 0deg 0deg"};Ce(o.current,e)}},[o.current,A]),(0,e.useEffect)(()=>{if(o?.current){const e=o.current.querySelector(".percentage"),t=o.current.querySelector(".bp3d_loader"),r=t=>{e.innerHTML=100*parseInt(t.detail.totalProgress)+"%",1===t.detail.totalProgress&&(e.style.cssText="display: none")};if(e)return o.current?.addEventListener("progress",r),o.current?.addEventListener("load",()=>{e.style.cssText="display: none",t&&(t.style.cssText="display: none")}),()=>{o.current?.removeEventListener("progress",r)};o.current?.addEventListener("load",()=>{const e=o.current.querySelector(".bp3d_loader");e&&(e.style.cssText="display: none")})}},[o?.current]),T?(0,e.createElement)(e.Fragment,null,(0,e.createElement)("model-viewer",{loading:C||"auto","camera-controls":!0,ref:o,"data-js-focus-visible":!0,"data-decoder":p?m[0]?.decoder:u?.decoder,poster:D,src:n?.replace(/https?:/,window.location.protocol),exposure:T?.exposure||h,alt:"A 3D model",channel:_.type,texture:_.image,"skybox-image":z,"skybox-height":"1.5m",ar:T.arEnabled||!1,"ar-placement":T.arPlacement||"floor"},(0,e.createElement)(Ee,{attributes:t,viewerRef:o,activeIndex:A,setAttributes:r}),(0,e.createElement)("span",{slot:"interaction-prompt",style:{display:"none"}}),(0,e.createElement)("span",{slot:"ar-button"}),(0,e.createElement)("button",{type:"button",slot:"poster",id:"default-poster","aria-label":"A 3D model",style:D?{backgroundImage:` url("${D}")`}:{}}),l&&!o.current?.loaded&&(0,e.createElement)("div",{className:"percentageWrapper",slot:"progress-bar"},(0,e.createElement)("div",{className:"overlay"}),(0,e.createElement)("span",{className:"percentage"},"0%")),!o.current?.loaded&&!l&&(0,e.createElement)("div",{className:"bp3d_loader",slot:"progress-bar"},(0,e.createElement)("div",{className:"overlay"}),(0,e.createElement)("img",{style:{width:"100px",background:"white",borderRadius:"5px",height:"auto"},src:R})),I?.length>0?(0,e.createElement)("div",{className:"variantWrapper select",ref:P},s("Variant","model-viewer"),(0,e.createElement)("select",{id:"variant"},I?.map(t=>(0,e.createElement)("option",{key:t,value:t},t)))):B&&M&&f?"No variants found - ":"",N?.length&&o.current.loaded>0?(0,e.createElement)("div",{className:"animationWrapper select",ref:F},s("Animations","model-viewer"),(0,e.createElement)("select",{id:"animations"},N?.map(t=>(0,e.createElement)("option",{key:t,value:t},t)))):B&&M&&w?" No animations found":"",p&&!y&&v&&(0,e.createElement)("div",{className:"slider"},(0,e.createElement)("div",{className:"slides"},m.map((t,n)=>(0,e.createElement)("button",{key:n,className:`slide ${0===n?"selected":""} ${t.poster?"":"slide-number"}`,"data-source":t?.modelUrl,"data-poster":t?.poster,onClick:()=>r({activeIndex:n})},t.poster?(0,e.createElement)("img",{src:t?.poster}):(0,e.createElement)("span",null,n+1))))),p&&E&&m.length>1&&(0,e.createElement)(d,{currentItem:A,setCurrentItem:e=>r({activeIndex:e}),models:m})),M&&(0,e.createElement)(e.Fragment,null,"visual-editor"===L?(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"setDefaultViewContainer"},(0,e.createElement)(ke,{title:$?s("Copied","model-viewer"):"",disabled:$,text:`${JSON.stringify(xe(o.current))}`,onCopy:()=>O(!0),onFinishCopy:()=>O(!1),className:"button button-primary"},s("Copy Current/Initial View","model-viewer")),$&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"components-snackbar"},"Copied Succesfully")))):(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"setDefaultViewContainer"},(0,e.createElement)("button",{className:"button button-primary",disabled:!S,onClick:()=>V()},s("Set Current as Initial View","model-viewer"),S?"":" - Pro"),T?.initialView&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)("button",{className:"button button-primary",onClick:()=>Ce(o.current,T?.initialView)}," ",s("See Initial View","model-viewer")," "),(0,e.createElement)("button",{className:"button button-primary",onClick:()=>V(!0)},s("Remove Initial View","model-viewer"))))))):(0,e.createElement)(e.Fragment,null)},Me=({attributes:t,__:r,setAttributes:n,viewerRef:o,setModelReader:i,containerRef:a})=>{const[s,l]=(0,e.useState)(!1),{uniqueId:c,model:m,models:h=[],fullscreen:f,cameraBtn:p,zoomInOutBtn:g,multiple:w,additional:b,rotateAlongX:y,align:x,woo:C,currentViewer:R="modelViewer",O3DVSettings:N={},placement:I,activeIndex:B=0,arLink:P,position:F}=t,{isFullscreen:D,isPagination:z}=N,[$,O]=(0,e.useState)(w?h[B]?.modelUrl:m?.modelUrl),V=(0,e.useMemo)(()=>w?h[B]:m,[h[B],m,w,B]),{selectedVariants:j}=((t,r,n,o)=>{const[i,a]=(0,e.useState)(null);return(0,e.useEffect)(()=>{if(t){if((e=>{document.querySelectorAll(".variations_form .variations select")?.forEach(t=>{const r={};r[t.name]=t.value,t.addEventListener("change",()=>{e(e=>({...e,[t.name]:t.value}))}),e(r)})})(a),n.current){const e=document.querySelector(".wl-single-slider:not(.slick-cloned)");e&&!e.querySelector(".modelViewerBlock")&&(e.append(n.current.parentElement),n.current.parentElement.style.display="none",setTimeout(()=>{},100)),(e=>{const t=document.querySelector("table.variations");if(!t)return;const r=t.querySelectorAll(".label label"),n={};r?.forEach(e=>{n[`attribute_${e.getAttribute("for")}`]=""}),e(n),t.querySelectorAll("tr")?.forEach(t=>{const r=t?.querySelector(".label label")?.getAttribute("for");let n=t.querySelectorAll(".swatchly-swatch");n.length<=0&&(n=t.querySelectorAll("li")),n?.forEach(t=>{t.addEventListener("click",()=>{n[`attribute_${r}`]=t.getAttribute("data-attr_value"),e(e=>({...e,[`attribute_${r}`]:t.getAttribute("data-attr_value")||t.getAttribute("data-value")}))})})})})(a)}setTimeout(()=>{const e=document.querySelector(".select2-selection__rendered"),t=new MutationObserver(function(t){for(const n of t)if("childList"===n.type&&n.target===e){const t=r.find(t=>t.product_variant===e.innerText)||r.find(e=>"all"===e.product_variant)||r?.[0];o(t.modelUrl)}});if(e){const r={childList:!0,subtree:!0};t.observe(e,r)}},1e3)}return()=>{}},[t]),{selectedVariants:i,setSelectedVariants:a}})(C,h,a,O);(0,e.useEffect)(()=>{O(w?h[B]?.modelUrl:m?.modelUrl)},[B,w,h,m]),(0,e.useEffect)(()=>{try{new URL($),l(!0)}catch(e){l(!1)}setTimeout(()=>{((e={})=>{const{wrapper:t}=e;if(!t)return;const r=t.querySelector("model-viewer");if(!r)return!1;if(r.src)try{const e=new URL(r.src);e?.protocol!==window.location.protocol&&(r.src=e.href.replace(e.protocol,window.location.protocol))}catch(e){console.warn(e.message,r.src)}const n=t.querySelector("#variant"),o=t.querySelector(".loader");o&&("interaction"===r.reveal||r.loaded)&&(o.style.display="none");const i=t.querySelectorAll(".slide");for(const e of i)e.addEventListener("click",t=>{t.preventDefault(),r.src=e?.dataset?.source,r.poster=e?.dataset?.poster,i.forEach(e=>{e.classList.remove("selected")}),e.classList.add("selected"),n&&(n.innerHTML="")});document.querySelector(".slider")?.addEventListener("beforexrselect",e=>{e.preventDefault()})})({wrapper:o.current?.parentElement})},10)},[c,m,h,w,$]),(0,e.useEffect)(()=>{o.current?.turntableRotation&&o.current.resetTurntableRotation()},[y]);const q=e=>{n({activeIndex:e})};return(0,e.useEffect)(()=>{h?.length<=B&&q(h?.length-1)},[h?.length]),(0,e.useEffect)(()=>{q(B||0)},[B]),(0,e.useEffect)(()=>{if(j&&""!=Object.values(j)?.[0]){const e=((e,t)=>{if(!t||"object"!=typeof t)return;let r=e.find(e=>{const r=Object.keys(t)[0];if(!e?.variations?.[r])return[t[r],"all"].includes(e.product_variant);let n=!0;return Object.keys(t).map(r=>{const o=t[r]||"all";e?.variations?.[r]!==o&&"all"!==e?.variations?.[r]&&(n=!1)}),n});return r||(r=e.find(e=>Object.keys(t).find(t=>"all"===e.variations?.[t]))),r})([...h],j),t=h.indexOf(e);n({activeIndex:e?t:0})}},[j]),(0,e.useEffect)(()=>{h.find((e,t)=>{if(e.variations){const r=Object.entries(e.variations).filter(([,e])=>"all"===e);Array.isArray(r)&&r.length>0&&n({activeIndex:t})}})},[]),$&&V?(0,e.createElement)("div",{ref:a,id:`${c}`,className:`modelViewerBlock b3dviewer position_${F}  ${C?"woocommerce":""} ${z&&w?"modelPagination":""}`},["shop-loop-item"].includes(I)&&(0,e.createElement)(E,{container:a}),(0,e.createElement)("div",{id:b?.ID||"additional_id",className:`${b?.Class} b3dviewer-wrapper bp_model_parent align${x}`},(0,e.createElement)(u,{attributes:t}),$&&s&&(0,e.createElement)(e.Fragment,null,"modelViewer"===R?(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Ae,{attributes:t,setAttributes:n,modelSrc:$,setModelSrc:O,viewerRef:o,selectedVariants:j,setModelReader:i,__:r})):(0,e.createElement)(e.Fragment,null,(0,e.createElement)(v,{setAttributes:n,__:r,modelSrc:$,currentItem:B,setCurrentItem:q,model:$,attributes:t,selectedVariants:j,setModelSrc:O}))),""===$&&h[B].poster&&(0,e.createElement)(e.Fragment,null,C&&h.length>1&&(0,e.createElement)(d,{currentItem:B,setCurrentItem:e=>n({activeIndex:e}),models:h}),(0,e.createElement)("img",{src:h[B].poster})),(0,e.createElement)("div",{className:"position-top-right"},(0,e.createElement)(_,{className:"control-btn fullscreen-close",onClick:T})),(0,e.createElement)("div",{className:"position-bottom-right"},g&&"shop-loop-item"!==I&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)(M,{className:"control-btn",onClick:()=>{if("modelViewer"===R)o.current.zoom(2);else{const e=a.current?.querySelector("canvas");if(e){const t=new WheelEvent("wheel",{deltaY:-100,deltaMode:0,bubbles:!0});e.dispatchEvent(t)}}}}),(0,e.createElement)(S,{className:"control-btn",onClick:()=>{if("modelViewer"===R)o.current.zoom(-2);else{const e=a.current?.querySelector("canvas");if(e){const t=new WheelEvent("wheel",{deltaY:100,deltaMode:0,bubbles:!0});e.dispatchEvent(t)}}}})),["product-gallery-inline"].includes(I)&&(0,e.createElement)(E,{container:a}),(f&&"modelViewer"===R||"O3DViewer"===R&&D)&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)(A,{size:20,className:"control-btn fullscreen-open",onClick:()=>{!function(e){if(e)if(e.requestFullscreen)e.requestFullscreen();else if(e.webkitRequestFullscreen)e.webkitRequestFullscreen();else if(e.msRequestFullscreen)e.msRequestFullscreen();else{const t=e.closest(".b3dviewer-wrapper");t&&t.classList.add("fullscreen")}}(a?.current?.querySelector(".bp_model_parent"))}}))),(0,e.createElement)("div",{className:"position-bottom-left"},"modelViewer"===R&&(0,e.createElement)(e.Fragment,null,p&&(0,e.createElement)(k,{className:"control-btn cameraBtn",onClick:()=>function(e,t){const r=document.createElement("a");r.href=e,r.download=t,document.body.appendChild(r),r.click(),document.body.removeChild(r)}(o.current.toDataURL(),"model.png")}),V?.arEnabled&&(0,e.createElement)(L,{viewerRef:o,arLink:P,placement:I})))),C&&("modelViewer"===R&&t.isPagination||"O3DViewer"===R&&z)&&(0,e.createElement)("div",{className:"modelThumbs"},h.map((t,r)=>(0,e.createElement)(e.Fragment,null,t.poster&&(0,e.createElement)("img",{className:"thumbsItem "+(r===B?"selected":""),onClick:()=>n({activeIndex:r}),src:t.poster}))))):(0,e.createElement)(e.Fragment,null)},Se=({...t})=>{const{viewerRef:r,attributes:n}=t,{css:o}=((t,r)=>{const[n,o]=(0,e.useState)(null),{gallery_trigger:i}=window.bp3dBlock?.selectors||{},{position:a}=r;return(0,e.useEffect)(()=>{if(!t.current)return;const e=t.current?.closest(".modelViewerBlock");if(!e||i)return;const r=document.querySelector(i);r&&e&&"top"===a&&(r.style.cssText="top: "+e.offsetHeight+"px !important;"),o("")},[r,t.current]),t.current?{css:n}:{css:null}})(r,n),{placement:i,position:a,styles:s,is_not_compatible:l}=n,c=(0,e.useRef)(null);return(0,e.useEffect)(()=>{const e=(t,r)=>{if(l&&"replace"===a)return t.style.cssText=`width:100%;height:${s.height.desktop||s.height}`;r.offsetHeight>1e3||r.offsetWidth>1e3?setTimeout(()=>e(t,r),100):(t.style.cssText=`width:${r.offsetWidth}px;height:${r.offsetHeight}px`,window.dispatchEvent(new Event("resize")))};if(c.current){const t=c.current.querySelector(".b3dviewer-wrapper");if(["product-gallery","product-gallery-inline"].includes(i)){const r=document.querySelector(".woocommerce-product-gallery__image");r?e(t,r):t.style.cssText=`width:100%;height:${s.height.desktop||s.height}`}else"shortcode"===i&&(t.style.cssText=`width:100%;height:${s.height.desktop||s.height}`)}},[c.current]),(0,e.createElement)(e.Fragment,null,(0,e.createElement)("style",null,o),(0,e.createElement)(Me,{...t,containerRef:c}))};window.modelViewerMessages=[];const Le=({attributes:t})=>{const[r,n]=(0,e.useState)(null),[o,i]=(0,e.useState)(t);function a(e,t=""){return e}const s=(0,e.useRef)();window.modelViewerMessages.push({attributes:t,viewerRef:s});const l=(u=i,e=>{u(t=>({...t,...e}))}),c=(0,e.useRef)(null);var u;return t.woo?(0,e.createElement)(Se,{attributes:o,viewerRef:s,__:a,modelReader:r,setModelReader:n,setAttributes:l}):(0,e.createElement)(Me,{attributes:o,viewerRef:s,__:a,modelReader:r,setModelReader:n,setAttributes:l,containerRef:c})},{createRoot:Te}=window.ReactDOM,Re=function(e,t){if(!(e&&e instanceof HTMLElement))return;const r=document.createElement("a");r.href=t,e.parentNode.insertBefore(r,e),r.appendChild(e)},{createRoot:Ne}=window.ReactDOM;window.addEventListener("elementor/frontend/init",function(){elementorFrontend.hooks.addAction("frontend/element_ready/3dModelViewer.default",function(e){const r=e[0].querySelector(".modelViewerBlock.elementor");t(r)}),setTimeout(()=>{document.querySelectorAll(".modelViewerBlock.elementor").forEach(t)},1e3),setTimeout(()=>{document.querySelectorAll(".modelViewerBlock.elementor").forEach(t)},3e3);const t=t=>{if(!t)return;const r=(e=>{let t=null;try{t=JSON.parse(e)}catch(e){console.warn(e.message)}return t})(({...t.dataset}||{}).attributes);r&&(t.removeAttribute("data-attributes"),Ne(t).render((0,e.createElement)(Le,{attributes:r})))}});const{createRoot:Ie}=window.ReactDOM;document.addEventListener("DOMContentLoaded",function(){const t=document.querySelectorAll(".modelViewerBlock:not(.elementor)");window.domRendered||(window.domRendered=!0,t.forEach(t=>{const r={...t.dataset}||{};setTimeout(()=>{Object.keys(t.dataset).map(e=>delete t.dataset[e])},10);const n=(e=>{let t=null;try{t=JSON.parse(e)}catch(e){console.warn(e.message)}return t})(r.attributes);if(!n)return;const{is_not_compatible:o,placement:i}=n;["product-gallery"].includes(i)?o?(t=>{const{gallery:r}=window.bp3dBlock?.selectors,n=document.querySelector(r),{position:o}=t,i=r=>{Te(r).render((0,e.createElement)(Le,{attributes:t}))};switch(o){case"replace":{const e=document.querySelector(r);i(e);break}case"bottom":{const e=document.createElement("div");setTimeout(()=>{n.appendChild(e),i(e)},500);break}case"top":{const e=document.createElement("div");n.prepend(e),i(e);break}}})(n):Ie(t).render((0,e.createElement)(Le,{attributes:n})):"product-gallery-inline"===i?Ie(t).render((0,e.createElement)(Le,{attributes:n})):"shop-loop-item"===i?(Ie(t).render((0,e.createElement)(Le,{attributes:n})),function(e){setTimeout(()=>{let t=e.previousElementSibling?.offsetHeight;const r=e.closest("a");if(r){const e=r.getAttribute("href");Re(r.querySelector(".woocommerce-loop-product__title"),e),Re(r.querySelector(".price"),e),r.removeAttribute("href")}if(t){e.style.height=t+"px";const r=setTimeout(()=>{if(e.querySelector(".modelViewerBlock")){clearInterval(r),e.querySelector(".modelViewerBlock").style.height=t+"px",e.querySelector(".bp_model_parent").setAttribute("style",`height:${t+"px"};min-width: 100%`);const n=function(e){let t=e.parentElement;for(;t&&"A"===t.tagName;)e=t,t=t.parentElement;return e}(e);n?.addEventListener("click",function(e){"openBtn"!==e.target.id&&"closeBtn"!==e.target.id&&"MODEL-VIEWER"!==e.target.tagName||e.preventDefault()})}window.dispatchEvent(new Event("resize"))},100)}},100)}(t)):("shortcode"===i||"popup"===i)&&Ie(t).render((0,e.createElement)(Le,{attributes:n}))}))})})()})();


Current_dir [ WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
29 Apr 2026 3.49 AM
raydofqv / raydofqv
0755
blocks
--
8 Jun 2026 8.15 AM
raydofqv / raydofqv
0755
images
--
8 Jun 2026 8.15 AM
raydofqv / raydofqv
0755
setup-wizard
--
8 Jun 2026 8.15 AM
raydofqv / raydofqv
0755
visual-editor
--
8 Jun 2026 8.15 AM
raydofqv / raydofqv
0755
.htaccess
0.231 KB
8 Jun 2026 8.15 AM
raydofqv / raydofqv
0555
admin.asset.php
0.082 KB
16 Mar 2026 4.43 PM
raydofqv / raydofqv
0644
admin.js
1.73 KB
16 Mar 2026 4.43 PM
raydofqv / raydofqv
0644
dashboard.asset.php
0.211 KB
16 Mar 2026 4.43 PM
raydofqv / raydofqv
0644
dashboard.css
102.564 KB
16 Mar 2026 4.43 PM
raydofqv / raydofqv
0644
dashboard.js
1.14 MB
16 Mar 2026 4.43 PM
raydofqv / raydofqv
0644
dashboard.js.LICENSE.txt
0.229 KB
16 Mar 2026 4.43 PM
raydofqv / raydofqv
0644
frontend.asset.php
0.102 KB
16 Mar 2026 4.43 PM
raydofqv / raydofqv
0644
frontend.css
17.51 KB
16 Mar 2026 4.43 PM
raydofqv / raydofqv
0644
frontend.js
83.426 KB
16 Mar 2026 4.43 PM
raydofqv / raydofqv
0644
public.asset.php
0.102 KB
16 Mar 2026 4.43 PM
raydofqv / raydofqv
0644
public.css
12.671 KB
16 Mar 2026 4.43 PM
raydofqv / raydofqv
0644
public.js
81.688 KB
16 Mar 2026 4.43 PM
raydofqv / raydofqv
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME
Static GIF Static GIF